diff --git a/go.mod b/go.mod index 7be0e9fe8..3936726b8 100644 --- a/go.mod +++ b/go.mod @@ -3,20 +3,20 @@ module github.com/Azure/azapi-lsp go 1.23.0 require ( - github.com/Azure/aztfmigrate v1.15.1-0.20241113022352-4681ae5d18c0 - github.com/Azure/azure-sdk-for-go/sdk/azcore v1.14.0 + github.com/Azure/aztfmigrate v1.15.1-0.20250227042733-c21045529abd + github.com/Azure/azure-sdk-for-go/sdk/azcore v1.17.0 github.com/apparentlymart/go-textseg v1.0.0 github.com/creachadair/jrpc2 v0.32.0 github.com/expr-lang/expr v1.16.9 github.com/gertd/go-pluralize v0.2.1 - github.com/google/go-cmp v0.6.0 + github.com/google/go-cmp v0.7.0 github.com/hashicorp/go-version v1.7.0 github.com/hashicorp/hcl-lang v0.0.0-20211123142056-191cd51dec5b - github.com/hashicorp/hcl/v2 v2.22.0 - github.com/hashicorp/terraform-exec v0.21.0 + github.com/hashicorp/hcl/v2 v2.23.0 + github.com/hashicorp/terraform-exec v0.22.0 github.com/mitchellh/cli v1.1.5 github.com/spf13/afero v1.6.0 - github.com/zclconf/go-cty v1.15.0 + github.com/zclconf/go-cty v1.16.2 golang.org/x/exp v0.0.0-20231006140011-7918f672742d ) @@ -32,7 +32,7 @@ require ( github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation v0.9.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice v1.2.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn v1.1.1 // indirect - github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices v1.6.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices v1.7.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5 v5.7.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2 v2.1.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datafactory/armdatafactory/v7 v7.0.0 // indirect @@ -44,11 +44,12 @@ require ( github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/domainservices/armdomainservices v1.2.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor v1.4.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight v1.2.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridkubernetes/armhybridkubernetes v1.2.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub v1.3.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault v1.4.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto v1.3.1 // indirect github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic v1.2.0 // indirect - github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3 v3.2.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4 v4.0.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor v0.7.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp v1.0.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork v1.1.0 // indirect @@ -58,6 +59,7 @@ require ( github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery v1.1.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts v1.0.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2 v2.0.0-beta.4 // indirect + github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql v1.2.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.6.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache v1.0.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover v1.1.1 // indirect @@ -67,14 +69,13 @@ require ( github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/timeseriesinsights/armtimeseriesinsights v1.2.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/workloads/armworkloads v1.1.0 // indirect github.com/Masterminds/goutils v1.1.1 // indirect - github.com/Masterminds/semver/v3 v3.3.0 // indirect + github.com/Masterminds/semver/v3 v3.3.1 // indirect github.com/Masterminds/sprig/v3 v3.3.0 // indirect - github.com/Microsoft/go-winio v0.6.2 // indirect github.com/agext/levenshtein v1.2.3 // indirect github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect github.com/armon/go-radix v1.0.0 // indirect github.com/bgentry/speakeasy v0.2.0 // indirect - github.com/fatih/color v1.17.0 // indirect + github.com/fatih/color v1.18.0 // indirect github.com/golang/protobuf v1.5.4 // indirect github.com/google/uuid v1.6.0 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect @@ -82,19 +83,19 @@ require ( github.com/hashicorp/go-hclog v1.6.3 // indirect github.com/hashicorp/go-multierror v1.1.1 // indirect github.com/hashicorp/go-uuid v1.0.3 // indirect - github.com/hashicorp/hc-install v0.9.0 // indirect + github.com/hashicorp/hc-install v0.9.1 // indirect github.com/hashicorp/logutils v1.0.0 // indirect - github.com/hashicorp/terraform-json v0.22.1 // indirect - github.com/hashicorp/terraform-plugin-go v0.24.0 // indirect + github.com/hashicorp/terraform-json v0.24.0 // indirect + github.com/hashicorp/terraform-plugin-go v0.26.0 // indirect github.com/hashicorp/terraform-plugin-log v0.9.0 // indirect - github.com/hashicorp/terraform-plugin-sdk/v2 v2.34.0 // indirect + github.com/hashicorp/terraform-plugin-sdk/v2 v2.36.1 // indirect github.com/huandu/xstrings v1.5.0 // indirect github.com/magodo/armid v0.0.0-20240524082432-7ce06ae46c33 // indirect - github.com/magodo/aztft v0.3.1-0.20241011060757-310738ca90dd // indirect + github.com/magodo/aztft v0.3.1-0.20250220225137-662088a9e6d6 // indirect github.com/magodo/tfadd v0.10.1-0.20240902124619-bd18a56f410d // indirect github.com/magodo/tfpluginschema v0.0.0-20240902090353-0525d7d8c1c2 // indirect github.com/magodo/tfstate v0.0.0-20241016043929-2c95177bf0e6 // indirect - github.com/mattn/go-colorable v0.1.13 // indirect + github.com/mattn/go-colorable v0.1.14 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/go-testing-interface v1.14.1 // indirect @@ -103,7 +104,7 @@ require ( github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/posener/complete v1.2.3 // indirect github.com/shopspring/decimal v1.4.0 // indirect - github.com/spf13/cast v1.7.0 // indirect + github.com/spf13/cast v1.7.1 // indirect github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect @@ -115,5 +116,5 @@ require ( golang.org/x/text v0.22.0 // indirect golang.org/x/tools v0.30.0 // indirect google.golang.org/appengine v1.6.8 // indirect - google.golang.org/protobuf v1.35.1 // indirect + google.golang.org/protobuf v1.36.5 // indirect ) diff --git a/go.sum b/go.sum index 5234397e3..71b3695cd 100644 --- a/go.sum +++ b/go.sum @@ -1,9 +1,9 @@ dario.cat/mergo v1.0.1 h1:Ra4+bf83h2ztPIQYNP99R6m+Y7KfnARDfID+a+vLl4s= dario.cat/mergo v1.0.1/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= -github.com/Azure/aztfmigrate v1.15.1-0.20241113022352-4681ae5d18c0 h1:QyBOJ3ZArhtWOmcuStXjkOi4ncpi/ZTbFuHHY2gcUzY= -github.com/Azure/aztfmigrate v1.15.1-0.20241113022352-4681ae5d18c0/go.mod h1:gITltwxgnRx5ByF4Xx0aJYbkE9pD8c1mH1gKFAV/nl0= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.14.0 h1:nyQWyZvwGTvunIMxi1Y9uXkcyr+I7TeNrr/foo4Kpk8= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.14.0/go.mod h1:l38EPgmsp71HHLq9j7De57JcKOWPyhrsW1Awm1JS6K0= +github.com/Azure/aztfmigrate v1.15.1-0.20250227042733-c21045529abd h1:bA8ZJtLWPpd2ta+fFUkqVOk7e+L2t5br3BcU1iqLUK4= +github.com/Azure/aztfmigrate v1.15.1-0.20250227042733-c21045529abd/go.mod h1:d/awmWc/Yh2z4Mq1vGc1WQ5+naU93SXpZrsXROEJpg8= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.17.0 h1:g0EZJwz7xkXQiZAI5xi9f3WWFYBlX1CPTrR+NDToRkQ= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.17.0/go.mod h1:XCW7KnZet0Opnr7HccfUw1PLc4CjHqpcaxW8DHklNkQ= github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.7.0 h1:tfLQ34V6F7tVSwoTf/4lH5sE0o6eCJuNDTmH09nDpbc= github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.7.0/go.mod h1:9kIvujWAA58nmPmWB1m23fyWic1kYZMxD9CxaWn4Qpg= github.com/Azure/azure-sdk-for-go/sdk/internal v1.10.0 h1:ywEEhmNahHBihViHepv3xPBn1663uRv2t2q/ESv9seY= @@ -26,8 +26,8 @@ github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice v github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice v1.2.0/go.mod h1:d7OLd8MIV32CmujSnOFkT7R5N0YsV5qVI+WnKHzQujQ= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn v1.1.1 h1:CtE6GCP9YEDF6DjpFxl7xQBqklqfyCC/xkBKUGa/IAc= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn v1.1.1/go.mod h1:b9yk+8vyxSsBsiEjk9kzrwxgyn+7+J4HzDOYUPznES4= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices v1.6.0 h1:TiYjDq0LCNgtee1teMayYT5FjHmlunWUpthVANUXYPM= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices v1.6.0/go.mod h1:yErdzWZBzjNJCnbC1DcUcSVhjTgllT4PyOenFSeXSJI= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices v1.7.0 h1:4exaC92+n1FzhSKb5Ghino2XEk3cClUtzvveL1U9YeM= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices v1.7.0/go.mod h1:BkhZrH3JiVTkrTqCeYHOmqReFcZTYEMf8jcFDlrCJLk= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5 v5.7.0 h1:LkHbJbgF3YyvC53aqYGR+wWQDn2Rdp9AQdGndf9QvY4= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5 v5.7.0/go.mod h1:QyiQdW4f4/BIfB8ZutZ2s+28RAgfa/pT+zS++ZHyM1I= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2 v2.1.0 h1:8+KuY4N/1QSlGCsAFnSLs9iLcSYirbyeDDhd6MD9a9c= @@ -50,6 +50,8 @@ github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor v1. github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor v1.4.0/go.mod h1:0tuwjeZbMwLV7h1bcyfTlnXUH6GBKkPml8ukX6EoS3o= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight v1.2.0 h1:jyICffWo5qt7iFHCMEOtt5HfByBcQGAxp3WLz56nbxc= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight v1.2.0/go.mod h1:skx0SS3je4jPa5KT5Ckf3tmmwWzMZ46nl1l6xTdxOGE= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridkubernetes/armhybridkubernetes v1.2.0 h1:Mv/bQNTqVb4WxLuyc0GpeTwMZEJLyjP1+fqR3x4KdZA= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridkubernetes/armhybridkubernetes v1.2.0/go.mod h1:t1IEI21/6k/UmAXRIRy3E7tgpC2zbeyd9H3qk1EY5JA= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal v1.1.2 h1:mLY+pNLjCUeKhgnAJWAKhEUQM+RJQo2H1fuGSw1Ky1E= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal v1.1.2/go.mod h1:FbdwsQ2EzwvXxOPcMFYO8ogEc9uMMIj3YkmCdXdAFmk= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/v2 v2.0.0 h1:PTFGRSlMKCQelWwxUyYVEUqseBJVemLyqWJjvMyt0do= @@ -64,8 +66,8 @@ github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto v1.3.1 h1:i github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto v1.3.1/go.mod h1:st4TFPle8b16a2B9MEN+ofQT6iJjWBPAD9F5rfMQtZg= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic v1.2.0 h1:EMNgS+pCj2/2LL7+nWG8zPf9sp4u8icP5FNwoBhyc8M= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic v1.2.0/go.mod h1:TsM36SmGxYC24DiOTR9wPuBj5HYphihMC6xlnX536bE= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3 v3.2.0 h1:m3By8dbZqId80m4AU+sfQOvlISaVV95KoCxQr8235/w= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3 v3.2.0/go.mod h1:p8dwLhouzC7neB2e/5TKZ732Zhu1ydfvOpimPfE9K5w= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4 v4.0.0 h1:H5ykGRBhX8CJKpB2tiRVut1DPbH7BnYKQ+orFTD7+JY= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4 v4.0.0/go.mod h1:nivJvZio5SHpEASAk8LKIueqs7zEHU+iRLKWbx3Xi10= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor v0.7.0 h1:U6aSmNaC/WWDlHnL0e+SxQlvYmcjdoBLFjNir8AZBe0= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor v0.7.0/go.mod h1:qDMzzI3qK0Oi9wpbRIaBoYyRYg+1UJZ0I2/Y4VxoVU4= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/msi/armmsi v0.6.0 h1:zSHpZY39hfFpVNixDoFOUeLwBBX0SIRe32HaWg03R8k= @@ -88,6 +90,8 @@ github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1. github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.2.0/go.mod h1:5kakwfW5CjC9KK+Q4wjXAg+ShuIm2mBMua0ZFj2C8PE= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2 v2.0.0-beta.4 h1:kvo62he+mkbJPRJ3ob0vZlPUjiy1bbb09orYJ9fXrRM= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2 v2.0.0-beta.4/go.mod h1:twxqOHxCu1TZQAcOlLvIxQJAQ1UCzh+0I4ilL4inTAg= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql v1.2.0 h1:S087deZ0kP1RUg4pU7w9U9xpUedTCbOtz+mnd0+hrkQ= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql v1.2.0/go.mod h1:B4cEyXrWBmbfMDAPnpJ1di7MAt5DKP57jPEObAvZChg= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.6.0 h1:PiSrjRPpkQNjrM8H0WwKMnZUdu1RGMtd/LdGKUrOo+c= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.6.0/go.mod h1:oDrbWx4ewMylP7xHivfgixbfGBT6APAwsSoHRKotnIc= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache v1.0.0 h1:3UQFOxKO93+20/+4mZweaGTbICtgQDRchk946N6/mvI= @@ -109,15 +113,15 @@ github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2/go.mod h1:wP83 github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI= github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= -github.com/Masterminds/semver/v3 v3.3.0 h1:B8LGeaivUe71a5qox1ICM/JLl0NqZSW5CHyL+hmvYS0= -github.com/Masterminds/semver/v3 v3.3.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM= +github.com/Masterminds/semver/v3 v3.3.1 h1:QtNSWtVZ3nBfk8mAOu/B6v7FMJ+NHTIgUPi7rj+4nv4= +github.com/Masterminds/semver/v3 v3.3.1/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM= github.com/Masterminds/sprig/v3 v3.2.1/go.mod h1:UoaO7Yp8KlPnJIYWTFkMaqPUYKTfGFPhxNuwnnxkKlk= github.com/Masterminds/sprig/v3 v3.3.0 h1:mQh0Yrg1XPo6vjYXgtf5OtijNAKJRNcTdOOGZe3tPhs= github.com/Masterminds/sprig/v3 v3.3.0/go.mod h1:Zy1iXRYNqNLUolqCpL4uhk6SHUMAOSCzdgBfDb35Lz0= github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= -github.com/ProtonMail/go-crypto v1.1.0-alpha.2 h1:bkyFVUP+ROOARdgCiJzNQo2V2kiB97LyUpzH9P6Hrlg= -github.com/ProtonMail/go-crypto v1.1.0-alpha.2/go.mod h1:rA3QumHc/FZ8pAHreoekgiAbzpNsfQAosU5td4SnOrE= +github.com/ProtonMail/go-crypto v1.1.3 h1:nRBOetoydLeUb4nHajyO2bKqMLfWQ/ZPwkXqXxPxCFk= +github.com/ProtonMail/go-crypto v1.1.3/go.mod h1:rA3QumHc/FZ8pAHreoekgiAbzpNsfQAosU5td4SnOrE= github.com/agext/levenshtein v1.2.1/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= github.com/agext/levenshtein v1.2.3 h1:YB2fHEn0UJagG8T1rrWknE3ZQzWM06O8AMAatNn7lmo= github.com/agext/levenshtein v1.2.3/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= @@ -136,12 +140,12 @@ github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgI github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bgentry/speakeasy v0.2.0 h1:tgObeVOf8WAvtuAX6DhJ4xks4CFNwPDZiqzGqIHE51E= github.com/bgentry/speakeasy v0.2.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/cloudflare/circl v1.3.7 h1:qlCDlTPz2n9fu58M0Nh1J/JzcFpfgkFHHX3O35r5vcU= -github.com/cloudflare/circl v1.3.7/go.mod h1:sRTcRWXGLrKw6yIGJ+l7amYJFfAXbZG0kBSc8r4zxgA= +github.com/cloudflare/circl v1.6.0 h1:cr5JKic4HI+LkINy2lg3W2jF8sHCVTBncJr5gIIq7qk= +github.com/cloudflare/circl v1.6.0/go.mod h1:uddAzsPgqdMAYatqJ0lsjX1oECcQLIlRpzZh3pJrofs= github.com/creachadair/jrpc2 v0.32.0 h1:j2zp35S6pg5OzmAnb5QvCCdds9cVqunCdXnDNah7xKA= github.com/creachadair/jrpc2 v0.32.0/go.mod h1:w+GXZGc+NwsH0xsUOgeLBIIRM0jBOSTXhv28KaWGRZU= -github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg= -github.com/cyphar/filepath-securejoin v0.2.4/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= +github.com/cyphar/filepath-securejoin v0.4.1 h1:JyxxyPEaktOD+GAnqIqTf9A8tHyAG22rowi7HkoSU1s= +github.com/cyphar/filepath-securejoin v0.4.1/go.mod h1:Sdj7gXlvMcPZsbhwhQ33GguGLDGQL7h7bg04C/+u9jI= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -151,25 +155,25 @@ github.com/expr-lang/expr v1.16.9 h1:WUAzmR0JNI9JCiF0/ewwHB1gmcGw5wW7nWt8gc6PpCI github.com/expr-lang/expr v1.16.9/go.mod h1:8/vRC7+7HBzESEqt5kKpYXxrxkr31SaO8r40VO/1IT4= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= -github.com/fatih/color v1.17.0 h1:GlRw1BRJxkpqUCBKzKOw098ed57fEsKeNjpTe3cSjK4= -github.com/fatih/color v1.17.0/go.mod h1:YZ7TlrGPkiz6ku9fK3TLD/pl3CpsiFyu8N92HLgmosI= +github.com/fatih/color v1.18.0 h1:S8gINlzdQ840/4pfAwic/ZE0djQEH3wM94VfqLTZcOM= +github.com/fatih/color v1.18.0/go.mod h1:4FelSpRwEGDpQ12mAdzqdOukCy4u8WUtOY6lkT/6HfU= github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/gertd/go-pluralize v0.2.1 h1:M3uASbVjMnTsPb0PNqg+E/24Vwigyo/tvyMTtAlLgiA= github.com/gertd/go-pluralize v0.2.1/go.mod h1:rbYaKDbsXxmRfr8uygAEKhOWsjyrrqrkHVpZvoOp8zk= github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 h1:+zs/tPmkDkHx3U66DAb0lQFJrpS6731Oaa12ikc+DiI= github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376/go.mod h1:an3vInlBmSxCcxctByoQdvwPiA7DTK7jaaFDBTtu0ic= -github.com/go-git/go-billy/v5 v5.5.0 h1:yEY4yhzCDuMGSv83oGxiBotRzhwhNr8VZyphhiu+mTU= -github.com/go-git/go-billy/v5 v5.5.0/go.mod h1:hmexnoNsr2SJU1Ju67OaNz5ASJY3+sHgFRpCtpDCKow= -github.com/go-git/go-git/v5 v5.12.0 h1:7Md+ndsjrzZxbddRDZjF14qK+NN56sy6wkqaVrjZtys= -github.com/go-git/go-git/v5 v5.12.0/go.mod h1:FTM9VKtnI2m65hNI/TenDDDnUf2Q9FHnXYjuz9i5OEY= +github.com/go-git/go-billy/v5 v5.6.0 h1:w2hPNtoehvJIxR00Vb4xX94qHQi/ApZfX+nBE2Cjio8= +github.com/go-git/go-billy/v5 v5.6.0/go.mod h1:sFDq7xD3fn3E0GOwUSZqHo9lrkmx8xJhA0ZrfvjBRGM= +github.com/go-git/go-git/v5 v5.13.2 h1:7O7xvsK7K+rZPKW6AQR1YyNhfywkv7B8/FsP3ki6Zv0= +github.com/go-git/go-git/v5 v5.13.2/go.mod h1:hWdW5P4YZRjmpGHwRH2v3zkWcNl6HeXaXQEMGb3NJ9A= github.com/go-test/deep v1.0.3 h1:ZrJSEWsXzPOxaZnFteGEfooLba+ju3FYIbOrS+rQd68= github.com/go-test/deep v1.0.3/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= github.com/golang-jwt/jwt v3.2.1+incompatible h1:73Z+4BJcrTC+KczS6WvTPvRGOp1WmfEP4Q1lOd9Z/+c= github.com/golang-jwt/jwt/v5 v5.2.1 h1:OuVbFODueb089Lh128TAcimifWaLhJwVflnrgM17wHk= github.com/golang-jwt/jwt/v5 v5.2.1/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 h1:f+oWsMOmNPc8JmEHVZIycC7hBoQxHH9pNKQORJNozsQ= +github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8/go.mod h1:wcDNUvekVysuuOpQKo3191zZyTpiI6se1N1ULghS0sw= github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= @@ -180,8 +184,8 @@ github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6 github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= -github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= +github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= @@ -206,25 +210,25 @@ github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/C github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-version v1.7.0 h1:5tqGy27NaOTB8yJKUZELlFAS/LTKJkrmONwQKeRZfjY= github.com/hashicorp/go-version v1.7.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/hc-install v0.9.0 h1:2dIk8LcvANwtv3QZLckxcjyF5w8KVtiMxu6G6eLhghE= -github.com/hashicorp/hc-install v0.9.0/go.mod h1:+6vOP+mf3tuGgMApVYtmsnDoKWMDcFXeTxCACYZ8SFg= +github.com/hashicorp/hc-install v0.9.1 h1:gkqTfE3vVbafGQo6VZXcy2v5yoz2bE0+nhZXruCuODQ= +github.com/hashicorp/hc-install v0.9.1/go.mod h1:pWWvN/IrfeBK4XPeXXYkL6EjMufHkCK5DvwxeLKuBf0= github.com/hashicorp/hcl-lang v0.0.0-20211123142056-191cd51dec5b h1:UircH3n8tUnq881dS1EV/m+ZcIKjZq9jzl0M65PAdWU= github.com/hashicorp/hcl-lang v0.0.0-20211123142056-191cd51dec5b/go.mod h1:0W3+VP07azoS+fCX5hWk1KxwHnqf1s9J7oBg2cFXm1c= github.com/hashicorp/hcl/v2 v2.10.1/go.mod h1:FwWsfWEjyV/CMj8s/gqAuiviY72rJ1/oayI9WftqcKg= -github.com/hashicorp/hcl/v2 v2.22.0 h1:hkZ3nCtqeJsDhPRFz5EA9iwcG1hNWGePOTw6oyul12M= -github.com/hashicorp/hcl/v2 v2.22.0/go.mod h1:62ZYHrXgPoX8xBnzl8QzbWq4dyDsDtfCRgIq1rbJEvA= +github.com/hashicorp/hcl/v2 v2.23.0 h1:Fphj1/gCylPxHutVSEOf2fBOh1VE4AuLV7+kbJf3qos= +github.com/hashicorp/hcl/v2 v2.23.0/go.mod h1:62ZYHrXgPoX8xBnzl8QzbWq4dyDsDtfCRgIq1rbJEvA= github.com/hashicorp/logutils v1.0.0 h1:dLEQVugN8vlakKOUE3ihGLTZJRB4j+M2cdTm/ORI65Y= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= -github.com/hashicorp/terraform-exec v0.21.0 h1:uNkLAe95ey5Uux6KJdua6+cv8asgILFVWkd/RG0D2XQ= -github.com/hashicorp/terraform-exec v0.21.0/go.mod h1:1PPeMYou+KDUSSeRE9szMZ/oHf4fYUmB923Wzbq1ICg= -github.com/hashicorp/terraform-json v0.22.1 h1:xft84GZR0QzjPVWs4lRUwvTcPnegqlyS7orfb5Ltvec= -github.com/hashicorp/terraform-json v0.22.1/go.mod h1:JbWSQCLFSXFFhg42T7l9iJwdGXBYV8fmmD6o/ML4p3A= -github.com/hashicorp/terraform-plugin-go v0.24.0 h1:2WpHhginCdVhFIrWHxDEg6RBn3YaWzR2o6qUeIEat2U= -github.com/hashicorp/terraform-plugin-go v0.24.0/go.mod h1:tUQ53lAsOyYSckFGEefGC5C8BAaO0ENqzFd3bQeuYQg= +github.com/hashicorp/terraform-exec v0.22.0 h1:G5+4Sz6jYZfRYUCg6eQgDsqTzkNXV+fP8l+uRmZHj64= +github.com/hashicorp/terraform-exec v0.22.0/go.mod h1:bjVbsncaeh8jVdhttWYZuBGj21FcYw6Ia/XfHcNO7lQ= +github.com/hashicorp/terraform-json v0.24.0 h1:rUiyF+x1kYawXeRth6fKFm/MdfBS6+lW4NbeATsYz8Q= +github.com/hashicorp/terraform-json v0.24.0/go.mod h1:Nfj5ubo9xbu9uiAoZVBsNOjvNKB66Oyrvtit74kC7ow= +github.com/hashicorp/terraform-plugin-go v0.26.0 h1:cuIzCv4qwigug3OS7iKhpGAbZTiypAfFQmw8aE65O2M= +github.com/hashicorp/terraform-plugin-go v0.26.0/go.mod h1:+CXjuLDiFgqR+GcrM5a2E2Kal5t5q2jb0E3D57tTdNY= github.com/hashicorp/terraform-plugin-log v0.9.0 h1:i7hOA+vdAItN1/7UrfBqBwvYPQ9TFvymaRGZED3FCV0= github.com/hashicorp/terraform-plugin-log v0.9.0/go.mod h1:rKL8egZQ/eXSyDqzLUuwUYLVdlYeamldAHSxjUFADow= -github.com/hashicorp/terraform-plugin-sdk/v2 v2.34.0 h1:kJiWGx2kiQVo97Y5IOGR4EMcZ8DtMswHhUuFibsCQQE= -github.com/hashicorp/terraform-plugin-sdk/v2 v2.34.0/go.mod h1:sl/UoabMc37HA6ICVMmGO+/0wofkVIRxf+BMb/dnoIg= +github.com/hashicorp/terraform-plugin-sdk/v2 v2.36.1 h1:WNMsTLkZf/3ydlgsuXePa3jvZFwAJhruxTxP/c1Viuw= +github.com/hashicorp/terraform-plugin-sdk/v2 v2.36.1/go.mod h1:P6o64QS97plG44iFzSM6rAn6VJIC/Sy9a9IkEtl79K4= github.com/huandu/xstrings v1.3.1/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/huandu/xstrings v1.3.2/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/huandu/xstrings v1.5.0 h1:2ag3IFq9ZDANvthTwTiqSSZLjDc+BedvHPAp5tJy2TI= @@ -247,8 +251,8 @@ github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0 github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/magodo/armid v0.0.0-20240524082432-7ce06ae46c33 h1:KmQ16pNsI7DaELU+CbqZKXVdvkE/YXqMH6LLkp6rw/Y= github.com/magodo/armid v0.0.0-20240524082432-7ce06ae46c33/go.mod h1:rR8E7zfGMbmfnSQvrkFiWYdhrfTqsVSltelnZB09BwA= -github.com/magodo/aztft v0.3.1-0.20241011060757-310738ca90dd h1:6UcyxroC+nV2KcalwYWrkD011QXTHyEwEF2JcoYeRjU= -github.com/magodo/aztft v0.3.1-0.20241011060757-310738ca90dd/go.mod h1:KQixUbCSpXiFkjLyy0lrtZY+2doHvJ1EIdtyhmVs3KQ= +github.com/magodo/aztft v0.3.1-0.20250220225137-662088a9e6d6 h1:c6P4u8SFXdJDLvZx8bZt+ERAKvHtD2k5E/HIoB4dUW4= +github.com/magodo/aztft v0.3.1-0.20250220225137-662088a9e6d6/go.mod h1:cWgec1jugIZ7IaMPwocFyk5BY8X6rtiLtDAfJQQNNf0= github.com/magodo/tfadd v0.10.1-0.20240902124619-bd18a56f410d h1:dmS4jSfNIfshWkh43yK4n1Qx0BsaKrfxMiqRg0fKKYw= github.com/magodo/tfadd v0.10.1-0.20240902124619-bd18a56f410d/go.mod h1:G2Hc13YaLGHa+CPEP/HZzj9sIGyKDM5ZXInzQ8Dp86s= github.com/magodo/tfpluginschema v0.0.0-20240902090353-0525d7d8c1c2 h1:Unxx8WLxzSxINnq7hItp4cXD7drihgfPltTd91efoBo= @@ -258,12 +262,11 @@ github.com/magodo/tfstate v0.0.0-20241016043929-2c95177bf0e6/go.mod h1:cm1odSE6e github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= -github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= -github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= +github.com/mattn/go-colorable v0.1.14 h1:9A9LHSqF/7dyVVX6g0U9cwm9pG3kP9gSzcuIPHPsaIE= +github.com/mattn/go-colorable v0.1.14/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= -github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mh-cbon/go-fmt-fail v0.0.0-20160815164508-67765b3fbcb5/go.mod h1:nHPoxaBUc5CDAMIv0MNmn5PBjWbTs9BI/eh30/n0U6g= @@ -301,13 +304,13 @@ github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3/go.mod h1:A0bzQcvG github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= github.com/shopspring/decimal v1.4.0 h1:bxl37RwXBklmTi0C79JfXCEBD1cqqHt0bbgBAGFp81k= github.com/shopspring/decimal v1.4.0/go.mod h1:gawqmDU56v4yIKSwfBSFip1HdCCXN8/+DMd9qYNcwME= -github.com/skeema/knownhosts v1.2.2 h1:Iug2P4fLmDw9f41PB6thxUkNUkJzB5i+1/exaj40L3A= -github.com/skeema/knownhosts v1.2.2/go.mod h1:xYbVRSPxqBZFrdmDyMmsOs+uX1UZC3nTN3ThzgDxUwo= +github.com/skeema/knownhosts v1.3.1 h1:X2osQ+RAjK76shCbvhHHHVl3ZlgDm8apHEHFqRjnBY8= +github.com/skeema/knownhosts v1.3.1/go.mod h1:r7KTdC8l4uxWRyK2TpQZ/1o5HaSzh06ePQNxPwTcfiY= github.com/spf13/afero v1.6.0 h1:xoax2sJ2DT8S8xA2paPFjDCScCNeWsg75VG0DLRreiY= github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.7.0 h1:ntdiHjuueXFgm5nzDRdOS4yfT43P5Fnud6DH50rz/7w= -github.com/spf13/cast v1.7.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= +github.com/spf13/cast v1.7.1 h1:cuNEagBQEHWN1FnbGEjCXL2szYEXqfJPbP2HNUaca9Y= +github.com/spf13/cast v1.7.1/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= github.com/spf13/pflag v1.0.2/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= @@ -315,8 +318,8 @@ github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81P github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= -github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/vmihailenco/msgpack v3.3.3+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= github.com/vmihailenco/msgpack v4.0.4+incompatible h1:dSLoQfGFAo3F6OoNhwUmLwVgaUXK79GlxNBwueZn0xI= github.com/vmihailenco/msgpack v4.0.4+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= @@ -333,8 +336,8 @@ github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5t github.com/zclconf/go-cty v1.2.0/go.mod h1:hOPWgoHbaTUnI5k4D2ld+GRpFJSCe6bCM7m1q/N4PQ8= github.com/zclconf/go-cty v1.8.0/go.mod h1:vVKLxnk3puL4qRAv72AO+W99LUD4da90g3uUAzyuvAk= github.com/zclconf/go-cty v1.10.0/go.mod h1:vVKLxnk3puL4qRAv72AO+W99LUD4da90g3uUAzyuvAk= -github.com/zclconf/go-cty v1.15.0 h1:tTCRWxsexYUmtt/wVxgDClUe+uQusuI443uL6e+5sXQ= -github.com/zclconf/go-cty v1.15.0/go.mod h1:VvMs5i0vgZdhYawQNq5kePSpLAoz8u1xvZgrPIxfnZE= +github.com/zclconf/go-cty v1.16.2 h1:LAJSwc3v81IRBZyUVQDUdZ7hs3SYs9jv0eZJDWHD/70= +github.com/zclconf/go-cty v1.16.2/go.mod h1:VvMs5i0vgZdhYawQNq5kePSpLAoz8u1xvZgrPIxfnZE= github.com/zclconf/go-cty-debug v0.0.0-20191215020915-b22d67c1ba0b/go.mod h1:ZRKQfBXbGkpdV6QMzT3rU1kSTAnfu1dO8dPKjYprgj8= github.com/zclconf/go-cty-debug v0.0.0-20240509010212-0d6042c53940 h1:4r45xpDWB6ZMSMNJFMOjqrGHynW3DIBuR2H9j0ug+Mo= github.com/zclconf/go-cty-debug v0.0.0-20240509010212-0d6042c53940/go.mod h1:CmBdvvj3nqzfzJ6nTCIwDTPZ56aVGvDrmztiO5g3qrM= @@ -383,7 +386,6 @@ golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc= golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= @@ -414,8 +416,8 @@ google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAs google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.35.1 h1:m3LfL6/Ca+fqnjnlqQXNpFPABW1UD7mjh8KO2mKFytA= -google.golang.org/protobuf v1.35.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= +google.golang.org/protobuf v1.36.5 h1:tPhr+woSbjfYvY6/GPufUoYizxw1cF/yFoxJ2fmpwlM= +google.golang.org/protobuf v1.36.5/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= diff --git a/vendor/github.com/Azure/aztfmigrate/azurerm/schema/provider_gen.go b/vendor/github.com/Azure/aztfmigrate/azurerm/schema/provider_gen.go index 7a7c8a825..580af0354 100644 --- a/vendor/github.com/Azure/aztfmigrate/azurerm/schema/provider_gen.go +++ b/vendor/github.com/Azure/aztfmigrate/azurerm/schema/provider_gen.go @@ -7,12 +7,12 @@ import ( "os" ) -var ProviderVersion = "main" +var ProviderVersion = "tags/v4.20.0" var ProviderSchemaInfo ProviderSchema func init() { - b := []byte(`{"Version":"","resource_schemas":{"azurerm_aadb2c_directory":{"block":{"attributes":{"billing_type":{"type":"string","computed":true},"country_code":{"type":"string","optional":true,"computed":true},"data_residency_location":{"type":"string","required":true},"display_name":{"type":"string","optional":true,"computed":true},"domain_name":{"type":"string","required":true},"effective_start_date":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"tenant_id":{"type":"string","computed":true}}}},"azurerm_active_directory_domain_service":{"block":{"attributes":{"deployment_id":{"type":"string","computed":true},"domain_configuration_type":{"type":"string","optional":true},"domain_name":{"type":"string","required":true},"filtered_sync_enabled":{"type":"bool","optional":true,"default":false},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"resource_id":{"type":"string","computed":true},"sku":{"type":"string","required":true},"sync_owner":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true},"tenant_id":{"type":"string","computed":true},"version":{"type":"number","computed":true}},"block_types":{"initial_replica_set":{"nesting_mode":3,"block":{"attributes":{"domain_controller_ip_addresses":{"type":["list","string"],"computed":true},"external_access_ip_address":{"type":"string","computed":true},"id":{"type":"string","computed":true},"location":{"type":"string","computed":true},"service_status":{"type":"string","computed":true},"subnet_id":{"type":"string","required":true}}},"required":true},"notifications":{"nesting_mode":3,"block":{"attributes":{"additional_recipients":{"type":["set","string"],"optional":true},"notify_dc_admins":{"type":"bool","optional":true,"default":false},"notify_global_admins":{"type":"bool","optional":true,"default":false}}},"optional":true,"computed":true},"secure_ldap":{"nesting_mode":3,"block":{"attributes":{"certificate_expiry":{"type":"string","computed":true},"certificate_thumbprint":{"type":"string","computed":true},"enabled":{"type":"bool","required":true},"external_access_enabled":{"type":"bool","optional":true,"default":false},"pfx_certificate":{"type":"string","required":true},"pfx_certificate_password":{"type":"string","required":true},"public_certificate":{"type":"string","computed":true}}},"optional":true,"computed":true},"security":{"nesting_mode":3,"block":{"attributes":{"kerberos_armoring_enabled":{"type":"bool","optional":true,"default":false},"kerberos_rc4_encryption_enabled":{"type":"bool","optional":true,"default":false},"ntlm_v1_enabled":{"type":"bool","optional":true,"default":false},"sync_kerberos_passwords":{"type":"bool","optional":true,"default":false},"sync_ntlm_passwords":{"type":"bool","optional":true,"default":false},"sync_on_prem_passwords":{"type":"bool","optional":true,"default":false},"tls_v1_enabled":{"type":"bool","optional":true,"default":false}}},"optional":true,"computed":true}}}},"azurerm_active_directory_domain_service_replica_set":{"block":{"attributes":{"domain_controller_ip_addresses":{"type":["list","string"],"computed":true},"domain_service_id":{"type":"string","required":true},"external_access_ip_address":{"type":"string","computed":true},"location":{"type":"string","required":true},"service_status":{"type":"string","computed":true},"subnet_id":{"type":"string","required":true}}}},"azurerm_active_directory_domain_service_trust":{"block":{"attributes":{"domain_service_id":{"type":"string","required":true},"name":{"type":"string","required":true},"password":{"type":"string","required":true},"trusted_domain_dns_ips":{"type":["list","string"],"required":true},"trusted_domain_fqdn":{"type":"string","required":true}}}},"azurerm_advanced_threat_protection":{"block":{"attributes":{"enabled":{"type":"bool","required":true},"target_resource_id":{"type":"string","required":true}}}},"azurerm_advisor_suppression":{"block":{"attributes":{"name":{"type":"string","required":true},"recommendation_id":{"type":"string","required":true},"resource_id":{"type":"string","required":true},"suppression_id":{"type":"string","computed":true},"ttl":{"type":"string","optional":true}}}},"azurerm_ai_services":{"block":{"attributes":{"custom_subdomain_name":{"type":"string","optional":true},"endpoint":{"type":"string","computed":true},"fqdns":{"type":["list","string"],"optional":true},"local_authentication_enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"outbound_network_access_restricted":{"type":"bool","optional":true,"default":false},"primary_access_key":{"type":"string","computed":true},"public_network_access":{"type":"string","optional":true,"default":"Enabled"},"resource_group_name":{"type":"string","required":true},"secondary_access_key":{"type":"string","computed":true},"sku_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"customer_managed_key":{"nesting_mode":3,"block":{"attributes":{"identity_client_id":{"type":"string","optional":true},"key_vault_key_id":{"type":"string","optional":true,"exactly_one_of":["customer_managed_key.0.managed_hsm_key_id","customer_managed_key.0.key_vault_key_id"]},"managed_hsm_key_id":{"type":"string","optional":true,"exactly_one_of":["customer_managed_key.0.managed_hsm_key_id","customer_managed_key.0.key_vault_key_id"]}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"network_acls":{"nesting_mode":3,"block":{"attributes":{"default_action":{"type":"string","required":true},"ip_rules":{"type":["set","string"],"optional":true}},"block_types":{"virtual_network_rules":{"nesting_mode":4,"block":{"attributes":{"ignore_missing_vnet_service_endpoint":{"type":"bool","optional":true,"default":false},"subnet_id":{"type":"string","required":true}}},"optional":true}}},"optional":true,"required_with":["custom_subdomain_name"]},"storage":{"nesting_mode":3,"block":{"attributes":{"identity_client_id":{"type":"string","optional":true},"storage_account_id":{"type":"string","required":true}}},"optional":true}}}},"azurerm_analysis_services_server":{"block":{"attributes":{"admin_users":{"type":["set","string"],"optional":true},"backup_blob_container_uri":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"power_bi_service_enabled":{"type":"bool","optional":true},"querypool_connection_mode":{"type":"string","optional":true,"default":"All"},"resource_group_name":{"type":"string","required":true},"server_full_name":{"type":"string","computed":true},"sku":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"ipv4_firewall_rule":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"range_end":{"type":"string","required":true},"range_start":{"type":"string","required":true}}},"optional":true}}}},"azurerm_api_connection":{"block":{"attributes":{"display_name":{"type":"string","optional":true,"default":"Service Bus"},"managed_api_id":{"type":"string","required":true},"name":{"type":"string","required":true},"parameter_values":{"type":["map","string"],"optional":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_api_management":{"block":{"attributes":{"client_certificate_enabled":{"type":"bool","optional":true,"default":false},"developer_portal_url":{"type":"string","computed":true},"gateway_disabled":{"type":"bool","optional":true,"default":false},"gateway_regional_url":{"type":"string","computed":true},"gateway_url":{"type":"string","computed":true},"location":{"type":"string","required":true},"management_api_url":{"type":"string","computed":true},"min_api_version":{"type":"string","optional":true},"name":{"type":"string","required":true},"notification_sender_email":{"type":"string","optional":true,"computed":true},"portal_url":{"type":"string","computed":true},"private_ip_addresses":{"type":["list","string"],"computed":true},"public_ip_address_id":{"type":"string","optional":true},"public_ip_addresses":{"type":["list","string"],"computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"publisher_email":{"type":"string","required":true},"publisher_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"scm_url":{"type":"string","computed":true},"sku_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"virtual_network_type":{"type":"string","optional":true,"default":"None"},"zones":{"type":["set","string"],"optional":true}},"block_types":{"additional_location":{"nesting_mode":3,"block":{"attributes":{"capacity":{"type":"number","optional":true,"computed":true},"gateway_disabled":{"type":"bool","optional":true,"default":false},"gateway_regional_url":{"type":"string","computed":true},"location":{"type":"string","required":true},"private_ip_addresses":{"type":["list","string"],"computed":true},"public_ip_address_id":{"type":"string","optional":true},"public_ip_addresses":{"type":["list","string"],"computed":true},"zones":{"type":["set","string"],"optional":true}},"block_types":{"virtual_network_configuration":{"nesting_mode":3,"block":{"attributes":{"subnet_id":{"type":"string","required":true}}},"optional":true}}},"optional":true},"certificate":{"nesting_mode":3,"block":{"attributes":{"certificate_password":{"type":"string","optional":true},"encoded_certificate":{"type":"string","required":true},"expiry":{"type":"string","computed":true},"store_name":{"type":"string","required":true},"subject":{"type":"string","computed":true},"thumbprint":{"type":"string","computed":true}}},"optional":true},"delegation":{"nesting_mode":3,"block":{"attributes":{"subscriptions_enabled":{"type":"bool","optional":true,"default":false},"url":{"type":"string","optional":true},"user_registration_enabled":{"type":"bool","optional":true,"default":false},"validation_key":{"type":"string","optional":true}}},"optional":true,"computed":true},"hostname_configuration":{"nesting_mode":3,"block":{"block_types":{"developer_portal":{"nesting_mode":3,"block":{"attributes":{"certificate":{"type":"string","optional":true},"certificate_password":{"type":"string","optional":true},"certificate_source":{"type":"string","computed":true},"certificate_status":{"type":"string","computed":true},"expiry":{"type":"string","computed":true},"host_name":{"type":"string","required":true},"key_vault_id":{"type":"string","optional":true},"negotiate_client_certificate":{"type":"bool","optional":true,"default":false},"ssl_keyvault_identity_client_id":{"type":"string","optional":true},"subject":{"type":"string","computed":true},"thumbprint":{"type":"string","computed":true}}},"optional":true,"at_least_one_of":["hostname_configuration.0.management","hostname_configuration.0.portal","hostname_configuration.0.developer_portal","hostname_configuration.0.proxy","hostname_configuration.0.scm"]},"management":{"nesting_mode":3,"block":{"attributes":{"certificate":{"type":"string","optional":true},"certificate_password":{"type":"string","optional":true},"certificate_source":{"type":"string","computed":true},"certificate_status":{"type":"string","computed":true},"expiry":{"type":"string","computed":true},"host_name":{"type":"string","required":true},"key_vault_id":{"type":"string","optional":true},"negotiate_client_certificate":{"type":"bool","optional":true,"default":false},"ssl_keyvault_identity_client_id":{"type":"string","optional":true},"subject":{"type":"string","computed":true},"thumbprint":{"type":"string","computed":true}}},"optional":true,"at_least_one_of":["hostname_configuration.0.management","hostname_configuration.0.portal","hostname_configuration.0.developer_portal","hostname_configuration.0.proxy","hostname_configuration.0.scm"]},"portal":{"nesting_mode":3,"block":{"attributes":{"certificate":{"type":"string","optional":true},"certificate_password":{"type":"string","optional":true},"certificate_source":{"type":"string","computed":true},"certificate_status":{"type":"string","computed":true},"expiry":{"type":"string","computed":true},"host_name":{"type":"string","required":true},"key_vault_id":{"type":"string","optional":true},"negotiate_client_certificate":{"type":"bool","optional":true,"default":false},"ssl_keyvault_identity_client_id":{"type":"string","optional":true},"subject":{"type":"string","computed":true},"thumbprint":{"type":"string","computed":true}}},"optional":true,"at_least_one_of":["hostname_configuration.0.management","hostname_configuration.0.portal","hostname_configuration.0.developer_portal","hostname_configuration.0.proxy","hostname_configuration.0.scm"]},"proxy":{"nesting_mode":3,"block":{"attributes":{"certificate":{"type":"string","optional":true},"certificate_password":{"type":"string","optional":true},"certificate_source":{"type":"string","computed":true},"certificate_status":{"type":"string","computed":true},"default_ssl_binding":{"type":"bool","optional":true,"computed":true},"expiry":{"type":"string","computed":true},"host_name":{"type":"string","required":true},"key_vault_id":{"type":"string","optional":true},"negotiate_client_certificate":{"type":"bool","optional":true,"default":false},"ssl_keyvault_identity_client_id":{"type":"string","optional":true},"subject":{"type":"string","computed":true},"thumbprint":{"type":"string","computed":true}}},"optional":true,"at_least_one_of":["hostname_configuration.0.management","hostname_configuration.0.portal","hostname_configuration.0.developer_portal","hostname_configuration.0.proxy","hostname_configuration.0.scm"]},"scm":{"nesting_mode":3,"block":{"attributes":{"certificate":{"type":"string","optional":true},"certificate_password":{"type":"string","optional":true},"certificate_source":{"type":"string","computed":true},"certificate_status":{"type":"string","computed":true},"expiry":{"type":"string","computed":true},"host_name":{"type":"string","required":true},"key_vault_id":{"type":"string","optional":true},"negotiate_client_certificate":{"type":"bool","optional":true,"default":false},"ssl_keyvault_identity_client_id":{"type":"string","optional":true},"subject":{"type":"string","computed":true},"thumbprint":{"type":"string","computed":true}}},"optional":true,"at_least_one_of":["hostname_configuration.0.management","hostname_configuration.0.portal","hostname_configuration.0.developer_portal","hostname_configuration.0.proxy","hostname_configuration.0.scm"]}}},"optional":true,"computed":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"protocols":{"nesting_mode":3,"block":{"attributes":{"enable_http2":{"type":"bool","optional":true,"default":false}}},"optional":true,"computed":true},"security":{"nesting_mode":3,"block":{"attributes":{"enable_backend_ssl30":{"type":"bool","optional":true,"default":false},"enable_backend_tls10":{"type":"bool","optional":true,"default":false},"enable_backend_tls11":{"type":"bool","optional":true,"default":false},"enable_frontend_ssl30":{"type":"bool","optional":true,"default":false},"enable_frontend_tls10":{"type":"bool","optional":true,"default":false},"enable_frontend_tls11":{"type":"bool","optional":true,"default":false},"tls_ecdhe_ecdsa_with_aes128_cbc_sha_ciphers_enabled":{"type":"bool","optional":true,"default":false},"tls_ecdhe_ecdsa_with_aes256_cbc_sha_ciphers_enabled":{"type":"bool","optional":true,"default":false},"tls_ecdhe_rsa_with_aes128_cbc_sha_ciphers_enabled":{"type":"bool","optional":true,"default":false},"tls_ecdhe_rsa_with_aes256_cbc_sha_ciphers_enabled":{"type":"bool","optional":true,"default":false},"tls_rsa_with_aes128_cbc_sha256_ciphers_enabled":{"type":"bool","optional":true,"default":false},"tls_rsa_with_aes128_cbc_sha_ciphers_enabled":{"type":"bool","optional":true,"default":false},"tls_rsa_with_aes128_gcm_sha256_ciphers_enabled":{"type":"bool","optional":true,"default":false},"tls_rsa_with_aes256_cbc_sha256_ciphers_enabled":{"type":"bool","optional":true,"default":false},"tls_rsa_with_aes256_cbc_sha_ciphers_enabled":{"type":"bool","optional":true,"default":false},"tls_rsa_with_aes256_gcm_sha384_ciphers_enabled":{"type":"bool","optional":true,"default":false},"triple_des_ciphers_enabled":{"type":"bool","optional":true}}},"optional":true,"computed":true},"sign_in":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","required":true}}},"optional":true,"computed":true},"sign_up":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","required":true}},"block_types":{"terms_of_service":{"nesting_mode":3,"block":{"attributes":{"consent_required":{"type":"bool","required":true},"enabled":{"type":"bool","required":true},"text":{"type":"string","optional":true}}},"required":true}}},"optional":true,"computed":true},"tenant_access":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","required":true},"primary_key":{"type":"string","computed":true},"secondary_key":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true}}},"optional":true,"computed":true},"virtual_network_configuration":{"nesting_mode":3,"block":{"attributes":{"subnet_id":{"type":"string","required":true}}},"optional":true}}}},"azurerm_api_management_api":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"api_type":{"type":"string","optional":true,"computed":true},"description":{"type":"string","optional":true},"display_name":{"type":"string","optional":true,"computed":true},"is_current":{"type":"bool","computed":true},"is_online":{"type":"bool","computed":true},"name":{"type":"string","required":true},"path":{"type":"string","optional":true,"computed":true},"protocols":{"type":["set","string"],"optional":true,"computed":true},"resource_group_name":{"type":"string","required":true},"revision":{"type":"string","required":true},"revision_description":{"type":"string","optional":true},"service_url":{"type":"string","optional":true,"computed":true},"source_api_id":{"type":"string","optional":true},"subscription_required":{"type":"bool","optional":true,"default":true},"terms_of_service_url":{"type":"string","optional":true},"version":{"type":"string","optional":true,"computed":true},"version_description":{"type":"string","optional":true},"version_set_id":{"type":"string","optional":true,"computed":true}},"block_types":{"contact":{"nesting_mode":3,"block":{"attributes":{"email":{"type":"string","optional":true},"name":{"type":"string","optional":true},"url":{"type":"string","optional":true}}},"optional":true},"import":{"nesting_mode":3,"block":{"attributes":{"content_format":{"type":"string","required":true},"content_value":{"type":"string","required":true}},"block_types":{"wsdl_selector":{"nesting_mode":3,"block":{"attributes":{"endpoint_name":{"type":"string","required":true},"service_name":{"type":"string","required":true}}},"optional":true}}},"optional":true},"license":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","optional":true},"url":{"type":"string","optional":true}}},"optional":true},"oauth2_authorization":{"nesting_mode":3,"block":{"attributes":{"authorization_server_name":{"type":"string","required":true},"scope":{"type":"string","optional":true}}},"optional":true},"openid_authentication":{"nesting_mode":3,"block":{"attributes":{"bearer_token_sending_methods":{"type":["set","string"],"optional":true},"openid_provider_name":{"type":"string","required":true}}},"optional":true},"subscription_key_parameter_names":{"nesting_mode":3,"block":{"attributes":{"header":{"type":"string","required":true},"query":{"type":"string","required":true}}},"optional":true,"computed":true}}}},"azurerm_api_management_api_diagnostic":{"block":{"attributes":{"always_log_errors":{"type":"bool","optional":true,"computed":true},"api_management_logger_id":{"type":"string","required":true},"api_management_name":{"type":"string","required":true},"api_name":{"type":"string","required":true},"http_correlation_protocol":{"type":"string","optional":true,"computed":true},"identifier":{"type":"string","required":true},"log_client_ip":{"type":"bool","optional":true,"computed":true},"operation_name_format":{"type":"string","optional":true,"default":"Name"},"resource_group_name":{"type":"string","required":true},"sampling_percentage":{"type":"number","optional":true,"computed":true},"verbosity":{"type":"string","optional":true,"computed":true}},"block_types":{"backend_request":{"nesting_mode":3,"block":{"attributes":{"body_bytes":{"type":"number","optional":true},"headers_to_log":{"type":["set","string"],"optional":true}},"block_types":{"data_masking":{"nesting_mode":3,"block":{"block_types":{"headers":{"nesting_mode":3,"block":{"attributes":{"mode":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"query_params":{"nesting_mode":3,"block":{"attributes":{"mode":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true}}},"optional":true,"computed":true},"backend_response":{"nesting_mode":3,"block":{"attributes":{"body_bytes":{"type":"number","optional":true},"headers_to_log":{"type":["set","string"],"optional":true}},"block_types":{"data_masking":{"nesting_mode":3,"block":{"block_types":{"headers":{"nesting_mode":3,"block":{"attributes":{"mode":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"query_params":{"nesting_mode":3,"block":{"attributes":{"mode":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true}}},"optional":true,"computed":true},"frontend_request":{"nesting_mode":3,"block":{"attributes":{"body_bytes":{"type":"number","optional":true},"headers_to_log":{"type":["set","string"],"optional":true}},"block_types":{"data_masking":{"nesting_mode":3,"block":{"block_types":{"headers":{"nesting_mode":3,"block":{"attributes":{"mode":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"query_params":{"nesting_mode":3,"block":{"attributes":{"mode":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true}}},"optional":true,"computed":true},"frontend_response":{"nesting_mode":3,"block":{"attributes":{"body_bytes":{"type":"number","optional":true},"headers_to_log":{"type":["set","string"],"optional":true}},"block_types":{"data_masking":{"nesting_mode":3,"block":{"block_types":{"headers":{"nesting_mode":3,"block":{"attributes":{"mode":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"query_params":{"nesting_mode":3,"block":{"attributes":{"mode":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true}}},"optional":true,"computed":true}}}},"azurerm_api_management_api_operation":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"api_name":{"type":"string","required":true},"description":{"type":"string","optional":true},"display_name":{"type":"string","required":true},"method":{"type":"string","required":true},"operation_id":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"url_template":{"type":"string","required":true}},"block_types":{"request":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true}},"block_types":{"header":{"nesting_mode":3,"block":{"attributes":{"default_value":{"type":"string","optional":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"required":{"type":"bool","required":true},"schema_id":{"type":"string","optional":true},"type":{"type":"string","required":true},"type_name":{"type":"string","optional":true},"values":{"type":["set","string"],"optional":true}},"block_types":{"example":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"external_value":{"type":"string","optional":true},"name":{"type":"string","required":true},"summary":{"type":"string","optional":true},"value":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"query_parameter":{"nesting_mode":3,"block":{"attributes":{"default_value":{"type":"string","optional":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"required":{"type":"bool","required":true},"schema_id":{"type":"string","optional":true},"type":{"type":"string","required":true},"type_name":{"type":"string","optional":true},"values":{"type":["set","string"],"optional":true}},"block_types":{"example":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"external_value":{"type":"string","optional":true},"name":{"type":"string","required":true},"summary":{"type":"string","optional":true},"value":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"representation":{"nesting_mode":3,"block":{"attributes":{"content_type":{"type":"string","required":true},"schema_id":{"type":"string","optional":true},"type_name":{"type":"string","optional":true}},"block_types":{"example":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"external_value":{"type":"string","optional":true},"name":{"type":"string","required":true},"summary":{"type":"string","optional":true},"value":{"type":"string","optional":true}}},"optional":true},"form_parameter":{"nesting_mode":3,"block":{"attributes":{"default_value":{"type":"string","optional":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"required":{"type":"bool","required":true},"schema_id":{"type":"string","optional":true},"type":{"type":"string","required":true},"type_name":{"type":"string","optional":true},"values":{"type":["set","string"],"optional":true}},"block_types":{"example":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"external_value":{"type":"string","optional":true},"name":{"type":"string","required":true},"summary":{"type":"string","optional":true},"value":{"type":"string","optional":true}}},"optional":true}}},"optional":true}}},"optional":true}}},"optional":true,"computed":true},"response":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"status_code":{"type":"number","required":true}},"block_types":{"header":{"nesting_mode":3,"block":{"attributes":{"default_value":{"type":"string","optional":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"required":{"type":"bool","required":true},"schema_id":{"type":"string","optional":true},"type":{"type":"string","required":true},"type_name":{"type":"string","optional":true},"values":{"type":["set","string"],"optional":true}},"block_types":{"example":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"external_value":{"type":"string","optional":true},"name":{"type":"string","required":true},"summary":{"type":"string","optional":true},"value":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"representation":{"nesting_mode":3,"block":{"attributes":{"content_type":{"type":"string","required":true},"schema_id":{"type":"string","optional":true},"type_name":{"type":"string","optional":true}},"block_types":{"example":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"external_value":{"type":"string","optional":true},"name":{"type":"string","required":true},"summary":{"type":"string","optional":true},"value":{"type":"string","optional":true}}},"optional":true},"form_parameter":{"nesting_mode":3,"block":{"attributes":{"default_value":{"type":"string","optional":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"required":{"type":"bool","required":true},"schema_id":{"type":"string","optional":true},"type":{"type":"string","required":true},"type_name":{"type":"string","optional":true},"values":{"type":["set","string"],"optional":true}},"block_types":{"example":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"external_value":{"type":"string","optional":true},"name":{"type":"string","required":true},"summary":{"type":"string","optional":true},"value":{"type":"string","optional":true}}},"optional":true}}},"optional":true}}},"optional":true}}},"optional":true},"template_parameter":{"nesting_mode":3,"block":{"attributes":{"default_value":{"type":"string","optional":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"required":{"type":"bool","required":true},"schema_id":{"type":"string","optional":true},"type":{"type":"string","required":true},"type_name":{"type":"string","optional":true},"values":{"type":["set","string"],"optional":true}},"block_types":{"example":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"external_value":{"type":"string","optional":true},"name":{"type":"string","required":true},"summary":{"type":"string","optional":true},"value":{"type":"string","optional":true}}},"optional":true}}},"optional":true}}}},"azurerm_api_management_api_operation_policy":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"api_name":{"type":"string","required":true},"operation_id":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"xml_content":{"type":"string","optional":true,"computed":true,"conflicts_with":["xml_link"]},"xml_link":{"type":"string","optional":true,"conflicts_with":["xml_content"]}}}},"azurerm_api_management_api_operation_tag":{"block":{"attributes":{"api_operation_id":{"type":"string","required":true},"display_name":{"type":"string","required":true},"name":{"type":"string","required":true}}}},"azurerm_api_management_api_policy":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"api_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"xml_content":{"type":"string","optional":true,"computed":true,"conflicts_with":["xml_link"]},"xml_link":{"type":"string","optional":true,"conflicts_with":["xml_content"]}}}},"azurerm_api_management_api_release":{"block":{"attributes":{"api_id":{"type":"string","required":true},"name":{"type":"string","required":true},"notes":{"type":"string","optional":true}}}},"azurerm_api_management_api_schema":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"api_name":{"type":"string","required":true},"components":{"type":"string","optional":true,"exactly_one_of":["value","definitions","components"]},"content_type":{"type":"string","required":true},"definitions":{"type":"string","optional":true,"exactly_one_of":["value","definitions","components"]},"resource_group_name":{"type":"string","required":true},"schema_id":{"type":"string","required":true},"value":{"type":"string","optional":true,"exactly_one_of":["value","definitions","components"]}}}},"azurerm_api_management_api_tag":{"block":{"attributes":{"api_id":{"type":"string","required":true},"name":{"type":"string","required":true}}}},"azurerm_api_management_api_tag_description":{"block":{"attributes":{"api_tag_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"external_documentation_description":{"type":"string","optional":true},"external_documentation_url":{"type":"string","optional":true}}}},"azurerm_api_management_api_version_set":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"description":{"type":"string","optional":true},"display_name":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"version_header_name":{"type":"string","optional":true,"conflicts_with":["version_query_name"]},"version_query_name":{"type":"string","optional":true,"conflicts_with":["version_header_name"]},"versioning_scheme":{"type":"string","required":true}}}},"azurerm_api_management_authorization_server":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"authorization_endpoint":{"type":"string","required":true},"authorization_methods":{"type":["set","string"],"required":true},"bearer_token_sending_methods":{"type":["set","string"],"optional":true},"client_authentication_method":{"type":["set","string"],"optional":true},"client_id":{"type":"string","required":true},"client_registration_endpoint":{"type":"string","required":true},"client_secret":{"type":"string","optional":true},"default_scope":{"type":"string","optional":true},"description":{"type":"string","optional":true},"display_name":{"type":"string","required":true},"grant_types":{"type":["set","string"],"required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"resource_owner_password":{"type":"string","optional":true},"resource_owner_username":{"type":"string","optional":true},"support_state":{"type":"bool","optional":true},"token_endpoint":{"type":"string","optional":true}},"block_types":{"token_body_parameter":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}}},"azurerm_api_management_backend":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"protocol":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"resource_id":{"type":"string","optional":true},"title":{"type":"string","optional":true},"url":{"type":"string","required":true}},"block_types":{"credentials":{"nesting_mode":3,"block":{"attributes":{"certificate":{"type":["list","string"],"optional":true,"at_least_one_of":["credentials.0.authorization","credentials.0.certificate","credentials.0.header","credentials.0.query"]},"header":{"type":["map","string"],"optional":true,"at_least_one_of":["credentials.0.authorization","credentials.0.certificate","credentials.0.header","credentials.0.query"]},"query":{"type":["map","string"],"optional":true,"at_least_one_of":["credentials.0.authorization","credentials.0.certificate","credentials.0.header","credentials.0.query"]}},"block_types":{"authorization":{"nesting_mode":3,"block":{"attributes":{"parameter":{"type":"string","optional":true,"at_least_one_of":["credentials.0.authorization.0.parameter","credentials.0.authorization.0.scheme"]},"scheme":{"type":"string","optional":true,"at_least_one_of":["credentials.0.authorization.0.parameter","credentials.0.authorization.0.scheme"]}}},"optional":true,"at_least_one_of":["credentials.0.authorization","credentials.0.certificate","credentials.0.header","credentials.0.query"]}}},"optional":true},"proxy":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","optional":true},"url":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true},"service_fabric_cluster":{"nesting_mode":3,"block":{"attributes":{"client_certificate_id":{"type":"string","optional":true,"computed":true},"client_certificate_thumbprint":{"type":"string","optional":true,"computed":true},"management_endpoints":{"type":["set","string"],"required":true},"max_partition_resolution_retries":{"type":"number","required":true},"server_certificate_thumbprints":{"type":["set","string"],"optional":true,"conflicts_with":["service_fabric_cluster.0.server_x509_name"]}},"block_types":{"server_x509_name":{"nesting_mode":4,"block":{"attributes":{"issuer_certificate_thumbprint":{"type":"string","required":true},"name":{"type":"string","required":true}}},"optional":true,"conflicts_with":["service_fabric_cluster.0.server_certificate_thumbprints"]}}},"optional":true},"tls":{"nesting_mode":3,"block":{"attributes":{"validate_certificate_chain":{"type":"bool","optional":true,"at_least_one_of":["tls.0.validate_certificate_chain","tls.0.validate_certificate_name"]},"validate_certificate_name":{"type":"bool","optional":true,"at_least_one_of":["tls.0.validate_certificate_chain","tls.0.validate_certificate_name"]}}},"optional":true}}}},"azurerm_api_management_certificate":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"data":{"type":"string","optional":true,"conflicts_with":["key_vault_secret_id","key_vault_identity_client_id"],"at_least_one_of":["data","key_vault_secret_id"]},"expiration":{"type":"string","computed":true},"key_vault_identity_client_id":{"type":"string","optional":true,"required_with":["key_vault_secret_id"]},"key_vault_secret_id":{"type":"string","optional":true,"conflicts_with":["data","password"],"at_least_one_of":["data","key_vault_secret_id"]},"name":{"type":"string","required":true},"password":{"type":"string","optional":true,"required_with":["data"]},"resource_group_name":{"type":"string","required":true},"subject":{"type":"string","computed":true},"thumbprint":{"type":"string","computed":true}}}},"azurerm_api_management_custom_domain":{"block":{"attributes":{"api_management_id":{"type":"string","required":true}},"block_types":{"developer_portal":{"nesting_mode":3,"block":{"attributes":{"certificate":{"type":"string","optional":true},"certificate_password":{"type":"string","optional":true},"certificate_source":{"type":"string","computed":true},"certificate_status":{"type":"string","computed":true},"expiry":{"type":"string","computed":true},"host_name":{"type":"string","required":true},"key_vault_id":{"type":"string","optional":true},"negotiate_client_certificate":{"type":"bool","optional":true,"default":false},"ssl_keyvault_identity_client_id":{"type":"string","optional":true},"subject":{"type":"string","computed":true},"thumbprint":{"type":"string","computed":true}}},"optional":true,"at_least_one_of":["management","portal","developer_portal","gateway","scm"]},"gateway":{"nesting_mode":3,"block":{"attributes":{"certificate":{"type":"string","optional":true},"certificate_password":{"type":"string","optional":true},"certificate_source":{"type":"string","computed":true},"certificate_status":{"type":"string","computed":true},"default_ssl_binding":{"type":"bool","optional":true,"computed":true},"expiry":{"type":"string","computed":true},"host_name":{"type":"string","required":true},"key_vault_id":{"type":"string","optional":true},"negotiate_client_certificate":{"type":"bool","optional":true,"default":false},"ssl_keyvault_identity_client_id":{"type":"string","optional":true},"subject":{"type":"string","computed":true},"thumbprint":{"type":"string","computed":true}}},"optional":true,"at_least_one_of":["management","portal","developer_portal","gateway","scm"]},"management":{"nesting_mode":3,"block":{"attributes":{"certificate":{"type":"string","optional":true},"certificate_password":{"type":"string","optional":true},"certificate_source":{"type":"string","computed":true},"certificate_status":{"type":"string","computed":true},"expiry":{"type":"string","computed":true},"host_name":{"type":"string","required":true},"key_vault_id":{"type":"string","optional":true},"negotiate_client_certificate":{"type":"bool","optional":true,"default":false},"ssl_keyvault_identity_client_id":{"type":"string","optional":true},"subject":{"type":"string","computed":true},"thumbprint":{"type":"string","computed":true}}},"optional":true,"at_least_one_of":["management","portal","developer_portal","gateway","scm"]},"portal":{"nesting_mode":3,"block":{"attributes":{"certificate":{"type":"string","optional":true},"certificate_password":{"type":"string","optional":true},"certificate_source":{"type":"string","computed":true},"certificate_status":{"type":"string","computed":true},"expiry":{"type":"string","computed":true},"host_name":{"type":"string","required":true},"key_vault_id":{"type":"string","optional":true},"negotiate_client_certificate":{"type":"bool","optional":true,"default":false},"ssl_keyvault_identity_client_id":{"type":"string","optional":true},"subject":{"type":"string","computed":true},"thumbprint":{"type":"string","computed":true}}},"optional":true,"at_least_one_of":["management","portal","developer_portal","gateway","scm"]},"scm":{"nesting_mode":3,"block":{"attributes":{"certificate":{"type":"string","optional":true},"certificate_password":{"type":"string","optional":true},"certificate_source":{"type":"string","computed":true},"certificate_status":{"type":"string","computed":true},"expiry":{"type":"string","computed":true},"host_name":{"type":"string","required":true},"key_vault_id":{"type":"string","optional":true},"negotiate_client_certificate":{"type":"bool","optional":true,"default":false},"ssl_keyvault_identity_client_id":{"type":"string","optional":true},"subject":{"type":"string","computed":true},"thumbprint":{"type":"string","computed":true}}},"optional":true,"at_least_one_of":["management","portal","developer_portal","gateway","scm"]}}}},"azurerm_api_management_diagnostic":{"block":{"attributes":{"always_log_errors":{"type":"bool","optional":true,"computed":true},"api_management_logger_id":{"type":"string","required":true},"api_management_name":{"type":"string","required":true},"http_correlation_protocol":{"type":"string","optional":true,"computed":true},"identifier":{"type":"string","required":true},"log_client_ip":{"type":"bool","optional":true,"computed":true},"operation_name_format":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"sampling_percentage":{"type":"number","optional":true,"computed":true},"verbosity":{"type":"string","optional":true,"computed":true}},"block_types":{"backend_request":{"nesting_mode":3,"block":{"attributes":{"body_bytes":{"type":"number","optional":true},"headers_to_log":{"type":["set","string"],"optional":true}},"block_types":{"data_masking":{"nesting_mode":3,"block":{"block_types":{"headers":{"nesting_mode":3,"block":{"attributes":{"mode":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"query_params":{"nesting_mode":3,"block":{"attributes":{"mode":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true}}},"optional":true,"computed":true},"backend_response":{"nesting_mode":3,"block":{"attributes":{"body_bytes":{"type":"number","optional":true},"headers_to_log":{"type":["set","string"],"optional":true}},"block_types":{"data_masking":{"nesting_mode":3,"block":{"block_types":{"headers":{"nesting_mode":3,"block":{"attributes":{"mode":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"query_params":{"nesting_mode":3,"block":{"attributes":{"mode":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true}}},"optional":true,"computed":true},"frontend_request":{"nesting_mode":3,"block":{"attributes":{"body_bytes":{"type":"number","optional":true},"headers_to_log":{"type":["set","string"],"optional":true}},"block_types":{"data_masking":{"nesting_mode":3,"block":{"block_types":{"headers":{"nesting_mode":3,"block":{"attributes":{"mode":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"query_params":{"nesting_mode":3,"block":{"attributes":{"mode":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true}}},"optional":true,"computed":true},"frontend_response":{"nesting_mode":3,"block":{"attributes":{"body_bytes":{"type":"number","optional":true},"headers_to_log":{"type":["set","string"],"optional":true}},"block_types":{"data_masking":{"nesting_mode":3,"block":{"block_types":{"headers":{"nesting_mode":3,"block":{"attributes":{"mode":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"query_params":{"nesting_mode":3,"block":{"attributes":{"mode":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true}}},"optional":true,"computed":true}}}},"azurerm_api_management_email_template":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"body":{"type":"string","required":true},"description":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"subject":{"type":"string","required":true},"template_name":{"type":"string","required":true},"title":{"type":"string","computed":true}}}},"azurerm_api_management_gateway":{"block":{"attributes":{"api_management_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true}},"block_types":{"location_data":{"nesting_mode":3,"block":{"attributes":{"city":{"type":"string","optional":true},"district":{"type":"string","optional":true},"name":{"type":"string","required":true},"region":{"type":"string","optional":true}}},"required":true}}}},"azurerm_api_management_gateway_api":{"block":{"attributes":{"api_id":{"type":"string","required":true},"gateway_id":{"type":"string","required":true}}}},"azurerm_api_management_gateway_certificate_authority":{"block":{"attributes":{"api_management_id":{"type":"string","required":true},"certificate_name":{"type":"string","required":true},"gateway_name":{"type":"string","required":true},"is_trusted":{"type":"bool","optional":true}}}},"azurerm_api_management_gateway_host_name_configuration":{"block":{"attributes":{"api_management_id":{"type":"string","required":true},"certificate_id":{"type":"string","required":true},"gateway_name":{"type":"string","required":true},"host_name":{"type":"string","required":true},"http2_enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"request_client_certificate_enabled":{"type":"bool","optional":true},"tls10_enabled":{"type":"bool","optional":true},"tls11_enabled":{"type":"bool","optional":true}}}},"azurerm_api_management_global_schema":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"description":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"schema_id":{"type":"string","required":true},"type":{"type":"string","required":true},"value":{"type":"string","required":true}}}},"azurerm_api_management_group":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"description":{"type":"string","optional":true},"display_name":{"type":"string","required":true},"external_id":{"type":"string","optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"type":{"type":"string","optional":true,"default":"custom"}}}},"azurerm_api_management_group_user":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"group_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"user_id":{"type":"string","required":true}}}},"azurerm_api_management_identity_provider_aad":{"block":{"attributes":{"allowed_tenants":{"type":["list","string"],"required":true},"api_management_name":{"type":"string","required":true},"client_id":{"type":"string","required":true},"client_library":{"type":"string","optional":true},"client_secret":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"signin_tenant":{"type":"string","optional":true}}}},"azurerm_api_management_identity_provider_aadb2c":{"block":{"attributes":{"allowed_tenant":{"type":"string","required":true},"api_management_name":{"type":"string","required":true},"authority":{"type":"string","required":true},"client_id":{"type":"string","required":true},"client_library":{"type":"string","optional":true},"client_secret":{"type":"string","required":true},"password_reset_policy":{"type":"string","optional":true},"profile_editing_policy":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"signin_policy":{"type":"string","required":true},"signin_tenant":{"type":"string","required":true},"signup_policy":{"type":"string","required":true}}}},"azurerm_api_management_identity_provider_facebook":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"app_id":{"type":"string","required":true},"app_secret":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_api_management_identity_provider_google":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"client_id":{"type":"string","required":true},"client_secret":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_api_management_identity_provider_microsoft":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"client_id":{"type":"string","required":true},"client_secret":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_api_management_identity_provider_twitter":{"block":{"attributes":{"api_key":{"type":"string","required":true},"api_management_name":{"type":"string","required":true},"api_secret_key":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_api_management_logger":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"buffered":{"type":"bool","optional":true,"default":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"resource_id":{"type":"string","optional":true}},"block_types":{"application_insights":{"nesting_mode":3,"block":{"attributes":{"connection_string":{"type":"string","optional":true,"conflicts_with":["application_insights.0.instrumentation_key"],"at_least_one_of":["application_insights.0.connection_string","application_insights.0.instrumentation_key"]},"instrumentation_key":{"type":"string","optional":true,"conflicts_with":["application_insights.0.connection_string"],"at_least_one_of":["application_insights.0.connection_string","application_insights.0.instrumentation_key"]}}},"optional":true,"conflicts_with":["eventhub"]},"eventhub":{"nesting_mode":3,"block":{"attributes":{"connection_string":{"type":"string","optional":true,"conflicts_with":["eventhub.0.endpoint_uri","eventhub.0.user_assigned_identity_client_id"],"at_least_one_of":["eventhub.0.connection_string","eventhub.0.endpoint_uri"]},"endpoint_uri":{"type":"string","optional":true,"conflicts_with":["eventhub.0.connection_string"],"at_least_one_of":["eventhub.0.connection_string","eventhub.0.endpoint_uri"]},"name":{"type":"string","required":true},"user_assigned_identity_client_id":{"type":"string","optional":true,"conflicts_with":["eventhub.0.connection_string"]}}},"optional":true,"conflicts_with":["application_insights"]}}}},"azurerm_api_management_named_value":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"display_name":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"secret":{"type":"bool","optional":true,"default":false},"tags":{"type":["list","string"],"optional":true},"value":{"type":"string","optional":true,"exactly_one_of":["value","value_from_key_vault"]}},"block_types":{"value_from_key_vault":{"nesting_mode":3,"block":{"attributes":{"identity_client_id":{"type":"string","optional":true},"secret_id":{"type":"string","required":true}}},"optional":true,"exactly_one_of":["value","value_from_key_vault"],"required_with":["secret"]}}}},"azurerm_api_management_notification_recipient_email":{"block":{"attributes":{"api_management_id":{"type":"string","required":true},"email":{"type":"string","required":true},"notification_type":{"type":"string","required":true}}}},"azurerm_api_management_notification_recipient_user":{"block":{"attributes":{"api_management_id":{"type":"string","required":true},"notification_type":{"type":"string","required":true},"user_id":{"type":"string","required":true}}}},"azurerm_api_management_openid_connect_provider":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"client_id":{"type":"string","required":true},"client_secret":{"type":"string","required":true},"description":{"type":"string","optional":true},"display_name":{"type":"string","required":true},"metadata_endpoint":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_api_management_policy":{"block":{"attributes":{"api_management_id":{"type":"string","required":true},"xml_content":{"type":"string","optional":true,"computed":true,"conflicts_with":["xml_link"],"exactly_one_of":["xml_link","xml_content"]},"xml_link":{"type":"string","optional":true,"conflicts_with":["xml_content"],"exactly_one_of":["xml_link","xml_content"]}}}},"azurerm_api_management_policy_fragment":{"block":{"attributes":{"api_management_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"format":{"type":"string","optional":true,"default":"xml"},"name":{"type":"string","required":true},"value":{"type":"string","required":true}}}},"azurerm_api_management_product":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"approval_required":{"type":"bool","optional":true},"description":{"type":"string","optional":true},"display_name":{"type":"string","required":true},"product_id":{"type":"string","required":true},"published":{"type":"bool","required":true},"resource_group_name":{"type":"string","required":true},"subscription_required":{"type":"bool","optional":true,"default":true},"subscriptions_limit":{"type":"number","optional":true},"terms":{"type":"string","optional":true}}}},"azurerm_api_management_product_api":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"api_name":{"type":"string","required":true},"product_id":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_api_management_product_group":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"group_name":{"type":"string","required":true},"product_id":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_api_management_product_policy":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"product_id":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"xml_content":{"type":"string","optional":true,"computed":true,"conflicts_with":["xml_link"]},"xml_link":{"type":"string","optional":true,"conflicts_with":["xml_content"]}}}},"azurerm_api_management_product_tag":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"api_management_product_id":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_api_management_redis_cache":{"block":{"attributes":{"api_management_id":{"type":"string","required":true},"cache_location":{"type":"string","optional":true,"default":"default"},"connection_string":{"type":"string","required":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"redis_cache_id":{"type":"string","optional":true}}}},"azurerm_api_management_subscription":{"block":{"attributes":{"allow_tracing":{"type":"bool","optional":true,"default":true},"api_id":{"type":"string","optional":true,"conflicts_with":["product_id"]},"api_management_name":{"type":"string","required":true},"display_name":{"type":"string","required":true},"primary_key":{"type":"string","optional":true,"computed":true},"product_id":{"type":"string","optional":true,"conflicts_with":["api_id"]},"resource_group_name":{"type":"string","required":true},"secondary_key":{"type":"string","optional":true,"computed":true},"state":{"type":"string","optional":true,"default":"submitted"},"subscription_id":{"type":"string","optional":true,"computed":true},"user_id":{"type":"string","optional":true}}}},"azurerm_api_management_tag":{"block":{"attributes":{"api_management_id":{"type":"string","required":true},"display_name":{"type":"string","optional":true,"computed":true},"name":{"type":"string","required":true}}}},"azurerm_api_management_user":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"confirmation":{"type":"string","optional":true},"email":{"type":"string","required":true},"first_name":{"type":"string","required":true},"last_name":{"type":"string","required":true},"note":{"type":"string","optional":true},"password":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"state":{"type":"string","optional":true,"computed":true},"user_id":{"type":"string","required":true}}}},"azurerm_app_configuration":{"block":{"attributes":{"endpoint":{"type":"string","computed":true},"local_auth_enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"primary_read_key":{"type":["list",["object",{"connection_string":"string","id":"string","secret":"string"}]],"computed":true},"primary_write_key":{"type":["list",["object",{"connection_string":"string","id":"string","secret":"string"}]],"computed":true},"public_network_access":{"type":"string","optional":true},"purge_protection_enabled":{"type":"bool","optional":true,"default":false},"resource_group_name":{"type":"string","required":true},"secondary_read_key":{"type":["list",["object",{"connection_string":"string","id":"string","secret":"string"}]],"computed":true},"secondary_write_key":{"type":["list",["object",{"connection_string":"string","id":"string","secret":"string"}]],"computed":true},"sku":{"type":"string","optional":true,"default":"free"},"soft_delete_retention_days":{"type":"number","optional":true,"default":7},"tags":{"type":["map","string"],"optional":true}},"block_types":{"encryption":{"nesting_mode":3,"block":{"attributes":{"identity_client_id":{"type":"string","optional":true},"key_vault_key_identifier":{"type":"string","optional":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"replica":{"nesting_mode":4,"block":{"attributes":{"endpoint":{"type":"string","computed":true},"id":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true}}},"optional":true}}}},"azurerm_app_configuration_feature":{"block":{"attributes":{"configuration_store_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"enabled":{"type":"bool","optional":true},"etag":{"type":"string","optional":true,"computed":true},"key":{"type":"string","optional":true,"computed":true},"label":{"type":"string","optional":true},"locked":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"percentage_filter_value":{"type":"number","optional":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"targeting_filter":{"nesting_mode":3,"block":{"attributes":{"default_rollout_percentage":{"type":"number","required":true},"users":{"type":["list","string"],"optional":true}},"block_types":{"groups":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"rollout_percentage":{"type":"number","required":true}}},"optional":true}}},"optional":true},"timewindow_filter":{"nesting_mode":3,"block":{"attributes":{"end":{"type":"string","optional":true},"start":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_app_configuration_key":{"block":{"attributes":{"configuration_store_id":{"type":"string","required":true},"content_type":{"type":"string","optional":true,"computed":true},"etag":{"type":"string","optional":true,"computed":true},"key":{"type":"string","required":true},"label":{"type":"string","optional":true},"locked":{"type":"bool","optional":true,"default":false},"tags":{"type":["map","string"],"optional":true},"type":{"type":"string","optional":true,"default":"kv"},"value":{"type":"string","optional":true,"conflicts_with":["vault_key_reference"]},"vault_key_reference":{"type":"string","optional":true,"conflicts_with":["value"]}}}},"azurerm_app_service":{"block":{"attributes":{"app_service_plan_id":{"type":"string","required":true},"app_settings":{"type":["map","string"],"optional":true,"computed":true},"client_affinity_enabled":{"type":"bool","optional":true,"default":false},"client_cert_enabled":{"type":"bool","optional":true,"default":false},"client_cert_mode":{"type":"string","optional":true,"computed":true},"custom_domain_verification_id":{"type":"string","computed":true},"default_site_hostname":{"type":"string","computed":true},"enabled":{"type":"bool","optional":true,"default":true},"https_only":{"type":"bool","optional":true,"default":false},"key_vault_reference_identity_id":{"type":"string","optional":true,"computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"outbound_ip_address_list":{"type":["list","string"],"computed":true},"outbound_ip_addresses":{"type":"string","computed":true},"possible_outbound_ip_address_list":{"type":["list","string"],"computed":true},"possible_outbound_ip_addresses":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"site_credential":{"type":["list",["object",{"password":"string","username":"string"}]],"computed":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"auth_settings":{"nesting_mode":3,"block":{"attributes":{"additional_login_params":{"type":["map","string"],"optional":true},"allowed_external_redirect_urls":{"type":["list","string"],"optional":true},"default_provider":{"type":"string","optional":true},"enabled":{"type":"bool","required":true},"issuer":{"type":"string","optional":true},"runtime_version":{"type":"string","optional":true},"token_refresh_extension_hours":{"type":"number","optional":true,"default":72},"token_store_enabled":{"type":"bool","optional":true,"default":false},"unauthenticated_client_action":{"type":"string","optional":true}},"block_types":{"active_directory":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true}}},"optional":true},"facebook":{"nesting_mode":3,"block":{"attributes":{"app_id":{"type":"string","required":true},"app_secret":{"type":"string","required":true},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"google":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","required":true},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"microsoft":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","required":true},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"twitter":{"nesting_mode":3,"block":{"attributes":{"consumer_key":{"type":"string","required":true},"consumer_secret":{"type":"string","required":true}}},"optional":true}}},"optional":true,"computed":true},"backup":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"storage_account_url":{"type":"string","required":true}},"block_types":{"schedule":{"nesting_mode":3,"block":{"attributes":{"frequency_interval":{"type":"number","required":true},"frequency_unit":{"type":"string","required":true},"keep_at_least_one_backup":{"type":"bool","optional":true,"default":false},"retention_period_in_days":{"type":"number","optional":true,"default":30},"start_time":{"type":"string","optional":true}}},"required":true}}},"optional":true},"connection_string":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"type":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true,"computed":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"logs":{"nesting_mode":3,"block":{"attributes":{"detailed_error_messages_enabled":{"type":"bool","optional":true,"default":false},"failed_request_tracing_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"application_logs":{"nesting_mode":3,"block":{"attributes":{"file_system_level":{"type":"string","optional":true,"default":"Off"}},"block_types":{"azure_blob_storage":{"nesting_mode":3,"block":{"attributes":{"level":{"type":"string","required":true},"retention_in_days":{"type":"number","required":true},"sas_url":{"type":"string","required":true}}},"optional":true}}},"optional":true,"computed":true},"http_logs":{"nesting_mode":3,"block":{"block_types":{"azure_blob_storage":{"nesting_mode":3,"block":{"attributes":{"retention_in_days":{"type":"number","required":true},"sas_url":{"type":"string","required":true}}},"optional":true,"conflicts_with":["logs.0.http_logs.0.file_system"],"at_least_one_of":["logs.0.http_logs.0.azure_blob_storage","logs.0.http_logs.0.file_system"]},"file_system":{"nesting_mode":3,"block":{"attributes":{"retention_in_days":{"type":"number","required":true},"retention_in_mb":{"type":"number","required":true}}},"optional":true,"conflicts_with":["logs.0.http_logs.0.azure_blob_storage"],"at_least_one_of":["logs.0.http_logs.0.azure_blob_storage","logs.0.http_logs.0.file_system"]}}},"optional":true,"computed":true}}},"optional":true,"computed":true},"site_config":{"nesting_mode":3,"block":{"attributes":{"acr_use_managed_identity_credentials":{"type":"bool","optional":true,"default":false},"acr_user_managed_identity_client_id":{"type":"string","optional":true},"always_on":{"type":"bool","optional":true,"default":false},"app_command_line":{"type":"string","optional":true},"auto_swap_slot_name":{"type":"string","optional":true},"default_documents":{"type":["list","string"],"optional":true},"dotnet_framework_version":{"type":"string","optional":true,"default":"v4.0"},"ftps_state":{"type":"string","optional":true,"computed":true},"health_check_path":{"type":"string","optional":true},"http2_enabled":{"type":"bool","optional":true,"default":false},"ip_restriction":{"type":["list",["object",{"action":"string","headers":["list",["object",{"x_azure_fdid":["set","string"],"x_fd_health_probe":["set","string"],"x_forwarded_for":["set","string"],"x_forwarded_host":["set","string"]}]],"ip_address":"string","name":"string","priority":"number","service_tag":"string","virtual_network_subnet_id":"string"}]],"optional":true,"computed":true},"java_container":{"type":"string","optional":true},"java_container_version":{"type":"string","optional":true},"java_version":{"type":"string","optional":true},"linux_fx_version":{"type":"string","optional":true,"computed":true},"local_mysql_enabled":{"type":"bool","optional":true,"computed":true},"managed_pipeline_mode":{"type":"string","optional":true,"computed":true},"min_tls_version":{"type":"string","optional":true,"computed":true},"number_of_workers":{"type":"number","optional":true,"computed":true},"php_version":{"type":"string","optional":true},"python_version":{"type":"string","optional":true},"remote_debugging_enabled":{"type":"bool","optional":true,"default":false},"remote_debugging_version":{"type":"string","optional":true,"computed":true},"scm_ip_restriction":{"type":["list",["object",{"action":"string","headers":["list",["object",{"x_azure_fdid":["set","string"],"x_fd_health_probe":["set","string"],"x_forwarded_for":["set","string"],"x_forwarded_host":["set","string"]}]],"ip_address":"string","name":"string","priority":"number","service_tag":"string","virtual_network_subnet_id":"string"}]],"optional":true,"computed":true},"scm_type":{"type":"string","optional":true,"computed":true},"scm_use_main_ip_restriction":{"type":"bool","optional":true,"default":false},"use_32_bit_worker_process":{"type":"bool","optional":true},"vnet_route_all_enabled":{"type":"bool","optional":true,"computed":true},"websockets_enabled":{"type":"bool","optional":true,"computed":true},"windows_fx_version":{"type":"string","optional":true,"computed":true}},"block_types":{"cors":{"nesting_mode":3,"block":{"attributes":{"allowed_origins":{"type":["set","string"],"required":true},"support_credentials":{"type":"bool","optional":true,"default":false}}},"optional":true,"computed":true}}},"optional":true,"computed":true},"source_control":{"nesting_mode":3,"block":{"attributes":{"branch":{"type":"string","optional":true,"computed":true,"at_least_one_of":["source_control.0.repo_url","source_control.0.branch","source_control.0.manual_integration","source_control.0.use_mercurial","source_control.0.rollback_enabled"]},"manual_integration":{"type":"bool","optional":true,"computed":true,"at_least_one_of":["source_control.0.repo_url","source_control.0.branch","source_control.0.manual_integration","source_control.0.use_mercurial","source_control.0.rollback_enabled"]},"repo_url":{"type":"string","optional":true,"computed":true,"at_least_one_of":["source_control.0.repo_url","source_control.0.branch","source_control.0.manual_integration","source_control.0.use_mercurial","source_control.0.rollback_enabled"]},"rollback_enabled":{"type":"bool","optional":true,"computed":true,"at_least_one_of":["source_control.0.repo_url","source_control.0.branch","source_control.0.manual_integration","source_control.0.use_mercurial","source_control.0.rollback_enabled"]},"use_mercurial":{"type":"bool","optional":true,"computed":true,"at_least_one_of":["source_control.0.repo_url","source_control.0.branch","source_control.0.manual_integration","source_control.0.use_mercurial","source_control.0.rollback_enabled"]}}},"optional":true,"computed":true,"conflicts_with":["site_config.0.scm_type"]},"storage_account":{"nesting_mode":4,"block":{"attributes":{"access_key":{"type":"string","required":true},"account_name":{"type":"string","required":true},"mount_path":{"type":"string","optional":true},"name":{"type":"string","required":true},"share_name":{"type":"string","required":true},"type":{"type":"string","required":true}}},"optional":true,"computed":true}}}},"azurerm_app_service_active_slot":{"block":{"attributes":{"app_service_name":{"type":"string","required":true},"app_service_slot_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_app_service_certificate":{"block":{"attributes":{"app_service_plan_id":{"type":"string","optional":true},"expiration_date":{"type":"string","computed":true},"friendly_name":{"type":"string","computed":true},"host_names":{"type":["list","string"],"computed":true},"hosting_environment_profile_id":{"type":"string","computed":true},"issue_date":{"type":"string","computed":true},"issuer":{"type":"string","computed":true},"key_vault_id":{"type":"string","optional":true,"required_with":["key_vault_secret_id"]},"key_vault_secret_id":{"type":"string","optional":true,"conflicts_with":["pfx_blob","password"],"exactly_one_of":["key_vault_secret_id","pfx_blob"]},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"password":{"type":"string","optional":true},"pfx_blob":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"subject_name":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true},"thumbprint":{"type":"string","computed":true}}}},"azurerm_app_service_certificate_binding":{"block":{"attributes":{"app_service_name":{"type":"string","computed":true},"certificate_id":{"type":"string","required":true},"hostname":{"type":"string","computed":true},"hostname_binding_id":{"type":"string","required":true},"ssl_state":{"type":"string","required":true},"thumbprint":{"type":"string","computed":true}}}},"azurerm_app_service_certificate_order":{"block":{"attributes":{"app_service_certificate_not_renewable_reasons":{"type":["list","string"],"computed":true},"auto_renew":{"type":"bool","optional":true,"default":true},"certificates":{"type":["list",["object",{"certificate_name":"string","key_vault_id":"string","key_vault_secret_name":"string","provisioning_state":"string"}]],"computed":true},"csr":{"type":"string","optional":true,"computed":true,"conflicts_with":["distinguished_name"]},"distinguished_name":{"type":"string","optional":true,"computed":true,"conflicts_with":["csr"]},"domain_verification_token":{"type":"string","computed":true},"expiration_time":{"type":"string","computed":true},"intermediate_thumbprint":{"type":"string","computed":true},"is_private_key_external":{"type":"bool","computed":true},"key_size":{"type":"number","optional":true,"default":2048},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"product_type":{"type":"string","optional":true,"default":"Standard"},"resource_group_name":{"type":"string","required":true},"root_thumbprint":{"type":"string","computed":true},"signed_certificate_thumbprint":{"type":"string","computed":true},"status":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true},"validity_in_years":{"type":"number","optional":true,"default":1}}}},"azurerm_app_service_connection":{"block":{"attributes":{"app_service_id":{"type":"string","required":true},"client_type":{"type":"string","optional":true,"default":"none"},"name":{"type":"string","required":true},"target_resource_id":{"type":"string","required":true},"vnet_solution":{"type":"string","optional":true}},"block_types":{"authentication":{"nesting_mode":3,"block":{"attributes":{"certificate":{"type":"string","optional":true},"client_id":{"type":"string","optional":true},"name":{"type":"string","optional":true},"principal_id":{"type":"string","optional":true},"secret":{"type":"string","optional":true},"subscription_id":{"type":"string","optional":true},"type":{"type":"string","required":true}}},"required":true},"secret_store":{"nesting_mode":3,"block":{"attributes":{"key_vault_id":{"type":"string","required":true}}},"optional":true}}}},"azurerm_app_service_custom_hostname_binding":{"block":{"attributes":{"app_service_name":{"type":"string","required":true},"hostname":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"ssl_state":{"type":"string","optional":true,"computed":true},"thumbprint":{"type":"string","optional":true,"computed":true},"virtual_ip":{"type":"string","computed":true}}}},"azurerm_app_service_environment_v3":{"block":{"attributes":{"allow_new_private_endpoint_connections":{"type":"bool","optional":true,"default":true},"dedicated_host_count":{"type":"number","optional":true,"conflicts_with":["zone_redundant"]},"dns_suffix":{"type":"string","computed":true},"external_inbound_ip_addresses":{"type":["list","string"],"computed":true},"inbound_network_dependencies":{"type":["list",["object",{"description":"string","ip_addresses":["list","string"],"ports":["list","string"]}]],"computed":true},"internal_inbound_ip_addresses":{"type":["list","string"],"computed":true},"internal_load_balancing_mode":{"type":"string","optional":true,"default":"None"},"ip_ssl_address_count":{"type":"number","computed":true},"linux_outbound_ip_addresses":{"type":["list","string"],"computed":true},"location":{"type":"string","computed":true},"name":{"type":"string","required":true},"pricing_tier":{"type":"string","computed":true},"remote_debugging_enabled":{"type":"bool","optional":true,"default":false},"resource_group_name":{"type":"string","required":true},"subnet_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"windows_outbound_ip_addresses":{"type":["list","string"],"computed":true},"zone_redundant":{"type":"bool","optional":true,"default":false,"conflicts_with":["dedicated_host_count"]}},"block_types":{"cluster_setting":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true,"computed":true}}}},"azurerm_app_service_hybrid_connection":{"block":{"attributes":{"app_service_name":{"type":"string","required":true},"hostname":{"type":"string","required":true},"namespace_name":{"type":"string","computed":true},"port":{"type":"number","required":true},"relay_id":{"type":"string","required":true},"relay_name":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"send_key_name":{"type":"string","optional":true,"default":"RootManageSharedAccessKey"},"send_key_value":{"type":"string","computed":true},"service_bus_namespace":{"type":"string","computed":true},"service_bus_suffix":{"type":"string","computed":true}}}},"azurerm_app_service_managed_certificate":{"block":{"attributes":{"canonical_name":{"type":"string","computed":true},"custom_hostname_binding_id":{"type":"string","required":true},"expiration_date":{"type":"string","computed":true},"friendly_name":{"type":"string","computed":true},"host_names":{"type":["list","string"],"computed":true},"issue_date":{"type":"string","computed":true},"issuer":{"type":"string","computed":true},"subject_name":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true},"thumbprint":{"type":"string","computed":true}}}},"azurerm_app_service_plan":{"block":{"attributes":{"app_service_environment_id":{"type":"string","optional":true},"is_xenon":{"type":"bool","optional":true},"kind":{"type":"string","optional":true,"default":"Windows"},"location":{"type":"string","required":true},"maximum_elastic_worker_count":{"type":"number","optional":true,"computed":true},"maximum_number_of_workers":{"type":"number","computed":true},"name":{"type":"string","required":true},"per_site_scaling":{"type":"bool","optional":true},"reserved":{"type":"bool","optional":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"zone_redundant":{"type":"bool","optional":true}},"block_types":{"sku":{"nesting_mode":3,"block":{"attributes":{"capacity":{"type":"number","optional":true,"computed":true},"size":{"type":"string","required":true},"tier":{"type":"string","required":true}}},"required":true}}}},"azurerm_app_service_public_certificate":{"block":{"attributes":{"app_service_name":{"type":"string","required":true},"blob":{"type":"string","required":true},"certificate_location":{"type":"string","required":true},"certificate_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"thumbprint":{"type":"string","computed":true}}}},"azurerm_app_service_slot":{"block":{"attributes":{"app_service_name":{"type":"string","required":true},"app_service_plan_id":{"type":"string","required":true},"app_settings":{"type":["map","string"],"optional":true,"computed":true},"client_affinity_enabled":{"type":"bool","optional":true,"computed":true},"default_site_hostname":{"type":"string","computed":true},"enabled":{"type":"bool","optional":true,"default":true},"https_only":{"type":"bool","optional":true,"default":false},"key_vault_reference_identity_id":{"type":"string","optional":true,"computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"site_credential":{"type":["list",["object",{"password":"string","username":"string"}]],"computed":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"auth_settings":{"nesting_mode":3,"block":{"attributes":{"additional_login_params":{"type":["map","string"],"optional":true},"allowed_external_redirect_urls":{"type":["list","string"],"optional":true},"default_provider":{"type":"string","optional":true},"enabled":{"type":"bool","required":true},"issuer":{"type":"string","optional":true},"runtime_version":{"type":"string","optional":true},"token_refresh_extension_hours":{"type":"number","optional":true,"default":72},"token_store_enabled":{"type":"bool","optional":true,"default":false},"unauthenticated_client_action":{"type":"string","optional":true}},"block_types":{"active_directory":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true}}},"optional":true},"facebook":{"nesting_mode":3,"block":{"attributes":{"app_id":{"type":"string","required":true},"app_secret":{"type":"string","required":true},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"google":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","required":true},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"microsoft":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","required":true},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"twitter":{"nesting_mode":3,"block":{"attributes":{"consumer_key":{"type":"string","required":true},"consumer_secret":{"type":"string","required":true}}},"optional":true}}},"optional":true,"computed":true},"connection_string":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"type":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true,"computed":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"logs":{"nesting_mode":3,"block":{"attributes":{"detailed_error_messages_enabled":{"type":"bool","optional":true,"default":false},"failed_request_tracing_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"application_logs":{"nesting_mode":3,"block":{"attributes":{"file_system_level":{"type":"string","optional":true,"default":"Off"}},"block_types":{"azure_blob_storage":{"nesting_mode":3,"block":{"attributes":{"level":{"type":"string","required":true},"retention_in_days":{"type":"number","required":true},"sas_url":{"type":"string","required":true}}},"optional":true}}},"optional":true,"computed":true},"http_logs":{"nesting_mode":3,"block":{"block_types":{"azure_blob_storage":{"nesting_mode":3,"block":{"attributes":{"retention_in_days":{"type":"number","required":true},"sas_url":{"type":"string","required":true}}},"optional":true,"conflicts_with":["logs.0.http_logs.0.file_system"],"at_least_one_of":["logs.0.http_logs.0.azure_blob_storage","logs.0.http_logs.0.file_system"]},"file_system":{"nesting_mode":3,"block":{"attributes":{"retention_in_days":{"type":"number","required":true},"retention_in_mb":{"type":"number","required":true}}},"optional":true,"conflicts_with":["logs.0.http_logs.0.azure_blob_storage"],"at_least_one_of":["logs.0.http_logs.0.azure_blob_storage","logs.0.http_logs.0.file_system"]}}},"optional":true,"computed":true}}},"optional":true,"computed":true},"site_config":{"nesting_mode":3,"block":{"attributes":{"acr_use_managed_identity_credentials":{"type":"bool","optional":true,"default":false},"acr_user_managed_identity_client_id":{"type":"string","optional":true},"always_on":{"type":"bool","optional":true,"default":false},"app_command_line":{"type":"string","optional":true},"auto_swap_slot_name":{"type":"string","optional":true},"default_documents":{"type":["list","string"],"optional":true},"dotnet_framework_version":{"type":"string","optional":true,"default":"v4.0"},"ftps_state":{"type":"string","optional":true,"computed":true},"health_check_path":{"type":"string","optional":true},"http2_enabled":{"type":"bool","optional":true,"default":false},"ip_restriction":{"type":["list",["object",{"action":"string","headers":["list",["object",{"x_azure_fdid":["set","string"],"x_fd_health_probe":["set","string"],"x_forwarded_for":["set","string"],"x_forwarded_host":["set","string"]}]],"ip_address":"string","name":"string","priority":"number","service_tag":"string","virtual_network_subnet_id":"string"}]],"optional":true,"computed":true},"java_container":{"type":"string","optional":true},"java_container_version":{"type":"string","optional":true},"java_version":{"type":"string","optional":true},"linux_fx_version":{"type":"string","optional":true,"computed":true},"local_mysql_enabled":{"type":"bool","optional":true,"computed":true},"managed_pipeline_mode":{"type":"string","optional":true,"computed":true},"min_tls_version":{"type":"string","optional":true,"computed":true},"number_of_workers":{"type":"number","optional":true,"computed":true},"php_version":{"type":"string","optional":true},"python_version":{"type":"string","optional":true},"remote_debugging_enabled":{"type":"bool","optional":true,"default":false},"remote_debugging_version":{"type":"string","optional":true,"computed":true},"scm_ip_restriction":{"type":["list",["object",{"action":"string","headers":["list",["object",{"x_azure_fdid":["set","string"],"x_fd_health_probe":["set","string"],"x_forwarded_for":["set","string"],"x_forwarded_host":["set","string"]}]],"ip_address":"string","name":"string","priority":"number","service_tag":"string","virtual_network_subnet_id":"string"}]],"optional":true,"computed":true},"scm_type":{"type":"string","optional":true,"computed":true},"scm_use_main_ip_restriction":{"type":"bool","optional":true,"default":false},"use_32_bit_worker_process":{"type":"bool","optional":true},"vnet_route_all_enabled":{"type":"bool","optional":true,"computed":true},"websockets_enabled":{"type":"bool","optional":true,"computed":true},"windows_fx_version":{"type":"string","optional":true,"computed":true}},"block_types":{"cors":{"nesting_mode":3,"block":{"attributes":{"allowed_origins":{"type":["set","string"],"required":true},"support_credentials":{"type":"bool","optional":true,"default":false}}},"optional":true,"computed":true}}},"optional":true,"computed":true},"storage_account":{"nesting_mode":4,"block":{"attributes":{"access_key":{"type":"string","required":true},"account_name":{"type":"string","required":true},"mount_path":{"type":"string","optional":true},"name":{"type":"string","required":true},"share_name":{"type":"string","required":true},"type":{"type":"string","required":true}}},"optional":true,"computed":true}}}},"azurerm_app_service_slot_custom_hostname_binding":{"block":{"attributes":{"app_service_slot_id":{"type":"string","required":true},"hostname":{"type":"string","required":true},"ssl_state":{"type":"string","optional":true,"computed":true},"thumbprint":{"type":"string","optional":true,"computed":true},"virtual_ip":{"type":"string","computed":true}}}},"azurerm_app_service_slot_virtual_network_swift_connection":{"block":{"attributes":{"app_service_id":{"type":"string","required":true},"slot_name":{"type":"string","required":true},"subnet_id":{"type":"string","required":true}}}},"azurerm_app_service_source_control":{"block":{"attributes":{"app_id":{"type":"string","required":true},"branch":{"type":"string","optional":true,"computed":true,"required_with":["repo_url"]},"repo_url":{"type":"string","optional":true,"computed":true,"required_with":["branch"]},"rollback_enabled":{"type":"bool","optional":true,"default":false},"scm_type":{"type":"string","computed":true},"use_local_git":{"type":"bool","optional":true,"default":false,"conflicts_with":["repo_url","branch","use_manual_integration","uses_github_action","github_action_configuration","use_mercurial","rollback_enabled"]},"use_manual_integration":{"type":"bool","optional":true,"default":false},"use_mercurial":{"type":"bool","optional":true,"default":false},"uses_github_action":{"type":"bool","computed":true}},"block_types":{"github_action_configuration":{"nesting_mode":3,"block":{"attributes":{"generate_workflow_file":{"type":"bool","optional":true,"default":true},"linux_action":{"type":"bool","computed":true}},"block_types":{"code_configuration":{"nesting_mode":3,"block":{"attributes":{"runtime_stack":{"type":"string","required":true},"runtime_version":{"type":"string","required":true}}},"optional":true},"container_configuration":{"nesting_mode":3,"block":{"attributes":{"image_name":{"type":"string","required":true},"registry_password":{"type":"string","optional":true},"registry_url":{"type":"string","required":true},"registry_username":{"type":"string","optional":true}}},"optional":true}}},"optional":true}}}},"azurerm_app_service_source_control_slot":{"block":{"attributes":{"branch":{"type":"string","optional":true,"computed":true,"required_with":["repo_url"]},"repo_url":{"type":"string","optional":true,"computed":true,"required_with":["branch"]},"rollback_enabled":{"type":"bool","optional":true,"default":false},"scm_type":{"type":"string","computed":true},"slot_id":{"type":"string","required":true},"use_local_git":{"type":"bool","optional":true,"default":false,"conflicts_with":["repo_url","branch","use_manual_integration","uses_github_action","github_action_configuration","use_mercurial","rollback_enabled"]},"use_manual_integration":{"type":"bool","optional":true,"default":false},"use_mercurial":{"type":"bool","optional":true,"default":false},"uses_github_action":{"type":"bool","computed":true}},"block_types":{"github_action_configuration":{"nesting_mode":3,"block":{"attributes":{"generate_workflow_file":{"type":"bool","optional":true,"default":true},"linux_action":{"type":"bool","computed":true}},"block_types":{"code_configuration":{"nesting_mode":3,"block":{"attributes":{"runtime_stack":{"type":"string","required":true},"runtime_version":{"type":"string","required":true}}},"optional":true},"container_configuration":{"nesting_mode":3,"block":{"attributes":{"image_name":{"type":"string","required":true},"registry_password":{"type":"string","optional":true},"registry_url":{"type":"string","required":true},"registry_username":{"type":"string","optional":true}}},"optional":true}}},"optional":true}}}},"azurerm_app_service_source_control_token":{"block":{"attributes":{"token":{"type":"string","required":true},"token_secret":{"type":"string","optional":true},"type":{"type":"string","required":true}}}},"azurerm_app_service_virtual_network_swift_connection":{"block":{"attributes":{"app_service_id":{"type":"string","required":true},"subnet_id":{"type":"string","required":true}}}},"azurerm_application_gateway":{"block":{"attributes":{"enable_http2":{"type":"bool","optional":true},"fips_enabled":{"type":"bool","optional":true},"firewall_policy_id":{"type":"string","optional":true},"force_firewall_policy_association":{"type":"bool","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"private_endpoint_connection":{"type":["set",["object",{"id":"string","name":"string"}]],"computed":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"zones":{"type":["set","string"],"optional":true}},"block_types":{"authentication_certificate":{"nesting_mode":3,"block":{"attributes":{"data":{"type":"string","required":true},"id":{"type":"string","computed":true},"name":{"type":"string","required":true}}},"optional":true},"autoscale_configuration":{"nesting_mode":3,"block":{"attributes":{"max_capacity":{"type":"number","optional":true},"min_capacity":{"type":"number","required":true}}},"optional":true},"backend_address_pool":{"nesting_mode":4,"block":{"attributes":{"fqdns":{"type":["set","string"],"optional":true},"id":{"type":"string","computed":true},"ip_addresses":{"type":["set","string"],"optional":true},"name":{"type":"string","required":true}}},"required":true},"backend_http_settings":{"nesting_mode":4,"block":{"attributes":{"affinity_cookie_name":{"type":"string","optional":true},"cookie_based_affinity":{"type":"string","required":true},"host_name":{"type":"string","optional":true},"id":{"type":"string","computed":true},"name":{"type":"string","required":true},"path":{"type":"string","optional":true},"pick_host_name_from_backend_address":{"type":"bool","optional":true,"default":false},"port":{"type":"number","required":true},"probe_id":{"type":"string","computed":true},"probe_name":{"type":"string","optional":true},"protocol":{"type":"string","required":true},"request_timeout":{"type":"number","optional":true,"default":30},"trusted_root_certificate_names":{"type":["list","string"],"optional":true}},"block_types":{"authentication_certificate":{"nesting_mode":3,"block":{"attributes":{"id":{"type":"string","computed":true},"name":{"type":"string","required":true}}},"optional":true},"connection_draining":{"nesting_mode":3,"block":{"attributes":{"drain_timeout_sec":{"type":"number","required":true},"enabled":{"type":"bool","required":true}}},"optional":true}}},"required":true},"custom_error_configuration":{"nesting_mode":3,"block":{"attributes":{"custom_error_page_url":{"type":"string","required":true},"id":{"type":"string","computed":true},"status_code":{"type":"string","required":true}}},"optional":true},"frontend_ip_configuration":{"nesting_mode":3,"block":{"attributes":{"id":{"type":"string","computed":true},"name":{"type":"string","required":true},"private_ip_address":{"type":"string","optional":true,"computed":true},"private_ip_address_allocation":{"type":"string","optional":true,"default":"Dynamic"},"private_link_configuration_id":{"type":"string","computed":true},"private_link_configuration_name":{"type":"string","optional":true},"public_ip_address_id":{"type":"string","optional":true},"subnet_id":{"type":"string","optional":true}}},"required":true},"frontend_port":{"nesting_mode":4,"block":{"attributes":{"id":{"type":"string","computed":true},"name":{"type":"string","required":true},"port":{"type":"number","required":true}}},"required":true},"gateway_ip_configuration":{"nesting_mode":3,"block":{"attributes":{"id":{"type":"string","computed":true},"name":{"type":"string","required":true},"subnet_id":{"type":"string","required":true}}},"required":true},"global":{"nesting_mode":3,"block":{"attributes":{"request_buffering_enabled":{"type":"bool","required":true},"response_buffering_enabled":{"type":"bool","required":true}}},"optional":true},"http_listener":{"nesting_mode":4,"block":{"attributes":{"firewall_policy_id":{"type":"string","optional":true},"frontend_ip_configuration_id":{"type":"string","computed":true},"frontend_ip_configuration_name":{"type":"string","required":true},"frontend_port_id":{"type":"string","computed":true},"frontend_port_name":{"type":"string","required":true},"host_name":{"type":"string","optional":true},"host_names":{"type":["set","string"],"optional":true},"id":{"type":"string","computed":true},"name":{"type":"string","required":true},"protocol":{"type":"string","required":true},"require_sni":{"type":"bool","optional":true},"ssl_certificate_id":{"type":"string","computed":true},"ssl_certificate_name":{"type":"string","optional":true},"ssl_profile_id":{"type":"string","computed":true},"ssl_profile_name":{"type":"string","optional":true}},"block_types":{"custom_error_configuration":{"nesting_mode":3,"block":{"attributes":{"custom_error_page_url":{"type":"string","required":true},"id":{"type":"string","computed":true},"status_code":{"type":"string","required":true}}},"optional":true}}},"required":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"private_link_configuration":{"nesting_mode":4,"block":{"attributes":{"id":{"type":"string","computed":true},"name":{"type":"string","required":true}},"block_types":{"ip_configuration":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"primary":{"type":"bool","required":true},"private_ip_address":{"type":"string","optional":true,"computed":true},"private_ip_address_allocation":{"type":"string","required":true},"subnet_id":{"type":"string","required":true}}},"required":true}}},"optional":true},"probe":{"nesting_mode":4,"block":{"attributes":{"host":{"type":"string","optional":true},"id":{"type":"string","computed":true},"interval":{"type":"number","required":true},"minimum_servers":{"type":"number","optional":true,"default":0},"name":{"type":"string","required":true},"path":{"type":"string","required":true},"pick_host_name_from_backend_http_settings":{"type":"bool","optional":true,"default":false},"port":{"type":"number","optional":true},"protocol":{"type":"string","required":true},"timeout":{"type":"number","required":true},"unhealthy_threshold":{"type":"number","required":true}},"block_types":{"match":{"nesting_mode":3,"block":{"attributes":{"body":{"type":"string","optional":true},"status_code":{"type":["list","string"],"required":true}}},"optional":true}}},"optional":true},"redirect_configuration":{"nesting_mode":4,"block":{"attributes":{"id":{"type":"string","computed":true},"include_path":{"type":"bool","optional":true,"default":false},"include_query_string":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"redirect_type":{"type":"string","required":true},"target_listener_id":{"type":"string","computed":true},"target_listener_name":{"type":"string","optional":true},"target_url":{"type":"string","optional":true}}},"optional":true},"request_routing_rule":{"nesting_mode":4,"block":{"attributes":{"backend_address_pool_id":{"type":"string","computed":true},"backend_address_pool_name":{"type":"string","optional":true},"backend_http_settings_id":{"type":"string","computed":true},"backend_http_settings_name":{"type":"string","optional":true},"http_listener_id":{"type":"string","computed":true},"http_listener_name":{"type":"string","required":true},"id":{"type":"string","computed":true},"name":{"type":"string","required":true},"priority":{"type":"number","optional":true},"redirect_configuration_id":{"type":"string","computed":true},"redirect_configuration_name":{"type":"string","optional":true},"rewrite_rule_set_id":{"type":"string","computed":true},"rewrite_rule_set_name":{"type":"string","optional":true},"rule_type":{"type":"string","required":true},"url_path_map_id":{"type":"string","computed":true},"url_path_map_name":{"type":"string","optional":true}}},"required":true},"rewrite_rule_set":{"nesting_mode":3,"block":{"attributes":{"id":{"type":"string","computed":true},"name":{"type":"string","required":true}},"block_types":{"rewrite_rule":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"rule_sequence":{"type":"number","required":true}},"block_types":{"condition":{"nesting_mode":3,"block":{"attributes":{"ignore_case":{"type":"bool","optional":true,"default":false},"negate":{"type":"bool","optional":true,"default":false},"pattern":{"type":"string","required":true},"variable":{"type":"string","required":true}}},"optional":true},"request_header_configuration":{"nesting_mode":3,"block":{"attributes":{"header_name":{"type":"string","required":true},"header_value":{"type":"string","required":true}}},"optional":true},"response_header_configuration":{"nesting_mode":3,"block":{"attributes":{"header_name":{"type":"string","required":true},"header_value":{"type":"string","required":true}}},"optional":true},"url":{"nesting_mode":3,"block":{"attributes":{"components":{"type":"string","optional":true},"path":{"type":"string","optional":true},"query_string":{"type":"string","optional":true},"reroute":{"type":"bool","optional":true,"default":false}}},"optional":true}}},"optional":true}}},"optional":true},"sku":{"nesting_mode":3,"block":{"attributes":{"capacity":{"type":"number","optional":true},"name":{"type":"string","required":true},"tier":{"type":"string","required":true}}},"required":true},"ssl_certificate":{"nesting_mode":4,"block":{"attributes":{"data":{"type":"string","optional":true},"id":{"type":"string","computed":true},"key_vault_secret_id":{"type":"string","optional":true},"name":{"type":"string","required":true},"password":{"type":"string","optional":true},"public_cert_data":{"type":"string","computed":true}}},"optional":true},"ssl_policy":{"nesting_mode":3,"block":{"attributes":{"cipher_suites":{"type":["list","string"],"optional":true},"disabled_protocols":{"type":["list","string"],"optional":true},"min_protocol_version":{"type":"string","optional":true},"policy_name":{"type":"string","optional":true},"policy_type":{"type":"string","optional":true}}},"optional":true,"computed":true},"ssl_profile":{"nesting_mode":3,"block":{"attributes":{"id":{"type":"string","computed":true},"name":{"type":"string","required":true},"trusted_client_certificate_names":{"type":["list","string"],"optional":true},"verify_client_cert_issuer_dn":{"type":"bool","optional":true,"default":false},"verify_client_certificate_revocation":{"type":"string","optional":true}},"block_types":{"ssl_policy":{"nesting_mode":3,"block":{"attributes":{"cipher_suites":{"type":["list","string"],"optional":true},"disabled_protocols":{"type":["list","string"],"optional":true},"min_protocol_version":{"type":"string","optional":true},"policy_name":{"type":"string","optional":true},"policy_type":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"trusted_client_certificate":{"nesting_mode":3,"block":{"attributes":{"data":{"type":"string","required":true},"id":{"type":"string","computed":true},"name":{"type":"string","required":true}}},"optional":true},"trusted_root_certificate":{"nesting_mode":3,"block":{"attributes":{"data":{"type":"string","optional":true},"id":{"type":"string","computed":true},"key_vault_secret_id":{"type":"string","optional":true},"name":{"type":"string","required":true}}},"optional":true},"url_path_map":{"nesting_mode":3,"block":{"attributes":{"default_backend_address_pool_id":{"type":"string","computed":true},"default_backend_address_pool_name":{"type":"string","optional":true},"default_backend_http_settings_id":{"type":"string","computed":true},"default_backend_http_settings_name":{"type":"string","optional":true},"default_redirect_configuration_id":{"type":"string","computed":true},"default_redirect_configuration_name":{"type":"string","optional":true},"default_rewrite_rule_set_id":{"type":"string","computed":true},"default_rewrite_rule_set_name":{"type":"string","optional":true},"id":{"type":"string","computed":true},"name":{"type":"string","required":true}},"block_types":{"path_rule":{"nesting_mode":3,"block":{"attributes":{"backend_address_pool_id":{"type":"string","computed":true},"backend_address_pool_name":{"type":"string","optional":true},"backend_http_settings_id":{"type":"string","computed":true},"backend_http_settings_name":{"type":"string","optional":true},"firewall_policy_id":{"type":"string","optional":true},"id":{"type":"string","computed":true},"name":{"type":"string","required":true},"paths":{"type":["list","string"],"required":true},"redirect_configuration_id":{"type":"string","computed":true},"redirect_configuration_name":{"type":"string","optional":true},"rewrite_rule_set_id":{"type":"string","computed":true},"rewrite_rule_set_name":{"type":"string","optional":true}}},"required":true}}},"optional":true},"waf_configuration":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","required":true},"file_upload_limit_mb":{"type":"number","optional":true,"default":100},"firewall_mode":{"type":"string","required":true},"max_request_body_size_kb":{"type":"number","optional":true,"default":128},"request_body_check":{"type":"bool","optional":true,"default":true},"rule_set_type":{"type":"string","optional":true,"default":"OWASP"},"rule_set_version":{"type":"string","required":true}},"block_types":{"disabled_rule_group":{"nesting_mode":3,"block":{"attributes":{"rule_group_name":{"type":"string","required":true},"rules":{"type":["list","number"],"optional":true}}},"optional":true},"exclusion":{"nesting_mode":3,"block":{"attributes":{"match_variable":{"type":"string","required":true},"selector":{"type":"string","optional":true},"selector_match_operator":{"type":"string","optional":true}}},"optional":true}}},"optional":true}}}},"azurerm_application_insights":{"block":{"attributes":{"app_id":{"type":"string","computed":true},"application_type":{"type":"string","required":true},"connection_string":{"type":"string","computed":true},"daily_data_cap_in_gb":{"type":"number","optional":true,"default":100},"daily_data_cap_notifications_disabled":{"type":"bool","optional":true},"disable_ip_masking":{"type":"bool","optional":true,"default":false},"force_customer_storage_for_profiler":{"type":"bool","optional":true,"default":false},"instrumentation_key":{"type":"string","computed":true},"internet_ingestion_enabled":{"type":"bool","optional":true,"default":true},"internet_query_enabled":{"type":"bool","optional":true,"default":true},"local_authentication_disabled":{"type":"bool","optional":true,"default":false},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"retention_in_days":{"type":"number","optional":true,"default":90},"sampling_percentage":{"type":"number","optional":true,"default":100},"tags":{"type":["map","string"],"optional":true},"workspace_id":{"type":"string","optional":true}}}},"azurerm_application_insights_analytics_item":{"block":{"attributes":{"application_insights_id":{"type":"string","required":true},"content":{"type":"string","required":true},"function_alias":{"type":"string","optional":true},"name":{"type":"string","required":true},"scope":{"type":"string","required":true},"time_created":{"type":"string","computed":true},"time_modified":{"type":"string","computed":true},"type":{"type":"string","required":true},"version":{"type":"string","computed":true}}}},"azurerm_application_insights_api_key":{"block":{"attributes":{"api_key":{"type":"string","computed":true},"application_insights_id":{"type":"string","required":true},"name":{"type":"string","required":true},"read_permissions":{"type":["set","string"],"optional":true},"write_permissions":{"type":["set","string"],"optional":true}}}},"azurerm_application_insights_smart_detection_rule":{"block":{"attributes":{"additional_email_recipients":{"type":["set","string"],"optional":true},"application_insights_id":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"send_emails_to_subscription_owners":{"type":"bool","optional":true,"default":true}}}},"azurerm_application_insights_standard_web_test":{"block":{"attributes":{"application_insights_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"enabled":{"type":"bool","optional":true},"frequency":{"type":"number","optional":true,"default":300},"geo_locations":{"type":["list","string"],"required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"retry_enabled":{"type":"bool","optional":true},"synthetic_monitor_id":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true},"timeout":{"type":"number","optional":true,"default":30}},"block_types":{"request":{"nesting_mode":3,"block":{"attributes":{"body":{"type":"string","optional":true},"follow_redirects_enabled":{"type":"bool","optional":true,"default":true},"http_verb":{"type":"string","optional":true,"default":"GET"},"parse_dependent_requests_enabled":{"type":"bool","optional":true,"default":true},"url":{"type":"string","required":true}},"block_types":{"header":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"required":true},"validation_rules":{"nesting_mode":3,"block":{"attributes":{"expected_status_code":{"type":"number","optional":true,"default":200},"ssl_cert_remaining_lifetime":{"type":"number","optional":true},"ssl_check_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"content":{"nesting_mode":3,"block":{"attributes":{"content_match":{"type":"string","required":true},"ignore_case":{"type":"bool","optional":true,"default":false},"pass_if_text_found":{"type":"bool","optional":true,"default":false}}},"optional":true}}},"optional":true}}}},"azurerm_application_insights_web_test":{"block":{"attributes":{"application_insights_id":{"type":"string","required":true},"configuration":{"type":"string","required":true},"description":{"type":"string","optional":true},"enabled":{"type":"bool","optional":true},"frequency":{"type":"number","optional":true,"default":300},"geo_locations":{"type":["list","string"],"required":true},"kind":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"retry_enabled":{"type":"bool","optional":true},"synthetic_monitor_id":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true},"timeout":{"type":"number","optional":true,"default":30}}}},"azurerm_application_insights_workbook":{"block":{"attributes":{"category":{"type":"string","optional":true,"default":"workbook"},"data_json":{"type":"string","required":true},"description":{"type":"string","optional":true},"display_name":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"source_id":{"type":"string","optional":true,"default":"azure monitor"},"storage_container_id":{"type":"string","optional":true,"required_with":["identity"]},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_application_insights_workbook_template":{"block":{"attributes":{"author":{"type":"string","optional":true},"localized":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"priority":{"type":"number","optional":true,"default":0},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"template_data":{"type":"string","required":true}},"block_types":{"galleries":{"nesting_mode":3,"block":{"attributes":{"category":{"type":"string","required":true},"name":{"type":"string","required":true},"order":{"type":"number","optional":true,"default":0},"resource_type":{"type":"string","optional":true,"default":"Azure Monitor"},"type":{"type":"string","optional":true,"default":"workbook"}}},"required":true}}}},"azurerm_application_load_balancer":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"primary_configuration_endpoint":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_application_load_balancer_frontend":{"block":{"attributes":{"application_load_balancer_id":{"type":"string","required":true},"fully_qualified_domain_name":{"type":"string","computed":true},"name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_application_load_balancer_subnet_association":{"block":{"attributes":{"application_load_balancer_id":{"type":"string","required":true},"name":{"type":"string","required":true},"subnet_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_application_security_group":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_arc_kubernetes_cluster":{"block":{"attributes":{"agent_public_key_certificate":{"type":"string","required":true},"agent_version":{"type":"string","computed":true},"distribution":{"type":"string","computed":true},"infrastructure":{"type":"string","computed":true},"kubernetes_version":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"offering":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"total_core_count":{"type":"number","computed":true},"total_node_count":{"type":"number","computed":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"required":true}}}},"azurerm_arc_kubernetes_cluster_extension":{"block":{"attributes":{"cluster_id":{"type":"string","required":true},"configuration_protected_settings":{"type":["map","string"],"optional":true},"configuration_settings":{"type":["map","string"],"optional":true},"current_version":{"type":"string","computed":true},"extension_type":{"type":"string","required":true},"name":{"type":"string","required":true},"release_namespace":{"type":"string","optional":true,"computed":true,"conflicts_with":["target_namespace"]},"release_train":{"type":"string","optional":true,"computed":true},"target_namespace":{"type":"string","optional":true,"computed":true,"conflicts_with":["release_namespace"]},"version":{"type":"string","optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"required":true}}}},"azurerm_arc_kubernetes_flux_configuration":{"block":{"attributes":{"cluster_id":{"type":"string","required":true},"continuous_reconciliation_enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"namespace":{"type":"string","required":true},"scope":{"type":"string","optional":true,"default":"namespace"}},"block_types":{"blob_storage":{"nesting_mode":3,"block":{"attributes":{"account_key":{"type":"string","optional":true,"exactly_one_of":["blob_storage.0.account_key","blob_storage.0.local_auth_reference","blob_storage.0.sas_token","blob_storage.0.service_principal"]},"container_id":{"type":"string","required":true},"local_auth_reference":{"type":"string","optional":true,"exactly_one_of":["blob_storage.0.account_key","blob_storage.0.local_auth_reference","blob_storage.0.sas_token","blob_storage.0.service_principal"]},"sas_token":{"type":"string","optional":true,"exactly_one_of":["blob_storage.0.account_key","blob_storage.0.local_auth_reference","blob_storage.0.sas_token","blob_storage.0.service_principal"]},"sync_interval_in_seconds":{"type":"number","optional":true,"default":600},"timeout_in_seconds":{"type":"number","optional":true,"default":600}},"block_types":{"service_principal":{"nesting_mode":3,"block":{"attributes":{"client_certificate_base64":{"type":"string","optional":true,"exactly_one_of":["blob_storage.0.service_principal.0.client_certificate_base64","blob_storage.0.service_principal.0.client_secret"]},"client_certificate_password":{"type":"string","optional":true,"required_with":["blob_storage.0.service_principal.0.client_certificate_base64"]},"client_certificate_send_chain":{"type":"bool","optional":true,"default":false},"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["blob_storage.0.service_principal.0.client_certificate_base64","blob_storage.0.service_principal.0.client_secret"]},"tenant_id":{"type":"string","required":true}}},"optional":true,"exactly_one_of":["blob_storage.0.account_key","blob_storage.0.local_auth_reference","blob_storage.0.sas_token","blob_storage.0.service_principal"]}}},"optional":true,"exactly_one_of":["blob_storage","bucket","git_repository"]},"bucket":{"nesting_mode":3,"block":{"attributes":{"access_key":{"type":"string","optional":true,"exactly_one_of":["bucket.0.access_key","bucket.0.local_auth_reference"],"required_with":["bucket.0.secret_key_base64"]},"bucket_name":{"type":"string","required":true},"local_auth_reference":{"type":"string","optional":true,"exactly_one_of":["bucket.0.access_key","bucket.0.local_auth_reference"]},"secret_key_base64":{"type":"string","optional":true,"required_with":["bucket.0.access_key"]},"sync_interval_in_seconds":{"type":"number","optional":true,"default":600},"timeout_in_seconds":{"type":"number","optional":true,"default":600},"tls_enabled":{"type":"bool","optional":true,"default":true},"url":{"type":"string","required":true}}},"optional":true,"exactly_one_of":["blob_storage","bucket","git_repository"]},"git_repository":{"nesting_mode":3,"block":{"attributes":{"https_ca_cert_base64":{"type":"string","optional":true,"required_with":["git_repository.0.https_user"]},"https_key_base64":{"type":"string","optional":true,"required_with":["git_repository.0.https_user"]},"https_user":{"type":"string","optional":true,"conflicts_with":["git_repository.0.local_auth_reference","git_repository.0.ssh_private_key_base64","git_repository.0.ssh_known_hosts_base64"],"required_with":["git_repository.0.https_key_base64"]},"local_auth_reference":{"type":"string","optional":true,"conflicts_with":["git_repository.0.https_user","git_repository.0.ssh_private_key_base64","git_repository.0.ssh_known_hosts_base64"]},"reference_type":{"type":"string","required":true},"reference_value":{"type":"string","required":true},"ssh_known_hosts_base64":{"type":"string","optional":true,"conflicts_with":["git_repository.0.https_user","git_repository.0.local_auth_reference"]},"ssh_private_key_base64":{"type":"string","optional":true,"conflicts_with":["git_repository.0.https_user","git_repository.0.local_auth_reference"]},"sync_interval_in_seconds":{"type":"number","optional":true,"default":600},"timeout_in_seconds":{"type":"number","optional":true,"default":600},"url":{"type":"string","required":true}}},"optional":true,"exactly_one_of":["blob_storage","bucket","git_repository"]},"kustomizations":{"nesting_mode":4,"block":{"attributes":{"depends_on":{"type":["list","string"],"optional":true},"garbage_collection_enabled":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"path":{"type":"string","optional":true},"recreating_enabled":{"type":"bool","optional":true,"default":false},"retry_interval_in_seconds":{"type":"number","optional":true,"default":600},"sync_interval_in_seconds":{"type":"number","optional":true,"default":600},"timeout_in_seconds":{"type":"number","optional":true,"default":600}}},"required":true}}}},"azurerm_arc_machine":{"block":{"attributes":{"kind":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_arc_machine_automanage_configuration_assignment":{"block":{"attributes":{"arc_machine_id":{"type":"string","required":true},"configuration_id":{"type":"string","required":true}}}},"azurerm_arc_machine_extension":{"block":{"attributes":{"arc_machine_id":{"type":"string","required":true},"automatic_upgrade_enabled":{"type":"bool","optional":true,"default":true},"force_update_tag":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"protected_settings":{"type":"string","optional":true},"publisher":{"type":"string","required":true},"settings":{"type":"string","optional":true},"tags":{"type":["map","string"],"optional":true},"type":{"type":"string","required":true},"type_handler_version":{"type":"string","optional":true}}}},"azurerm_arc_private_link_scope":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":false},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_arc_resource_bridge_appliance":{"block":{"attributes":{"distro":{"type":"string","required":true},"infrastructure_provider":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"public_key_base64":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"required":true}}}},"azurerm_attestation_provider":{"block":{"attributes":{"attestation_uri":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"open_enclave_policy_base64":{"type":"string","optional":true},"policy_signing_certificate_data":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"sev_snp_policy_base64":{"type":"string","optional":true},"sgx_enclave_policy_base64":{"type":"string","optional":true},"tags":{"type":["map","string"],"optional":true},"tpm_policy_base64":{"type":"string","optional":true},"trust_model":{"type":"string","computed":true}}}},"azurerm_automanage_configuration":{"block":{"attributes":{"automation_account_enabled":{"type":"bool","optional":true,"default":false},"boot_diagnostics_enabled":{"type":"bool","optional":true,"default":false},"defender_for_cloud_enabled":{"type":"bool","optional":true,"default":false},"guest_configuration_enabled":{"type":"bool","optional":true,"default":false},"location":{"type":"string","required":true},"log_analytics_enabled":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"status_change_alert_enabled":{"type":"bool","optional":true,"default":false},"tags":{"type":["map","string"],"optional":true}},"block_types":{"antimalware":{"nesting_mode":3,"block":{"attributes":{"real_time_protection_enabled":{"type":"bool","optional":true,"default":false},"scheduled_scan_day":{"type":"number","optional":true,"default":8},"scheduled_scan_enabled":{"type":"bool","optional":true,"default":false},"scheduled_scan_time_in_minutes":{"type":"number","optional":true,"default":0},"scheduled_scan_type":{"type":"string","optional":true,"default":"Quick"}},"block_types":{"exclusions":{"nesting_mode":3,"block":{"attributes":{"extensions":{"type":"string","optional":true},"paths":{"type":"string","optional":true},"processes":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"azure_security_baseline":{"nesting_mode":3,"block":{"attributes":{"assignment_type":{"type":"string","optional":true,"default":"ApplyAndAutoCorrect"}}},"optional":true},"backup":{"nesting_mode":3,"block":{"attributes":{"instant_rp_retention_range_in_days":{"type":"number","optional":true,"default":5},"policy_name":{"type":"string","optional":true},"time_zone":{"type":"string","optional":true,"default":"UTC"}},"block_types":{"retention_policy":{"nesting_mode":3,"block":{"attributes":{"retention_policy_type":{"type":"string","optional":true,"default":"LongTermRetentionPolicy"}},"block_types":{"daily_schedule":{"nesting_mode":3,"block":{"attributes":{"retention_times":{"type":["list","string"],"optional":true}},"block_types":{"retention_duration":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","optional":true},"duration_type":{"type":"string","optional":true,"default":"Days"}}},"optional":true}}},"optional":true},"weekly_schedule":{"nesting_mode":3,"block":{"attributes":{"retention_times":{"type":["list","string"],"optional":true}},"block_types":{"retention_duration":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","optional":true},"duration_type":{"type":"string","optional":true,"default":"Weeks"}}},"optional":true}}},"optional":true}}},"optional":true},"schedule_policy":{"nesting_mode":3,"block":{"attributes":{"schedule_policy_type":{"type":"string","optional":true,"default":"SimpleSchedulePolicy"},"schedule_run_days":{"type":["list","string"],"optional":true},"schedule_run_frequency":{"type":"string","optional":true,"default":"Daily"},"schedule_run_times":{"type":["list","string"],"optional":true}}},"optional":true}}},"optional":true}}}},"azurerm_automation_account":{"block":{"attributes":{"dsc_primary_access_key":{"type":"string","computed":true},"dsc_secondary_access_key":{"type":"string","computed":true},"dsc_server_endpoint":{"type":"string","computed":true},"hybrid_service_url":{"type":"string","computed":true},"local_authentication_enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"private_endpoint_connection":{"type":["list",["object",{"id":"string","name":"string"}]],"computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"encryption":{"nesting_mode":3,"block":{"attributes":{"key_source":{"type":"string","optional":true},"key_vault_key_id":{"type":"string","required":true},"user_assigned_identity_id":{"type":"string","optional":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_automation_certificate":{"block":{"attributes":{"automation_account_name":{"type":"string","required":true},"base64":{"type":"string","required":true},"description":{"type":"string","optional":true},"exportable":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"thumbprint":{"type":"string","computed":true}}}},"azurerm_automation_connection":{"block":{"attributes":{"automation_account_name":{"type":"string","required":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"type":{"type":"string","required":true},"values":{"type":["map","string"],"required":true}}}},"azurerm_automation_connection_certificate":{"block":{"attributes":{"automation_account_name":{"type":"string","required":true},"automation_certificate_name":{"type":"string","required":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"subscription_id":{"type":"string","required":true}}}},"azurerm_automation_connection_classic_certificate":{"block":{"attributes":{"automation_account_name":{"type":"string","required":true},"certificate_asset_name":{"type":"string","required":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"subscription_id":{"type":"string","required":true},"subscription_name":{"type":"string","required":true}}}},"azurerm_automation_connection_service_principal":{"block":{"attributes":{"application_id":{"type":"string","required":true},"automation_account_name":{"type":"string","required":true},"certificate_thumbprint":{"type":"string","required":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"subscription_id":{"type":"string","required":true},"tenant_id":{"type":"string","required":true}}}},"azurerm_automation_connection_type":{"block":{"attributes":{"automation_account_name":{"type":"string","required":true},"is_global":{"type":"bool","optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}},"block_types":{"field":{"nesting_mode":3,"block":{"attributes":{"is_encrypted":{"type":"bool","optional":true},"is_optional":{"type":"bool","optional":true},"name":{"type":"string","required":true},"type":{"type":"string","required":true}}},"required":true}}}},"azurerm_automation_credential":{"block":{"attributes":{"automation_account_name":{"type":"string","required":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"password":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"username":{"type":"string","required":true}}}},"azurerm_automation_dsc_configuration":{"block":{"attributes":{"automation_account_name":{"type":"string","required":true},"content_embedded":{"type":"string","required":true},"description":{"type":"string","optional":true},"location":{"type":"string","required":true},"log_verbose":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"state":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_automation_dsc_nodeconfiguration":{"block":{"attributes":{"automation_account_name":{"type":"string","required":true},"configuration_name":{"type":"string","computed":true},"content_embedded":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_automation_hybrid_runbook_worker":{"block":{"attributes":{"automation_account_name":{"type":"string","required":true},"ip":{"type":"string","computed":true},"last_seen_date_time":{"type":"string","computed":true},"registration_date_time":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"vm_resource_id":{"type":"string","required":true},"worker_group_name":{"type":"string","required":true},"worker_id":{"type":"string","required":true},"worker_name":{"type":"string","computed":true},"worker_type":{"type":"string","computed":true}}}},"azurerm_automation_hybrid_runbook_worker_group":{"block":{"attributes":{"automation_account_name":{"type":"string","required":true},"credential_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_automation_job_schedule":{"block":{"attributes":{"automation_account_name":{"type":"string","required":true},"job_schedule_id":{"type":"string","optional":true,"computed":true},"parameters":{"type":["map","string"],"optional":true},"resource_group_name":{"type":"string","required":true},"resource_manager_id":{"type":"string","computed":true},"run_on":{"type":"string","optional":true},"runbook_name":{"type":"string","required":true},"schedule_name":{"type":"string","required":true}}}},"azurerm_automation_module":{"block":{"attributes":{"automation_account_name":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}},"block_types":{"module_link":{"nesting_mode":3,"block":{"attributes":{"uri":{"type":"string","required":true}},"block_types":{"hash":{"nesting_mode":3,"block":{"attributes":{"algorithm":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"required":true}}}},"azurerm_automation_powershell72_module":{"block":{"attributes":{"automation_account_id":{"type":"string","required":true},"name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"module_link":{"nesting_mode":3,"block":{"attributes":{"uri":{"type":"string","required":true}},"block_types":{"hash":{"nesting_mode":3,"block":{"attributes":{"algorithm":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"required":true}}}},"azurerm_automation_python3_package":{"block":{"attributes":{"automation_account_name":{"type":"string","required":true},"content_uri":{"type":"string","required":true},"content_version":{"type":"string","optional":true},"hash_algorithm":{"type":"string","optional":true,"required_with":["hash_value"]},"hash_value":{"type":"string","optional":true,"required_with":["hash_algorithm"]},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_automation_runbook":{"block":{"attributes":{"automation_account_name":{"type":"string","required":true},"content":{"type":"string","optional":true,"computed":true,"at_least_one_of":["content","publish_content_link","draft"]},"description":{"type":"string","optional":true},"job_schedule":{"type":["set",["object",{"job_schedule_id":"string","parameters":["map","string"],"run_on":"string","schedule_name":"string"}]],"optional":true,"computed":true},"location":{"type":"string","required":true},"log_activity_trace_level":{"type":"number","optional":true},"log_progress":{"type":"bool","required":true},"log_verbose":{"type":"bool","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"runbook_type":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"draft":{"nesting_mode":3,"block":{"attributes":{"creation_time":{"type":"string","computed":true},"edit_mode_enabled":{"type":"bool","optional":true},"last_modified_time":{"type":"string","computed":true},"output_types":{"type":["list","string"],"optional":true}},"block_types":{"content_link":{"nesting_mode":3,"block":{"attributes":{"uri":{"type":"string","required":true},"version":{"type":"string","optional":true}},"block_types":{"hash":{"nesting_mode":3,"block":{"attributes":{"algorithm":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true},"parameters":{"nesting_mode":3,"block":{"attributes":{"default_value":{"type":"string","optional":true},"key":{"type":"string","required":true},"mandatory":{"type":"bool","optional":true,"default":false},"position":{"type":"number","optional":true},"type":{"type":"string","required":true}}},"optional":true}}},"optional":true},"publish_content_link":{"nesting_mode":3,"block":{"attributes":{"uri":{"type":"string","required":true},"version":{"type":"string","optional":true}},"block_types":{"hash":{"nesting_mode":3,"block":{"attributes":{"algorithm":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true,"at_least_one_of":["content","publish_content_link","draft"]}}}},"azurerm_automation_schedule":{"block":{"attributes":{"automation_account_name":{"type":"string","required":true},"description":{"type":"string","optional":true},"expiry_time":{"type":"string","optional":true,"computed":true},"frequency":{"type":"string","required":true},"interval":{"type":"number","optional":true,"computed":true},"month_days":{"type":["set","number"],"optional":true,"conflicts_with":["week_days","monthly_occurrence"]},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"start_time":{"type":"string","optional":true,"computed":true},"timezone":{"type":"string","optional":true,"default":"Etc/UTC"},"week_days":{"type":["set","string"],"optional":true,"conflicts_with":["month_days","monthly_occurrence"]}},"block_types":{"monthly_occurrence":{"nesting_mode":3,"block":{"attributes":{"day":{"type":"string","required":true},"occurrence":{"type":"number","required":true}}},"optional":true,"conflicts_with":["week_days","month_days"]}}}},"azurerm_automation_software_update_configuration":{"block":{"attributes":{"automation_account_id":{"type":"string","required":true},"duration":{"type":"string","optional":true,"default":"PT2H"},"error_code":{"type":"string","computed":true},"error_message":{"type":"string","computed":true},"name":{"type":"string","required":true},"non_azure_computer_names":{"type":["list","string"],"optional":true},"virtual_machine_ids":{"type":["list","string"],"optional":true}},"block_types":{"linux":{"nesting_mode":3,"block":{"attributes":{"classifications_included":{"type":["list","string"],"required":true},"excluded_packages":{"type":["list","string"],"optional":true},"included_packages":{"type":["list","string"],"optional":true},"reboot":{"type":"string","optional":true,"default":"IfRequired"}}},"optional":true,"exactly_one_of":["windows","linux"]},"post_task":{"nesting_mode":3,"block":{"attributes":{"parameters":{"type":["map","string"],"optional":true},"source":{"type":"string","optional":true}}},"optional":true},"pre_task":{"nesting_mode":3,"block":{"attributes":{"parameters":{"type":["map","string"],"optional":true},"source":{"type":"string","optional":true}}},"optional":true},"schedule":{"nesting_mode":3,"block":{"attributes":{"advanced_month_days":{"type":["list","number"],"optional":true},"advanced_week_days":{"type":["list","string"],"optional":true},"creation_time":{"type":"string","computed":true},"description":{"type":"string","optional":true},"expiry_time":{"type":"string","optional":true,"computed":true},"expiry_time_offset_minutes":{"type":"number","optional":true},"frequency":{"type":"string","required":true},"interval":{"type":"number","optional":true},"is_enabled":{"type":"bool","optional":true,"default":true},"last_modified_time":{"type":"string","computed":true},"next_run":{"type":"string","optional":true,"computed":true},"next_run_offset_minutes":{"type":"number","optional":true},"start_time":{"type":"string","optional":true,"computed":true},"start_time_offset_minutes":{"type":"number","optional":true},"time_zone":{"type":"string","optional":true,"default":"Etc/UTC"}},"block_types":{"monthly_occurrence":{"nesting_mode":3,"block":{"attributes":{"day":{"type":"string","required":true},"occurrence":{"type":"number","required":true}}},"optional":true}}},"required":true},"target":{"nesting_mode":3,"block":{"block_types":{"azure_query":{"nesting_mode":3,"block":{"attributes":{"locations":{"type":["list","string"],"optional":true},"scope":{"type":["list","string"],"optional":true},"tag_filter":{"type":"string","optional":true}},"block_types":{"tags":{"nesting_mode":3,"block":{"attributes":{"tag":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true}}},"optional":true},"non_azure_query":{"nesting_mode":3,"block":{"attributes":{"function_alias":{"type":"string","optional":true},"workspace_id":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"windows":{"nesting_mode":3,"block":{"attributes":{"classifications_included":{"type":["list","string"],"required":true},"excluded_knowledge_base_numbers":{"type":["list","string"],"optional":true},"included_knowledge_base_numbers":{"type":["list","string"],"optional":true},"reboot":{"type":"string","optional":true,"default":"IfRequired"}}},"optional":true,"exactly_one_of":["windows","linux"]}}}},"azurerm_automation_source_control":{"block":{"attributes":{"automatic_sync":{"type":"bool","optional":true,"default":false},"automation_account_id":{"type":"string","required":true},"branch":{"type":"string","optional":true},"description":{"type":"string","optional":true},"folder_path":{"type":"string","required":true},"name":{"type":"string","required":true},"publish_runbook_enabled":{"type":"bool","optional":true,"default":true},"repository_url":{"type":"string","required":true},"source_control_type":{"type":"string","required":true}},"block_types":{"security":{"nesting_mode":3,"block":{"attributes":{"refresh_token":{"type":"string","optional":true},"token":{"type":"string","required":true},"token_type":{"type":"string","required":true}}},"required":true}}}},"azurerm_automation_variable_bool":{"block":{"attributes":{"automation_account_name":{"type":"string","required":true},"description":{"type":"string","optional":true},"encrypted":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"value":{"type":"bool","optional":true}}}},"azurerm_automation_variable_datetime":{"block":{"attributes":{"automation_account_name":{"type":"string","required":true},"description":{"type":"string","optional":true},"encrypted":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"value":{"type":"string","optional":true}}}},"azurerm_automation_variable_int":{"block":{"attributes":{"automation_account_name":{"type":"string","required":true},"description":{"type":"string","optional":true},"encrypted":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"value":{"type":"number","optional":true}}}},"azurerm_automation_variable_object":{"block":{"attributes":{"automation_account_name":{"type":"string","required":true},"description":{"type":"string","optional":true},"encrypted":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"value":{"type":"string","optional":true}}}},"azurerm_automation_variable_string":{"block":{"attributes":{"automation_account_name":{"type":"string","required":true},"description":{"type":"string","optional":true},"encrypted":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"value":{"type":"string","optional":true}}}},"azurerm_automation_watcher":{"block":{"attributes":{"automation_account_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"etag":{"type":"string","optional":true},"execution_frequency_in_seconds":{"type":"number","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"script_name":{"type":"string","required":true},"script_parameters":{"type":["map","string"],"optional":true},"script_run_on":{"type":"string","required":true},"status":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_automation_webhook":{"block":{"attributes":{"automation_account_name":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":true},"expiry_time":{"type":"string","required":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"resource_group_name":{"type":"string","required":true},"run_on_worker_group":{"type":"string","optional":true},"runbook_name":{"type":"string","required":true},"uri":{"type":"string","optional":true,"computed":true}}}},"azurerm_availability_set":{"block":{"attributes":{"location":{"type":"string","required":true},"managed":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"platform_fault_domain_count":{"type":"number","optional":true,"default":3},"platform_update_domain_count":{"type":"number","optional":true,"default":5},"proximity_placement_group_id":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_backup_container_storage_account":{"block":{"attributes":{"recovery_vault_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"storage_account_id":{"type":"string","required":true}}}},"azurerm_backup_policy_file_share":{"block":{"attributes":{"name":{"type":"string","required":true},"recovery_vault_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"timezone":{"type":"string","optional":true,"default":"UTC"}},"block_types":{"backup":{"nesting_mode":3,"block":{"attributes":{"frequency":{"type":"string","required":true},"time":{"type":"string","optional":true,"conflicts_with":["backup.0.hourly"],"at_least_one_of":["backup.0.time","backup.0.hourly"]}},"block_types":{"hourly":{"nesting_mode":3,"block":{"attributes":{"interval":{"type":"number","required":true},"start_time":{"type":"string","required":true},"window_duration":{"type":"number","required":true}}},"optional":true,"conflicts_with":["backup.0.time"],"at_least_one_of":["backup.0.time","backup.0.hourly"]}}},"required":true},"retention_daily":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true}}},"required":true},"retention_monthly":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true},"days":{"type":["set","number"],"optional":true,"conflicts_with":["retention_monthly.0.weeks","retention_monthly.0.weekdays"],"at_least_one_of":["retention_monthly.0.weekdays","retention_monthly.0.weeks","retention_monthly.0.days","retention_monthly.0.include_last_days"]},"include_last_days":{"type":"bool","optional":true,"default":false,"conflicts_with":["retention_monthly.0.weeks","retention_monthly.0.weekdays"],"at_least_one_of":["retention_monthly.0.weekdays","retention_monthly.0.weeks","retention_monthly.0.days","retention_monthly.0.include_last_days"]},"weekdays":{"type":["set","string"],"optional":true,"conflicts_with":["retention_monthly.0.days","retention_monthly.0.include_last_days"],"at_least_one_of":["retention_monthly.0.weekdays","retention_monthly.0.weeks","retention_monthly.0.days","retention_monthly.0.include_last_days"],"required_with":["retention_monthly.0.weeks"]},"weeks":{"type":["set","string"],"optional":true,"conflicts_with":["retention_monthly.0.days","retention_monthly.0.include_last_days"],"at_least_one_of":["retention_monthly.0.weekdays","retention_monthly.0.weeks","retention_monthly.0.days","retention_monthly.0.include_last_days"],"required_with":["retention_monthly.0.weekdays"]}}},"optional":true},"retention_weekly":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true},"weekdays":{"type":["set","string"],"required":true}}},"optional":true},"retention_yearly":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true},"days":{"type":["set","number"],"optional":true,"conflicts_with":["retention_yearly.0.weeks","retention_yearly.0.weekdays"],"at_least_one_of":["retention_yearly.0.weeks","retention_yearly.0.weekdays","retention_yearly.0.days","retention_yearly.0.include_last_days"]},"include_last_days":{"type":"bool","optional":true,"default":false,"conflicts_with":["retention_yearly.0.weeks","retention_yearly.0.weekdays"],"at_least_one_of":["retention_yearly.0.weeks","retention_yearly.0.weekdays","retention_yearly.0.days","retention_yearly.0.include_last_days"]},"months":{"type":["set","string"],"required":true},"weekdays":{"type":["set","string"],"optional":true,"conflicts_with":["retention_yearly.0.days","retention_yearly.0.include_last_days"],"at_least_one_of":["retention_yearly.0.weeks","retention_yearly.0.weekdays","retention_yearly.0.days","retention_yearly.0.include_last_days"],"required_with":["retention_yearly.0.weeks"]},"weeks":{"type":["set","string"],"optional":true,"conflicts_with":["retention_yearly.0.days","retention_yearly.0.include_last_days"],"at_least_one_of":["retention_yearly.0.weeks","retention_yearly.0.weekdays","retention_yearly.0.days","retention_yearly.0.include_last_days"],"required_with":["retention_yearly.0.weekdays"]}}},"optional":true}}}},"azurerm_backup_policy_vm":{"block":{"attributes":{"instant_restore_retention_days":{"type":"number","optional":true,"computed":true},"name":{"type":"string","required":true},"policy_type":{"type":"string","optional":true,"default":"V1"},"recovery_vault_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"timezone":{"type":"string","optional":true,"default":"UTC"}},"block_types":{"backup":{"nesting_mode":3,"block":{"attributes":{"frequency":{"type":"string","required":true},"hour_duration":{"type":"number","optional":true},"hour_interval":{"type":"number","optional":true},"time":{"type":"string","required":true},"weekdays":{"type":["set","string"],"optional":true}}},"required":true},"instant_restore_resource_group":{"nesting_mode":3,"block":{"attributes":{"prefix":{"type":"string","required":true},"suffix":{"type":"string","optional":true}}},"optional":true},"retention_daily":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true}}},"optional":true},"retention_monthly":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true},"days":{"type":["set","number"],"optional":true,"conflicts_with":["retention_monthly.0.weeks","retention_monthly.0.weekdays"],"at_least_one_of":["retention_monthly.0.weekdays","retention_monthly.0.weeks","retention_monthly.0.days","retention_monthly.0.include_last_days"]},"include_last_days":{"type":"bool","optional":true,"default":false,"conflicts_with":["retention_monthly.0.weeks","retention_monthly.0.weekdays"],"at_least_one_of":["retention_monthly.0.weekdays","retention_monthly.0.weeks","retention_monthly.0.days","retention_monthly.0.include_last_days"]},"weekdays":{"type":["set","string"],"optional":true,"conflicts_with":["retention_monthly.0.days","retention_monthly.0.include_last_days"],"at_least_one_of":["retention_monthly.0.weekdays","retention_monthly.0.weeks","retention_monthly.0.days","retention_monthly.0.include_last_days"],"required_with":["retention_monthly.0.weeks"]},"weeks":{"type":["set","string"],"optional":true,"conflicts_with":["retention_monthly.0.days","retention_monthly.0.include_last_days"],"at_least_one_of":["retention_monthly.0.weekdays","retention_monthly.0.weeks","retention_monthly.0.days","retention_monthly.0.include_last_days"],"required_with":["retention_monthly.0.weekdays"]}}},"optional":true},"retention_weekly":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true},"weekdays":{"type":["set","string"],"required":true}}},"optional":true},"retention_yearly":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true},"days":{"type":["set","number"],"optional":true,"conflicts_with":["retention_yearly.0.weeks","retention_yearly.0.weekdays"],"at_least_one_of":["retention_yearly.0.weeks","retention_yearly.0.weekdays","retention_yearly.0.days","retention_yearly.0.include_last_days"]},"include_last_days":{"type":"bool","optional":true,"default":false,"conflicts_with":["retention_yearly.0.weeks","retention_yearly.0.weekdays"],"at_least_one_of":["retention_yearly.0.weeks","retention_yearly.0.weekdays","retention_yearly.0.days","retention_yearly.0.include_last_days"]},"months":{"type":["set","string"],"required":true},"weekdays":{"type":["set","string"],"optional":true,"conflicts_with":["retention_yearly.0.days","retention_yearly.0.include_last_days"],"at_least_one_of":["retention_yearly.0.weeks","retention_yearly.0.weekdays","retention_yearly.0.days","retention_yearly.0.include_last_days"],"required_with":["retention_yearly.0.weeks"]},"weeks":{"type":["set","string"],"optional":true,"conflicts_with":["retention_yearly.0.days","retention_yearly.0.include_last_days"],"at_least_one_of":["retention_yearly.0.weeks","retention_yearly.0.weekdays","retention_yearly.0.days","retention_yearly.0.include_last_days"],"required_with":["retention_yearly.0.weekdays"]}}},"optional":true},"tiering_policy":{"nesting_mode":3,"block":{"block_types":{"archived_restore_point":{"nesting_mode":3,"block":{"attributes":{"duration":{"type":"number","optional":true},"duration_type":{"type":"string","optional":true},"mode":{"type":"string","required":true}}},"required":true}}},"optional":true}}}},"azurerm_backup_policy_vm_workload":{"block":{"attributes":{"name":{"type":"string","required":true},"recovery_vault_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"workload_type":{"type":"string","required":true}},"block_types":{"protection_policy":{"nesting_mode":4,"block":{"attributes":{"policy_type":{"type":"string","required":true}},"block_types":{"backup":{"nesting_mode":3,"block":{"attributes":{"frequency":{"type":"string","optional":true},"frequency_in_minutes":{"type":"number","optional":true},"time":{"type":"string","optional":true},"weekdays":{"type":["set","string"],"optional":true}}},"required":true},"retention_daily":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true}}},"optional":true},"retention_monthly":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true},"format_type":{"type":"string","required":true},"monthdays":{"type":["set","number"],"optional":true},"weekdays":{"type":["set","string"],"optional":true},"weeks":{"type":["set","string"],"optional":true}}},"optional":true},"retention_weekly":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true},"weekdays":{"type":["set","string"],"required":true}}},"optional":true},"retention_yearly":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true},"format_type":{"type":"string","required":true},"monthdays":{"type":["set","number"],"optional":true},"months":{"type":["set","string"],"required":true},"weekdays":{"type":["set","string"],"optional":true},"weeks":{"type":["set","string"],"optional":true}}},"optional":true},"simple_retention":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true}}},"optional":true}}},"required":true},"settings":{"nesting_mode":3,"block":{"attributes":{"compression_enabled":{"type":"bool","optional":true,"default":false},"time_zone":{"type":"string","required":true}}},"required":true}}}},"azurerm_backup_protected_file_share":{"block":{"attributes":{"backup_policy_id":{"type":"string","required":true},"recovery_vault_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"source_file_share_name":{"type":"string","required":true},"source_storage_account_id":{"type":"string","required":true}}}},"azurerm_backup_protected_vm":{"block":{"attributes":{"backup_policy_id":{"type":"string","optional":true},"exclude_disk_luns":{"type":["set","number"],"optional":true,"conflicts_with":["include_disk_luns"]},"include_disk_luns":{"type":["set","number"],"optional":true,"conflicts_with":["exclude_disk_luns"]},"protection_state":{"type":"string","optional":true,"computed":true},"recovery_vault_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"source_vm_id":{"type":"string","optional":true,"computed":true}}}},"azurerm_bastion_host":{"block":{"attributes":{"copy_paste_enabled":{"type":"bool","optional":true,"default":true},"dns_name":{"type":"string","computed":true},"file_copy_enabled":{"type":"bool","optional":true,"default":false},"ip_connect_enabled":{"type":"bool","optional":true,"default":false},"kerberos_enabled":{"type":"bool","optional":true,"default":false},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"scale_units":{"type":"number","optional":true,"default":2},"session_recording_enabled":{"type":"bool","optional":true,"default":false},"shareable_link_enabled":{"type":"bool","optional":true,"default":false},"sku":{"type":"string","optional":true,"default":"Basic"},"tags":{"type":["map","string"],"optional":true},"tunneling_enabled":{"type":"bool","optional":true,"default":false},"virtual_network_id":{"type":"string","optional":true}},"block_types":{"ip_configuration":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"public_ip_address_id":{"type":"string","required":true},"subnet_id":{"type":"string","required":true}}},"optional":true}}}},"azurerm_batch_account":{"block":{"attributes":{"account_endpoint":{"type":"string","computed":true},"allowed_authentication_modes":{"type":["set","string"],"optional":true,"computed":true},"encryption":{"type":["list",["object",{"key_vault_key_id":"string"}]],"optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"pool_allocation_mode":{"type":"string","optional":true,"default":"BatchService"},"primary_access_key":{"type":"string","computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"secondary_access_key":{"type":"string","computed":true},"storage_account_authentication_mode":{"type":"string","optional":true,"required_with":["storage_account_id"]},"storage_account_id":{"type":"string","optional":true,"required_with":["storage_account_authentication_mode"]},"storage_account_node_identity":{"type":"string","optional":true,"required_with":["storage_account_id"]},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"key_vault_reference":{"nesting_mode":3,"block":{"attributes":{"id":{"type":"string","required":true},"url":{"type":"string","required":true}}},"optional":true},"network_profile":{"nesting_mode":3,"block":{"block_types":{"account_access":{"nesting_mode":3,"block":{"attributes":{"default_action":{"type":"string","optional":true,"default":"Deny"}},"block_types":{"ip_rule":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"default":"Allow"},"ip_range":{"type":"string","required":true}}},"optional":true}}},"optional":true,"at_least_one_of":["network_profile.0.account_access","network_profile.0.node_management_access"]},"node_management_access":{"nesting_mode":3,"block":{"attributes":{"default_action":{"type":"string","optional":true,"default":"Deny"}},"block_types":{"ip_rule":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"default":"Allow"},"ip_range":{"type":"string","required":true}}},"optional":true}}},"optional":true,"at_least_one_of":["network_profile.0.account_access","network_profile.0.node_management_access"]}}},"optional":true}}}},"azurerm_batch_application":{"block":{"attributes":{"account_name":{"type":"string","required":true},"allow_updates":{"type":"bool","optional":true,"default":true},"default_version":{"type":"string","optional":true},"display_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_batch_certificate":{"block":{"attributes":{"account_name":{"type":"string","required":true},"certificate":{"type":"string","required":true},"format":{"type":"string","required":true},"name":{"type":"string","computed":true},"password":{"type":"string","optional":true},"public_data":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"thumbprint":{"type":"string","required":true},"thumbprint_algorithm":{"type":"string","required":true}}}},"azurerm_batch_job":{"block":{"attributes":{"batch_pool_id":{"type":"string","required":true},"common_environment_properties":{"type":["map","string"],"optional":true},"display_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"priority":{"type":"number","optional":true,"default":0},"task_retry_maximum":{"type":"number","optional":true}}}},"azurerm_batch_pool":{"block":{"attributes":{"account_name":{"type":"string","required":true},"display_name":{"type":"string","optional":true},"inter_node_communication":{"type":"string","optional":true,"default":"Enabled"},"license_type":{"type":"string","optional":true},"max_tasks_per_node":{"type":"number","optional":true,"default":1},"metadata":{"type":["map","string"],"optional":true},"name":{"type":"string","required":true},"node_agent_sku_id":{"type":"string","required":true},"os_disk_placement":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"stop_pending_resize_operation":{"type":"bool","optional":true,"default":false},"target_node_communication_mode":{"type":"string","optional":true},"vm_size":{"type":"string","required":true}},"block_types":{"auto_scale":{"nesting_mode":3,"block":{"attributes":{"evaluation_interval":{"type":"string","optional":true,"default":"PT15M"},"formula":{"type":"string","required":true}}},"optional":true},"certificate":{"nesting_mode":3,"block":{"attributes":{"id":{"type":"string","required":true},"store_location":{"type":"string","required":true},"store_name":{"type":"string","optional":true},"visibility":{"type":["set","string"],"optional":true}}},"optional":true},"container_configuration":{"nesting_mode":3,"block":{"attributes":{"container_image_names":{"type":["set","string"],"optional":true,"at_least_one_of":["container_configuration.0.type","container_configuration.0.container_image_names","container_configuration.0.container_registries"]},"container_registries":{"type":["list",["object",{"password":"string","registry_server":"string","user_assigned_identity_id":"string","user_name":"string"}]],"optional":true,"at_least_one_of":["container_configuration.0.type","container_configuration.0.container_image_names","container_configuration.0.container_registries"]},"type":{"type":"string","optional":true,"at_least_one_of":["container_configuration.0.type","container_configuration.0.container_image_names","container_configuration.0.container_registries"]}}},"optional":true},"data_disks":{"nesting_mode":3,"block":{"attributes":{"caching":{"type":"string","optional":true,"default":"ReadOnly"},"disk_size_gb":{"type":"number","required":true},"lun":{"type":"number","required":true},"storage_account_type":{"type":"string","optional":true,"default":"Standard_LRS"}}},"optional":true},"disk_encryption":{"nesting_mode":3,"block":{"attributes":{"disk_encryption_target":{"type":"string","required":true}}},"optional":true},"extensions":{"nesting_mode":3,"block":{"attributes":{"auto_upgrade_minor_version":{"type":"bool","optional":true},"automatic_upgrade_enabled":{"type":"bool","optional":true},"name":{"type":"string","required":true},"protected_settings":{"type":"string","optional":true},"provision_after_extensions":{"type":["set","string"],"optional":true},"publisher":{"type":"string","required":true},"settings_json":{"type":"string","optional":true},"type":{"type":"string","required":true},"type_handler_version":{"type":"string","optional":true}}},"optional":true},"fixed_scale":{"nesting_mode":3,"block":{"attributes":{"node_deallocation_method":{"type":"string","optional":true},"resize_timeout":{"type":"string","optional":true,"default":"PT15M"},"target_dedicated_nodes":{"type":"number","optional":true,"default":1},"target_low_priority_nodes":{"type":"number","optional":true,"default":0}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"required":true},"type":{"type":"string","required":true}}},"optional":true},"mount":{"nesting_mode":3,"block":{"block_types":{"azure_blob_file_system":{"nesting_mode":3,"block":{"attributes":{"account_key":{"type":"string","optional":true},"account_name":{"type":"string","required":true},"blobfuse_options":{"type":"string","optional":true},"container_name":{"type":"string","required":true},"identity_id":{"type":"string","optional":true},"relative_mount_path":{"type":"string","required":true},"sas_key":{"type":"string","optional":true}}},"optional":true},"azure_file_share":{"nesting_mode":3,"block":{"attributes":{"account_key":{"type":"string","required":true},"account_name":{"type":"string","required":true},"azure_file_url":{"type":"string","required":true},"mount_options":{"type":"string","optional":true},"relative_mount_path":{"type":"string","required":true}}},"optional":true},"cifs_mount":{"nesting_mode":3,"block":{"attributes":{"mount_options":{"type":"string","optional":true},"password":{"type":"string","required":true},"relative_mount_path":{"type":"string","required":true},"source":{"type":"string","required":true},"user_name":{"type":"string","required":true}}},"optional":true},"nfs_mount":{"nesting_mode":3,"block":{"attributes":{"mount_options":{"type":"string","optional":true},"relative_mount_path":{"type":"string","required":true},"source":{"type":"string","required":true}}},"optional":true}}},"optional":true},"network_configuration":{"nesting_mode":3,"block":{"attributes":{"accelerated_networking_enabled":{"type":"bool","optional":true,"default":false},"dynamic_vnet_assignment_scope":{"type":"string","optional":true,"default":"none"},"public_address_provisioning_type":{"type":"string","optional":true},"public_ips":{"type":["set","string"],"optional":true},"subnet_id":{"type":"string","optional":true}},"block_types":{"endpoint_configuration":{"nesting_mode":3,"block":{"attributes":{"backend_port":{"type":"number","required":true},"frontend_port_range":{"type":"string","required":true},"name":{"type":"string","required":true},"protocol":{"type":"string","required":true}},"block_types":{"network_security_group_rules":{"nesting_mode":3,"block":{"attributes":{"access":{"type":"string","required":true},"priority":{"type":"number","required":true},"source_address_prefix":{"type":"string","required":true},"source_port_ranges":{"type":["list","string"],"optional":true,"computed":true}}},"optional":true}}},"optional":true}}},"optional":true},"node_placement":{"nesting_mode":3,"block":{"attributes":{"policy":{"type":"string","optional":true,"default":"Regional"}}},"optional":true},"start_task":{"nesting_mode":3,"block":{"attributes":{"command_line":{"type":"string","required":true},"common_environment_properties":{"type":["map","string"],"optional":true},"task_retry_maximum":{"type":"number","optional":true},"wait_for_success":{"type":"bool","optional":true,"default":false}},"block_types":{"container":{"nesting_mode":3,"block":{"attributes":{"image_name":{"type":"string","required":true},"run_options":{"type":"string","optional":true},"working_directory":{"type":"string","optional":true}},"block_types":{"registry":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","optional":true},"registry_server":{"type":"string","required":true},"user_assigned_identity_id":{"type":"string","optional":true},"user_name":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"resource_file":{"nesting_mode":3,"block":{"attributes":{"auto_storage_container_name":{"type":"string","optional":true},"blob_prefix":{"type":"string","optional":true},"file_mode":{"type":"string","optional":true},"file_path":{"type":"string","optional":true},"http_url":{"type":"string","optional":true},"storage_container_url":{"type":"string","optional":true},"user_assigned_identity_id":{"type":"string","optional":true}}},"optional":true},"user_identity":{"nesting_mode":3,"block":{"attributes":{"user_name":{"type":"string","optional":true,"at_least_one_of":["start_task.0.user_identity.0.user_name","start_task.0.user_identity.0.auto_user"]}},"block_types":{"auto_user":{"nesting_mode":3,"block":{"attributes":{"elevation_level":{"type":"string","optional":true,"default":"NonAdmin"},"scope":{"type":"string","optional":true,"default":"Task"}}},"optional":true,"at_least_one_of":["start_task.0.user_identity.0.user_name","start_task.0.user_identity.0.auto_user"]}}},"required":true}}},"optional":true},"storage_image_reference":{"nesting_mode":3,"block":{"attributes":{"id":{"type":"string","optional":true,"at_least_one_of":["storage_image_reference.0.id","storage_image_reference.0.publisher","storage_image_reference.0.offer","storage_image_reference.0.sku","storage_image_reference.0.version"]},"offer":{"type":"string","optional":true,"at_least_one_of":["storage_image_reference.0.id","storage_image_reference.0.publisher","storage_image_reference.0.offer","storage_image_reference.0.sku","storage_image_reference.0.version"]},"publisher":{"type":"string","optional":true,"at_least_one_of":["storage_image_reference.0.id","storage_image_reference.0.publisher","storage_image_reference.0.offer","storage_image_reference.0.sku","storage_image_reference.0.version"]},"sku":{"type":"string","optional":true,"at_least_one_of":["storage_image_reference.0.id","storage_image_reference.0.publisher","storage_image_reference.0.offer","storage_image_reference.0.sku","storage_image_reference.0.version"]},"version":{"type":"string","optional":true,"at_least_one_of":["storage_image_reference.0.id","storage_image_reference.0.publisher","storage_image_reference.0.offer","storage_image_reference.0.sku","storage_image_reference.0.version"]}}},"required":true},"task_scheduling_policy":{"nesting_mode":3,"block":{"attributes":{"node_fill_type":{"type":"string","optional":true,"computed":true}}},"optional":true,"computed":true},"user_accounts":{"nesting_mode":3,"block":{"attributes":{"elevation_level":{"type":"string","required":true},"name":{"type":"string","required":true},"password":{"type":"string","required":true}},"block_types":{"linux_user_configuration":{"nesting_mode":3,"block":{"attributes":{"gid":{"type":"number","optional":true},"ssh_private_key":{"type":"string","optional":true},"uid":{"type":"number","optional":true}}},"optional":true},"windows_user_configuration":{"nesting_mode":3,"block":{"attributes":{"login_mode":{"type":"string","required":true}}},"optional":true}}},"optional":true},"windows":{"nesting_mode":3,"block":{"attributes":{"enable_automatic_updates":{"type":"bool","optional":true,"default":true}}},"optional":true}}}},"azurerm_billing_account_cost_management_export":{"block":{"attributes":{"active":{"type":"bool","optional":true,"default":true},"billing_account_id":{"type":"string","required":true},"name":{"type":"string","required":true},"recurrence_period_end_date":{"type":"string","required":true},"recurrence_period_start_date":{"type":"string","required":true},"recurrence_type":{"type":"string","required":true}},"block_types":{"export_data_options":{"nesting_mode":3,"block":{"attributes":{"time_frame":{"type":"string","required":true},"type":{"type":"string","required":true}}},"required":true},"export_data_storage_location":{"nesting_mode":3,"block":{"attributes":{"container_id":{"type":"string","required":true},"root_folder_path":{"type":"string","required":true}}},"required":true}}}},"azurerm_blueprint_assignment":{"block":{"attributes":{"blueprint_name":{"type":"string","computed":true},"description":{"type":"string","computed":true},"display_name":{"type":"string","computed":true},"location":{"type":"string","required":true},"lock_exclude_actions":{"type":["list","string"],"optional":true},"lock_exclude_principals":{"type":["list","string"],"optional":true},"lock_mode":{"type":"string","optional":true,"default":"None"},"name":{"type":"string","required":true},"parameter_values":{"type":"string","optional":true},"resource_groups":{"type":"string","optional":true},"target_subscription_id":{"type":"string","required":true},"type":{"type":"string","computed":true},"version_id":{"type":"string","required":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"required":true}}}},"azurerm_bot_channel_alexa":{"block":{"attributes":{"bot_name":{"type":"string","required":true},"location":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"skill_id":{"type":"string","required":true}}}},"azurerm_bot_channel_direct_line_speech":{"block":{"attributes":{"bot_name":{"type":"string","required":true},"cognitive_account_id":{"type":"string","optional":true},"cognitive_service_access_key":{"type":"string","required":true},"cognitive_service_location":{"type":"string","required":true},"custom_speech_model_id":{"type":"string","optional":true},"custom_voice_deployment_id":{"type":"string","optional":true},"location":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_bot_channel_directline":{"block":{"attributes":{"bot_name":{"type":"string","required":true},"location":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}},"block_types":{"site":{"nesting_mode":4,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"endpoint_parameters_enabled":{"type":"bool","optional":true},"enhanced_authentication_enabled":{"type":"bool","optional":true,"default":false},"id":{"type":"string","computed":true},"key":{"type":"string","computed":true},"key2":{"type":"string","computed":true},"name":{"type":"string","required":true},"storage_enabled":{"type":"bool","optional":true,"default":true},"trusted_origins":{"type":["set","string"],"optional":true},"user_upload_enabled":{"type":"bool","optional":true,"default":true},"v1_allowed":{"type":"bool","optional":true,"default":true},"v3_allowed":{"type":"bool","optional":true,"default":true}}},"required":true}}}},"azurerm_bot_channel_email":{"block":{"attributes":{"bot_name":{"type":"string","required":true},"email_address":{"type":"string","required":true},"email_password":{"type":"string","optional":true,"exactly_one_of":["email_password","magic_code"]},"location":{"type":"string","required":true},"magic_code":{"type":"string","optional":true,"exactly_one_of":["email_password","magic_code"]},"resource_group_name":{"type":"string","required":true}}}},"azurerm_bot_channel_facebook":{"block":{"attributes":{"bot_name":{"type":"string","required":true},"facebook_application_id":{"type":"string","required":true},"facebook_application_secret":{"type":"string","required":true},"location":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}},"block_types":{"page":{"nesting_mode":4,"block":{"attributes":{"access_token":{"type":"string","required":true},"id":{"type":"string","required":true}}},"required":true}}}},"azurerm_bot_channel_line":{"block":{"attributes":{"bot_name":{"type":"string","required":true},"location":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}},"block_types":{"line_channel":{"nesting_mode":4,"block":{"attributes":{"access_token":{"type":"string","required":true},"secret":{"type":"string","required":true}}},"required":true}}}},"azurerm_bot_channel_ms_teams":{"block":{"attributes":{"bot_name":{"type":"string","required":true},"calling_web_hook":{"type":"string","optional":true,"computed":true},"deployment_environment":{"type":"string","optional":true,"default":"CommercialDeployment"},"enable_calling":{"type":"bool","optional":true,"default":false},"location":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_bot_channel_slack":{"block":{"attributes":{"bot_name":{"type":"string","required":true},"client_id":{"type":"string","required":true},"client_secret":{"type":"string","required":true},"landing_page_url":{"type":"string","optional":true},"location":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"signing_secret":{"type":"string","optional":true},"verification_token":{"type":"string","required":true}}}},"azurerm_bot_channel_sms":{"block":{"attributes":{"bot_name":{"type":"string","required":true},"location":{"type":"string","required":true},"phone_number":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"sms_channel_account_security_id":{"type":"string","required":true},"sms_channel_auth_token":{"type":"string","required":true}}}},"azurerm_bot_channel_web_chat":{"block":{"attributes":{"bot_name":{"type":"string","required":true},"location":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}},"block_types":{"site":{"nesting_mode":4,"block":{"attributes":{"endpoint_parameters_enabled":{"type":"bool","optional":true},"name":{"type":"string","required":true},"storage_enabled":{"type":"bool","optional":true,"default":true},"user_upload_enabled":{"type":"bool","optional":true,"default":true}}},"optional":true}}}},"azurerm_bot_channels_registration":{"block":{"attributes":{"cmk_key_vault_url":{"type":"string","optional":true},"description":{"type":"string","optional":true},"developer_app_insights_api_key":{"type":"string","optional":true},"developer_app_insights_application_id":{"type":"string","optional":true},"developer_app_insights_key":{"type":"string","optional":true},"display_name":{"type":"string","optional":true,"computed":true},"endpoint":{"type":"string","optional":true},"icon_url":{"type":"string","optional":true,"default":"https://docs.botframework.com/static/devportal/client/images/bot-framework-default.png"},"location":{"type":"string","required":true},"microsoft_app_id":{"type":"string","required":true},"name":{"type":"string","required":true},"public_network_access_enabled":{"type":"bool","optional":true},"resource_group_name":{"type":"string","required":true},"sku":{"type":"string","required":true},"streaming_endpoint_enabled":{"type":"bool","optional":true,"default":false},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_bot_connection":{"block":{"attributes":{"bot_name":{"type":"string","required":true},"client_id":{"type":"string","required":true},"client_secret":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"resource_group_name":{"type":"string","required":true},"scopes":{"type":"string","optional":true},"service_provider_name":{"type":"string","required":true}}}},"azurerm_bot_service_azure_bot":{"block":{"attributes":{"cmk_key_vault_key_url":{"type":"string","optional":true},"developer_app_insights_api_key":{"type":"string","optional":true},"developer_app_insights_application_id":{"type":"string","optional":true},"developer_app_insights_key":{"type":"string","optional":true},"display_name":{"type":"string","optional":true,"computed":true},"endpoint":{"type":"string","optional":true},"icon_url":{"type":"string","optional":true,"default":"https://docs.botframework.com/static/devportal/client/images/bot-framework-default.png"},"local_authentication_enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"luis_app_ids":{"type":["list","string"],"optional":true},"luis_key":{"type":"string","optional":true},"microsoft_app_id":{"type":"string","required":true},"microsoft_app_msi_id":{"type":"string","optional":true},"microsoft_app_tenant_id":{"type":"string","optional":true},"microsoft_app_type":{"type":"string","optional":true},"name":{"type":"string","required":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"sku":{"type":"string","required":true},"streaming_endpoint_enabled":{"type":"bool","optional":true,"default":false},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_bot_web_app":{"block":{"attributes":{"developer_app_insights_api_key":{"type":"string","optional":true},"developer_app_insights_application_id":{"type":"string","optional":true},"developer_app_insights_key":{"type":"string","optional":true},"display_name":{"type":"string","optional":true,"computed":true},"endpoint":{"type":"string","optional":true},"location":{"type":"string","required":true},"luis_app_ids":{"type":["list","string"],"optional":true},"luis_key":{"type":"string","optional":true},"microsoft_app_id":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"sku":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_capacity_reservation":{"block":{"attributes":{"capacity_reservation_group_id":{"type":"string","required":true},"name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"zone":{"type":"string","optional":true}},"block_types":{"sku":{"nesting_mode":3,"block":{"attributes":{"capacity":{"type":"number","required":true},"name":{"type":"string","required":true}}},"required":true}}}},"azurerm_capacity_reservation_group":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"zones":{"type":["set","string"],"optional":true}}}},"azurerm_cdn_endpoint":{"block":{"attributes":{"content_types_to_compress":{"type":["set","string"],"optional":true},"fqdn":{"type":"string","computed":true},"is_compression_enabled":{"type":"bool","optional":true},"is_http_allowed":{"type":"bool","optional":true,"default":true},"is_https_allowed":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"optimization_type":{"type":"string","optional":true},"origin_host_header":{"type":"string","optional":true},"origin_path":{"type":"string","optional":true},"probe_path":{"type":"string","optional":true},"profile_name":{"type":"string","required":true},"querystring_caching_behaviour":{"type":"string","optional":true,"default":"IgnoreQueryString"},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"delivery_rule":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"order":{"type":"number","required":true}},"block_types":{"cache_expiration_action":{"nesting_mode":3,"block":{"attributes":{"behavior":{"type":"string","required":true},"duration":{"type":"string","optional":true}}},"optional":true},"cache_key_query_string_action":{"nesting_mode":3,"block":{"attributes":{"behavior":{"type":"string","required":true},"parameters":{"type":"string","optional":true}}},"optional":true},"cookies_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["set","string"],"optional":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true},"selector":{"type":"string","required":true},"transforms":{"type":["list","string"],"optional":true}}},"optional":true},"device_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["set","string"],"required":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","optional":true,"default":"Equal"}}},"optional":true},"http_version_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["set","string"],"required":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","optional":true,"default":"Equal"}}},"optional":true},"modify_request_header_action":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"name":{"type":"string","required":true},"value":{"type":"string","optional":true}}},"optional":true},"modify_response_header_action":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"name":{"type":"string","required":true},"value":{"type":"string","optional":true}}},"optional":true},"post_arg_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["set","string"],"optional":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true},"selector":{"type":"string","required":true},"transforms":{"type":["list","string"],"optional":true}}},"optional":true},"query_string_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["set","string"],"optional":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true},"transforms":{"type":["list","string"],"optional":true}}},"optional":true},"remote_address_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["set","string"],"optional":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true}}},"optional":true},"request_body_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["set","string"],"optional":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true},"transforms":{"type":["list","string"],"optional":true}}},"optional":true},"request_header_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["set","string"],"optional":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true},"selector":{"type":"string","required":true},"transforms":{"type":["list","string"],"optional":true}}},"optional":true},"request_method_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["set","string"],"required":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","optional":true,"default":"Equal"}}},"optional":true},"request_scheme_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["set","string"],"required":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","optional":true,"default":"Equal"}}},"optional":true},"request_uri_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["set","string"],"optional":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true},"transforms":{"type":["list","string"],"optional":true}}},"optional":true},"url_file_extension_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["set","string"],"optional":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true},"transforms":{"type":["list","string"],"optional":true}}},"optional":true},"url_file_name_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["set","string"],"optional":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true},"transforms":{"type":["list","string"],"optional":true}}},"optional":true},"url_path_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["set","string"],"optional":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true},"transforms":{"type":["list","string"],"optional":true}}},"optional":true},"url_redirect_action":{"nesting_mode":3,"block":{"attributes":{"fragment":{"type":"string","optional":true},"hostname":{"type":"string","optional":true},"path":{"type":"string","optional":true},"protocol":{"type":"string","optional":true,"default":"MatchRequest"},"query_string":{"type":"string","optional":true},"redirect_type":{"type":"string","required":true}}},"optional":true},"url_rewrite_action":{"nesting_mode":3,"block":{"attributes":{"destination":{"type":"string","required":true},"preserve_unmatched_path":{"type":"bool","optional":true,"default":true},"source_pattern":{"type":"string","required":true}}},"optional":true}}},"optional":true},"geo_filter":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"country_codes":{"type":["list","string"],"required":true},"relative_path":{"type":"string","required":true}}},"optional":true},"global_delivery_rule":{"nesting_mode":3,"block":{"block_types":{"cache_expiration_action":{"nesting_mode":3,"block":{"attributes":{"behavior":{"type":"string","required":true},"duration":{"type":"string","optional":true}}},"optional":true,"at_least_one_of":["global_delivery_rule.0.cache_expiration_action","global_delivery_rule.0.cache_key_query_string_action","global_delivery_rule.0.modify_request_header_action","global_delivery_rule.0.modify_response_header_action","global_delivery_rule.0.url_redirect_action","global_delivery_rule.0.url_rewrite_action"]},"cache_key_query_string_action":{"nesting_mode":3,"block":{"attributes":{"behavior":{"type":"string","required":true},"parameters":{"type":"string","optional":true}}},"optional":true,"at_least_one_of":["global_delivery_rule.0.cache_expiration_action","global_delivery_rule.0.cache_key_query_string_action","global_delivery_rule.0.modify_request_header_action","global_delivery_rule.0.modify_response_header_action","global_delivery_rule.0.url_redirect_action","global_delivery_rule.0.url_rewrite_action"]},"modify_request_header_action":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"name":{"type":"string","required":true},"value":{"type":"string","optional":true}}},"optional":true,"at_least_one_of":["global_delivery_rule.0.cache_expiration_action","global_delivery_rule.0.cache_key_query_string_action","global_delivery_rule.0.modify_request_header_action","global_delivery_rule.0.modify_response_header_action","global_delivery_rule.0.url_redirect_action","global_delivery_rule.0.url_rewrite_action"]},"modify_response_header_action":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"name":{"type":"string","required":true},"value":{"type":"string","optional":true}}},"optional":true,"at_least_one_of":["global_delivery_rule.0.cache_expiration_action","global_delivery_rule.0.cache_key_query_string_action","global_delivery_rule.0.modify_request_header_action","global_delivery_rule.0.modify_response_header_action","global_delivery_rule.0.url_redirect_action","global_delivery_rule.0.url_rewrite_action"]},"url_redirect_action":{"nesting_mode":3,"block":{"attributes":{"fragment":{"type":"string","optional":true},"hostname":{"type":"string","optional":true},"path":{"type":"string","optional":true},"protocol":{"type":"string","optional":true,"default":"MatchRequest"},"query_string":{"type":"string","optional":true},"redirect_type":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["global_delivery_rule.0.cache_expiration_action","global_delivery_rule.0.cache_key_query_string_action","global_delivery_rule.0.modify_request_header_action","global_delivery_rule.0.modify_response_header_action","global_delivery_rule.0.url_redirect_action","global_delivery_rule.0.url_rewrite_action"]},"url_rewrite_action":{"nesting_mode":3,"block":{"attributes":{"destination":{"type":"string","required":true},"preserve_unmatched_path":{"type":"bool","optional":true,"default":true},"source_pattern":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["global_delivery_rule.0.cache_expiration_action","global_delivery_rule.0.cache_key_query_string_action","global_delivery_rule.0.modify_request_header_action","global_delivery_rule.0.modify_response_header_action","global_delivery_rule.0.url_redirect_action","global_delivery_rule.0.url_rewrite_action"]}}},"optional":true},"origin":{"nesting_mode":4,"block":{"attributes":{"host_name":{"type":"string","required":true},"http_port":{"type":"number","optional":true,"default":80},"https_port":{"type":"number","optional":true,"default":443},"name":{"type":"string","required":true}}},"required":true}}}},"azurerm_cdn_endpoint_custom_domain":{"block":{"attributes":{"cdn_endpoint_id":{"type":"string","required":true},"host_name":{"type":"string","required":true},"name":{"type":"string","required":true}},"block_types":{"cdn_managed_https":{"nesting_mode":3,"block":{"attributes":{"certificate_type":{"type":"string","required":true},"protocol_type":{"type":"string","required":true},"tls_version":{"type":"string","optional":true,"default":"TLS12"}}},"optional":true,"conflicts_with":["user_managed_https"]},"user_managed_https":{"nesting_mode":3,"block":{"attributes":{"key_vault_secret_id":{"type":"string","required":true},"tls_version":{"type":"string","optional":true,"default":"TLS12"}}},"optional":true,"conflicts_with":["cdn_managed_https"]}}}},"azurerm_cdn_frontdoor_custom_domain":{"block":{"attributes":{"cdn_frontdoor_profile_id":{"type":"string","required":true},"dns_zone_id":{"type":"string","optional":true},"expiration_date":{"type":"string","computed":true},"host_name":{"type":"string","required":true},"name":{"type":"string","required":true},"validation_token":{"type":"string","computed":true}},"block_types":{"tls":{"nesting_mode":3,"block":{"attributes":{"cdn_frontdoor_secret_id":{"type":"string","optional":true,"computed":true},"certificate_type":{"type":"string","optional":true,"default":"ManagedCertificate"},"minimum_tls_version":{"type":"string","optional":true,"default":"TLS12"}}},"required":true}}}},"azurerm_cdn_frontdoor_custom_domain_association":{"block":{"attributes":{"cdn_frontdoor_custom_domain_id":{"type":"string","required":true},"cdn_frontdoor_route_ids":{"type":["list","string"],"required":true}}}},"azurerm_cdn_frontdoor_endpoint":{"block":{"attributes":{"cdn_frontdoor_profile_id":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":true},"host_name":{"type":"string","computed":true},"name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_cdn_frontdoor_firewall_policy":{"block":{"attributes":{"custom_block_response_body":{"type":"string","optional":true},"custom_block_response_status_code":{"type":"number","optional":true},"enabled":{"type":"bool","optional":true,"default":true},"frontend_endpoint_ids":{"type":["list","string"],"computed":true},"mode":{"type":"string","required":true},"name":{"type":"string","required":true},"redirect_url":{"type":"string","optional":true},"request_body_check_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"custom_rule":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"priority":{"type":"number","optional":true,"default":1},"rate_limit_duration_in_minutes":{"type":"number","optional":true,"default":1},"rate_limit_threshold":{"type":"number","optional":true,"default":10},"type":{"type":"string","required":true}},"block_types":{"match_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["list","string"],"required":true},"match_variable":{"type":"string","required":true},"negation_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true},"selector":{"type":"string","optional":true},"transforms":{"type":["list","string"],"optional":true}}},"optional":true}}},"optional":true},"managed_rule":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"type":{"type":"string","required":true},"version":{"type":"string","required":true}},"block_types":{"exclusion":{"nesting_mode":3,"block":{"attributes":{"match_variable":{"type":"string","required":true},"operator":{"type":"string","required":true},"selector":{"type":"string","required":true}}},"optional":true},"override":{"nesting_mode":3,"block":{"attributes":{"rule_group_name":{"type":"string","required":true}},"block_types":{"exclusion":{"nesting_mode":3,"block":{"attributes":{"match_variable":{"type":"string","required":true},"operator":{"type":"string","required":true},"selector":{"type":"string","required":true}}},"optional":true},"rule":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":false},"rule_id":{"type":"string","required":true}},"block_types":{"exclusion":{"nesting_mode":3,"block":{"attributes":{"match_variable":{"type":"string","required":true},"operator":{"type":"string","required":true},"selector":{"type":"string","required":true}}},"optional":true}}},"optional":true}}},"optional":true}}},"optional":true}}}},"azurerm_cdn_frontdoor_origin":{"block":{"attributes":{"cdn_frontdoor_origin_group_id":{"type":"string","required":true},"certificate_name_check_enabled":{"type":"bool","required":true},"enabled":{"type":"bool","optional":true,"default":true},"host_name":{"type":"string","required":true},"http_port":{"type":"number","optional":true,"default":80},"https_port":{"type":"number","optional":true,"default":443},"name":{"type":"string","required":true},"origin_host_header":{"type":"string","optional":true},"priority":{"type":"number","optional":true,"default":1},"weight":{"type":"number","optional":true,"default":500}},"block_types":{"private_link":{"nesting_mode":3,"block":{"attributes":{"location":{"type":"string","required":true},"private_link_target_id":{"type":"string","required":true},"request_message":{"type":"string","optional":true,"default":"Access request for CDN FrontDoor Private Link Origin"},"target_type":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_cdn_frontdoor_origin_group":{"block":{"attributes":{"cdn_frontdoor_profile_id":{"type":"string","required":true},"name":{"type":"string","required":true},"restore_traffic_time_to_healed_or_new_endpoint_in_minutes":{"type":"number","optional":true,"default":10},"session_affinity_enabled":{"type":"bool","optional":true,"default":true}},"block_types":{"health_probe":{"nesting_mode":3,"block":{"attributes":{"interval_in_seconds":{"type":"number","required":true},"path":{"type":"string","optional":true,"default":"/"},"protocol":{"type":"string","required":true},"request_type":{"type":"string","optional":true,"default":"HEAD"}}},"optional":true},"load_balancing":{"nesting_mode":3,"block":{"attributes":{"additional_latency_in_milliseconds":{"type":"number","optional":true,"default":50},"sample_size":{"type":"number","optional":true,"default":4},"successful_samples_required":{"type":"number","optional":true,"default":3}}},"required":true}}}},"azurerm_cdn_frontdoor_profile":{"block":{"attributes":{"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"resource_guid":{"type":"string","computed":true},"response_timeout_seconds":{"type":"number","optional":true,"default":120},"sku_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_cdn_frontdoor_route":{"block":{"attributes":{"cdn_frontdoor_custom_domain_ids":{"type":["set","string"],"optional":true},"cdn_frontdoor_endpoint_id":{"type":"string","required":true},"cdn_frontdoor_origin_group_id":{"type":"string","required":true},"cdn_frontdoor_origin_ids":{"type":["list","string"],"required":true},"cdn_frontdoor_origin_path":{"type":"string","optional":true},"cdn_frontdoor_rule_set_ids":{"type":["set","string"],"optional":true},"enabled":{"type":"bool","optional":true,"default":true},"forwarding_protocol":{"type":"string","optional":true,"default":"MatchRequest"},"https_redirect_enabled":{"type":"bool","optional":true,"default":true},"link_to_default_domain":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"patterns_to_match":{"type":["list","string"],"required":true},"supported_protocols":{"type":["set","string"],"required":true}},"block_types":{"cache":{"nesting_mode":3,"block":{"attributes":{"compression_enabled":{"type":"bool","optional":true,"default":false},"content_types_to_compress":{"type":["list","string"],"optional":true},"query_string_caching_behavior":{"type":"string","optional":true,"default":"IgnoreQueryString"},"query_strings":{"type":["list","string"],"optional":true}}},"optional":true}}}},"azurerm_cdn_frontdoor_rule":{"block":{"attributes":{"behavior_on_match":{"type":"string","optional":true,"default":"Continue"},"cdn_frontdoor_rule_set_id":{"type":"string","required":true},"cdn_frontdoor_rule_set_name":{"type":"string","computed":true},"name":{"type":"string","required":true},"order":{"type":"number","required":true}},"block_types":{"actions":{"nesting_mode":3,"block":{"block_types":{"request_header_action":{"nesting_mode":3,"block":{"attributes":{"header_action":{"type":"string","required":true},"header_name":{"type":"string","required":true},"value":{"type":"string","optional":true}}},"optional":true},"response_header_action":{"nesting_mode":3,"block":{"attributes":{"header_action":{"type":"string","required":true},"header_name":{"type":"string","required":true},"value":{"type":"string","optional":true}}},"optional":true},"route_configuration_override_action":{"nesting_mode":3,"block":{"attributes":{"cache_behavior":{"type":"string","optional":true},"cache_duration":{"type":"string","optional":true},"cdn_frontdoor_origin_group_id":{"type":"string","optional":true},"compression_enabled":{"type":"bool","optional":true},"forwarding_protocol":{"type":"string","optional":true},"query_string_caching_behavior":{"type":"string","optional":true},"query_string_parameters":{"type":["list","string"],"optional":true}}},"optional":true},"url_redirect_action":{"nesting_mode":3,"block":{"attributes":{"destination_fragment":{"type":"string","optional":true,"default":""},"destination_hostname":{"type":"string","required":true},"destination_path":{"type":"string","optional":true,"default":""},"query_string":{"type":"string","optional":true,"default":""},"redirect_protocol":{"type":"string","optional":true,"default":"MatchRequest"},"redirect_type":{"type":"string","required":true}}},"optional":true},"url_rewrite_action":{"nesting_mode":3,"block":{"attributes":{"destination":{"type":"string","required":true},"preserve_unmatched_path":{"type":"bool","optional":true,"default":false},"source_pattern":{"type":"string","required":true}}},"optional":true}}},"required":true},"conditions":{"nesting_mode":3,"block":{"block_types":{"client_port_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["list","string"],"optional":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true}}},"optional":true},"cookies_condition":{"nesting_mode":3,"block":{"attributes":{"cookie_name":{"type":"string","required":true},"match_values":{"type":["list","string"],"optional":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true},"transforms":{"type":["set","string"],"optional":true}}},"optional":true},"host_name_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["list","string"],"optional":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true},"transforms":{"type":["set","string"],"optional":true}}},"optional":true},"http_version_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["set","string"],"required":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","optional":true,"default":"Equal"}}},"optional":true},"is_device_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["list","string"],"optional":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","optional":true,"default":"Equal"}}},"optional":true},"post_args_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["list","string"],"optional":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true},"post_args_name":{"type":"string","required":true},"transforms":{"type":["set","string"],"optional":true}}},"optional":true},"query_string_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["list","string"],"optional":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true},"transforms":{"type":["set","string"],"optional":true}}},"optional":true},"remote_address_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["list","string"],"optional":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","optional":true,"default":"IPMatch"}}},"optional":true},"request_body_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["list","string"],"required":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true},"transforms":{"type":["set","string"],"optional":true}}},"optional":true},"request_header_condition":{"nesting_mode":3,"block":{"attributes":{"header_name":{"type":"string","required":true},"match_values":{"type":["list","string"],"optional":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true},"transforms":{"type":["set","string"],"optional":true}}},"optional":true},"request_method_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["set","string"],"required":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","optional":true,"default":"Equal"}}},"optional":true},"request_scheme_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["list","string"],"optional":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","optional":true,"default":"Equal"}}},"optional":true},"request_uri_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["list","string"],"optional":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true},"transforms":{"type":["set","string"],"optional":true}}},"optional":true},"server_port_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["set","string"],"required":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true}}},"optional":true},"socket_address_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["list","string"],"optional":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","optional":true,"default":"IPMatch"}}},"optional":true},"ssl_protocol_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["set","string"],"required":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","optional":true,"default":"Equal"}}},"optional":true},"url_file_extension_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["list","string"],"required":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true},"transforms":{"type":["set","string"],"optional":true}}},"optional":true},"url_filename_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["list","string"],"optional":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true},"transforms":{"type":["set","string"],"optional":true}}},"optional":true},"url_path_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["list","string"],"optional":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true},"transforms":{"type":["set","string"],"optional":true}}},"optional":true}}},"optional":true}}}},"azurerm_cdn_frontdoor_rule_set":{"block":{"attributes":{"cdn_frontdoor_profile_id":{"type":"string","required":true},"name":{"type":"string","required":true}}}},"azurerm_cdn_frontdoor_secret":{"block":{"attributes":{"cdn_frontdoor_profile_id":{"type":"string","required":true},"cdn_frontdoor_profile_name":{"type":"string","computed":true},"name":{"type":"string","required":true}},"block_types":{"secret":{"nesting_mode":3,"block":{"block_types":{"customer_certificate":{"nesting_mode":3,"block":{"attributes":{"key_vault_certificate_id":{"type":"string","required":true},"subject_alternative_names":{"type":["list","string"],"computed":true}}},"required":true}}},"required":true}}}},"azurerm_cdn_frontdoor_security_policy":{"block":{"attributes":{"cdn_frontdoor_profile_id":{"type":"string","required":true},"name":{"type":"string","required":true}},"block_types":{"security_policies":{"nesting_mode":3,"block":{"block_types":{"firewall":{"nesting_mode":3,"block":{"attributes":{"cdn_frontdoor_firewall_policy_id":{"type":"string","required":true}},"block_types":{"association":{"nesting_mode":3,"block":{"attributes":{"patterns_to_match":{"type":["list","string"],"required":true}},"block_types":{"domain":{"nesting_mode":3,"block":{"attributes":{"active":{"type":"bool","computed":true},"cdn_frontdoor_domain_id":{"type":"string","required":true}}},"required":true}}},"required":true}}},"required":true}}},"required":true}}}},"azurerm_cdn_profile":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"sku":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_chaos_studio_capability":{"block":{"attributes":{"capability_type":{"type":"string","required":true},"chaos_studio_target_id":{"type":"string","required":true},"urn":{"type":"string","computed":true}}}},"azurerm_chaos_studio_experiment":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"selectors":{"nesting_mode":3,"block":{"attributes":{"chaos_studio_target_ids":{"type":["list","string"],"required":true},"name":{"type":"string","required":true}}},"required":true},"steps":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true}},"block_types":{"branch":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true}},"block_types":{"actions":{"nesting_mode":3,"block":{"attributes":{"action_type":{"type":"string","required":true},"duration":{"type":"string","optional":true},"parameters":{"type":["map","string"],"optional":true},"selector_name":{"type":"string","optional":true},"urn":{"type":"string","optional":true}}},"required":true}}},"required":true}}},"required":true}}}},"azurerm_chaos_studio_target":{"block":{"attributes":{"location":{"type":"string","required":true},"target_resource_id":{"type":"string","required":true},"target_type":{"type":"string","required":true}}}},"azurerm_cognitive_account":{"block":{"attributes":{"custom_question_answering_search_service_id":{"type":"string","optional":true},"custom_question_answering_search_service_key":{"type":"string","optional":true},"custom_subdomain_name":{"type":"string","optional":true},"dynamic_throttling_enabled":{"type":"bool","optional":true},"endpoint":{"type":"string","computed":true},"fqdns":{"type":["list","string"],"optional":true},"kind":{"type":"string","required":true},"local_auth_enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"metrics_advisor_aad_client_id":{"type":"string","optional":true},"metrics_advisor_aad_tenant_id":{"type":"string","optional":true},"metrics_advisor_super_user_name":{"type":"string","optional":true},"metrics_advisor_website_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"outbound_network_access_restricted":{"type":"bool","optional":true,"default":false},"primary_access_key":{"type":"string","computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"qna_runtime_endpoint":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"secondary_access_key":{"type":"string","computed":true},"sku_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"customer_managed_key":{"nesting_mode":3,"block":{"attributes":{"identity_client_id":{"type":"string","optional":true},"key_vault_key_id":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"network_acls":{"nesting_mode":3,"block":{"attributes":{"default_action":{"type":"string","required":true},"ip_rules":{"type":["set","string"],"optional":true}},"block_types":{"virtual_network_rules":{"nesting_mode":4,"block":{"attributes":{"ignore_missing_vnet_service_endpoint":{"type":"bool","optional":true,"default":false},"subnet_id":{"type":"string","required":true}}},"optional":true}}},"optional":true,"required_with":["custom_subdomain_name"]},"storage":{"nesting_mode":3,"block":{"attributes":{"identity_client_id":{"type":"string","optional":true},"storage_account_id":{"type":"string","required":true}}},"optional":true}}}},"azurerm_cognitive_account_customer_managed_key":{"block":{"attributes":{"cognitive_account_id":{"type":"string","required":true},"identity_client_id":{"type":"string","optional":true},"key_vault_key_id":{"type":"string","required":true}}}},"azurerm_cognitive_deployment":{"block":{"attributes":{"cognitive_account_id":{"type":"string","required":true},"name":{"type":"string","required":true},"rai_policy_name":{"type":"string","optional":true},"version_upgrade_option":{"type":"string","optional":true,"default":"OnceNewDefaultVersionAvailable"}},"block_types":{"model":{"nesting_mode":3,"block":{"attributes":{"format":{"type":"string","required":true},"name":{"type":"string","required":true},"version":{"type":"string","optional":true}}},"required":true},"sku":{"nesting_mode":3,"block":{"attributes":{"capacity":{"type":"number","optional":true,"default":1},"family":{"type":"string","optional":true},"name":{"type":"string","required":true},"size":{"type":"string","optional":true},"tier":{"type":"string","optional":true}}},"required":true}}}},"azurerm_communication_service":{"block":{"attributes":{"data_location":{"type":"string","optional":true,"default":"United States"},"name":{"type":"string","required":true},"primary_connection_string":{"type":"string","computed":true},"primary_key":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"secondary_connection_string":{"type":"string","computed":true},"secondary_key":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_communication_service_email_domain_association":{"block":{"attributes":{"communication_service_id":{"type":"string","required":true},"email_service_domain_id":{"type":"string","required":true}}}},"azurerm_confidential_ledger":{"block":{"attributes":{"identity_service_endpoint":{"type":"string","computed":true},"ledger_endpoint":{"type":"string","computed":true},"ledger_type":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"azuread_based_service_principal":{"nesting_mode":3,"block":{"attributes":{"ledger_role_name":{"type":"string","required":true},"principal_id":{"type":"string","required":true},"tenant_id":{"type":"string","required":true}}},"required":true},"certificate_based_security_principal":{"nesting_mode":3,"block":{"attributes":{"ledger_role_name":{"type":"string","required":true},"pem_public_key":{"type":"string","required":true}}},"optional":true}}}},"azurerm_consumption_budget_management_group":{"block":{"attributes":{"amount":{"type":"number","required":true},"etag":{"type":"string","optional":true,"computed":true},"management_group_id":{"type":"string","required":true},"name":{"type":"string","required":true},"time_grain":{"type":"string","optional":true,"default":"Monthly"}},"block_types":{"filter":{"nesting_mode":3,"block":{"block_types":{"dimension":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"operator":{"type":"string","optional":true,"default":"In"},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["filter.0.dimension","filter.0.tag"]},"tag":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"operator":{"type":"string","optional":true,"default":"In"},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["filter.0.dimension","filter.0.tag"]}}},"optional":true},"notification":{"nesting_mode":4,"block":{"attributes":{"contact_emails":{"type":["list","string"],"required":true},"enabled":{"type":"bool","optional":true,"default":true},"operator":{"type":"string","required":true},"threshold":{"type":"number","required":true},"threshold_type":{"type":"string","optional":true,"default":"Actual"}}},"required":true},"time_period":{"nesting_mode":3,"block":{"attributes":{"end_date":{"type":"string","optional":true,"computed":true},"start_date":{"type":"string","required":true}}},"required":true}}}},"azurerm_consumption_budget_resource_group":{"block":{"attributes":{"amount":{"type":"number","required":true},"etag":{"type":"string","optional":true,"computed":true},"name":{"type":"string","required":true},"resource_group_id":{"type":"string","required":true},"time_grain":{"type":"string","optional":true,"default":"Monthly"}},"block_types":{"filter":{"nesting_mode":3,"block":{"block_types":{"dimension":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"operator":{"type":"string","optional":true,"default":"In"},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["filter.0.dimension","filter.0.tag"]},"tag":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"operator":{"type":"string","optional":true,"default":"In"},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["filter.0.dimension","filter.0.tag"]}}},"optional":true},"notification":{"nesting_mode":4,"block":{"attributes":{"contact_emails":{"type":["list","string"],"optional":true},"contact_groups":{"type":["list","string"],"optional":true},"contact_roles":{"type":["list","string"],"optional":true},"enabled":{"type":"bool","optional":true,"default":true},"operator":{"type":"string","required":true},"threshold":{"type":"number","required":true},"threshold_type":{"type":"string","optional":true,"default":"Actual"}}},"required":true},"time_period":{"nesting_mode":3,"block":{"attributes":{"end_date":{"type":"string","optional":true,"computed":true},"start_date":{"type":"string","required":true}}},"required":true}}}},"azurerm_consumption_budget_subscription":{"block":{"attributes":{"amount":{"type":"number","required":true},"etag":{"type":"string","optional":true,"computed":true},"name":{"type":"string","required":true},"subscription_id":{"type":"string","required":true},"time_grain":{"type":"string","optional":true,"default":"Monthly"}},"block_types":{"filter":{"nesting_mode":3,"block":{"block_types":{"dimension":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"operator":{"type":"string","optional":true,"default":"In"},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["filter.0.dimension","filter.0.tag"]},"tag":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"operator":{"type":"string","optional":true,"default":"In"},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["filter.0.dimension","filter.0.tag"]}}},"optional":true},"notification":{"nesting_mode":4,"block":{"attributes":{"contact_emails":{"type":["list","string"],"optional":true},"contact_groups":{"type":["list","string"],"optional":true},"contact_roles":{"type":["list","string"],"optional":true},"enabled":{"type":"bool","optional":true,"default":true},"operator":{"type":"string","required":true},"threshold":{"type":"number","required":true},"threshold_type":{"type":"string","optional":true,"default":"Actual"}}},"required":true},"time_period":{"nesting_mode":3,"block":{"attributes":{"end_date":{"type":"string","optional":true,"computed":true},"start_date":{"type":"string","required":true}}},"required":true}}}},"azurerm_container_app":{"block":{"attributes":{"container_app_environment_id":{"type":"string","required":true},"custom_domain_verification_id":{"type":"string","computed":true},"latest_revision_fqdn":{"type":"string","computed":true},"latest_revision_name":{"type":"string","computed":true},"location":{"type":"string","computed":true},"name":{"type":"string","required":true},"outbound_ip_addresses":{"type":["list","string"],"computed":true},"resource_group_name":{"type":"string","required":true},"revision_mode":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"workload_profile_name":{"type":"string","optional":true}},"block_types":{"dapr":{"nesting_mode":3,"block":{"attributes":{"app_id":{"type":"string","required":true},"app_port":{"type":"number","optional":true},"app_protocol":{"type":"string","optional":true,"default":"http"}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"ingress":{"nesting_mode":3,"block":{"attributes":{"allow_insecure_connections":{"type":"bool","optional":true,"default":false},"custom_domain":{"type":["list",["object",{"certificate_binding_type":"string","certificate_id":"string","name":"string"}]],"computed":true},"exposed_port":{"type":"number","optional":true},"external_enabled":{"type":"bool","optional":true,"default":false},"fqdn":{"type":"string","computed":true},"target_port":{"type":"number","required":true},"transport":{"type":"string","optional":true,"default":"auto"}},"block_types":{"ip_security_restriction":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"description":{"type":"string","optional":true},"ip_address_range":{"type":"string","required":true},"name":{"type":"string","required":true}}},"optional":true},"traffic_weight":{"nesting_mode":3,"block":{"attributes":{"label":{"type":"string","optional":true},"latest_revision":{"type":"bool","optional":true,"default":false},"percentage":{"type":"number","required":true},"revision_suffix":{"type":"string","optional":true}}},"required":true}}},"optional":true},"registry":{"nesting_mode":3,"block":{"attributes":{"identity":{"type":"string","optional":true},"password_secret_name":{"type":"string","optional":true},"server":{"type":"string","required":true},"username":{"type":"string","optional":true}}},"optional":true},"secret":{"nesting_mode":4,"block":{"attributes":{"identity":{"type":"string","optional":true},"key_vault_secret_id":{"type":"string","optional":true},"name":{"type":"string","required":true},"value":{"type":"string","optional":true}}},"optional":true},"template":{"nesting_mode":3,"block":{"attributes":{"max_replicas":{"type":"number","optional":true,"default":10},"min_replicas":{"type":"number","optional":true,"default":0},"revision_suffix":{"type":"string","optional":true,"computed":true}},"block_types":{"azure_queue_scale_rule":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"queue_length":{"type":"number","required":true},"queue_name":{"type":"string","required":true}},"block_types":{"authentication":{"nesting_mode":3,"block":{"attributes":{"secret_name":{"type":"string","required":true},"trigger_parameter":{"type":"string","required":true}}},"required":true}}},"optional":true},"container":{"nesting_mode":3,"block":{"attributes":{"args":{"type":["list","string"],"optional":true},"command":{"type":["list","string"],"optional":true},"cpu":{"type":"number","required":true},"ephemeral_storage":{"type":"string","computed":true},"image":{"type":"string","required":true},"memory":{"type":"string","required":true},"name":{"type":"string","required":true}},"block_types":{"env":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"secret_name":{"type":"string","optional":true},"value":{"type":"string","optional":true}}},"optional":true},"liveness_probe":{"nesting_mode":3,"block":{"attributes":{"failure_count_threshold":{"type":"number","optional":true,"default":3},"host":{"type":"string","optional":true},"initial_delay":{"type":"number","optional":true,"default":1},"interval_seconds":{"type":"number","optional":true,"default":10},"path":{"type":"string","optional":true,"computed":true},"port":{"type":"number","required":true},"termination_grace_period_seconds":{"type":"number","computed":true},"timeout":{"type":"number","optional":true,"default":1},"transport":{"type":"string","required":true}},"block_types":{"header":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true},"readiness_probe":{"nesting_mode":3,"block":{"attributes":{"failure_count_threshold":{"type":"number","optional":true,"default":3},"host":{"type":"string","optional":true},"interval_seconds":{"type":"number","optional":true,"default":10},"path":{"type":"string","optional":true,"computed":true},"port":{"type":"number","required":true},"success_count_threshold":{"type":"number","optional":true,"default":3},"timeout":{"type":"number","optional":true,"default":1},"transport":{"type":"string","required":true}},"block_types":{"header":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true},"startup_probe":{"nesting_mode":3,"block":{"attributes":{"failure_count_threshold":{"type":"number","optional":true,"default":3},"host":{"type":"string","optional":true},"interval_seconds":{"type":"number","optional":true,"default":10},"path":{"type":"string","optional":true,"computed":true},"port":{"type":"number","required":true},"termination_grace_period_seconds":{"type":"number","computed":true},"timeout":{"type":"number","optional":true,"default":1},"transport":{"type":"string","required":true}},"block_types":{"header":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true},"volume_mounts":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"path":{"type":"string","required":true}}},"optional":true}}},"required":true},"custom_scale_rule":{"nesting_mode":3,"block":{"attributes":{"custom_rule_type":{"type":"string","required":true},"metadata":{"type":["map","string"],"required":true},"name":{"type":"string","required":true}},"block_types":{"authentication":{"nesting_mode":3,"block":{"attributes":{"secret_name":{"type":"string","required":true},"trigger_parameter":{"type":"string","required":true}}},"optional":true}}},"optional":true},"http_scale_rule":{"nesting_mode":3,"block":{"attributes":{"concurrent_requests":{"type":"string","required":true},"name":{"type":"string","required":true}},"block_types":{"authentication":{"nesting_mode":3,"block":{"attributes":{"secret_name":{"type":"string","required":true},"trigger_parameter":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"init_container":{"nesting_mode":3,"block":{"attributes":{"args":{"type":["list","string"],"optional":true},"command":{"type":["list","string"],"optional":true},"cpu":{"type":"number","optional":true},"ephemeral_storage":{"type":"string","computed":true},"image":{"type":"string","required":true},"memory":{"type":"string","optional":true},"name":{"type":"string","required":true}},"block_types":{"env":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"secret_name":{"type":"string","optional":true},"value":{"type":"string","optional":true}}},"optional":true},"volume_mounts":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"path":{"type":"string","required":true}}},"optional":true}}},"optional":true},"tcp_scale_rule":{"nesting_mode":3,"block":{"attributes":{"concurrent_requests":{"type":"string","required":true},"name":{"type":"string","required":true}},"block_types":{"authentication":{"nesting_mode":3,"block":{"attributes":{"secret_name":{"type":"string","required":true},"trigger_parameter":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"volume":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"storage_name":{"type":"string","optional":true},"storage_type":{"type":"string","optional":true,"default":"EmptyDir"}}},"optional":true}}},"required":true}}}},"azurerm_container_app_custom_domain":{"block":{"attributes":{"certificate_binding_type":{"type":"string","optional":true},"container_app_environment_certificate_id":{"type":"string","optional":true,"required_with":["certificate_binding_type"]},"container_app_environment_managed_certificate_id":{"type":"string","computed":true},"container_app_id":{"type":"string","required":true},"name":{"type":"string","required":true}}}},"azurerm_container_app_environment":{"block":{"attributes":{"custom_domain_verification_id":{"type":"string","computed":true},"dapr_application_insights_connection_string":{"type":"string","optional":true},"default_domain":{"type":"string","computed":true},"docker_bridge_cidr":{"type":"string","computed":true},"infrastructure_resource_group_name":{"type":"string","optional":true,"required_with":["workload_profile"]},"infrastructure_subnet_id":{"type":"string","optional":true},"internal_load_balancer_enabled":{"type":"bool","optional":true,"default":false,"required_with":["infrastructure_subnet_id"]},"location":{"type":"string","required":true},"log_analytics_workspace_id":{"type":"string","optional":true},"mutual_tls_enabled":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"platform_reserved_cidr":{"type":"string","computed":true},"platform_reserved_dns_ip_address":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"static_ip_address":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true},"zone_redundancy_enabled":{"type":"bool","optional":true,"default":false,"required_with":["infrastructure_subnet_id"]}},"block_types":{"workload_profile":{"nesting_mode":4,"block":{"attributes":{"maximum_count":{"type":"number","optional":true},"minimum_count":{"type":"number","optional":true},"name":{"type":"string","required":true},"workload_profile_type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_container_app_environment_certificate":{"block":{"attributes":{"certificate_blob_base64":{"type":"string","required":true},"certificate_password":{"type":"string","required":true},"container_app_environment_id":{"type":"string","required":true},"expiration_date":{"type":"string","computed":true},"issue_date":{"type":"string","computed":true},"issuer":{"type":"string","computed":true},"name":{"type":"string","required":true},"subject_name":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true},"thumbprint":{"type":"string","computed":true}}}},"azurerm_container_app_environment_custom_domain":{"block":{"attributes":{"certificate_blob_base64":{"type":"string","required":true},"certificate_password":{"type":"string","required":true},"container_app_environment_id":{"type":"string","required":true},"dns_suffix":{"type":"string","required":true}}}},"azurerm_container_app_environment_dapr_component":{"block":{"attributes":{"component_type":{"type":"string","required":true},"container_app_environment_id":{"type":"string","required":true},"ignore_errors":{"type":"bool","optional":true,"default":false},"init_timeout":{"type":"string","optional":true,"default":"5s"},"name":{"type":"string","required":true},"scopes":{"type":["list","string"],"optional":true},"version":{"type":"string","required":true}},"block_types":{"metadata":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"secret_name":{"type":"string","optional":true},"value":{"type":"string","optional":true}}},"optional":true},"secret":{"nesting_mode":4,"block":{"attributes":{"identity":{"type":"string","optional":true},"key_vault_secret_id":{"type":"string","optional":true},"name":{"type":"string","required":true},"value":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_container_app_environment_storage":{"block":{"attributes":{"access_key":{"type":"string","required":true},"access_mode":{"type":"string","required":true},"account_name":{"type":"string","required":true},"container_app_environment_id":{"type":"string","required":true},"name":{"type":"string","required":true},"share_name":{"type":"string","required":true}}}},"azurerm_container_app_job":{"block":{"attributes":{"container_app_environment_id":{"type":"string","required":true},"event_stream_endpoint":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"outbound_ip_addresses":{"type":["list","string"],"computed":true},"replica_retry_limit":{"type":"number","optional":true},"replica_timeout_in_seconds":{"type":"number","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"workload_profile_name":{"type":"string","optional":true}},"block_types":{"event_trigger_config":{"nesting_mode":3,"block":{"attributes":{"parallelism":{"type":"number","optional":true,"default":1},"replica_completion_count":{"type":"number","optional":true,"default":1}},"block_types":{"scale":{"nesting_mode":3,"block":{"attributes":{"max_executions":{"type":"number","optional":true,"default":100},"min_executions":{"type":"number","optional":true,"default":0},"polling_interval_in_seconds":{"type":"number","optional":true,"default":30}},"block_types":{"rules":{"nesting_mode":3,"block":{"attributes":{"custom_rule_type":{"type":"string","required":true},"metadata":{"type":["map","string"],"required":true},"name":{"type":"string","required":true}},"block_types":{"authentication":{"nesting_mode":3,"block":{"attributes":{"secret_name":{"type":"string","required":true},"trigger_parameter":{"type":"string","required":true}}},"optional":true}}},"optional":true}}},"optional":true}}},"optional":true,"exactly_one_of":["event_trigger_config","manual_trigger_config","schedule_trigger_config"]},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"manual_trigger_config":{"nesting_mode":3,"block":{"attributes":{"parallelism":{"type":"number","optional":true,"default":1},"replica_completion_count":{"type":"number","optional":true,"default":1}}},"optional":true,"exactly_one_of":["event_trigger_config","manual_trigger_config","schedule_trigger_config"]},"registry":{"nesting_mode":3,"block":{"attributes":{"identity":{"type":"string","optional":true},"password_secret_name":{"type":"string","optional":true},"server":{"type":"string","required":true},"username":{"type":"string","optional":true}}},"optional":true},"schedule_trigger_config":{"nesting_mode":3,"block":{"attributes":{"cron_expression":{"type":"string","required":true},"parallelism":{"type":"number","optional":true,"default":1},"replica_completion_count":{"type":"number","optional":true,"default":1}}},"optional":true,"exactly_one_of":["event_trigger_config","manual_trigger_config","schedule_trigger_config"]},"secret":{"nesting_mode":4,"block":{"attributes":{"identity":{"type":"string","optional":true},"key_vault_secret_id":{"type":"string","optional":true},"name":{"type":"string","required":true},"value":{"type":"string","optional":true}}},"optional":true},"template":{"nesting_mode":3,"block":{"block_types":{"container":{"nesting_mode":3,"block":{"attributes":{"args":{"type":["list","string"],"optional":true},"command":{"type":["list","string"],"optional":true},"cpu":{"type":"number","required":true},"ephemeral_storage":{"type":"string","computed":true},"image":{"type":"string","required":true},"memory":{"type":"string","required":true},"name":{"type":"string","required":true}},"block_types":{"env":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"secret_name":{"type":"string","optional":true},"value":{"type":"string","optional":true}}},"optional":true},"liveness_probe":{"nesting_mode":3,"block":{"attributes":{"failure_count_threshold":{"type":"number","optional":true,"default":3},"host":{"type":"string","optional":true},"initial_delay":{"type":"number","optional":true,"default":1},"interval_seconds":{"type":"number","optional":true,"default":10},"path":{"type":"string","optional":true,"computed":true},"port":{"type":"number","required":true},"termination_grace_period_seconds":{"type":"number","computed":true},"timeout":{"type":"number","optional":true,"default":1},"transport":{"type":"string","required":true}},"block_types":{"header":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true},"readiness_probe":{"nesting_mode":3,"block":{"attributes":{"failure_count_threshold":{"type":"number","optional":true,"default":3},"host":{"type":"string","optional":true},"interval_seconds":{"type":"number","optional":true,"default":10},"path":{"type":"string","optional":true,"computed":true},"port":{"type":"number","required":true},"success_count_threshold":{"type":"number","optional":true,"default":3},"timeout":{"type":"number","optional":true,"default":1},"transport":{"type":"string","required":true}},"block_types":{"header":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true},"startup_probe":{"nesting_mode":3,"block":{"attributes":{"failure_count_threshold":{"type":"number","optional":true,"default":3},"host":{"type":"string","optional":true},"interval_seconds":{"type":"number","optional":true,"default":10},"path":{"type":"string","optional":true,"computed":true},"port":{"type":"number","required":true},"termination_grace_period_seconds":{"type":"number","computed":true},"timeout":{"type":"number","optional":true,"default":1},"transport":{"type":"string","required":true}},"block_types":{"header":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true},"volume_mounts":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"path":{"type":"string","required":true}}},"optional":true}}},"required":true},"init_container":{"nesting_mode":3,"block":{"attributes":{"args":{"type":["list","string"],"optional":true},"command":{"type":["list","string"],"optional":true},"cpu":{"type":"number","optional":true},"ephemeral_storage":{"type":"string","computed":true},"image":{"type":"string","required":true},"memory":{"type":"string","optional":true},"name":{"type":"string","required":true}},"block_types":{"env":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"secret_name":{"type":"string","optional":true},"value":{"type":"string","optional":true}}},"optional":true},"volume_mounts":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"path":{"type":"string","required":true}}},"optional":true}}},"optional":true},"volume":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"storage_name":{"type":"string","optional":true},"storage_type":{"type":"string","optional":true,"default":"EmptyDir"}}},"optional":true}}},"required":true}}}},"azurerm_container_connected_registry":{"block":{"attributes":{"audit_log_enabled":{"type":"bool","optional":true,"default":false},"client_token_ids":{"type":["list","string"],"optional":true},"container_registry_id":{"type":"string","required":true},"log_level":{"type":"string","optional":true,"default":"None"},"mode":{"type":"string","optional":true,"default":"ReadWrite"},"name":{"type":"string","required":true},"parent_registry_id":{"type":"string","optional":true},"sync_message_ttl":{"type":"string","optional":true,"default":"P1D"},"sync_schedule":{"type":"string","optional":true,"default":"* * * * *"},"sync_token_id":{"type":"string","required":true},"sync_window":{"type":"string","optional":true}},"block_types":{"notification":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"digest":{"type":"string","optional":true},"name":{"type":"string","required":true},"tag":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_container_group":{"block":{"attributes":{"dns_name_label":{"type":"string","optional":true},"dns_name_label_reuse_policy":{"type":"string","optional":true,"default":"Unsecure"},"exposed_port":{"type":["set",["object",{"port":"number","protocol":"string"}]],"optional":true,"computed":true},"fqdn":{"type":"string","computed":true},"ip_address":{"type":"string","computed":true},"ip_address_type":{"type":"string","optional":true,"default":"Public"},"key_vault_key_id":{"type":"string","optional":true},"key_vault_user_assigned_identity_id":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"network_profile_id":{"type":"string","optional":true,"computed":true},"os_type":{"type":"string","required":true},"priority":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"restart_policy":{"type":"string","optional":true,"default":"Always"},"sku":{"type":"string","optional":true,"default":"Standard"},"subnet_ids":{"type":["set","string"],"optional":true,"conflicts_with":["dns_name_label"]},"tags":{"type":["map","string"],"optional":true},"zones":{"type":["set","string"],"optional":true}},"block_types":{"container":{"nesting_mode":3,"block":{"attributes":{"commands":{"type":["list","string"],"optional":true,"computed":true},"cpu":{"type":"number","required":true},"cpu_limit":{"type":"number","optional":true},"environment_variables":{"type":["map","string"],"optional":true},"image":{"type":"string","required":true},"memory":{"type":"number","required":true},"memory_limit":{"type":"number","optional":true},"name":{"type":"string","required":true},"secure_environment_variables":{"type":["map","string"],"optional":true}},"block_types":{"liveness_probe":{"nesting_mode":3,"block":{"attributes":{"exec":{"type":["list","string"],"optional":true},"failure_threshold":{"type":"number","optional":true},"initial_delay_seconds":{"type":"number","optional":true},"period_seconds":{"type":"number","optional":true},"success_threshold":{"type":"number","optional":true},"timeout_seconds":{"type":"number","optional":true}},"block_types":{"http_get":{"nesting_mode":3,"block":{"attributes":{"http_headers":{"type":["map","string"],"optional":true},"path":{"type":"string","optional":true},"port":{"type":"number","optional":true},"scheme":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"ports":{"nesting_mode":4,"block":{"attributes":{"port":{"type":"number","optional":true},"protocol":{"type":"string","optional":true,"default":"TCP"}}},"optional":true},"readiness_probe":{"nesting_mode":3,"block":{"attributes":{"exec":{"type":["list","string"],"optional":true},"failure_threshold":{"type":"number","optional":true},"initial_delay_seconds":{"type":"number","optional":true},"period_seconds":{"type":"number","optional":true},"success_threshold":{"type":"number","optional":true},"timeout_seconds":{"type":"number","optional":true}},"block_types":{"http_get":{"nesting_mode":3,"block":{"attributes":{"http_headers":{"type":["map","string"],"optional":true},"path":{"type":"string","optional":true},"port":{"type":"number","optional":true},"scheme":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"security":{"nesting_mode":3,"block":{"attributes":{"privilege_enabled":{"type":"bool","required":true}}},"optional":true},"volume":{"nesting_mode":3,"block":{"attributes":{"empty_dir":{"type":"bool","optional":true,"default":false},"mount_path":{"type":"string","required":true},"name":{"type":"string","required":true},"read_only":{"type":"bool","optional":true,"default":false},"secret":{"type":["map","string"],"optional":true},"share_name":{"type":"string","optional":true},"storage_account_key":{"type":"string","optional":true},"storage_account_name":{"type":"string","optional":true}},"block_types":{"git_repo":{"nesting_mode":3,"block":{"attributes":{"directory":{"type":"string","optional":true},"revision":{"type":"string","optional":true},"url":{"type":"string","required":true}}},"optional":true}}},"optional":true}}},"required":true},"diagnostics":{"nesting_mode":3,"block":{"block_types":{"log_analytics":{"nesting_mode":3,"block":{"attributes":{"log_type":{"type":"string","optional":true},"metadata":{"type":["map","string"],"optional":true},"workspace_id":{"type":"string","required":true},"workspace_key":{"type":"string","required":true}}},"required":true}}},"optional":true},"dns_config":{"nesting_mode":3,"block":{"attributes":{"nameservers":{"type":["list","string"],"required":true},"options":{"type":["set","string"],"optional":true},"search_domains":{"type":["set","string"],"optional":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"image_registry_credential":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","optional":true},"server":{"type":"string","required":true},"user_assigned_identity_id":{"type":"string","optional":true},"username":{"type":"string","optional":true}}},"optional":true},"init_container":{"nesting_mode":3,"block":{"attributes":{"commands":{"type":["list","string"],"optional":true,"computed":true},"environment_variables":{"type":["map","string"],"optional":true},"image":{"type":"string","required":true},"name":{"type":"string","required":true},"secure_environment_variables":{"type":["map","string"],"optional":true}},"block_types":{"security":{"nesting_mode":3,"block":{"attributes":{"privilege_enabled":{"type":"bool","required":true}}},"optional":true},"volume":{"nesting_mode":3,"block":{"attributes":{"empty_dir":{"type":"bool","optional":true,"default":false},"mount_path":{"type":"string","required":true},"name":{"type":"string","required":true},"read_only":{"type":"bool","optional":true,"default":false},"secret":{"type":["map","string"],"optional":true},"share_name":{"type":"string","optional":true},"storage_account_key":{"type":"string","optional":true},"storage_account_name":{"type":"string","optional":true}},"block_types":{"git_repo":{"nesting_mode":3,"block":{"attributes":{"directory":{"type":"string","optional":true},"revision":{"type":"string","optional":true},"url":{"type":"string","required":true}}},"optional":true}}},"optional":true}}},"optional":true}}}},"azurerm_container_registry":{"block":{"attributes":{"admin_enabled":{"type":"bool","optional":true,"default":false},"admin_password":{"type":"string","computed":true},"admin_username":{"type":"string","computed":true},"anonymous_pull_enabled":{"type":"bool","optional":true},"data_endpoint_enabled":{"type":"bool","optional":true},"encryption":{"type":["list",["object",{"identity_client_id":"string","key_vault_key_id":"string"}]],"optional":true,"computed":true},"export_policy_enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"login_server":{"type":"string","computed":true},"name":{"type":"string","required":true},"network_rule_bypass_option":{"type":"string","optional":true,"default":"AzureServices"},"network_rule_set":{"type":["list",["object",{"default_action":"string","ip_rule":["set",["object",{"action":"string","ip_range":"string"}]]}]],"optional":true,"computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"quarantine_policy_enabled":{"type":"bool","optional":true},"resource_group_name":{"type":"string","required":true},"retention_policy_in_days":{"type":"number","optional":true},"sku":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"trust_policy_enabled":{"type":"bool","optional":true,"default":false},"zone_redundancy_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"georeplications":{"nesting_mode":3,"block":{"attributes":{"location":{"type":"string","required":true},"regional_endpoint_enabled":{"type":"bool","optional":true},"tags":{"type":["map","string"],"optional":true},"zone_redundancy_enabled":{"type":"bool","optional":true,"default":false}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_container_registry_agent_pool":{"block":{"attributes":{"container_registry_name":{"type":"string","required":true},"instance_count":{"type":"number","optional":true,"default":1},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"tier":{"type":"string","optional":true,"default":"S1"},"virtual_network_subnet_id":{"type":"string","optional":true}}}},"azurerm_container_registry_cache_rule":{"block":{"attributes":{"container_registry_id":{"type":"string","required":true},"credential_set_id":{"type":"string","optional":true},"name":{"type":"string","required":true},"source_repo":{"type":"string","required":true},"target_repo":{"type":"string","required":true}}}},"azurerm_container_registry_scope_map":{"block":{"attributes":{"actions":{"type":["list","string"],"required":true},"container_registry_name":{"type":"string","required":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_container_registry_task":{"block":{"attributes":{"agent_pool_name":{"type":"string","optional":true},"container_registry_id":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":true},"is_system_task":{"type":"bool","optional":true,"default":false},"log_template":{"type":"string","optional":true},"name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"timeout_in_seconds":{"type":"number","optional":true,"default":3600}},"block_types":{"agent_setting":{"nesting_mode":3,"block":{"attributes":{"cpu":{"type":"number","required":true}}},"optional":true},"base_image_trigger":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"type":{"type":"string","required":true},"update_trigger_endpoint":{"type":"string","optional":true},"update_trigger_payload_type":{"type":"string","optional":true}}},"optional":true},"docker_step":{"nesting_mode":3,"block":{"attributes":{"arguments":{"type":["map","string"],"optional":true},"cache_enabled":{"type":"bool","optional":true,"default":true},"context_access_token":{"type":"string","required":true},"context_path":{"type":"string","required":true},"dockerfile_path":{"type":"string","required":true},"image_names":{"type":["list","string"],"optional":true},"push_enabled":{"type":"bool","optional":true,"default":true},"secret_arguments":{"type":["map","string"],"optional":true},"target":{"type":"string","optional":true}}},"optional":true,"conflicts_with":["file_step","encoded_step"]},"encoded_step":{"nesting_mode":3,"block":{"attributes":{"context_access_token":{"type":"string","optional":true},"context_path":{"type":"string","optional":true},"secret_values":{"type":["map","string"],"optional":true},"task_content":{"type":"string","required":true},"value_content":{"type":"string","optional":true},"values":{"type":["map","string"],"optional":true}}},"optional":true,"conflicts_with":["docker_step","file_step"]},"file_step":{"nesting_mode":3,"block":{"attributes":{"context_access_token":{"type":"string","optional":true},"context_path":{"type":"string","optional":true},"secret_values":{"type":["map","string"],"optional":true},"task_file_path":{"type":"string","required":true},"value_file_path":{"type":"string","optional":true},"values":{"type":["map","string"],"optional":true}}},"optional":true,"conflicts_with":["docker_step","encoded_step"]},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"platform":{"nesting_mode":3,"block":{"attributes":{"architecture":{"type":"string","optional":true},"os":{"type":"string","required":true},"variant":{"type":"string","optional":true}}},"optional":true},"registry_credential":{"nesting_mode":3,"block":{"block_types":{"custom":{"nesting_mode":4,"block":{"attributes":{"identity":{"type":"string","optional":true},"login_server":{"type":"string","required":true},"password":{"type":"string","optional":true},"username":{"type":"string","optional":true}}},"optional":true,"at_least_one_of":["registry_credential.0.source","registry_credential.0.custom"]},"source":{"nesting_mode":3,"block":{"attributes":{"login_mode":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["registry_credential.0.source","registry_credential.0.custom"]}}},"optional":true},"source_trigger":{"nesting_mode":3,"block":{"attributes":{"branch":{"type":"string","optional":true},"enabled":{"type":"bool","optional":true,"default":true},"events":{"type":["list","string"],"required":true},"name":{"type":"string","required":true},"repository_url":{"type":"string","required":true},"source_type":{"type":"string","required":true}},"block_types":{"authentication":{"nesting_mode":3,"block":{"attributes":{"expire_in_seconds":{"type":"number","optional":true},"refresh_token":{"type":"string","optional":true},"scope":{"type":"string","optional":true},"token":{"type":"string","required":true},"token_type":{"type":"string","required":true}}},"optional":true}}},"optional":true},"timer_trigger":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"schedule":{"type":"string","required":true}}},"optional":true}}}},"azurerm_container_registry_task_schedule_run_now":{"block":{"attributes":{"container_registry_task_id":{"type":"string","required":true}}}},"azurerm_container_registry_token":{"block":{"attributes":{"container_registry_name":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"scope_map_id":{"type":"string","required":true}}}},"azurerm_container_registry_token_password":{"block":{"attributes":{"container_registry_token_id":{"type":"string","required":true}},"block_types":{"password1":{"nesting_mode":3,"block":{"attributes":{"expiry":{"type":"string","optional":true},"value":{"type":"string","computed":true}}},"required":true},"password2":{"nesting_mode":3,"block":{"attributes":{"expiry":{"type":"string","optional":true},"value":{"type":"string","computed":true}}},"optional":true}}}},"azurerm_container_registry_webhook":{"block":{"attributes":{"actions":{"type":["set","string"],"required":true},"custom_headers":{"type":["map","string"],"optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"registry_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"scope":{"type":"string","optional":true,"default":""},"service_uri":{"type":"string","required":true},"status":{"type":"string","optional":true,"default":"enabled"},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_cosmosdb_account":{"block":{"attributes":{"access_key_metadata_writes_enabled":{"type":"bool","optional":true,"default":true},"analytical_storage_enabled":{"type":"bool","optional":true,"default":false},"automatic_failover_enabled":{"type":"bool","optional":true,"default":false},"burst_capacity_enabled":{"type":"bool","optional":true,"default":false},"create_mode":{"type":"string","optional":true,"computed":true},"default_identity_type":{"type":"string","optional":true,"default":"FirstPartyIdentity"},"endpoint":{"type":"string","computed":true},"free_tier_enabled":{"type":"bool","optional":true,"default":false},"ip_range_filter":{"type":["set","string"],"optional":true},"is_virtual_network_filter_enabled":{"type":"bool","optional":true,"default":false},"key_vault_key_id":{"type":"string","optional":true},"kind":{"type":"string","optional":true,"default":"GlobalDocumentDB"},"local_authentication_disabled":{"type":"bool","optional":true,"default":false},"location":{"type":"string","required":true},"minimal_tls_version":{"type":"string","optional":true,"default":"Tls12"},"mongo_server_version":{"type":"string","optional":true,"computed":true},"multiple_write_locations_enabled":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"network_acl_bypass_for_azure_services":{"type":"bool","optional":true,"default":false},"network_acl_bypass_ids":{"type":["list","string"],"optional":true},"offer_type":{"type":"string","required":true},"partition_merge_enabled":{"type":"bool","optional":true,"default":false},"primary_key":{"type":"string","computed":true},"primary_mongodb_connection_string":{"type":"string","computed":true},"primary_readonly_key":{"type":"string","computed":true},"primary_readonly_mongodb_connection_string":{"type":"string","computed":true},"primary_readonly_sql_connection_string":{"type":"string","computed":true},"primary_sql_connection_string":{"type":"string","computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"read_endpoints":{"type":["list","string"],"computed":true},"resource_group_name":{"type":"string","required":true},"secondary_key":{"type":"string","computed":true},"secondary_mongodb_connection_string":{"type":"string","computed":true},"secondary_readonly_key":{"type":"string","computed":true},"secondary_readonly_mongodb_connection_string":{"type":"string","computed":true},"secondary_readonly_sql_connection_string":{"type":"string","computed":true},"secondary_sql_connection_string":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true},"write_endpoints":{"type":["list","string"],"computed":true}},"block_types":{"analytical_storage":{"nesting_mode":3,"block":{"attributes":{"schema_type":{"type":"string","required":true}}},"optional":true,"computed":true},"backup":{"nesting_mode":3,"block":{"attributes":{"interval_in_minutes":{"type":"number","optional":true,"computed":true},"retention_in_hours":{"type":"number","optional":true,"computed":true},"storage_redundancy":{"type":"string","optional":true,"computed":true},"tier":{"type":"string","optional":true,"computed":true},"type":{"type":"string","required":true}}},"optional":true,"computed":true},"capabilities":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true}}},"optional":true,"computed":true},"capacity":{"nesting_mode":3,"block":{"attributes":{"total_throughput_limit":{"type":"number","required":true}}},"optional":true,"computed":true},"consistency_policy":{"nesting_mode":3,"block":{"attributes":{"consistency_level":{"type":"string","required":true},"max_interval_in_seconds":{"type":"number","optional":true,"default":5},"max_staleness_prefix":{"type":"number","optional":true,"default":100}}},"required":true},"cors_rule":{"nesting_mode":3,"block":{"attributes":{"allowed_headers":{"type":["list","string"],"required":true},"allowed_methods":{"type":["list","string"],"required":true},"allowed_origins":{"type":["list","string"],"required":true},"exposed_headers":{"type":["list","string"],"required":true},"max_age_in_seconds":{"type":"number","optional":true}}},"optional":true},"geo_location":{"nesting_mode":4,"block":{"attributes":{"failover_priority":{"type":"number","required":true},"id":{"type":"string","computed":true},"location":{"type":"string","required":true},"zone_redundant":{"type":"bool","optional":true,"default":false}}},"required":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"restore":{"nesting_mode":3,"block":{"attributes":{"restore_timestamp_in_utc":{"type":"string","required":true},"source_cosmosdb_account_id":{"type":"string","required":true},"tables_to_restore":{"type":["list","string"],"optional":true}},"block_types":{"database":{"nesting_mode":4,"block":{"attributes":{"collection_names":{"type":["set","string"],"optional":true},"name":{"type":"string","required":true}}},"optional":true},"gremlin_database":{"nesting_mode":3,"block":{"attributes":{"graph_names":{"type":["list","string"],"optional":true},"name":{"type":"string","required":true}}},"optional":true}}},"optional":true},"virtual_network_rule":{"nesting_mode":4,"block":{"attributes":{"id":{"type":"string","required":true},"ignore_missing_vnet_service_endpoint":{"type":"bool","optional":true,"default":false}}},"optional":true}}}},"azurerm_cosmosdb_cassandra_cluster":{"block":{"attributes":{"authentication_method":{"type":"string","optional":true,"default":"Cassandra"},"client_certificate_pems":{"type":["list","string"],"optional":true},"default_admin_password":{"type":"string","required":true},"delegated_management_subnet_id":{"type":"string","required":true},"external_gossip_certificate_pems":{"type":["list","string"],"optional":true},"external_seed_node_ip_addresses":{"type":["list","string"],"optional":true},"hours_between_backups":{"type":"number","optional":true,"default":24},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"repair_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"version":{"type":"string","optional":true,"default":"3.11"}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_cosmosdb_cassandra_datacenter":{"block":{"attributes":{"availability_zones_enabled":{"type":"bool","optional":true,"default":true},"backup_storage_customer_key_uri":{"type":"string","optional":true},"base64_encoded_yaml_fragment":{"type":"string","optional":true},"cassandra_cluster_id":{"type":"string","required":true},"delegated_management_subnet_id":{"type":"string","required":true},"disk_count":{"type":"number","optional":true},"disk_sku":{"type":"string","optional":true,"default":"P30"},"location":{"type":"string","required":true},"managed_disk_customer_key_uri":{"type":"string","optional":true},"name":{"type":"string","required":true},"node_count":{"type":"number","optional":true,"default":3},"seed_node_ip_addresses":{"type":["list","string"],"computed":true},"sku_name":{"type":"string","optional":true,"default":"Standard_E16s_v5"}}}},"azurerm_cosmosdb_cassandra_keyspace":{"block":{"attributes":{"account_name":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"throughput":{"type":"number","optional":true,"computed":true}},"block_types":{"autoscale_settings":{"nesting_mode":3,"block":{"attributes":{"max_throughput":{"type":"number","optional":true,"computed":true,"conflicts_with":["throughput"]}}},"optional":true}}}},"azurerm_cosmosdb_cassandra_table":{"block":{"attributes":{"analytical_storage_ttl":{"type":"number","optional":true},"cassandra_keyspace_id":{"type":"string","required":true},"default_ttl":{"type":"number","optional":true},"name":{"type":"string","required":true},"throughput":{"type":"number","optional":true,"computed":true}},"block_types":{"autoscale_settings":{"nesting_mode":3,"block":{"attributes":{"max_throughput":{"type":"number","optional":true,"computed":true,"conflicts_with":["throughput"]}}},"optional":true},"schema":{"nesting_mode":3,"block":{"block_types":{"cluster_key":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"order_by":{"type":"string","required":true}}},"optional":true},"column":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"type":{"type":"string","required":true}}},"required":true},"partition_key":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true}}},"required":true}}},"required":true}}}},"azurerm_cosmosdb_gremlin_database":{"block":{"attributes":{"account_name":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"throughput":{"type":"number","optional":true,"computed":true}},"block_types":{"autoscale_settings":{"nesting_mode":3,"block":{"attributes":{"max_throughput":{"type":"number","optional":true,"computed":true,"conflicts_with":["throughput"]}}},"optional":true}}}},"azurerm_cosmosdb_gremlin_graph":{"block":{"attributes":{"account_name":{"type":"string","required":true},"analytical_storage_ttl":{"type":"number","optional":true},"database_name":{"type":"string","required":true},"default_ttl":{"type":"number","optional":true},"name":{"type":"string","required":true},"partition_key_path":{"type":"string","required":true},"partition_key_version":{"type":"number","optional":true},"resource_group_name":{"type":"string","required":true},"throughput":{"type":"number","optional":true,"computed":true}},"block_types":{"autoscale_settings":{"nesting_mode":3,"block":{"attributes":{"max_throughput":{"type":"number","optional":true,"computed":true,"conflicts_with":["throughput"]}}},"optional":true},"conflict_resolution_policy":{"nesting_mode":3,"block":{"attributes":{"conflict_resolution_path":{"type":"string","optional":true},"conflict_resolution_procedure":{"type":"string","optional":true},"mode":{"type":"string","required":true}}},"optional":true,"computed":true},"index_policy":{"nesting_mode":3,"block":{"attributes":{"automatic":{"type":"bool","optional":true,"default":true},"excluded_paths":{"type":["set","string"],"optional":true,"computed":true},"included_paths":{"type":["set","string"],"optional":true,"computed":true},"indexing_mode":{"type":"string","required":true}},"block_types":{"composite_index":{"nesting_mode":3,"block":{"block_types":{"index":{"nesting_mode":3,"block":{"attributes":{"order":{"type":"string","required":true},"path":{"type":"string","required":true}}},"required":true}}},"optional":true},"spatial_index":{"nesting_mode":3,"block":{"attributes":{"path":{"type":"string","required":true},"types":{"type":["set","string"],"computed":true}}},"optional":true}}},"optional":true,"computed":true},"unique_key":{"nesting_mode":4,"block":{"attributes":{"paths":{"type":["set","string"],"required":true}}},"optional":true}}}},"azurerm_cosmosdb_mongo_collection":{"block":{"attributes":{"account_name":{"type":"string","required":true},"analytical_storage_ttl":{"type":"number","optional":true},"database_name":{"type":"string","required":true},"default_ttl_seconds":{"type":"number","optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"shard_key":{"type":"string","optional":true},"system_indexes":{"type":["list",["object",{"keys":["list","string"],"unique":"bool"}]],"computed":true},"throughput":{"type":"number","optional":true,"computed":true}},"block_types":{"autoscale_settings":{"nesting_mode":3,"block":{"attributes":{"max_throughput":{"type":"number","optional":true,"computed":true,"conflicts_with":["throughput"]}}},"optional":true},"index":{"nesting_mode":4,"block":{"attributes":{"keys":{"type":["list","string"],"required":true},"unique":{"type":"bool","optional":true,"default":false}}},"optional":true}}}},"azurerm_cosmosdb_mongo_database":{"block":{"attributes":{"account_name":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"throughput":{"type":"number","optional":true,"computed":true}},"block_types":{"autoscale_settings":{"nesting_mode":3,"block":{"attributes":{"max_throughput":{"type":"number","optional":true,"computed":true,"conflicts_with":["throughput"]}}},"optional":true}}}},"azurerm_cosmosdb_mongo_role_definition":{"block":{"attributes":{"cosmos_mongo_database_id":{"type":"string","required":true},"inherited_role_names":{"type":["list","string"],"optional":true},"role_name":{"type":"string","required":true}},"block_types":{"privilege":{"nesting_mode":3,"block":{"attributes":{"actions":{"type":["list","string"],"required":true}},"block_types":{"resource":{"nesting_mode":3,"block":{"attributes":{"collection_name":{"type":"string","optional":true},"db_name":{"type":"string","optional":true}}},"required":true}}},"optional":true}}}},"azurerm_cosmosdb_mongo_user_definition":{"block":{"attributes":{"cosmos_mongo_database_id":{"type":"string","required":true},"inherited_role_names":{"type":["list","string"],"optional":true},"password":{"type":"string","required":true},"username":{"type":"string","required":true}}}},"azurerm_cosmosdb_postgresql_cluster":{"block":{"attributes":{"administrator_login_password":{"type":"string","optional":true},"citus_version":{"type":"string","optional":true,"computed":true},"coordinator_public_ip_access_enabled":{"type":"bool","optional":true,"default":true},"coordinator_server_edition":{"type":"string","optional":true,"default":"GeneralPurpose"},"coordinator_storage_quota_in_mb":{"type":"number","optional":true},"coordinator_vcore_count":{"type":"number","optional":true},"earliest_restore_time":{"type":"string","computed":true},"ha_enabled":{"type":"bool","optional":true,"default":false},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"node_count":{"type":"number","required":true},"node_public_ip_access_enabled":{"type":"bool","optional":true,"default":false},"node_server_edition":{"type":"string","optional":true,"default":"MemoryOptimized"},"node_storage_quota_in_mb":{"type":"number","optional":true,"computed":true},"node_vcores":{"type":"number","optional":true,"computed":true},"point_in_time_in_utc":{"type":"string","optional":true,"required_with":["source_location","source_resource_id"]},"preferred_primary_zone":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"servers":{"type":["list",["object",{"fqdn":"string","name":"string"}]],"computed":true},"shards_on_coordinator_enabled":{"type":"bool","optional":true,"computed":true},"source_location":{"type":"string","optional":true,"required_with":["source_resource_id"]},"source_resource_id":{"type":"string","optional":true,"required_with":["source_location"]},"sql_version":{"type":"string","optional":true,"computed":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"maintenance_window":{"nesting_mode":3,"block":{"attributes":{"day_of_week":{"type":"number","optional":true,"default":0},"start_hour":{"type":"number","optional":true,"default":0},"start_minute":{"type":"number","optional":true,"default":0}}},"optional":true}}}},"azurerm_cosmosdb_postgresql_coordinator_configuration":{"block":{"attributes":{"cluster_id":{"type":"string","required":true},"name":{"type":"string","required":true},"value":{"type":"string","required":true}}}},"azurerm_cosmosdb_postgresql_firewall_rule":{"block":{"attributes":{"cluster_id":{"type":"string","required":true},"end_ip_address":{"type":"string","required":true},"name":{"type":"string","required":true},"start_ip_address":{"type":"string","required":true}}}},"azurerm_cosmosdb_postgresql_node_configuration":{"block":{"attributes":{"cluster_id":{"type":"string","required":true},"name":{"type":"string","required":true},"value":{"type":"string","required":true}}}},"azurerm_cosmosdb_postgresql_role":{"block":{"attributes":{"cluster_id":{"type":"string","required":true},"name":{"type":"string","required":true},"password":{"type":"string","required":true}}}},"azurerm_cosmosdb_sql_container":{"block":{"attributes":{"account_name":{"type":"string","required":true},"analytical_storage_ttl":{"type":"number","optional":true},"database_name":{"type":"string","required":true},"default_ttl":{"type":"number","optional":true},"name":{"type":"string","required":true},"partition_key_kind":{"type":"string","optional":true,"default":"Hash"},"partition_key_paths":{"type":["list","string"],"required":true},"partition_key_version":{"type":"number","optional":true},"resource_group_name":{"type":"string","required":true},"throughput":{"type":"number","optional":true,"computed":true}},"block_types":{"autoscale_settings":{"nesting_mode":3,"block":{"attributes":{"max_throughput":{"type":"number","optional":true,"computed":true,"conflicts_with":["throughput"]}}},"optional":true},"conflict_resolution_policy":{"nesting_mode":3,"block":{"attributes":{"conflict_resolution_path":{"type":"string","optional":true},"conflict_resolution_procedure":{"type":"string","optional":true},"mode":{"type":"string","required":true}}},"optional":true,"computed":true},"indexing_policy":{"nesting_mode":3,"block":{"attributes":{"indexing_mode":{"type":"string","optional":true,"default":"consistent"}},"block_types":{"composite_index":{"nesting_mode":3,"block":{"block_types":{"index":{"nesting_mode":3,"block":{"attributes":{"order":{"type":"string","required":true},"path":{"type":"string","required":true}}},"required":true}}},"optional":true},"excluded_path":{"nesting_mode":3,"block":{"attributes":{"path":{"type":"string","required":true}}},"optional":true},"included_path":{"nesting_mode":3,"block":{"attributes":{"path":{"type":"string","required":true}}},"optional":true},"spatial_index":{"nesting_mode":3,"block":{"attributes":{"path":{"type":"string","required":true},"types":{"type":["set","string"],"computed":true}}},"optional":true}}},"optional":true,"computed":true},"unique_key":{"nesting_mode":4,"block":{"attributes":{"paths":{"type":["set","string"],"required":true}}},"optional":true}}}},"azurerm_cosmosdb_sql_database":{"block":{"attributes":{"account_name":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"throughput":{"type":"number","optional":true,"computed":true}},"block_types":{"autoscale_settings":{"nesting_mode":3,"block":{"attributes":{"max_throughput":{"type":"number","optional":true,"computed":true,"conflicts_with":["throughput"]}}},"optional":true}}}},"azurerm_cosmosdb_sql_dedicated_gateway":{"block":{"attributes":{"cosmosdb_account_id":{"type":"string","required":true},"instance_count":{"type":"number","required":true},"instance_size":{"type":"string","required":true}}}},"azurerm_cosmosdb_sql_function":{"block":{"attributes":{"body":{"type":"string","required":true},"container_id":{"type":"string","required":true},"name":{"type":"string","required":true}}}},"azurerm_cosmosdb_sql_role_assignment":{"block":{"attributes":{"account_name":{"type":"string","required":true},"name":{"type":"string","optional":true,"computed":true},"principal_id":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"role_definition_id":{"type":"string","required":true},"scope":{"type":"string","required":true}}}},"azurerm_cosmosdb_sql_role_definition":{"block":{"attributes":{"account_name":{"type":"string","required":true},"assignable_scopes":{"type":["set","string"],"required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"role_definition_id":{"type":"string","optional":true,"computed":true},"type":{"type":"string","optional":true,"default":"CustomRole"}},"block_types":{"permissions":{"nesting_mode":4,"block":{"attributes":{"data_actions":{"type":["set","string"],"required":true}}},"required":true}}}},"azurerm_cosmosdb_sql_stored_procedure":{"block":{"attributes":{"account_name":{"type":"string","required":true},"body":{"type":"string","required":true},"container_name":{"type":"string","required":true},"database_name":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_cosmosdb_sql_trigger":{"block":{"attributes":{"body":{"type":"string","required":true},"container_id":{"type":"string","required":true},"name":{"type":"string","required":true},"operation":{"type":"string","required":true},"type":{"type":"string","required":true}}}},"azurerm_cosmosdb_table":{"block":{"attributes":{"account_name":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"throughput":{"type":"number","optional":true,"computed":true}},"block_types":{"autoscale_settings":{"nesting_mode":3,"block":{"attributes":{"max_throughput":{"type":"number","optional":true,"computed":true,"conflicts_with":["throughput"]}}},"optional":true}}}},"azurerm_cost_anomaly_alert":{"block":{"attributes":{"display_name":{"type":"string","required":true},"email_addresses":{"type":["set","string"],"required":true},"email_subject":{"type":"string","required":true},"message":{"type":"string","optional":true},"name":{"type":"string","required":true},"subscription_id":{"type":"string","optional":true,"computed":true}}}},"azurerm_cost_management_scheduled_action":{"block":{"attributes":{"day_of_month":{"type":"number","optional":true},"days_of_week":{"type":["list","string"],"optional":true},"display_name":{"type":"string","required":true},"email_address_sender":{"type":"string","required":true},"email_addresses":{"type":["list","string"],"required":true},"email_subject":{"type":"string","required":true},"end_date":{"type":"string","required":true},"frequency":{"type":"string","required":true},"hour_of_day":{"type":"number","optional":true},"message":{"type":"string","optional":true},"name":{"type":"string","required":true},"start_date":{"type":"string","required":true},"view_id":{"type":"string","required":true},"weeks_of_month":{"type":["list","string"],"optional":true}}}},"azurerm_custom_ip_prefix":{"block":{"attributes":{"cidr":{"type":"string","required":true},"commissioning_enabled":{"type":"bool","optional":true,"default":false},"internet_advertising_disabled":{"type":"bool","optional":true,"default":false},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"parent_custom_ip_prefix_id":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"roa_validity_end_date":{"type":"string","optional":true},"tags":{"type":["map","string"],"optional":true},"wan_validation_signed_message":{"type":"string","optional":true},"zones":{"type":["set","string"],"optional":true}}}},"azurerm_custom_provider":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"action":{"nesting_mode":4,"block":{"attributes":{"endpoint":{"type":"string","required":true},"name":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["resource_type","action"]},"resource_type":{"nesting_mode":4,"block":{"attributes":{"endpoint":{"type":"string","required":true},"name":{"type":"string","required":true},"routing_type":{"type":"string","optional":true,"default":"Proxy"}}},"optional":true,"at_least_one_of":["resource_type","action"]},"validation":{"nesting_mode":4,"block":{"attributes":{"specification":{"type":"string","required":true}}},"optional":true}}}},"azurerm_dashboard_grafana":{"block":{"attributes":{"api_key_enabled":{"type":"bool","optional":true,"default":false},"auto_generated_domain_name_label_scope":{"type":"string","optional":true,"default":"TenantReuse"},"deterministic_outbound_ip_enabled":{"type":"bool","optional":true,"default":false},"endpoint":{"type":"string","computed":true},"grafana_major_version":{"type":"string","required":true},"grafana_version":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"outbound_ip":{"type":["list","string"],"computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"sku":{"type":"string","optional":true,"default":"Standard"},"tags":{"type":["map","string"],"optional":true},"zone_redundancy_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"azure_monitor_workspace_integrations":{"nesting_mode":3,"block":{"attributes":{"resource_id":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"smtp":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":false},"from_address":{"type":"string","required":true},"from_name":{"type":"string","optional":true,"default":"Azure Managed Grafana Notification"},"host":{"type":"string","required":true},"password":{"type":"string","required":true},"start_tls_policy":{"type":"string","required":true},"user":{"type":"string","required":true},"verification_skip_enabled":{"type":"bool","optional":true,"default":false}}},"optional":true}}}},"azurerm_data_factory":{"block":{"attributes":{"customer_managed_key_id":{"type":"string","optional":true},"customer_managed_key_identity_id":{"type":"string","optional":true,"required_with":["customer_managed_key_id"]},"location":{"type":"string","required":true},"managed_virtual_network_enabled":{"type":"bool","optional":true},"name":{"type":"string","required":true},"public_network_enabled":{"type":"bool","optional":true,"default":true},"purview_id":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"github_configuration":{"nesting_mode":3,"block":{"attributes":{"account_name":{"type":"string","required":true},"branch_name":{"type":"string","required":true},"git_url":{"type":"string","optional":true},"publishing_enabled":{"type":"bool","optional":true,"default":true},"repository_name":{"type":"string","required":true},"root_folder":{"type":"string","required":true}}},"optional":true,"conflicts_with":["vsts_configuration"]},"global_parameter":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"type":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"vsts_configuration":{"nesting_mode":3,"block":{"attributes":{"account_name":{"type":"string","required":true},"branch_name":{"type":"string","required":true},"project_name":{"type":"string","required":true},"publishing_enabled":{"type":"bool","optional":true,"default":true},"repository_name":{"type":"string","required":true},"root_folder":{"type":"string","required":true},"tenant_id":{"type":"string","required":true}}},"optional":true,"conflicts_with":["github_configuration"]}}}},"azurerm_data_factory_credential_service_principal":{"block":{"attributes":{"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"service_principal_id":{"type":"string","required":true},"tenant_id":{"type":"string","required":true}},"block_types":{"service_principal_key":{"nesting_mode":3,"block":{"attributes":{"linked_service_name":{"type":"string","required":true},"secret_name":{"type":"string","required":true},"secret_version":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_data_factory_credential_user_managed_identity":{"block":{"attributes":{"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"identity_id":{"type":"string","required":true},"name":{"type":"string","required":true}}}},"azurerm_data_factory_custom_dataset":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"folder":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"schema_json":{"type":"string","optional":true},"type":{"type":"string","required":true},"type_properties_json":{"type":"string","required":true}},"block_types":{"linked_service":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"required":true}}}},"azurerm_data_factory_data_flow":{"block":{"attributes":{"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"folder":{"type":"string","optional":true},"name":{"type":"string","required":true},"script":{"type":"string","optional":true,"at_least_one_of":["script","script_lines"]},"script_lines":{"type":["list","string"],"optional":true,"at_least_one_of":["script","script_lines"]}},"block_types":{"sink":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"name":{"type":"string","required":true}},"block_types":{"dataset":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true},"flowlet":{"nesting_mode":3,"block":{"attributes":{"dataset_parameters":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true},"linked_service":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true},"rejected_linked_service":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true},"schema_linked_service":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true}}},"required":true},"source":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"name":{"type":"string","required":true}},"block_types":{"dataset":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true},"flowlet":{"nesting_mode":3,"block":{"attributes":{"dataset_parameters":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true},"linked_service":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true},"rejected_linked_service":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true},"schema_linked_service":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true}}},"required":true},"transformation":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"name":{"type":"string","required":true}},"block_types":{"dataset":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true},"flowlet":{"nesting_mode":3,"block":{"attributes":{"dataset_parameters":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true},"linked_service":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true}}},"optional":true}}}},"azurerm_data_factory_dataset_azure_blob":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"dynamic_filename_enabled":{"type":"bool","optional":true,"default":false},"dynamic_path_enabled":{"type":"bool","optional":true,"default":false},"filename":{"type":"string","optional":true},"folder":{"type":"string","optional":true},"linked_service_name":{"type":"string","required":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"path":{"type":"string","optional":true}},"block_types":{"schema_column":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"type":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_data_factory_dataset_azure_sql_table":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"folder":{"type":"string","optional":true},"linked_service_id":{"type":"string","required":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"schema":{"type":"string","optional":true},"table":{"type":"string","optional":true}},"block_types":{"schema_column":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"type":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_data_factory_dataset_binary":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"folder":{"type":"string","optional":true},"linked_service_name":{"type":"string","required":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}},"block_types":{"azure_blob_storage_location":{"nesting_mode":3,"block":{"attributes":{"container":{"type":"string","required":true},"dynamic_container_enabled":{"type":"bool","optional":true,"default":false},"dynamic_filename_enabled":{"type":"bool","optional":true,"default":false},"dynamic_path_enabled":{"type":"bool","optional":true,"default":false},"filename":{"type":"string","optional":true},"path":{"type":"string","optional":true}}},"optional":true,"conflicts_with":["http_server_location","sftp_server_location"]},"compression":{"nesting_mode":3,"block":{"attributes":{"level":{"type":"string","optional":true},"type":{"type":"string","required":true}}},"optional":true},"http_server_location":{"nesting_mode":3,"block":{"attributes":{"dynamic_filename_enabled":{"type":"bool","optional":true,"default":false},"dynamic_path_enabled":{"type":"bool","optional":true,"default":false},"filename":{"type":"string","required":true},"path":{"type":"string","required":true},"relative_url":{"type":"string","required":true}}},"optional":true,"conflicts_with":["azure_blob_storage_location","sftp_server_location"]},"sftp_server_location":{"nesting_mode":3,"block":{"attributes":{"dynamic_filename_enabled":{"type":"bool","optional":true,"default":false},"dynamic_path_enabled":{"type":"bool","optional":true,"default":false},"filename":{"type":"string","required":true},"path":{"type":"string","required":true}}},"optional":true,"conflicts_with":["azure_blob_storage_location","http_server_location"]}}}},"azurerm_data_factory_dataset_cosmosdb_sqlapi":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"collection_name":{"type":"string","optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"folder":{"type":"string","optional":true},"linked_service_name":{"type":"string","required":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}},"block_types":{"schema_column":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"type":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_data_factory_dataset_delimited_text":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"column_delimiter":{"type":"string","optional":true,"default":","},"compression_codec":{"type":"string","optional":true},"compression_level":{"type":"string","optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"encoding":{"type":"string","optional":true},"escape_character":{"type":"string","optional":true,"default":"\\"},"first_row_as_header":{"type":"bool","optional":true,"default":false},"folder":{"type":"string","optional":true},"linked_service_name":{"type":"string","required":true},"name":{"type":"string","required":true},"null_value":{"type":"string","optional":true,"default":""},"parameters":{"type":["map","string"],"optional":true},"quote_character":{"type":"string","optional":true,"default":"\""},"row_delimiter":{"type":"string","optional":true}},"block_types":{"azure_blob_fs_location":{"nesting_mode":3,"block":{"attributes":{"dynamic_file_system_enabled":{"type":"bool","optional":true,"default":false},"dynamic_filename_enabled":{"type":"bool","optional":true,"default":false},"dynamic_path_enabled":{"type":"bool","optional":true,"default":false},"file_system":{"type":"string","optional":true},"filename":{"type":"string","optional":true},"path":{"type":"string","optional":true}}},"optional":true,"exactly_one_of":["http_server_location","azure_blob_storage_location","azure_blob_fs_location"]},"azure_blob_storage_location":{"nesting_mode":3,"block":{"attributes":{"container":{"type":"string","required":true},"dynamic_container_enabled":{"type":"bool","optional":true,"default":false},"dynamic_filename_enabled":{"type":"bool","optional":true,"default":false},"dynamic_path_enabled":{"type":"bool","optional":true,"default":false},"filename":{"type":"string","optional":true},"path":{"type":"string","optional":true}}},"optional":true,"exactly_one_of":["http_server_location","azure_blob_storage_location","azure_blob_fs_location"]},"http_server_location":{"nesting_mode":3,"block":{"attributes":{"dynamic_filename_enabled":{"type":"bool","optional":true,"default":false},"dynamic_path_enabled":{"type":"bool","optional":true,"default":false},"filename":{"type":"string","required":true},"path":{"type":"string","required":true},"relative_url":{"type":"string","required":true}}},"optional":true,"exactly_one_of":["http_server_location","azure_blob_storage_location","azure_blob_fs_location"]},"schema_column":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"type":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_data_factory_dataset_http":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"folder":{"type":"string","optional":true},"linked_service_name":{"type":"string","required":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"relative_url":{"type":"string","optional":true},"request_body":{"type":"string","optional":true},"request_method":{"type":"string","optional":true}},"block_types":{"schema_column":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"type":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_data_factory_dataset_json":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"encoding":{"type":"string","optional":true},"folder":{"type":"string","optional":true},"linked_service_name":{"type":"string","required":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}},"block_types":{"azure_blob_storage_location":{"nesting_mode":3,"block":{"attributes":{"container":{"type":"string","required":true},"dynamic_container_enabled":{"type":"bool","optional":true,"default":false},"dynamic_filename_enabled":{"type":"bool","optional":true,"default":false},"dynamic_path_enabled":{"type":"bool","optional":true,"default":false},"filename":{"type":"string","required":true},"path":{"type":"string","required":true}}},"optional":true,"conflicts_with":["http_server_location"]},"http_server_location":{"nesting_mode":3,"block":{"attributes":{"dynamic_filename_enabled":{"type":"bool","optional":true,"default":false},"dynamic_path_enabled":{"type":"bool","optional":true,"default":false},"filename":{"type":"string","required":true},"path":{"type":"string","required":true},"relative_url":{"type":"string","required":true}}},"optional":true,"conflicts_with":["azure_blob_storage_location"]},"schema_column":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"type":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_data_factory_dataset_mysql":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"folder":{"type":"string","optional":true},"linked_service_name":{"type":"string","required":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"table_name":{"type":"string","optional":true}},"block_types":{"schema_column":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"type":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_data_factory_dataset_parquet":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"compression_codec":{"type":"string","optional":true},"compression_level":{"type":"string","optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"folder":{"type":"string","optional":true},"linked_service_name":{"type":"string","required":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}},"block_types":{"azure_blob_fs_location":{"nesting_mode":3,"block":{"attributes":{"dynamic_file_system_enabled":{"type":"bool","optional":true,"default":false},"dynamic_filename_enabled":{"type":"bool","optional":true,"default":false},"dynamic_path_enabled":{"type":"bool","optional":true,"default":false},"file_system":{"type":"string","optional":true},"filename":{"type":"string","optional":true},"path":{"type":"string","optional":true}}},"optional":true,"exactly_one_of":["azure_blob_fs_location","azure_blob_storage_location","http_server_location"]},"azure_blob_storage_location":{"nesting_mode":3,"block":{"attributes":{"container":{"type":"string","required":true},"dynamic_container_enabled":{"type":"bool","optional":true,"default":false},"dynamic_filename_enabled":{"type":"bool","optional":true,"default":false},"dynamic_path_enabled":{"type":"bool","optional":true,"default":false},"filename":{"type":"string","optional":true},"path":{"type":"string","optional":true}}},"optional":true,"exactly_one_of":["azure_blob_fs_location","azure_blob_storage_location","http_server_location"]},"http_server_location":{"nesting_mode":3,"block":{"attributes":{"dynamic_filename_enabled":{"type":"bool","optional":true,"default":false},"dynamic_path_enabled":{"type":"bool","optional":true,"default":false},"filename":{"type":"string","required":true},"path":{"type":"string","optional":true},"relative_url":{"type":"string","required":true}}},"optional":true,"exactly_one_of":["azure_blob_fs_location","azure_blob_storage_location","http_server_location"]},"schema_column":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"type":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_data_factory_dataset_postgresql":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"folder":{"type":"string","optional":true},"linked_service_name":{"type":"string","required":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"table_name":{"type":"string","optional":true}},"block_types":{"schema_column":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"type":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_data_factory_dataset_snowflake":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"folder":{"type":"string","optional":true},"linked_service_name":{"type":"string","required":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"schema_name":{"type":"string","optional":true},"table_name":{"type":"string","optional":true}},"block_types":{"schema_column":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"precision":{"type":"number","optional":true},"scale":{"type":"number","optional":true},"type":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_data_factory_dataset_sql_server_table":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"folder":{"type":"string","optional":true},"linked_service_name":{"type":"string","required":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"table_name":{"type":"string","optional":true}},"block_types":{"schema_column":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"type":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_data_factory_flowlet_data_flow":{"block":{"attributes":{"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"folder":{"type":"string","optional":true},"name":{"type":"string","required":true},"script":{"type":"string","optional":true,"at_least_one_of":["script","script_lines"]},"script_lines":{"type":["list","string"],"optional":true,"at_least_one_of":["script","script_lines"]}},"block_types":{"sink":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"name":{"type":"string","required":true}},"block_types":{"dataset":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true},"flowlet":{"nesting_mode":3,"block":{"attributes":{"dataset_parameters":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true},"linked_service":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true},"rejected_linked_service":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true},"schema_linked_service":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true}}},"optional":true},"source":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"name":{"type":"string","required":true}},"block_types":{"dataset":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true},"flowlet":{"nesting_mode":3,"block":{"attributes":{"dataset_parameters":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true},"linked_service":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true},"rejected_linked_service":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true},"schema_linked_service":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true}}},"optional":true},"transformation":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"name":{"type":"string","required":true}},"block_types":{"dataset":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true},"flowlet":{"nesting_mode":3,"block":{"attributes":{"dataset_parameters":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true},"linked_service":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true}}},"optional":true}}}},"azurerm_data_factory_integration_runtime_azure":{"block":{"attributes":{"cleanup_enabled":{"type":"bool","optional":true,"default":true},"compute_type":{"type":"string","optional":true,"default":"General"},"core_count":{"type":"number","optional":true,"default":8},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"time_to_live_min":{"type":"number","optional":true,"default":0},"virtual_network_enabled":{"type":"bool","optional":true}}}},"azurerm_data_factory_integration_runtime_azure_ssis":{"block":{"attributes":{"credential_name":{"type":"string","optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"edition":{"type":"string","optional":true,"default":"Standard"},"license_type":{"type":"string","optional":true,"default":"LicenseIncluded"},"location":{"type":"string","required":true},"max_parallel_executions_per_node":{"type":"number","optional":true,"default":1},"name":{"type":"string","required":true},"node_size":{"type":"string","required":true},"number_of_nodes":{"type":"number","optional":true,"default":1}},"block_types":{"catalog_info":{"nesting_mode":3,"block":{"attributes":{"administrator_login":{"type":"string","optional":true},"administrator_password":{"type":"string","optional":true},"dual_standby_pair_name":{"type":"string","optional":true},"elastic_pool_name":{"type":"string","optional":true,"conflicts_with":["catalog_info.0.pricing_tier"]},"pricing_tier":{"type":"string","optional":true,"conflicts_with":["catalog_info.0.elastic_pool_name"]},"server_endpoint":{"type":"string","required":true}}},"optional":true},"copy_compute_scale":{"nesting_mode":3,"block":{"attributes":{"data_integration_unit":{"type":"number","optional":true},"time_to_live":{"type":"number","optional":true}}},"optional":true},"custom_setup_script":{"nesting_mode":3,"block":{"attributes":{"blob_container_uri":{"type":"string","required":true},"sas_token":{"type":"string","required":true}}},"optional":true},"express_custom_setup":{"nesting_mode":3,"block":{"attributes":{"environment":{"type":["map","string"],"optional":true,"at_least_one_of":["express_custom_setup.0.environment","express_custom_setup.0.powershell_version","express_custom_setup.0.component","express_custom_setup.0.command_key"]},"powershell_version":{"type":"string","optional":true,"at_least_one_of":["express_custom_setup.0.environment","express_custom_setup.0.powershell_version","express_custom_setup.0.component","express_custom_setup.0.command_key"]}},"block_types":{"command_key":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","optional":true},"target_name":{"type":"string","required":true},"user_name":{"type":"string","required":true}},"block_types":{"key_vault_password":{"nesting_mode":3,"block":{"attributes":{"linked_service_name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"secret_name":{"type":"string","required":true},"secret_version":{"type":"string","optional":true}}},"optional":true}}},"optional":true,"at_least_one_of":["express_custom_setup.0.environment","express_custom_setup.0.powershell_version","express_custom_setup.0.component","express_custom_setup.0.command_key"]},"component":{"nesting_mode":3,"block":{"attributes":{"license":{"type":"string","optional":true},"name":{"type":"string","required":true}},"block_types":{"key_vault_license":{"nesting_mode":3,"block":{"attributes":{"linked_service_name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"secret_name":{"type":"string","required":true},"secret_version":{"type":"string","optional":true}}},"optional":true}}},"optional":true,"at_least_one_of":["express_custom_setup.0.environment","express_custom_setup.0.powershell_version","express_custom_setup.0.component","express_custom_setup.0.command_key"]}}},"optional":true},"express_vnet_integration":{"nesting_mode":3,"block":{"attributes":{"subnet_id":{"type":"string","required":true}}},"optional":true},"package_store":{"nesting_mode":3,"block":{"attributes":{"linked_service_name":{"type":"string","required":true},"name":{"type":"string","required":true}}},"optional":true},"pipeline_external_compute_scale":{"nesting_mode":3,"block":{"attributes":{"number_of_external_nodes":{"type":"number","optional":true},"number_of_pipeline_nodes":{"type":"number","optional":true},"time_to_live":{"type":"number","optional":true}}},"optional":true},"proxy":{"nesting_mode":3,"block":{"attributes":{"path":{"type":"string","optional":true},"self_hosted_integration_runtime_name":{"type":"string","required":true},"staging_storage_linked_service_name":{"type":"string","required":true}}},"optional":true},"vnet_integration":{"nesting_mode":3,"block":{"attributes":{"public_ips":{"type":["list","string"],"optional":true},"subnet_id":{"type":"string","optional":true,"exactly_one_of":["vnet_integration.0.vnet_id","vnet_integration.0.subnet_id"]},"subnet_name":{"type":"string","optional":true,"required_with":["vnet_integration.0.vnet_id"]},"vnet_id":{"type":"string","optional":true,"exactly_one_of":["vnet_integration.0.vnet_id","vnet_integration.0.subnet_id"]}}},"optional":true}}}},"azurerm_data_factory_integration_runtime_self_hosted":{"block":{"attributes":{"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"primary_authorization_key":{"type":"string","computed":true},"secondary_authorization_key":{"type":"string","computed":true},"self_contained_interactive_authoring_enabled":{"type":"bool","optional":true}},"block_types":{"rbac_authorization":{"nesting_mode":4,"block":{"attributes":{"resource_id":{"type":"string","required":true}}},"optional":true}}}},"azurerm_data_factory_linked_custom_service":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"type":{"type":"string","required":true},"type_properties_json":{"type":"string","required":true}},"block_types":{"integration_runtime":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true}}}},"azurerm_data_factory_linked_service_azure_blob_storage":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"connection_string":{"type":"string","optional":true,"exactly_one_of":["connection_string","connection_string_insecure","sas_uri","service_endpoint"]},"connection_string_insecure":{"type":"string","optional":true,"exactly_one_of":["connection_string","connection_string_insecure","sas_uri","service_endpoint"]},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"integration_runtime_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"sas_uri":{"type":"string","optional":true,"exactly_one_of":["connection_string","connection_string_insecure","sas_uri","service_endpoint"]},"service_endpoint":{"type":"string","optional":true,"exactly_one_of":["connection_string","connection_string_insecure","sas_uri","service_endpoint"]},"service_principal_id":{"type":"string","optional":true,"conflicts_with":["use_managed_identity"]},"service_principal_key":{"type":"string","optional":true},"storage_kind":{"type":"string","optional":true},"tenant_id":{"type":"string","optional":true},"use_managed_identity":{"type":"bool","optional":true,"default":false,"conflicts_with":["service_principal_id"]}},"block_types":{"key_vault_sas_token":{"nesting_mode":3,"block":{"attributes":{"linked_service_name":{"type":"string","required":true},"secret_name":{"type":"string","required":true}}},"optional":true},"service_principal_linked_key_vault_key":{"nesting_mode":3,"block":{"attributes":{"linked_service_name":{"type":"string","required":true},"secret_name":{"type":"string","required":true}}},"optional":true}}}},"azurerm_data_factory_linked_service_azure_databricks":{"block":{"attributes":{"access_token":{"type":"string","optional":true,"exactly_one_of":["access_token","msi_work_space_resource_id","key_vault_password"]},"adb_domain":{"type":"string","required":true},"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"existing_cluster_id":{"type":"string","optional":true,"exactly_one_of":["existing_cluster_id","new_cluster_config","instance_pool"]},"integration_runtime_name":{"type":"string","optional":true},"msi_work_space_resource_id":{"type":"string","optional":true,"exactly_one_of":["access_token","msi_work_space_resource_id","key_vault_password"]},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}},"block_types":{"instance_pool":{"nesting_mode":3,"block":{"attributes":{"cluster_version":{"type":"string","required":true},"instance_pool_id":{"type":"string","required":true},"max_number_of_workers":{"type":"number","optional":true},"min_number_of_workers":{"type":"number","optional":true,"default":1}}},"optional":true,"exactly_one_of":["existing_cluster_id","new_cluster_config","instance_pool"]},"key_vault_password":{"nesting_mode":3,"block":{"attributes":{"linked_service_name":{"type":"string","required":true},"secret_name":{"type":"string","required":true}}},"optional":true,"exactly_one_of":["access_token","msi_work_space_resource_id","key_vault_password"]},"new_cluster_config":{"nesting_mode":3,"block":{"attributes":{"cluster_version":{"type":"string","required":true},"custom_tags":{"type":["map","string"],"optional":true},"driver_node_type":{"type":"string","optional":true},"init_scripts":{"type":["list","string"],"optional":true},"log_destination":{"type":"string","optional":true},"max_number_of_workers":{"type":"number","optional":true},"min_number_of_workers":{"type":"number","optional":true,"default":"1"},"node_type":{"type":"string","required":true},"spark_config":{"type":["map","string"],"optional":true},"spark_environment_variables":{"type":["map","string"],"optional":true}}},"optional":true,"exactly_one_of":["existing_cluster_id","new_cluster_config","instance_pool"]}}}},"azurerm_data_factory_linked_service_azure_file_storage":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"connection_string":{"type":"string","required":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"file_share":{"type":"string","optional":true},"host":{"type":"string","optional":true},"integration_runtime_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"password":{"type":"string","optional":true},"user_id":{"type":"string","optional":true}},"block_types":{"key_vault_password":{"nesting_mode":3,"block":{"attributes":{"linked_service_name":{"type":"string","required":true},"secret_name":{"type":"string","required":true}}},"optional":true}}}},"azurerm_data_factory_linked_service_azure_function":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"integration_runtime_name":{"type":"string","optional":true},"key":{"type":"string","optional":true,"exactly_one_of":["key","key_vault_key"]},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"url":{"type":"string","required":true}},"block_types":{"key_vault_key":{"nesting_mode":3,"block":{"attributes":{"linked_service_name":{"type":"string","required":true},"secret_name":{"type":"string","required":true}}},"optional":true,"exactly_one_of":["key","key_vault_key"]}}}},"azurerm_data_factory_linked_service_azure_search":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"encrypted_credential":{"type":"string","computed":true},"integration_runtime_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"search_service_key":{"type":"string","required":true},"url":{"type":"string","required":true}}}},"azurerm_data_factory_linked_service_azure_sql_database":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"connection_string":{"type":"string","optional":true,"exactly_one_of":["connection_string","key_vault_connection_string"]},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"integration_runtime_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"service_principal_id":{"type":"string","optional":true,"conflicts_with":["use_managed_identity"],"required_with":["service_principal_key"]},"service_principal_key":{"type":"string","optional":true,"required_with":["service_principal_id"]},"tenant_id":{"type":"string","optional":true},"use_managed_identity":{"type":"bool","optional":true,"default":false,"conflicts_with":["service_principal_id"]}},"block_types":{"key_vault_connection_string":{"nesting_mode":3,"block":{"attributes":{"linked_service_name":{"type":"string","required":true},"secret_name":{"type":"string","required":true}}},"optional":true,"exactly_one_of":["connection_string","key_vault_connection_string"]},"key_vault_password":{"nesting_mode":3,"block":{"attributes":{"linked_service_name":{"type":"string","required":true},"secret_name":{"type":"string","required":true}}},"optional":true}}}},"azurerm_data_factory_linked_service_azure_table_storage":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"connection_string":{"type":"string","required":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"integration_runtime_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}}},"azurerm_data_factory_linked_service_cosmosdb":{"block":{"attributes":{"account_endpoint":{"type":"string","optional":true,"conflicts_with":["connection_string"]},"account_key":{"type":"string","optional":true,"conflicts_with":["connection_string"]},"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"connection_string":{"type":"string","optional":true,"conflicts_with":["account_endpoint","account_key"]},"data_factory_id":{"type":"string","required":true},"database":{"type":"string","optional":true},"description":{"type":"string","optional":true},"integration_runtime_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}}},"azurerm_data_factory_linked_service_cosmosdb_mongoapi":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"connection_string":{"type":"string","optional":true},"data_factory_id":{"type":"string","required":true},"database":{"type":"string","optional":true},"description":{"type":"string","optional":true},"integration_runtime_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"server_version_is_32_or_higher":{"type":"bool","optional":true,"default":false}}}},"azurerm_data_factory_linked_service_data_lake_storage_gen2":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"integration_runtime_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"service_principal_id":{"type":"string","optional":true,"conflicts_with":["storage_account_key","use_managed_identity"],"at_least_one_of":["service_principal_key","service_principal_id","tenant","storage_account_key","use_managed_identity"],"required_with":["service_principal_key","tenant"]},"service_principal_key":{"type":"string","optional":true,"conflicts_with":["storage_account_key","use_managed_identity"],"at_least_one_of":["service_principal_key","service_principal_id","tenant","storage_account_key","use_managed_identity"],"required_with":["service_principal_id","tenant"]},"storage_account_key":{"type":"string","optional":true,"conflicts_with":["service_principal_id","service_principal_key","use_managed_identity","tenant"],"at_least_one_of":["service_principal_key","service_principal_id","tenant","storage_account_key","use_managed_identity"]},"tenant":{"type":"string","optional":true,"conflicts_with":["storage_account_key","use_managed_identity"],"at_least_one_of":["service_principal_key","service_principal_id","tenant","storage_account_key","use_managed_identity"],"required_with":["service_principal_id","service_principal_key"]},"url":{"type":"string","required":true},"use_managed_identity":{"type":"bool","optional":true,"default":false,"conflicts_with":["service_principal_key","service_principal_id","storage_account_key","tenant"],"at_least_one_of":["service_principal_key","service_principal_id","tenant","storage_account_key","use_managed_identity"]}}}},"azurerm_data_factory_linked_service_key_vault":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"integration_runtime_name":{"type":"string","optional":true},"key_vault_id":{"type":"string","required":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}}},"azurerm_data_factory_linked_service_kusto":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"integration_runtime_name":{"type":"string","optional":true},"kusto_database_name":{"type":"string","required":true},"kusto_endpoint":{"type":"string","required":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"service_principal_id":{"type":"string","optional":true,"exactly_one_of":["service_principal_id","use_managed_identity"],"required_with":["service_principal_key"]},"service_principal_key":{"type":"string","optional":true,"required_with":["service_principal_id"]},"tenant":{"type":"string","optional":true,"required_with":["service_principal_id"]},"use_managed_identity":{"type":"bool","optional":true,"default":false,"exactly_one_of":["service_principal_id","use_managed_identity"]}}}},"azurerm_data_factory_linked_service_mysql":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"connection_string":{"type":"string","required":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"integration_runtime_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}}},"azurerm_data_factory_linked_service_odata":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"integration_runtime_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"url":{"type":"string","required":true}},"block_types":{"basic_authentication":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true}}}},"azurerm_data_factory_linked_service_odbc":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"connection_string":{"type":"string","required":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"integration_runtime_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}},"block_types":{"basic_authentication":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true}}}},"azurerm_data_factory_linked_service_postgresql":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"connection_string":{"type":"string","required":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"integration_runtime_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}}},"azurerm_data_factory_linked_service_sftp":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"authentication_type":{"type":"string","required":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"host":{"type":"string","required":true},"host_key_fingerprint":{"type":"string","optional":true},"integration_runtime_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"password":{"type":"string","required":true},"port":{"type":"number","required":true},"skip_host_key_validation":{"type":"bool","optional":true},"username":{"type":"string","required":true}}}},"azurerm_data_factory_linked_service_snowflake":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"connection_string":{"type":"string","required":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"integration_runtime_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}},"block_types":{"key_vault_password":{"nesting_mode":3,"block":{"attributes":{"linked_service_name":{"type":"string","required":true},"secret_name":{"type":"string","required":true}}},"optional":true}}}},"azurerm_data_factory_linked_service_sql_server":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"connection_string":{"type":"string","optional":true,"exactly_one_of":["connection_string","key_vault_connection_string"]},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"integration_runtime_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"user_name":{"type":"string","optional":true}},"block_types":{"key_vault_connection_string":{"nesting_mode":3,"block":{"attributes":{"linked_service_name":{"type":"string","required":true},"secret_name":{"type":"string","required":true}}},"optional":true,"exactly_one_of":["connection_string","key_vault_connection_string"]},"key_vault_password":{"nesting_mode":3,"block":{"attributes":{"linked_service_name":{"type":"string","required":true},"secret_name":{"type":"string","required":true}}},"optional":true}}}},"azurerm_data_factory_linked_service_synapse":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"connection_string":{"type":"string","required":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"integration_runtime_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}},"block_types":{"key_vault_password":{"nesting_mode":3,"block":{"attributes":{"linked_service_name":{"type":"string","required":true},"secret_name":{"type":"string","required":true}}},"optional":true}}}},"azurerm_data_factory_linked_service_web":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"authentication_type":{"type":"string","required":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"integration_runtime_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"password":{"type":"string","optional":true},"url":{"type":"string","required":true},"username":{"type":"string","optional":true}}}},"azurerm_data_factory_managed_private_endpoint":{"block":{"attributes":{"data_factory_id":{"type":"string","required":true},"fqdns":{"type":["list","string"],"optional":true,"computed":true},"name":{"type":"string","required":true},"subresource_name":{"type":"string","optional":true},"target_resource_id":{"type":"string","required":true}}}},"azurerm_data_factory_pipeline":{"block":{"attributes":{"activities_json":{"type":"string","optional":true},"annotations":{"type":["list","string"],"optional":true},"concurrency":{"type":"number","optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"folder":{"type":"string","optional":true},"moniter_metrics_after_duration":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"variables":{"type":["map","string"],"optional":true}}}},"azurerm_data_factory_trigger_blob_event":{"block":{"attributes":{"activated":{"type":"bool","optional":true,"default":true},"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"blob_path_begins_with":{"type":"string","optional":true,"at_least_one_of":["blob_path_begins_with","blob_path_ends_with"]},"blob_path_ends_with":{"type":"string","optional":true,"at_least_one_of":["blob_path_begins_with","blob_path_ends_with"]},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"events":{"type":["set","string"],"required":true},"ignore_empty_blobs":{"type":"bool","optional":true},"name":{"type":"string","required":true},"storage_account_id":{"type":"string","required":true}},"block_types":{"pipeline":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"required":true}}}},"azurerm_data_factory_trigger_custom_event":{"block":{"attributes":{"activated":{"type":"bool","optional":true,"default":true},"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"eventgrid_topic_id":{"type":"string","required":true},"events":{"type":["set","string"],"required":true},"name":{"type":"string","required":true},"subject_begins_with":{"type":"string","optional":true},"subject_ends_with":{"type":"string","optional":true}},"block_types":{"pipeline":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"required":true}}}},"azurerm_data_factory_trigger_schedule":{"block":{"attributes":{"activated":{"type":"bool","optional":true,"default":true},"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"end_time":{"type":"string","optional":true},"frequency":{"type":"string","optional":true,"default":"Minute"},"interval":{"type":"number","optional":true,"default":1},"name":{"type":"string","required":true},"pipeline_name":{"type":"string","optional":true,"computed":true,"exactly_one_of":["pipeline","pipeline_name"]},"pipeline_parameters":{"type":["map","string"],"optional":true,"computed":true,"conflicts_with":["pipeline"]},"start_time":{"type":"string","optional":true,"computed":true},"time_zone":{"type":"string","optional":true}},"block_types":{"pipeline":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true,"computed":true,"conflicts_with":["pipeline_parameters"],"exactly_one_of":["pipeline","pipeline_name"]},"schedule":{"nesting_mode":3,"block":{"attributes":{"days_of_month":{"type":["list","number"],"optional":true},"days_of_week":{"type":["list","string"],"optional":true},"hours":{"type":["list","number"],"optional":true},"minutes":{"type":["list","number"],"optional":true}},"block_types":{"monthly":{"nesting_mode":3,"block":{"attributes":{"week":{"type":"number","optional":true},"weekday":{"type":"string","required":true}}},"optional":true}}},"optional":true}}}},"azurerm_data_factory_trigger_tumbling_window":{"block":{"attributes":{"activated":{"type":"bool","optional":true,"default":true},"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"delay":{"type":"string","optional":true},"description":{"type":"string","optional":true},"end_time":{"type":"string","optional":true},"frequency":{"type":"string","required":true},"interval":{"type":"number","required":true},"max_concurrency":{"type":"number","optional":true,"default":50},"name":{"type":"string","required":true},"start_time":{"type":"string","required":true}},"block_types":{"pipeline":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"required":true},"retry":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true},"interval":{"type":"number","optional":true,"default":30}}},"optional":true},"trigger_dependency":{"nesting_mode":4,"block":{"attributes":{"offset":{"type":"string","optional":true},"size":{"type":"string","optional":true},"trigger_name":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_data_protection_backup_instance_blob_storage":{"block":{"attributes":{"backup_policy_id":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"storage_account_container_names":{"type":["list","string"],"optional":true},"storage_account_id":{"type":"string","required":true},"vault_id":{"type":"string","required":true}}}},"azurerm_data_protection_backup_instance_disk":{"block":{"attributes":{"backup_policy_id":{"type":"string","required":true},"disk_id":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"snapshot_resource_group_name":{"type":"string","required":true},"vault_id":{"type":"string","required":true}}}},"azurerm_data_protection_backup_instance_kubernetes_cluster":{"block":{"attributes":{"backup_policy_id":{"type":"string","required":true},"kubernetes_cluster_id":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"snapshot_resource_group_name":{"type":"string","required":true},"vault_id":{"type":"string","required":true}},"block_types":{"backup_datasource_parameters":{"nesting_mode":3,"block":{"attributes":{"cluster_scoped_resources_enabled":{"type":"bool","optional":true,"default":false},"excluded_namespaces":{"type":["list","string"],"optional":true},"excluded_resource_types":{"type":["list","string"],"optional":true},"included_namespaces":{"type":["list","string"],"optional":true},"included_resource_types":{"type":["list","string"],"optional":true},"label_selectors":{"type":["list","string"],"optional":true},"volume_snapshot_enabled":{"type":"bool","optional":true,"default":false}}},"optional":true}}}},"azurerm_data_protection_backup_instance_postgresql":{"block":{"attributes":{"backup_policy_id":{"type":"string","required":true},"database_credential_key_vault_secret_id":{"type":"string","optional":true},"database_id":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"vault_id":{"type":"string","required":true}}}},"azurerm_data_protection_backup_instance_postgresql_flexible_server":{"block":{"attributes":{"backup_policy_id":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"server_id":{"type":"string","required":true},"vault_id":{"type":"string","required":true}}}},"azurerm_data_protection_backup_policy_blob_storage":{"block":{"attributes":{"backup_repeating_time_intervals":{"type":["list","string"],"optional":true},"name":{"type":"string","required":true},"operational_default_retention_duration":{"type":"string","optional":true,"at_least_one_of":["operational_default_retention_duration","vault_default_retention_duration"]},"time_zone":{"type":"string","optional":true},"vault_default_retention_duration":{"type":"string","optional":true,"at_least_one_of":["operational_default_retention_duration","vault_default_retention_duration"],"required_with":["backup_repeating_time_intervals"]},"vault_id":{"type":"string","required":true}},"block_types":{"retention_rule":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"priority":{"type":"number","required":true}},"block_types":{"criteria":{"nesting_mode":3,"block":{"attributes":{"absolute_criteria":{"type":"string","optional":true},"days_of_month":{"type":["set","number"],"optional":true},"days_of_week":{"type":["set","string"],"optional":true},"months_of_year":{"type":["set","string"],"optional":true},"scheduled_backup_times":{"type":["set","string"],"optional":true},"weeks_of_month":{"type":["set","string"],"optional":true}}},"required":true},"life_cycle":{"nesting_mode":3,"block":{"attributes":{"data_store_type":{"type":"string","required":true},"duration":{"type":"string","required":true}}},"required":true}}},"optional":true,"required_with":["vault_default_retention_duration"]}}}},"azurerm_data_protection_backup_policy_disk":{"block":{"attributes":{"backup_repeating_time_intervals":{"type":["list","string"],"required":true},"default_retention_duration":{"type":"string","required":true},"name":{"type":"string","required":true},"time_zone":{"type":"string","optional":true},"vault_id":{"type":"string","required":true}},"block_types":{"retention_rule":{"nesting_mode":3,"block":{"attributes":{"duration":{"type":"string","required":true},"name":{"type":"string","required":true},"priority":{"type":"number","required":true}},"block_types":{"criteria":{"nesting_mode":3,"block":{"attributes":{"absolute_criteria":{"type":"string","optional":true}}},"required":true}}},"optional":true}}}},"azurerm_data_protection_backup_policy_kubernetes_cluster":{"block":{"attributes":{"backup_repeating_time_intervals":{"type":["list","string"],"required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"time_zone":{"type":"string","optional":true},"vault_name":{"type":"string","required":true}},"block_types":{"default_retention_rule":{"nesting_mode":3,"block":{"block_types":{"life_cycle":{"nesting_mode":3,"block":{"attributes":{"data_store_type":{"type":"string","required":true},"duration":{"type":"string","required":true}}},"required":true}}},"required":true},"retention_rule":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"priority":{"type":"number","required":true}},"block_types":{"criteria":{"nesting_mode":3,"block":{"attributes":{"absolute_criteria":{"type":"string","optional":true},"days_of_week":{"type":["set","string"],"optional":true},"months_of_year":{"type":["set","string"],"optional":true},"scheduled_backup_times":{"type":["set","string"],"optional":true},"weeks_of_month":{"type":["set","string"],"optional":true}}},"required":true},"life_cycle":{"nesting_mode":3,"block":{"attributes":{"data_store_type":{"type":"string","required":true},"duration":{"type":"string","required":true}}},"required":true}}},"optional":true}}}},"azurerm_data_protection_backup_policy_mysql_flexible_server":{"block":{"attributes":{"backup_repeating_time_intervals":{"type":["list","string"],"required":true},"name":{"type":"string","required":true},"time_zone":{"type":"string","optional":true},"vault_id":{"type":"string","required":true}},"block_types":{"default_retention_rule":{"nesting_mode":3,"block":{"block_types":{"life_cycle":{"nesting_mode":3,"block":{"attributes":{"data_store_type":{"type":"string","required":true},"duration":{"type":"string","required":true}}},"required":true}}},"required":true},"retention_rule":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"priority":{"type":"number","required":true}},"block_types":{"criteria":{"nesting_mode":3,"block":{"attributes":{"absolute_criteria":{"type":"string","optional":true},"days_of_week":{"type":["set","string"],"optional":true},"months_of_year":{"type":["set","string"],"optional":true},"scheduled_backup_times":{"type":["set","string"],"optional":true},"weeks_of_month":{"type":["set","string"],"optional":true}}},"required":true},"life_cycle":{"nesting_mode":3,"block":{"attributes":{"data_store_type":{"type":"string","required":true},"duration":{"type":"string","required":true}}},"required":true}}},"optional":true}}}},"azurerm_data_protection_backup_policy_postgresql":{"block":{"attributes":{"backup_repeating_time_intervals":{"type":["list","string"],"required":true},"default_retention_duration":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"time_zone":{"type":"string","optional":true},"vault_name":{"type":"string","required":true}},"block_types":{"retention_rule":{"nesting_mode":3,"block":{"attributes":{"duration":{"type":"string","required":true},"name":{"type":"string","required":true},"priority":{"type":"number","required":true}},"block_types":{"criteria":{"nesting_mode":3,"block":{"attributes":{"absolute_criteria":{"type":"string","optional":true},"days_of_week":{"type":["set","string"],"optional":true},"months_of_year":{"type":["set","string"],"optional":true},"scheduled_backup_times":{"type":["set","string"],"optional":true},"weeks_of_month":{"type":["set","string"],"optional":true}}},"required":true}}},"optional":true}}}},"azurerm_data_protection_backup_policy_postgresql_flexible_server":{"block":{"attributes":{"backup_repeating_time_intervals":{"type":["list","string"],"required":true},"name":{"type":"string","required":true},"time_zone":{"type":"string","optional":true},"vault_id":{"type":"string","required":true}},"block_types":{"default_retention_rule":{"nesting_mode":3,"block":{"block_types":{"life_cycle":{"nesting_mode":3,"block":{"attributes":{"data_store_type":{"type":"string","required":true},"duration":{"type":"string","required":true}}},"required":true}}},"required":true},"retention_rule":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"priority":{"type":"number","required":true}},"block_types":{"criteria":{"nesting_mode":3,"block":{"attributes":{"absolute_criteria":{"type":"string","optional":true},"days_of_week":{"type":["set","string"],"optional":true},"months_of_year":{"type":["set","string"],"optional":true},"scheduled_backup_times":{"type":["set","string"],"optional":true},"weeks_of_month":{"type":["set","string"],"optional":true}}},"required":true},"life_cycle":{"nesting_mode":3,"block":{"attributes":{"data_store_type":{"type":"string","required":true},"duration":{"type":"string","required":true}}},"required":true}}},"optional":true}}}},"azurerm_data_protection_backup_vault":{"block":{"attributes":{"cross_region_restore_enabled":{"type":"bool","optional":true},"datastore_type":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"redundancy":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"retention_duration_in_days":{"type":"number","optional":true,"default":14},"soft_delete":{"type":"string","optional":true,"default":"On"},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_data_protection_resource_guard":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"vault_critical_operation_exclusion_list":{"type":["list","string"],"optional":true}}}},"azurerm_data_share":{"block":{"attributes":{"account_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"kind":{"type":"string","required":true},"name":{"type":"string","required":true},"terms":{"type":"string","optional":true}},"block_types":{"snapshot_schedule":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"recurrence":{"type":"string","required":true},"start_time":{"type":"string","required":true}}},"optional":true}}}},"azurerm_data_share_account":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"required":true}}}},"azurerm_data_share_dataset_blob_storage":{"block":{"attributes":{"container_name":{"type":"string","required":true},"data_share_id":{"type":"string","required":true},"display_name":{"type":"string","computed":true},"file_path":{"type":"string","optional":true,"conflicts_with":["folder_path"]},"folder_path":{"type":"string","optional":true,"conflicts_with":["file_path"]},"name":{"type":"string","required":true}},"block_types":{"storage_account":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"subscription_id":{"type":"string","required":true}}},"required":true}}}},"azurerm_data_share_dataset_data_lake_gen2":{"block":{"attributes":{"display_name":{"type":"string","computed":true},"file_path":{"type":"string","optional":true,"conflicts_with":["folder_path"]},"file_system_name":{"type":"string","required":true},"folder_path":{"type":"string","optional":true,"conflicts_with":["file_path"]},"name":{"type":"string","required":true},"share_id":{"type":"string","required":true},"storage_account_id":{"type":"string","required":true}}}},"azurerm_data_share_dataset_kusto_cluster":{"block":{"attributes":{"display_name":{"type":"string","computed":true},"kusto_cluster_id":{"type":"string","required":true},"kusto_cluster_location":{"type":"string","computed":true},"name":{"type":"string","required":true},"share_id":{"type":"string","required":true}}}},"azurerm_data_share_dataset_kusto_database":{"block":{"attributes":{"display_name":{"type":"string","computed":true},"kusto_cluster_location":{"type":"string","computed":true},"kusto_database_id":{"type":"string","required":true},"name":{"type":"string","required":true},"share_id":{"type":"string","required":true}}}},"azurerm_database_migration_project":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"service_name":{"type":"string","required":true},"source_platform":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"target_platform":{"type":"string","required":true}}}},"azurerm_database_migration_service":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","required":true},"subnet_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_databox_edge_device":{"block":{"attributes":{"device_properties":{"type":["list",["object",{"capacity":"number","configured_role_types":["list","string"],"culture":"string","hcs_version":"string","model":"string","node_count":"number","serial_number":"string","software_version":"string","status":"string","time_zone":"string","type":"string"}]],"computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_databricks_access_connector":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_databricks_virtual_network_peering":{"block":{"attributes":{"address_space_prefixes":{"type":["list","string"],"computed":true},"allow_forwarded_traffic":{"type":"bool","optional":true,"default":false},"allow_gateway_transit":{"type":"bool","optional":true,"default":false},"allow_virtual_network_access":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"remote_address_space_prefixes":{"type":["list","string"],"required":true},"remote_virtual_network_id":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"use_remote_gateways":{"type":"bool","optional":true,"default":false},"virtual_network_id":{"type":"string","computed":true},"workspace_id":{"type":"string","required":true}}}},"azurerm_databricks_workspace":{"block":{"attributes":{"access_connector_id":{"type":"string","optional":true,"required_with":["default_storage_firewall_enabled"]},"customer_managed_key_enabled":{"type":"bool","optional":true,"default":false},"default_storage_firewall_enabled":{"type":"bool","optional":true,"required_with":["access_connector_id"]},"disk_encryption_set_id":{"type":"string","computed":true},"infrastructure_encryption_enabled":{"type":"bool","optional":true,"default":false},"load_balancer_backend_address_pool_id":{"type":"string","optional":true},"location":{"type":"string","required":true},"managed_disk_cmk_key_vault_id":{"type":"string","optional":true},"managed_disk_cmk_key_vault_key_id":{"type":"string","optional":true},"managed_disk_cmk_rotation_to_latest_version_enabled":{"type":"bool","optional":true,"required_with":["managed_disk_cmk_key_vault_key_id"]},"managed_disk_identity":{"type":["list",["object",{"principal_id":"string","tenant_id":"string","type":"string"}]],"computed":true},"managed_resource_group_id":{"type":"string","computed":true},"managed_resource_group_name":{"type":"string","optional":true,"computed":true},"managed_services_cmk_key_vault_id":{"type":"string","optional":true},"managed_services_cmk_key_vault_key_id":{"type":"string","optional":true},"name":{"type":"string","required":true},"network_security_group_rules_required":{"type":"string","optional":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"sku":{"type":"string","required":true},"storage_account_identity":{"type":["list",["object",{"principal_id":"string","tenant_id":"string","type":"string"}]],"computed":true},"tags":{"type":["map","string"],"optional":true},"workspace_id":{"type":"string","computed":true},"workspace_url":{"type":"string","computed":true}},"block_types":{"custom_parameters":{"nesting_mode":3,"block":{"attributes":{"machine_learning_workspace_id":{"type":"string","optional":true,"at_least_one_of":["custom_parameters.0.machine_learning_workspace_id","custom_parameters.0.no_public_ip","custom_parameters.0.public_subnet_name","custom_parameters.0.private_subnet_name","custom_parameters.0.virtual_network_id","custom_parameters.0.public_subnet_network_security_group_association_id","custom_parameters.0.private_subnet_network_security_group_association_id","custom_parameters.0.nat_gateway_name","custom_parameters.0.public_ip_name","custom_parameters.0.storage_account_name","custom_parameters.0.storage_account_sku_name","custom_parameters.0.vnet_address_prefix"]},"nat_gateway_name":{"type":"string","optional":true,"computed":true,"at_least_one_of":["custom_parameters.0.machine_learning_workspace_id","custom_parameters.0.no_public_ip","custom_parameters.0.public_subnet_name","custom_parameters.0.private_subnet_name","custom_parameters.0.virtual_network_id","custom_parameters.0.public_subnet_network_security_group_association_id","custom_parameters.0.private_subnet_network_security_group_association_id","custom_parameters.0.nat_gateway_name","custom_parameters.0.public_ip_name","custom_parameters.0.storage_account_name","custom_parameters.0.storage_account_sku_name","custom_parameters.0.vnet_address_prefix"]},"no_public_ip":{"type":"bool","optional":true,"default":true,"at_least_one_of":["custom_parameters.0.machine_learning_workspace_id","custom_parameters.0.no_public_ip","custom_parameters.0.public_subnet_name","custom_parameters.0.private_subnet_name","custom_parameters.0.virtual_network_id","custom_parameters.0.public_subnet_network_security_group_association_id","custom_parameters.0.private_subnet_network_security_group_association_id","custom_parameters.0.nat_gateway_name","custom_parameters.0.public_ip_name","custom_parameters.0.storage_account_name","custom_parameters.0.storage_account_sku_name","custom_parameters.0.vnet_address_prefix"]},"private_subnet_name":{"type":"string","optional":true,"at_least_one_of":["custom_parameters.0.machine_learning_workspace_id","custom_parameters.0.no_public_ip","custom_parameters.0.public_subnet_name","custom_parameters.0.private_subnet_name","custom_parameters.0.virtual_network_id","custom_parameters.0.public_subnet_network_security_group_association_id","custom_parameters.0.private_subnet_network_security_group_association_id","custom_parameters.0.nat_gateway_name","custom_parameters.0.public_ip_name","custom_parameters.0.storage_account_name","custom_parameters.0.storage_account_sku_name","custom_parameters.0.vnet_address_prefix"]},"private_subnet_network_security_group_association_id":{"type":"string","optional":true,"at_least_one_of":["custom_parameters.0.machine_learning_workspace_id","custom_parameters.0.no_public_ip","custom_parameters.0.public_subnet_name","custom_parameters.0.private_subnet_name","custom_parameters.0.virtual_network_id","custom_parameters.0.public_subnet_network_security_group_association_id","custom_parameters.0.private_subnet_network_security_group_association_id","custom_parameters.0.nat_gateway_name","custom_parameters.0.public_ip_name","custom_parameters.0.storage_account_name","custom_parameters.0.storage_account_sku_name","custom_parameters.0.vnet_address_prefix"]},"public_ip_name":{"type":"string","optional":true,"computed":true,"at_least_one_of":["custom_parameters.0.machine_learning_workspace_id","custom_parameters.0.no_public_ip","custom_parameters.0.public_subnet_name","custom_parameters.0.private_subnet_name","custom_parameters.0.virtual_network_id","custom_parameters.0.public_subnet_network_security_group_association_id","custom_parameters.0.private_subnet_network_security_group_association_id","custom_parameters.0.nat_gateway_name","custom_parameters.0.public_ip_name","custom_parameters.0.storage_account_name","custom_parameters.0.storage_account_sku_name","custom_parameters.0.vnet_address_prefix"]},"public_subnet_name":{"type":"string","optional":true,"at_least_one_of":["custom_parameters.0.machine_learning_workspace_id","custom_parameters.0.no_public_ip","custom_parameters.0.public_subnet_name","custom_parameters.0.private_subnet_name","custom_parameters.0.virtual_network_id","custom_parameters.0.public_subnet_network_security_group_association_id","custom_parameters.0.private_subnet_network_security_group_association_id","custom_parameters.0.nat_gateway_name","custom_parameters.0.public_ip_name","custom_parameters.0.storage_account_name","custom_parameters.0.storage_account_sku_name","custom_parameters.0.vnet_address_prefix"]},"public_subnet_network_security_group_association_id":{"type":"string","optional":true,"at_least_one_of":["custom_parameters.0.machine_learning_workspace_id","custom_parameters.0.no_public_ip","custom_parameters.0.public_subnet_name","custom_parameters.0.private_subnet_name","custom_parameters.0.virtual_network_id","custom_parameters.0.public_subnet_network_security_group_association_id","custom_parameters.0.private_subnet_network_security_group_association_id","custom_parameters.0.nat_gateway_name","custom_parameters.0.public_ip_name","custom_parameters.0.storage_account_name","custom_parameters.0.storage_account_sku_name","custom_parameters.0.vnet_address_prefix"]},"storage_account_name":{"type":"string","optional":true,"computed":true,"at_least_one_of":["custom_parameters.0.machine_learning_workspace_id","custom_parameters.0.no_public_ip","custom_parameters.0.public_subnet_name","custom_parameters.0.private_subnet_name","custom_parameters.0.virtual_network_id","custom_parameters.0.public_subnet_network_security_group_association_id","custom_parameters.0.private_subnet_network_security_group_association_id","custom_parameters.0.nat_gateway_name","custom_parameters.0.public_ip_name","custom_parameters.0.storage_account_name","custom_parameters.0.storage_account_sku_name","custom_parameters.0.vnet_address_prefix"]},"storage_account_sku_name":{"type":"string","optional":true,"computed":true,"at_least_one_of":["custom_parameters.0.machine_learning_workspace_id","custom_parameters.0.no_public_ip","custom_parameters.0.public_subnet_name","custom_parameters.0.private_subnet_name","custom_parameters.0.virtual_network_id","custom_parameters.0.public_subnet_network_security_group_association_id","custom_parameters.0.private_subnet_network_security_group_association_id","custom_parameters.0.nat_gateway_name","custom_parameters.0.public_ip_name","custom_parameters.0.storage_account_name","custom_parameters.0.storage_account_sku_name","custom_parameters.0.vnet_address_prefix"]},"virtual_network_id":{"type":"string","optional":true,"at_least_one_of":["custom_parameters.0.machine_learning_workspace_id","custom_parameters.0.no_public_ip","custom_parameters.0.public_subnet_name","custom_parameters.0.private_subnet_name","custom_parameters.0.virtual_network_id","custom_parameters.0.public_subnet_network_security_group_association_id","custom_parameters.0.private_subnet_network_security_group_association_id","custom_parameters.0.nat_gateway_name","custom_parameters.0.public_ip_name","custom_parameters.0.storage_account_name","custom_parameters.0.storage_account_sku_name","custom_parameters.0.vnet_address_prefix"]},"vnet_address_prefix":{"type":"string","optional":true,"computed":true,"at_least_one_of":["custom_parameters.0.machine_learning_workspace_id","custom_parameters.0.no_public_ip","custom_parameters.0.public_subnet_name","custom_parameters.0.private_subnet_name","custom_parameters.0.virtual_network_id","custom_parameters.0.public_subnet_network_security_group_association_id","custom_parameters.0.private_subnet_network_security_group_association_id","custom_parameters.0.nat_gateway_name","custom_parameters.0.public_ip_name","custom_parameters.0.storage_account_name","custom_parameters.0.storage_account_sku_name","custom_parameters.0.vnet_address_prefix"]}}},"optional":true,"computed":true}}}},"azurerm_databricks_workspace_customer_managed_key":{"block":{"attributes":{"key_vault_key_id":{"type":"string","required":true},"workspace_id":{"type":"string","required":true}}}},"azurerm_databricks_workspace_root_dbfs_customer_managed_key":{"block":{"attributes":{"key_vault_id":{"type":"string","optional":true},"key_vault_key_id":{"type":"string","required":true},"workspace_id":{"type":"string","required":true}}}},"azurerm_datadog_monitor":{"block":{"attributes":{"location":{"type":"string","required":true},"marketplace_subscription_status":{"type":"string","computed":true},"monitoring_enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"datadog_organization":{"nesting_mode":3,"block":{"attributes":{"api_key":{"type":"string","required":true},"application_key":{"type":"string","required":true},"enterprise_app_id":{"type":"string","optional":true},"id":{"type":"string","computed":true},"linking_auth_code":{"type":"string","optional":true},"linking_client_id":{"type":"string","optional":true},"name":{"type":"string","computed":true},"redirect_uri":{"type":"string","optional":true}}},"required":true},"identity":{"nesting_mode":3,"block":{"attributes":{"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"user":{"nesting_mode":3,"block":{"attributes":{"email":{"type":"string","required":true},"name":{"type":"string","required":true},"phone_number":{"type":"string","optional":true}}},"required":true}}}},"azurerm_datadog_monitor_sso_configuration":{"block":{"attributes":{"datadog_monitor_id":{"type":"string","required":true},"enterprise_application_id":{"type":"string","required":true},"login_url":{"type":"string","computed":true},"name":{"type":"string","optional":true,"default":"default"},"single_sign_on_enabled":{"type":"string","required":true}}}},"azurerm_datadog_monitor_tag_rule":{"block":{"attributes":{"datadog_monitor_id":{"type":"string","required":true},"name":{"type":"string","optional":true,"default":"default"}},"block_types":{"log":{"nesting_mode":3,"block":{"attributes":{"aad_log_enabled":{"type":"bool","optional":true},"resource_log_enabled":{"type":"bool","optional":true},"subscription_log_enabled":{"type":"bool","optional":true}},"block_types":{"filter":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true},"metric":{"nesting_mode":3,"block":{"block_types":{"filter":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true}}}},"azurerm_dedicated_hardware_security_module":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","required":true},"stamp_id":{"type":"string","optional":true},"tags":{"type":["map","string"],"optional":true},"zones":{"type":["set","string"],"optional":true}},"block_types":{"management_network_profile":{"nesting_mode":3,"block":{"attributes":{"network_interface_private_ip_addresses":{"type":["set","string"],"required":true},"subnet_id":{"type":"string","required":true}}},"optional":true},"network_profile":{"nesting_mode":3,"block":{"attributes":{"network_interface_private_ip_addresses":{"type":["set","string"],"required":true},"subnet_id":{"type":"string","required":true}}},"required":true}}}},"azurerm_dedicated_host":{"block":{"attributes":{"auto_replace_on_failure":{"type":"bool","optional":true,"default":true},"dedicated_host_group_id":{"type":"string","required":true},"license_type":{"type":"string","optional":true,"default":"None"},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"platform_fault_domain":{"type":"number","required":true},"sku_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_dedicated_host_group":{"block":{"attributes":{"automatic_placement_enabled":{"type":"bool","optional":true,"default":false},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"platform_fault_domain_count":{"type":"number","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"zone":{"type":"string","optional":true}}}},"azurerm_dev_center":{"block":{"attributes":{"dev_center_uri":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_dev_center_catalog":{"block":{"attributes":{"dev_center_id":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}},"block_types":{"catalog_adogit":{"nesting_mode":3,"block":{"attributes":{"branch":{"type":"string","required":true},"key_vault_key_url":{"type":"string","required":true},"path":{"type":"string","required":true},"uri":{"type":"string","required":true}}},"optional":true},"catalog_github":{"nesting_mode":3,"block":{"attributes":{"branch":{"type":"string","required":true},"key_vault_key_url":{"type":"string","required":true},"path":{"type":"string","required":true},"uri":{"type":"string","required":true}}},"optional":true}}}},"azurerm_dev_center_dev_box_definition":{"block":{"attributes":{"dev_center_id":{"type":"string","required":true},"image_reference_id":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"sku_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_dev_center_environment_type":{"block":{"attributes":{"dev_center_id":{"type":"string","required":true},"name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_dev_center_gallery":{"block":{"attributes":{"dev_center_id":{"type":"string","required":true},"name":{"type":"string","required":true},"shared_gallery_id":{"type":"string","required":true}}}},"azurerm_dev_center_network_connection":{"block":{"attributes":{"domain_join_type":{"type":"string","required":true},"domain_name":{"type":"string","optional":true},"domain_password":{"type":"string","optional":true},"domain_username":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"organization_unit":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"subnet_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_dev_center_project":{"block":{"attributes":{"description":{"type":"string","optional":true},"dev_center_id":{"type":"string","required":true},"dev_center_uri":{"type":"string","computed":true},"location":{"type":"string","required":true},"maximum_dev_boxes_per_user":{"type":"number","optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_dev_center_project_environment_type":{"block":{"attributes":{"creator_role_assignment_roles":{"type":["set","string"],"optional":true},"deployment_target_id":{"type":"string","required":true},"dev_center_project_id":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"required":true},"user_role_assignment":{"nesting_mode":4,"block":{"attributes":{"roles":{"type":["set","string"],"required":true},"user_id":{"type":"string","required":true}}},"optional":true}}}},"azurerm_dev_test_global_vm_shutdown_schedule":{"block":{"attributes":{"daily_recurrence_time":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"timezone":{"type":"string","required":true},"virtual_machine_id":{"type":"string","required":true}},"block_types":{"notification_settings":{"nesting_mode":3,"block":{"attributes":{"email":{"type":"string","optional":true},"enabled":{"type":"bool","required":true},"time_in_minutes":{"type":"number","optional":true,"default":30},"webhook_url":{"type":"string","optional":true}}},"required":true}}}},"azurerm_dev_test_lab":{"block":{"attributes":{"artifacts_storage_account_id":{"type":"string","computed":true},"default_premium_storage_account_id":{"type":"string","computed":true},"default_storage_account_id":{"type":"string","computed":true},"key_vault_id":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"premium_data_disk_storage_account_id":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"unique_identifier":{"type":"string","computed":true}}}},"azurerm_dev_test_linux_virtual_machine":{"block":{"attributes":{"allow_claim":{"type":"bool","optional":true,"default":true},"disallow_public_ip_address":{"type":"bool","optional":true},"fqdn":{"type":"string","computed":true},"lab_name":{"type":"string","required":true},"lab_subnet_name":{"type":"string","required":true},"lab_virtual_network_id":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"notes":{"type":"string","optional":true},"password":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"size":{"type":"string","required":true},"ssh_key":{"type":"string","optional":true},"storage_type":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"unique_identifier":{"type":"string","computed":true},"username":{"type":"string","required":true}},"block_types":{"gallery_image_reference":{"nesting_mode":3,"block":{"attributes":{"offer":{"type":"string","required":true},"publisher":{"type":"string","required":true},"sku":{"type":"string","required":true},"version":{"type":"string","required":true}}},"required":true},"inbound_nat_rule":{"nesting_mode":4,"block":{"attributes":{"backend_port":{"type":"number","required":true},"frontend_port":{"type":"number","computed":true},"protocol":{"type":"string","required":true}}},"optional":true}}}},"azurerm_dev_test_policy":{"block":{"attributes":{"description":{"type":"string","optional":true},"evaluator_type":{"type":"string","required":true},"fact_data":{"type":"string","optional":true},"lab_name":{"type":"string","required":true},"name":{"type":"string","required":true},"policy_set_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"threshold":{"type":"string","required":true}}}},"azurerm_dev_test_schedule":{"block":{"attributes":{"lab_name":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"status":{"type":"string","optional":true,"default":"Disabled"},"tags":{"type":["map","string"],"optional":true},"task_type":{"type":"string","required":true},"time_zone_id":{"type":"string","required":true}},"block_types":{"daily_recurrence":{"nesting_mode":3,"block":{"attributes":{"time":{"type":"string","required":true}}},"optional":true},"hourly_recurrence":{"nesting_mode":3,"block":{"attributes":{"minute":{"type":"number","required":true}}},"optional":true},"notification_settings":{"nesting_mode":3,"block":{"attributes":{"status":{"type":"string","optional":true,"default":"Disabled"},"time_in_minutes":{"type":"number","optional":true},"webhook_url":{"type":"string","optional":true}}},"required":true},"weekly_recurrence":{"nesting_mode":3,"block":{"attributes":{"time":{"type":"string","required":true},"week_days":{"type":["list","string"],"optional":true}}},"optional":true}}}},"azurerm_dev_test_virtual_network":{"block":{"attributes":{"description":{"type":"string","optional":true},"lab_name":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"unique_identifier":{"type":"string","computed":true}},"block_types":{"subnet":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","computed":true},"use_in_virtual_machine_creation":{"type":"string","optional":true,"default":"Allow"},"use_public_ip_address":{"type":"string","optional":true,"default":"Allow"}},"block_types":{"shared_public_ip_address":{"nesting_mode":3,"block":{"block_types":{"allowed_ports":{"nesting_mode":3,"block":{"attributes":{"backend_port":{"type":"number","optional":true},"transport_protocol":{"type":"string","optional":true}}},"optional":true}}},"optional":true}}},"optional":true,"computed":true}}}},"azurerm_dev_test_windows_virtual_machine":{"block":{"attributes":{"allow_claim":{"type":"bool","optional":true,"default":true},"disallow_public_ip_address":{"type":"bool","optional":true},"fqdn":{"type":"string","computed":true},"lab_name":{"type":"string","required":true},"lab_subnet_name":{"type":"string","required":true},"lab_virtual_network_id":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"notes":{"type":"string","optional":true},"password":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"size":{"type":"string","required":true},"storage_type":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"unique_identifier":{"type":"string","computed":true},"username":{"type":"string","required":true}},"block_types":{"gallery_image_reference":{"nesting_mode":3,"block":{"attributes":{"offer":{"type":"string","required":true},"publisher":{"type":"string","required":true},"sku":{"type":"string","required":true},"version":{"type":"string","required":true}}},"required":true},"inbound_nat_rule":{"nesting_mode":4,"block":{"attributes":{"backend_port":{"type":"number","required":true},"frontend_port":{"type":"number","computed":true},"protocol":{"type":"string","required":true}}},"optional":true}}}},"azurerm_digital_twins_endpoint_eventgrid":{"block":{"attributes":{"dead_letter_storage_secret":{"type":"string","optional":true},"digital_twins_id":{"type":"string","required":true},"eventgrid_topic_endpoint":{"type":"string","required":true},"eventgrid_topic_primary_access_key":{"type":"string","required":true},"eventgrid_topic_secondary_access_key":{"type":"string","required":true},"name":{"type":"string","required":true}}}},"azurerm_digital_twins_endpoint_eventhub":{"block":{"attributes":{"dead_letter_storage_secret":{"type":"string","optional":true},"digital_twins_id":{"type":"string","required":true},"eventhub_primary_connection_string":{"type":"string","required":true},"eventhub_secondary_connection_string":{"type":"string","required":true},"name":{"type":"string","required":true}}}},"azurerm_digital_twins_endpoint_servicebus":{"block":{"attributes":{"dead_letter_storage_secret":{"type":"string","optional":true},"digital_twins_id":{"type":"string","required":true},"name":{"type":"string","required":true},"servicebus_primary_connection_string":{"type":"string","required":true},"servicebus_secondary_connection_string":{"type":"string","required":true}}}},"azurerm_digital_twins_instance":{"block":{"attributes":{"host_name":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_digital_twins_time_series_database_connection":{"block":{"attributes":{"digital_twins_id":{"type":"string","required":true},"eventhub_consumer_group_name":{"type":"string","optional":true,"default":"$Default"},"eventhub_name":{"type":"string","required":true},"eventhub_namespace_endpoint_uri":{"type":"string","required":true},"eventhub_namespace_id":{"type":"string","required":true},"kusto_cluster_id":{"type":"string","required":true},"kusto_cluster_uri":{"type":"string","required":true},"kusto_database_name":{"type":"string","required":true},"kusto_table_name":{"type":"string","optional":true,"default":"AdtPropertyEvents"},"name":{"type":"string","required":true}}}},"azurerm_disk_access":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_disk_encryption_set":{"block":{"attributes":{"auto_key_rotation_enabled":{"type":"bool","optional":true,"default":false},"encryption_type":{"type":"string","optional":true,"default":"EncryptionAtRestWithCustomerKey"},"federated_client_id":{"type":"string","optional":true},"key_vault_key_id":{"type":"string","optional":true,"exactly_one_of":["managed_hsm_key_id","key_vault_key_id"]},"key_vault_key_url":{"type":"string","computed":true},"location":{"type":"string","required":true},"managed_hsm_key_id":{"type":"string","optional":true,"exactly_one_of":["managed_hsm_key_id","key_vault_key_id"]},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"required":true}}}},"azurerm_dns_a_record":{"block":{"attributes":{"fqdn":{"type":"string","computed":true},"name":{"type":"string","required":true},"records":{"type":["set","string"],"optional":true,"conflicts_with":["target_resource_id"]},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"target_resource_id":{"type":"string","optional":true,"conflicts_with":["records"]},"ttl":{"type":"number","required":true},"zone_name":{"type":"string","required":true}}}},"azurerm_dns_aaaa_record":{"block":{"attributes":{"fqdn":{"type":"string","computed":true},"name":{"type":"string","required":true},"records":{"type":["set","string"],"optional":true,"conflicts_with":["target_resource_id"]},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"target_resource_id":{"type":"string","optional":true,"conflicts_with":["records"]},"ttl":{"type":"number","required":true},"zone_name":{"type":"string","required":true}}}},"azurerm_dns_caa_record":{"block":{"attributes":{"fqdn":{"type":"string","computed":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"ttl":{"type":"number","required":true},"zone_name":{"type":"string","required":true}},"block_types":{"record":{"nesting_mode":4,"block":{"attributes":{"flags":{"type":"number","required":true},"tag":{"type":"string","required":true},"value":{"type":"string","required":true}}},"required":true}}}},"azurerm_dns_cname_record":{"block":{"attributes":{"fqdn":{"type":"string","computed":true},"name":{"type":"string","required":true},"record":{"type":"string","optional":true,"exactly_one_of":["record","target_resource_id"]},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"target_resource_id":{"type":"string","optional":true,"exactly_one_of":["record","target_resource_id"]},"ttl":{"type":"number","required":true},"zone_name":{"type":"string","required":true}}}},"azurerm_dns_mx_record":{"block":{"attributes":{"fqdn":{"type":"string","computed":true},"name":{"type":"string","optional":true,"default":"@"},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"ttl":{"type":"number","required":true},"zone_name":{"type":"string","required":true}},"block_types":{"record":{"nesting_mode":4,"block":{"attributes":{"exchange":{"type":"string","required":true},"preference":{"type":"string","required":true}}},"required":true}}}},"azurerm_dns_ns_record":{"block":{"attributes":{"fqdn":{"type":"string","computed":true},"name":{"type":"string","required":true},"records":{"type":["list","string"],"required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"ttl":{"type":"number","required":true},"zone_name":{"type":"string","required":true}}}},"azurerm_dns_ptr_record":{"block":{"attributes":{"fqdn":{"type":"string","computed":true},"name":{"type":"string","required":true},"records":{"type":["set","string"],"required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"ttl":{"type":"number","required":true},"zone_name":{"type":"string","required":true}}}},"azurerm_dns_srv_record":{"block":{"attributes":{"fqdn":{"type":"string","computed":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"ttl":{"type":"number","required":true},"zone_name":{"type":"string","required":true}},"block_types":{"record":{"nesting_mode":4,"block":{"attributes":{"port":{"type":"number","required":true},"priority":{"type":"number","required":true},"target":{"type":"string","required":true},"weight":{"type":"number","required":true}}},"required":true}}}},"azurerm_dns_txt_record":{"block":{"attributes":{"fqdn":{"type":"string","computed":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"ttl":{"type":"number","required":true},"zone_name":{"type":"string","required":true}},"block_types":{"record":{"nesting_mode":4,"block":{"attributes":{"value":{"type":"string","required":true}}},"required":true}}}},"azurerm_dns_zone":{"block":{"attributes":{"max_number_of_record_sets":{"type":"number","computed":true},"name":{"type":"string","required":true},"name_servers":{"type":["set","string"],"computed":true},"number_of_record_sets":{"type":"number","computed":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"soa_record":{"nesting_mode":3,"block":{"attributes":{"email":{"type":"string","required":true},"expire_time":{"type":"number","optional":true,"default":2419200},"fqdn":{"type":"string","computed":true},"host_name":{"type":"string","computed":true},"minimum_ttl":{"type":"number","optional":true,"default":300},"refresh_time":{"type":"number","optional":true,"default":3600},"retry_time":{"type":"number","optional":true,"default":300},"serial_number":{"type":"number","optional":true,"default":1},"tags":{"type":["map","string"],"optional":true},"ttl":{"type":"number","optional":true,"default":3600}}},"optional":true,"computed":true}}}},"azurerm_elastic_cloud_elasticsearch":{"block":{"attributes":{"elastic_cloud_deployment_id":{"type":"string","computed":true},"elastic_cloud_email_address":{"type":"string","required":true},"elastic_cloud_sso_default_url":{"type":"string","computed":true},"elastic_cloud_user_id":{"type":"string","computed":true},"elasticsearch_service_url":{"type":"string","computed":true},"kibana_service_url":{"type":"string","computed":true},"kibana_sso_uri":{"type":"string","computed":true},"location":{"type":"string","required":true},"monitoring_enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"logs":{"nesting_mode":3,"block":{"attributes":{"send_activity_logs":{"type":"bool","optional":true,"default":false},"send_azuread_logs":{"type":"bool","optional":true,"default":false},"send_subscription_logs":{"type":"bool","optional":true,"default":false}},"block_types":{"filtering_tag":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true}}}},"azurerm_elastic_san":{"block":{"attributes":{"base_size_in_tib":{"type":"number","required":true},"extended_size_in_tib":{"type":"number","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"total_iops":{"type":"number","computed":true},"total_mbps":{"type":"number","computed":true},"total_size_in_tib":{"type":"number","computed":true},"total_volume_size_in_gib":{"type":"number","computed":true},"volume_group_count":{"type":"number","computed":true},"zones":{"type":["set","string"],"optional":true}},"block_types":{"sku":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"tier":{"type":"string","optional":true,"default":"Premium"}}},"required":true}}}},"azurerm_elastic_san_volume":{"block":{"attributes":{"name":{"type":"string","required":true},"size_in_gib":{"type":"number","required":true},"target_iqn":{"type":"string","computed":true},"target_portal_hostname":{"type":"string","computed":true},"target_portal_port":{"type":"number","computed":true},"volume_group_id":{"type":"string","required":true},"volume_id":{"type":"string","computed":true}},"block_types":{"create_source":{"nesting_mode":3,"block":{"attributes":{"source_id":{"type":"string","required":true},"source_type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_elastic_san_volume_group":{"block":{"attributes":{"elastic_san_id":{"type":"string","required":true},"encryption_type":{"type":"string","optional":true,"default":"EncryptionAtRestWithPlatformKey"},"name":{"type":"string","required":true},"protocol_type":{"type":"string","optional":true,"default":"Iscsi"}},"block_types":{"encryption":{"nesting_mode":3,"block":{"attributes":{"current_versioned_key_expiration_timestamp":{"type":"string","computed":true},"current_versioned_key_id":{"type":"string","computed":true},"key_vault_key_id":{"type":"string","required":true},"last_key_rotation_timestamp":{"type":"string","computed":true},"user_assigned_identity_id":{"type":"string","optional":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"network_rule":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"default":"Allow"},"subnet_id":{"type":"string","required":true}}},"optional":true}}}},"azurerm_email_communication_service":{"block":{"attributes":{"data_location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_email_communication_service_domain":{"block":{"attributes":{"domain_management":{"type":"string","required":true},"email_service_id":{"type":"string","required":true},"from_sender_domain":{"type":"string","computed":true},"mail_from_sender_domain":{"type":"string","computed":true},"name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"user_engagement_tracking_enabled":{"type":"bool","optional":true},"verification_records":{"type":["list",["object",{"dkim":["list",["object",{"name":"string","ttl":"number","type":"string","value":"string"}]],"dkim2":["list",["object",{"name":"string","ttl":"number","type":"string","value":"string"}]],"dmarc":["list",["object",{"name":"string","ttl":"number","type":"string","value":"string"}]],"domain":["list",["object",{"name":"string","ttl":"number","type":"string","value":"string"}]],"spf":["list",["object",{"name":"string","ttl":"number","type":"string","value":"string"}]]}]],"computed":true}}}},"azurerm_eventgrid_domain":{"block":{"attributes":{"auto_create_topic_with_first_subscription":{"type":"bool","optional":true,"default":true},"auto_delete_topic_with_last_subscription":{"type":"bool","optional":true,"default":true},"endpoint":{"type":"string","computed":true},"inbound_ip_rule":{"type":["list",["object",{"action":"string","ip_mask":"string"}]],"optional":true},"input_schema":{"type":"string","optional":true,"default":"EventGridSchema"},"local_auth_enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"primary_access_key":{"type":"string","computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"secondary_access_key":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"input_mapping_default_values":{"nesting_mode":3,"block":{"attributes":{"data_version":{"type":"string","optional":true},"event_type":{"type":"string","optional":true},"subject":{"type":"string","optional":true}}},"optional":true},"input_mapping_fields":{"nesting_mode":3,"block":{"attributes":{"data_version":{"type":"string","optional":true},"event_time":{"type":"string","optional":true},"event_type":{"type":"string","optional":true},"id":{"type":"string","optional":true},"subject":{"type":"string","optional":true},"topic":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_eventgrid_domain_topic":{"block":{"attributes":{"domain_name":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_eventgrid_event_subscription":{"block":{"attributes":{"advanced_filtering_on_arrays_enabled":{"type":"bool","optional":true,"default":false},"event_delivery_schema":{"type":"string","optional":true,"default":"EventGridSchema"},"eventhub_endpoint_id":{"type":"string","optional":true,"computed":true,"conflicts_with":["azure_function_endpoint","hybrid_connection_endpoint_id","service_bus_queue_endpoint_id","service_bus_topic_endpoint_id","storage_queue_endpoint","webhook_endpoint"]},"expiration_time_utc":{"type":"string","optional":true},"hybrid_connection_endpoint_id":{"type":"string","optional":true,"computed":true,"conflicts_with":["azure_function_endpoint","eventhub_endpoint_id","service_bus_queue_endpoint_id","service_bus_topic_endpoint_id","storage_queue_endpoint","webhook_endpoint"]},"included_event_types":{"type":["list","string"],"optional":true,"computed":true},"labels":{"type":["list","string"],"optional":true},"name":{"type":"string","required":true},"scope":{"type":"string","required":true},"service_bus_queue_endpoint_id":{"type":"string","optional":true,"conflicts_with":["azure_function_endpoint","eventhub_endpoint_id","hybrid_connection_endpoint_id","service_bus_topic_endpoint_id","storage_queue_endpoint","webhook_endpoint"]},"service_bus_topic_endpoint_id":{"type":"string","optional":true,"conflicts_with":["azure_function_endpoint","eventhub_endpoint_id","hybrid_connection_endpoint_id","service_bus_queue_endpoint_id","storage_queue_endpoint","webhook_endpoint"]}},"block_types":{"advanced_filter":{"nesting_mode":3,"block":{"block_types":{"bool_equals":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"value":{"type":"bool","required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"is_not_null":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"is_null_or_undefined":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"number_greater_than":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"value":{"type":"number","required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"number_greater_than_or_equals":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"value":{"type":"number","required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"number_in":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list","number"],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"number_in_range":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list",["list","number"]],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"number_less_than":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"value":{"type":"number","required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"number_less_than_or_equals":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"value":{"type":"number","required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"number_not_in":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list","number"],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"number_not_in_range":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list",["list","number"]],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"string_begins_with":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"string_contains":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"string_ends_with":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"string_in":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"string_not_begins_with":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"string_not_contains":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"string_not_ends_with":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"string_not_in":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]}}},"optional":true},"azure_function_endpoint":{"nesting_mode":3,"block":{"attributes":{"function_id":{"type":"string","required":true},"max_events_per_batch":{"type":"number","optional":true},"preferred_batch_size_in_kilobytes":{"type":"number","optional":true}}},"optional":true,"conflicts_with":["eventhub_endpoint_id","hybrid_connection_endpoint_id","service_bus_queue_endpoint_id","service_bus_topic_endpoint_id","storage_queue_endpoint","webhook_endpoint"]},"dead_letter_identity":{"nesting_mode":3,"block":{"attributes":{"type":{"type":"string","required":true},"user_assigned_identity":{"type":"string","optional":true}}},"optional":true},"delivery_identity":{"nesting_mode":3,"block":{"attributes":{"type":{"type":"string","required":true},"user_assigned_identity":{"type":"string","optional":true}}},"optional":true},"delivery_property":{"nesting_mode":3,"block":{"attributes":{"header_name":{"type":"string","required":true},"secret":{"type":"bool","optional":true},"source_field":{"type":"string","optional":true},"type":{"type":"string","required":true},"value":{"type":"string","optional":true}}},"optional":true},"retry_policy":{"nesting_mode":3,"block":{"attributes":{"event_time_to_live":{"type":"number","required":true},"max_delivery_attempts":{"type":"number","required":true}}},"optional":true,"computed":true},"storage_blob_dead_letter_destination":{"nesting_mode":3,"block":{"attributes":{"storage_account_id":{"type":"string","required":true},"storage_blob_container_name":{"type":"string","required":true}}},"optional":true},"storage_queue_endpoint":{"nesting_mode":3,"block":{"attributes":{"queue_message_time_to_live_in_seconds":{"type":"number","optional":true},"queue_name":{"type":"string","required":true},"storage_account_id":{"type":"string","required":true}}},"optional":true,"conflicts_with":["azure_function_endpoint","eventhub_endpoint_id","hybrid_connection_endpoint_id","service_bus_queue_endpoint_id","service_bus_topic_endpoint_id","webhook_endpoint"]},"subject_filter":{"nesting_mode":3,"block":{"attributes":{"case_sensitive":{"type":"bool","optional":true,"at_least_one_of":["subject_filter.0.subject_begins_with","subject_filter.0.subject_ends_with","subject_filter.0.case_sensitive"]},"subject_begins_with":{"type":"string","optional":true,"at_least_one_of":["subject_filter.0.subject_begins_with","subject_filter.0.subject_ends_with","subject_filter.0.case_sensitive"]},"subject_ends_with":{"type":"string","optional":true,"at_least_one_of":["subject_filter.0.subject_begins_with","subject_filter.0.subject_ends_with","subject_filter.0.case_sensitive"]}}},"optional":true},"webhook_endpoint":{"nesting_mode":3,"block":{"attributes":{"active_directory_app_id_or_uri":{"type":"string","optional":true},"active_directory_tenant_id":{"type":"string","optional":true},"base_url":{"type":"string","computed":true},"max_events_per_batch":{"type":"number","optional":true},"preferred_batch_size_in_kilobytes":{"type":"number","optional":true},"url":{"type":"string","required":true}}},"optional":true,"conflicts_with":["azure_function_endpoint","eventhub_endpoint_id","hybrid_connection_endpoint_id","service_bus_queue_endpoint_id","service_bus_topic_endpoint_id","storage_queue_endpoint"]}}}},"azurerm_eventgrid_system_topic":{"block":{"attributes":{"location":{"type":"string","required":true},"metric_arm_resource_id":{"type":"string","computed":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"source_arm_resource_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"topic_type":{"type":"string","required":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_eventgrid_system_topic_event_subscription":{"block":{"attributes":{"advanced_filtering_on_arrays_enabled":{"type":"bool","optional":true,"default":false},"event_delivery_schema":{"type":"string","optional":true,"default":"EventGridSchema"},"eventhub_endpoint_id":{"type":"string","optional":true,"computed":true,"conflicts_with":["azure_function_endpoint","hybrid_connection_endpoint_id","service_bus_queue_endpoint_id","service_bus_topic_endpoint_id","storage_queue_endpoint","webhook_endpoint"]},"expiration_time_utc":{"type":"string","optional":true},"hybrid_connection_endpoint_id":{"type":"string","optional":true,"computed":true,"conflicts_with":["azure_function_endpoint","eventhub_endpoint_id","service_bus_queue_endpoint_id","service_bus_topic_endpoint_id","storage_queue_endpoint","webhook_endpoint"]},"included_event_types":{"type":["list","string"],"optional":true,"computed":true},"labels":{"type":["list","string"],"optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"service_bus_queue_endpoint_id":{"type":"string","optional":true,"conflicts_with":["azure_function_endpoint","eventhub_endpoint_id","hybrid_connection_endpoint_id","service_bus_topic_endpoint_id","storage_queue_endpoint","webhook_endpoint"]},"service_bus_topic_endpoint_id":{"type":"string","optional":true,"conflicts_with":["azure_function_endpoint","eventhub_endpoint_id","hybrid_connection_endpoint_id","service_bus_queue_endpoint_id","storage_queue_endpoint","webhook_endpoint"]},"system_topic":{"type":"string","required":true}},"block_types":{"advanced_filter":{"nesting_mode":3,"block":{"block_types":{"bool_equals":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"value":{"type":"bool","required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"is_not_null":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"is_null_or_undefined":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"number_greater_than":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"value":{"type":"number","required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"number_greater_than_or_equals":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"value":{"type":"number","required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"number_in":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list","number"],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"number_in_range":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list",["list","number"]],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"number_less_than":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"value":{"type":"number","required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"number_less_than_or_equals":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"value":{"type":"number","required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"number_not_in":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list","number"],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"number_not_in_range":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list",["list","number"]],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"string_begins_with":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"string_contains":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"string_ends_with":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"string_in":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"string_not_begins_with":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"string_not_contains":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"string_not_ends_with":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"string_not_in":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]}}},"optional":true},"azure_function_endpoint":{"nesting_mode":3,"block":{"attributes":{"function_id":{"type":"string","required":true},"max_events_per_batch":{"type":"number","optional":true},"preferred_batch_size_in_kilobytes":{"type":"number","optional":true}}},"optional":true,"conflicts_with":["eventhub_endpoint_id","hybrid_connection_endpoint_id","service_bus_queue_endpoint_id","service_bus_topic_endpoint_id","storage_queue_endpoint","webhook_endpoint"]},"dead_letter_identity":{"nesting_mode":3,"block":{"attributes":{"type":{"type":"string","required":true},"user_assigned_identity":{"type":"string","optional":true}}},"optional":true},"delivery_identity":{"nesting_mode":3,"block":{"attributes":{"type":{"type":"string","required":true},"user_assigned_identity":{"type":"string","optional":true}}},"optional":true},"delivery_property":{"nesting_mode":3,"block":{"attributes":{"header_name":{"type":"string","required":true},"secret":{"type":"bool","optional":true},"source_field":{"type":"string","optional":true},"type":{"type":"string","required":true},"value":{"type":"string","optional":true}}},"optional":true},"retry_policy":{"nesting_mode":3,"block":{"attributes":{"event_time_to_live":{"type":"number","required":true},"max_delivery_attempts":{"type":"number","required":true}}},"optional":true,"computed":true},"storage_blob_dead_letter_destination":{"nesting_mode":3,"block":{"attributes":{"storage_account_id":{"type":"string","required":true},"storage_blob_container_name":{"type":"string","required":true}}},"optional":true},"storage_queue_endpoint":{"nesting_mode":3,"block":{"attributes":{"queue_message_time_to_live_in_seconds":{"type":"number","optional":true},"queue_name":{"type":"string","required":true},"storage_account_id":{"type":"string","required":true}}},"optional":true,"conflicts_with":["azure_function_endpoint","eventhub_endpoint_id","hybrid_connection_endpoint_id","service_bus_queue_endpoint_id","service_bus_topic_endpoint_id","webhook_endpoint"]},"subject_filter":{"nesting_mode":3,"block":{"attributes":{"case_sensitive":{"type":"bool","optional":true,"at_least_one_of":["subject_filter.0.subject_begins_with","subject_filter.0.subject_ends_with","subject_filter.0.case_sensitive"]},"subject_begins_with":{"type":"string","optional":true,"at_least_one_of":["subject_filter.0.subject_begins_with","subject_filter.0.subject_ends_with","subject_filter.0.case_sensitive"]},"subject_ends_with":{"type":"string","optional":true,"at_least_one_of":["subject_filter.0.subject_begins_with","subject_filter.0.subject_ends_with","subject_filter.0.case_sensitive"]}}},"optional":true},"webhook_endpoint":{"nesting_mode":3,"block":{"attributes":{"active_directory_app_id_or_uri":{"type":"string","optional":true},"active_directory_tenant_id":{"type":"string","optional":true},"base_url":{"type":"string","computed":true},"max_events_per_batch":{"type":"number","optional":true},"preferred_batch_size_in_kilobytes":{"type":"number","optional":true},"url":{"type":"string","required":true}}},"optional":true,"conflicts_with":["azure_function_endpoint","eventhub_endpoint_id","hybrid_connection_endpoint_id","service_bus_queue_endpoint_id","service_bus_topic_endpoint_id","storage_queue_endpoint"]}}}},"azurerm_eventgrid_topic":{"block":{"attributes":{"endpoint":{"type":"string","computed":true},"inbound_ip_rule":{"type":["list",["object",{"action":"string","ip_mask":"string"}]],"optional":true},"input_schema":{"type":"string","optional":true,"default":"EventGridSchema"},"local_auth_enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"primary_access_key":{"type":"string","computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"secondary_access_key":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"input_mapping_default_values":{"nesting_mode":3,"block":{"attributes":{"data_version":{"type":"string","optional":true},"event_type":{"type":"string","optional":true},"subject":{"type":"string","optional":true}}},"optional":true},"input_mapping_fields":{"nesting_mode":3,"block":{"attributes":{"data_version":{"type":"string","optional":true},"event_time":{"type":"string","optional":true},"event_type":{"type":"string","optional":true},"id":{"type":"string","optional":true},"subject":{"type":"string","optional":true},"topic":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_eventhub":{"block":{"attributes":{"message_retention":{"type":"number","required":true},"name":{"type":"string","required":true},"namespace_name":{"type":"string","required":true},"partition_count":{"type":"number","required":true},"partition_ids":{"type":["set","string"],"computed":true},"resource_group_name":{"type":"string","required":true},"status":{"type":"string","optional":true,"default":"Active"}},"block_types":{"capture_description":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","required":true},"encoding":{"type":"string","required":true},"interval_in_seconds":{"type":"number","optional":true,"default":300},"size_limit_in_bytes":{"type":"number","optional":true,"default":314572800},"skip_empty_archives":{"type":"bool","optional":true,"default":false}},"block_types":{"destination":{"nesting_mode":3,"block":{"attributes":{"archive_name_format":{"type":"string","required":true},"blob_container_name":{"type":"string","required":true},"name":{"type":"string","required":true},"storage_account_id":{"type":"string","required":true}}},"required":true}}},"optional":true}}}},"azurerm_eventhub_authorization_rule":{"block":{"attributes":{"eventhub_name":{"type":"string","required":true},"listen":{"type":"bool","optional":true,"default":false},"manage":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"namespace_name":{"type":"string","required":true},"primary_connection_string":{"type":"string","computed":true},"primary_connection_string_alias":{"type":"string","computed":true},"primary_key":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"secondary_connection_string":{"type":"string","computed":true},"secondary_connection_string_alias":{"type":"string","computed":true},"secondary_key":{"type":"string","computed":true},"send":{"type":"bool","optional":true,"default":false}}}},"azurerm_eventhub_cluster":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_eventhub_consumer_group":{"block":{"attributes":{"eventhub_name":{"type":"string","required":true},"name":{"type":"string","required":true},"namespace_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"user_metadata":{"type":"string","optional":true}}}},"azurerm_eventhub_namespace":{"block":{"attributes":{"auto_inflate_enabled":{"type":"bool","optional":true,"default":false},"capacity":{"type":"number","optional":true,"default":1},"dedicated_cluster_id":{"type":"string","optional":true},"default_primary_connection_string":{"type":"string","computed":true},"default_primary_connection_string_alias":{"type":"string","computed":true},"default_primary_key":{"type":"string","computed":true},"default_secondary_connection_string":{"type":"string","computed":true},"default_secondary_connection_string_alias":{"type":"string","computed":true},"default_secondary_key":{"type":"string","computed":true},"local_authentication_enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"maximum_throughput_units":{"type":"number","optional":true},"minimum_tls_version":{"type":"string","optional":true,"default":"1.2"},"name":{"type":"string","required":true},"network_rulesets":{"type":["list",["object",{"default_action":"string","ip_rule":["list",["object",{"action":"string","ip_mask":"string"}]],"public_network_access_enabled":"bool","trusted_service_access_enabled":"bool","virtual_network_rule":["set",["object",{"ignore_missing_virtual_network_service_endpoint":"bool","subnet_id":"string"}]]}]],"optional":true,"computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"sku":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_eventhub_namespace_authorization_rule":{"block":{"attributes":{"listen":{"type":"bool","optional":true,"default":false},"manage":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"namespace_name":{"type":"string","required":true},"primary_connection_string":{"type":"string","computed":true},"primary_connection_string_alias":{"type":"string","computed":true},"primary_key":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"secondary_connection_string":{"type":"string","computed":true},"secondary_connection_string_alias":{"type":"string","computed":true},"secondary_key":{"type":"string","computed":true},"send":{"type":"bool","optional":true,"default":false}}}},"azurerm_eventhub_namespace_customer_managed_key":{"block":{"attributes":{"eventhub_namespace_id":{"type":"string","required":true},"infrastructure_encryption_enabled":{"type":"bool","optional":true,"default":false},"key_vault_key_ids":{"type":["set","string"],"required":true},"user_assigned_identity_id":{"type":"string","optional":true}}}},"azurerm_eventhub_namespace_disaster_recovery_config":{"block":{"attributes":{"name":{"type":"string","required":true},"namespace_name":{"type":"string","required":true},"partner_namespace_id":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_eventhub_namespace_schema_group":{"block":{"attributes":{"name":{"type":"string","required":true},"namespace_id":{"type":"string","required":true},"schema_compatibility":{"type":"string","required":true},"schema_type":{"type":"string","required":true}}}},"azurerm_express_route_circuit":{"block":{"attributes":{"allow_classic_operations":{"type":"bool","optional":true,"default":false},"authorization_key":{"type":"string","optional":true},"bandwidth_in_gbps":{"type":"number","optional":true,"conflicts_with":["bandwidth_in_mbps","peering_location","service_provider_name"],"required_with":["express_route_port_id"]},"bandwidth_in_mbps":{"type":"number","optional":true,"conflicts_with":["bandwidth_in_gbps","express_route_port_id"],"required_with":["peering_location","service_provider_name"]},"express_route_port_id":{"type":"string","optional":true,"conflicts_with":["bandwidth_in_mbps","peering_location","service_provider_name"],"required_with":["bandwidth_in_gbps"]},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"peering_location":{"type":"string","optional":true,"conflicts_with":["bandwidth_in_gbps","express_route_port_id"],"required_with":["bandwidth_in_mbps","service_provider_name"]},"resource_group_name":{"type":"string","required":true},"service_key":{"type":"string","computed":true},"service_provider_name":{"type":"string","optional":true,"conflicts_with":["bandwidth_in_gbps","express_route_port_id"],"required_with":["bandwidth_in_mbps","peering_location"]},"service_provider_provisioning_state":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"sku":{"nesting_mode":3,"block":{"attributes":{"family":{"type":"string","required":true},"tier":{"type":"string","required":true}}},"required":true}}}},"azurerm_express_route_circuit_authorization":{"block":{"attributes":{"authorization_key":{"type":"string","computed":true},"authorization_use_status":{"type":"string","computed":true},"express_route_circuit_name":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_express_route_circuit_connection":{"block":{"attributes":{"address_prefix_ipv4":{"type":"string","required":true},"address_prefix_ipv6":{"type":"string","optional":true},"authorization_key":{"type":"string","optional":true},"name":{"type":"string","required":true},"peer_peering_id":{"type":"string","required":true},"peering_id":{"type":"string","required":true}}}},"azurerm_express_route_circuit_peering":{"block":{"attributes":{"azure_asn":{"type":"number","computed":true},"express_route_circuit_name":{"type":"string","required":true},"gateway_manager_etag":{"type":"string","computed":true},"ipv4_enabled":{"type":"bool","optional":true,"default":true},"peer_asn":{"type":"number","optional":true,"computed":true},"peering_type":{"type":"string","required":true},"primary_azure_port":{"type":"string","computed":true},"primary_peer_address_prefix":{"type":"string","optional":true,"required_with":["secondary_peer_address_prefix"]},"resource_group_name":{"type":"string","required":true},"route_filter_id":{"type":"string","optional":true},"secondary_azure_port":{"type":"string","computed":true},"secondary_peer_address_prefix":{"type":"string","optional":true,"required_with":["primary_peer_address_prefix"]},"shared_key":{"type":"string","optional":true},"vlan_id":{"type":"number","required":true}},"block_types":{"ipv6":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"primary_peer_address_prefix":{"type":"string","required":true},"route_filter_id":{"type":"string","optional":true},"secondary_peer_address_prefix":{"type":"string","required":true}},"block_types":{"microsoft_peering":{"nesting_mode":3,"block":{"attributes":{"advertised_communities":{"type":["list","string"],"optional":true},"advertised_public_prefixes":{"type":["list","string"],"optional":true},"customer_asn":{"type":"number","optional":true,"default":0},"routing_registry_name":{"type":"string","optional":true,"default":"NONE"}}},"optional":true}}},"optional":true},"microsoft_peering_config":{"nesting_mode":3,"block":{"attributes":{"advertised_communities":{"type":["list","string"],"optional":true},"advertised_public_prefixes":{"type":["list","string"],"required":true},"customer_asn":{"type":"number","optional":true,"default":0},"routing_registry_name":{"type":"string","optional":true,"default":"NONE"}}},"optional":true}}}},"azurerm_express_route_connection":{"block":{"attributes":{"authorization_key":{"type":"string","optional":true},"enable_internet_security":{"type":"bool","optional":true},"express_route_circuit_peering_id":{"type":"string","required":true},"express_route_gateway_bypass_enabled":{"type":"bool","optional":true,"default":false},"express_route_gateway_id":{"type":"string","required":true},"name":{"type":"string","required":true},"private_link_fast_path_enabled":{"type":"bool","optional":true},"routing_weight":{"type":"number","optional":true,"default":0}},"block_types":{"routing":{"nesting_mode":3,"block":{"attributes":{"associated_route_table_id":{"type":"string","optional":true,"computed":true,"at_least_one_of":["routing.0.associated_route_table_id","routing.0.propagated_route_table"]},"inbound_route_map_id":{"type":"string","optional":true},"outbound_route_map_id":{"type":"string","optional":true}},"block_types":{"propagated_route_table":{"nesting_mode":3,"block":{"attributes":{"labels":{"type":["set","string"],"optional":true,"computed":true,"at_least_one_of":["routing.0.propagated_route_table.0.labels","routing.0.propagated_route_table.0.route_table_ids"]},"route_table_ids":{"type":["list","string"],"optional":true,"computed":true,"at_least_one_of":["routing.0.propagated_route_table.0.labels","routing.0.propagated_route_table.0.route_table_ids"]}}},"optional":true,"computed":true,"at_least_one_of":["routing.0.associated_route_table_id","routing.0.propagated_route_table"]}}},"optional":true,"computed":true}}}},"azurerm_express_route_gateway":{"block":{"attributes":{"allow_non_virtual_wan_traffic":{"type":"bool","optional":true,"default":false},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"scale_units":{"type":"number","required":true},"tags":{"type":["map","string"],"optional":true},"virtual_hub_id":{"type":"string","required":true}}}},"azurerm_express_route_port":{"block":{"attributes":{"bandwidth_in_gbps":{"type":"number","required":true},"billing_type":{"type":"string","optional":true,"default":"MeteredData"},"encapsulation":{"type":"string","required":true},"ethertype":{"type":"string","computed":true},"guid":{"type":"string","computed":true},"location":{"type":"string","required":true},"mtu":{"type":"string","computed":true},"name":{"type":"string","required":true},"peering_location":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"link1":{"nesting_mode":3,"block":{"attributes":{"admin_enabled":{"type":"bool","optional":true,"default":false},"connector_type":{"type":"string","computed":true},"id":{"type":"string","computed":true},"interface_name":{"type":"string","computed":true},"macsec_cak_keyvault_secret_id":{"type":"string","optional":true},"macsec_cipher":{"type":"string","optional":true,"default":"GcmAes128"},"macsec_ckn_keyvault_secret_id":{"type":"string","optional":true},"macsec_sci_enabled":{"type":"bool","optional":true,"default":false},"patch_panel_id":{"type":"string","computed":true},"rack_id":{"type":"string","computed":true},"router_name":{"type":"string","computed":true}}},"optional":true,"computed":true},"link2":{"nesting_mode":3,"block":{"attributes":{"admin_enabled":{"type":"bool","optional":true,"default":false},"connector_type":{"type":"string","computed":true},"id":{"type":"string","computed":true},"interface_name":{"type":"string","computed":true},"macsec_cak_keyvault_secret_id":{"type":"string","optional":true},"macsec_cipher":{"type":"string","optional":true,"default":"GcmAes128"},"macsec_ckn_keyvault_secret_id":{"type":"string","optional":true},"macsec_sci_enabled":{"type":"bool","optional":true,"default":false},"patch_panel_id":{"type":"string","computed":true},"rack_id":{"type":"string","computed":true},"router_name":{"type":"string","computed":true}}},"optional":true,"computed":true}}}},"azurerm_express_route_port_authorization":{"block":{"attributes":{"authorization_key":{"type":"string","computed":true},"authorization_use_status":{"type":"string","computed":true},"express_route_port_name":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_extended_custom_location":{"block":{"attributes":{"cluster_extension_ids":{"type":["list","string"],"required":true},"display_name":{"type":"string","optional":true},"host_resource_id":{"type":"string","required":true},"host_type":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"namespace":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}},"block_types":{"authentication":{"nesting_mode":3,"block":{"attributes":{"type":{"type":"string","optional":true},"value":{"type":"string","required":true}}},"optional":true}}}},"azurerm_federated_identity_credential":{"block":{"attributes":{"audience":{"type":["list","string"],"required":true},"issuer":{"type":"string","required":true},"name":{"type":"string","required":true},"parent_id":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"subject":{"type":"string","required":true}}}},"azurerm_firewall":{"block":{"attributes":{"dns_proxy_enabled":{"type":"bool","optional":true,"computed":true},"dns_servers":{"type":["list","string"],"optional":true},"firewall_policy_id":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"private_ip_ranges":{"type":["set","string"],"optional":true},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","required":true},"sku_tier":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"threat_intel_mode":{"type":"string","optional":true,"computed":true},"zones":{"type":["set","string"],"optional":true}},"block_types":{"ip_configuration":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"private_ip_address":{"type":"string","computed":true},"public_ip_address_id":{"type":"string","optional":true},"subnet_id":{"type":"string","optional":true}}},"optional":true},"management_ip_configuration":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"private_ip_address":{"type":"string","computed":true},"public_ip_address_id":{"type":"string","required":true},"subnet_id":{"type":"string","required":true}}},"optional":true},"virtual_hub":{"nesting_mode":3,"block":{"attributes":{"private_ip_address":{"type":"string","computed":true},"public_ip_addresses":{"type":["list","string"],"computed":true},"public_ip_count":{"type":"number","optional":true,"default":1},"virtual_hub_id":{"type":"string","required":true}}},"optional":true}}}},"azurerm_firewall_application_rule_collection":{"block":{"attributes":{"action":{"type":"string","required":true},"azure_firewall_name":{"type":"string","required":true},"name":{"type":"string","required":true},"priority":{"type":"number","required":true},"resource_group_name":{"type":"string","required":true}},"block_types":{"rule":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"fqdn_tags":{"type":["list","string"],"optional":true},"name":{"type":"string","required":true},"source_addresses":{"type":["list","string"],"optional":true},"source_ip_groups":{"type":["list","string"],"optional":true},"target_fqdns":{"type":["list","string"],"optional":true}},"block_types":{"protocol":{"nesting_mode":3,"block":{"attributes":{"port":{"type":"number","required":true},"type":{"type":"string","required":true}}},"optional":true}}},"required":true}}}},"azurerm_firewall_nat_rule_collection":{"block":{"attributes":{"action":{"type":"string","required":true},"azure_firewall_name":{"type":"string","required":true},"name":{"type":"string","required":true},"priority":{"type":"number","required":true},"resource_group_name":{"type":"string","required":true}},"block_types":{"rule":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"destination_addresses":{"type":["list","string"],"required":true},"destination_ports":{"type":["list","string"],"required":true},"name":{"type":"string","required":true},"protocols":{"type":["list","string"],"required":true},"source_addresses":{"type":["list","string"],"optional":true},"source_ip_groups":{"type":["list","string"],"optional":true},"translated_address":{"type":"string","required":true},"translated_port":{"type":"string","required":true}}},"required":true}}}},"azurerm_firewall_network_rule_collection":{"block":{"attributes":{"action":{"type":"string","required":true},"azure_firewall_name":{"type":"string","required":true},"name":{"type":"string","required":true},"priority":{"type":"number","required":true},"resource_group_name":{"type":"string","required":true}},"block_types":{"rule":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"destination_addresses":{"type":["list","string"],"optional":true},"destination_fqdns":{"type":["list","string"],"optional":true},"destination_ip_groups":{"type":["list","string"],"optional":true},"destination_ports":{"type":["list","string"],"required":true},"name":{"type":"string","required":true},"protocols":{"type":["list","string"],"required":true},"source_addresses":{"type":["list","string"],"optional":true},"source_ip_groups":{"type":["list","string"],"optional":true}}},"required":true}}}},"azurerm_firewall_policy":{"block":{"attributes":{"auto_learn_private_ranges_enabled":{"type":"bool","optional":true},"base_policy_id":{"type":"string","optional":true},"child_policies":{"type":["list","string"],"computed":true},"firewalls":{"type":["list","string"],"computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"private_ip_ranges":{"type":["list","string"],"optional":true},"resource_group_name":{"type":"string","required":true},"rule_collection_groups":{"type":["list","string"],"computed":true},"sku":{"type":"string","optional":true,"default":"Standard"},"sql_redirect_allowed":{"type":"bool","optional":true},"tags":{"type":["map","string"],"optional":true},"threat_intelligence_mode":{"type":"string","optional":true,"default":"Alert"}},"block_types":{"dns":{"nesting_mode":3,"block":{"attributes":{"proxy_enabled":{"type":"bool","optional":true,"default":false},"servers":{"type":["list","string"],"optional":true}}},"optional":true},"explicit_proxy":{"nesting_mode":3,"block":{"attributes":{"enable_pac_file":{"type":"bool","optional":true},"enabled":{"type":"bool","optional":true},"http_port":{"type":"number","optional":true},"https_port":{"type":"number","optional":true},"pac_file":{"type":"string","optional":true},"pac_file_port":{"type":"number","optional":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"insights":{"nesting_mode":3,"block":{"attributes":{"default_log_analytics_workspace_id":{"type":"string","required":true},"enabled":{"type":"bool","required":true},"retention_in_days":{"type":"number","optional":true}},"block_types":{"log_analytics_workspace":{"nesting_mode":3,"block":{"attributes":{"firewall_location":{"type":"string","required":true},"id":{"type":"string","required":true}}},"optional":true}}},"optional":true},"intrusion_detection":{"nesting_mode":3,"block":{"attributes":{"mode":{"type":"string","optional":true},"private_ranges":{"type":["list","string"],"optional":true}},"block_types":{"signature_overrides":{"nesting_mode":3,"block":{"attributes":{"id":{"type":"string","optional":true},"state":{"type":"string","optional":true}}},"optional":true},"traffic_bypass":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"destination_addresses":{"type":["set","string"],"optional":true},"destination_ip_groups":{"type":["set","string"],"optional":true},"destination_ports":{"type":["set","string"],"optional":true},"name":{"type":"string","required":true},"protocol":{"type":"string","required":true},"source_addresses":{"type":["set","string"],"optional":true},"source_ip_groups":{"type":["set","string"],"optional":true}}},"optional":true}}},"optional":true},"threat_intelligence_allowlist":{"nesting_mode":3,"block":{"attributes":{"fqdns":{"type":["set","string"],"optional":true,"at_least_one_of":["threat_intelligence_allowlist.0.ip_addresses","threat_intelligence_allowlist.0.fqdns"]},"ip_addresses":{"type":["set","string"],"optional":true,"at_least_one_of":["threat_intelligence_allowlist.0.ip_addresses","threat_intelligence_allowlist.0.fqdns"]}}},"optional":true},"tls_certificate":{"nesting_mode":3,"block":{"attributes":{"key_vault_secret_id":{"type":"string","required":true},"name":{"type":"string","required":true}}},"optional":true}}}},"azurerm_firewall_policy_rule_collection_group":{"block":{"attributes":{"firewall_policy_id":{"type":"string","required":true},"name":{"type":"string","required":true},"priority":{"type":"number","required":true}},"block_types":{"application_rule_collection":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"name":{"type":"string","required":true},"priority":{"type":"number","required":true}},"block_types":{"rule":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"destination_addresses":{"type":["list","string"],"optional":true},"destination_fqdn_tags":{"type":["list","string"],"optional":true},"destination_fqdns":{"type":["list","string"],"optional":true},"destination_urls":{"type":["list","string"],"optional":true},"name":{"type":"string","required":true},"source_addresses":{"type":["list","string"],"optional":true},"source_ip_groups":{"type":["list","string"],"optional":true},"terminate_tls":{"type":"bool","optional":true},"web_categories":{"type":["list","string"],"optional":true}},"block_types":{"http_headers":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"protocols":{"nesting_mode":3,"block":{"attributes":{"port":{"type":"number","required":true},"type":{"type":"string","required":true}}},"optional":true}}},"required":true}}},"optional":true},"nat_rule_collection":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"name":{"type":"string","required":true},"priority":{"type":"number","required":true}},"block_types":{"rule":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"destination_address":{"type":"string","optional":true},"destination_ports":{"type":["list","string"],"optional":true},"name":{"type":"string","required":true},"protocols":{"type":["list","string"],"required":true},"source_addresses":{"type":["list","string"],"optional":true},"source_ip_groups":{"type":["list","string"],"optional":true},"translated_address":{"type":"string","optional":true},"translated_fqdn":{"type":"string","optional":true},"translated_port":{"type":"number","required":true}}},"required":true}}},"optional":true},"network_rule_collection":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"name":{"type":"string","required":true},"priority":{"type":"number","required":true}},"block_types":{"rule":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"destination_addresses":{"type":["list","string"],"optional":true},"destination_fqdns":{"type":["list","string"],"optional":true},"destination_ip_groups":{"type":["list","string"],"optional":true},"destination_ports":{"type":["list","string"],"required":true},"name":{"type":"string","required":true},"protocols":{"type":["list","string"],"required":true},"source_addresses":{"type":["list","string"],"optional":true},"source_ip_groups":{"type":["list","string"],"optional":true}}},"required":true}}},"optional":true}}}},"azurerm_fluid_relay_server":{"block":{"attributes":{"frs_tenant_id":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"orderer_endpoints":{"type":["list","string"],"computed":true},"primary_key":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"secondary_key":{"type":"string","computed":true},"service_endpoints":{"type":["list","string"],"computed":true},"storage_endpoints":{"type":["list","string"],"computed":true},"storage_sku":{"type":"string","optional":true,"computed":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_frontdoor":{"block":{"attributes":{"backend_pool_health_probes":{"type":["map","string"],"computed":true},"backend_pool_load_balancing_settings":{"type":["map","string"],"computed":true},"backend_pools":{"type":["map","string"],"computed":true},"cname":{"type":"string","computed":true},"explicit_resource_order":{"type":["list",["object",{"backend_pool_health_probe_ids":["list","string"],"backend_pool_ids":["list","string"],"backend_pool_load_balancing_ids":["list","string"],"frontend_endpoint_ids":["list","string"],"routing_rule_ids":["list","string"]}]],"computed":true},"friendly_name":{"type":"string","optional":true},"frontend_endpoints":{"type":["map","string"],"computed":true},"header_frontdoor_id":{"type":"string","computed":true},"load_balancer_enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"routing_rules":{"type":["map","string"],"computed":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"backend_pool":{"nesting_mode":3,"block":{"attributes":{"health_probe_name":{"type":"string","required":true},"id":{"type":"string","computed":true},"load_balancing_name":{"type":"string","required":true},"name":{"type":"string","required":true}},"block_types":{"backend":{"nesting_mode":3,"block":{"attributes":{"address":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":true},"host_header":{"type":"string","required":true},"http_port":{"type":"number","required":true},"https_port":{"type":"number","required":true},"priority":{"type":"number","optional":true,"default":1},"weight":{"type":"number","optional":true,"default":50}}},"required":true}}},"required":true},"backend_pool_health_probe":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"id":{"type":"string","computed":true},"interval_in_seconds":{"type":"number","optional":true,"default":120},"name":{"type":"string","required":true},"path":{"type":"string","optional":true,"default":"/"},"probe_method":{"type":"string","optional":true,"default":"GET"},"protocol":{"type":"string","optional":true,"default":"Http"}}},"required":true},"backend_pool_load_balancing":{"nesting_mode":3,"block":{"attributes":{"additional_latency_milliseconds":{"type":"number","optional":true,"default":0},"id":{"type":"string","computed":true},"name":{"type":"string","required":true},"sample_size":{"type":"number","optional":true,"default":4},"successful_samples_required":{"type":"number","optional":true,"default":2}}},"required":true},"backend_pool_settings":{"nesting_mode":3,"block":{"attributes":{"backend_pools_send_receive_timeout_seconds":{"type":"number","optional":true,"default":60},"enforce_backend_pools_certificate_name_check":{"type":"bool","required":true}}},"optional":true},"frontend_endpoint":{"nesting_mode":3,"block":{"attributes":{"host_name":{"type":"string","required":true},"id":{"type":"string","computed":true},"name":{"type":"string","required":true},"session_affinity_enabled":{"type":"bool","optional":true,"default":false},"session_affinity_ttl_seconds":{"type":"number","optional":true,"default":0},"web_application_firewall_policy_link_id":{"type":"string","optional":true}}},"required":true},"routing_rule":{"nesting_mode":3,"block":{"attributes":{"accepted_protocols":{"type":["list","string"],"required":true},"enabled":{"type":"bool","optional":true,"default":true},"frontend_endpoints":{"type":["list","string"],"required":true},"id":{"type":"string","computed":true},"name":{"type":"string","required":true},"patterns_to_match":{"type":["list","string"],"required":true}},"block_types":{"forwarding_configuration":{"nesting_mode":3,"block":{"attributes":{"backend_pool_name":{"type":"string","required":true},"cache_duration":{"type":"string","optional":true},"cache_enabled":{"type":"bool","optional":true,"default":false},"cache_query_parameter_strip_directive":{"type":"string","optional":true,"default":"StripAll"},"cache_query_parameters":{"type":["list","string"],"optional":true},"cache_use_dynamic_compression":{"type":"bool","optional":true,"default":false},"custom_forwarding_path":{"type":"string","optional":true},"forwarding_protocol":{"type":"string","optional":true,"default":"HttpsOnly"}}},"optional":true},"redirect_configuration":{"nesting_mode":3,"block":{"attributes":{"custom_fragment":{"type":"string","optional":true},"custom_host":{"type":"string","optional":true},"custom_path":{"type":"string","optional":true},"custom_query_string":{"type":"string","optional":true},"redirect_protocol":{"type":"string","required":true},"redirect_type":{"type":"string","required":true}}},"optional":true}}},"required":true}}}},"azurerm_frontdoor_custom_https_configuration":{"block":{"attributes":{"custom_https_provisioning_enabled":{"type":"bool","required":true},"frontend_endpoint_id":{"type":"string","required":true}},"block_types":{"custom_https_configuration":{"nesting_mode":3,"block":{"attributes":{"azure_key_vault_certificate_secret_name":{"type":"string","optional":true},"azure_key_vault_certificate_secret_version":{"type":"string","optional":true},"azure_key_vault_certificate_vault_id":{"type":"string","optional":true},"certificate_source":{"type":"string","optional":true,"default":"FrontDoor"},"minimum_tls_version":{"type":"string","computed":true},"provisioning_state":{"type":"string","computed":true},"provisioning_substate":{"type":"string","computed":true}}},"optional":true}}}},"azurerm_frontdoor_firewall_policy":{"block":{"attributes":{"custom_block_response_body":{"type":"string","optional":true},"custom_block_response_status_code":{"type":"number","optional":true},"enabled":{"type":"bool","optional":true,"default":true},"frontend_endpoint_ids":{"type":["list","string"],"computed":true},"location":{"type":"string","computed":true},"mode":{"type":"string","optional":true,"default":"Prevention"},"name":{"type":"string","required":true},"redirect_url":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"custom_rule":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"priority":{"type":"number","optional":true,"default":1},"rate_limit_duration_in_minutes":{"type":"number","optional":true,"default":1},"rate_limit_threshold":{"type":"number","optional":true,"default":10},"type":{"type":"string","required":true}},"block_types":{"match_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["list","string"],"required":true},"match_variable":{"type":"string","required":true},"negation_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true},"selector":{"type":"string","optional":true},"transforms":{"type":["list","string"],"optional":true}}},"optional":true}}},"optional":true},"managed_rule":{"nesting_mode":3,"block":{"attributes":{"type":{"type":"string","required":true},"version":{"type":"string","required":true}},"block_types":{"exclusion":{"nesting_mode":3,"block":{"attributes":{"match_variable":{"type":"string","required":true},"operator":{"type":"string","required":true},"selector":{"type":"string","required":true}}},"optional":true},"override":{"nesting_mode":3,"block":{"attributes":{"rule_group_name":{"type":"string","required":true}},"block_types":{"exclusion":{"nesting_mode":3,"block":{"attributes":{"match_variable":{"type":"string","required":true},"operator":{"type":"string","required":true},"selector":{"type":"string","required":true}}},"optional":true},"rule":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":false},"rule_id":{"type":"string","required":true}},"block_types":{"exclusion":{"nesting_mode":3,"block":{"attributes":{"match_variable":{"type":"string","required":true},"operator":{"type":"string","required":true},"selector":{"type":"string","required":true}}},"optional":true}}},"optional":true}}},"optional":true}}},"optional":true}}}},"azurerm_frontdoor_rules_engine":{"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"frontdoor_name":{"type":"string","required":true},"location":{"type":"string","computed":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}},"block_types":{"rule":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"priority":{"type":"number","required":true}},"block_types":{"action":{"nesting_mode":3,"block":{"block_types":{"request_header":{"nesting_mode":3,"block":{"attributes":{"header_action_type":{"type":"string","optional":true},"header_name":{"type":"string","optional":true},"value":{"type":"string","optional":true}}},"optional":true},"response_header":{"nesting_mode":3,"block":{"attributes":{"header_action_type":{"type":"string","optional":true},"header_name":{"type":"string","optional":true},"value":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"match_condition":{"nesting_mode":3,"block":{"attributes":{"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true},"selector":{"type":"string","optional":true},"transform":{"type":["list","string"],"optional":true},"value":{"type":["list","string"],"optional":true},"variable":{"type":"string","optional":true}}},"optional":true}}},"optional":true}}}},"azurerm_function_app":{"block":{"attributes":{"app_service_plan_id":{"type":"string","required":true},"app_settings":{"type":["map","string"],"optional":true,"computed":true},"client_cert_mode":{"type":"string","optional":true},"custom_domain_verification_id":{"type":"string","computed":true},"daily_memory_time_quota":{"type":"number","optional":true},"default_hostname":{"type":"string","computed":true},"enable_builtin_logging":{"type":"bool","optional":true,"default":true},"enabled":{"type":"bool","optional":true,"default":true},"https_only":{"type":"bool","optional":true,"default":false},"key_vault_reference_identity_id":{"type":"string","optional":true,"computed":true},"kind":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"os_type":{"type":"string","optional":true,"default":""},"outbound_ip_addresses":{"type":"string","computed":true},"possible_outbound_ip_addresses":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"site_credential":{"type":["list",["object",{"password":"string","username":"string"}]],"computed":true},"storage_account_access_key":{"type":"string","required":true},"storage_account_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"version":{"type":"string","optional":true,"default":"~1"}},"block_types":{"auth_settings":{"nesting_mode":3,"block":{"attributes":{"additional_login_params":{"type":["map","string"],"optional":true},"allowed_external_redirect_urls":{"type":["list","string"],"optional":true},"default_provider":{"type":"string","optional":true},"enabled":{"type":"bool","required":true},"issuer":{"type":"string","optional":true},"runtime_version":{"type":"string","optional":true},"token_refresh_extension_hours":{"type":"number","optional":true,"default":72},"token_store_enabled":{"type":"bool","optional":true,"default":false},"unauthenticated_client_action":{"type":"string","optional":true}},"block_types":{"active_directory":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true}}},"optional":true},"facebook":{"nesting_mode":3,"block":{"attributes":{"app_id":{"type":"string","required":true},"app_secret":{"type":"string","required":true},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"google":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","required":true},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"microsoft":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","required":true},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"twitter":{"nesting_mode":3,"block":{"attributes":{"consumer_key":{"type":"string","required":true},"consumer_secret":{"type":"string","required":true}}},"optional":true}}},"optional":true,"computed":true},"connection_string":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"type":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true,"computed":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"site_config":{"nesting_mode":3,"block":{"attributes":{"always_on":{"type":"bool","optional":true,"default":false},"app_scale_limit":{"type":"number","optional":true,"computed":true},"auto_swap_slot_name":{"type":"string","optional":true},"dotnet_framework_version":{"type":"string","optional":true,"default":"v4.0"},"elastic_instance_minimum":{"type":"number","optional":true,"computed":true},"ftps_state":{"type":"string","optional":true,"computed":true},"health_check_path":{"type":"string","optional":true},"http2_enabled":{"type":"bool","optional":true,"default":false},"ip_restriction":{"type":["list",["object",{"action":"string","headers":["list",["object",{"x_azure_fdid":["set","string"],"x_fd_health_probe":["set","string"],"x_forwarded_for":["set","string"],"x_forwarded_host":["set","string"]}]],"ip_address":"string","name":"string","priority":"number","service_tag":"string","virtual_network_subnet_id":"string"}]],"optional":true,"computed":true},"java_version":{"type":"string","optional":true},"linux_fx_version":{"type":"string","optional":true,"computed":true},"min_tls_version":{"type":"string","optional":true,"computed":true},"pre_warmed_instance_count":{"type":"number","optional":true,"computed":true},"runtime_scale_monitoring_enabled":{"type":"bool","optional":true,"default":false},"scm_ip_restriction":{"type":["list",["object",{"action":"string","headers":["list",["object",{"x_azure_fdid":["set","string"],"x_fd_health_probe":["set","string"],"x_forwarded_for":["set","string"],"x_forwarded_host":["set","string"]}]],"ip_address":"string","name":"string","priority":"number","service_tag":"string","virtual_network_subnet_id":"string"}]],"optional":true,"computed":true},"scm_type":{"type":"string","optional":true,"computed":true},"scm_use_main_ip_restriction":{"type":"bool","optional":true,"default":false},"use_32_bit_worker_process":{"type":"bool","optional":true,"default":true},"vnet_route_all_enabled":{"type":"bool","optional":true,"computed":true},"websockets_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"cors":{"nesting_mode":3,"block":{"attributes":{"allowed_origins":{"type":["set","string"],"required":true},"support_credentials":{"type":"bool","optional":true,"default":false}}},"optional":true,"computed":true}}},"optional":true,"computed":true},"source_control":{"nesting_mode":3,"block":{"attributes":{"branch":{"type":"string","optional":true,"computed":true,"at_least_one_of":["source_control.0.repo_url","source_control.0.branch","source_control.0.manual_integration","source_control.0.use_mercurial","source_control.0.rollback_enabled"]},"manual_integration":{"type":"bool","optional":true,"computed":true,"at_least_one_of":["source_control.0.repo_url","source_control.0.branch","source_control.0.manual_integration","source_control.0.use_mercurial","source_control.0.rollback_enabled"]},"repo_url":{"type":"string","optional":true,"computed":true,"at_least_one_of":["source_control.0.repo_url","source_control.0.branch","source_control.0.manual_integration","source_control.0.use_mercurial","source_control.0.rollback_enabled"]},"rollback_enabled":{"type":"bool","optional":true,"computed":true,"at_least_one_of":["source_control.0.repo_url","source_control.0.branch","source_control.0.manual_integration","source_control.0.use_mercurial","source_control.0.rollback_enabled"]},"use_mercurial":{"type":"bool","optional":true,"computed":true,"at_least_one_of":["source_control.0.repo_url","source_control.0.branch","source_control.0.manual_integration","source_control.0.use_mercurial","source_control.0.rollback_enabled"]}}},"optional":true,"computed":true,"conflicts_with":["site_config.0.scm_type"]}}}},"azurerm_function_app_active_slot":{"block":{"attributes":{"last_successful_swap":{"type":"string","computed":true},"overwrite_network_config":{"type":"bool","optional":true,"default":true},"slot_id":{"type":"string","required":true}}}},"azurerm_function_app_connection":{"block":{"attributes":{"client_type":{"type":"string","optional":true,"default":"none"},"function_app_id":{"type":"string","required":true},"name":{"type":"string","required":true},"target_resource_id":{"type":"string","required":true},"vnet_solution":{"type":"string","optional":true}},"block_types":{"authentication":{"nesting_mode":3,"block":{"attributes":{"certificate":{"type":"string","optional":true},"client_id":{"type":"string","optional":true},"name":{"type":"string","optional":true},"principal_id":{"type":"string","optional":true},"secret":{"type":"string","optional":true},"subscription_id":{"type":"string","optional":true},"type":{"type":"string","required":true}}},"required":true},"secret_store":{"nesting_mode":3,"block":{"attributes":{"key_vault_id":{"type":"string","required":true}}},"optional":true}}}},"azurerm_function_app_function":{"block":{"attributes":{"config_json":{"type":"string","required":true},"config_url":{"type":"string","computed":true},"enabled":{"type":"bool","optional":true,"default":true},"function_app_id":{"type":"string","required":true},"invocation_url":{"type":"string","computed":true},"language":{"type":"string","optional":true},"name":{"type":"string","required":true},"script_root_path_url":{"type":"string","computed":true},"script_url":{"type":"string","computed":true},"secrets_file_url":{"type":"string","computed":true},"test_data":{"type":"string","optional":true},"test_data_url":{"type":"string","computed":true},"url":{"type":"string","computed":true}},"block_types":{"file":{"nesting_mode":3,"block":{"attributes":{"content":{"type":"string","required":true},"name":{"type":"string","required":true}}},"optional":true}}}},"azurerm_function_app_hybrid_connection":{"block":{"attributes":{"function_app_id":{"type":"string","required":true},"hostname":{"type":"string","required":true},"namespace_name":{"type":"string","computed":true},"port":{"type":"number","required":true},"relay_id":{"type":"string","required":true},"relay_name":{"type":"string","computed":true},"send_key_name":{"type":"string","optional":true,"default":"RootManageSharedAccessKey"},"send_key_value":{"type":"string","computed":true},"service_bus_namespace":{"type":"string","computed":true},"service_bus_suffix":{"type":"string","computed":true}}}},"azurerm_function_app_slot":{"block":{"attributes":{"app_service_plan_id":{"type":"string","required":true},"app_settings":{"type":["map","string"],"optional":true,"computed":true},"daily_memory_time_quota":{"type":"number","optional":true},"default_hostname":{"type":"string","computed":true},"enable_builtin_logging":{"type":"bool","optional":true,"default":true},"enabled":{"type":"bool","optional":true,"default":true},"function_app_name":{"type":"string","required":true},"https_only":{"type":"bool","optional":true,"default":false},"kind":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"os_type":{"type":"string","optional":true},"outbound_ip_addresses":{"type":"string","computed":true},"possible_outbound_ip_addresses":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"site_credential":{"type":["list",["object",{"password":"string","username":"string"}]],"computed":true},"storage_account_access_key":{"type":"string","required":true},"storage_account_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"version":{"type":"string","optional":true,"default":"~1"}},"block_types":{"auth_settings":{"nesting_mode":3,"block":{"attributes":{"additional_login_params":{"type":["map","string"],"optional":true},"allowed_external_redirect_urls":{"type":["list","string"],"optional":true},"default_provider":{"type":"string","optional":true},"enabled":{"type":"bool","required":true},"issuer":{"type":"string","optional":true},"runtime_version":{"type":"string","optional":true},"token_refresh_extension_hours":{"type":"number","optional":true,"default":72},"token_store_enabled":{"type":"bool","optional":true,"default":false},"unauthenticated_client_action":{"type":"string","optional":true}},"block_types":{"active_directory":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true}}},"optional":true},"facebook":{"nesting_mode":3,"block":{"attributes":{"app_id":{"type":"string","required":true},"app_secret":{"type":"string","required":true},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"google":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","required":true},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"microsoft":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","required":true},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"twitter":{"nesting_mode":3,"block":{"attributes":{"consumer_key":{"type":"string","required":true},"consumer_secret":{"type":"string","required":true}}},"optional":true}}},"optional":true,"computed":true},"connection_string":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"type":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true,"computed":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"site_config":{"nesting_mode":3,"block":{"attributes":{"always_on":{"type":"bool","optional":true,"default":false},"app_scale_limit":{"type":"number","optional":true,"computed":true},"auto_swap_slot_name":{"type":"string","optional":true},"dotnet_framework_version":{"type":"string","optional":true,"default":"v4.0"},"elastic_instance_minimum":{"type":"number","optional":true,"computed":true},"ftps_state":{"type":"string","optional":true,"computed":true},"health_check_path":{"type":"string","optional":true},"http2_enabled":{"type":"bool","optional":true,"default":false},"ip_restriction":{"type":["list",["object",{"action":"string","headers":["list",["object",{"x_azure_fdid":["set","string"],"x_fd_health_probe":["set","string"],"x_forwarded_for":["set","string"],"x_forwarded_host":["set","string"]}]],"ip_address":"string","name":"string","priority":"number","service_tag":"string","virtual_network_subnet_id":"string"}]],"optional":true,"computed":true},"java_version":{"type":"string","optional":true},"linux_fx_version":{"type":"string","optional":true,"computed":true},"min_tls_version":{"type":"string","optional":true,"computed":true},"pre_warmed_instance_count":{"type":"number","optional":true,"computed":true},"runtime_scale_monitoring_enabled":{"type":"bool","optional":true,"default":false},"scm_ip_restriction":{"type":["list",["object",{"action":"string","headers":["list",["object",{"x_azure_fdid":["set","string"],"x_fd_health_probe":["set","string"],"x_forwarded_for":["set","string"],"x_forwarded_host":["set","string"]}]],"ip_address":"string","name":"string","priority":"number","service_tag":"string","virtual_network_subnet_id":"string"}]],"optional":true,"computed":true},"scm_type":{"type":"string","optional":true,"computed":true},"scm_use_main_ip_restriction":{"type":"bool","optional":true,"default":false},"use_32_bit_worker_process":{"type":"bool","optional":true,"default":true},"vnet_route_all_enabled":{"type":"bool","optional":true,"computed":true},"websockets_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"cors":{"nesting_mode":3,"block":{"attributes":{"allowed_origins":{"type":["set","string"],"required":true},"support_credentials":{"type":"bool","optional":true,"default":false}}},"optional":true,"computed":true}}},"optional":true,"computed":true}}}},"azurerm_gallery_application":{"block":{"attributes":{"description":{"type":"string","optional":true},"end_of_life_date":{"type":"string","optional":true},"eula":{"type":"string","optional":true},"gallery_id":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"privacy_statement_uri":{"type":"string","optional":true},"release_note_uri":{"type":"string","optional":true},"supported_os_type":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_gallery_application_version":{"block":{"attributes":{"config_file":{"type":"string","optional":true},"enable_health_check":{"type":"bool","optional":true,"default":false},"end_of_life_date":{"type":"string","optional":true},"exclude_from_latest":{"type":"bool","optional":true,"default":false},"gallery_application_id":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"package_file":{"type":"string","optional":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"manage_action":{"nesting_mode":3,"block":{"attributes":{"install":{"type":"string","required":true},"remove":{"type":"string","required":true},"update":{"type":"string","optional":true}}},"required":true},"source":{"nesting_mode":3,"block":{"attributes":{"default_configuration_link":{"type":"string","optional":true},"media_link":{"type":"string","required":true}}},"required":true},"target_region":{"nesting_mode":3,"block":{"attributes":{"exclude_from_latest":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"regional_replica_count":{"type":"number","required":true},"storage_account_type":{"type":"string","optional":true,"default":"Standard_LRS"}}},"required":true}}}},"azurerm_graph_services_account":{"block":{"attributes":{"application_id":{"type":"string","required":true},"billing_plan_id":{"type":"string","computed":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_hdinsight_hadoop_cluster":{"block":{"attributes":{"cluster_version":{"type":"string","required":true},"https_endpoint":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"ssh_endpoint":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true},"tier":{"type":"string","required":true},"tls_min_version":{"type":"string","optional":true}},"block_types":{"component_version":{"nesting_mode":3,"block":{"attributes":{"hadoop":{"type":"string","required":true}}},"required":true},"compute_isolation":{"nesting_mode":3,"block":{"attributes":{"compute_isolation_enabled":{"type":"bool","optional":true,"default":false},"host_sku":{"type":"string","optional":true}}},"optional":true},"disk_encryption":{"nesting_mode":3,"block":{"attributes":{"encryption_algorithm":{"type":"string","optional":true},"encryption_at_host_enabled":{"type":"bool","optional":true},"key_vault_key_id":{"type":"string","optional":true},"key_vault_managed_identity_id":{"type":"string","optional":true}}},"optional":true},"extension":{"nesting_mode":3,"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"primary_key":{"type":"string","required":true}}},"optional":true},"gateway":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","required":true},"username":{"type":"string","required":true}}},"required":true},"metastores":{"nesting_mode":3,"block":{"block_types":{"ambari":{"nesting_mode":3,"block":{"attributes":{"database_name":{"type":"string","required":true},"password":{"type":"string","required":true},"server":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true},"hive":{"nesting_mode":3,"block":{"attributes":{"database_name":{"type":"string","required":true},"password":{"type":"string","required":true},"server":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true},"oozie":{"nesting_mode":3,"block":{"attributes":{"database_name":{"type":"string","required":true},"password":{"type":"string","required":true},"server":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true}}},"optional":true},"monitor":{"nesting_mode":3,"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"primary_key":{"type":"string","required":true}}},"optional":true},"network":{"nesting_mode":3,"block":{"attributes":{"connection_direction":{"type":"string","optional":true,"default":"Inbound"},"private_link_enabled":{"type":"bool","optional":true,"default":false}}},"optional":true},"private_link_configuration":{"nesting_mode":3,"block":{"attributes":{"group_id":{"type":"string","required":true},"name":{"type":"string","required":true}},"block_types":{"ip_configuration":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"primary":{"type":"bool","optional":true},"private_ip_address":{"type":"string","optional":true},"private_ip_allocation_method":{"type":"string","optional":true},"subnet_id":{"type":"string","optional":true}}},"required":true}}},"optional":true},"roles":{"nesting_mode":3,"block":{"block_types":{"edge_node":{"nesting_mode":3,"block":{"attributes":{"target_instance_count":{"type":"number","required":true},"vm_size":{"type":"string","required":true}},"block_types":{"https_endpoints":{"nesting_mode":3,"block":{"attributes":{"access_modes":{"type":["list","string"],"optional":true},"destination_port":{"type":"number","optional":true},"disable_gateway_auth":{"type":"bool","optional":true},"private_ip_address":{"type":"string","optional":true},"sub_domain_suffix":{"type":"string","optional":true}}},"optional":true},"install_script_action":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":"string","optional":true},"uri":{"type":"string","required":true}}},"required":true},"uninstall_script_actions":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":"string","optional":true},"uri":{"type":"string","required":true}}},"optional":true}}},"optional":true},"head_node":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","optional":true},"ssh_keys":{"type":["set","string"],"optional":true,"conflicts_with":["roles.0.head_node.0.password"]},"subnet_id":{"type":"string","optional":true},"username":{"type":"string","required":true},"virtual_network_id":{"type":"string","optional":true},"vm_size":{"type":"string","required":true}},"block_types":{"script_actions":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":"string","optional":true},"uri":{"type":"string","required":true}}},"optional":true}}},"required":true},"worker_node":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","optional":true},"ssh_keys":{"type":["set","string"],"optional":true,"conflicts_with":["roles.0.worker_node.0.password"]},"subnet_id":{"type":"string","optional":true},"target_instance_count":{"type":"number","required":true},"username":{"type":"string","required":true},"virtual_network_id":{"type":"string","optional":true},"vm_size":{"type":"string","required":true}},"block_types":{"autoscale":{"nesting_mode":3,"block":{"block_types":{"capacity":{"nesting_mode":3,"block":{"attributes":{"max_instance_count":{"type":"number","required":true},"min_instance_count":{"type":"number","required":true}}},"optional":true,"conflicts_with":["roles.0.worker_node.0.autoscale.0.recurrence"]},"recurrence":{"nesting_mode":3,"block":{"attributes":{"timezone":{"type":"string","required":true}},"block_types":{"schedule":{"nesting_mode":3,"block":{"attributes":{"days":{"type":["list","string"],"required":true},"target_instance_count":{"type":"number","required":true},"time":{"type":"string","required":true}}},"required":true}}},"optional":true,"conflicts_with":["roles.0.worker_node.0.autoscale.0.capacity"]}}},"optional":true},"script_actions":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":"string","optional":true},"uri":{"type":"string","required":true}}},"optional":true}}},"required":true},"zookeeper_node":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","optional":true},"ssh_keys":{"type":["set","string"],"optional":true,"conflicts_with":["roles.0.zookeeper_node.0.password"]},"subnet_id":{"type":"string","optional":true},"username":{"type":"string","required":true},"virtual_network_id":{"type":"string","optional":true},"vm_size":{"type":"string","required":true}},"block_types":{"script_actions":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":"string","optional":true},"uri":{"type":"string","required":true}}},"optional":true}}},"required":true}}},"required":true},"security_profile":{"nesting_mode":3,"block":{"attributes":{"aadds_resource_id":{"type":"string","required":true},"cluster_users_group_dns":{"type":["set","string"],"optional":true},"domain_name":{"type":"string","required":true},"domain_user_password":{"type":"string","required":true},"domain_username":{"type":"string","required":true},"ldaps_urls":{"type":["set","string"],"required":true},"msi_resource_id":{"type":"string","required":true}}},"optional":true},"storage_account":{"nesting_mode":3,"block":{"attributes":{"is_default":{"type":"bool","required":true},"storage_account_key":{"type":"string","required":true},"storage_container_id":{"type":"string","required":true},"storage_resource_id":{"type":"string","optional":true}}},"optional":true},"storage_account_gen2":{"nesting_mode":3,"block":{"attributes":{"filesystem_id":{"type":"string","required":true},"is_default":{"type":"bool","required":true},"managed_identity_resource_id":{"type":"string","required":true},"storage_resource_id":{"type":"string","required":true}}},"optional":true}}}},"azurerm_hdinsight_hbase_cluster":{"block":{"attributes":{"cluster_version":{"type":"string","required":true},"https_endpoint":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"ssh_endpoint":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true},"tier":{"type":"string","required":true},"tls_min_version":{"type":"string","optional":true}},"block_types":{"component_version":{"nesting_mode":3,"block":{"attributes":{"hbase":{"type":"string","required":true}}},"required":true},"compute_isolation":{"nesting_mode":3,"block":{"attributes":{"compute_isolation_enabled":{"type":"bool","optional":true,"default":false},"host_sku":{"type":"string","optional":true}}},"optional":true},"disk_encryption":{"nesting_mode":3,"block":{"attributes":{"encryption_algorithm":{"type":"string","optional":true},"encryption_at_host_enabled":{"type":"bool","optional":true},"key_vault_key_id":{"type":"string","optional":true},"key_vault_managed_identity_id":{"type":"string","optional":true}}},"optional":true},"extension":{"nesting_mode":3,"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"primary_key":{"type":"string","required":true}}},"optional":true},"gateway":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","required":true},"username":{"type":"string","required":true}}},"required":true},"metastores":{"nesting_mode":3,"block":{"block_types":{"ambari":{"nesting_mode":3,"block":{"attributes":{"database_name":{"type":"string","required":true},"password":{"type":"string","required":true},"server":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true},"hive":{"nesting_mode":3,"block":{"attributes":{"database_name":{"type":"string","required":true},"password":{"type":"string","required":true},"server":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true},"oozie":{"nesting_mode":3,"block":{"attributes":{"database_name":{"type":"string","required":true},"password":{"type":"string","required":true},"server":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true}}},"optional":true},"monitor":{"nesting_mode":3,"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"primary_key":{"type":"string","required":true}}},"optional":true},"network":{"nesting_mode":3,"block":{"attributes":{"connection_direction":{"type":"string","optional":true,"default":"Inbound"},"private_link_enabled":{"type":"bool","optional":true,"default":false}}},"optional":true},"private_link_configuration":{"nesting_mode":3,"block":{"attributes":{"group_id":{"type":"string","required":true},"name":{"type":"string","required":true}},"block_types":{"ip_configuration":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"primary":{"type":"bool","optional":true},"private_ip_address":{"type":"string","optional":true},"private_ip_allocation_method":{"type":"string","optional":true},"subnet_id":{"type":"string","optional":true}}},"required":true}}},"optional":true},"roles":{"nesting_mode":3,"block":{"block_types":{"head_node":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","optional":true},"ssh_keys":{"type":["set","string"],"optional":true,"conflicts_with":["roles.0.head_node.0.password"]},"subnet_id":{"type":"string","optional":true},"username":{"type":"string","required":true},"virtual_network_id":{"type":"string","optional":true},"vm_size":{"type":"string","required":true}},"block_types":{"script_actions":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":"string","optional":true},"uri":{"type":"string","required":true}}},"optional":true}}},"required":true},"worker_node":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","optional":true},"ssh_keys":{"type":["set","string"],"optional":true,"conflicts_with":["roles.0.worker_node.0.password"]},"subnet_id":{"type":"string","optional":true},"target_instance_count":{"type":"number","required":true},"username":{"type":"string","required":true},"virtual_network_id":{"type":"string","optional":true},"vm_size":{"type":"string","required":true}},"block_types":{"autoscale":{"nesting_mode":3,"block":{"block_types":{"recurrence":{"nesting_mode":3,"block":{"attributes":{"timezone":{"type":"string","required":true}},"block_types":{"schedule":{"nesting_mode":3,"block":{"attributes":{"days":{"type":["list","string"],"required":true},"target_instance_count":{"type":"number","required":true},"time":{"type":"string","required":true}}},"required":true}}},"optional":true}}},"optional":true},"script_actions":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":"string","optional":true},"uri":{"type":"string","required":true}}},"optional":true}}},"required":true},"zookeeper_node":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","optional":true},"ssh_keys":{"type":["set","string"],"optional":true,"conflicts_with":["roles.0.zookeeper_node.0.password"]},"subnet_id":{"type":"string","optional":true},"username":{"type":"string","required":true},"virtual_network_id":{"type":"string","optional":true},"vm_size":{"type":"string","required":true}},"block_types":{"script_actions":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":"string","optional":true},"uri":{"type":"string","required":true}}},"optional":true}}},"required":true}}},"required":true},"security_profile":{"nesting_mode":3,"block":{"attributes":{"aadds_resource_id":{"type":"string","required":true},"cluster_users_group_dns":{"type":["set","string"],"optional":true},"domain_name":{"type":"string","required":true},"domain_user_password":{"type":"string","required":true},"domain_username":{"type":"string","required":true},"ldaps_urls":{"type":["set","string"],"required":true},"msi_resource_id":{"type":"string","required":true}}},"optional":true},"storage_account":{"nesting_mode":3,"block":{"attributes":{"is_default":{"type":"bool","required":true},"storage_account_key":{"type":"string","required":true},"storage_container_id":{"type":"string","required":true},"storage_resource_id":{"type":"string","optional":true}}},"optional":true},"storage_account_gen2":{"nesting_mode":3,"block":{"attributes":{"filesystem_id":{"type":"string","required":true},"is_default":{"type":"bool","required":true},"managed_identity_resource_id":{"type":"string","required":true},"storage_resource_id":{"type":"string","required":true}}},"optional":true}}}},"azurerm_hdinsight_interactive_query_cluster":{"block":{"attributes":{"cluster_version":{"type":"string","required":true},"encryption_in_transit_enabled":{"type":"bool","optional":true},"https_endpoint":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"ssh_endpoint":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true},"tier":{"type":"string","required":true},"tls_min_version":{"type":"string","optional":true}},"block_types":{"component_version":{"nesting_mode":3,"block":{"attributes":{"interactive_hive":{"type":"string","required":true}}},"required":true},"compute_isolation":{"nesting_mode":3,"block":{"attributes":{"compute_isolation_enabled":{"type":"bool","optional":true,"default":false},"host_sku":{"type":"string","optional":true}}},"optional":true},"disk_encryption":{"nesting_mode":3,"block":{"attributes":{"encryption_algorithm":{"type":"string","optional":true},"encryption_at_host_enabled":{"type":"bool","optional":true},"key_vault_key_id":{"type":"string","optional":true},"key_vault_managed_identity_id":{"type":"string","optional":true}}},"optional":true},"extension":{"nesting_mode":3,"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"primary_key":{"type":"string","required":true}}},"optional":true},"gateway":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","required":true},"username":{"type":"string","required":true}}},"required":true},"metastores":{"nesting_mode":3,"block":{"block_types":{"ambari":{"nesting_mode":3,"block":{"attributes":{"database_name":{"type":"string","required":true},"password":{"type":"string","required":true},"server":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true},"hive":{"nesting_mode":3,"block":{"attributes":{"database_name":{"type":"string","required":true},"password":{"type":"string","required":true},"server":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true},"oozie":{"nesting_mode":3,"block":{"attributes":{"database_name":{"type":"string","required":true},"password":{"type":"string","required":true},"server":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true}}},"optional":true},"monitor":{"nesting_mode":3,"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"primary_key":{"type":"string","required":true}}},"optional":true},"network":{"nesting_mode":3,"block":{"attributes":{"connection_direction":{"type":"string","optional":true,"default":"Inbound"},"private_link_enabled":{"type":"bool","optional":true,"default":false}}},"optional":true},"private_link_configuration":{"nesting_mode":3,"block":{"attributes":{"group_id":{"type":"string","required":true},"name":{"type":"string","required":true}},"block_types":{"ip_configuration":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"primary":{"type":"bool","optional":true},"private_ip_address":{"type":"string","optional":true},"private_ip_allocation_method":{"type":"string","optional":true},"subnet_id":{"type":"string","optional":true}}},"required":true}}},"optional":true},"roles":{"nesting_mode":3,"block":{"block_types":{"head_node":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","optional":true},"ssh_keys":{"type":["set","string"],"optional":true,"conflicts_with":["roles.0.head_node.0.password"]},"subnet_id":{"type":"string","optional":true},"username":{"type":"string","required":true},"virtual_network_id":{"type":"string","optional":true},"vm_size":{"type":"string","required":true}},"block_types":{"script_actions":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":"string","optional":true},"uri":{"type":"string","required":true}}},"optional":true}}},"required":true},"worker_node":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","optional":true},"ssh_keys":{"type":["set","string"],"optional":true,"conflicts_with":["roles.0.worker_node.0.password"]},"subnet_id":{"type":"string","optional":true},"target_instance_count":{"type":"number","required":true},"username":{"type":"string","required":true},"virtual_network_id":{"type":"string","optional":true},"vm_size":{"type":"string","required":true}},"block_types":{"autoscale":{"nesting_mode":3,"block":{"block_types":{"recurrence":{"nesting_mode":3,"block":{"attributes":{"timezone":{"type":"string","required":true}},"block_types":{"schedule":{"nesting_mode":3,"block":{"attributes":{"days":{"type":["list","string"],"required":true},"target_instance_count":{"type":"number","required":true},"time":{"type":"string","required":true}}},"required":true}}},"optional":true}}},"optional":true},"script_actions":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":"string","optional":true},"uri":{"type":"string","required":true}}},"optional":true}}},"required":true},"zookeeper_node":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","optional":true},"ssh_keys":{"type":["set","string"],"optional":true,"conflicts_with":["roles.0.zookeeper_node.0.password"]},"subnet_id":{"type":"string","optional":true},"username":{"type":"string","required":true},"virtual_network_id":{"type":"string","optional":true},"vm_size":{"type":"string","required":true}},"block_types":{"script_actions":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":"string","optional":true},"uri":{"type":"string","required":true}}},"optional":true}}},"required":true}}},"required":true},"security_profile":{"nesting_mode":3,"block":{"attributes":{"aadds_resource_id":{"type":"string","required":true},"cluster_users_group_dns":{"type":["set","string"],"optional":true},"domain_name":{"type":"string","required":true},"domain_user_password":{"type":"string","required":true},"domain_username":{"type":"string","required":true},"ldaps_urls":{"type":["set","string"],"required":true},"msi_resource_id":{"type":"string","required":true}}},"optional":true},"storage_account":{"nesting_mode":3,"block":{"attributes":{"is_default":{"type":"bool","required":true},"storage_account_key":{"type":"string","required":true},"storage_container_id":{"type":"string","required":true},"storage_resource_id":{"type":"string","optional":true}}},"optional":true},"storage_account_gen2":{"nesting_mode":3,"block":{"attributes":{"filesystem_id":{"type":"string","required":true},"is_default":{"type":"bool","required":true},"managed_identity_resource_id":{"type":"string","required":true},"storage_resource_id":{"type":"string","required":true}}},"optional":true}}}},"azurerm_hdinsight_kafka_cluster":{"block":{"attributes":{"cluster_version":{"type":"string","required":true},"encryption_in_transit_enabled":{"type":"bool","optional":true},"https_endpoint":{"type":"string","computed":true},"kafka_rest_proxy_endpoint":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"ssh_endpoint":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true},"tier":{"type":"string","required":true},"tls_min_version":{"type":"string","optional":true}},"block_types":{"component_version":{"nesting_mode":3,"block":{"attributes":{"kafka":{"type":"string","required":true}}},"required":true},"compute_isolation":{"nesting_mode":3,"block":{"attributes":{"compute_isolation_enabled":{"type":"bool","optional":true,"default":false},"host_sku":{"type":"string","optional":true}}},"optional":true},"disk_encryption":{"nesting_mode":3,"block":{"attributes":{"encryption_algorithm":{"type":"string","optional":true},"encryption_at_host_enabled":{"type":"bool","optional":true},"key_vault_key_id":{"type":"string","optional":true},"key_vault_managed_identity_id":{"type":"string","optional":true}}},"optional":true},"extension":{"nesting_mode":3,"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"primary_key":{"type":"string","required":true}}},"optional":true},"gateway":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","required":true},"username":{"type":"string","required":true}}},"required":true},"metastores":{"nesting_mode":3,"block":{"block_types":{"ambari":{"nesting_mode":3,"block":{"attributes":{"database_name":{"type":"string","required":true},"password":{"type":"string","required":true},"server":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true},"hive":{"nesting_mode":3,"block":{"attributes":{"database_name":{"type":"string","required":true},"password":{"type":"string","required":true},"server":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true},"oozie":{"nesting_mode":3,"block":{"attributes":{"database_name":{"type":"string","required":true},"password":{"type":"string","required":true},"server":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true}}},"optional":true},"monitor":{"nesting_mode":3,"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"primary_key":{"type":"string","required":true}}},"optional":true},"network":{"nesting_mode":3,"block":{"attributes":{"connection_direction":{"type":"string","optional":true,"default":"Inbound"},"private_link_enabled":{"type":"bool","optional":true,"default":false}}},"optional":true},"private_link_configuration":{"nesting_mode":3,"block":{"attributes":{"group_id":{"type":"string","required":true},"name":{"type":"string","required":true}},"block_types":{"ip_configuration":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"primary":{"type":"bool","optional":true},"private_ip_address":{"type":"string","optional":true},"private_ip_allocation_method":{"type":"string","optional":true},"subnet_id":{"type":"string","optional":true}}},"required":true}}},"optional":true},"rest_proxy":{"nesting_mode":3,"block":{"attributes":{"security_group_id":{"type":"string","required":true},"security_group_name":{"type":"string","required":true}}},"optional":true,"required_with":["roles.0.kafka_management_node"]},"roles":{"nesting_mode":3,"block":{"block_types":{"head_node":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","optional":true},"ssh_keys":{"type":["set","string"],"optional":true,"conflicts_with":["roles.0.head_node.0.password"]},"subnet_id":{"type":"string","optional":true},"username":{"type":"string","required":true},"virtual_network_id":{"type":"string","optional":true},"vm_size":{"type":"string","required":true}},"block_types":{"script_actions":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":"string","optional":true},"uri":{"type":"string","required":true}}},"optional":true}}},"required":true},"kafka_management_node":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","optional":true},"ssh_keys":{"type":["set","string"],"optional":true,"conflicts_with":["roles.0.kafka_management_node.0.password"]},"subnet_id":{"type":"string","optional":true},"username":{"type":"string","computed":true},"virtual_network_id":{"type":"string","optional":true},"vm_size":{"type":"string","required":true}},"block_types":{"script_actions":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":"string","optional":true},"uri":{"type":"string","required":true}}},"optional":true}}},"optional":true},"worker_node":{"nesting_mode":3,"block":{"attributes":{"number_of_disks_per_node":{"type":"number","required":true},"password":{"type":"string","optional":true},"ssh_keys":{"type":["set","string"],"optional":true,"conflicts_with":["roles.0.worker_node.0.password"]},"subnet_id":{"type":"string","optional":true},"target_instance_count":{"type":"number","required":true},"username":{"type":"string","required":true},"virtual_network_id":{"type":"string","optional":true},"vm_size":{"type":"string","required":true}},"block_types":{"script_actions":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":"string","optional":true},"uri":{"type":"string","required":true}}},"optional":true}}},"required":true},"zookeeper_node":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","optional":true},"ssh_keys":{"type":["set","string"],"optional":true,"conflicts_with":["roles.0.zookeeper_node.0.password"]},"subnet_id":{"type":"string","optional":true},"username":{"type":"string","required":true},"virtual_network_id":{"type":"string","optional":true},"vm_size":{"type":"string","required":true}},"block_types":{"script_actions":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":"string","optional":true},"uri":{"type":"string","required":true}}},"optional":true}}},"required":true}}},"required":true},"security_profile":{"nesting_mode":3,"block":{"attributes":{"aadds_resource_id":{"type":"string","required":true},"cluster_users_group_dns":{"type":["set","string"],"optional":true},"domain_name":{"type":"string","required":true},"domain_user_password":{"type":"string","required":true},"domain_username":{"type":"string","required":true},"ldaps_urls":{"type":["set","string"],"required":true},"msi_resource_id":{"type":"string","required":true}}},"optional":true},"storage_account":{"nesting_mode":3,"block":{"attributes":{"is_default":{"type":"bool","required":true},"storage_account_key":{"type":"string","required":true},"storage_container_id":{"type":"string","required":true},"storage_resource_id":{"type":"string","optional":true}}},"optional":true},"storage_account_gen2":{"nesting_mode":3,"block":{"attributes":{"filesystem_id":{"type":"string","required":true},"is_default":{"type":"bool","required":true},"managed_identity_resource_id":{"type":"string","required":true},"storage_resource_id":{"type":"string","required":true}}},"optional":true}}}},"azurerm_hdinsight_spark_cluster":{"block":{"attributes":{"cluster_version":{"type":"string","required":true},"encryption_in_transit_enabled":{"type":"bool","optional":true},"https_endpoint":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"ssh_endpoint":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true},"tier":{"type":"string","required":true},"tls_min_version":{"type":"string","optional":true}},"block_types":{"component_version":{"nesting_mode":3,"block":{"attributes":{"spark":{"type":"string","required":true}}},"required":true},"compute_isolation":{"nesting_mode":3,"block":{"attributes":{"compute_isolation_enabled":{"type":"bool","optional":true,"default":false},"host_sku":{"type":"string","optional":true}}},"optional":true},"disk_encryption":{"nesting_mode":3,"block":{"attributes":{"encryption_algorithm":{"type":"string","optional":true},"encryption_at_host_enabled":{"type":"bool","optional":true},"key_vault_key_id":{"type":"string","optional":true},"key_vault_managed_identity_id":{"type":"string","optional":true}}},"optional":true},"extension":{"nesting_mode":3,"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"primary_key":{"type":"string","required":true}}},"optional":true},"gateway":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","required":true},"username":{"type":"string","required":true}}},"required":true},"metastores":{"nesting_mode":3,"block":{"block_types":{"ambari":{"nesting_mode":3,"block":{"attributes":{"database_name":{"type":"string","required":true},"password":{"type":"string","required":true},"server":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true},"hive":{"nesting_mode":3,"block":{"attributes":{"database_name":{"type":"string","required":true},"password":{"type":"string","required":true},"server":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true},"oozie":{"nesting_mode":3,"block":{"attributes":{"database_name":{"type":"string","required":true},"password":{"type":"string","required":true},"server":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true}}},"optional":true},"monitor":{"nesting_mode":3,"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"primary_key":{"type":"string","required":true}}},"optional":true},"network":{"nesting_mode":3,"block":{"attributes":{"connection_direction":{"type":"string","optional":true,"default":"Inbound"},"private_link_enabled":{"type":"bool","optional":true,"default":false}}},"optional":true},"private_link_configuration":{"nesting_mode":3,"block":{"attributes":{"group_id":{"type":"string","required":true},"name":{"type":"string","required":true}},"block_types":{"ip_configuration":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"primary":{"type":"bool","optional":true},"private_ip_address":{"type":"string","optional":true},"private_ip_allocation_method":{"type":"string","optional":true},"subnet_id":{"type":"string","optional":true}}},"required":true}}},"optional":true},"roles":{"nesting_mode":3,"block":{"block_types":{"head_node":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","optional":true},"ssh_keys":{"type":["set","string"],"optional":true,"conflicts_with":["roles.0.head_node.0.password"]},"subnet_id":{"type":"string","optional":true},"username":{"type":"string","required":true},"virtual_network_id":{"type":"string","optional":true},"vm_size":{"type":"string","required":true}},"block_types":{"script_actions":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":"string","optional":true},"uri":{"type":"string","required":true}}},"optional":true}}},"required":true},"worker_node":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","optional":true},"ssh_keys":{"type":["set","string"],"optional":true,"conflicts_with":["roles.0.worker_node.0.password"]},"subnet_id":{"type":"string","optional":true},"target_instance_count":{"type":"number","required":true},"username":{"type":"string","required":true},"virtual_network_id":{"type":"string","optional":true},"vm_size":{"type":"string","required":true}},"block_types":{"autoscale":{"nesting_mode":3,"block":{"block_types":{"capacity":{"nesting_mode":3,"block":{"attributes":{"max_instance_count":{"type":"number","required":true},"min_instance_count":{"type":"number","required":true}}},"optional":true,"conflicts_with":["roles.0.worker_node.0.autoscale.0.recurrence"]},"recurrence":{"nesting_mode":3,"block":{"attributes":{"timezone":{"type":"string","required":true}},"block_types":{"schedule":{"nesting_mode":3,"block":{"attributes":{"days":{"type":["list","string"],"required":true},"target_instance_count":{"type":"number","required":true},"time":{"type":"string","required":true}}},"required":true}}},"optional":true,"conflicts_with":["roles.0.worker_node.0.autoscale.0.capacity"]}}},"optional":true},"script_actions":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":"string","optional":true},"uri":{"type":"string","required":true}}},"optional":true}}},"required":true},"zookeeper_node":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","optional":true},"ssh_keys":{"type":["set","string"],"optional":true,"conflicts_with":["roles.0.zookeeper_node.0.password"]},"subnet_id":{"type":"string","optional":true},"username":{"type":"string","required":true},"virtual_network_id":{"type":"string","optional":true},"vm_size":{"type":"string","required":true}},"block_types":{"script_actions":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":"string","optional":true},"uri":{"type":"string","required":true}}},"optional":true}}},"required":true}}},"required":true},"security_profile":{"nesting_mode":3,"block":{"attributes":{"aadds_resource_id":{"type":"string","required":true},"cluster_users_group_dns":{"type":["set","string"],"optional":true},"domain_name":{"type":"string","required":true},"domain_user_password":{"type":"string","required":true},"domain_username":{"type":"string","required":true},"ldaps_urls":{"type":["set","string"],"required":true},"msi_resource_id":{"type":"string","required":true}}},"optional":true},"storage_account":{"nesting_mode":3,"block":{"attributes":{"is_default":{"type":"bool","required":true},"storage_account_key":{"type":"string","required":true},"storage_container_id":{"type":"string","required":true},"storage_resource_id":{"type":"string","optional":true}}},"optional":true},"storage_account_gen2":{"nesting_mode":3,"block":{"attributes":{"filesystem_id":{"type":"string","required":true},"is_default":{"type":"bool","required":true},"managed_identity_resource_id":{"type":"string","required":true},"storage_resource_id":{"type":"string","required":true}}},"optional":true}}}},"azurerm_healthbot":{"block":{"attributes":{"bot_management_portal_url":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_healthcare_dicom_service":{"block":{"attributes":{"authentication":{"type":["list",["object",{"audience":["list","string"],"authority":"string"}]],"computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"private_endpoint":{"type":["set",["object",{"id":"string","name":"string"}]],"computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"service_url":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true},"workspace_id":{"type":"string","required":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_healthcare_fhir_service":{"block":{"attributes":{"access_policy_object_ids":{"type":["set","string"],"optional":true},"configuration_export_storage_account_name":{"type":"string","optional":true},"container_registry_login_server_url":{"type":["set","string"],"optional":true},"kind":{"type":"string","optional":true,"default":"fhir-R4"},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"public_network_access_enabled":{"type":"bool","computed":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"workspace_id":{"type":"string","required":true}},"block_types":{"authentication":{"nesting_mode":3,"block":{"attributes":{"audience":{"type":"string","required":true},"authority":{"type":"string","required":true},"smart_proxy_enabled":{"type":"bool","optional":true}}},"required":true},"cors":{"nesting_mode":3,"block":{"attributes":{"allowed_headers":{"type":["set","string"],"required":true},"allowed_methods":{"type":["set","string"],"required":true},"allowed_origins":{"type":["set","string"],"required":true},"credentials_allowed":{"type":"bool","optional":true,"default":false},"max_age_in_seconds":{"type":"number","optional":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"oci_artifact":{"nesting_mode":3,"block":{"attributes":{"digest":{"type":"string","optional":true},"image_name":{"type":"string","optional":true},"login_server":{"type":"string","required":true}}},"optional":true}}}},"azurerm_healthcare_medtech_service":{"block":{"attributes":{"device_mapping_json":{"type":"string","required":true},"eventhub_consumer_group_name":{"type":"string","required":true},"eventhub_name":{"type":"string","required":true},"eventhub_namespace_name":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"workspace_id":{"type":"string","required":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_healthcare_medtech_service_fhir_destination":{"block":{"attributes":{"destination_fhir_mapping_json":{"type":"string","required":true},"destination_fhir_service_id":{"type":"string","required":true},"destination_identity_resolution_type":{"type":"string","required":true},"location":{"type":"string","required":true},"medtech_service_id":{"type":"string","required":true},"name":{"type":"string","required":true}}}},"azurerm_healthcare_service":{"block":{"attributes":{"access_policy_object_ids":{"type":["set","string"],"optional":true},"configuration_export_storage_account_name":{"type":"string","optional":true},"cosmosdb_key_vault_key_versionless_id":{"type":"string","optional":true},"cosmosdb_throughput":{"type":"number","optional":true,"default":1000},"kind":{"type":"string","optional":true,"default":"fhir"},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"authentication_configuration":{"nesting_mode":3,"block":{"attributes":{"audience":{"type":"string","optional":true,"at_least_one_of":["authentication_configuration.0.authority","authentication_configuration.0.audience","authentication_configuration.0.smart_proxy_enabled"]},"authority":{"type":"string","optional":true,"at_least_one_of":["authentication_configuration.0.authority","authentication_configuration.0.audience","authentication_configuration.0.smart_proxy_enabled"]},"smart_proxy_enabled":{"type":"bool","optional":true,"at_least_one_of":["authentication_configuration.0.authority","authentication_configuration.0.audience","authentication_configuration.0.smart_proxy_enabled"]}}},"optional":true,"computed":true},"cors_configuration":{"nesting_mode":3,"block":{"attributes":{"allow_credentials":{"type":"bool","optional":true,"at_least_one_of":["cors_configuration.0.allowed_origins","cors_configuration.0.allowed_headers","cors_configuration.0.allowed_methods","cors_configuration.0.max_age_in_seconds","cors_configuration.0.allow_credentials"]},"allowed_headers":{"type":["set","string"],"optional":true,"at_least_one_of":["cors_configuration.0.allowed_origins","cors_configuration.0.allowed_headers","cors_configuration.0.allowed_methods","cors_configuration.0.max_age_in_seconds","cors_configuration.0.allow_credentials"]},"allowed_methods":{"type":["list","string"],"optional":true,"at_least_one_of":["cors_configuration.0.allowed_origins","cors_configuration.0.allowed_headers","cors_configuration.0.allowed_methods","cors_configuration.0.max_age_in_seconds","cors_configuration.0.allow_credentials"]},"allowed_origins":{"type":["set","string"],"optional":true,"at_least_one_of":["cors_configuration.0.allowed_origins","cors_configuration.0.allowed_headers","cors_configuration.0.allowed_methods","cors_configuration.0.max_age_in_seconds","cors_configuration.0.allow_credentials"]},"max_age_in_seconds":{"type":"number","optional":true,"at_least_one_of":["cors_configuration.0.allowed_origins","cors_configuration.0.allowed_headers","cors_configuration.0.allowed_methods","cors_configuration.0.max_age_in_seconds","cors_configuration.0.allow_credentials"]}}},"optional":true,"computed":true},"identity":{"nesting_mode":3,"block":{"attributes":{"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_healthcare_workspace":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"private_endpoint_connection":{"type":["set",["object",{"id":"string","name":"string"}]],"computed":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_hpc_cache":{"block":{"attributes":{"automatically_rotate_key_to_latest_enabled":{"type":"bool","optional":true,"required_with":["key_vault_key_id"]},"cache_size_in_gb":{"type":"number","required":true},"key_vault_key_id":{"type":"string","optional":true,"required_with":["identity"]},"location":{"type":"string","required":true},"mount_addresses":{"type":["list","string"],"computed":true},"mtu":{"type":"number","optional":true,"default":1500},"name":{"type":"string","required":true},"ntp_server":{"type":"string","optional":true,"default":"time.windows.com"},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","required":true},"subnet_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"default_access_policy":{"nesting_mode":3,"block":{"block_types":{"access_rule":{"nesting_mode":4,"block":{"attributes":{"access":{"type":"string","required":true},"anonymous_gid":{"type":"number","optional":true},"anonymous_uid":{"type":"number","optional":true},"filter":{"type":"string","optional":true},"root_squash_enabled":{"type":"bool","optional":true},"scope":{"type":"string","required":true},"submount_access_enabled":{"type":"bool","optional":true},"suid_enabled":{"type":"bool","optional":true}}},"required":true}}},"optional":true,"computed":true},"directory_active_directory":{"nesting_mode":3,"block":{"attributes":{"cache_netbios_name":{"type":"string","required":true},"dns_primary_ip":{"type":"string","required":true},"dns_secondary_ip":{"type":"string","optional":true},"domain_name":{"type":"string","required":true},"domain_netbios_name":{"type":"string","required":true},"password":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true,"conflicts_with":["directory_flat_file","directory_ldap"]},"directory_flat_file":{"nesting_mode":3,"block":{"attributes":{"group_file_uri":{"type":"string","required":true},"password_file_uri":{"type":"string","required":true}}},"optional":true,"conflicts_with":["directory_active_directory","directory_ldap"]},"directory_ldap":{"nesting_mode":3,"block":{"attributes":{"base_dn":{"type":"string","required":true},"certificate_validation_uri":{"type":"string","optional":true},"download_certificate_automatically":{"type":"bool","optional":true,"required_with":["directory_ldap.0.certificate_validation_uri"]},"encrypted":{"type":"bool","optional":true},"server":{"type":"string","required":true}},"block_types":{"bind":{"nesting_mode":3,"block":{"attributes":{"dn":{"type":"string","required":true},"password":{"type":"string","required":true}}},"optional":true,"computed":true}}},"optional":true,"conflicts_with":["directory_active_directory","directory_flat_file"]},"dns":{"nesting_mode":3,"block":{"attributes":{"search_domain":{"type":"string","optional":true},"servers":{"type":["list","string"],"required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_hpc_cache_access_policy":{"block":{"attributes":{"hpc_cache_id":{"type":"string","required":true},"name":{"type":"string","required":true}},"block_types":{"access_rule":{"nesting_mode":4,"block":{"attributes":{"access":{"type":"string","required":true},"anonymous_gid":{"type":"number","optional":true},"anonymous_uid":{"type":"number","optional":true},"filter":{"type":"string","optional":true},"root_squash_enabled":{"type":"bool","optional":true},"scope":{"type":"string","required":true},"submount_access_enabled":{"type":"bool","optional":true},"suid_enabled":{"type":"bool","optional":true}}},"required":true}}}},"azurerm_hpc_cache_blob_nfs_target":{"block":{"attributes":{"access_policy_name":{"type":"string","optional":true,"default":"default"},"cache_name":{"type":"string","required":true},"name":{"type":"string","required":true},"namespace_path":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"storage_container_id":{"type":"string","required":true},"usage_model":{"type":"string","required":true},"verification_timer_in_seconds":{"type":"number","optional":true},"write_back_timer_in_seconds":{"type":"number","optional":true}}}},"azurerm_hpc_cache_blob_target":{"block":{"attributes":{"access_policy_name":{"type":"string","optional":true,"default":"default"},"cache_name":{"type":"string","required":true},"name":{"type":"string","required":true},"namespace_path":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"storage_container_id":{"type":"string","required":true}}}},"azurerm_hpc_cache_nfs_target":{"block":{"attributes":{"cache_name":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"target_host_name":{"type":"string","required":true},"usage_model":{"type":"string","required":true},"verification_timer_in_seconds":{"type":"number","optional":true},"write_back_timer_in_seconds":{"type":"number","optional":true}},"block_types":{"namespace_junction":{"nesting_mode":4,"block":{"attributes":{"access_policy_name":{"type":"string","optional":true,"default":"default"},"namespace_path":{"type":"string","required":true},"nfs_export":{"type":"string","required":true},"target_path":{"type":"string","optional":true,"default":""}}},"required":true}}}},"azurerm_image":{"block":{"attributes":{"hyper_v_generation":{"type":"string","optional":true,"default":"V1"},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"source_virtual_machine_id":{"type":"string","optional":true},"tags":{"type":["map","string"],"optional":true},"zone_resilient":{"type":"bool","optional":true,"default":false}},"block_types":{"data_disk":{"nesting_mode":3,"block":{"attributes":{"blob_uri":{"type":"string","optional":true,"computed":true},"caching":{"type":"string","optional":true,"default":"None"},"disk_encryption_set_id":{"type":"string","optional":true},"lun":{"type":"number","optional":true},"managed_disk_id":{"type":"string","optional":true},"size_gb":{"type":"number","optional":true,"computed":true},"storage_type":{"type":"string","required":true}}},"optional":true},"os_disk":{"nesting_mode":3,"block":{"attributes":{"blob_uri":{"type":"string","optional":true,"computed":true},"caching":{"type":"string","optional":true,"default":"None"},"disk_encryption_set_id":{"type":"string","optional":true},"managed_disk_id":{"type":"string","optional":true,"computed":true},"os_state":{"type":"string","optional":true},"os_type":{"type":"string","optional":true},"size_gb":{"type":"number","optional":true,"computed":true},"storage_type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_iot_security_device_group":{"block":{"attributes":{"iothub_id":{"type":"string","required":true},"name":{"type":"string","required":true}},"block_types":{"allow_rule":{"nesting_mode":3,"block":{"attributes":{"connection_from_ips_not_allowed":{"type":["set","string"],"optional":true,"at_least_one_of":["allow_rule.0.connection_from_ips_not_allowed","allow_rule.0.connection_to_ips_not_allowed","allow_rule.0.local_users_not_allowed","allow_rule.0.processes_not_allowed"]},"connection_to_ips_not_allowed":{"type":["set","string"],"optional":true,"at_least_one_of":["allow_rule.0.connection_from_ips_not_allowed","allow_rule.0.connection_to_ips_not_allowed","allow_rule.0.local_users_not_allowed","allow_rule.0.processes_not_allowed"]},"local_users_not_allowed":{"type":["set","string"],"optional":true,"at_least_one_of":["allow_rule.0.connection_from_ips_not_allowed","allow_rule.0.connection_to_ips_not_allowed","allow_rule.0.local_users_not_allowed","allow_rule.0.processes_not_allowed"]},"processes_not_allowed":{"type":["set","string"],"optional":true,"at_least_one_of":["allow_rule.0.connection_from_ips_not_allowed","allow_rule.0.connection_to_ips_not_allowed","allow_rule.0.local_users_not_allowed","allow_rule.0.processes_not_allowed"]}}},"optional":true},"range_rule":{"nesting_mode":4,"block":{"attributes":{"duration":{"type":"string","required":true},"max":{"type":"number","required":true},"min":{"type":"number","required":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_iot_security_solution":{"block":{"attributes":{"disabled_data_sources":{"type":["set","string"],"optional":true},"display_name":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":true},"events_to_export":{"type":["set","string"],"optional":true},"iothub_ids":{"type":["set","string"],"required":true},"location":{"type":"string","required":true},"log_analytics_workspace_id":{"type":"string","optional":true},"log_unmasked_ips_enabled":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"query_for_resources":{"type":"string","optional":true,"computed":true},"query_subscription_ids":{"type":["set","string"],"optional":true,"computed":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"additional_workspace":{"nesting_mode":4,"block":{"attributes":{"data_types":{"type":["set","string"],"required":true},"workspace_id":{"type":"string","required":true}}},"optional":true},"recommendations_enabled":{"nesting_mode":3,"block":{"attributes":{"acr_authentication":{"type":"bool","optional":true,"default":true},"agent_send_unutilized_msg":{"type":"bool","optional":true,"default":true},"baseline":{"type":"bool","optional":true,"default":true},"edge_hub_mem_optimize":{"type":"bool","optional":true,"default":true},"edge_logging_option":{"type":"bool","optional":true,"default":true},"inconsistent_module_settings":{"type":"bool","optional":true,"default":true},"install_agent":{"type":"bool","optional":true,"default":true},"ip_filter_deny_all":{"type":"bool","optional":true,"default":true},"ip_filter_permissive_rule":{"type":"bool","optional":true,"default":true},"open_ports":{"type":"bool","optional":true,"default":true},"permissive_firewall_policy":{"type":"bool","optional":true,"default":true},"permissive_input_firewall_rules":{"type":"bool","optional":true,"default":true},"permissive_output_firewall_rules":{"type":"bool","optional":true,"default":true},"privileged_docker_options":{"type":"bool","optional":true,"default":true},"shared_credentials":{"type":"bool","optional":true,"default":true},"vulnerable_tls_cipher_suite":{"type":"bool","optional":true,"default":true}}},"optional":true,"computed":true}}}},"azurerm_iotcentral_application":{"block":{"attributes":{"display_name":{"type":"string","optional":true,"computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"sku":{"type":"string","optional":true,"default":"ST1"},"sub_domain":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"template":{"type":"string","optional":true,"default":"iotc-pnp-preview@1.0.0"}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_iotcentral_application_network_rule_set":{"block":{"attributes":{"apply_to_device":{"type":"bool","optional":true,"default":true},"default_action":{"type":"string","optional":true,"default":"Deny"},"iotcentral_application_id":{"type":"string","required":true}},"block_types":{"ip_rule":{"nesting_mode":3,"block":{"attributes":{"ip_mask":{"type":"string","required":true},"name":{"type":"string","required":true}}},"optional":true}}}},"azurerm_iotcentral_organization":{"block":{"attributes":{"display_name":{"type":"string","required":true},"iotcentral_application_id":{"type":"string","required":true},"organization_id":{"type":"string","required":true},"parent_organization_id":{"type":"string","optional":true}}}},"azurerm_iothub":{"block":{"attributes":{"endpoint":{"type":["list",["object",{"authentication_type":"string","batch_frequency_in_seconds":"number","connection_string":"string","container_name":"string","encoding":"string","endpoint_uri":"string","entity_path":"string","file_name_format":"string","identity_id":"string","max_chunk_size_in_bytes":"number","name":"string","resource_group_name":"string","type":"string"}]],"optional":true,"computed":true},"enrichment":{"type":["list",["object",{"endpoint_names":["list","string"],"key":"string","value":"string"}]],"optional":true,"computed":true},"event_hub_events_endpoint":{"type":"string","computed":true},"event_hub_events_namespace":{"type":"string","computed":true},"event_hub_events_path":{"type":"string","computed":true},"event_hub_operations_endpoint":{"type":"string","computed":true},"event_hub_operations_path":{"type":"string","computed":true},"event_hub_partition_count":{"type":"number","optional":true,"default":4},"event_hub_retention_in_days":{"type":"number","optional":true,"default":1},"hostname":{"type":"string","computed":true},"local_authentication_enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"min_tls_version":{"type":"string","optional":true},"name":{"type":"string","required":true},"public_network_access_enabled":{"type":"bool","optional":true},"resource_group_name":{"type":"string","required":true},"route":{"type":["list",["object",{"condition":"string","enabled":"bool","endpoint_names":["list","string"],"name":"string","source":"string"}]],"optional":true,"computed":true},"shared_access_policy":{"type":["list",["object",{"key_name":"string","permissions":"string","primary_key":"string","secondary_key":"string"}]],"computed":true},"tags":{"type":["map","string"],"optional":true},"type":{"type":"string","computed":true}},"block_types":{"cloud_to_device":{"nesting_mode":3,"block":{"attributes":{"default_ttl":{"type":"string","optional":true,"default":"PT1H"},"max_delivery_count":{"type":"number","optional":true,"default":10}},"block_types":{"feedback":{"nesting_mode":3,"block":{"attributes":{"lock_duration":{"type":"string","optional":true,"default":"PT60S"},"max_delivery_count":{"type":"number","optional":true,"default":10},"time_to_live":{"type":"string","optional":true,"default":"PT1H"}}},"optional":true}}},"optional":true,"computed":true},"fallback_route":{"nesting_mode":3,"block":{"attributes":{"condition":{"type":"string","optional":true,"default":"true"},"enabled":{"type":"bool","optional":true,"default":true},"endpoint_names":{"type":["list","string"],"optional":true,"computed":true},"source":{"type":"string","optional":true,"default":"DeviceMessages"}}},"optional":true,"computed":true},"file_upload":{"nesting_mode":3,"block":{"attributes":{"authentication_type":{"type":"string","optional":true,"default":"keyBased"},"connection_string":{"type":"string","required":true},"container_name":{"type":"string","required":true},"default_ttl":{"type":"string","optional":true,"default":"PT1H"},"identity_id":{"type":"string","optional":true},"lock_duration":{"type":"string","optional":true,"default":"PT1M"},"max_delivery_count":{"type":"number","optional":true,"default":10},"notifications":{"type":"bool","optional":true,"default":false},"sas_ttl":{"type":"string","optional":true,"default":"PT1H"}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"network_rule_set":{"nesting_mode":3,"block":{"attributes":{"apply_to_builtin_eventhub_endpoint":{"type":"bool","optional":true,"default":false},"default_action":{"type":"string","optional":true,"default":"Deny"}},"block_types":{"ip_rule":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"default":"Allow"},"ip_mask":{"type":"string","required":true},"name":{"type":"string","required":true}}},"optional":true}}},"optional":true},"sku":{"nesting_mode":3,"block":{"attributes":{"capacity":{"type":"number","required":true},"name":{"type":"string","required":true}}},"required":true}}}},"azurerm_iothub_certificate":{"block":{"attributes":{"certificate_content":{"type":"string","required":true},"iothub_name":{"type":"string","required":true},"is_verified":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_iothub_consumer_group":{"block":{"attributes":{"eventhub_endpoint_name":{"type":"string","required":true},"iothub_name":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_iothub_device_update_account":{"block":{"attributes":{"host_name":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"sku":{"type":"string","optional":true,"default":"Standard"},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_iothub_device_update_instance":{"block":{"attributes":{"device_update_account_id":{"type":"string","required":true},"diagnostic_enabled":{"type":"bool","optional":true,"default":false},"iothub_id":{"type":"string","required":true},"name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"diagnostic_storage_account":{"nesting_mode":3,"block":{"attributes":{"connection_string":{"type":"string","required":true},"id":{"type":"string","required":true}}},"optional":true}}}},"azurerm_iothub_dps":{"block":{"attributes":{"allocation_policy":{"type":"string","optional":true,"default":"Hashed"},"data_residency_enabled":{"type":"bool","optional":true,"default":false},"device_provisioning_host_name":{"type":"string","computed":true},"id_scope":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"service_operations_host_name":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"ip_filter_rule":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"ip_mask":{"type":"string","required":true},"name":{"type":"string","required":true},"target":{"type":"string","optional":true}}},"optional":true},"linked_hub":{"nesting_mode":3,"block":{"attributes":{"allocation_weight":{"type":"number","optional":true,"default":1},"apply_allocation_policy":{"type":"bool","optional":true,"default":true},"connection_string":{"type":"string","required":true},"hostname":{"type":"string","computed":true},"location":{"type":"string","required":true}}},"optional":true},"sku":{"nesting_mode":3,"block":{"attributes":{"capacity":{"type":"number","required":true},"name":{"type":"string","required":true}}},"required":true}}}},"azurerm_iothub_dps_certificate":{"block":{"attributes":{"certificate_content":{"type":"string","required":true},"iot_dps_name":{"type":"string","required":true},"is_verified":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_iothub_dps_shared_access_policy":{"block":{"attributes":{"enrollment_read":{"type":"bool","optional":true,"default":false},"enrollment_write":{"type":"bool","optional":true,"default":false},"iothub_dps_name":{"type":"string","required":true},"name":{"type":"string","required":true},"primary_connection_string":{"type":"string","computed":true},"primary_key":{"type":"string","computed":true},"registration_read":{"type":"bool","optional":true,"default":false},"registration_write":{"type":"bool","optional":true,"default":false},"resource_group_name":{"type":"string","required":true},"secondary_connection_string":{"type":"string","computed":true},"secondary_key":{"type":"string","computed":true},"service_config":{"type":"bool","optional":true,"default":false}}}},"azurerm_iothub_endpoint_cosmosdb_account":{"block":{"attributes":{"authentication_type":{"type":"string","optional":true,"default":"keyBased"},"container_name":{"type":"string","required":true},"database_name":{"type":"string","required":true},"endpoint_uri":{"type":"string","required":true},"identity_id":{"type":"string","optional":true,"conflicts_with":["primary_key","secondary_key"]},"iothub_id":{"type":"string","required":true},"name":{"type":"string","required":true},"partition_key_name":{"type":"string","optional":true,"required_with":["partition_key_template"]},"partition_key_template":{"type":"string","optional":true,"required_with":["partition_key_name"]},"primary_key":{"type":"string","optional":true,"conflicts_with":["identity_id"],"required_with":["secondary_key"]},"resource_group_name":{"type":"string","required":true},"secondary_key":{"type":"string","optional":true,"conflicts_with":["identity_id"],"required_with":["primary_key"]}}}},"azurerm_iothub_endpoint_eventhub":{"block":{"attributes":{"authentication_type":{"type":"string","optional":true,"default":"keyBased"},"connection_string":{"type":"string","optional":true,"conflicts_with":["identity_id"],"exactly_one_of":["endpoint_uri","connection_string"]},"endpoint_uri":{"type":"string","optional":true,"exactly_one_of":["endpoint_uri","connection_string"],"required_with":["entity_path"]},"entity_path":{"type":"string","optional":true,"required_with":["endpoint_uri"]},"identity_id":{"type":"string","optional":true,"conflicts_with":["connection_string"]},"iothub_id":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_iothub_endpoint_servicebus_queue":{"block":{"attributes":{"authentication_type":{"type":"string","optional":true,"default":"keyBased"},"connection_string":{"type":"string","optional":true,"conflicts_with":["identity_id"],"exactly_one_of":["endpoint_uri","connection_string"]},"endpoint_uri":{"type":"string","optional":true,"exactly_one_of":["endpoint_uri","connection_string"],"required_with":["entity_path"]},"entity_path":{"type":"string","optional":true,"required_with":["endpoint_uri"]},"identity_id":{"type":"string","optional":true,"conflicts_with":["connection_string"]},"iothub_id":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_iothub_endpoint_servicebus_topic":{"block":{"attributes":{"authentication_type":{"type":"string","optional":true,"default":"keyBased"},"connection_string":{"type":"string","optional":true,"conflicts_with":["identity_id"],"exactly_one_of":["endpoint_uri","connection_string"]},"endpoint_uri":{"type":"string","optional":true,"exactly_one_of":["endpoint_uri","connection_string"],"required_with":["entity_path"]},"entity_path":{"type":"string","optional":true,"required_with":["endpoint_uri"]},"identity_id":{"type":"string","optional":true,"conflicts_with":["connection_string"]},"iothub_id":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_iothub_endpoint_storage_container":{"block":{"attributes":{"authentication_type":{"type":"string","optional":true,"default":"keyBased"},"batch_frequency_in_seconds":{"type":"number","optional":true,"default":300},"connection_string":{"type":"string","optional":true,"conflicts_with":["identity_id"],"exactly_one_of":["endpoint_uri","connection_string"]},"container_name":{"type":"string","required":true},"encoding":{"type":"string","optional":true,"default":"Avro"},"endpoint_uri":{"type":"string","optional":true,"exactly_one_of":["endpoint_uri","connection_string"]},"file_name_format":{"type":"string","optional":true,"default":"{iothub}/{partition}/{YYYY}/{MM}/{DD}/{HH}/{mm}"},"identity_id":{"type":"string","optional":true,"conflicts_with":["connection_string"]},"iothub_id":{"type":"string","required":true},"max_chunk_size_in_bytes":{"type":"number","optional":true,"default":314572800},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_iothub_enrichment":{"block":{"attributes":{"endpoint_names":{"type":["list","string"],"required":true},"iothub_name":{"type":"string","required":true},"key":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"value":{"type":"string","required":true}}}},"azurerm_iothub_fallback_route":{"block":{"attributes":{"condition":{"type":"string","optional":true,"default":"true"},"enabled":{"type":"bool","required":true},"endpoint_names":{"type":["list","string"],"required":true},"iothub_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"source":{"type":"string","optional":true,"default":"DeviceMessages"}}}},"azurerm_iothub_file_upload":{"block":{"attributes":{"authentication_type":{"type":"string","optional":true,"default":"keyBased"},"connection_string":{"type":"string","required":true},"container_name":{"type":"string","required":true},"default_ttl":{"type":"string","optional":true,"default":"PT1H"},"identity_id":{"type":"string","optional":true},"iothub_id":{"type":"string","required":true},"lock_duration":{"type":"string","optional":true,"default":"PT1M"},"max_delivery_count":{"type":"number","optional":true,"default":10},"notifications_enabled":{"type":"bool","optional":true,"default":false},"sas_ttl":{"type":"string","optional":true,"default":"PT1H"}}}},"azurerm_iothub_route":{"block":{"attributes":{"condition":{"type":"string","optional":true,"default":"true"},"enabled":{"type":"bool","required":true},"endpoint_names":{"type":["list","string"],"required":true},"iothub_name":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"source":{"type":"string","required":true}}}},"azurerm_iothub_shared_access_policy":{"block":{"attributes":{"device_connect":{"type":"bool","optional":true,"default":false},"iothub_name":{"type":"string","required":true},"name":{"type":"string","required":true},"primary_connection_string":{"type":"string","computed":true},"primary_key":{"type":"string","computed":true},"registry_read":{"type":"bool","optional":true,"default":false},"registry_write":{"type":"bool","optional":true,"default":false},"resource_group_name":{"type":"string","required":true},"secondary_connection_string":{"type":"string","computed":true},"secondary_key":{"type":"string","computed":true},"service_connect":{"type":"bool","optional":true,"default":false}}}},"azurerm_ip_group":{"block":{"attributes":{"cidrs":{"type":["set","string"],"optional":true},"firewall_ids":{"type":["list","string"],"computed":true},"firewall_policy_ids":{"type":["list","string"],"computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_ip_group_cidr":{"block":{"attributes":{"cidr":{"type":"string","required":true},"ip_group_id":{"type":"string","required":true}}}},"azurerm_key_vault":{"block":{"attributes":{"access_policy":{"type":["list",["object",{"application_id":"string","certificate_permissions":["list","string"],"key_permissions":["list","string"],"object_id":"string","secret_permissions":["list","string"],"storage_permissions":["list","string"],"tenant_id":"string"}]],"optional":true,"computed":true},"enable_rbac_authorization":{"type":"bool","optional":true},"enabled_for_deployment":{"type":"bool","optional":true},"enabled_for_disk_encryption":{"type":"bool","optional":true},"enabled_for_template_deployment":{"type":"bool","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"purge_protection_enabled":{"type":"bool","optional":true},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","required":true},"soft_delete_retention_days":{"type":"number","optional":true,"default":90},"tags":{"type":["map","string"],"optional":true},"tenant_id":{"type":"string","required":true},"vault_uri":{"type":"string","computed":true}},"block_types":{"contact":{"nesting_mode":4,"block":{"attributes":{"email":{"type":"string","required":true},"name":{"type":"string","optional":true},"phone":{"type":"string","optional":true}}},"optional":true,"computed":true},"network_acls":{"nesting_mode":3,"block":{"attributes":{"bypass":{"type":"string","required":true},"default_action":{"type":"string","required":true},"ip_rules":{"type":["set","string"],"optional":true},"virtual_network_subnet_ids":{"type":["set","string"],"optional":true}}},"optional":true,"computed":true}}}},"azurerm_key_vault_access_policy":{"block":{"attributes":{"application_id":{"type":"string","optional":true},"certificate_permissions":{"type":["list","string"],"optional":true},"key_permissions":{"type":["list","string"],"optional":true},"key_vault_id":{"type":"string","required":true},"object_id":{"type":"string","required":true},"secret_permissions":{"type":["list","string"],"optional":true},"storage_permissions":{"type":["list","string"],"optional":true},"tenant_id":{"type":"string","required":true}}}},"azurerm_key_vault_certificate":{"block":{"attributes":{"certificate_attribute":{"type":["list",["object",{"created":"string","enabled":"bool","expires":"string","not_before":"string","recovery_level":"string","updated":"string"}]],"computed":true},"certificate_data":{"type":"string","computed":true},"certificate_data_base64":{"type":"string","computed":true},"key_vault_id":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_manager_id":{"type":"string","computed":true},"resource_manager_versionless_id":{"type":"string","computed":true},"secret_id":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true},"thumbprint":{"type":"string","computed":true},"version":{"type":"string","computed":true},"versionless_id":{"type":"string","computed":true},"versionless_secret_id":{"type":"string","computed":true}},"block_types":{"certificate":{"nesting_mode":3,"block":{"attributes":{"contents":{"type":"string","required":true},"password":{"type":"string","optional":true}}},"optional":true,"at_least_one_of":["certificate_policy","certificate"]},"certificate_policy":{"nesting_mode":3,"block":{"block_types":{"issuer_parameters":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true}}},"required":true},"key_properties":{"nesting_mode":3,"block":{"attributes":{"curve":{"type":"string","optional":true,"computed":true},"exportable":{"type":"bool","required":true},"key_size":{"type":"number","optional":true,"computed":true},"key_type":{"type":"string","required":true},"reuse_key":{"type":"bool","required":true}}},"required":true},"lifetime_action":{"nesting_mode":3,"block":{"block_types":{"action":{"nesting_mode":3,"block":{"attributes":{"action_type":{"type":"string","required":true}}},"required":true},"trigger":{"nesting_mode":3,"block":{"attributes":{"days_before_expiry":{"type":"number","optional":true},"lifetime_percentage":{"type":"number","optional":true}}},"required":true}}},"optional":true},"secret_properties":{"nesting_mode":3,"block":{"attributes":{"content_type":{"type":"string","required":true}}},"required":true},"x509_certificate_properties":{"nesting_mode":3,"block":{"attributes":{"extended_key_usage":{"type":["list","string"],"optional":true,"computed":true},"key_usage":{"type":["set","string"],"required":true},"subject":{"type":"string","required":true},"validity_in_months":{"type":"number","required":true}},"block_types":{"subject_alternative_names":{"nesting_mode":3,"block":{"attributes":{"dns_names":{"type":["set","string"],"optional":true,"at_least_one_of":["certificate_policy.0.x509_certificate_properties.0.subject_alternative_names.0.emails","certificate_policy.0.x509_certificate_properties.0.subject_alternative_names.0.dns_names","certificate_policy.0.x509_certificate_properties.0.subject_alternative_names.0.upns"]},"emails":{"type":["set","string"],"optional":true,"at_least_one_of":["certificate_policy.0.x509_certificate_properties.0.subject_alternative_names.0.emails","certificate_policy.0.x509_certificate_properties.0.subject_alternative_names.0.dns_names","certificate_policy.0.x509_certificate_properties.0.subject_alternative_names.0.upns"]},"upns":{"type":["set","string"],"optional":true,"at_least_one_of":["certificate_policy.0.x509_certificate_properties.0.subject_alternative_names.0.emails","certificate_policy.0.x509_certificate_properties.0.subject_alternative_names.0.dns_names","certificate_policy.0.x509_certificate_properties.0.subject_alternative_names.0.upns"]}}},"optional":true,"computed":true}}},"optional":true,"computed":true}}},"optional":true,"computed":true,"at_least_one_of":["certificate_policy","certificate"]}}}},"azurerm_key_vault_certificate_contacts":{"block":{"attributes":{"key_vault_id":{"type":"string","required":true}},"block_types":{"contact":{"nesting_mode":4,"block":{"attributes":{"email":{"type":"string","required":true},"name":{"type":"string","optional":true},"phone":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_key_vault_certificate_issuer":{"block":{"attributes":{"account_id":{"type":"string","optional":true},"key_vault_id":{"type":"string","required":true},"name":{"type":"string","required":true},"org_id":{"type":"string","optional":true},"password":{"type":"string","optional":true},"provider_name":{"type":"string","required":true}},"block_types":{"admin":{"nesting_mode":3,"block":{"attributes":{"email_address":{"type":"string","required":true},"first_name":{"type":"string","optional":true},"last_name":{"type":"string","optional":true},"phone":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_key_vault_key":{"block":{"attributes":{"curve":{"type":"string","optional":true,"computed":true,"conflicts_with":["key_size"]},"e":{"type":"string","computed":true},"expiration_date":{"type":"string","optional":true},"key_opts":{"type":["list","string"],"required":true},"key_size":{"type":"number","optional":true,"conflicts_with":["curve"]},"key_type":{"type":"string","required":true},"key_vault_id":{"type":"string","required":true},"n":{"type":"string","computed":true},"name":{"type":"string","required":true},"not_before_date":{"type":"string","optional":true},"public_key_openssh":{"type":"string","computed":true},"public_key_pem":{"type":"string","computed":true},"resource_id":{"type":"string","computed":true},"resource_versionless_id":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true},"version":{"type":"string","computed":true},"versionless_id":{"type":"string","computed":true},"x":{"type":"string","computed":true},"y":{"type":"string","computed":true}},"block_types":{"rotation_policy":{"nesting_mode":3,"block":{"attributes":{"expire_after":{"type":"string","optional":true,"at_least_one_of":["rotation_policy.0.expire_after","rotation_policy.0.automatic"],"required_with":["rotation_policy.0.expire_after","rotation_policy.0.notify_before_expiry"]},"notify_before_expiry":{"type":"string","optional":true,"required_with":["rotation_policy.0.expire_after","rotation_policy.0.notify_before_expiry"]}},"block_types":{"automatic":{"nesting_mode":3,"block":{"attributes":{"time_after_creation":{"type":"string","optional":true,"at_least_one_of":["rotation_policy.0.automatic.0.time_after_creation","rotation_policy.0.automatic.0.time_before_expiry"]},"time_before_expiry":{"type":"string","optional":true,"at_least_one_of":["rotation_policy.0.automatic.0.time_after_creation","rotation_policy.0.automatic.0.time_before_expiry"]}}},"optional":true}}},"optional":true}}}},"azurerm_key_vault_managed_hardware_security_module":{"block":{"attributes":{"admin_object_ids":{"type":["set","string"],"required":true},"hsm_uri":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"purge_protection_enabled":{"type":"bool","optional":true},"resource_group_name":{"type":"string","required":true},"security_domain_encrypted_data":{"type":"string","computed":true},"security_domain_key_vault_certificate_ids":{"type":["list","string"],"optional":true,"required_with":["security_domain_quorum"]},"security_domain_quorum":{"type":"number","optional":true,"required_with":["security_domain_key_vault_certificate_ids"]},"sku_name":{"type":"string","required":true},"soft_delete_retention_days":{"type":"number","optional":true,"default":90},"tags":{"type":["map","string"],"optional":true},"tenant_id":{"type":"string","required":true}},"block_types":{"network_acls":{"nesting_mode":3,"block":{"attributes":{"bypass":{"type":"string","required":true},"default_action":{"type":"string","required":true}}},"optional":true,"computed":true}}}},"azurerm_key_vault_managed_hardware_security_module_key":{"block":{"attributes":{"curve":{"type":"string","optional":true,"exactly_one_of":["key_size"]},"expiration_date":{"type":"string","optional":true},"key_opts":{"type":["set","string"],"required":true},"key_size":{"type":"number","optional":true,"exactly_one_of":["curve"]},"key_type":{"type":"string","required":true},"managed_hsm_id":{"type":"string","required":true},"name":{"type":"string","required":true},"not_before_date":{"type":"string","optional":true},"tags":{"type":["map","string"],"optional":true},"versioned_id":{"type":"string","computed":true}}}},"azurerm_key_vault_managed_hardware_security_module_key_rotation_policy":{"block":{"attributes":{"expire_after":{"type":"string","required":true},"managed_hsm_key_id":{"type":"string","required":true},"time_after_creation":{"type":"string","optional":true,"exactly_one_of":["time_after_creation","time_before_expiry"]},"time_before_expiry":{"type":"string","optional":true,"exactly_one_of":["time_after_creation","time_before_expiry"]}}}},"azurerm_key_vault_managed_hardware_security_module_role_assignment":{"block":{"attributes":{"managed_hsm_id":{"type":"string","required":true},"name":{"type":"string","required":true},"principal_id":{"type":"string","required":true},"resource_id":{"type":"string","computed":true},"role_definition_id":{"type":"string","required":true},"scope":{"type":"string","required":true}}}},"azurerm_key_vault_managed_hardware_security_module_role_definition":{"block":{"attributes":{"description":{"type":"string","optional":true},"managed_hsm_id":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_manager_id":{"type":"string","computed":true},"role_name":{"type":"string","optional":true},"role_type":{"type":"string","computed":true}},"block_types":{"permission":{"nesting_mode":3,"block":{"attributes":{"actions":{"type":["list","string"],"optional":true},"data_actions":{"type":["set","string"],"optional":true},"not_actions":{"type":["list","string"],"optional":true},"not_data_actions":{"type":["set","string"],"optional":true}}},"optional":true}}}},"azurerm_key_vault_managed_storage_account":{"block":{"attributes":{"key_vault_id":{"type":"string","required":true},"name":{"type":"string","required":true},"regenerate_key_automatically":{"type":"bool","optional":true,"default":false,"required_with":["regeneration_period"]},"regeneration_period":{"type":"string","optional":true,"required_with":["regenerate_key_automatically"]},"storage_account_id":{"type":"string","required":true},"storage_account_key":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_key_vault_managed_storage_account_sas_token_definition":{"block":{"attributes":{"managed_storage_account_id":{"type":"string","required":true},"name":{"type":"string","required":true},"sas_template_uri":{"type":"string","required":true},"sas_type":{"type":"string","required":true},"secret_id":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true},"validity_period":{"type":"string","required":true}}}},"azurerm_key_vault_secret":{"block":{"attributes":{"content_type":{"type":"string","optional":true},"expiration_date":{"type":"string","optional":true},"key_vault_id":{"type":"string","required":true},"name":{"type":"string","required":true},"not_before_date":{"type":"string","optional":true},"resource_id":{"type":"string","computed":true},"resource_versionless_id":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true},"value":{"type":"string","required":true},"version":{"type":"string","computed":true},"versionless_id":{"type":"string","computed":true}}}},"azurerm_kubernetes_cluster":{"block":{"attributes":{"automatic_upgrade_channel":{"type":"string","optional":true},"azure_policy_enabled":{"type":"bool","optional":true},"cost_analysis_enabled":{"type":"bool","optional":true},"current_kubernetes_version":{"type":"string","computed":true},"disk_encryption_set_id":{"type":"string","optional":true},"dns_prefix":{"type":"string","optional":true,"exactly_one_of":["dns_prefix","dns_prefix_private_cluster"]},"dns_prefix_private_cluster":{"type":"string","optional":true,"exactly_one_of":["dns_prefix","dns_prefix_private_cluster"]},"edge_zone":{"type":"string","optional":true},"fqdn":{"type":"string","computed":true},"http_application_routing_enabled":{"type":"bool","optional":true},"http_application_routing_zone_name":{"type":"string","computed":true},"image_cleaner_enabled":{"type":"bool","optional":true},"image_cleaner_interval_hours":{"type":"number","optional":true},"kube_admin_config":{"type":["list",["object",{"client_certificate":"string","client_key":"string","cluster_ca_certificate":"string","host":"string","password":"string","username":"string"}]],"computed":true},"kube_admin_config_raw":{"type":"string","computed":true},"kube_config":{"type":["list",["object",{"client_certificate":"string","client_key":"string","cluster_ca_certificate":"string","host":"string","password":"string","username":"string"}]],"computed":true},"kube_config_raw":{"type":"string","computed":true},"kubernetes_version":{"type":"string","optional":true,"computed":true},"local_account_disabled":{"type":"bool","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"node_os_upgrade_channel":{"type":"string","optional":true,"default":"NodeImage"},"node_resource_group":{"type":"string","optional":true,"computed":true},"node_resource_group_id":{"type":"string","computed":true},"oidc_issuer_enabled":{"type":"bool","optional":true},"oidc_issuer_url":{"type":"string","computed":true},"open_service_mesh_enabled":{"type":"bool","optional":true},"portal_fqdn":{"type":"string","computed":true},"private_cluster_enabled":{"type":"bool","optional":true,"default":false},"private_cluster_public_fqdn_enabled":{"type":"bool","optional":true,"default":false},"private_dns_zone_id":{"type":"string","optional":true,"computed":true},"private_fqdn":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"role_based_access_control_enabled":{"type":"bool","optional":true,"default":true},"run_command_enabled":{"type":"bool","optional":true,"default":true},"sku_tier":{"type":"string","optional":true,"default":"Free"},"support_plan":{"type":"string","optional":true,"default":"KubernetesOfficial"},"tags":{"type":["map","string"],"optional":true},"workload_identity_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"aci_connector_linux":{"nesting_mode":3,"block":{"attributes":{"connector_identity":{"type":["list",["object",{"client_id":"string","object_id":"string","user_assigned_identity_id":"string"}]],"computed":true},"subnet_name":{"type":"string","required":true}}},"optional":true},"api_server_access_profile":{"nesting_mode":3,"block":{"attributes":{"authorized_ip_ranges":{"type":["set","string"],"optional":true}}},"optional":true},"auto_scaler_profile":{"nesting_mode":3,"block":{"attributes":{"balance_similar_node_groups":{"type":"bool","optional":true,"default":false},"empty_bulk_delete_max":{"type":"string","optional":true,"computed":true},"expander":{"type":"string","optional":true,"default":"random"},"max_graceful_termination_sec":{"type":"string","optional":true,"computed":true},"max_node_provisioning_time":{"type":"string","optional":true,"default":"15m"},"max_unready_nodes":{"type":"number","optional":true,"default":3},"max_unready_percentage":{"type":"number","optional":true,"default":45},"new_pod_scale_up_delay":{"type":"string","optional":true,"computed":true},"scale_down_delay_after_add":{"type":"string","optional":true,"computed":true},"scale_down_delay_after_delete":{"type":"string","optional":true,"computed":true},"scale_down_delay_after_failure":{"type":"string","optional":true,"computed":true},"scale_down_unneeded":{"type":"string","optional":true,"computed":true},"scale_down_unready":{"type":"string","optional":true,"computed":true},"scale_down_utilization_threshold":{"type":"string","optional":true,"computed":true},"scan_interval":{"type":"string","optional":true,"computed":true},"skip_nodes_with_local_storage":{"type":"bool","optional":true,"default":false},"skip_nodes_with_system_pods":{"type":"bool","optional":true,"default":true}}},"optional":true,"computed":true},"azure_active_directory_role_based_access_control":{"nesting_mode":3,"block":{"attributes":{"admin_group_object_ids":{"type":["list","string"],"optional":true,"at_least_one_of":["azure_active_directory_role_based_access_control.0.tenant_id","azure_active_directory_role_based_access_control.0.admin_group_object_ids"]},"azure_rbac_enabled":{"type":"bool","optional":true},"tenant_id":{"type":"string","optional":true,"computed":true,"at_least_one_of":["azure_active_directory_role_based_access_control.0.tenant_id","azure_active_directory_role_based_access_control.0.admin_group_object_ids"]}}},"optional":true},"confidential_computing":{"nesting_mode":3,"block":{"attributes":{"sgx_quote_helper_enabled":{"type":"bool","required":true}}},"optional":true},"default_node_pool":{"nesting_mode":3,"block":{"attributes":{"auto_scaling_enabled":{"type":"bool","optional":true},"capacity_reservation_group_id":{"type":"string","optional":true},"fips_enabled":{"type":"bool","optional":true},"gpu_instance":{"type":"string","optional":true},"host_encryption_enabled":{"type":"bool","optional":true},"host_group_id":{"type":"string","optional":true},"kubelet_disk_type":{"type":"string","optional":true,"computed":true},"max_count":{"type":"number","optional":true},"max_pods":{"type":"number","optional":true,"computed":true},"min_count":{"type":"number","optional":true},"name":{"type":"string","required":true},"node_count":{"type":"number","optional":true,"computed":true},"node_labels":{"type":["map","string"],"optional":true,"computed":true},"node_public_ip_enabled":{"type":"bool","optional":true},"node_public_ip_prefix_id":{"type":"string","optional":true,"required_with":["default_node_pool.0.node_public_ip_enabled"]},"only_critical_addons_enabled":{"type":"bool","optional":true},"orchestrator_version":{"type":"string","optional":true,"computed":true},"os_disk_size_gb":{"type":"number","optional":true,"computed":true},"os_disk_type":{"type":"string","optional":true,"default":"Managed"},"os_sku":{"type":"string","optional":true,"computed":true},"pod_subnet_id":{"type":"string","optional":true},"proximity_placement_group_id":{"type":"string","optional":true},"scale_down_mode":{"type":"string","optional":true,"default":"Delete"},"snapshot_id":{"type":"string","optional":true},"tags":{"type":["map","string"],"optional":true},"temporary_name_for_rotation":{"type":"string","optional":true},"type":{"type":"string","optional":true,"default":"VirtualMachineScaleSets"},"ultra_ssd_enabled":{"type":"bool","optional":true,"default":false},"vm_size":{"type":"string","required":true},"vnet_subnet_id":{"type":"string","optional":true},"workload_runtime":{"type":"string","optional":true,"computed":true},"zones":{"type":["set","string"],"optional":true}},"block_types":{"kubelet_config":{"nesting_mode":3,"block":{"attributes":{"allowed_unsafe_sysctls":{"type":["set","string"],"optional":true},"container_log_max_line":{"type":"number","optional":true},"container_log_max_size_mb":{"type":"number","optional":true},"cpu_cfs_quota_enabled":{"type":"bool","optional":true,"default":true},"cpu_cfs_quota_period":{"type":"string","optional":true},"cpu_manager_policy":{"type":"string","optional":true},"image_gc_high_threshold":{"type":"number","optional":true},"image_gc_low_threshold":{"type":"number","optional":true},"pod_max_pid":{"type":"number","optional":true},"topology_manager_policy":{"type":"string","optional":true}}},"optional":true},"linux_os_config":{"nesting_mode":3,"block":{"attributes":{"swap_file_size_mb":{"type":"number","optional":true},"transparent_huge_page_defrag":{"type":"string","optional":true},"transparent_huge_page_enabled":{"type":"string","optional":true}},"block_types":{"sysctl_config":{"nesting_mode":3,"block":{"attributes":{"fs_aio_max_nr":{"type":"number","optional":true},"fs_file_max":{"type":"number","optional":true},"fs_inotify_max_user_watches":{"type":"number","optional":true},"fs_nr_open":{"type":"number","optional":true},"kernel_threads_max":{"type":"number","optional":true},"net_core_netdev_max_backlog":{"type":"number","optional":true},"net_core_optmem_max":{"type":"number","optional":true},"net_core_rmem_default":{"type":"number","optional":true},"net_core_rmem_max":{"type":"number","optional":true},"net_core_somaxconn":{"type":"number","optional":true},"net_core_wmem_default":{"type":"number","optional":true},"net_core_wmem_max":{"type":"number","optional":true},"net_ipv4_ip_local_port_range_max":{"type":"number","optional":true},"net_ipv4_ip_local_port_range_min":{"type":"number","optional":true},"net_ipv4_neigh_default_gc_thresh1":{"type":"number","optional":true},"net_ipv4_neigh_default_gc_thresh2":{"type":"number","optional":true},"net_ipv4_neigh_default_gc_thresh3":{"type":"number","optional":true},"net_ipv4_tcp_fin_timeout":{"type":"number","optional":true},"net_ipv4_tcp_keepalive_intvl":{"type":"number","optional":true},"net_ipv4_tcp_keepalive_probes":{"type":"number","optional":true},"net_ipv4_tcp_keepalive_time":{"type":"number","optional":true},"net_ipv4_tcp_max_syn_backlog":{"type":"number","optional":true},"net_ipv4_tcp_max_tw_buckets":{"type":"number","optional":true},"net_ipv4_tcp_tw_reuse":{"type":"bool","optional":true},"net_netfilter_nf_conntrack_buckets":{"type":"number","optional":true},"net_netfilter_nf_conntrack_max":{"type":"number","optional":true},"vm_max_map_count":{"type":"number","optional":true},"vm_swappiness":{"type":"number","optional":true},"vm_vfs_cache_pressure":{"type":"number","optional":true}}},"optional":true}}},"optional":true},"node_network_profile":{"nesting_mode":3,"block":{"attributes":{"application_security_group_ids":{"type":["list","string"],"optional":true},"node_public_ip_tags":{"type":["map","string"],"optional":true}},"block_types":{"allowed_host_ports":{"nesting_mode":3,"block":{"attributes":{"port_end":{"type":"number","optional":true},"port_start":{"type":"number","optional":true},"protocol":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"upgrade_settings":{"nesting_mode":3,"block":{"attributes":{"drain_timeout_in_minutes":{"type":"number","optional":true},"max_surge":{"type":"string","required":true},"node_soak_duration_in_minutes":{"type":"number","optional":true}}},"optional":true}}},"required":true},"http_proxy_config":{"nesting_mode":3,"block":{"attributes":{"http_proxy":{"type":"string","optional":true},"https_proxy":{"type":"string","optional":true},"no_proxy":{"type":["set","string"],"optional":true},"trusted_ca":{"type":"string","optional":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"ingress_application_gateway":{"nesting_mode":3,"block":{"attributes":{"effective_gateway_id":{"type":"string","computed":true},"gateway_id":{"type":"string","optional":true,"conflicts_with":["ingress_application_gateway.0.subnet_cidr","ingress_application_gateway.0.subnet_id"],"at_least_one_of":["ingress_application_gateway.0.gateway_id","ingress_application_gateway.0.subnet_cidr","ingress_application_gateway.0.subnet_id"]},"gateway_name":{"type":"string","optional":true},"ingress_application_gateway_identity":{"type":["list",["object",{"client_id":"string","object_id":"string","user_assigned_identity_id":"string"}]],"computed":true},"subnet_cidr":{"type":"string","optional":true,"conflicts_with":["ingress_application_gateway.0.gateway_id","ingress_application_gateway.0.subnet_id"],"at_least_one_of":["ingress_application_gateway.0.gateway_id","ingress_application_gateway.0.subnet_cidr","ingress_application_gateway.0.subnet_id"]},"subnet_id":{"type":"string","optional":true,"conflicts_with":["ingress_application_gateway.0.gateway_id","ingress_application_gateway.0.subnet_cidr"],"at_least_one_of":["ingress_application_gateway.0.gateway_id","ingress_application_gateway.0.subnet_cidr","ingress_application_gateway.0.subnet_id"]}}},"optional":true},"key_management_service":{"nesting_mode":3,"block":{"attributes":{"key_vault_key_id":{"type":"string","required":true},"key_vault_network_access":{"type":"string","optional":true,"default":"Public"}}},"optional":true},"key_vault_secrets_provider":{"nesting_mode":3,"block":{"attributes":{"secret_identity":{"type":["list",["object",{"client_id":"string","object_id":"string","user_assigned_identity_id":"string"}]],"computed":true},"secret_rotation_enabled":{"type":"bool","optional":true,"default":false,"at_least_one_of":["key_vault_secrets_provider.0.secret_rotation_enabled","key_vault_secrets_provider.0.secret_rotation_interval"]},"secret_rotation_interval":{"type":"string","optional":true,"default":"2m","at_least_one_of":["key_vault_secrets_provider.0.secret_rotation_enabled","key_vault_secrets_provider.0.secret_rotation_interval"]}}},"optional":true},"kubelet_identity":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","optional":true,"computed":true,"required_with":["kubelet_identity.0.object_id","kubelet_identity.0.user_assigned_identity_id","identity.0.identity_ids"]},"object_id":{"type":"string","optional":true,"computed":true,"required_with":["kubelet_identity.0.client_id","kubelet_identity.0.user_assigned_identity_id","identity.0.identity_ids"]},"user_assigned_identity_id":{"type":"string","optional":true,"computed":true,"required_with":["kubelet_identity.0.client_id","kubelet_identity.0.object_id","identity.0.identity_ids"]}}},"optional":true,"computed":true},"linux_profile":{"nesting_mode":3,"block":{"attributes":{"admin_username":{"type":"string","required":true}},"block_types":{"ssh_key":{"nesting_mode":3,"block":{"attributes":{"key_data":{"type":"string","required":true}}},"required":true}}},"optional":true},"maintenance_window":{"nesting_mode":3,"block":{"block_types":{"allowed":{"nesting_mode":4,"block":{"attributes":{"day":{"type":"string","required":true},"hours":{"type":["set","number"],"required":true}}},"optional":true,"at_least_one_of":["maintenance_window.0.allowed","maintenance_window.0.not_allowed"]},"not_allowed":{"nesting_mode":4,"block":{"attributes":{"end":{"type":"string","required":true},"start":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["maintenance_window.0.allowed","maintenance_window.0.not_allowed"]}}},"optional":true},"maintenance_window_auto_upgrade":{"nesting_mode":3,"block":{"attributes":{"day_of_month":{"type":"number","optional":true},"day_of_week":{"type":"string","optional":true},"duration":{"type":"number","required":true},"frequency":{"type":"string","required":true},"interval":{"type":"number","required":true},"start_date":{"type":"string","optional":true,"computed":true},"start_time":{"type":"string","optional":true},"utc_offset":{"type":"string","optional":true},"week_index":{"type":"string","optional":true}},"block_types":{"not_allowed":{"nesting_mode":4,"block":{"attributes":{"end":{"type":"string","required":true},"start":{"type":"string","required":true}}},"optional":true}}},"optional":true},"maintenance_window_node_os":{"nesting_mode":3,"block":{"attributes":{"day_of_month":{"type":"number","optional":true},"day_of_week":{"type":"string","optional":true},"duration":{"type":"number","required":true},"frequency":{"type":"string","required":true},"interval":{"type":"number","required":true},"start_date":{"type":"string","optional":true,"computed":true},"start_time":{"type":"string","optional":true},"utc_offset":{"type":"string","optional":true},"week_index":{"type":"string","optional":true}},"block_types":{"not_allowed":{"nesting_mode":4,"block":{"attributes":{"end":{"type":"string","required":true},"start":{"type":"string","required":true}}},"optional":true}}},"optional":true},"microsoft_defender":{"nesting_mode":3,"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true}}},"optional":true},"monitor_metrics":{"nesting_mode":3,"block":{"attributes":{"annotations_allowed":{"type":"string","optional":true},"labels_allowed":{"type":"string","optional":true}}},"optional":true},"network_profile":{"nesting_mode":3,"block":{"attributes":{"dns_service_ip":{"type":"string","optional":true,"computed":true},"ip_versions":{"type":["list","string"],"optional":true,"computed":true},"load_balancer_sku":{"type":"string","optional":true,"default":"standard"},"network_data_plane":{"type":"string","optional":true,"default":"azure"},"network_mode":{"type":"string","optional":true,"computed":true},"network_plugin":{"type":"string","required":true},"network_plugin_mode":{"type":"string","optional":true},"network_policy":{"type":"string","optional":true,"computed":true},"outbound_type":{"type":"string","optional":true,"default":"loadBalancer"},"pod_cidr":{"type":"string","optional":true,"computed":true},"pod_cidrs":{"type":["list","string"],"optional":true,"computed":true},"service_cidr":{"type":"string","optional":true,"computed":true},"service_cidrs":{"type":["list","string"],"optional":true,"computed":true}},"block_types":{"load_balancer_profile":{"nesting_mode":3,"block":{"attributes":{"effective_outbound_ips":{"type":["set","string"],"computed":true},"idle_timeout_in_minutes":{"type":"number","optional":true,"default":30},"managed_outbound_ip_count":{"type":"number","optional":true,"computed":true,"conflicts_with":["network_profile.0.load_balancer_profile.0.outbound_ip_prefix_ids","network_profile.0.load_balancer_profile.0.outbound_ip_address_ids"]},"managed_outbound_ipv6_count":{"type":"number","optional":true,"computed":true,"conflicts_with":["network_profile.0.load_balancer_profile.0.outbound_ip_prefix_ids","network_profile.0.load_balancer_profile.0.outbound_ip_address_ids"]},"outbound_ip_address_ids":{"type":["set","string"],"optional":true,"conflicts_with":["network_profile.0.load_balancer_profile.0.managed_outbound_ip_count","network_profile.0.load_balancer_profile.0.outbound_ip_prefix_ids"]},"outbound_ip_prefix_ids":{"type":["set","string"],"optional":true,"conflicts_with":["network_profile.0.load_balancer_profile.0.managed_outbound_ip_count","network_profile.0.load_balancer_profile.0.outbound_ip_address_ids"]},"outbound_ports_allocated":{"type":"number","optional":true,"default":0}}},"optional":true,"computed":true},"nat_gateway_profile":{"nesting_mode":3,"block":{"attributes":{"effective_outbound_ips":{"type":["set","string"],"computed":true},"idle_timeout_in_minutes":{"type":"number","optional":true,"default":4},"managed_outbound_ip_count":{"type":"number","optional":true,"computed":true}}},"optional":true,"computed":true}}},"optional":true,"computed":true},"oms_agent":{"nesting_mode":3,"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"msi_auth_for_monitoring_enabled":{"type":"bool","optional":true},"oms_agent_identity":{"type":["list",["object",{"client_id":"string","object_id":"string","user_assigned_identity_id":"string"}]],"computed":true}}},"optional":true},"service_mesh_profile":{"nesting_mode":3,"block":{"attributes":{"external_ingress_gateway_enabled":{"type":"bool","optional":true},"internal_ingress_gateway_enabled":{"type":"bool","optional":true},"mode":{"type":"string","required":true},"revisions":{"type":["list","string"],"required":true}},"block_types":{"certificate_authority":{"nesting_mode":3,"block":{"attributes":{"cert_chain_object_name":{"type":"string","required":true},"cert_object_name":{"type":"string","required":true},"key_object_name":{"type":"string","required":true},"key_vault_id":{"type":"string","required":true},"root_cert_object_name":{"type":"string","required":true}}},"optional":true}}},"optional":true},"service_principal":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","required":true}}},"optional":true,"exactly_one_of":["identity","service_principal"]},"storage_profile":{"nesting_mode":3,"block":{"attributes":{"blob_driver_enabled":{"type":"bool","optional":true,"default":false},"disk_driver_enabled":{"type":"bool","optional":true,"default":true},"file_driver_enabled":{"type":"bool","optional":true,"default":true},"snapshot_controller_enabled":{"type":"bool","optional":true,"default":true}}},"optional":true},"web_app_routing":{"nesting_mode":3,"block":{"attributes":{"dns_zone_ids":{"type":["list","string"],"required":true},"web_app_routing_identity":{"type":["list",["object",{"client_id":"string","object_id":"string","user_assigned_identity_id":"string"}]],"computed":true}}},"optional":true},"windows_profile":{"nesting_mode":3,"block":{"attributes":{"admin_password":{"type":"string","required":true},"admin_username":{"type":"string","required":true},"license":{"type":"string","optional":true}},"block_types":{"gmsa":{"nesting_mode":3,"block":{"attributes":{"dns_server":{"type":"string","required":true},"root_domain":{"type":"string","required":true}}},"optional":true}}},"optional":true,"computed":true},"workload_autoscaler_profile":{"nesting_mode":3,"block":{"attributes":{"keda_enabled":{"type":"bool","optional":true,"default":false},"vertical_pod_autoscaler_enabled":{"type":"bool","optional":true,"default":false}}},"optional":true}}}},"azurerm_kubernetes_cluster_extension":{"block":{"attributes":{"aks_assigned_identity":{"type":["list",["object",{"principal_id":"string","tenant_id":"string","type":"string"}]],"computed":true},"cluster_id":{"type":"string","required":true},"configuration_protected_settings":{"type":["map","string"],"optional":true},"configuration_settings":{"type":["map","string"],"optional":true},"current_version":{"type":"string","computed":true},"extension_type":{"type":"string","required":true},"name":{"type":"string","required":true},"release_namespace":{"type":"string","optional":true,"computed":true,"conflicts_with":["target_namespace"]},"release_train":{"type":"string","optional":true,"computed":true,"conflicts_with":["version"]},"target_namespace":{"type":"string","optional":true,"computed":true,"conflicts_with":["release_namespace"]},"version":{"type":"string","optional":true,"conflicts_with":["release_train"]}},"block_types":{"plan":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"product":{"type":"string","required":true},"promotion_code":{"type":"string","optional":true},"publisher":{"type":"string","required":true},"version":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_kubernetes_cluster_node_pool":{"block":{"attributes":{"auto_scaling_enabled":{"type":"bool","optional":true},"capacity_reservation_group_id":{"type":"string","optional":true},"eviction_policy":{"type":"string","optional":true},"fips_enabled":{"type":"bool","optional":true},"gpu_instance":{"type":"string","optional":true},"host_encryption_enabled":{"type":"bool","optional":true},"host_group_id":{"type":"string","optional":true},"kubelet_disk_type":{"type":"string","optional":true,"computed":true},"kubernetes_cluster_id":{"type":"string","required":true},"max_count":{"type":"number","optional":true},"max_pods":{"type":"number","optional":true,"computed":true},"min_count":{"type":"number","optional":true},"mode":{"type":"string","optional":true,"default":"User"},"name":{"type":"string","required":true},"node_count":{"type":"number","optional":true,"computed":true},"node_labels":{"type":["map","string"],"optional":true,"computed":true},"node_public_ip_enabled":{"type":"bool","optional":true},"node_public_ip_prefix_id":{"type":"string","optional":true,"required_with":["node_public_ip_enabled"]},"node_taints":{"type":["list","string"],"optional":true},"orchestrator_version":{"type":"string","optional":true,"computed":true},"os_disk_size_gb":{"type":"number","optional":true,"computed":true},"os_disk_type":{"type":"string","optional":true,"default":"Managed"},"os_sku":{"type":"string","optional":true,"computed":true},"os_type":{"type":"string","optional":true,"default":"Linux"},"pod_subnet_id":{"type":"string","optional":true},"priority":{"type":"string","optional":true,"default":"Regular"},"proximity_placement_group_id":{"type":"string","optional":true},"scale_down_mode":{"type":"string","optional":true,"default":"Delete"},"snapshot_id":{"type":"string","optional":true},"spot_max_price":{"type":"number","optional":true,"default":-1},"tags":{"type":["map","string"],"optional":true},"ultra_ssd_enabled":{"type":"bool","optional":true,"default":false},"vm_size":{"type":"string","required":true},"vnet_subnet_id":{"type":"string","optional":true},"workload_runtime":{"type":"string","optional":true},"zones":{"type":["set","string"],"optional":true}},"block_types":{"kubelet_config":{"nesting_mode":3,"block":{"attributes":{"allowed_unsafe_sysctls":{"type":["set","string"],"optional":true},"container_log_max_line":{"type":"number","optional":true},"container_log_max_size_mb":{"type":"number","optional":true},"cpu_cfs_quota_enabled":{"type":"bool","optional":true,"default":true},"cpu_cfs_quota_period":{"type":"string","optional":true},"cpu_manager_policy":{"type":"string","optional":true},"image_gc_high_threshold":{"type":"number","optional":true},"image_gc_low_threshold":{"type":"number","optional":true},"pod_max_pid":{"type":"number","optional":true},"topology_manager_policy":{"type":"string","optional":true}}},"optional":true},"linux_os_config":{"nesting_mode":3,"block":{"attributes":{"swap_file_size_mb":{"type":"number","optional":true},"transparent_huge_page_defrag":{"type":"string","optional":true},"transparent_huge_page_enabled":{"type":"string","optional":true}},"block_types":{"sysctl_config":{"nesting_mode":3,"block":{"attributes":{"fs_aio_max_nr":{"type":"number","optional":true},"fs_file_max":{"type":"number","optional":true},"fs_inotify_max_user_watches":{"type":"number","optional":true},"fs_nr_open":{"type":"number","optional":true},"kernel_threads_max":{"type":"number","optional":true},"net_core_netdev_max_backlog":{"type":"number","optional":true},"net_core_optmem_max":{"type":"number","optional":true},"net_core_rmem_default":{"type":"number","optional":true},"net_core_rmem_max":{"type":"number","optional":true},"net_core_somaxconn":{"type":"number","optional":true},"net_core_wmem_default":{"type":"number","optional":true},"net_core_wmem_max":{"type":"number","optional":true},"net_ipv4_ip_local_port_range_max":{"type":"number","optional":true},"net_ipv4_ip_local_port_range_min":{"type":"number","optional":true},"net_ipv4_neigh_default_gc_thresh1":{"type":"number","optional":true},"net_ipv4_neigh_default_gc_thresh2":{"type":"number","optional":true},"net_ipv4_neigh_default_gc_thresh3":{"type":"number","optional":true},"net_ipv4_tcp_fin_timeout":{"type":"number","optional":true},"net_ipv4_tcp_keepalive_intvl":{"type":"number","optional":true},"net_ipv4_tcp_keepalive_probes":{"type":"number","optional":true},"net_ipv4_tcp_keepalive_time":{"type":"number","optional":true},"net_ipv4_tcp_max_syn_backlog":{"type":"number","optional":true},"net_ipv4_tcp_max_tw_buckets":{"type":"number","optional":true},"net_ipv4_tcp_tw_reuse":{"type":"bool","optional":true},"net_netfilter_nf_conntrack_buckets":{"type":"number","optional":true},"net_netfilter_nf_conntrack_max":{"type":"number","optional":true},"vm_max_map_count":{"type":"number","optional":true},"vm_swappiness":{"type":"number","optional":true},"vm_vfs_cache_pressure":{"type":"number","optional":true}}},"optional":true}}},"optional":true},"node_network_profile":{"nesting_mode":3,"block":{"attributes":{"application_security_group_ids":{"type":["list","string"],"optional":true},"node_public_ip_tags":{"type":["map","string"],"optional":true}},"block_types":{"allowed_host_ports":{"nesting_mode":3,"block":{"attributes":{"port_end":{"type":"number","optional":true},"port_start":{"type":"number","optional":true},"protocol":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"upgrade_settings":{"nesting_mode":3,"block":{"attributes":{"drain_timeout_in_minutes":{"type":"number","optional":true},"max_surge":{"type":"string","required":true},"node_soak_duration_in_minutes":{"type":"number","optional":true}}},"optional":true},"windows_profile":{"nesting_mode":3,"block":{"attributes":{"outbound_nat_enabled":{"type":"bool","optional":true,"default":true}}},"optional":true}}}},"azurerm_kubernetes_cluster_trusted_access_role_binding":{"block":{"attributes":{"kubernetes_cluster_id":{"type":"string","required":true},"name":{"type":"string","required":true},"roles":{"type":["list","string"],"required":true},"source_resource_id":{"type":"string","required":true}}}},"azurerm_kubernetes_fleet_manager":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"hub_profile":{"nesting_mode":3,"block":{"attributes":{"dns_prefix":{"type":"string","required":true},"fqdn":{"type":"string","computed":true},"kubernetes_version":{"type":"string","computed":true}}},"optional":true}}}},"azurerm_kubernetes_fleet_member":{"block":{"attributes":{"group":{"type":"string","optional":true},"kubernetes_cluster_id":{"type":"string","required":true},"kubernetes_fleet_id":{"type":"string","required":true},"name":{"type":"string","required":true}}}},"azurerm_kubernetes_fleet_update_run":{"block":{"attributes":{"fleet_update_strategy_id":{"type":"string","optional":true,"conflicts_with":["stage"]},"kubernetes_fleet_manager_id":{"type":"string","required":true},"name":{"type":"string","required":true}},"block_types":{"managed_cluster_update":{"nesting_mode":3,"block":{"block_types":{"node_image_selection":{"nesting_mode":3,"block":{"attributes":{"type":{"type":"string","required":true}}},"optional":true},"upgrade":{"nesting_mode":3,"block":{"attributes":{"kubernetes_version":{"type":"string","optional":true},"type":{"type":"string","required":true}}},"required":true}}},"required":true},"stage":{"nesting_mode":3,"block":{"attributes":{"after_stage_wait_in_seconds":{"type":"number","optional":true},"name":{"type":"string","required":true}},"block_types":{"group":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true}}},"required":true}}},"optional":true,"conflicts_with":["fleet_update_strategy_id"]}}}},"azurerm_kubernetes_fleet_update_strategy":{"block":{"attributes":{"kubernetes_fleet_manager_id":{"type":"string","required":true},"name":{"type":"string","required":true}},"block_types":{"stage":{"nesting_mode":3,"block":{"attributes":{"after_stage_wait_in_seconds":{"type":"number","optional":true},"name":{"type":"string","required":true}},"block_types":{"group":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true}}},"required":true}}},"required":true}}}},"azurerm_kubernetes_flux_configuration":{"block":{"attributes":{"cluster_id":{"type":"string","required":true},"continuous_reconciliation_enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"namespace":{"type":"string","required":true},"scope":{"type":"string","optional":true,"default":"namespace"}},"block_types":{"blob_storage":{"nesting_mode":3,"block":{"attributes":{"account_key":{"type":"string","optional":true,"exactly_one_of":["blob_storage.0.account_key","blob_storage.0.local_auth_reference","blob_storage.0.managed_identity","blob_storage.0.sas_token","blob_storage.0.service_principal"]},"container_id":{"type":"string","required":true},"local_auth_reference":{"type":"string","optional":true,"exactly_one_of":["blob_storage.0.account_key","blob_storage.0.local_auth_reference","blob_storage.0.managed_identity","blob_storage.0.sas_token","blob_storage.0.service_principal"]},"sas_token":{"type":"string","optional":true,"exactly_one_of":["blob_storage.0.account_key","blob_storage.0.local_auth_reference","blob_storage.0.managed_identity","blob_storage.0.sas_token","blob_storage.0.service_principal"]},"sync_interval_in_seconds":{"type":"number","optional":true,"default":600},"timeout_in_seconds":{"type":"number","optional":true,"default":600}},"block_types":{"managed_identity":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true}}},"optional":true,"exactly_one_of":["blob_storage.0.account_key","blob_storage.0.local_auth_reference","blob_storage.0.managed_identity","blob_storage.0.sas_token","blob_storage.0.service_principal"]},"service_principal":{"nesting_mode":3,"block":{"attributes":{"client_certificate_base64":{"type":"string","optional":true,"exactly_one_of":["blob_storage.0.service_principal.0.client_certificate_base64","blob_storage.0.service_principal.0.client_secret"]},"client_certificate_password":{"type":"string","optional":true,"required_with":["blob_storage.0.service_principal.0.client_certificate_base64"]},"client_certificate_send_chain":{"type":"bool","optional":true,"default":false},"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["blob_storage.0.service_principal.0.client_certificate_base64","blob_storage.0.service_principal.0.client_secret"]},"tenant_id":{"type":"string","required":true}}},"optional":true,"exactly_one_of":["blob_storage.0.account_key","blob_storage.0.local_auth_reference","blob_storage.0.managed_identity","blob_storage.0.sas_token","blob_storage.0.service_principal"]}}},"optional":true,"exactly_one_of":["blob_storage","bucket","git_repository"]},"bucket":{"nesting_mode":3,"block":{"attributes":{"access_key":{"type":"string","optional":true,"exactly_one_of":["bucket.0.access_key","bucket.0.local_auth_reference"],"required_with":["bucket.0.secret_key_base64"]},"bucket_name":{"type":"string","required":true},"local_auth_reference":{"type":"string","optional":true,"exactly_one_of":["bucket.0.access_key","bucket.0.local_auth_reference"]},"secret_key_base64":{"type":"string","optional":true,"required_with":["bucket.0.access_key"]},"sync_interval_in_seconds":{"type":"number","optional":true,"default":600},"timeout_in_seconds":{"type":"number","optional":true,"default":600},"tls_enabled":{"type":"bool","optional":true,"default":true},"url":{"type":"string","required":true}}},"optional":true,"exactly_one_of":["blob_storage","bucket","git_repository"]},"git_repository":{"nesting_mode":3,"block":{"attributes":{"https_ca_cert_base64":{"type":"string","optional":true,"required_with":["git_repository.0.https_user"]},"https_key_base64":{"type":"string","optional":true,"required_with":["git_repository.0.https_user"]},"https_user":{"type":"string","optional":true,"conflicts_with":["git_repository.0.local_auth_reference","git_repository.0.ssh_private_key_base64","git_repository.0.ssh_known_hosts_base64"],"required_with":["git_repository.0.https_key_base64"]},"local_auth_reference":{"type":"string","optional":true,"conflicts_with":["git_repository.0.https_user","git_repository.0.ssh_private_key_base64","git_repository.0.ssh_known_hosts_base64"]},"reference_type":{"type":"string","required":true},"reference_value":{"type":"string","required":true},"ssh_known_hosts_base64":{"type":"string","optional":true,"conflicts_with":["git_repository.0.https_user","git_repository.0.local_auth_reference"]},"ssh_private_key_base64":{"type":"string","optional":true,"conflicts_with":["git_repository.0.https_user","git_repository.0.local_auth_reference"]},"sync_interval_in_seconds":{"type":"number","optional":true,"default":600},"timeout_in_seconds":{"type":"number","optional":true,"default":600},"url":{"type":"string","required":true}}},"optional":true,"exactly_one_of":["blob_storage","bucket","git_repository"]},"kustomizations":{"nesting_mode":4,"block":{"attributes":{"depends_on":{"type":["list","string"],"optional":true},"garbage_collection_enabled":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"path":{"type":"string","optional":true},"recreating_enabled":{"type":"bool","optional":true,"default":false},"retry_interval_in_seconds":{"type":"number","optional":true,"default":600},"sync_interval_in_seconds":{"type":"number","optional":true,"default":600},"timeout_in_seconds":{"type":"number","optional":true,"default":600}}},"required":true}}}},"azurerm_kusto_attached_database_configuration":{"block":{"attributes":{"attached_database_names":{"type":["list","string"],"computed":true},"cluster_name":{"type":"string","required":true},"cluster_resource_id":{"type":"string","required":true},"database_name":{"type":"string","required":true},"default_principal_modification_kind":{"type":"string","optional":true,"default":"None"},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}},"block_types":{"sharing":{"nesting_mode":3,"block":{"attributes":{"external_tables_to_exclude":{"type":["set","string"],"optional":true},"external_tables_to_include":{"type":["set","string"],"optional":true},"materialized_views_to_exclude":{"type":["set","string"],"optional":true},"materialized_views_to_include":{"type":["set","string"],"optional":true},"tables_to_exclude":{"type":["set","string"],"optional":true},"tables_to_include":{"type":["set","string"],"optional":true}}},"optional":true}}}},"azurerm_kusto_cluster":{"block":{"attributes":{"allowed_fqdns":{"type":["list","string"],"optional":true},"allowed_ip_ranges":{"type":["list","string"],"optional":true},"auto_stop_enabled":{"type":"bool","optional":true,"default":true},"data_ingestion_uri":{"type":"string","computed":true},"disk_encryption_enabled":{"type":"bool","optional":true,"default":false},"double_encryption_enabled":{"type":"bool","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"outbound_network_access_restricted":{"type":"bool","optional":true,"default":false},"public_ip_type":{"type":"string","optional":true,"default":"IPv4"},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"purge_enabled":{"type":"bool","optional":true,"default":false},"resource_group_name":{"type":"string","required":true},"streaming_ingestion_enabled":{"type":"bool","optional":true,"default":false},"tags":{"type":["map","string"],"optional":true},"trusted_external_tenants":{"type":["list","string"],"optional":true,"computed":true},"uri":{"type":"string","computed":true},"zones":{"type":["set","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"language_extensions":{"nesting_mode":3,"block":{"attributes":{"image":{"type":"string","required":true},"name":{"type":"string","required":true}}},"optional":true},"optimized_auto_scale":{"nesting_mode":3,"block":{"attributes":{"maximum_instances":{"type":"number","required":true},"minimum_instances":{"type":"number","required":true}}},"optional":true},"sku":{"nesting_mode":3,"block":{"attributes":{"capacity":{"type":"number","optional":true,"computed":true},"name":{"type":"string","required":true}}},"required":true},"virtual_network_configuration":{"nesting_mode":3,"block":{"attributes":{"data_management_public_ip_id":{"type":"string","required":true},"engine_public_ip_id":{"type":"string","required":true},"subnet_id":{"type":"string","required":true}}},"optional":true}}}},"azurerm_kusto_cluster_customer_managed_key":{"block":{"attributes":{"cluster_id":{"type":"string","required":true},"key_name":{"type":"string","required":true},"key_vault_id":{"type":"string","required":true},"key_version":{"type":"string","optional":true},"user_identity":{"type":"string","optional":true}}}},"azurerm_kusto_cluster_managed_private_endpoint":{"block":{"attributes":{"cluster_name":{"type":"string","required":true},"group_id":{"type":"string","required":true},"name":{"type":"string","required":true},"private_link_resource_id":{"type":"string","required":true},"private_link_resource_region":{"type":"string","optional":true},"request_message":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_kusto_cluster_principal_assignment":{"block":{"attributes":{"cluster_name":{"type":"string","required":true},"name":{"type":"string","required":true},"principal_id":{"type":"string","required":true},"principal_name":{"type":"string","computed":true},"principal_type":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"role":{"type":"string","required":true},"tenant_id":{"type":"string","required":true},"tenant_name":{"type":"string","computed":true}}}},"azurerm_kusto_cosmosdb_data_connection":{"block":{"attributes":{"cosmosdb_container_id":{"type":"string","required":true},"kusto_database_id":{"type":"string","required":true},"location":{"type":"string","required":true},"managed_identity_id":{"type":"string","required":true},"mapping_rule_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"retrieval_start_date":{"type":"string","optional":true},"table_name":{"type":"string","required":true}}}},"azurerm_kusto_database":{"block":{"attributes":{"cluster_name":{"type":"string","required":true},"hot_cache_period":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"size":{"type":"number","computed":true},"soft_delete_period":{"type":"string","optional":true}}}},"azurerm_kusto_database_principal_assignment":{"block":{"attributes":{"cluster_name":{"type":"string","required":true},"database_name":{"type":"string","required":true},"name":{"type":"string","required":true},"principal_id":{"type":"string","required":true},"principal_name":{"type":"string","computed":true},"principal_type":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"role":{"type":"string","required":true},"tenant_id":{"type":"string","required":true},"tenant_name":{"type":"string","computed":true}}}},"azurerm_kusto_eventgrid_data_connection":{"block":{"attributes":{"blob_storage_event_type":{"type":"string","optional":true,"default":"Microsoft.Storage.BlobCreated"},"cluster_name":{"type":"string","required":true},"data_format":{"type":"string","optional":true},"database_name":{"type":"string","required":true},"database_routing_type":{"type":"string","optional":true,"default":"Single"},"eventgrid_resource_id":{"type":"string","optional":true},"eventhub_consumer_group_name":{"type":"string","required":true},"eventhub_id":{"type":"string","required":true},"location":{"type":"string","required":true},"managed_identity_resource_id":{"type":"string","optional":true},"mapping_rule_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"skip_first_record":{"type":"bool","optional":true,"default":false},"storage_account_id":{"type":"string","required":true},"table_name":{"type":"string","optional":true}}}},"azurerm_kusto_eventhub_data_connection":{"block":{"attributes":{"cluster_name":{"type":"string","required":true},"compression":{"type":"string","optional":true,"default":"None"},"consumer_group":{"type":"string","required":true},"data_format":{"type":"string","optional":true},"database_name":{"type":"string","required":true},"database_routing_type":{"type":"string","optional":true,"default":"Single"},"event_system_properties":{"type":["list","string"],"optional":true,"computed":true},"eventhub_id":{"type":"string","required":true},"identity_id":{"type":"string","optional":true},"location":{"type":"string","required":true},"mapping_rule_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"table_name":{"type":"string","optional":true}}}},"azurerm_kusto_iothub_data_connection":{"block":{"attributes":{"cluster_name":{"type":"string","required":true},"consumer_group":{"type":"string","required":true},"data_format":{"type":"string","optional":true},"database_name":{"type":"string","required":true},"database_routing_type":{"type":"string","optional":true,"default":"Single"},"event_system_properties":{"type":["set","string"],"optional":true},"iothub_id":{"type":"string","required":true},"location":{"type":"string","required":true},"mapping_rule_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"shared_access_policy_name":{"type":"string","required":true},"table_name":{"type":"string","optional":true}}}},"azurerm_kusto_script":{"block":{"attributes":{"continue_on_errors_enabled":{"type":"bool","optional":true,"default":false},"database_id":{"type":"string","required":true},"force_an_update_when_value_changed":{"type":"string","optional":true,"computed":true},"name":{"type":"string","required":true},"sas_token":{"type":"string","optional":true,"required_with":["url"]},"script_content":{"type":"string","optional":true,"exactly_one_of":["url","script_content"]},"url":{"type":"string","optional":true,"exactly_one_of":["url","script_content"],"required_with":["sas_token"]}}}},"azurerm_lb":{"block":{"attributes":{"edge_zone":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"private_ip_address":{"type":"string","computed":true},"private_ip_addresses":{"type":["list","string"],"computed":true},"resource_group_name":{"type":"string","required":true},"sku":{"type":"string","optional":true,"default":"Standard"},"sku_tier":{"type":"string","optional":true,"default":"Regional"},"tags":{"type":["map","string"],"optional":true}},"block_types":{"frontend_ip_configuration":{"nesting_mode":3,"block":{"attributes":{"gateway_load_balancer_frontend_ip_configuration_id":{"type":"string","optional":true,"computed":true},"id":{"type":"string","computed":true},"inbound_nat_rules":{"type":["set","string"],"computed":true},"load_balancer_rules":{"type":["set","string"],"computed":true},"name":{"type":"string","required":true},"outbound_rules":{"type":["set","string"],"computed":true},"private_ip_address":{"type":"string","optional":true,"computed":true},"private_ip_address_allocation":{"type":"string","optional":true,"computed":true},"private_ip_address_version":{"type":"string","optional":true,"computed":true},"public_ip_address_id":{"type":"string","optional":true,"computed":true},"public_ip_prefix_id":{"type":"string","optional":true,"computed":true},"subnet_id":{"type":"string","optional":true,"computed":true},"zones":{"type":["set","string"],"optional":true}}},"optional":true}}}},"azurerm_lb_backend_address_pool":{"block":{"attributes":{"backend_ip_configurations":{"type":["list","string"],"computed":true},"inbound_nat_rules":{"type":["list","string"],"computed":true},"load_balancing_rules":{"type":["list","string"],"computed":true},"loadbalancer_id":{"type":"string","required":true},"name":{"type":"string","required":true},"outbound_rules":{"type":["list","string"],"computed":true},"synchronous_mode":{"type":"string","optional":true,"required_with":["virtual_network_id"]},"virtual_network_id":{"type":"string","optional":true}},"block_types":{"tunnel_interface":{"nesting_mode":3,"block":{"attributes":{"identifier":{"type":"number","required":true},"port":{"type":"number","required":true},"protocol":{"type":"string","required":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_lb_backend_address_pool_address":{"block":{"attributes":{"backend_address_ip_configuration_id":{"type":"string","optional":true,"conflicts_with":["virtual_network_id"]},"backend_address_pool_id":{"type":"string","required":true},"inbound_nat_rule_port_mapping":{"type":["list",["object",{"backend_port":"number","frontend_port":"number","inbound_nat_rule_name":"string"}]],"computed":true},"ip_address":{"type":"string","optional":true},"name":{"type":"string","required":true},"virtual_network_id":{"type":"string","optional":true,"conflicts_with":["backend_address_ip_configuration_id"]}}}},"azurerm_lb_nat_pool":{"block":{"attributes":{"backend_port":{"type":"number","required":true},"floating_ip_enabled":{"type":"bool","optional":true},"frontend_ip_configuration_id":{"type":"string","computed":true},"frontend_ip_configuration_name":{"type":"string","required":true},"frontend_port_end":{"type":"number","required":true},"frontend_port_start":{"type":"number","required":true},"idle_timeout_in_minutes":{"type":"number","optional":true,"default":4},"loadbalancer_id":{"type":"string","required":true},"name":{"type":"string","required":true},"protocol":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tcp_reset_enabled":{"type":"bool","optional":true}}}},"azurerm_lb_nat_rule":{"block":{"attributes":{"backend_address_pool_id":{"type":"string","optional":true,"conflicts_with":["frontend_port"],"required_with":["frontend_port_start","frontend_port_end"]},"backend_ip_configuration_id":{"type":"string","computed":true},"backend_port":{"type":"number","required":true},"enable_floating_ip":{"type":"bool","optional":true,"computed":true},"enable_tcp_reset":{"type":"bool","optional":true},"frontend_ip_configuration_id":{"type":"string","computed":true},"frontend_ip_configuration_name":{"type":"string","required":true},"frontend_port":{"type":"number","optional":true,"conflicts_with":["frontend_port_start","frontend_port_end","backend_address_pool_id"]},"frontend_port_end":{"type":"number","optional":true,"conflicts_with":["frontend_port"],"required_with":["backend_address_pool_id","frontend_port_start"]},"frontend_port_start":{"type":"number","optional":true,"conflicts_with":["frontend_port"],"required_with":["backend_address_pool_id","frontend_port_end"]},"idle_timeout_in_minutes":{"type":"number","optional":true,"default":4},"loadbalancer_id":{"type":"string","required":true},"name":{"type":"string","required":true},"protocol":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_lb_outbound_rule":{"block":{"attributes":{"allocated_outbound_ports":{"type":"number","optional":true,"default":1024},"backend_address_pool_id":{"type":"string","required":true},"enable_tcp_reset":{"type":"bool","optional":true,"default":false},"idle_timeout_in_minutes":{"type":"number","optional":true,"default":4},"loadbalancer_id":{"type":"string","required":true},"name":{"type":"string","required":true},"protocol":{"type":"string","required":true}},"block_types":{"frontend_ip_configuration":{"nesting_mode":3,"block":{"attributes":{"id":{"type":"string","computed":true},"name":{"type":"string","required":true}}},"optional":true}}}},"azurerm_lb_probe":{"block":{"attributes":{"interval_in_seconds":{"type":"number","optional":true,"default":15},"load_balancer_rules":{"type":["set","string"],"computed":true},"loadbalancer_id":{"type":"string","required":true},"name":{"type":"string","required":true},"number_of_probes":{"type":"number","optional":true,"default":2},"port":{"type":"number","required":true},"probe_threshold":{"type":"number","optional":true,"default":1},"protocol":{"type":"string","optional":true,"default":"Tcp"},"request_path":{"type":"string","optional":true}}}},"azurerm_lb_rule":{"block":{"attributes":{"backend_address_pool_ids":{"type":["list","string"],"optional":true},"backend_port":{"type":"number","required":true},"disable_outbound_snat":{"type":"bool","optional":true,"default":false},"enable_floating_ip":{"type":"bool","optional":true,"default":false},"enable_tcp_reset":{"type":"bool","optional":true},"frontend_ip_configuration_id":{"type":"string","computed":true},"frontend_ip_configuration_name":{"type":"string","required":true},"frontend_port":{"type":"number","required":true},"idle_timeout_in_minutes":{"type":"number","optional":true,"default":4},"load_distribution":{"type":"string","optional":true,"default":"Default"},"loadbalancer_id":{"type":"string","required":true},"name":{"type":"string","required":true},"probe_id":{"type":"string","optional":true},"protocol":{"type":"string","required":true}}}},"azurerm_lighthouse_assignment":{"block":{"attributes":{"lighthouse_definition_id":{"type":"string","required":true},"name":{"type":"string","optional":true,"computed":true},"scope":{"type":"string","required":true}}}},"azurerm_lighthouse_definition":{"block":{"attributes":{"description":{"type":"string","optional":true},"lighthouse_definition_id":{"type":"string","optional":true,"computed":true},"managing_tenant_id":{"type":"string","required":true},"name":{"type":"string","required":true},"scope":{"type":"string","required":true}},"block_types":{"authorization":{"nesting_mode":4,"block":{"attributes":{"delegated_role_definition_ids":{"type":["set","string"],"optional":true},"principal_display_name":{"type":"string","optional":true},"principal_id":{"type":"string","required":true},"role_definition_id":{"type":"string","required":true}}},"required":true},"eligible_authorization":{"nesting_mode":4,"block":{"attributes":{"principal_display_name":{"type":"string","optional":true},"principal_id":{"type":"string","required":true},"role_definition_id":{"type":"string","required":true}},"block_types":{"just_in_time_access_policy":{"nesting_mode":3,"block":{"attributes":{"maximum_activation_duration":{"type":"string","optional":true,"default":"PT8H"},"multi_factor_auth_provider":{"type":"string","optional":true}},"block_types":{"approver":{"nesting_mode":4,"block":{"attributes":{"principal_display_name":{"type":"string","optional":true},"principal_id":{"type":"string","required":true}}},"optional":true}}},"optional":true}}},"optional":true},"plan":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"product":{"type":"string","required":true},"publisher":{"type":"string","required":true},"version":{"type":"string","required":true}}},"optional":true}}}},"azurerm_linux_function_app":{"block":{"attributes":{"app_settings":{"type":["map","string"],"optional":true},"builtin_logging_enabled":{"type":"bool","optional":true,"default":true},"client_certificate_enabled":{"type":"bool","optional":true,"default":false},"client_certificate_exclusion_paths":{"type":"string","optional":true},"client_certificate_mode":{"type":"string","optional":true,"default":"Optional"},"content_share_force_disabled":{"type":"bool","optional":true,"default":false},"custom_domain_verification_id":{"type":"string","computed":true},"daily_memory_time_quota":{"type":"number","optional":true,"default":0},"default_hostname":{"type":"string","computed":true},"enabled":{"type":"bool","optional":true,"default":true},"ftp_publish_basic_authentication_enabled":{"type":"bool","optional":true,"default":true},"functions_extension_version":{"type":"string","optional":true,"default":"~4"},"hosting_environment_id":{"type":"string","computed":true},"https_only":{"type":"bool","optional":true,"default":false},"key_vault_reference_identity_id":{"type":"string","optional":true,"computed":true},"kind":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"outbound_ip_address_list":{"type":["list","string"],"computed":true},"outbound_ip_addresses":{"type":"string","computed":true},"possible_outbound_ip_address_list":{"type":["list","string"],"computed":true},"possible_outbound_ip_addresses":{"type":"string","computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"service_plan_id":{"type":"string","required":true},"site_credential":{"type":["list",["object",{"name":"string","password":"string"}]],"computed":true},"storage_account_access_key":{"type":"string","optional":true,"conflicts_with":["storage_uses_managed_identity","storage_key_vault_secret_id"]},"storage_account_name":{"type":"string","optional":true,"exactly_one_of":["storage_account_name","storage_key_vault_secret_id"]},"storage_key_vault_secret_id":{"type":"string","optional":true,"exactly_one_of":["storage_account_name","storage_key_vault_secret_id"]},"storage_uses_managed_identity":{"type":"bool","optional":true,"default":false,"conflicts_with":["storage_account_access_key","storage_key_vault_secret_id"]},"tags":{"type":["map","string"],"optional":true},"virtual_network_subnet_id":{"type":"string","optional":true},"vnet_image_pull_enabled":{"type":"bool","optional":true,"default":false},"webdeploy_publish_basic_authentication_enabled":{"type":"bool","optional":true,"default":true},"zip_deploy_file":{"type":"string","optional":true,"computed":true}},"block_types":{"auth_settings":{"nesting_mode":3,"block":{"attributes":{"additional_login_parameters":{"type":["map","string"],"optional":true},"allowed_external_redirect_urls":{"type":["list","string"],"optional":true,"computed":true},"default_provider":{"type":"string","optional":true,"computed":true},"enabled":{"type":"bool","required":true},"issuer":{"type":"string","optional":true},"runtime_version":{"type":"string","optional":true,"computed":true},"token_refresh_extension_hours":{"type":"number","optional":true,"default":72},"token_store_enabled":{"type":"bool","optional":true,"default":false},"unauthenticated_client_action":{"type":"string","optional":true,"computed":true}},"block_types":{"active_directory":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"conflicts_with":["auth_settings.0.active_directory.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings.0.active_directory.0.client_secret"]}}},"optional":true},"facebook":{"nesting_mode":3,"block":{"attributes":{"app_id":{"type":"string","required":true},"app_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.facebook.0.app_secret","auth_settings.0.facebook.0.app_secret_setting_name"]},"app_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.facebook.0.app_secret","auth_settings.0.facebook.0.app_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"github":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.github.0.client_secret","auth_settings.0.github.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.github.0.client_secret","auth_settings.0.github.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"google":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.google.0.client_secret","auth_settings.0.google.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.google.0.client_secret","auth_settings.0.google.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"microsoft":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.microsoft.0.client_secret","auth_settings.0.microsoft.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.microsoft.0.client_secret","auth_settings.0.microsoft.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"twitter":{"nesting_mode":3,"block":{"attributes":{"consumer_key":{"type":"string","required":true},"consumer_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.twitter.0.consumer_secret","auth_settings.0.twitter.0.consumer_secret_setting_name"]},"consumer_secret_setting_name":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"auth_settings_v2":{"nesting_mode":3,"block":{"attributes":{"auth_enabled":{"type":"bool","optional":true},"config_file_path":{"type":"string","optional":true},"default_provider":{"type":"string","optional":true},"excluded_paths":{"type":["list","string"],"optional":true},"forward_proxy_convention":{"type":"string","optional":true,"default":"NoProxy"},"forward_proxy_custom_host_header_name":{"type":"string","optional":true},"forward_proxy_custom_scheme_header_name":{"type":"string","optional":true},"http_route_api_prefix":{"type":"string","optional":true,"default":"/.auth"},"require_authentication":{"type":"bool","optional":true},"require_https":{"type":"bool","optional":true,"default":true},"runtime_version":{"type":"string","optional":true,"default":"~1"},"unauthenticated_action":{"type":"string","optional":true,"default":"RedirectToLoginPage"}},"block_types":{"active_directory_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_applications":{"type":["list","string"],"optional":true},"allowed_audiences":{"type":["list","string"],"optional":true},"allowed_groups":{"type":["list","string"],"optional":true},"allowed_identities":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_certificate_thumbprint":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.active_directory_v2.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.active_directory_v2.0.client_secret_certificate_thumbprint"]},"jwt_allowed_client_applications":{"type":["list","string"],"optional":true},"jwt_allowed_groups":{"type":["list","string"],"optional":true},"login_parameters":{"type":["map","string"],"optional":true},"tenant_auth_endpoint":{"type":"string","required":true},"www_authentication_disabled":{"type":"bool","optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"apple_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"computed":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"azure_static_web_app_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"custom_oidc_v2":{"nesting_mode":3,"block":{"attributes":{"authorisation_endpoint":{"type":"string","computed":true},"certification_uri":{"type":"string","computed":true},"client_credential_method":{"type":"string","computed":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","computed":true},"issuer_endpoint":{"type":"string","computed":true},"name":{"type":"string","required":true},"name_claim_type":{"type":"string","optional":true},"openid_configuration_endpoint":{"type":"string","required":true},"scopes":{"type":["list","string"],"optional":true},"token_endpoint":{"type":"string","computed":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"facebook_v2":{"nesting_mode":3,"block":{"attributes":{"app_id":{"type":"string","required":true},"app_secret_setting_name":{"type":"string","required":true},"graph_api_version":{"type":"string","optional":true,"computed":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"github_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"google_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"login":{"nesting_mode":3,"block":{"attributes":{"allowed_external_redirect_urls":{"type":["list","string"],"optional":true},"cookie_expiration_convention":{"type":"string","optional":true,"default":"FixedTime"},"cookie_expiration_time":{"type":"string","optional":true,"default":"08:00:00"},"logout_endpoint":{"type":"string","optional":true},"nonce_expiration_time":{"type":"string","optional":true,"default":"00:05:00"},"preserve_url_fragments_for_logins":{"type":"bool","optional":true,"default":false},"token_refresh_extension_time":{"type":"number","optional":true,"default":72},"token_store_enabled":{"type":"bool","optional":true,"default":false},"token_store_path":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.login.0.token_store_sas_setting_name"]},"token_store_sas_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.login.0.token_store_path"]},"validate_nonce":{"type":"bool","optional":true,"default":true}}},"required":true},"microsoft_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"twitter_v2":{"nesting_mode":3,"block":{"attributes":{"consumer_key":{"type":"string","required":true},"consumer_secret_setting_name":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]}}},"optional":true},"backup":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"storage_account_url":{"type":"string","required":true}},"block_types":{"schedule":{"nesting_mode":3,"block":{"attributes":{"frequency_interval":{"type":"number","required":true},"frequency_unit":{"type":"string","required":true},"keep_at_least_one_backup":{"type":"bool","optional":true,"default":false},"last_execution_time":{"type":"string","computed":true},"retention_period_days":{"type":"number","optional":true,"default":30},"start_time":{"type":"string","optional":true,"computed":true}}},"required":true}}},"optional":true},"connection_string":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"type":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"site_config":{"nesting_mode":3,"block":{"attributes":{"always_on":{"type":"bool","optional":true,"computed":true},"api_definition_url":{"type":"string","optional":true},"api_management_api_id":{"type":"string","optional":true},"app_command_line":{"type":"string","optional":true},"app_scale_limit":{"type":"number","optional":true,"computed":true},"application_insights_connection_string":{"type":"string","optional":true},"application_insights_key":{"type":"string","optional":true},"container_registry_managed_identity_client_id":{"type":"string","optional":true},"container_registry_use_managed_identity":{"type":"bool","optional":true,"default":false},"default_documents":{"type":["list","string"],"optional":true,"computed":true},"detailed_error_logging_enabled":{"type":"bool","computed":true},"elastic_instance_minimum":{"type":"number","optional":true,"computed":true},"ftps_state":{"type":"string","optional":true,"default":"Disabled"},"health_check_eviction_time_in_min":{"type":"number","optional":true,"required_with":["site_config.0.health_check_path"]},"health_check_path":{"type":"string","optional":true,"required_with":["site_config.0.health_check_eviction_time_in_min"]},"http2_enabled":{"type":"bool","optional":true,"default":false},"ip_restriction_default_action":{"type":"string","optional":true,"default":"Allow"},"linux_fx_version":{"type":"string","computed":true},"load_balancing_mode":{"type":"string","optional":true,"default":"LeastRequests"},"managed_pipeline_mode":{"type":"string","optional":true,"default":"Integrated"},"minimum_tls_version":{"type":"string","optional":true,"default":"1.2"},"pre_warmed_instance_count":{"type":"number","optional":true,"computed":true},"remote_debugging_enabled":{"type":"bool","optional":true,"default":false},"remote_debugging_version":{"type":"string","optional":true,"computed":true},"runtime_scale_monitoring_enabled":{"type":"bool","optional":true},"scm_ip_restriction_default_action":{"type":"string","optional":true,"default":"Allow"},"scm_minimum_tls_version":{"type":"string","optional":true,"default":"1.2"},"scm_type":{"type":"string","computed":true},"scm_use_main_ip_restriction":{"type":"bool","optional":true,"default":false},"use_32_bit_worker":{"type":"bool","optional":true,"default":false},"vnet_route_all_enabled":{"type":"bool","optional":true,"default":false},"websockets_enabled":{"type":"bool","optional":true,"default":false},"worker_count":{"type":"number","optional":true,"computed":true}},"block_types":{"app_service_logs":{"nesting_mode":3,"block":{"attributes":{"disk_quota_mb":{"type":"number","optional":true,"default":35},"retention_period_days":{"type":"number","optional":true}}},"optional":true},"application_stack":{"nesting_mode":3,"block":{"attributes":{"dotnet_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.docker","site_config.0.application_stack.0.use_custom_runtime"]},"java_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.docker","site_config.0.application_stack.0.use_custom_runtime"]},"node_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.docker","site_config.0.application_stack.0.use_custom_runtime"]},"powershell_core_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.docker","site_config.0.application_stack.0.use_custom_runtime"]},"python_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.docker","site_config.0.application_stack.0.use_custom_runtime"]},"use_custom_runtime":{"type":"bool","optional":true,"exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.docker","site_config.0.application_stack.0.use_custom_runtime"]},"use_dotnet_isolated_runtime":{"type":"bool","optional":true,"default":false,"conflicts_with":["site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.docker","site_config.0.application_stack.0.use_custom_runtime"]}},"block_types":{"docker":{"nesting_mode":3,"block":{"attributes":{"image_name":{"type":"string","required":true},"image_tag":{"type":"string","required":true},"registry_password":{"type":"string","optional":true},"registry_url":{"type":"string","required":true},"registry_username":{"type":"string","optional":true}}},"optional":true,"exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.docker","site_config.0.application_stack.0.use_custom_runtime"]}}},"optional":true},"cors":{"nesting_mode":3,"block":{"attributes":{"allowed_origins":{"type":["set","string"],"optional":true},"support_credentials":{"type":"bool","optional":true,"default":false}}},"optional":true},"ip_restriction":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"default":"Allow"},"description":{"type":"string","optional":true},"headers":{"type":["list",["object",{"x_azure_fdid":["list","string"],"x_fd_health_probe":["list","string"],"x_forwarded_for":["list","string"],"x_forwarded_host":["list","string"]}]],"optional":true},"ip_address":{"type":"string","optional":true},"name":{"type":"string","optional":true,"computed":true},"priority":{"type":"number","optional":true,"default":65000},"service_tag":{"type":"string","optional":true},"virtual_network_subnet_id":{"type":"string","optional":true}}},"optional":true},"scm_ip_restriction":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"default":"Allow"},"description":{"type":"string","optional":true},"headers":{"type":["list",["object",{"x_azure_fdid":["list","string"],"x_fd_health_probe":["list","string"],"x_forwarded_for":["list","string"],"x_forwarded_host":["list","string"]}]],"optional":true},"ip_address":{"type":"string","optional":true},"name":{"type":"string","optional":true,"computed":true},"priority":{"type":"number","optional":true,"default":65000},"service_tag":{"type":"string","optional":true},"virtual_network_subnet_id":{"type":"string","optional":true}}},"optional":true}}},"required":true},"sticky_settings":{"nesting_mode":3,"block":{"attributes":{"app_setting_names":{"type":["list","string"],"optional":true,"at_least_one_of":["sticky_settings.0.app_setting_names","sticky_settings.0.connection_string_names"]},"connection_string_names":{"type":["list","string"],"optional":true,"at_least_one_of":["sticky_settings.0.app_setting_names","sticky_settings.0.connection_string_names"]}}},"optional":true},"storage_account":{"nesting_mode":4,"block":{"attributes":{"access_key":{"type":"string","required":true},"account_name":{"type":"string","required":true},"mount_path":{"type":"string","optional":true},"name":{"type":"string","required":true},"share_name":{"type":"string","required":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_linux_function_app_slot":{"block":{"attributes":{"app_settings":{"type":["map","string"],"optional":true},"builtin_logging_enabled":{"type":"bool","optional":true,"default":true},"client_certificate_enabled":{"type":"bool","optional":true,"default":false},"client_certificate_exclusion_paths":{"type":"string","optional":true},"client_certificate_mode":{"type":"string","optional":true,"default":"Optional"},"content_share_force_disabled":{"type":"bool","optional":true,"default":false},"custom_domain_verification_id":{"type":"string","computed":true},"daily_memory_time_quota":{"type":"number","optional":true,"default":0},"default_hostname":{"type":"string","computed":true},"enabled":{"type":"bool","optional":true,"default":true},"ftp_publish_basic_authentication_enabled":{"type":"bool","optional":true,"default":true},"function_app_id":{"type":"string","required":true},"functions_extension_version":{"type":"string","optional":true,"default":"~4"},"hosting_environment_id":{"type":"string","computed":true},"https_only":{"type":"bool","optional":true,"default":false},"key_vault_reference_identity_id":{"type":"string","optional":true,"computed":true},"kind":{"type":"string","computed":true},"name":{"type":"string","required":true},"outbound_ip_address_list":{"type":["list","string"],"computed":true},"outbound_ip_addresses":{"type":"string","computed":true},"possible_outbound_ip_address_list":{"type":["list","string"],"computed":true},"possible_outbound_ip_addresses":{"type":"string","computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"service_plan_id":{"type":"string","optional":true},"site_credential":{"type":["list",["object",{"name":"string","password":"string"}]],"computed":true},"storage_account_access_key":{"type":"string","optional":true,"conflicts_with":["storage_uses_managed_identity","storage_key_vault_secret_id"]},"storage_account_name":{"type":"string","optional":true,"exactly_one_of":["storage_account_name","storage_key_vault_secret_id"]},"storage_key_vault_secret_id":{"type":"string","optional":true,"exactly_one_of":["storage_account_name","storage_key_vault_secret_id"]},"storage_uses_managed_identity":{"type":"bool","optional":true,"default":false,"conflicts_with":["storage_account_access_key","storage_key_vault_secret_id"]},"tags":{"type":["map","string"],"optional":true},"virtual_network_subnet_id":{"type":"string","optional":true},"vnet_image_pull_enabled":{"type":"bool","optional":true,"default":false},"webdeploy_publish_basic_authentication_enabled":{"type":"bool","optional":true,"default":true}},"block_types":{"auth_settings":{"nesting_mode":3,"block":{"attributes":{"additional_login_parameters":{"type":["map","string"],"optional":true},"allowed_external_redirect_urls":{"type":["list","string"],"optional":true,"computed":true},"default_provider":{"type":"string","optional":true,"computed":true},"enabled":{"type":"bool","required":true},"issuer":{"type":"string","optional":true},"runtime_version":{"type":"string","optional":true,"computed":true},"token_refresh_extension_hours":{"type":"number","optional":true,"default":72},"token_store_enabled":{"type":"bool","optional":true,"default":false},"unauthenticated_client_action":{"type":"string","optional":true,"computed":true}},"block_types":{"active_directory":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"conflicts_with":["auth_settings.0.active_directory.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings.0.active_directory.0.client_secret"]}}},"optional":true},"facebook":{"nesting_mode":3,"block":{"attributes":{"app_id":{"type":"string","required":true},"app_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.facebook.0.app_secret","auth_settings.0.facebook.0.app_secret_setting_name"]},"app_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.facebook.0.app_secret","auth_settings.0.facebook.0.app_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"github":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.github.0.client_secret","auth_settings.0.github.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.github.0.client_secret","auth_settings.0.github.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"google":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.google.0.client_secret","auth_settings.0.google.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.google.0.client_secret","auth_settings.0.google.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"microsoft":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.microsoft.0.client_secret","auth_settings.0.microsoft.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.microsoft.0.client_secret","auth_settings.0.microsoft.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"twitter":{"nesting_mode":3,"block":{"attributes":{"consumer_key":{"type":"string","required":true},"consumer_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.twitter.0.consumer_secret","auth_settings.0.twitter.0.consumer_secret_setting_name"]},"consumer_secret_setting_name":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"auth_settings_v2":{"nesting_mode":3,"block":{"attributes":{"auth_enabled":{"type":"bool","optional":true},"config_file_path":{"type":"string","optional":true},"default_provider":{"type":"string","optional":true},"excluded_paths":{"type":["list","string"],"optional":true},"forward_proxy_convention":{"type":"string","optional":true,"default":"NoProxy"},"forward_proxy_custom_host_header_name":{"type":"string","optional":true},"forward_proxy_custom_scheme_header_name":{"type":"string","optional":true},"http_route_api_prefix":{"type":"string","optional":true,"default":"/.auth"},"require_authentication":{"type":"bool","optional":true},"require_https":{"type":"bool","optional":true,"default":true},"runtime_version":{"type":"string","optional":true,"default":"~1"},"unauthenticated_action":{"type":"string","optional":true,"default":"RedirectToLoginPage"}},"block_types":{"active_directory_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_applications":{"type":["list","string"],"optional":true},"allowed_audiences":{"type":["list","string"],"optional":true},"allowed_groups":{"type":["list","string"],"optional":true},"allowed_identities":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_certificate_thumbprint":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.active_directory_v2.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.active_directory_v2.0.client_secret_certificate_thumbprint"]},"jwt_allowed_client_applications":{"type":["list","string"],"optional":true},"jwt_allowed_groups":{"type":["list","string"],"optional":true},"login_parameters":{"type":["map","string"],"optional":true},"tenant_auth_endpoint":{"type":"string","required":true},"www_authentication_disabled":{"type":"bool","optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"apple_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"computed":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"azure_static_web_app_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"custom_oidc_v2":{"nesting_mode":3,"block":{"attributes":{"authorisation_endpoint":{"type":"string","computed":true},"certification_uri":{"type":"string","computed":true},"client_credential_method":{"type":"string","computed":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","computed":true},"issuer_endpoint":{"type":"string","computed":true},"name":{"type":"string","required":true},"name_claim_type":{"type":"string","optional":true},"openid_configuration_endpoint":{"type":"string","required":true},"scopes":{"type":["list","string"],"optional":true},"token_endpoint":{"type":"string","computed":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"facebook_v2":{"nesting_mode":3,"block":{"attributes":{"app_id":{"type":"string","required":true},"app_secret_setting_name":{"type":"string","required":true},"graph_api_version":{"type":"string","optional":true,"computed":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"github_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"google_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"login":{"nesting_mode":3,"block":{"attributes":{"allowed_external_redirect_urls":{"type":["list","string"],"optional":true},"cookie_expiration_convention":{"type":"string","optional":true,"default":"FixedTime"},"cookie_expiration_time":{"type":"string","optional":true,"default":"08:00:00"},"logout_endpoint":{"type":"string","optional":true},"nonce_expiration_time":{"type":"string","optional":true,"default":"00:05:00"},"preserve_url_fragments_for_logins":{"type":"bool","optional":true,"default":false},"token_refresh_extension_time":{"type":"number","optional":true,"default":72},"token_store_enabled":{"type":"bool","optional":true,"default":false},"token_store_path":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.login.0.token_store_sas_setting_name"]},"token_store_sas_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.login.0.token_store_path"]},"validate_nonce":{"type":"bool","optional":true,"default":true}}},"required":true},"microsoft_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"twitter_v2":{"nesting_mode":3,"block":{"attributes":{"consumer_key":{"type":"string","required":true},"consumer_secret_setting_name":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]}}},"optional":true},"backup":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"storage_account_url":{"type":"string","required":true}},"block_types":{"schedule":{"nesting_mode":3,"block":{"attributes":{"frequency_interval":{"type":"number","required":true},"frequency_unit":{"type":"string","required":true},"keep_at_least_one_backup":{"type":"bool","optional":true,"default":false},"last_execution_time":{"type":"string","computed":true},"retention_period_days":{"type":"number","optional":true,"default":30},"start_time":{"type":"string","optional":true,"computed":true}}},"required":true}}},"optional":true},"connection_string":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"type":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"site_config":{"nesting_mode":3,"block":{"attributes":{"always_on":{"type":"bool","optional":true,"computed":true},"api_definition_url":{"type":"string","optional":true},"api_management_api_id":{"type":"string","optional":true},"app_command_line":{"type":"string","optional":true},"app_scale_limit":{"type":"number","optional":true,"computed":true},"application_insights_connection_string":{"type":"string","optional":true},"application_insights_key":{"type":"string","optional":true},"auto_swap_slot_name":{"type":"string","optional":true},"container_registry_managed_identity_client_id":{"type":"string","optional":true},"container_registry_use_managed_identity":{"type":"bool","optional":true,"default":false},"default_documents":{"type":["list","string"],"optional":true,"computed":true},"detailed_error_logging_enabled":{"type":"bool","computed":true},"elastic_instance_minimum":{"type":"number","optional":true,"computed":true},"ftps_state":{"type":"string","optional":true,"default":"Disabled"},"health_check_eviction_time_in_min":{"type":"number","optional":true,"default":0},"health_check_path":{"type":"string","optional":true},"http2_enabled":{"type":"bool","optional":true,"default":false},"ip_restriction_default_action":{"type":"string","optional":true,"default":"Allow"},"linux_fx_version":{"type":"string","computed":true},"load_balancing_mode":{"type":"string","optional":true,"default":"LeastRequests"},"managed_pipeline_mode":{"type":"string","optional":true,"default":"Integrated"},"minimum_tls_version":{"type":"string","optional":true,"default":"1.2"},"pre_warmed_instance_count":{"type":"number","optional":true,"computed":true},"remote_debugging_enabled":{"type":"bool","optional":true,"default":false},"remote_debugging_version":{"type":"string","optional":true,"computed":true},"runtime_scale_monitoring_enabled":{"type":"bool","optional":true},"scm_ip_restriction_default_action":{"type":"string","optional":true,"default":"Allow"},"scm_minimum_tls_version":{"type":"string","optional":true,"default":"1.2"},"scm_type":{"type":"string","computed":true},"scm_use_main_ip_restriction":{"type":"bool","optional":true,"default":false},"use_32_bit_worker":{"type":"bool","optional":true,"default":false},"vnet_route_all_enabled":{"type":"bool","optional":true,"default":false},"websockets_enabled":{"type":"bool","optional":true,"default":false},"worker_count":{"type":"number","optional":true,"computed":true}},"block_types":{"app_service_logs":{"nesting_mode":3,"block":{"attributes":{"disk_quota_mb":{"type":"number","optional":true,"default":35},"retention_period_days":{"type":"number","optional":true}}},"optional":true},"application_stack":{"nesting_mode":3,"block":{"attributes":{"dotnet_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.docker","site_config.0.application_stack.0.use_custom_runtime"]},"java_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.docker","site_config.0.application_stack.0.use_custom_runtime"]},"node_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.docker","site_config.0.application_stack.0.use_custom_runtime"]},"powershell_core_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.docker","site_config.0.application_stack.0.use_custom_runtime"]},"python_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.docker","site_config.0.application_stack.0.use_custom_runtime"]},"use_custom_runtime":{"type":"bool","optional":true,"exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.docker","site_config.0.application_stack.0.use_custom_runtime"]},"use_dotnet_isolated_runtime":{"type":"bool","optional":true,"default":false,"conflicts_with":["site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.docker","site_config.0.application_stack.0.use_custom_runtime"]}},"block_types":{"docker":{"nesting_mode":3,"block":{"attributes":{"image_name":{"type":"string","required":true},"image_tag":{"type":"string","required":true},"registry_password":{"type":"string","optional":true},"registry_url":{"type":"string","required":true},"registry_username":{"type":"string","optional":true}}},"optional":true,"exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.docker","site_config.0.application_stack.0.use_custom_runtime"]}}},"optional":true},"cors":{"nesting_mode":3,"block":{"attributes":{"allowed_origins":{"type":["set","string"],"optional":true},"support_credentials":{"type":"bool","optional":true,"default":false}}},"optional":true},"ip_restriction":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"default":"Allow"},"description":{"type":"string","optional":true},"headers":{"type":["list",["object",{"x_azure_fdid":["list","string"],"x_fd_health_probe":["list","string"],"x_forwarded_for":["list","string"],"x_forwarded_host":["list","string"]}]],"optional":true},"ip_address":{"type":"string","optional":true},"name":{"type":"string","optional":true,"computed":true},"priority":{"type":"number","optional":true,"default":65000},"service_tag":{"type":"string","optional":true},"virtual_network_subnet_id":{"type":"string","optional":true}}},"optional":true},"scm_ip_restriction":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"default":"Allow"},"description":{"type":"string","optional":true},"headers":{"type":["list",["object",{"x_azure_fdid":["list","string"],"x_fd_health_probe":["list","string"],"x_forwarded_for":["list","string"],"x_forwarded_host":["list","string"]}]],"optional":true},"ip_address":{"type":"string","optional":true},"name":{"type":"string","optional":true,"computed":true},"priority":{"type":"number","optional":true,"default":65000},"service_tag":{"type":"string","optional":true},"virtual_network_subnet_id":{"type":"string","optional":true}}},"optional":true}}},"required":true},"storage_account":{"nesting_mode":4,"block":{"attributes":{"access_key":{"type":"string","required":true},"account_name":{"type":"string","required":true},"mount_path":{"type":"string","optional":true},"name":{"type":"string","required":true},"share_name":{"type":"string","required":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_linux_virtual_machine":{"block":{"attributes":{"admin_password":{"type":"string","optional":true},"admin_username":{"type":"string","required":true},"allow_extension_operations":{"type":"bool","optional":true,"default":true},"availability_set_id":{"type":"string","optional":true,"conflicts_with":["capacity_reservation_group_id","virtual_machine_scale_set_id","zone"]},"bypass_platform_safety_checks_on_user_schedule_enabled":{"type":"bool","optional":true,"default":false},"capacity_reservation_group_id":{"type":"string","optional":true,"conflicts_with":["availability_set_id","proximity_placement_group_id"]},"computer_name":{"type":"string","optional":true,"computed":true},"custom_data":{"type":"string","optional":true},"dedicated_host_group_id":{"type":"string","optional":true,"conflicts_with":["dedicated_host_id"]},"dedicated_host_id":{"type":"string","optional":true,"conflicts_with":["dedicated_host_group_id"]},"disable_password_authentication":{"type":"bool","optional":true,"default":true},"disk_controller_type":{"type":"string","optional":true,"computed":true},"edge_zone":{"type":"string","optional":true},"encryption_at_host_enabled":{"type":"bool","optional":true},"eviction_policy":{"type":"string","optional":true},"extensions_time_budget":{"type":"string","optional":true,"default":"PT1H30M"},"license_type":{"type":"string","optional":true},"location":{"type":"string","required":true},"max_bid_price":{"type":"number","optional":true,"default":-1},"name":{"type":"string","required":true},"network_interface_ids":{"type":["list","string"],"required":true},"patch_assessment_mode":{"type":"string","optional":true,"default":"ImageDefault"},"patch_mode":{"type":"string","optional":true,"default":"ImageDefault"},"platform_fault_domain":{"type":"number","optional":true,"default":-1,"required_with":["virtual_machine_scale_set_id"]},"priority":{"type":"string","optional":true,"default":"Regular"},"private_ip_address":{"type":"string","computed":true},"private_ip_addresses":{"type":["list","string"],"computed":true},"provision_vm_agent":{"type":"bool","optional":true,"default":true},"proximity_placement_group_id":{"type":"string","optional":true,"conflicts_with":["capacity_reservation_group_id"]},"public_ip_address":{"type":"string","computed":true},"public_ip_addresses":{"type":["list","string"],"computed":true},"reboot_setting":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"secure_boot_enabled":{"type":"bool","optional":true},"size":{"type":"string","required":true},"source_image_id":{"type":"string","optional":true,"exactly_one_of":["source_image_id","source_image_reference"]},"tags":{"type":["map","string"],"optional":true},"user_data":{"type":"string","optional":true},"virtual_machine_id":{"type":"string","computed":true},"virtual_machine_scale_set_id":{"type":"string","optional":true,"conflicts_with":["availability_set_id"]},"vm_agent_platform_updates_enabled":{"type":"bool","optional":true,"default":false},"vtpm_enabled":{"type":"bool","optional":true},"zone":{"type":"string","optional":true}},"block_types":{"additional_capabilities":{"nesting_mode":3,"block":{"attributes":{"hibernation_enabled":{"type":"bool","optional":true,"default":false},"ultra_ssd_enabled":{"type":"bool","optional":true,"default":false}}},"optional":true},"admin_ssh_key":{"nesting_mode":4,"block":{"attributes":{"public_key":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true},"boot_diagnostics":{"nesting_mode":3,"block":{"attributes":{"storage_account_uri":{"type":"string","optional":true}}},"optional":true},"gallery_application":{"nesting_mode":3,"block":{"attributes":{"automatic_upgrade_enabled":{"type":"bool","optional":true,"default":false},"configuration_blob_uri":{"type":"string","optional":true},"order":{"type":"number","optional":true,"default":0},"tag":{"type":"string","optional":true},"treat_failure_as_deployment_failure_enabled":{"type":"bool","optional":true,"default":false},"version_id":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"os_disk":{"nesting_mode":3,"block":{"attributes":{"caching":{"type":"string","required":true},"disk_encryption_set_id":{"type":"string","optional":true,"conflicts_with":["os_disk.0.secure_vm_disk_encryption_set_id"]},"disk_size_gb":{"type":"number","optional":true,"computed":true},"name":{"type":"string","optional":true,"computed":true},"secure_vm_disk_encryption_set_id":{"type":"string","optional":true,"conflicts_with":["os_disk.0.disk_encryption_set_id"]},"security_encryption_type":{"type":"string","optional":true},"storage_account_type":{"type":"string","required":true},"write_accelerator_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"diff_disk_settings":{"nesting_mode":3,"block":{"attributes":{"option":{"type":"string","required":true},"placement":{"type":"string","optional":true,"default":"CacheDisk"}}},"optional":true}}},"required":true},"os_image_notification":{"nesting_mode":3,"block":{"attributes":{"timeout":{"type":"string","optional":true,"default":"PT15M"}}},"optional":true},"plan":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"product":{"type":"string","required":true},"publisher":{"type":"string","required":true}}},"optional":true},"secret":{"nesting_mode":3,"block":{"attributes":{"key_vault_id":{"type":"string","required":true}},"block_types":{"certificate":{"nesting_mode":4,"block":{"attributes":{"url":{"type":"string","required":true}}},"required":true}}},"optional":true},"source_image_reference":{"nesting_mode":3,"block":{"attributes":{"offer":{"type":"string","required":true},"publisher":{"type":"string","required":true},"sku":{"type":"string","required":true},"version":{"type":"string","required":true}}},"optional":true,"exactly_one_of":["source_image_id","source_image_reference"]},"termination_notification":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","required":true},"timeout":{"type":"string","optional":true,"default":"PT5M"}}},"optional":true,"computed":true}}}},"azurerm_linux_virtual_machine_scale_set":{"block":{"attributes":{"admin_password":{"type":"string","optional":true},"admin_username":{"type":"string","required":true},"capacity_reservation_group_id":{"type":"string","optional":true,"conflicts_with":["proximity_placement_group_id"]},"computer_name_prefix":{"type":"string","optional":true,"computed":true},"custom_data":{"type":"string","optional":true},"disable_password_authentication":{"type":"bool","optional":true,"default":true},"do_not_run_extensions_on_overprovisioned_machines":{"type":"bool","optional":true,"default":false},"edge_zone":{"type":"string","optional":true},"encryption_at_host_enabled":{"type":"bool","optional":true},"eviction_policy":{"type":"string","optional":true},"extension_operations_enabled":{"type":"bool","optional":true,"default":true},"extensions_time_budget":{"type":"string","optional":true,"default":"PT1H30M"},"health_probe_id":{"type":"string","optional":true},"host_group_id":{"type":"string","optional":true},"instances":{"type":"number","optional":true,"default":0},"location":{"type":"string","required":true},"max_bid_price":{"type":"number","optional":true,"default":-1},"name":{"type":"string","required":true},"overprovision":{"type":"bool","optional":true,"default":true},"platform_fault_domain_count":{"type":"number","optional":true,"computed":true},"priority":{"type":"string","optional":true,"default":"Regular"},"provision_vm_agent":{"type":"bool","optional":true,"default":true},"proximity_placement_group_id":{"type":"string","optional":true,"conflicts_with":["capacity_reservation_group_id"]},"resource_group_name":{"type":"string","required":true},"secure_boot_enabled":{"type":"bool","optional":true},"single_placement_group":{"type":"bool","optional":true,"default":true},"sku":{"type":"string","required":true},"source_image_id":{"type":"string","optional":true,"exactly_one_of":["source_image_id","source_image_reference"]},"tags":{"type":["map","string"],"optional":true},"unique_id":{"type":"string","computed":true},"upgrade_mode":{"type":"string","optional":true,"default":"Manual"},"user_data":{"type":"string","optional":true},"vtpm_enabled":{"type":"bool","optional":true},"zone_balance":{"type":"bool","optional":true,"default":false},"zones":{"type":["set","string"],"optional":true}},"block_types":{"additional_capabilities":{"nesting_mode":3,"block":{"attributes":{"ultra_ssd_enabled":{"type":"bool","optional":true,"default":false}}},"optional":true},"admin_ssh_key":{"nesting_mode":4,"block":{"attributes":{"public_key":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true},"automatic_instance_repair":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"computed":true},"enabled":{"type":"bool","required":true},"grace_period":{"type":"string","optional":true,"computed":true}}},"optional":true,"computed":true},"automatic_os_upgrade_policy":{"nesting_mode":3,"block":{"attributes":{"disable_automatic_rollback":{"type":"bool","required":true},"enable_automatic_os_upgrade":{"type":"bool","required":true}}},"optional":true},"boot_diagnostics":{"nesting_mode":3,"block":{"attributes":{"storage_account_uri":{"type":"string","optional":true}}},"optional":true},"data_disk":{"nesting_mode":3,"block":{"attributes":{"caching":{"type":"string","required":true},"create_option":{"type":"string","optional":true,"default":"Empty"},"disk_encryption_set_id":{"type":"string","optional":true},"disk_size_gb":{"type":"number","required":true},"lun":{"type":"number","required":true},"name":{"type":"string","optional":true},"storage_account_type":{"type":"string","required":true},"ultra_ssd_disk_iops_read_write":{"type":"number","optional":true,"computed":true},"ultra_ssd_disk_mbps_read_write":{"type":"number","optional":true,"computed":true},"write_accelerator_enabled":{"type":"bool","optional":true,"default":false}}},"optional":true},"extension":{"nesting_mode":4,"block":{"attributes":{"auto_upgrade_minor_version":{"type":"bool","optional":true,"default":true},"automatic_upgrade_enabled":{"type":"bool","optional":true,"default":false},"force_update_tag":{"type":"string","optional":true},"name":{"type":"string","required":true},"protected_settings":{"type":"string","optional":true},"provision_after_extensions":{"type":["list","string"],"optional":true},"publisher":{"type":"string","required":true},"settings":{"type":"string","optional":true},"type":{"type":"string","required":true},"type_handler_version":{"type":"string","required":true}},"block_types":{"protected_settings_from_key_vault":{"nesting_mode":3,"block":{"attributes":{"secret_url":{"type":"string","required":true},"source_vault_id":{"type":"string","required":true}}},"optional":true}}},"optional":true,"computed":true},"gallery_application":{"nesting_mode":3,"block":{"attributes":{"configuration_blob_uri":{"type":"string","optional":true},"order":{"type":"number","optional":true,"default":0},"tag":{"type":"string","optional":true},"version_id":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"network_interface":{"nesting_mode":3,"block":{"attributes":{"dns_servers":{"type":["list","string"],"optional":true},"enable_accelerated_networking":{"type":"bool","optional":true,"default":false},"enable_ip_forwarding":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"network_security_group_id":{"type":"string","optional":true},"primary":{"type":"bool","optional":true,"default":false}},"block_types":{"ip_configuration":{"nesting_mode":3,"block":{"attributes":{"application_gateway_backend_address_pool_ids":{"type":["set","string"],"optional":true},"application_security_group_ids":{"type":["set","string"],"optional":true},"load_balancer_backend_address_pool_ids":{"type":["set","string"],"optional":true},"load_balancer_inbound_nat_rules_ids":{"type":["set","string"],"optional":true},"name":{"type":"string","required":true},"primary":{"type":"bool","optional":true,"default":false},"subnet_id":{"type":"string","optional":true},"version":{"type":"string","optional":true,"default":"IPv4"}},"block_types":{"public_ip_address":{"nesting_mode":3,"block":{"attributes":{"domain_name_label":{"type":"string","optional":true},"idle_timeout_in_minutes":{"type":"number","optional":true,"computed":true},"name":{"type":"string","required":true},"public_ip_prefix_id":{"type":"string","optional":true},"version":{"type":"string","optional":true,"default":"IPv4"}},"block_types":{"ip_tag":{"nesting_mode":3,"block":{"attributes":{"tag":{"type":"string","required":true},"type":{"type":"string","required":true}}},"optional":true}}},"optional":true}}},"required":true}}},"required":true},"os_disk":{"nesting_mode":3,"block":{"attributes":{"caching":{"type":"string","required":true},"disk_encryption_set_id":{"type":"string","optional":true,"conflicts_with":["os_disk.0.secure_vm_disk_encryption_set_id"]},"disk_size_gb":{"type":"number","optional":true,"computed":true},"secure_vm_disk_encryption_set_id":{"type":"string","optional":true,"conflicts_with":["os_disk.0.disk_encryption_set_id"]},"security_encryption_type":{"type":"string","optional":true},"storage_account_type":{"type":"string","required":true},"write_accelerator_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"diff_disk_settings":{"nesting_mode":3,"block":{"attributes":{"option":{"type":"string","required":true},"placement":{"type":"string","optional":true,"default":"CacheDisk"}}},"optional":true}}},"required":true},"plan":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"product":{"type":"string","required":true},"publisher":{"type":"string","required":true}}},"optional":true},"rolling_upgrade_policy":{"nesting_mode":3,"block":{"attributes":{"cross_zone_upgrades_enabled":{"type":"bool","optional":true},"max_batch_instance_percent":{"type":"number","required":true},"max_unhealthy_instance_percent":{"type":"number","required":true},"max_unhealthy_upgraded_instance_percent":{"type":"number","required":true},"maximum_surge_instances_enabled":{"type":"bool","optional":true},"pause_time_between_batches":{"type":"string","required":true},"prioritize_unhealthy_instances_enabled":{"type":"bool","optional":true}}},"optional":true},"scale_in":{"nesting_mode":3,"block":{"attributes":{"force_deletion_enabled":{"type":"bool","optional":true,"default":false},"rule":{"type":"string","optional":true,"default":"Default"}}},"optional":true},"secret":{"nesting_mode":3,"block":{"attributes":{"key_vault_id":{"type":"string","required":true}},"block_types":{"certificate":{"nesting_mode":4,"block":{"attributes":{"url":{"type":"string","required":true}}},"required":true}}},"optional":true},"source_image_reference":{"nesting_mode":3,"block":{"attributes":{"offer":{"type":"string","required":true},"publisher":{"type":"string","required":true},"sku":{"type":"string","required":true},"version":{"type":"string","required":true}}},"optional":true,"exactly_one_of":["source_image_id","source_image_reference"]},"spot_restore":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":false},"timeout":{"type":"string","optional":true,"default":"PT1H"}}},"optional":true,"computed":true},"termination_notification":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","required":true},"timeout":{"type":"string","optional":true,"default":"PT5M"}}},"optional":true,"computed":true}}}},"azurerm_linux_web_app":{"block":{"attributes":{"app_settings":{"type":["map","string"],"optional":true},"client_affinity_enabled":{"type":"bool","optional":true,"default":false},"client_certificate_enabled":{"type":"bool","optional":true,"default":false},"client_certificate_exclusion_paths":{"type":"string","optional":true},"client_certificate_mode":{"type":"string","optional":true,"default":"Required"},"custom_domain_verification_id":{"type":"string","computed":true},"default_hostname":{"type":"string","computed":true},"enabled":{"type":"bool","optional":true,"default":true},"ftp_publish_basic_authentication_enabled":{"type":"bool","optional":true,"default":true},"hosting_environment_id":{"type":"string","computed":true},"https_only":{"type":"bool","optional":true,"default":false},"key_vault_reference_identity_id":{"type":"string","optional":true,"computed":true},"kind":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"outbound_ip_address_list":{"type":["list","string"],"computed":true},"outbound_ip_addresses":{"type":"string","computed":true},"possible_outbound_ip_address_list":{"type":["list","string"],"computed":true},"possible_outbound_ip_addresses":{"type":"string","computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"service_plan_id":{"type":"string","required":true},"site_credential":{"type":["list",["object",{"name":"string","password":"string"}]],"computed":true},"tags":{"type":["map","string"],"optional":true},"virtual_network_subnet_id":{"type":"string","optional":true},"webdeploy_publish_basic_authentication_enabled":{"type":"bool","optional":true,"default":true},"zip_deploy_file":{"type":"string","optional":true,"computed":true}},"block_types":{"auth_settings":{"nesting_mode":3,"block":{"attributes":{"additional_login_parameters":{"type":["map","string"],"optional":true},"allowed_external_redirect_urls":{"type":["list","string"],"optional":true,"computed":true},"default_provider":{"type":"string","optional":true,"computed":true},"enabled":{"type":"bool","required":true},"issuer":{"type":"string","optional":true},"runtime_version":{"type":"string","optional":true,"computed":true},"token_refresh_extension_hours":{"type":"number","optional":true,"default":72},"token_store_enabled":{"type":"bool","optional":true,"default":false},"unauthenticated_client_action":{"type":"string","optional":true,"computed":true}},"block_types":{"active_directory":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"conflicts_with":["auth_settings.0.active_directory.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings.0.active_directory.0.client_secret"]}}},"optional":true},"facebook":{"nesting_mode":3,"block":{"attributes":{"app_id":{"type":"string","required":true},"app_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.facebook.0.app_secret","auth_settings.0.facebook.0.app_secret_setting_name"]},"app_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.facebook.0.app_secret","auth_settings.0.facebook.0.app_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"github":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.github.0.client_secret","auth_settings.0.github.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.github.0.client_secret","auth_settings.0.github.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"google":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.google.0.client_secret","auth_settings.0.google.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.google.0.client_secret","auth_settings.0.google.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"microsoft":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.microsoft.0.client_secret","auth_settings.0.microsoft.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.microsoft.0.client_secret","auth_settings.0.microsoft.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"twitter":{"nesting_mode":3,"block":{"attributes":{"consumer_key":{"type":"string","required":true},"consumer_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.twitter.0.consumer_secret","auth_settings.0.twitter.0.consumer_secret_setting_name"]},"consumer_secret_setting_name":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"auth_settings_v2":{"nesting_mode":3,"block":{"attributes":{"auth_enabled":{"type":"bool","optional":true},"config_file_path":{"type":"string","optional":true},"default_provider":{"type":"string","optional":true},"excluded_paths":{"type":["list","string"],"optional":true},"forward_proxy_convention":{"type":"string","optional":true,"default":"NoProxy"},"forward_proxy_custom_host_header_name":{"type":"string","optional":true},"forward_proxy_custom_scheme_header_name":{"type":"string","optional":true},"http_route_api_prefix":{"type":"string","optional":true,"default":"/.auth"},"require_authentication":{"type":"bool","optional":true},"require_https":{"type":"bool","optional":true,"default":true},"runtime_version":{"type":"string","optional":true,"default":"~1"},"unauthenticated_action":{"type":"string","optional":true,"default":"RedirectToLoginPage"}},"block_types":{"active_directory_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_applications":{"type":["list","string"],"optional":true},"allowed_audiences":{"type":["list","string"],"optional":true},"allowed_groups":{"type":["list","string"],"optional":true},"allowed_identities":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_certificate_thumbprint":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.active_directory_v2.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.active_directory_v2.0.client_secret_certificate_thumbprint"]},"jwt_allowed_client_applications":{"type":["list","string"],"optional":true},"jwt_allowed_groups":{"type":["list","string"],"optional":true},"login_parameters":{"type":["map","string"],"optional":true},"tenant_auth_endpoint":{"type":"string","required":true},"www_authentication_disabled":{"type":"bool","optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"apple_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"computed":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"azure_static_web_app_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"custom_oidc_v2":{"nesting_mode":3,"block":{"attributes":{"authorisation_endpoint":{"type":"string","computed":true},"certification_uri":{"type":"string","computed":true},"client_credential_method":{"type":"string","computed":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","computed":true},"issuer_endpoint":{"type":"string","computed":true},"name":{"type":"string","required":true},"name_claim_type":{"type":"string","optional":true},"openid_configuration_endpoint":{"type":"string","required":true},"scopes":{"type":["list","string"],"optional":true},"token_endpoint":{"type":"string","computed":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"facebook_v2":{"nesting_mode":3,"block":{"attributes":{"app_id":{"type":"string","required":true},"app_secret_setting_name":{"type":"string","required":true},"graph_api_version":{"type":"string","optional":true,"computed":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"github_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"google_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"login":{"nesting_mode":3,"block":{"attributes":{"allowed_external_redirect_urls":{"type":["list","string"],"optional":true},"cookie_expiration_convention":{"type":"string","optional":true,"default":"FixedTime"},"cookie_expiration_time":{"type":"string","optional":true,"default":"08:00:00"},"logout_endpoint":{"type":"string","optional":true},"nonce_expiration_time":{"type":"string","optional":true,"default":"00:05:00"},"preserve_url_fragments_for_logins":{"type":"bool","optional":true,"default":false},"token_refresh_extension_time":{"type":"number","optional":true,"default":72},"token_store_enabled":{"type":"bool","optional":true,"default":false},"token_store_path":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.login.0.token_store_sas_setting_name"]},"token_store_sas_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.login.0.token_store_path"]},"validate_nonce":{"type":"bool","optional":true,"default":true}}},"required":true},"microsoft_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"twitter_v2":{"nesting_mode":3,"block":{"attributes":{"consumer_key":{"type":"string","required":true},"consumer_secret_setting_name":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]}}},"optional":true},"backup":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"storage_account_url":{"type":"string","required":true}},"block_types":{"schedule":{"nesting_mode":3,"block":{"attributes":{"frequency_interval":{"type":"number","required":true},"frequency_unit":{"type":"string","required":true},"keep_at_least_one_backup":{"type":"bool","optional":true,"default":false},"last_execution_time":{"type":"string","computed":true},"retention_period_days":{"type":"number","optional":true,"default":30},"start_time":{"type":"string","optional":true,"computed":true}}},"required":true}}},"optional":true},"connection_string":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"type":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"logs":{"nesting_mode":3,"block":{"attributes":{"detailed_error_messages":{"type":"bool","optional":true,"default":false},"failed_request_tracing":{"type":"bool","optional":true,"default":false}},"block_types":{"application_logs":{"nesting_mode":3,"block":{"attributes":{"file_system_level":{"type":"string","required":true}},"block_types":{"azure_blob_storage":{"nesting_mode":3,"block":{"attributes":{"level":{"type":"string","required":true},"retention_in_days":{"type":"number","required":true},"sas_url":{"type":"string","required":true}}},"optional":true}}},"optional":true},"http_logs":{"nesting_mode":3,"block":{"block_types":{"azure_blob_storage":{"nesting_mode":3,"block":{"attributes":{"retention_in_days":{"type":"number","optional":true,"default":0},"sas_url":{"type":"string","required":true}}},"optional":true,"conflicts_with":["logs.0.http_logs.0.file_system"]},"file_system":{"nesting_mode":3,"block":{"attributes":{"retention_in_days":{"type":"number","required":true},"retention_in_mb":{"type":"number","required":true}}},"optional":true,"conflicts_with":["logs.0.http_logs.0.azure_blob_storage"]}}},"optional":true}}},"optional":true},"site_config":{"nesting_mode":3,"block":{"attributes":{"always_on":{"type":"bool","optional":true,"default":true},"api_definition_url":{"type":"string","optional":true},"api_management_api_id":{"type":"string","optional":true},"app_command_line":{"type":"string","optional":true},"container_registry_managed_identity_client_id":{"type":"string","optional":true},"container_registry_use_managed_identity":{"type":"bool","optional":true,"default":false},"default_documents":{"type":["list","string"],"optional":true,"computed":true},"detailed_error_logging_enabled":{"type":"bool","computed":true},"ftps_state":{"type":"string","optional":true,"default":"Disabled"},"health_check_eviction_time_in_min":{"type":"number","optional":true,"required_with":["site_config.0.health_check_path"]},"health_check_path":{"type":"string","optional":true,"required_with":["site_config.0.health_check_eviction_time_in_min"]},"http2_enabled":{"type":"bool","optional":true,"default":false},"ip_restriction_default_action":{"type":"string","optional":true,"default":"Allow"},"linux_fx_version":{"type":"string","computed":true},"load_balancing_mode":{"type":"string","optional":true,"default":"LeastRequests"},"local_mysql_enabled":{"type":"bool","optional":true,"default":false},"managed_pipeline_mode":{"type":"string","optional":true,"default":"Integrated"},"minimum_tls_version":{"type":"string","optional":true,"default":"1.2"},"remote_debugging_enabled":{"type":"bool","optional":true,"default":false},"remote_debugging_version":{"type":"string","optional":true,"computed":true},"scm_ip_restriction_default_action":{"type":"string","optional":true,"default":"Allow"},"scm_minimum_tls_version":{"type":"string","optional":true,"default":"1.2"},"scm_type":{"type":"string","computed":true},"scm_use_main_ip_restriction":{"type":"bool","optional":true,"default":false},"use_32_bit_worker":{"type":"bool","optional":true,"default":true},"vnet_route_all_enabled":{"type":"bool","optional":true,"default":false},"websockets_enabled":{"type":"bool","optional":true,"default":false},"worker_count":{"type":"number","optional":true,"computed":true}},"block_types":{"application_stack":{"nesting_mode":3,"block":{"attributes":{"docker_image_name":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.ruby_version","site_config.0.application_stack.0.go_version"]},"docker_registry_password":{"type":"string","optional":true},"docker_registry_url":{"type":"string","optional":true,"required_with":["site_config.0.application_stack.0.docker_image_name"]},"docker_registry_username":{"type":"string","optional":true},"dotnet_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.ruby_version","site_config.0.application_stack.0.go_version"]},"go_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.ruby_version","site_config.0.application_stack.0.go_version"]},"java_server":{"type":"string","optional":true,"required_with":["site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.java_server_version"]},"java_server_version":{"type":"string","optional":true,"required_with":["site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.java_server"]},"java_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.ruby_version","site_config.0.application_stack.0.go_version"],"required_with":["site_config.0.application_stack.0.java_server_version","site_config.0.application_stack.0.java_server"]},"node_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.ruby_version","site_config.0.application_stack.0.go_version"]},"php_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.ruby_version","site_config.0.application_stack.0.go_version"]},"python_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.ruby_version","site_config.0.application_stack.0.go_version"]},"ruby_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.ruby_version","site_config.0.application_stack.0.go_version"]}}},"optional":true,"computed":true},"auto_heal_setting":{"nesting_mode":3,"block":{"block_types":{"action":{"nesting_mode":3,"block":{"attributes":{"action_type":{"type":"string","required":true},"minimum_process_execution_time":{"type":"string","optional":true,"computed":true}}},"optional":true},"trigger":{"nesting_mode":3,"block":{"block_types":{"requests":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true},"interval":{"type":"string","required":true}}},"optional":true},"slow_request":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true},"interval":{"type":"string","required":true},"time_taken":{"type":"string","required":true}}},"optional":true},"slow_request_with_path":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true},"interval":{"type":"string","required":true},"path":{"type":"string","optional":true},"time_taken":{"type":"string","required":true}}},"optional":true},"status_code":{"nesting_mode":4,"block":{"attributes":{"count":{"type":"number","required":true},"interval":{"type":"string","required":true},"path":{"type":"string","optional":true},"status_code_range":{"type":"string","required":true},"sub_status":{"type":"number","optional":true},"win32_status_code":{"type":"number","optional":true}}},"optional":true}}},"optional":true}}},"optional":true},"cors":{"nesting_mode":3,"block":{"attributes":{"allowed_origins":{"type":["set","string"],"optional":true},"support_credentials":{"type":"bool","optional":true,"default":false}}},"optional":true},"ip_restriction":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"default":"Allow"},"description":{"type":"string","optional":true},"headers":{"type":["list",["object",{"x_azure_fdid":["list","string"],"x_fd_health_probe":["list","string"],"x_forwarded_for":["list","string"],"x_forwarded_host":["list","string"]}]],"optional":true},"ip_address":{"type":"string","optional":true},"name":{"type":"string","optional":true,"computed":true},"priority":{"type":"number","optional":true,"default":65000},"service_tag":{"type":"string","optional":true},"virtual_network_subnet_id":{"type":"string","optional":true}}},"optional":true},"scm_ip_restriction":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"default":"Allow"},"description":{"type":"string","optional":true},"headers":{"type":["list",["object",{"x_azure_fdid":["list","string"],"x_fd_health_probe":["list","string"],"x_forwarded_for":["list","string"],"x_forwarded_host":["list","string"]}]],"optional":true},"ip_address":{"type":"string","optional":true},"name":{"type":"string","optional":true,"computed":true},"priority":{"type":"number","optional":true,"default":65000},"service_tag":{"type":"string","optional":true},"virtual_network_subnet_id":{"type":"string","optional":true}}},"optional":true}}},"required":true},"sticky_settings":{"nesting_mode":3,"block":{"attributes":{"app_setting_names":{"type":["list","string"],"optional":true,"at_least_one_of":["sticky_settings.0.app_setting_names","sticky_settings.0.connection_string_names"]},"connection_string_names":{"type":["list","string"],"optional":true,"at_least_one_of":["sticky_settings.0.app_setting_names","sticky_settings.0.connection_string_names"]}}},"optional":true},"storage_account":{"nesting_mode":4,"block":{"attributes":{"access_key":{"type":"string","required":true},"account_name":{"type":"string","required":true},"mount_path":{"type":"string","optional":true},"name":{"type":"string","required":true},"share_name":{"type":"string","required":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_linux_web_app_slot":{"block":{"attributes":{"app_metadata":{"type":["map","string"],"computed":true},"app_service_id":{"type":"string","required":true},"app_settings":{"type":["map","string"],"optional":true},"client_affinity_enabled":{"type":"bool","optional":true,"default":false},"client_certificate_enabled":{"type":"bool","optional":true,"default":false},"client_certificate_exclusion_paths":{"type":"string","optional":true},"client_certificate_mode":{"type":"string","optional":true,"default":"Required"},"custom_domain_verification_id":{"type":"string","computed":true},"default_hostname":{"type":"string","computed":true},"enabled":{"type":"bool","optional":true,"default":true},"ftp_publish_basic_authentication_enabled":{"type":"bool","optional":true,"default":true},"hosting_environment_id":{"type":"string","computed":true},"https_only":{"type":"bool","optional":true,"default":false},"key_vault_reference_identity_id":{"type":"string","optional":true,"computed":true},"kind":{"type":"string","computed":true},"name":{"type":"string","required":true},"outbound_ip_address_list":{"type":["list","string"],"computed":true},"outbound_ip_addresses":{"type":"string","computed":true},"possible_outbound_ip_address_list":{"type":["list","string"],"computed":true},"possible_outbound_ip_addresses":{"type":"string","computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"service_plan_id":{"type":"string","optional":true},"site_credential":{"type":["list",["object",{"name":"string","password":"string"}]],"computed":true},"tags":{"type":["map","string"],"optional":true},"virtual_network_subnet_id":{"type":"string","optional":true},"webdeploy_publish_basic_authentication_enabled":{"type":"bool","optional":true,"default":true},"zip_deploy_file":{"type":"string","optional":true,"computed":true}},"block_types":{"auth_settings":{"nesting_mode":3,"block":{"attributes":{"additional_login_parameters":{"type":["map","string"],"optional":true},"allowed_external_redirect_urls":{"type":["list","string"],"optional":true,"computed":true},"default_provider":{"type":"string","optional":true,"computed":true},"enabled":{"type":"bool","required":true},"issuer":{"type":"string","optional":true},"runtime_version":{"type":"string","optional":true,"computed":true},"token_refresh_extension_hours":{"type":"number","optional":true,"default":72},"token_store_enabled":{"type":"bool","optional":true,"default":false},"unauthenticated_client_action":{"type":"string","optional":true,"computed":true}},"block_types":{"active_directory":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"conflicts_with":["auth_settings.0.active_directory.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings.0.active_directory.0.client_secret"]}}},"optional":true},"facebook":{"nesting_mode":3,"block":{"attributes":{"app_id":{"type":"string","required":true},"app_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.facebook.0.app_secret","auth_settings.0.facebook.0.app_secret_setting_name"]},"app_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.facebook.0.app_secret","auth_settings.0.facebook.0.app_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"github":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.github.0.client_secret","auth_settings.0.github.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.github.0.client_secret","auth_settings.0.github.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"google":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.google.0.client_secret","auth_settings.0.google.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.google.0.client_secret","auth_settings.0.google.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"microsoft":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.microsoft.0.client_secret","auth_settings.0.microsoft.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.microsoft.0.client_secret","auth_settings.0.microsoft.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"twitter":{"nesting_mode":3,"block":{"attributes":{"consumer_key":{"type":"string","required":true},"consumer_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.twitter.0.consumer_secret","auth_settings.0.twitter.0.consumer_secret_setting_name"]},"consumer_secret_setting_name":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"auth_settings_v2":{"nesting_mode":3,"block":{"attributes":{"auth_enabled":{"type":"bool","optional":true},"config_file_path":{"type":"string","optional":true},"default_provider":{"type":"string","optional":true},"excluded_paths":{"type":["list","string"],"optional":true},"forward_proxy_convention":{"type":"string","optional":true,"default":"NoProxy"},"forward_proxy_custom_host_header_name":{"type":"string","optional":true},"forward_proxy_custom_scheme_header_name":{"type":"string","optional":true},"http_route_api_prefix":{"type":"string","optional":true,"default":"/.auth"},"require_authentication":{"type":"bool","optional":true},"require_https":{"type":"bool","optional":true,"default":true},"runtime_version":{"type":"string","optional":true,"default":"~1"},"unauthenticated_action":{"type":"string","optional":true,"default":"RedirectToLoginPage"}},"block_types":{"active_directory_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_applications":{"type":["list","string"],"optional":true},"allowed_audiences":{"type":["list","string"],"optional":true},"allowed_groups":{"type":["list","string"],"optional":true},"allowed_identities":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_certificate_thumbprint":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.active_directory_v2.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.active_directory_v2.0.client_secret_certificate_thumbprint"]},"jwt_allowed_client_applications":{"type":["list","string"],"optional":true},"jwt_allowed_groups":{"type":["list","string"],"optional":true},"login_parameters":{"type":["map","string"],"optional":true},"tenant_auth_endpoint":{"type":"string","required":true},"www_authentication_disabled":{"type":"bool","optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"apple_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"computed":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"azure_static_web_app_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"custom_oidc_v2":{"nesting_mode":3,"block":{"attributes":{"authorisation_endpoint":{"type":"string","computed":true},"certification_uri":{"type":"string","computed":true},"client_credential_method":{"type":"string","computed":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","computed":true},"issuer_endpoint":{"type":"string","computed":true},"name":{"type":"string","required":true},"name_claim_type":{"type":"string","optional":true},"openid_configuration_endpoint":{"type":"string","required":true},"scopes":{"type":["list","string"],"optional":true},"token_endpoint":{"type":"string","computed":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"facebook_v2":{"nesting_mode":3,"block":{"attributes":{"app_id":{"type":"string","required":true},"app_secret_setting_name":{"type":"string","required":true},"graph_api_version":{"type":"string","optional":true,"computed":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"github_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"google_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"login":{"nesting_mode":3,"block":{"attributes":{"allowed_external_redirect_urls":{"type":["list","string"],"optional":true},"cookie_expiration_convention":{"type":"string","optional":true,"default":"FixedTime"},"cookie_expiration_time":{"type":"string","optional":true,"default":"08:00:00"},"logout_endpoint":{"type":"string","optional":true},"nonce_expiration_time":{"type":"string","optional":true,"default":"00:05:00"},"preserve_url_fragments_for_logins":{"type":"bool","optional":true,"default":false},"token_refresh_extension_time":{"type":"number","optional":true,"default":72},"token_store_enabled":{"type":"bool","optional":true,"default":false},"token_store_path":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.login.0.token_store_sas_setting_name"]},"token_store_sas_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.login.0.token_store_path"]},"validate_nonce":{"type":"bool","optional":true,"default":true}}},"required":true},"microsoft_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"twitter_v2":{"nesting_mode":3,"block":{"attributes":{"consumer_key":{"type":"string","required":true},"consumer_secret_setting_name":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]}}},"optional":true},"backup":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"storage_account_url":{"type":"string","required":true}},"block_types":{"schedule":{"nesting_mode":3,"block":{"attributes":{"frequency_interval":{"type":"number","required":true},"frequency_unit":{"type":"string","required":true},"keep_at_least_one_backup":{"type":"bool","optional":true,"default":false},"last_execution_time":{"type":"string","computed":true},"retention_period_days":{"type":"number","optional":true,"default":30},"start_time":{"type":"string","optional":true,"computed":true}}},"required":true}}},"optional":true},"connection_string":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"type":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"logs":{"nesting_mode":3,"block":{"attributes":{"detailed_error_messages":{"type":"bool","optional":true,"default":false},"failed_request_tracing":{"type":"bool","optional":true,"default":false}},"block_types":{"application_logs":{"nesting_mode":3,"block":{"attributes":{"file_system_level":{"type":"string","required":true}},"block_types":{"azure_blob_storage":{"nesting_mode":3,"block":{"attributes":{"level":{"type":"string","required":true},"retention_in_days":{"type":"number","required":true},"sas_url":{"type":"string","required":true}}},"optional":true}}},"optional":true},"http_logs":{"nesting_mode":3,"block":{"block_types":{"azure_blob_storage":{"nesting_mode":3,"block":{"attributes":{"retention_in_days":{"type":"number","optional":true,"default":0},"sas_url":{"type":"string","required":true}}},"optional":true,"conflicts_with":["logs.0.http_logs.0.file_system"]},"file_system":{"nesting_mode":3,"block":{"attributes":{"retention_in_days":{"type":"number","required":true},"retention_in_mb":{"type":"number","required":true}}},"optional":true,"conflicts_with":["logs.0.http_logs.0.azure_blob_storage"]}}},"optional":true}}},"optional":true},"site_config":{"nesting_mode":3,"block":{"attributes":{"always_on":{"type":"bool","optional":true,"default":true},"api_definition_url":{"type":"string","optional":true},"api_management_api_id":{"type":"string","optional":true},"app_command_line":{"type":"string","optional":true},"auto_swap_slot_name":{"type":"string","optional":true},"container_registry_managed_identity_client_id":{"type":"string","optional":true},"container_registry_use_managed_identity":{"type":"bool","optional":true,"default":false},"default_documents":{"type":["list","string"],"optional":true,"computed":true},"detailed_error_logging_enabled":{"type":"bool","computed":true},"ftps_state":{"type":"string","optional":true,"default":"Disabled"},"health_check_eviction_time_in_min":{"type":"number","optional":true,"required_with":["site_config.0.health_check_path"]},"health_check_path":{"type":"string","optional":true,"required_with":["site_config.0.health_check_eviction_time_in_min"]},"http2_enabled":{"type":"bool","optional":true,"default":false},"ip_restriction_default_action":{"type":"string","optional":true,"default":"Allow"},"linux_fx_version":{"type":"string","computed":true},"load_balancing_mode":{"type":"string","optional":true,"default":"LeastRequests"},"local_mysql_enabled":{"type":"bool","optional":true,"default":false},"managed_pipeline_mode":{"type":"string","optional":true,"default":"Integrated"},"minimum_tls_version":{"type":"string","optional":true,"default":"1.2"},"remote_debugging_enabled":{"type":"bool","optional":true,"default":false},"remote_debugging_version":{"type":"string","optional":true,"computed":true},"scm_ip_restriction_default_action":{"type":"string","optional":true,"default":"Allow"},"scm_minimum_tls_version":{"type":"string","optional":true,"default":"1.2"},"scm_type":{"type":"string","computed":true},"scm_use_main_ip_restriction":{"type":"bool","optional":true,"default":false},"use_32_bit_worker":{"type":"bool","optional":true,"default":true},"vnet_route_all_enabled":{"type":"bool","optional":true,"default":false},"websockets_enabled":{"type":"bool","optional":true,"default":false},"worker_count":{"type":"number","optional":true,"computed":true}},"block_types":{"application_stack":{"nesting_mode":3,"block":{"attributes":{"docker_image_name":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.ruby_version","site_config.0.application_stack.0.go_version"]},"docker_registry_password":{"type":"string","optional":true},"docker_registry_url":{"type":"string","optional":true,"required_with":["site_config.0.application_stack.0.docker_image_name"]},"docker_registry_username":{"type":"string","optional":true},"dotnet_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.ruby_version","site_config.0.application_stack.0.go_version"]},"go_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.ruby_version","site_config.0.application_stack.0.go_version"]},"java_server":{"type":"string","optional":true,"required_with":["site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.java_server_version"]},"java_server_version":{"type":"string","optional":true,"required_with":["site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.java_server"]},"java_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.ruby_version","site_config.0.application_stack.0.go_version"],"required_with":["site_config.0.application_stack.0.java_server_version","site_config.0.application_stack.0.java_server"]},"node_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.ruby_version","site_config.0.application_stack.0.go_version"]},"php_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.ruby_version","site_config.0.application_stack.0.go_version"]},"python_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.ruby_version","site_config.0.application_stack.0.go_version"]},"ruby_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.ruby_version","site_config.0.application_stack.0.go_version"]}}},"optional":true,"computed":true},"auto_heal_setting":{"nesting_mode":3,"block":{"block_types":{"action":{"nesting_mode":3,"block":{"attributes":{"action_type":{"type":"string","required":true},"minimum_process_execution_time":{"type":"string","optional":true,"computed":true}}},"optional":true},"trigger":{"nesting_mode":3,"block":{"block_types":{"requests":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true},"interval":{"type":"string","required":true}}},"optional":true},"slow_request":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true},"interval":{"type":"string","required":true},"time_taken":{"type":"string","required":true}}},"optional":true},"slow_request_with_path":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true},"interval":{"type":"string","required":true},"path":{"type":"string","optional":true},"time_taken":{"type":"string","required":true}}},"optional":true},"status_code":{"nesting_mode":4,"block":{"attributes":{"count":{"type":"number","required":true},"interval":{"type":"string","required":true},"path":{"type":"string","optional":true},"status_code_range":{"type":"string","required":true},"sub_status":{"type":"number","optional":true},"win32_status_code":{"type":"number","optional":true}}},"optional":true}}},"optional":true}}},"optional":true},"cors":{"nesting_mode":3,"block":{"attributes":{"allowed_origins":{"type":["set","string"],"optional":true},"support_credentials":{"type":"bool","optional":true,"default":false}}},"optional":true},"ip_restriction":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"default":"Allow"},"description":{"type":"string","optional":true},"headers":{"type":["list",["object",{"x_azure_fdid":["list","string"],"x_fd_health_probe":["list","string"],"x_forwarded_for":["list","string"],"x_forwarded_host":["list","string"]}]],"optional":true},"ip_address":{"type":"string","optional":true},"name":{"type":"string","optional":true,"computed":true},"priority":{"type":"number","optional":true,"default":65000},"service_tag":{"type":"string","optional":true},"virtual_network_subnet_id":{"type":"string","optional":true}}},"optional":true},"scm_ip_restriction":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"default":"Allow"},"description":{"type":"string","optional":true},"headers":{"type":["list",["object",{"x_azure_fdid":["list","string"],"x_fd_health_probe":["list","string"],"x_forwarded_for":["list","string"],"x_forwarded_host":["list","string"]}]],"optional":true},"ip_address":{"type":"string","optional":true},"name":{"type":"string","optional":true,"computed":true},"priority":{"type":"number","optional":true,"default":65000},"service_tag":{"type":"string","optional":true},"virtual_network_subnet_id":{"type":"string","optional":true}}},"optional":true}}},"required":true},"storage_account":{"nesting_mode":4,"block":{"attributes":{"access_key":{"type":"string","required":true},"account_name":{"type":"string","required":true},"mount_path":{"type":"string","optional":true},"name":{"type":"string","required":true},"share_name":{"type":"string","required":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_load_test":{"block":{"attributes":{"data_plane_uri":{"type":"string","computed":true},"description":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"encryption":{"nesting_mode":3,"block":{"attributes":{"key_url":{"type":"string","required":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_id":{"type":"string","required":true},"type":{"type":"string","required":true}}},"required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_local_network_gateway":{"block":{"attributes":{"address_space":{"type":["list","string"],"optional":true},"gateway_address":{"type":"string","optional":true,"exactly_one_of":["gateway_address","gateway_fqdn"]},"gateway_fqdn":{"type":"string","optional":true,"exactly_one_of":["gateway_address","gateway_fqdn"]},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"bgp_settings":{"nesting_mode":3,"block":{"attributes":{"asn":{"type":"number","required":true},"bgp_peering_address":{"type":"string","required":true},"peer_weight":{"type":"number","optional":true}}},"optional":true}}}},"azurerm_log_analytics_cluster":{"block":{"attributes":{"cluster_id":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"size_gb":{"type":"number","optional":true,"default":100},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"required":true}}}},"azurerm_log_analytics_cluster_customer_managed_key":{"block":{"attributes":{"key_vault_key_id":{"type":"string","required":true},"log_analytics_cluster_id":{"type":"string","required":true}}}},"azurerm_log_analytics_data_export_rule":{"block":{"attributes":{"destination_resource_id":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":false},"export_rule_id":{"type":"string","computed":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"table_names":{"type":["set","string"],"required":true},"workspace_resource_id":{"type":"string","required":true}}}},"azurerm_log_analytics_datasource_windows_event":{"block":{"attributes":{"event_log_name":{"type":"string","required":true},"event_types":{"type":["set","string"],"required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"workspace_name":{"type":"string","required":true}}}},"azurerm_log_analytics_datasource_windows_performance_counter":{"block":{"attributes":{"counter_name":{"type":"string","required":true},"instance_name":{"type":"string","required":true},"interval_seconds":{"type":"number","required":true},"name":{"type":"string","required":true},"object_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"workspace_name":{"type":"string","required":true}}}},"azurerm_log_analytics_linked_service":{"block":{"attributes":{"name":{"type":"string","computed":true},"read_access_id":{"type":"string","optional":true,"computed":true,"exactly_one_of":["read_access_id","write_access_id"]},"resource_group_name":{"type":"string","required":true},"workspace_id":{"type":"string","required":true},"write_access_id":{"type":"string","optional":true,"exactly_one_of":["read_access_id","write_access_id"]}}}},"azurerm_log_analytics_linked_storage_account":{"block":{"attributes":{"data_source_type":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"storage_account_ids":{"type":["set","string"],"required":true},"workspace_resource_id":{"type":"string","required":true}}}},"azurerm_log_analytics_query_pack":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_log_analytics_query_pack_query":{"block":{"attributes":{"additional_settings_json":{"type":"string","optional":true},"body":{"type":"string","required":true},"categories":{"type":["list","string"],"optional":true},"description":{"type":"string","optional":true},"display_name":{"type":"string","required":true},"name":{"type":"string","optional":true,"computed":true},"query_pack_id":{"type":"string","required":true},"resource_types":{"type":["list","string"],"optional":true},"solutions":{"type":["list","string"],"optional":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_log_analytics_saved_search":{"block":{"attributes":{"category":{"type":"string","required":true},"display_name":{"type":"string","required":true},"function_alias":{"type":"string","optional":true},"function_parameters":{"type":["list","string"],"optional":true},"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true},"query":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_log_analytics_solution":{"block":{"attributes":{"location":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"solution_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"workspace_name":{"type":"string","required":true},"workspace_resource_id":{"type":"string","required":true}},"block_types":{"plan":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","computed":true},"product":{"type":"string","required":true},"promotion_code":{"type":"string","optional":true},"publisher":{"type":"string","required":true}}},"required":true}}}},"azurerm_log_analytics_storage_insights":{"block":{"attributes":{"blob_container_names":{"type":["set","string"],"optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"storage_account_id":{"type":"string","required":true},"storage_account_key":{"type":"string","required":true},"table_names":{"type":["set","string"],"optional":true},"workspace_id":{"type":"string","required":true}}}},"azurerm_log_analytics_workspace":{"block":{"attributes":{"allow_resource_only_permissions":{"type":"bool","optional":true,"default":true},"cmk_for_query_forced":{"type":"bool","optional":true},"daily_quota_gb":{"type":"number","optional":true,"default":-1},"data_collection_rule_id":{"type":"string","optional":true},"immediate_data_purge_on_30_days_enabled":{"type":"bool","optional":true},"internet_ingestion_enabled":{"type":"bool","optional":true,"default":true},"internet_query_enabled":{"type":"bool","optional":true,"default":true},"local_authentication_disabled":{"type":"bool","optional":true,"default":false},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"primary_shared_key":{"type":"string","computed":true},"reservation_capacity_in_gb_per_day":{"type":"number","optional":true},"resource_group_name":{"type":"string","required":true},"retention_in_days":{"type":"number","optional":true,"computed":true},"secondary_shared_key":{"type":"string","computed":true},"sku":{"type":"string","optional":true,"computed":true},"tags":{"type":["map","string"],"optional":true},"workspace_id":{"type":"string","computed":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_log_analytics_workspace_table":{"block":{"attributes":{"name":{"type":"string","required":true},"plan":{"type":"string","optional":true,"default":"Analytics"},"retention_in_days":{"type":"number","optional":true},"total_retention_in_days":{"type":"number","optional":true},"workspace_id":{"type":"string","required":true}}}},"azurerm_logic_app_action_custom":{"block":{"attributes":{"body":{"type":"string","required":true},"logic_app_id":{"type":"string","required":true},"name":{"type":"string","required":true}}}},"azurerm_logic_app_action_http":{"block":{"attributes":{"body":{"type":"string","optional":true},"headers":{"type":["map","string"],"optional":true},"logic_app_id":{"type":"string","required":true},"method":{"type":"string","required":true},"name":{"type":"string","required":true},"queries":{"type":["map","string"],"optional":true},"uri":{"type":"string","required":true}},"block_types":{"run_after":{"nesting_mode":4,"block":{"attributes":{"action_name":{"type":"string","required":true},"action_result":{"type":"string","required":true}}},"optional":true}}}},"azurerm_logic_app_integration_account":{"block":{"attributes":{"integration_service_environment_id":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_logic_app_integration_account_agreement":{"block":{"attributes":{"agreement_type":{"type":"string","required":true},"content":{"type":"string","required":true},"guest_partner_name":{"type":"string","required":true},"host_partner_name":{"type":"string","required":true},"integration_account_name":{"type":"string","required":true},"metadata":{"type":["map","string"],"optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}},"block_types":{"guest_identity":{"nesting_mode":3,"block":{"attributes":{"qualifier":{"type":"string","required":true},"value":{"type":"string","required":true}}},"required":true},"host_identity":{"nesting_mode":3,"block":{"attributes":{"qualifier":{"type":"string","required":true},"value":{"type":"string","required":true}}},"required":true}}}},"azurerm_logic_app_integration_account_assembly":{"block":{"attributes":{"assembly_name":{"type":"string","required":true},"assembly_version":{"type":"string","optional":true,"default":"0.0.0.0"},"content":{"type":"string","optional":true,"at_least_one_of":["content","content_link_uri"]},"content_link_uri":{"type":"string","optional":true,"at_least_one_of":["content","content_link_uri"]},"integration_account_name":{"type":"string","required":true},"metadata":{"type":["map","string"],"optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_logic_app_integration_account_batch_configuration":{"block":{"attributes":{"batch_group_name":{"type":"string","required":true},"integration_account_name":{"type":"string","required":true},"metadata":{"type":["map","string"],"optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}},"block_types":{"release_criteria":{"nesting_mode":3,"block":{"attributes":{"batch_size":{"type":"number","optional":true,"at_least_one_of":["release_criteria.0.batch_size","release_criteria.0.message_count","release_criteria.0.recurrence"]},"message_count":{"type":"number","optional":true,"at_least_one_of":["release_criteria.0.batch_size","release_criteria.0.message_count","release_criteria.0.recurrence"]}},"block_types":{"recurrence":{"nesting_mode":3,"block":{"attributes":{"end_time":{"type":"string","optional":true},"frequency":{"type":"string","required":true},"interval":{"type":"number","required":true},"start_time":{"type":"string","optional":true},"time_zone":{"type":"string","optional":true}},"block_types":{"schedule":{"nesting_mode":3,"block":{"attributes":{"hours":{"type":["set","number"],"optional":true},"minutes":{"type":["set","number"],"optional":true},"month_days":{"type":["set","number"],"optional":true,"conflicts_with":["release_criteria.0.recurrence.0.schedule.0.week_days"]},"week_days":{"type":["set","string"],"optional":true,"conflicts_with":["release_criteria.0.recurrence.0.schedule.0.month_days","release_criteria.0.recurrence.0.schedule.0.monthly"]}},"block_types":{"monthly":{"nesting_mode":4,"block":{"attributes":{"week":{"type":"number","required":true},"weekday":{"type":"string","required":true}}},"optional":true,"conflicts_with":["release_criteria.0.recurrence.0.schedule.0.week_days"]}}},"optional":true}}},"optional":true,"at_least_one_of":["release_criteria.0.batch_size","release_criteria.0.message_count","release_criteria.0.recurrence"]}}},"required":true}}}},"azurerm_logic_app_integration_account_certificate":{"block":{"attributes":{"integration_account_name":{"type":"string","required":true},"metadata":{"type":"string","optional":true},"name":{"type":"string","required":true},"public_certificate":{"type":"string","optional":true,"at_least_one_of":["key_vault_key"]},"resource_group_name":{"type":"string","required":true}},"block_types":{"key_vault_key":{"nesting_mode":3,"block":{"attributes":{"key_name":{"type":"string","required":true},"key_vault_id":{"type":"string","required":true},"key_version":{"type":"string","optional":true}}},"optional":true,"at_least_one_of":["public_certificate"]}}}},"azurerm_logic_app_integration_account_map":{"block":{"attributes":{"content":{"type":"string","required":true},"integration_account_name":{"type":"string","required":true},"map_type":{"type":"string","required":true},"metadata":{"type":["map","string"],"optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_logic_app_integration_account_partner":{"block":{"attributes":{"integration_account_name":{"type":"string","required":true},"metadata":{"type":"string","optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}},"block_types":{"business_identity":{"nesting_mode":4,"block":{"attributes":{"qualifier":{"type":"string","required":true},"value":{"type":"string","required":true}}},"required":true}}}},"azurerm_logic_app_integration_account_schema":{"block":{"attributes":{"content":{"type":"string","required":true},"file_name":{"type":"string","optional":true},"integration_account_name":{"type":"string","required":true},"metadata":{"type":"string","optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_logic_app_integration_account_session":{"block":{"attributes":{"content":{"type":"string","required":true},"integration_account_name":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_logic_app_standard":{"block":{"attributes":{"app_service_plan_id":{"type":"string","required":true},"app_settings":{"type":["map","string"],"optional":true,"computed":true},"bundle_version":{"type":"string","optional":true,"default":"[1.*, 2.0.0)"},"client_affinity_enabled":{"type":"bool","optional":true,"computed":true},"client_certificate_mode":{"type":"string","optional":true},"custom_domain_verification_id":{"type":"string","computed":true},"default_hostname":{"type":"string","computed":true},"enabled":{"type":"bool","optional":true,"default":true},"https_only":{"type":"bool","optional":true,"default":false},"kind":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"outbound_ip_addresses":{"type":"string","computed":true},"possible_outbound_ip_addresses":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"site_credential":{"type":["list",["object",{"password":"string","username":"string"}]],"computed":true},"storage_account_access_key":{"type":"string","required":true},"storage_account_name":{"type":"string","required":true},"storage_account_share_name":{"type":"string","optional":true,"computed":true},"tags":{"type":["map","string"],"optional":true},"use_extension_bundle":{"type":"bool","optional":true,"default":true},"version":{"type":"string","optional":true,"default":"~4"},"virtual_network_subnet_id":{"type":"string","optional":true}},"block_types":{"connection_string":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"type":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true,"computed":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"site_config":{"nesting_mode":3,"block":{"attributes":{"always_on":{"type":"bool","optional":true,"default":false},"app_scale_limit":{"type":"number","optional":true,"computed":true},"auto_swap_slot_name":{"type":"string","computed":true},"dotnet_framework_version":{"type":"string","optional":true,"default":"v4.0"},"elastic_instance_minimum":{"type":"number","optional":true,"computed":true},"ftps_state":{"type":"string","optional":true,"computed":true},"health_check_path":{"type":"string","optional":true},"http2_enabled":{"type":"bool","optional":true,"default":false},"ip_restriction":{"type":["list",["object",{"action":"string","headers":["list",["object",{"x_azure_fdid":["set","string"],"x_fd_health_probe":["set","string"],"x_forwarded_for":["set","string"],"x_forwarded_host":["set","string"]}]],"ip_address":"string","name":"string","priority":"number","service_tag":"string","virtual_network_subnet_id":"string"}]],"optional":true,"computed":true},"linux_fx_version":{"type":"string","optional":true,"computed":true},"min_tls_version":{"type":"string","optional":true,"computed":true},"pre_warmed_instance_count":{"type":"number","optional":true,"computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"runtime_scale_monitoring_enabled":{"type":"bool","optional":true,"default":false},"scm_ip_restriction":{"type":["list",["object",{"action":"string","headers":["list",["object",{"x_azure_fdid":["set","string"],"x_fd_health_probe":["set","string"],"x_forwarded_for":["set","string"],"x_forwarded_host":["set","string"]}]],"ip_address":"string","name":"string","priority":"number","service_tag":"string","virtual_network_subnet_id":"string"}]],"optional":true,"computed":true},"scm_min_tls_version":{"type":"string","optional":true,"computed":true},"scm_type":{"type":"string","optional":true,"computed":true},"scm_use_main_ip_restriction":{"type":"bool","optional":true,"default":false},"use_32_bit_worker_process":{"type":"bool","optional":true,"default":true},"vnet_route_all_enabled":{"type":"bool","optional":true,"computed":true},"websockets_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"cors":{"nesting_mode":3,"block":{"attributes":{"allowed_origins":{"type":["set","string"],"required":true},"support_credentials":{"type":"bool","optional":true,"default":false}}},"optional":true,"computed":true}}},"optional":true,"computed":true}}}},"azurerm_logic_app_trigger_custom":{"block":{"attributes":{"body":{"type":"string","required":true},"callback_url":{"type":"string","computed":true},"logic_app_id":{"type":"string","required":true},"name":{"type":"string","required":true}}}},"azurerm_logic_app_trigger_http_request":{"block":{"attributes":{"callback_url":{"type":"string","computed":true},"logic_app_id":{"type":"string","required":true},"method":{"type":"string","optional":true},"name":{"type":"string","required":true},"relative_path":{"type":"string","optional":true},"schema":{"type":"string","required":true}}}},"azurerm_logic_app_trigger_recurrence":{"block":{"attributes":{"frequency":{"type":"string","required":true},"interval":{"type":"number","required":true},"logic_app_id":{"type":"string","required":true},"name":{"type":"string","required":true},"start_time":{"type":"string","optional":true},"time_zone":{"type":"string","optional":true,"computed":true}},"block_types":{"schedule":{"nesting_mode":3,"block":{"attributes":{"at_these_hours":{"type":["set","number"],"optional":true,"at_least_one_of":["schedule.0.at_these_hours","schedule.0.at_these_minutes","schedule.0.on_these_days"]},"at_these_minutes":{"type":["set","number"],"optional":true,"at_least_one_of":["schedule.0.at_these_hours","schedule.0.at_these_minutes","schedule.0.on_these_days"]},"on_these_days":{"type":["set","string"],"optional":true,"at_least_one_of":["schedule.0.at_these_hours","schedule.0.at_these_minutes","schedule.0.on_these_days"]}}},"optional":true}}}},"azurerm_logic_app_workflow":{"block":{"attributes":{"access_endpoint":{"type":"string","computed":true},"connector_endpoint_ip_addresses":{"type":["list","string"],"computed":true},"connector_outbound_ip_addresses":{"type":["list","string"],"computed":true},"enabled":{"type":"bool","optional":true,"default":true},"integration_service_environment_id":{"type":"string","optional":true},"location":{"type":"string","required":true},"logic_app_integration_account_id":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"workflow_endpoint_ip_addresses":{"type":["list","string"],"computed":true},"workflow_outbound_ip_addresses":{"type":["list","string"],"computed":true},"workflow_parameters":{"type":["map","string"],"optional":true},"workflow_schema":{"type":"string","optional":true,"default":"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#"},"workflow_version":{"type":"string","optional":true,"default":"1.0.0.0"}},"block_types":{"access_control":{"nesting_mode":3,"block":{"block_types":{"action":{"nesting_mode":3,"block":{"attributes":{"allowed_caller_ip_address_range":{"type":["set","string"],"required":true}}},"optional":true},"content":{"nesting_mode":3,"block":{"attributes":{"allowed_caller_ip_address_range":{"type":["set","string"],"required":true}}},"optional":true},"trigger":{"nesting_mode":3,"block":{"attributes":{"allowed_caller_ip_address_range":{"type":["set","string"],"required":true}},"block_types":{"open_authentication_policy":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true}},"block_types":{"claim":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"required":true}}},"optional":true}}},"optional":true},"workflow_management":{"nesting_mode":3,"block":{"attributes":{"allowed_caller_ip_address_range":{"type":["set","string"],"required":true}}},"optional":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_machine_learning_compute_cluster":{"block":{"attributes":{"description":{"type":"string","optional":true},"local_auth_enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"machine_learning_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true},"node_public_ip_enabled":{"type":"bool","optional":true,"default":true},"ssh_public_access_enabled":{"type":"bool","optional":true,"default":false},"subnet_resource_id":{"type":"string","optional":true},"tags":{"type":["map","string"],"optional":true},"vm_priority":{"type":"string","required":true},"vm_size":{"type":"string","required":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"scale_settings":{"nesting_mode":3,"block":{"attributes":{"max_node_count":{"type":"number","required":true},"min_node_count":{"type":"number","required":true},"scale_down_nodes_after_idle_duration":{"type":"string","required":true}}},"required":true},"ssh":{"nesting_mode":3,"block":{"attributes":{"admin_password":{"type":"string","optional":true,"at_least_one_of":["ssh.0.admin_password","ssh.0.key_value"]},"admin_username":{"type":"string","required":true},"key_value":{"type":"string","optional":true,"at_least_one_of":["ssh.0.admin_password","ssh.0.key_value"]}}},"optional":true}}}},"azurerm_machine_learning_compute_instance":{"block":{"attributes":{"authorization_type":{"type":"string","optional":true},"description":{"type":"string","optional":true},"local_auth_enabled":{"type":"bool","optional":true,"default":true},"machine_learning_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true},"node_public_ip_enabled":{"type":"bool","optional":true,"default":true},"subnet_resource_id":{"type":"string","optional":true},"tags":{"type":["map","string"],"optional":true},"virtual_machine_size":{"type":"string","required":true}},"block_types":{"assign_to_user":{"nesting_mode":3,"block":{"attributes":{"object_id":{"type":"string","optional":true},"tenant_id":{"type":"string","optional":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"ssh":{"nesting_mode":3,"block":{"attributes":{"port":{"type":"number","computed":true},"public_key":{"type":"string","required":true},"username":{"type":"string","computed":true}}},"optional":true}}}},"azurerm_machine_learning_datastore_blobstorage":{"block":{"attributes":{"account_key":{"type":"string","optional":true,"exactly_one_of":["account_key","shared_access_signature"]},"description":{"type":"string","optional":true},"is_default":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"service_data_auth_identity":{"type":"string","optional":true,"default":"None"},"shared_access_signature":{"type":"string","optional":true,"at_least_one_of":["account_key","shared_access_signature"]},"storage_container_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"workspace_id":{"type":"string","required":true}}}},"azurerm_machine_learning_datastore_datalake_gen2":{"block":{"attributes":{"authority_url":{"type":"string","optional":true},"client_id":{"type":"string","optional":true,"required_with":["tenant_id","client_secret"]},"client_secret":{"type":"string","optional":true,"required_with":["tenant_id","client_id"]},"description":{"type":"string","optional":true},"is_default":{"type":"bool","computed":true},"name":{"type":"string","required":true},"service_data_identity":{"type":"string","optional":true,"default":"None"},"storage_container_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"tenant_id":{"type":"string","optional":true,"required_with":["client_id","client_secret"]},"workspace_id":{"type":"string","required":true}}}},"azurerm_machine_learning_datastore_fileshare":{"block":{"attributes":{"account_key":{"type":"string","optional":true,"exactly_one_of":["account_key","shared_access_signature"]},"description":{"type":"string","optional":true},"is_default":{"type":"bool","computed":true},"name":{"type":"string","required":true},"service_data_identity":{"type":"string","optional":true,"default":"None"},"shared_access_signature":{"type":"string","optional":true,"at_least_one_of":["account_key","shared_access_signature"]},"storage_fileshare_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"workspace_id":{"type":"string","required":true}}}},"azurerm_machine_learning_inference_cluster":{"block":{"attributes":{"cluster_purpose":{"type":"string","optional":true,"default":"FastProd"},"description":{"type":"string","optional":true},"kubernetes_cluster_id":{"type":"string","required":true},"location":{"type":"string","required":true},"machine_learning_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"ssl":{"nesting_mode":3,"block":{"attributes":{"cert":{"type":"string","optional":true,"default":"","conflicts_with":["ssl.0.leaf_domain_label","ssl.0.overwrite_existing_domain"]},"cname":{"type":"string","optional":true,"default":"","conflicts_with":["ssl.0.leaf_domain_label","ssl.0.overwrite_existing_domain"]},"key":{"type":"string","optional":true,"default":"","conflicts_with":["ssl.0.leaf_domain_label","ssl.0.overwrite_existing_domain"]},"leaf_domain_label":{"type":"string","optional":true,"default":"","conflicts_with":["ssl.0.cert","ssl.0.key","ssl.0.cname"]},"overwrite_existing_domain":{"type":"bool","optional":true,"default":"","conflicts_with":["ssl.0.cert","ssl.0.key","ssl.0.cname"]}}},"optional":true}}}},"azurerm_machine_learning_synapse_spark":{"block":{"attributes":{"description":{"type":"string","optional":true},"local_auth_enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"machine_learning_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true},"synapse_spark_pool_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_machine_learning_workspace":{"block":{"attributes":{"application_insights_id":{"type":"string","required":true},"container_registry_id":{"type":"string","optional":true},"description":{"type":"string","optional":true},"discovery_url":{"type":"string","computed":true},"friendly_name":{"type":"string","optional":true},"high_business_impact":{"type":"bool","optional":true},"image_build_compute_name":{"type":"string","optional":true},"key_vault_id":{"type":"string","required":true},"kind":{"type":"string","optional":true,"default":"Default"},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"primary_user_assigned_identity":{"type":"string","optional":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","optional":true,"default":"Basic"},"storage_account_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"v1_legacy_mode_enabled":{"type":"bool","optional":true,"default":false},"workspace_id":{"type":"string","computed":true}},"block_types":{"encryption":{"nesting_mode":3,"block":{"attributes":{"key_id":{"type":"string","required":true},"key_vault_id":{"type":"string","required":true},"user_assigned_identity_id":{"type":"string","optional":true}}},"optional":true},"feature_store":{"nesting_mode":3,"block":{"attributes":{"computer_spark_runtime_version":{"type":"string","optional":true},"offline_connection_name":{"type":"string","optional":true},"online_connection_name":{"type":"string","optional":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"required":true},"managed_network":{"nesting_mode":3,"block":{"attributes":{"isolation_mode":{"type":"string","optional":true,"computed":true}}},"optional":true,"computed":true},"serverless_compute":{"nesting_mode":3,"block":{"attributes":{"public_ip_enabled":{"type":"bool","optional":true,"default":false},"subnet_id":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_maintenance_assignment_dedicated_host":{"block":{"attributes":{"dedicated_host_id":{"type":"string","required":true},"location":{"type":"string","required":true},"maintenance_configuration_id":{"type":"string","required":true}}}},"azurerm_maintenance_assignment_dynamic_scope":{"block":{"attributes":{"maintenance_configuration_id":{"type":"string","required":true},"name":{"type":"string","required":true}},"block_types":{"filter":{"nesting_mode":3,"block":{"attributes":{"locations":{"type":["list","string"],"optional":true,"at_least_one_of":["filter.0.locations","filter.0.os_types","filter.0.resource_groups","filter.0.resource_types","filter.0.tags"]},"os_types":{"type":["list","string"],"optional":true,"at_least_one_of":["filter.0.locations","filter.0.os_types","filter.0.resource_groups","filter.0.resource_types","filter.0.tags"]},"resource_groups":{"type":["list","string"],"optional":true,"at_least_one_of":["filter.0.locations","filter.0.os_types","filter.0.resource_groups","filter.0.resource_types","filter.0.tags"]},"resource_types":{"type":["list","string"],"optional":true,"at_least_one_of":["filter.0.locations","filter.0.os_types","filter.0.resource_groups","filter.0.resource_types","filter.0.tags"]},"tag_filter":{"type":"string","optional":true,"default":"Any","required_with":["filter.0.tags"]}},"block_types":{"tags":{"nesting_mode":3,"block":{"attributes":{"tag":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["filter.0.locations","filter.0.os_types","filter.0.resource_groups","filter.0.resource_types","filter.0.tags"]}}},"required":true}}}},"azurerm_maintenance_assignment_virtual_machine":{"block":{"attributes":{"location":{"type":"string","required":true},"maintenance_configuration_id":{"type":"string","required":true},"virtual_machine_id":{"type":"string","required":true}}}},"azurerm_maintenance_assignment_virtual_machine_scale_set":{"block":{"attributes":{"location":{"type":"string","required":true},"maintenance_configuration_id":{"type":"string","required":true},"virtual_machine_scale_set_id":{"type":"string","required":true}}}},"azurerm_maintenance_configuration":{"block":{"attributes":{"in_guest_user_patch_mode":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"properties":{"type":["map","string"],"optional":true},"resource_group_name":{"type":"string","required":true},"scope":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"visibility":{"type":"string","optional":true,"default":"Custom"}},"block_types":{"install_patches":{"nesting_mode":3,"block":{"attributes":{"reboot":{"type":"string","optional":true}},"block_types":{"linux":{"nesting_mode":3,"block":{"attributes":{"classifications_to_include":{"type":["list","string"],"optional":true},"package_names_mask_to_exclude":{"type":["list","string"],"optional":true},"package_names_mask_to_include":{"type":["list","string"],"optional":true}}},"optional":true},"windows":{"nesting_mode":3,"block":{"attributes":{"classifications_to_include":{"type":["list","string"],"optional":true},"kb_numbers_to_exclude":{"type":["list","string"],"optional":true},"kb_numbers_to_include":{"type":["list","string"],"optional":true}}},"optional":true}}},"optional":true},"window":{"nesting_mode":3,"block":{"attributes":{"duration":{"type":"string","optional":true},"expiration_date_time":{"type":"string","optional":true},"recur_every":{"type":"string","optional":true},"start_date_time":{"type":"string","required":true},"time_zone":{"type":"string","required":true}}},"optional":true}}}},"azurerm_managed_application":{"block":{"attributes":{"application_definition_id":{"type":"string","optional":true},"kind":{"type":"string","required":true},"location":{"type":"string","required":true},"managed_resource_group_name":{"type":"string","required":true},"name":{"type":"string","required":true},"outputs":{"type":["map","string"],"computed":true},"parameter_values":{"type":"string","optional":true,"computed":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"plan":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"product":{"type":"string","required":true},"promotion_code":{"type":"string","optional":true},"publisher":{"type":"string","required":true},"version":{"type":"string","required":true}}},"optional":true}}}},"azurerm_managed_application_definition":{"block":{"attributes":{"create_ui_definition":{"type":"string","optional":true,"conflicts_with":["package_file_uri"],"required_with":["main_template"]},"description":{"type":"string","optional":true},"display_name":{"type":"string","required":true},"location":{"type":"string","required":true},"lock_level":{"type":"string","required":true},"main_template":{"type":"string","optional":true,"conflicts_with":["package_file_uri"],"required_with":["create_ui_definition"]},"name":{"type":"string","required":true},"package_enabled":{"type":"bool","optional":true,"default":true},"package_file_uri":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"authorization":{"nesting_mode":4,"block":{"attributes":{"role_definition_id":{"type":"string","required":true},"service_principal_id":{"type":"string","required":true}}},"optional":true}}}},"azurerm_managed_disk":{"block":{"attributes":{"create_option":{"type":"string","required":true},"disk_access_id":{"type":"string","optional":true},"disk_encryption_set_id":{"type":"string","optional":true,"conflicts_with":["secure_vm_disk_encryption_set_id"]},"disk_iops_read_only":{"type":"number","optional":true,"computed":true},"disk_iops_read_write":{"type":"number","optional":true,"computed":true},"disk_mbps_read_only":{"type":"number","optional":true,"computed":true},"disk_mbps_read_write":{"type":"number","optional":true,"computed":true},"disk_size_gb":{"type":"number","optional":true,"computed":true},"edge_zone":{"type":"string","optional":true},"gallery_image_reference_id":{"type":"string","optional":true,"conflicts_with":["image_reference_id"]},"hyper_v_generation":{"type":"string","optional":true},"image_reference_id":{"type":"string","optional":true,"conflicts_with":["gallery_image_reference_id"]},"location":{"type":"string","required":true},"logical_sector_size":{"type":"number","optional":true,"computed":true},"max_shares":{"type":"number","optional":true,"computed":true},"name":{"type":"string","required":true},"network_access_policy":{"type":"string","optional":true},"on_demand_bursting_enabled":{"type":"bool","optional":true},"optimized_frequent_attach_enabled":{"type":"bool","optional":true,"default":false},"os_type":{"type":"string","optional":true},"performance_plus_enabled":{"type":"bool","optional":true,"default":false},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"secure_vm_disk_encryption_set_id":{"type":"string","optional":true,"conflicts_with":["disk_encryption_set_id"]},"security_type":{"type":"string","optional":true},"source_resource_id":{"type":"string","optional":true},"source_uri":{"type":"string","optional":true,"computed":true},"storage_account_id":{"type":"string","optional":true},"storage_account_type":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"tier":{"type":"string","optional":true,"computed":true},"trusted_launch_enabled":{"type":"bool","optional":true},"upload_size_bytes":{"type":"number","optional":true},"zone":{"type":"string","optional":true}},"block_types":{"encryption_settings":{"nesting_mode":3,"block":{"block_types":{"disk_encryption_key":{"nesting_mode":3,"block":{"attributes":{"secret_url":{"type":"string","required":true},"source_vault_id":{"type":"string","required":true}}},"required":true},"key_encryption_key":{"nesting_mode":3,"block":{"attributes":{"key_url":{"type":"string","required":true},"source_vault_id":{"type":"string","required":true}}},"optional":true}}},"optional":true}}}},"azurerm_managed_disk_sas_token":{"block":{"attributes":{"access_level":{"type":"string","required":true},"duration_in_seconds":{"type":"number","required":true},"managed_disk_id":{"type":"string","required":true},"sas_url":{"type":"string","computed":true}}}},"azurerm_managed_lustre_file_system":{"block":{"attributes":{"location":{"type":"string","required":true},"mgs_address":{"type":"string","computed":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","required":true},"storage_capacity_in_tb":{"type":"number","required":true},"subnet_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"zones":{"type":["set","string"],"required":true}},"block_types":{"encryption_key":{"nesting_mode":3,"block":{"attributes":{"key_url":{"type":"string","required":true},"source_vault_id":{"type":"string","required":true}}},"optional":true},"hsm_setting":{"nesting_mode":3,"block":{"attributes":{"container_id":{"type":"string","required":true},"import_prefix":{"type":"string","optional":true},"logging_container_id":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"required":true},"type":{"type":"string","required":true}}},"optional":true},"maintenance_window":{"nesting_mode":3,"block":{"attributes":{"day_of_week":{"type":"string","required":true},"time_of_day_in_utc":{"type":"string","required":true}}},"required":true}}}},"azurerm_management_group":{"block":{"attributes":{"display_name":{"type":"string","optional":true,"computed":true},"name":{"type":"string","optional":true,"computed":true},"parent_management_group_id":{"type":"string","optional":true,"computed":true},"subscription_ids":{"type":["set","string"],"optional":true,"computed":true},"tenant_scoped_id":{"type":"string","computed":true}}}},"azurerm_management_group_policy_assignment":{"block":{"attributes":{"description":{"type":"string","optional":true},"display_name":{"type":"string","optional":true},"enforce":{"type":"bool","optional":true,"default":true},"location":{"type":"string","optional":true},"management_group_id":{"type":"string","required":true},"metadata":{"type":"string","optional":true,"computed":true},"name":{"type":"string","required":true},"not_scopes":{"type":["list","string"],"optional":true},"parameters":{"type":"string","optional":true},"policy_definition_id":{"type":"string","required":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"non_compliance_message":{"nesting_mode":3,"block":{"attributes":{"content":{"type":"string","required":true},"policy_definition_reference_id":{"type":"string","optional":true}}},"optional":true},"overrides":{"nesting_mode":3,"block":{"attributes":{"value":{"type":"string","required":true}},"block_types":{"selectors":{"nesting_mode":3,"block":{"attributes":{"in":{"type":["list","string"],"optional":true},"kind":{"type":"string","computed":true},"not_in":{"type":["list","string"],"optional":true}}},"optional":true}}},"optional":true},"resource_selectors":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","optional":true}},"block_types":{"selectors":{"nesting_mode":3,"block":{"attributes":{"in":{"type":["list","string"],"optional":true},"kind":{"type":"string","required":true},"not_in":{"type":["list","string"],"optional":true}}},"required":true}}},"optional":true}}}},"azurerm_management_group_policy_exemption":{"block":{"attributes":{"description":{"type":"string","optional":true},"display_name":{"type":"string","optional":true},"exemption_category":{"type":"string","required":true},"expires_on":{"type":"string","optional":true},"management_group_id":{"type":"string","required":true},"metadata":{"type":"string","optional":true,"computed":true},"name":{"type":"string","required":true},"policy_assignment_id":{"type":"string","required":true},"policy_definition_reference_ids":{"type":["list","string"],"optional":true}}}},"azurerm_management_group_policy_remediation":{"block":{"attributes":{"failure_percentage":{"type":"number","optional":true},"location_filters":{"type":["list","string"],"optional":true},"management_group_id":{"type":"string","required":true},"name":{"type":"string","required":true},"parallel_deployments":{"type":"number","optional":true},"policy_assignment_id":{"type":"string","required":true},"policy_definition_reference_id":{"type":"string","optional":true},"resource_count":{"type":"number","optional":true}}}},"azurerm_management_group_subscription_association":{"block":{"attributes":{"management_group_id":{"type":"string","required":true},"subscription_id":{"type":"string","required":true}}}},"azurerm_management_group_template_deployment":{"block":{"attributes":{"debug_level":{"type":"string","optional":true},"location":{"type":"string","required":true},"management_group_id":{"type":"string","required":true},"name":{"type":"string","required":true},"output_content":{"type":"string","computed":true},"parameters_content":{"type":"string","optional":true,"computed":true},"tags":{"type":["map","string"],"optional":true},"template_content":{"type":"string","optional":true,"computed":true,"exactly_one_of":["template_content","template_spec_version_id"]},"template_spec_version_id":{"type":"string","optional":true,"exactly_one_of":["template_content","template_spec_version_id"]}}}},"azurerm_management_lock":{"block":{"attributes":{"lock_level":{"type":"string","required":true},"name":{"type":"string","required":true},"notes":{"type":"string","optional":true},"scope":{"type":"string","required":true}}}},"azurerm_maps_account":{"block":{"attributes":{"local_authentication_enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"primary_access_key":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"secondary_access_key":{"type":"string","computed":true},"sku_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"x_ms_client_id":{"type":"string","computed":true}},"block_types":{"cors":{"nesting_mode":3,"block":{"attributes":{"allowed_origins":{"type":["list","string"],"required":true}}},"optional":true},"data_store":{"nesting_mode":3,"block":{"attributes":{"storage_account_id":{"type":"string","optional":true},"unique_name":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_maps_creator":{"block":{"attributes":{"location":{"type":"string","required":true},"maps_account_id":{"type":"string","required":true},"name":{"type":"string","required":true},"storage_units":{"type":"number","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_marketplace_agreement":{"block":{"attributes":{"license_text_link":{"type":"string","computed":true},"offer":{"type":"string","required":true},"plan":{"type":"string","required":true},"privacy_policy_link":{"type":"string","computed":true},"publisher":{"type":"string","required":true}}}},"azurerm_marketplace_role_assignment":{"block":{"attributes":{"condition":{"type":"string","optional":true,"required_with":["condition_version"]},"condition_version":{"type":"string","optional":true,"required_with":["condition"]},"delegated_managed_identity_resource_id":{"type":"string","optional":true},"description":{"type":"string","optional":true},"name":{"type":"string","optional":true},"principal_id":{"type":"string","required":true},"principal_type":{"type":"string","computed":true},"role_definition_id":{"type":"string","optional":true,"conflicts_with":["role_definition_name"]},"role_definition_name":{"type":"string","optional":true,"conflicts_with":["role_definition_id"]},"skip_service_principal_aad_check":{"type":"bool","optional":true,"default":false}}}},"azurerm_mobile_network":{"block":{"attributes":{"location":{"type":"string","required":true},"mobile_country_code":{"type":"string","required":true},"mobile_network_code":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"service_key":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_mobile_network_attached_data_network":{"block":{"attributes":{"dns_addresses":{"type":["list","string"],"required":true},"location":{"type":"string","required":true},"mobile_network_data_network_name":{"type":"string","required":true},"mobile_network_packet_core_data_plane_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"user_equipment_address_pool_prefixes":{"type":["list","string"],"optional":true,"at_least_one_of":["user_equipment_address_pool_prefixes","user_equipment_static_address_pool_prefixes"]},"user_equipment_static_address_pool_prefixes":{"type":["list","string"],"optional":true,"at_least_one_of":["user_equipment_address_pool_prefixes","user_equipment_static_address_pool_prefixes"]},"user_plane_access_ipv4_address":{"type":"string","optional":true},"user_plane_access_ipv4_gateway":{"type":"string","optional":true},"user_plane_access_ipv4_subnet":{"type":"string","optional":true},"user_plane_access_name":{"type":"string","optional":true}},"block_types":{"network_address_port_translation":{"nesting_mode":3,"block":{"attributes":{"icmp_pinhole_timeout_in_seconds":{"type":"number","optional":true,"default":180},"pinhole_maximum_number":{"type":"number","optional":true,"default":65536},"tcp_pinhole_timeout_in_seconds":{"type":"number","optional":true,"default":180},"tcp_port_reuse_minimum_hold_time_in_seconds":{"type":"number","optional":true,"default":120},"udp_pinhole_timeout_in_seconds":{"type":"number","optional":true,"default":180},"udp_port_reuse_minimum_hold_time_in_seconds":{"type":"number","optional":true,"default":60}},"block_types":{"port_range":{"nesting_mode":3,"block":{"attributes":{"maximum":{"type":"number","optional":true,"default":49999},"minimum":{"type":"number","optional":true,"default":1024}}},"optional":true}}},"optional":true}}}},"azurerm_mobile_network_data_network":{"block":{"attributes":{"description":{"type":"string","optional":true},"location":{"type":"string","required":true},"mobile_network_id":{"type":"string","required":true},"name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_mobile_network_packet_core_control_plane":{"block":{"attributes":{"control_plane_access_ipv4_address":{"type":"string","optional":true},"control_plane_access_ipv4_gateway":{"type":"string","optional":true},"control_plane_access_ipv4_subnet":{"type":"string","optional":true},"control_plane_access_name":{"type":"string","optional":true},"core_network_technology":{"type":"string","optional":true},"interoperability_settings_json":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"site_ids":{"type":["list","string"],"required":true},"sku":{"type":"string","required":true},"software_version":{"type":"string","optional":true},"tags":{"type":["map","string"],"optional":true},"user_equipment_mtu_in_bytes":{"type":"number","optional":true,"default":1440}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"required":true},"type":{"type":"string","required":true}}},"optional":true},"local_diagnostics_access":{"nesting_mode":3,"block":{"attributes":{"authentication_type":{"type":"string","required":true},"https_server_certificate_url":{"type":"string","optional":true}}},"required":true},"platform":{"nesting_mode":3,"block":{"attributes":{"arc_kubernetes_cluster_id":{"type":"string","optional":true,"at_least_one_of":["platform.0.edge_device_id","platform.0.stack_hci_cluster_id","platform.0.arc_kubernetes_cluster_id","platform.0.custom_location_id"]},"custom_location_id":{"type":"string","optional":true,"at_least_one_of":["platform.0.edge_device_id","platform.0.stack_hci_cluster_id","platform.0.arc_kubernetes_cluster_id","platform.0.custom_location_id"]},"edge_device_id":{"type":"string","optional":true,"at_least_one_of":["platform.0.edge_device_id","platform.0.stack_hci_cluster_id","platform.0.arc_kubernetes_cluster_id","platform.0.custom_location_id"]},"stack_hci_cluster_id":{"type":"string","optional":true,"at_least_one_of":["platform.0.edge_device_id","platform.0.stack_hci_cluster_id","platform.0.arc_kubernetes_cluster_id","platform.0.custom_location_id"]},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_mobile_network_packet_core_data_plane":{"block":{"attributes":{"location":{"type":"string","required":true},"mobile_network_packet_core_control_plane_id":{"type":"string","required":true},"name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"user_plane_access_ipv4_address":{"type":"string","optional":true},"user_plane_access_ipv4_gateway":{"type":"string","optional":true},"user_plane_access_ipv4_subnet":{"type":"string","optional":true},"user_plane_access_name":{"type":"string","optional":true}}}},"azurerm_mobile_network_service":{"block":{"attributes":{"location":{"type":"string","required":true},"mobile_network_id":{"type":"string","required":true},"name":{"type":"string","required":true},"service_precedence":{"type":"number","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"pcc_rule":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"precedence":{"type":"number","required":true},"traffic_control_enabled":{"type":"bool","optional":true,"default":true}},"block_types":{"qos_policy":{"nesting_mode":3,"block":{"attributes":{"allocation_and_retention_priority_level":{"type":"number","optional":true},"preemption_capability":{"type":"string","optional":true,"default":"NotPreempt"},"preemption_vulnerability":{"type":"string","optional":true,"default":"Preemptable"},"qos_indicator":{"type":"number","required":true}},"block_types":{"guaranteed_bit_rate":{"nesting_mode":3,"block":{"attributes":{"downlink":{"type":"string","required":true},"uplink":{"type":"string","required":true}}},"optional":true},"maximum_bit_rate":{"nesting_mode":3,"block":{"attributes":{"downlink":{"type":"string","required":true},"uplink":{"type":"string","required":true}}},"required":true}}},"optional":true},"service_data_flow_template":{"nesting_mode":3,"block":{"attributes":{"direction":{"type":"string","required":true},"name":{"type":"string","required":true},"ports":{"type":["list","string"],"optional":true},"protocol":{"type":["list","string"],"required":true},"remote_ip_list":{"type":["list","string"],"required":true}}},"required":true}}},"required":true},"service_qos_policy":{"nesting_mode":3,"block":{"attributes":{"allocation_and_retention_priority_level":{"type":"number","optional":true,"default":9},"preemption_capability":{"type":"string","optional":true},"preemption_vulnerability":{"type":"string","optional":true},"qos_indicator":{"type":"number","optional":true}},"block_types":{"maximum_bit_rate":{"nesting_mode":3,"block":{"attributes":{"downlink":{"type":"string","required":true},"uplink":{"type":"string","required":true}}},"required":true}}},"optional":true}}}},"azurerm_mobile_network_sim":{"block":{"attributes":{"authentication_key":{"type":"string","required":true},"device_type":{"type":"string","optional":true},"integrated_circuit_card_identifier":{"type":"string","required":true},"international_mobile_subscriber_identity":{"type":"string","required":true},"mobile_network_sim_group_id":{"type":"string","required":true},"name":{"type":"string","required":true},"operator_key_code":{"type":"string","required":true},"sim_policy_id":{"type":"string","optional":true},"sim_state":{"type":"string","computed":true},"vendor_key_fingerprint":{"type":"string","computed":true},"vendor_name":{"type":"string","computed":true}},"block_types":{"static_ip_configuration":{"nesting_mode":3,"block":{"attributes":{"attached_data_network_id":{"type":"string","required":true},"slice_id":{"type":"string","required":true},"static_ipv4_address":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_mobile_network_sim_group":{"block":{"attributes":{"encryption_key_url":{"type":"string","optional":true},"location":{"type":"string","required":true},"mobile_network_id":{"type":"string","required":true},"name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"required":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_mobile_network_sim_policy":{"block":{"attributes":{"default_slice_id":{"type":"string","required":true},"location":{"type":"string","required":true},"mobile_network_id":{"type":"string","required":true},"name":{"type":"string","required":true},"rat_frequency_selection_priority_index":{"type":"number","optional":true},"registration_timer_in_seconds":{"type":"number","optional":true,"default":3240},"tags":{"type":["map","string"],"optional":true}},"block_types":{"slice":{"nesting_mode":3,"block":{"attributes":{"default_data_network_id":{"type":"string","required":true},"slice_id":{"type":"string","required":true}},"block_types":{"data_network":{"nesting_mode":3,"block":{"attributes":{"additional_allowed_session_types":{"type":["list","string"],"optional":true},"allocation_and_retention_priority_level":{"type":"number","optional":true,"default":0},"allowed_services_ids":{"type":["list","string"],"required":true},"data_network_id":{"type":"string","required":true},"default_session_type":{"type":"string","optional":true,"default":"IPv4"},"max_buffered_packets":{"type":"number","optional":true,"default":10},"preemption_capability":{"type":"string","optional":true,"default":"NotPreempt"},"preemption_vulnerability":{"type":"string","optional":true,"default":"NotPreemptable"},"qos_indicator":{"type":"number","required":true}},"block_types":{"session_aggregate_maximum_bit_rate":{"nesting_mode":3,"block":{"attributes":{"downlink":{"type":"string","required":true},"uplink":{"type":"string","required":true}}},"required":true}}},"required":true}}},"required":true},"user_equipment_aggregate_maximum_bit_rate":{"nesting_mode":3,"block":{"attributes":{"downlink":{"type":"string","required":true},"uplink":{"type":"string","required":true}}},"required":true}}}},"azurerm_mobile_network_site":{"block":{"attributes":{"location":{"type":"string","required":true},"mobile_network_id":{"type":"string","required":true},"name":{"type":"string","required":true},"network_function_ids":{"type":["list","string"],"computed":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_mobile_network_slice":{"block":{"attributes":{"description":{"type":"string","optional":true},"location":{"type":"string","required":true},"mobile_network_id":{"type":"string","required":true},"name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"single_network_slice_selection_assistance_information":{"nesting_mode":3,"block":{"attributes":{"slice_differentiator":{"type":"string","optional":true},"slice_service_type":{"type":"number","required":true}}},"required":true}}}},"azurerm_monitor_aad_diagnostic_setting":{"block":{"attributes":{"eventhub_authorization_rule_id":{"type":"string","optional":true,"at_least_one_of":["eventhub_authorization_rule_id","log_analytics_workspace_id","storage_account_id"]},"eventhub_name":{"type":"string","optional":true},"log_analytics_workspace_id":{"type":"string","optional":true,"at_least_one_of":["eventhub_authorization_rule_id","log_analytics_workspace_id","storage_account_id"]},"name":{"type":"string","required":true},"storage_account_id":{"type":"string","optional":true,"at_least_one_of":["eventhub_authorization_rule_id","log_analytics_workspace_id","storage_account_id"]}},"block_types":{"enabled_log":{"nesting_mode":4,"block":{"attributes":{"category":{"type":"string","required":true}},"block_types":{"retention_policy":{"nesting_mode":3,"block":{"attributes":{"days":{"type":"number","optional":true,"default":0},"enabled":{"type":"bool","optional":true,"default":false}}},"required":true}}},"optional":true}}}},"azurerm_monitor_action_group":{"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","optional":true,"default":"global"},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"short_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"arm_role_receiver":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"role_id":{"type":"string","required":true},"use_common_alert_schema":{"type":"bool","optional":true}}},"optional":true},"automation_runbook_receiver":{"nesting_mode":3,"block":{"attributes":{"automation_account_id":{"type":"string","required":true},"is_global_runbook":{"type":"bool","required":true},"name":{"type":"string","required":true},"runbook_name":{"type":"string","required":true},"service_uri":{"type":"string","required":true},"use_common_alert_schema":{"type":"bool","optional":true,"default":false},"webhook_resource_id":{"type":"string","required":true}}},"optional":true},"azure_app_push_receiver":{"nesting_mode":3,"block":{"attributes":{"email_address":{"type":"string","required":true},"name":{"type":"string","required":true}}},"optional":true},"azure_function_receiver":{"nesting_mode":3,"block":{"attributes":{"function_app_resource_id":{"type":"string","required":true},"function_name":{"type":"string","required":true},"http_trigger_url":{"type":"string","required":true},"name":{"type":"string","required":true},"use_common_alert_schema":{"type":"bool","optional":true}}},"optional":true},"email_receiver":{"nesting_mode":3,"block":{"attributes":{"email_address":{"type":"string","required":true},"name":{"type":"string","required":true},"use_common_alert_schema":{"type":"bool","optional":true}}},"optional":true},"event_hub_receiver":{"nesting_mode":3,"block":{"attributes":{"event_hub_name":{"type":"string","required":true},"event_hub_namespace":{"type":"string","required":true},"name":{"type":"string","required":true},"subscription_id":{"type":"string","optional":true,"computed":true},"tenant_id":{"type":"string","optional":true,"computed":true},"use_common_alert_schema":{"type":"bool","optional":true}}},"optional":true},"itsm_receiver":{"nesting_mode":3,"block":{"attributes":{"connection_id":{"type":"string","required":true},"name":{"type":"string","required":true},"region":{"type":"string","required":true},"ticket_configuration":{"type":"string","required":true},"workspace_id":{"type":"string","required":true}}},"optional":true},"logic_app_receiver":{"nesting_mode":3,"block":{"attributes":{"callback_url":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_id":{"type":"string","required":true},"use_common_alert_schema":{"type":"bool","optional":true}}},"optional":true},"sms_receiver":{"nesting_mode":3,"block":{"attributes":{"country_code":{"type":"string","required":true},"name":{"type":"string","required":true},"phone_number":{"type":"string","required":true}}},"optional":true},"voice_receiver":{"nesting_mode":3,"block":{"attributes":{"country_code":{"type":"string","required":true},"name":{"type":"string","required":true},"phone_number":{"type":"string","required":true}}},"optional":true},"webhook_receiver":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"service_uri":{"type":"string","required":true},"use_common_alert_schema":{"type":"bool","optional":true}},"block_types":{"aad_auth":{"nesting_mode":3,"block":{"attributes":{"identifier_uri":{"type":"string","optional":true,"computed":true},"object_id":{"type":"string","required":true},"tenant_id":{"type":"string","optional":true,"computed":true}}},"optional":true}}},"optional":true}}}},"azurerm_monitor_activity_log_alert":{"block":{"attributes":{"description":{"type":"string","optional":true},"enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"scopes":{"type":["set","string"],"required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"action":{"nesting_mode":3,"block":{"attributes":{"action_group_id":{"type":"string","required":true},"webhook_properties":{"type":["map","string"],"optional":true}}},"optional":true},"criteria":{"nesting_mode":3,"block":{"attributes":{"caller":{"type":"string","optional":true},"category":{"type":"string","required":true},"level":{"type":"string","optional":true,"conflicts_with":["criteria.0.levels"]},"levels":{"type":["list","string"],"optional":true,"conflicts_with":["criteria.0.level"]},"operation_name":{"type":"string","optional":true},"recommendation_category":{"type":"string","optional":true,"conflicts_with":["criteria.0.recommendation_type"]},"recommendation_impact":{"type":"string","optional":true,"conflicts_with":["criteria.0.recommendation_type"]},"recommendation_type":{"type":"string","optional":true,"conflicts_with":["criteria.0.recommendation_category","criteria.0.recommendation_impact"]},"resource_group":{"type":"string","optional":true,"conflicts_with":["criteria.0.resource_groups"]},"resource_groups":{"type":["list","string"],"optional":true,"conflicts_with":["criteria.0.resource_group"]},"resource_id":{"type":"string","optional":true,"conflicts_with":["criteria.0.resource_ids"]},"resource_ids":{"type":["list","string"],"optional":true,"conflicts_with":["criteria.0.resource_id"]},"resource_provider":{"type":"string","optional":true,"conflicts_with":["criteria.0.resource_providers"]},"resource_providers":{"type":["list","string"],"optional":true,"conflicts_with":["criteria.0.resource_provider"]},"resource_type":{"type":"string","optional":true,"conflicts_with":["criteria.0.resource_types"]},"resource_types":{"type":["list","string"],"optional":true,"conflicts_with":["criteria.0.resource_type"]},"status":{"type":"string","optional":true,"conflicts_with":["criteria.0.statuses"]},"statuses":{"type":["list","string"],"optional":true,"conflicts_with":["criteria.0.status"]},"sub_status":{"type":"string","optional":true,"conflicts_with":["criteria.0.sub_statuses"]},"sub_statuses":{"type":["list","string"],"optional":true,"conflicts_with":["criteria.0.sub_status"]}},"block_types":{"resource_health":{"nesting_mode":3,"block":{"attributes":{"current":{"type":["set","string"],"optional":true},"previous":{"type":["set","string"],"optional":true},"reason":{"type":["set","string"],"optional":true}}},"optional":true,"computed":true,"conflicts_with":["criteria.0.caller","criteria.0.service_health"]},"service_health":{"nesting_mode":3,"block":{"attributes":{"events":{"type":["set","string"],"optional":true},"locations":{"type":["set","string"],"optional":true},"services":{"type":["set","string"],"optional":true}}},"optional":true,"computed":true,"conflicts_with":["criteria.0.caller","criteria.0.resource_health"]}}},"required":true}}}},"azurerm_monitor_alert_processing_rule_action_group":{"block":{"attributes":{"add_action_group_ids":{"type":["list","string"],"required":true},"description":{"type":"string","optional":true},"enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"scopes":{"type":["list","string"],"required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"condition":{"nesting_mode":3,"block":{"block_types":{"alert_context":{"nesting_mode":3,"block":{"attributes":{"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["condition.0.alert_context","condition.0.alert_rule_id","condition.0.alert_rule_name","condition.0.description","condition.0.monitor_condition","condition.0.monitor_service","condition.0.severity","condition.0.signal_type","condition.0.target_resource","condition.0.target_resource_group","condition.0.target_resource_type"]},"alert_rule_id":{"nesting_mode":3,"block":{"attributes":{"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["condition.0.alert_context","condition.0.alert_rule_id","condition.0.alert_rule_name","condition.0.description","condition.0.monitor_condition","condition.0.monitor_service","condition.0.severity","condition.0.signal_type","condition.0.target_resource","condition.0.target_resource_group","condition.0.target_resource_type"]},"alert_rule_name":{"nesting_mode":3,"block":{"attributes":{"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["condition.0.alert_context","condition.0.alert_rule_id","condition.0.alert_rule_name","condition.0.description","condition.0.monitor_condition","condition.0.monitor_service","condition.0.severity","condition.0.signal_type","condition.0.target_resource","condition.0.target_resource_group","condition.0.target_resource_type"]},"description":{"nesting_mode":3,"block":{"attributes":{"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["condition.0.alert_context","condition.0.alert_rule_id","condition.0.alert_rule_name","condition.0.description","condition.0.monitor_condition","condition.0.monitor_service","condition.0.severity","condition.0.signal_type","condition.0.target_resource","condition.0.target_resource_group","condition.0.target_resource_type"]},"monitor_condition":{"nesting_mode":3,"block":{"attributes":{"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["condition.0.alert_context","condition.0.alert_rule_id","condition.0.alert_rule_name","condition.0.description","condition.0.monitor_condition","condition.0.monitor_service","condition.0.severity","condition.0.signal_type","condition.0.target_resource","condition.0.target_resource_group","condition.0.target_resource_type"]},"monitor_service":{"nesting_mode":3,"block":{"attributes":{"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["condition.0.alert_context","condition.0.alert_rule_id","condition.0.alert_rule_name","condition.0.description","condition.0.monitor_condition","condition.0.monitor_service","condition.0.severity","condition.0.signal_type","condition.0.target_resource","condition.0.target_resource_group","condition.0.target_resource_type"]},"severity":{"nesting_mode":3,"block":{"attributes":{"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["condition.0.alert_context","condition.0.alert_rule_id","condition.0.alert_rule_name","condition.0.description","condition.0.monitor_condition","condition.0.monitor_service","condition.0.severity","condition.0.signal_type","condition.0.target_resource","condition.0.target_resource_group","condition.0.target_resource_type"]},"signal_type":{"nesting_mode":3,"block":{"attributes":{"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["condition.0.alert_context","condition.0.alert_rule_id","condition.0.alert_rule_name","condition.0.description","condition.0.monitor_condition","condition.0.monitor_service","condition.0.severity","condition.0.signal_type","condition.0.target_resource","condition.0.target_resource_group","condition.0.target_resource_type"]},"target_resource":{"nesting_mode":3,"block":{"attributes":{"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["condition.0.alert_context","condition.0.alert_rule_id","condition.0.alert_rule_name","condition.0.description","condition.0.monitor_condition","condition.0.monitor_service","condition.0.severity","condition.0.signal_type","condition.0.target_resource","condition.0.target_resource_group","condition.0.target_resource_type"]},"target_resource_group":{"nesting_mode":3,"block":{"attributes":{"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["condition.0.alert_context","condition.0.alert_rule_id","condition.0.alert_rule_name","condition.0.description","condition.0.monitor_condition","condition.0.monitor_service","condition.0.severity","condition.0.signal_type","condition.0.target_resource","condition.0.target_resource_group","condition.0.target_resource_type"]},"target_resource_type":{"nesting_mode":3,"block":{"attributes":{"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["condition.0.alert_context","condition.0.alert_rule_id","condition.0.alert_rule_name","condition.0.description","condition.0.monitor_condition","condition.0.monitor_service","condition.0.severity","condition.0.signal_type","condition.0.target_resource","condition.0.target_resource_group","condition.0.target_resource_type"]}}},"optional":true},"schedule":{"nesting_mode":3,"block":{"attributes":{"effective_from":{"type":"string","optional":true},"effective_until":{"type":"string","optional":true},"time_zone":{"type":"string","optional":true,"default":"UTC"}},"block_types":{"recurrence":{"nesting_mode":3,"block":{"block_types":{"daily":{"nesting_mode":3,"block":{"attributes":{"end_time":{"type":"string","required":true},"start_time":{"type":"string","required":true}}},"optional":true},"monthly":{"nesting_mode":3,"block":{"attributes":{"days_of_month":{"type":["list","number"],"required":true},"end_time":{"type":"string","optional":true},"start_time":{"type":"string","optional":true}}},"optional":true},"weekly":{"nesting_mode":3,"block":{"attributes":{"days_of_week":{"type":["list","string"],"required":true},"end_time":{"type":"string","optional":true},"start_time":{"type":"string","optional":true}}},"optional":true}}},"optional":true}}},"optional":true}}}},"azurerm_monitor_alert_processing_rule_suppression":{"block":{"attributes":{"description":{"type":"string","optional":true},"enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"scopes":{"type":["list","string"],"required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"condition":{"nesting_mode":3,"block":{"block_types":{"alert_context":{"nesting_mode":3,"block":{"attributes":{"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["condition.0.alert_context","condition.0.alert_rule_id","condition.0.alert_rule_name","condition.0.description","condition.0.monitor_condition","condition.0.monitor_service","condition.0.severity","condition.0.signal_type","condition.0.target_resource","condition.0.target_resource_group","condition.0.target_resource_type"]},"alert_rule_id":{"nesting_mode":3,"block":{"attributes":{"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["condition.0.alert_context","condition.0.alert_rule_id","condition.0.alert_rule_name","condition.0.description","condition.0.monitor_condition","condition.0.monitor_service","condition.0.severity","condition.0.signal_type","condition.0.target_resource","condition.0.target_resource_group","condition.0.target_resource_type"]},"alert_rule_name":{"nesting_mode":3,"block":{"attributes":{"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["condition.0.alert_context","condition.0.alert_rule_id","condition.0.alert_rule_name","condition.0.description","condition.0.monitor_condition","condition.0.monitor_service","condition.0.severity","condition.0.signal_type","condition.0.target_resource","condition.0.target_resource_group","condition.0.target_resource_type"]},"description":{"nesting_mode":3,"block":{"attributes":{"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["condition.0.alert_context","condition.0.alert_rule_id","condition.0.alert_rule_name","condition.0.description","condition.0.monitor_condition","condition.0.monitor_service","condition.0.severity","condition.0.signal_type","condition.0.target_resource","condition.0.target_resource_group","condition.0.target_resource_type"]},"monitor_condition":{"nesting_mode":3,"block":{"attributes":{"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["condition.0.alert_context","condition.0.alert_rule_id","condition.0.alert_rule_name","condition.0.description","condition.0.monitor_condition","condition.0.monitor_service","condition.0.severity","condition.0.signal_type","condition.0.target_resource","condition.0.target_resource_group","condition.0.target_resource_type"]},"monitor_service":{"nesting_mode":3,"block":{"attributes":{"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["condition.0.alert_context","condition.0.alert_rule_id","condition.0.alert_rule_name","condition.0.description","condition.0.monitor_condition","condition.0.monitor_service","condition.0.severity","condition.0.signal_type","condition.0.target_resource","condition.0.target_resource_group","condition.0.target_resource_type"]},"severity":{"nesting_mode":3,"block":{"attributes":{"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["condition.0.alert_context","condition.0.alert_rule_id","condition.0.alert_rule_name","condition.0.description","condition.0.monitor_condition","condition.0.monitor_service","condition.0.severity","condition.0.signal_type","condition.0.target_resource","condition.0.target_resource_group","condition.0.target_resource_type"]},"signal_type":{"nesting_mode":3,"block":{"attributes":{"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["condition.0.alert_context","condition.0.alert_rule_id","condition.0.alert_rule_name","condition.0.description","condition.0.monitor_condition","condition.0.monitor_service","condition.0.severity","condition.0.signal_type","condition.0.target_resource","condition.0.target_resource_group","condition.0.target_resource_type"]},"target_resource":{"nesting_mode":3,"block":{"attributes":{"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["condition.0.alert_context","condition.0.alert_rule_id","condition.0.alert_rule_name","condition.0.description","condition.0.monitor_condition","condition.0.monitor_service","condition.0.severity","condition.0.signal_type","condition.0.target_resource","condition.0.target_resource_group","condition.0.target_resource_type"]},"target_resource_group":{"nesting_mode":3,"block":{"attributes":{"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["condition.0.alert_context","condition.0.alert_rule_id","condition.0.alert_rule_name","condition.0.description","condition.0.monitor_condition","condition.0.monitor_service","condition.0.severity","condition.0.signal_type","condition.0.target_resource","condition.0.target_resource_group","condition.0.target_resource_type"]},"target_resource_type":{"nesting_mode":3,"block":{"attributes":{"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["condition.0.alert_context","condition.0.alert_rule_id","condition.0.alert_rule_name","condition.0.description","condition.0.monitor_condition","condition.0.monitor_service","condition.0.severity","condition.0.signal_type","condition.0.target_resource","condition.0.target_resource_group","condition.0.target_resource_type"]}}},"optional":true},"schedule":{"nesting_mode":3,"block":{"attributes":{"effective_from":{"type":"string","optional":true},"effective_until":{"type":"string","optional":true},"time_zone":{"type":"string","optional":true,"default":"UTC"}},"block_types":{"recurrence":{"nesting_mode":3,"block":{"block_types":{"daily":{"nesting_mode":3,"block":{"attributes":{"end_time":{"type":"string","required":true},"start_time":{"type":"string","required":true}}},"optional":true},"monthly":{"nesting_mode":3,"block":{"attributes":{"days_of_month":{"type":["list","number"],"required":true},"end_time":{"type":"string","optional":true},"start_time":{"type":"string","optional":true}}},"optional":true},"weekly":{"nesting_mode":3,"block":{"attributes":{"days_of_week":{"type":["list","string"],"required":true},"end_time":{"type":"string","optional":true},"start_time":{"type":"string","optional":true}}},"optional":true}}},"optional":true}}},"optional":true}}}},"azurerm_monitor_alert_prometheus_rule_group":{"block":{"attributes":{"cluster_name":{"type":"string","optional":true},"description":{"type":"string","optional":true},"interval":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"rule_group_enabled":{"type":"bool","optional":true},"scopes":{"type":["list","string"],"required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"rule":{"nesting_mode":3,"block":{"attributes":{"alert":{"type":"string","optional":true},"annotations":{"type":["map","string"],"optional":true},"enabled":{"type":"bool","optional":true},"expression":{"type":"string","required":true},"for":{"type":"string","optional":true},"labels":{"type":["map","string"],"optional":true},"record":{"type":"string","optional":true},"severity":{"type":"number","optional":true}},"block_types":{"action":{"nesting_mode":3,"block":{"attributes":{"action_group_id":{"type":"string","required":true},"action_properties":{"type":["map","string"],"optional":true}}},"optional":true},"alert_resolution":{"nesting_mode":3,"block":{"attributes":{"auto_resolved":{"type":"bool","optional":true},"time_to_resolve":{"type":"string","optional":true}}},"optional":true}}},"required":true}}}},"azurerm_monitor_autoscale_setting":{"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"target_resource_id":{"type":"string","required":true}},"block_types":{"notification":{"nesting_mode":3,"block":{"block_types":{"email":{"nesting_mode":3,"block":{"attributes":{"custom_emails":{"type":["list","string"],"optional":true},"send_to_subscription_administrator":{"type":"bool","optional":true,"default":false},"send_to_subscription_co_administrator":{"type":"bool","optional":true,"default":false}}},"optional":true,"at_least_one_of":["notification.0.email","notification.0.webhook"]},"webhook":{"nesting_mode":3,"block":{"attributes":{"properties":{"type":["map","string"],"optional":true},"service_uri":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["notification.0.email","notification.0.webhook"]}}},"optional":true},"predictive":{"nesting_mode":3,"block":{"attributes":{"look_ahead_time":{"type":"string","optional":true},"scale_mode":{"type":"string","required":true}}},"optional":true},"profile":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true}},"block_types":{"capacity":{"nesting_mode":3,"block":{"attributes":{"default":{"type":"number","required":true},"maximum":{"type":"number","required":true},"minimum":{"type":"number","required":true}}},"required":true},"fixed_date":{"nesting_mode":3,"block":{"attributes":{"end":{"type":"string","required":true},"start":{"type":"string","required":true},"timezone":{"type":"string","optional":true,"default":"UTC"}}},"optional":true},"recurrence":{"nesting_mode":3,"block":{"attributes":{"days":{"type":["list","string"],"required":true},"hours":{"type":["list","number"],"required":true},"minutes":{"type":["list","number"],"required":true},"timezone":{"type":"string","optional":true,"default":"UTC"}}},"optional":true},"rule":{"nesting_mode":3,"block":{"block_types":{"metric_trigger":{"nesting_mode":3,"block":{"attributes":{"divide_by_instance_count":{"type":"bool","optional":true},"metric_name":{"type":"string","required":true},"metric_namespace":{"type":"string","optional":true},"metric_resource_id":{"type":"string","required":true},"operator":{"type":"string","required":true},"statistic":{"type":"string","required":true},"threshold":{"type":"number","required":true},"time_aggregation":{"type":"string","required":true},"time_grain":{"type":"string","required":true},"time_window":{"type":"string","required":true}},"block_types":{"dimensions":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true}}},"required":true},"scale_action":{"nesting_mode":3,"block":{"attributes":{"cooldown":{"type":"string","required":true},"direction":{"type":"string","required":true},"type":{"type":"string","required":true},"value":{"type":"number","required":true}}},"required":true}}},"optional":true}}},"required":true}}}},"azurerm_monitor_data_collection_endpoint":{"block":{"attributes":{"configuration_access_endpoint":{"type":"string","computed":true},"description":{"type":"string","optional":true},"immutable_id":{"type":"string","computed":true},"kind":{"type":"string","optional":true},"location":{"type":"string","required":true},"logs_ingestion_endpoint":{"type":"string","computed":true},"name":{"type":"string","required":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_monitor_data_collection_rule":{"block":{"attributes":{"data_collection_endpoint_id":{"type":"string","optional":true},"description":{"type":"string","optional":true},"immutable_id":{"type":"string","computed":true},"kind":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"data_flow":{"nesting_mode":3,"block":{"attributes":{"built_in_transform":{"type":"string","optional":true},"destinations":{"type":["list","string"],"required":true},"output_stream":{"type":"string","optional":true},"streams":{"type":["list","string"],"required":true},"transform_kql":{"type":"string","optional":true}}},"required":true},"data_sources":{"nesting_mode":3,"block":{"block_types":{"data_import":{"nesting_mode":3,"block":{"block_types":{"event_hub_data_source":{"nesting_mode":3,"block":{"attributes":{"consumer_group":{"type":"string","optional":true},"name":{"type":"string","required":true},"stream":{"type":"string","required":true}}},"required":true}}},"optional":true},"extension":{"nesting_mode":3,"block":{"attributes":{"extension_json":{"type":"string","optional":true},"extension_name":{"type":"string","required":true},"input_data_sources":{"type":["list","string"],"optional":true},"name":{"type":"string","required":true},"streams":{"type":["list","string"],"required":true}}},"optional":true},"iis_log":{"nesting_mode":3,"block":{"attributes":{"log_directories":{"type":["list","string"],"optional":true},"name":{"type":"string","required":true},"streams":{"type":["list","string"],"required":true}}},"optional":true},"log_file":{"nesting_mode":3,"block":{"attributes":{"file_patterns":{"type":["list","string"],"required":true},"format":{"type":"string","required":true},"name":{"type":"string","required":true},"streams":{"type":["list","string"],"required":true}},"block_types":{"settings":{"nesting_mode":3,"block":{"block_types":{"text":{"nesting_mode":3,"block":{"attributes":{"record_start_timestamp_format":{"type":"string","required":true}}},"required":true}}},"optional":true}}},"optional":true},"performance_counter":{"nesting_mode":3,"block":{"attributes":{"counter_specifiers":{"type":["list","string"],"required":true},"name":{"type":"string","required":true},"sampling_frequency_in_seconds":{"type":"number","required":true},"streams":{"type":["list","string"],"required":true}}},"optional":true},"platform_telemetry":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"streams":{"type":["list","string"],"required":true}}},"optional":true},"prometheus_forwarder":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"streams":{"type":["list","string"],"required":true}},"block_types":{"label_include_filter":{"nesting_mode":4,"block":{"attributes":{"label":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true},"syslog":{"nesting_mode":3,"block":{"attributes":{"facility_names":{"type":["list","string"],"required":true},"log_levels":{"type":["list","string"],"required":true},"name":{"type":"string","required":true},"streams":{"type":["list","string"],"required":true}}},"optional":true},"windows_event_log":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"streams":{"type":["list","string"],"required":true},"x_path_queries":{"type":["list","string"],"required":true}}},"optional":true},"windows_firewall_log":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"streams":{"type":["list","string"],"required":true}}},"optional":true}}},"optional":true},"destinations":{"nesting_mode":3,"block":{"block_types":{"azure_monitor_metrics":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["destinations.0.azure_monitor_metrics","destinations.0.event_hub","destinations.0.event_hub_direct","destinations.0.log_analytics","destinations.0.monitor_account","destinations.0.storage_blob","destinations.0.storage_blob_direct","destinations.0.storage_table_direct"]},"event_hub":{"nesting_mode":3,"block":{"attributes":{"event_hub_id":{"type":"string","required":true},"name":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["destinations.0.azure_monitor_metrics","destinations.0.event_hub","destinations.0.event_hub_direct","destinations.0.log_analytics","destinations.0.monitor_account","destinations.0.storage_blob","destinations.0.storage_blob_direct","destinations.0.storage_table_direct"]},"event_hub_direct":{"nesting_mode":3,"block":{"attributes":{"event_hub_id":{"type":"string","required":true},"name":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["destinations.0.azure_monitor_metrics","destinations.0.event_hub","destinations.0.event_hub_direct","destinations.0.log_analytics","destinations.0.monitor_account","destinations.0.storage_blob","destinations.0.storage_blob_direct","destinations.0.storage_table_direct"]},"log_analytics":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"workspace_resource_id":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["destinations.0.azure_monitor_metrics","destinations.0.event_hub","destinations.0.event_hub_direct","destinations.0.log_analytics","destinations.0.monitor_account","destinations.0.storage_blob","destinations.0.storage_blob_direct","destinations.0.storage_table_direct"]},"monitor_account":{"nesting_mode":3,"block":{"attributes":{"monitor_account_id":{"type":"string","required":true},"name":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["destinations.0.azure_monitor_metrics","destinations.0.event_hub","destinations.0.event_hub_direct","destinations.0.log_analytics","destinations.0.monitor_account","destinations.0.storage_blob","destinations.0.storage_blob_direct","destinations.0.storage_table_direct"]},"storage_blob":{"nesting_mode":3,"block":{"attributes":{"container_name":{"type":"string","required":true},"name":{"type":"string","required":true},"storage_account_id":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["destinations.0.azure_monitor_metrics","destinations.0.event_hub","destinations.0.event_hub_direct","destinations.0.log_analytics","destinations.0.monitor_account","destinations.0.storage_blob","destinations.0.storage_blob_direct","destinations.0.storage_table_direct"]},"storage_blob_direct":{"nesting_mode":3,"block":{"attributes":{"container_name":{"type":"string","required":true},"name":{"type":"string","required":true},"storage_account_id":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["destinations.0.azure_monitor_metrics","destinations.0.event_hub","destinations.0.event_hub_direct","destinations.0.log_analytics","destinations.0.monitor_account","destinations.0.storage_blob","destinations.0.storage_blob_direct","destinations.0.storage_table_direct"]},"storage_table_direct":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"storage_account_id":{"type":"string","required":true},"table_name":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["destinations.0.azure_monitor_metrics","destinations.0.event_hub","destinations.0.event_hub_direct","destinations.0.log_analytics","destinations.0.monitor_account","destinations.0.storage_blob","destinations.0.storage_blob_direct","destinations.0.storage_table_direct"]}}},"required":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"stream_declaration":{"nesting_mode":4,"block":{"attributes":{"stream_name":{"type":"string","required":true}},"block_types":{"column":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"type":{"type":"string","required":true}}},"required":true}}},"optional":true}}}},"azurerm_monitor_data_collection_rule_association":{"block":{"attributes":{"data_collection_endpoint_id":{"type":"string","optional":true,"exactly_one_of":["data_collection_endpoint_id","data_collection_rule_id"]},"data_collection_rule_id":{"type":"string","optional":true,"exactly_one_of":["data_collection_endpoint_id","data_collection_rule_id"],"required_with":["name"]},"description":{"type":"string","optional":true},"name":{"type":"string","optional":true,"default":"configurationAccessEndpoint"},"target_resource_id":{"type":"string","required":true}}}},"azurerm_monitor_diagnostic_setting":{"block":{"attributes":{"eventhub_authorization_rule_id":{"type":"string","optional":true,"at_least_one_of":["eventhub_authorization_rule_id","log_analytics_workspace_id","storage_account_id","partner_solution_id"]},"eventhub_name":{"type":"string","optional":true},"log_analytics_destination_type":{"type":"string","optional":true,"computed":true},"log_analytics_workspace_id":{"type":"string","optional":true,"at_least_one_of":["eventhub_authorization_rule_id","log_analytics_workspace_id","storage_account_id","partner_solution_id"]},"name":{"type":"string","required":true},"partner_solution_id":{"type":"string","optional":true,"at_least_one_of":["eventhub_authorization_rule_id","log_analytics_workspace_id","storage_account_id","partner_solution_id"]},"storage_account_id":{"type":"string","optional":true,"at_least_one_of":["eventhub_authorization_rule_id","log_analytics_workspace_id","storage_account_id","partner_solution_id"]},"target_resource_id":{"type":"string","required":true}},"block_types":{"enabled_log":{"nesting_mode":4,"block":{"attributes":{"category":{"type":"string","optional":true},"category_group":{"type":"string","optional":true}},"block_types":{"retention_policy":{"nesting_mode":3,"block":{"attributes":{"days":{"type":"number","optional":true},"enabled":{"type":"bool","required":true}}},"optional":true}}},"optional":true,"at_least_one_of":["enabled_log","metric"]},"metric":{"nesting_mode":4,"block":{"attributes":{"category":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":true}},"block_types":{"retention_policy":{"nesting_mode":3,"block":{"attributes":{"days":{"type":"number","optional":true},"enabled":{"type":"bool","required":true}}},"optional":true}}},"optional":true,"at_least_one_of":["enabled_log","metric"]}}}},"azurerm_monitor_metric_alert":{"block":{"attributes":{"auto_mitigate":{"type":"bool","optional":true,"default":true},"description":{"type":"string","optional":true},"enabled":{"type":"bool","optional":true,"default":true},"frequency":{"type":"string","optional":true,"default":"PT1M"},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"scopes":{"type":["set","string"],"required":true},"severity":{"type":"number","optional":true,"default":3},"tags":{"type":["map","string"],"optional":true},"target_resource_location":{"type":"string","optional":true,"computed":true},"target_resource_type":{"type":"string","optional":true,"computed":true},"window_size":{"type":"string","optional":true,"default":"PT5M"}},"block_types":{"action":{"nesting_mode":4,"block":{"attributes":{"action_group_id":{"type":"string","required":true},"webhook_properties":{"type":["map","string"],"optional":true}}},"optional":true},"application_insights_web_test_location_availability_criteria":{"nesting_mode":3,"block":{"attributes":{"component_id":{"type":"string","required":true},"failed_location_count":{"type":"number","required":true},"web_test_id":{"type":"string","required":true}}},"optional":true,"exactly_one_of":["criteria","dynamic_criteria","application_insights_web_test_location_availability_criteria"]},"criteria":{"nesting_mode":3,"block":{"attributes":{"aggregation":{"type":"string","required":true},"metric_name":{"type":"string","required":true},"metric_namespace":{"type":"string","required":true},"operator":{"type":"string","required":true},"skip_metric_validation":{"type":"bool","optional":true,"default":false},"threshold":{"type":"number","required":true}},"block_types":{"dimension":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true}}},"optional":true,"exactly_one_of":["criteria","dynamic_criteria","application_insights_web_test_location_availability_criteria"]},"dynamic_criteria":{"nesting_mode":3,"block":{"attributes":{"aggregation":{"type":"string","required":true},"alert_sensitivity":{"type":"string","required":true},"evaluation_failure_count":{"type":"number","optional":true,"default":4},"evaluation_total_count":{"type":"number","optional":true,"default":4},"ignore_data_before":{"type":"string","optional":true},"metric_name":{"type":"string","required":true},"metric_namespace":{"type":"string","required":true},"operator":{"type":"string","required":true},"skip_metric_validation":{"type":"bool","optional":true}},"block_types":{"dimension":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true}}},"optional":true,"exactly_one_of":["criteria","dynamic_criteria","application_insights_web_test_location_availability_criteria"]}}}},"azurerm_monitor_private_link_scope":{"block":{"attributes":{"ingestion_access_mode":{"type":"string","optional":true,"default":"Open"},"name":{"type":"string","required":true},"query_access_mode":{"type":"string","optional":true,"default":"Open"},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_monitor_private_link_scoped_service":{"block":{"attributes":{"linked_resource_id":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"scope_name":{"type":"string","required":true}}}},"azurerm_monitor_scheduled_query_rules_alert":{"block":{"attributes":{"authorized_resource_ids":{"type":["set","string"],"optional":true},"auto_mitigation_enabled":{"type":"bool","optional":true,"default":false,"conflicts_with":["throttling"]},"data_source_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"enabled":{"type":"bool","optional":true,"default":true},"frequency":{"type":"number","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"query":{"type":"string","required":true},"query_type":{"type":"string","optional":true,"default":"ResultCount"},"resource_group_name":{"type":"string","required":true},"severity":{"type":"number","optional":true},"tags":{"type":["map","string"],"optional":true},"throttling":{"type":"number","optional":true,"conflicts_with":["auto_mitigation_enabled"]},"time_window":{"type":"number","required":true}},"block_types":{"action":{"nesting_mode":3,"block":{"attributes":{"action_group":{"type":["set","string"],"required":true},"custom_webhook_payload":{"type":"string","optional":true},"email_subject":{"type":"string","optional":true}}},"required":true},"trigger":{"nesting_mode":3,"block":{"attributes":{"operator":{"type":"string","required":true},"threshold":{"type":"number","required":true}},"block_types":{"metric_trigger":{"nesting_mode":3,"block":{"attributes":{"metric_column":{"type":"string","optional":true},"metric_trigger_type":{"type":"string","required":true},"operator":{"type":"string","required":true},"threshold":{"type":"number","required":true}}},"optional":true}}},"required":true}}}},"azurerm_monitor_scheduled_query_rules_alert_v2":{"block":{"attributes":{"auto_mitigation_enabled":{"type":"bool","optional":true,"default":false},"created_with_api_version":{"type":"string","computed":true},"description":{"type":"string","optional":true},"display_name":{"type":"string","optional":true},"enabled":{"type":"bool","optional":true,"default":true},"evaluation_frequency":{"type":"string","required":true},"is_a_legacy_log_analytics_rule":{"type":"bool","computed":true},"is_workspace_alerts_storage_configured":{"type":"bool","computed":true},"location":{"type":"string","required":true},"mute_actions_after_alert_duration":{"type":"string","optional":true},"name":{"type":"string","required":true},"query_time_range_override":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"scopes":{"type":["list","string"],"required":true},"severity":{"type":"number","required":true},"skip_query_validation":{"type":"bool","optional":true},"tags":{"type":["map","string"],"optional":true},"target_resource_types":{"type":["list","string"],"optional":true},"window_duration":{"type":"string","required":true},"workspace_alerts_storage_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"action":{"nesting_mode":3,"block":{"attributes":{"action_groups":{"type":["list","string"],"optional":true},"custom_properties":{"type":["map","string"],"optional":true}}},"optional":true},"criteria":{"nesting_mode":3,"block":{"attributes":{"metric_measure_column":{"type":"string","optional":true},"operator":{"type":"string","required":true},"query":{"type":"string","required":true},"resource_id_column":{"type":"string","optional":true},"threshold":{"type":"number","required":true},"time_aggregation_method":{"type":"string","required":true}},"block_types":{"dimension":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true},"failing_periods":{"nesting_mode":3,"block":{"attributes":{"minimum_failing_periods_to_trigger_alert":{"type":"number","required":true},"number_of_evaluation_periods":{"type":"number","required":true}}},"optional":true}}},"required":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_monitor_scheduled_query_rules_log":{"block":{"attributes":{"authorized_resource_ids":{"type":["set","string"],"optional":true},"data_source_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"criteria":{"nesting_mode":3,"block":{"attributes":{"metric_name":{"type":"string","required":true}},"block_types":{"dimension":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"operator":{"type":"string","optional":true,"default":"Include"},"values":{"type":["list","string"],"required":true}}},"required":true}}},"required":true}}}},"azurerm_monitor_smart_detector_alert_rule":{"block":{"attributes":{"description":{"type":"string","optional":true},"detector_type":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":true},"frequency":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"scope_resource_ids":{"type":["set","string"],"required":true},"severity":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"throttling_duration":{"type":"string","optional":true}},"block_types":{"action_group":{"nesting_mode":3,"block":{"attributes":{"email_subject":{"type":"string","optional":true},"ids":{"type":["set","string"],"required":true},"webhook_payload":{"type":"string","optional":true}}},"required":true}}}},"azurerm_monitor_workspace":{"block":{"attributes":{"default_data_collection_endpoint_id":{"type":"string","computed":true},"default_data_collection_rule_id":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"query_endpoint":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_mssql_database":{"block":{"attributes":{"auto_pause_delay_in_minutes":{"type":"number","optional":true,"computed":true},"collation":{"type":"string","optional":true,"computed":true},"create_mode":{"type":"string","optional":true,"default":"Default","conflicts_with":["import"]},"creation_source_database_id":{"type":"string","optional":true,"computed":true},"elastic_pool_id":{"type":"string","optional":true},"enclave_type":{"type":"string","optional":true,"computed":true},"geo_backup_enabled":{"type":"bool","optional":true,"default":true},"ledger_enabled":{"type":"bool","optional":true,"computed":true},"license_type":{"type":"string","optional":true,"computed":true},"maintenance_configuration_name":{"type":"string","optional":true,"computed":true,"conflicts_with":["elastic_pool_id"]},"max_size_gb":{"type":"number","optional":true,"computed":true},"min_capacity":{"type":"number","optional":true,"computed":true},"name":{"type":"string","required":true},"read_replica_count":{"type":"number","optional":true,"computed":true},"read_scale":{"type":"bool","optional":true,"computed":true},"recover_database_id":{"type":"string","optional":true},"recovery_point_id":{"type":"string","optional":true},"restore_dropped_database_id":{"type":"string","optional":true},"restore_long_term_retention_backup_id":{"type":"string","optional":true},"restore_point_in_time":{"type":"string","optional":true,"computed":true},"sample_name":{"type":"string","optional":true,"computed":true},"secondary_type":{"type":"string","optional":true,"computed":true},"server_id":{"type":"string","required":true},"sku_name":{"type":"string","optional":true,"computed":true},"storage_account_type":{"type":"string","optional":true,"default":"Geo"},"tags":{"type":["map","string"],"optional":true},"transparent_data_encryption_enabled":{"type":"bool","optional":true,"default":true},"transparent_data_encryption_key_automatic_rotation_enabled":{"type":"bool","optional":true,"default":false,"required_with":["transparent_data_encryption_key_vault_key_id"]},"transparent_data_encryption_key_vault_key_id":{"type":"string","optional":true},"zone_redundant":{"type":"bool","optional":true,"computed":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"required":true},"type":{"type":"string","required":true}}},"optional":true},"import":{"nesting_mode":3,"block":{"attributes":{"administrator_login":{"type":"string","required":true},"administrator_login_password":{"type":"string","required":true},"authentication_type":{"type":"string","required":true},"storage_account_id":{"type":"string","optional":true},"storage_key":{"type":"string","required":true},"storage_key_type":{"type":"string","required":true},"storage_uri":{"type":"string","required":true}}},"optional":true,"conflicts_with":["create_mode"]},"long_term_retention_policy":{"nesting_mode":3,"block":{"attributes":{"monthly_retention":{"type":"string","optional":true,"computed":true,"at_least_one_of":["long_term_retention_policy.0.weekly_retention","long_term_retention_policy.0.monthly_retention","long_term_retention_policy.0.yearly_retention","long_term_retention_policy.0.week_of_year"]},"week_of_year":{"type":"number","optional":true,"computed":true,"at_least_one_of":["long_term_retention_policy.0.weekly_retention","long_term_retention_policy.0.monthly_retention","long_term_retention_policy.0.yearly_retention","long_term_retention_policy.0.week_of_year"]},"weekly_retention":{"type":"string","optional":true,"computed":true,"at_least_one_of":["long_term_retention_policy.0.weekly_retention","long_term_retention_policy.0.monthly_retention","long_term_retention_policy.0.yearly_retention","long_term_retention_policy.0.week_of_year"]},"yearly_retention":{"type":"string","optional":true,"computed":true,"at_least_one_of":["long_term_retention_policy.0.weekly_retention","long_term_retention_policy.0.monthly_retention","long_term_retention_policy.0.yearly_retention","long_term_retention_policy.0.week_of_year"]}}},"optional":true,"computed":true},"short_term_retention_policy":{"nesting_mode":3,"block":{"attributes":{"backup_interval_in_hours":{"type":"number","optional":true,"default":12},"retention_days":{"type":"number","required":true}}},"optional":true,"computed":true},"threat_detection_policy":{"nesting_mode":3,"block":{"attributes":{"disabled_alerts":{"type":["set","string"],"optional":true},"email_account_admins":{"type":"string","optional":true,"default":"Disabled"},"email_addresses":{"type":["set","string"],"optional":true},"retention_days":{"type":"number","optional":true},"state":{"type":"string","optional":true,"default":"Disabled"},"storage_account_access_key":{"type":"string","optional":true},"storage_endpoint":{"type":"string","optional":true}}},"optional":true,"computed":true}}}},"azurerm_mssql_database_extended_auditing_policy":{"block":{"attributes":{"database_id":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":true},"log_monitoring_enabled":{"type":"bool","optional":true,"default":true},"retention_in_days":{"type":"number","optional":true,"default":0},"storage_account_access_key":{"type":"string","optional":true},"storage_account_access_key_is_secondary":{"type":"bool","optional":true,"default":false},"storage_endpoint":{"type":"string","optional":true}}}},"azurerm_mssql_database_vulnerability_assessment_rule_baseline":{"block":{"attributes":{"baseline_name":{"type":"string","optional":true,"default":"default"},"database_name":{"type":"string","required":true},"rule_id":{"type":"string","required":true},"server_vulnerability_assessment_id":{"type":"string","required":true}},"block_types":{"baseline_result":{"nesting_mode":4,"block":{"attributes":{"result":{"type":["list","string"],"required":true}}},"required":true}}}},"azurerm_mssql_elasticpool":{"block":{"attributes":{"enclave_type":{"type":"string","optional":true,"computed":true},"license_type":{"type":"string","optional":true,"computed":true},"location":{"type":"string","required":true},"maintenance_configuration_name":{"type":"string","optional":true,"default":"SQL_Default"},"max_size_bytes":{"type":"number","optional":true,"computed":true,"conflicts_with":["max_size_gb"]},"max_size_gb":{"type":"number","optional":true,"computed":true,"conflicts_with":["max_size_bytes"]},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"server_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"zone_redundant":{"type":"bool","optional":true}},"block_types":{"per_database_settings":{"nesting_mode":3,"block":{"attributes":{"max_capacity":{"type":"number","required":true},"min_capacity":{"type":"number","required":true}}},"required":true},"sku":{"nesting_mode":3,"block":{"attributes":{"capacity":{"type":"number","required":true},"family":{"type":"string","optional":true},"name":{"type":"string","required":true},"tier":{"type":"string","required":true}}},"required":true}}}},"azurerm_mssql_failover_group":{"block":{"attributes":{"databases":{"type":["set","string"],"optional":true},"name":{"type":"string","required":true},"readonly_endpoint_failover_policy_enabled":{"type":"bool","optional":true,"computed":true},"server_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"partner_server":{"nesting_mode":3,"block":{"attributes":{"id":{"type":"string","required":true},"location":{"type":"string","computed":true},"role":{"type":"string","computed":true}}},"required":true},"read_write_endpoint_failover_policy":{"nesting_mode":3,"block":{"attributes":{"grace_minutes":{"type":"number","optional":true},"mode":{"type":"string","required":true}}},"required":true}}}},"azurerm_mssql_firewall_rule":{"block":{"attributes":{"end_ip_address":{"type":"string","required":true},"name":{"type":"string","required":true},"server_id":{"type":"string","required":true},"start_ip_address":{"type":"string","required":true}}}},"azurerm_mssql_job_agent":{"block":{"attributes":{"database_id":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_mssql_job_credential":{"block":{"attributes":{"job_agent_id":{"type":"string","required":true},"name":{"type":"string","required":true},"password":{"type":"string","required":true},"username":{"type":"string","required":true}}}},"azurerm_mssql_managed_database":{"block":{"attributes":{"managed_instance_id":{"type":"string","required":true},"name":{"type":"string","required":true},"short_term_retention_days":{"type":"number","optional":true,"default":7}},"block_types":{"long_term_retention_policy":{"nesting_mode":3,"block":{"attributes":{"monthly_retention":{"type":"string","optional":true,"computed":true,"at_least_one_of":["long_term_retention_policy.0.weekly_retention","long_term_retention_policy.0.monthly_retention","long_term_retention_policy.0.yearly_retention","long_term_retention_policy.0.week_of_year"]},"week_of_year":{"type":"number","optional":true,"computed":true,"at_least_one_of":["long_term_retention_policy.0.weekly_retention","long_term_retention_policy.0.monthly_retention","long_term_retention_policy.0.yearly_retention","long_term_retention_policy.0.week_of_year"]},"weekly_retention":{"type":"string","optional":true,"computed":true,"at_least_one_of":["long_term_retention_policy.0.weekly_retention","long_term_retention_policy.0.monthly_retention","long_term_retention_policy.0.yearly_retention","long_term_retention_policy.0.week_of_year"]},"yearly_retention":{"type":"string","optional":true,"computed":true,"at_least_one_of":["long_term_retention_policy.0.weekly_retention","long_term_retention_policy.0.monthly_retention","long_term_retention_policy.0.yearly_retention","long_term_retention_policy.0.week_of_year"]}}},"optional":true,"computed":true},"point_in_time_restore":{"nesting_mode":3,"block":{"attributes":{"restore_point_in_time":{"type":"string","required":true},"source_database_id":{"type":"string","required":true}}},"optional":true}}}},"azurerm_mssql_managed_instance":{"block":{"attributes":{"administrator_login":{"type":"string","required":true},"administrator_login_password":{"type":"string","required":true},"collation":{"type":"string","optional":true,"default":"SQL_Latin1_General_CP1_CI_AS"},"dns_zone":{"type":"string","computed":true},"dns_zone_partner_id":{"type":"string","optional":true},"fqdn":{"type":"string","computed":true},"license_type":{"type":"string","required":true},"location":{"type":"string","required":true},"maintenance_configuration_name":{"type":"string","optional":true,"default":"SQL_Default"},"minimum_tls_version":{"type":"string","optional":true,"default":"1.2"},"name":{"type":"string","required":true},"proxy_override":{"type":"string","optional":true,"default":"Default"},"public_data_endpoint_enabled":{"type":"bool","optional":true,"default":false},"resource_group_name":{"type":"string","required":true},"service_principal_type":{"type":"string","optional":true},"sku_name":{"type":"string","required":true},"storage_account_type":{"type":"string","optional":true,"default":"GRS"},"storage_size_in_gb":{"type":"number","required":true},"subnet_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"timezone_id":{"type":"string","optional":true,"default":"UTC"},"vcores":{"type":"number","required":true},"zone_redundant_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_mssql_managed_instance_active_directory_administrator":{"block":{"attributes":{"azuread_authentication_only":{"type":"bool","optional":true},"login_username":{"type":"string","required":true},"managed_instance_id":{"type":"string","required":true},"object_id":{"type":"string","required":true},"tenant_id":{"type":"string","required":true}}}},"azurerm_mssql_managed_instance_failover_group":{"block":{"attributes":{"location":{"type":"string","required":true},"managed_instance_id":{"type":"string","required":true},"name":{"type":"string","required":true},"partner_managed_instance_id":{"type":"string","required":true},"partner_region":{"type":["list",["object",{"location":"string","role":"string"}]],"computed":true},"readonly_endpoint_failover_policy_enabled":{"type":"bool","optional":true,"default":true},"role":{"type":"string","computed":true}},"block_types":{"read_write_endpoint_failover_policy":{"nesting_mode":3,"block":{"attributes":{"grace_minutes":{"type":"number","optional":true},"mode":{"type":"string","required":true}}},"required":true}}}},"azurerm_mssql_managed_instance_security_alert_policy":{"block":{"attributes":{"disabled_alerts":{"type":["set","string"],"optional":true},"email_account_admins_enabled":{"type":"bool","optional":true,"default":false},"email_addresses":{"type":["set","string"],"optional":true},"enabled":{"type":"bool","optional":true},"managed_instance_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"retention_days":{"type":"number","optional":true,"default":0},"storage_account_access_key":{"type":"string","optional":true},"storage_endpoint":{"type":"string","optional":true}}}},"azurerm_mssql_managed_instance_transparent_data_encryption":{"block":{"attributes":{"auto_rotation_enabled":{"type":"bool","optional":true,"default":false},"key_vault_key_id":{"type":"string","optional":true},"managed_instance_id":{"type":"string","required":true}}}},"azurerm_mssql_managed_instance_vulnerability_assessment":{"block":{"attributes":{"managed_instance_id":{"type":"string","required":true},"storage_account_access_key":{"type":"string","optional":true},"storage_container_path":{"type":"string","required":true},"storage_container_sas_key":{"type":"string","optional":true}},"block_types":{"recurring_scans":{"nesting_mode":3,"block":{"attributes":{"email_subscription_admins":{"type":"bool","optional":true,"default":true},"emails":{"type":["list","string"],"optional":true},"enabled":{"type":"bool","optional":true,"default":false}}},"optional":true,"computed":true}}}},"azurerm_mssql_outbound_firewall_rule":{"block":{"attributes":{"name":{"type":"string","required":true},"server_id":{"type":"string","required":true}}}},"azurerm_mssql_server":{"block":{"attributes":{"administrator_login":{"type":"string","optional":true,"computed":true,"at_least_one_of":["administrator_login","azuread_administrator.0.azuread_authentication_only"],"required_with":["administrator_login","administrator_login_password"]},"administrator_login_password":{"type":"string","optional":true,"at_least_one_of":["administrator_login_password","azuread_administrator.0.azuread_authentication_only"],"required_with":["administrator_login","administrator_login_password"]},"connection_policy":{"type":"string","optional":true,"default":"Default"},"fully_qualified_domain_name":{"type":"string","computed":true},"location":{"type":"string","required":true},"minimum_tls_version":{"type":"string","optional":true,"default":"1.2"},"name":{"type":"string","required":true},"outbound_network_restriction_enabled":{"type":"bool","optional":true,"default":false},"primary_user_assigned_identity_id":{"type":"string","optional":true,"computed":true,"required_with":["identity"]},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"restorable_dropped_database_ids":{"type":["list","string"],"computed":true},"tags":{"type":["map","string"],"optional":true},"transparent_data_encryption_key_vault_key_id":{"type":"string","optional":true},"version":{"type":"string","required":true}},"block_types":{"azuread_administrator":{"nesting_mode":3,"block":{"attributes":{"azuread_authentication_only":{"type":"bool","optional":true,"computed":true},"login_username":{"type":"string","required":true},"object_id":{"type":"string","required":true},"tenant_id":{"type":"string","optional":true,"computed":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_mssql_server_dns_alias":{"block":{"attributes":{"dns_record":{"type":"string","computed":true},"mssql_server_id":{"type":"string","required":true},"name":{"type":"string","required":true}}}},"azurerm_mssql_server_extended_auditing_policy":{"block":{"attributes":{"audit_actions_and_groups":{"type":["list","string"],"optional":true,"computed":true},"enabled":{"type":"bool","optional":true,"default":true},"log_monitoring_enabled":{"type":"bool","optional":true,"default":true},"predicate_expression":{"type":"string","optional":true},"retention_in_days":{"type":"number","optional":true,"default":0},"server_id":{"type":"string","required":true},"storage_account_access_key":{"type":"string","optional":true},"storage_account_access_key_is_secondary":{"type":"bool","optional":true,"default":false},"storage_account_subscription_id":{"type":"string","optional":true},"storage_endpoint":{"type":"string","optional":true}}}},"azurerm_mssql_server_microsoft_support_auditing_policy":{"block":{"attributes":{"blob_storage_endpoint":{"type":"string","optional":true},"enabled":{"type":"bool","optional":true,"default":true},"log_monitoring_enabled":{"type":"bool","optional":true,"default":true},"server_id":{"type":"string","required":true},"storage_account_access_key":{"type":"string","optional":true},"storage_account_subscription_id":{"type":"string","optional":true}}}},"azurerm_mssql_server_security_alert_policy":{"block":{"attributes":{"disabled_alerts":{"type":["set","string"],"optional":true},"email_account_admins":{"type":"bool","optional":true,"default":false},"email_addresses":{"type":["set","string"],"optional":true},"resource_group_name":{"type":"string","required":true},"retention_days":{"type":"number","optional":true,"default":0},"server_name":{"type":"string","required":true},"state":{"type":"string","required":true},"storage_account_access_key":{"type":"string","optional":true},"storage_endpoint":{"type":"string","optional":true}}}},"azurerm_mssql_server_transparent_data_encryption":{"block":{"attributes":{"auto_rotation_enabled":{"type":"bool","optional":true,"default":false},"key_vault_key_id":{"type":"string","optional":true,"conflicts_with":["managed_hsm_key_id"]},"managed_hsm_key_id":{"type":"string","optional":true,"conflicts_with":["key_vault_key_id"]},"server_id":{"type":"string","required":true}}}},"azurerm_mssql_server_vulnerability_assessment":{"block":{"attributes":{"server_security_alert_policy_id":{"type":"string","required":true},"storage_account_access_key":{"type":"string","optional":true},"storage_container_path":{"type":"string","required":true},"storage_container_sas_key":{"type":"string","optional":true}},"block_types":{"recurring_scans":{"nesting_mode":3,"block":{"attributes":{"email_subscription_admins":{"type":"bool","optional":true,"default":false},"emails":{"type":["list","string"],"optional":true},"enabled":{"type":"bool","optional":true,"default":false}}},"optional":true,"computed":true}}}},"azurerm_mssql_virtual_machine":{"block":{"attributes":{"r_services_enabled":{"type":"bool","optional":true},"sql_connectivity_port":{"type":"number","optional":true,"default":1433},"sql_connectivity_type":{"type":"string","optional":true,"default":"PRIVATE"},"sql_connectivity_update_password":{"type":"string","optional":true},"sql_connectivity_update_username":{"type":"string","optional":true},"sql_license_type":{"type":"string","optional":true},"sql_virtual_machine_group_id":{"type":"string","optional":true},"tags":{"type":["map","string"],"optional":true},"virtual_machine_id":{"type":"string","required":true}},"block_types":{"assessment":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"run_immediately":{"type":"bool","optional":true,"default":false}},"block_types":{"schedule":{"nesting_mode":3,"block":{"attributes":{"day_of_week":{"type":"string","required":true},"monthly_occurrence":{"type":"number","optional":true,"exactly_one_of":["assessment.0.schedule.0.weekly_interval"]},"start_time":{"type":"string","required":true},"weekly_interval":{"type":"number","optional":true,"exactly_one_of":["assessment.0.schedule.0.monthly_occurrence"]}}},"optional":true}}},"optional":true},"auto_backup":{"nesting_mode":3,"block":{"attributes":{"encryption_enabled":{"type":"bool","optional":true,"default":false},"encryption_password":{"type":"string","optional":true},"retention_period_in_days":{"type":"number","required":true},"storage_account_access_key":{"type":"string","required":true},"storage_blob_endpoint":{"type":"string","required":true},"system_databases_backup_enabled":{"type":"bool","optional":true}},"block_types":{"manual_schedule":{"nesting_mode":3,"block":{"attributes":{"days_of_week":{"type":["set","string"],"optional":true},"full_backup_frequency":{"type":"string","required":true},"full_backup_start_hour":{"type":"number","required":true},"full_backup_window_in_hours":{"type":"number","required":true},"log_backup_frequency_in_minutes":{"type":"number","required":true}}},"optional":true}}},"optional":true},"auto_patching":{"nesting_mode":3,"block":{"attributes":{"day_of_week":{"type":"string","required":true},"maintenance_window_duration_in_minutes":{"type":"number","required":true},"maintenance_window_starting_hour":{"type":"number","required":true}}},"optional":true},"key_vault_credential":{"nesting_mode":3,"block":{"attributes":{"key_vault_url":{"type":"string","required":true},"name":{"type":"string","required":true},"service_principal_name":{"type":"string","required":true},"service_principal_secret":{"type":"string","required":true}}},"optional":true},"sql_instance":{"nesting_mode":3,"block":{"attributes":{"adhoc_workloads_optimization_enabled":{"type":"bool","optional":true,"default":false},"collation":{"type":"string","optional":true,"default":"SQL_Latin1_General_CP1_CI_AS"},"instant_file_initialization_enabled":{"type":"bool","optional":true,"default":false},"lock_pages_in_memory_enabled":{"type":"bool","optional":true,"default":false},"max_dop":{"type":"number","optional":true,"default":0},"max_server_memory_mb":{"type":"number","optional":true,"default":2147483647},"min_server_memory_mb":{"type":"number","optional":true,"default":0}}},"optional":true},"storage_configuration":{"nesting_mode":3,"block":{"attributes":{"disk_type":{"type":"string","required":true},"storage_workload_type":{"type":"string","required":true},"system_db_on_data_disk_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"data_settings":{"nesting_mode":3,"block":{"attributes":{"default_file_path":{"type":"string","required":true},"luns":{"type":["list","number"],"required":true}}},"optional":true},"log_settings":{"nesting_mode":3,"block":{"attributes":{"default_file_path":{"type":"string","required":true},"luns":{"type":["list","number"],"required":true}}},"optional":true},"temp_db_settings":{"nesting_mode":3,"block":{"attributes":{"data_file_count":{"type":"number","optional":true,"default":8},"data_file_growth_in_mb":{"type":"number","optional":true,"default":512},"data_file_size_mb":{"type":"number","optional":true,"default":256},"default_file_path":{"type":"string","required":true},"log_file_growth_mb":{"type":"number","optional":true,"default":512},"log_file_size_mb":{"type":"number","optional":true,"default":256},"luns":{"type":["list","number"],"required":true}}},"optional":true}}},"optional":true},"wsfc_domain_credential":{"nesting_mode":3,"block":{"attributes":{"cluster_bootstrap_account_password":{"type":"string","required":true},"cluster_operator_account_password":{"type":"string","required":true},"sql_service_account_password":{"type":"string","required":true}}},"optional":true}}}},"azurerm_mssql_virtual_machine_availability_group_listener":{"block":{"attributes":{"availability_group_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"port":{"type":"number","optional":true},"sql_virtual_machine_group_id":{"type":"string","required":true}},"block_types":{"load_balancer_configuration":{"nesting_mode":3,"block":{"attributes":{"load_balancer_id":{"type":"string","required":true},"private_ip_address":{"type":"string","required":true},"probe_port":{"type":"number","required":true},"sql_virtual_machine_ids":{"type":["set","string"],"required":true},"subnet_id":{"type":"string","required":true}}},"optional":true,"exactly_one_of":["load_balancer_configuration","multi_subnet_ip_configuration"]},"multi_subnet_ip_configuration":{"nesting_mode":4,"block":{"attributes":{"private_ip_address":{"type":"string","required":true},"sql_virtual_machine_id":{"type":"string","required":true},"subnet_id":{"type":"string","required":true}}},"optional":true,"exactly_one_of":["load_balancer_configuration","multi_subnet_ip_configuration"]},"replica":{"nesting_mode":4,"block":{"attributes":{"commit":{"type":"string","required":true},"failover_mode":{"type":"string","required":true},"readable_secondary":{"type":"string","required":true},"role":{"type":"string","required":true},"sql_virtual_machine_id":{"type":"string","required":true}}},"required":true}}}},"azurerm_mssql_virtual_machine_group":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"sql_image_offer":{"type":"string","required":true},"sql_image_sku":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"wsfc_domain_profile":{"nesting_mode":3,"block":{"attributes":{"cluster_bootstrap_account_name":{"type":"string","optional":true},"cluster_operator_account_name":{"type":"string","optional":true},"cluster_subnet_type":{"type":"string","required":true},"fqdn":{"type":"string","required":true},"organizational_unit_path":{"type":"string","optional":true},"sql_service_account_name":{"type":"string","optional":true},"storage_account_primary_key":{"type":"string","optional":true},"storage_account_url":{"type":"string","optional":true}}},"required":true}}}},"azurerm_mssql_virtual_network_rule":{"block":{"attributes":{"ignore_missing_vnet_service_endpoint":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"server_id":{"type":"string","required":true},"subnet_id":{"type":"string","required":true}}}},"azurerm_mysql_flexible_database":{"block":{"attributes":{"charset":{"type":"string","required":true},"collation":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"server_name":{"type":"string","required":true}}}},"azurerm_mysql_flexible_server":{"block":{"attributes":{"administrator_login":{"type":"string","optional":true,"computed":true},"administrator_password":{"type":"string","optional":true},"backup_retention_days":{"type":"number","optional":true,"default":7},"create_mode":{"type":"string","optional":true},"delegated_subnet_id":{"type":"string","optional":true},"fqdn":{"type":"string","computed":true},"geo_redundant_backup_enabled":{"type":"bool","optional":true,"default":false},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"point_in_time_restore_time_in_utc":{"type":"string","optional":true},"private_dns_zone_id":{"type":"string","optional":true},"public_network_access_enabled":{"type":"bool","computed":true},"replica_capacity":{"type":"number","computed":true},"replication_role":{"type":"string","optional":true,"computed":true},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","optional":true,"computed":true},"source_server_id":{"type":"string","optional":true},"tags":{"type":["map","string"],"optional":true},"version":{"type":"string","optional":true,"computed":true},"zone":{"type":"string","optional":true}},"block_types":{"customer_managed_key":{"nesting_mode":3,"block":{"attributes":{"geo_backup_key_vault_key_id":{"type":"string","optional":true,"required_with":["identity","customer_managed_key.0.geo_backup_user_assigned_identity_id"]},"geo_backup_user_assigned_identity_id":{"type":"string","optional":true},"key_vault_key_id":{"type":"string","optional":true,"required_with":["identity","customer_managed_key.0.primary_user_assigned_identity_id"]},"primary_user_assigned_identity_id":{"type":"string","optional":true}}},"optional":true},"high_availability":{"nesting_mode":3,"block":{"attributes":{"mode":{"type":"string","required":true},"standby_availability_zone":{"type":"string","optional":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"required":true},"type":{"type":"string","required":true}}},"optional":true},"maintenance_window":{"nesting_mode":3,"block":{"attributes":{"day_of_week":{"type":"number","optional":true,"default":0},"start_hour":{"type":"number","optional":true,"default":0},"start_minute":{"type":"number","optional":true,"default":0}}},"optional":true},"storage":{"nesting_mode":3,"block":{"attributes":{"auto_grow_enabled":{"type":"bool","optional":true,"default":true},"io_scaling_enabled":{"type":"bool","optional":true,"default":false},"iops":{"type":"number","optional":true,"computed":true},"size_gb":{"type":"number","optional":true,"computed":true}}},"optional":true,"computed":true}}}},"azurerm_mysql_flexible_server_active_directory_administrator":{"block":{"attributes":{"identity_id":{"type":"string","required":true},"login":{"type":"string","required":true},"object_id":{"type":"string","required":true},"server_id":{"type":"string","required":true},"tenant_id":{"type":"string","required":true}}}},"azurerm_mysql_flexible_server_configuration":{"block":{"attributes":{"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"server_name":{"type":"string","required":true},"value":{"type":"string","required":true}}}},"azurerm_mysql_flexible_server_firewall_rule":{"block":{"attributes":{"end_ip_address":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"server_name":{"type":"string","required":true},"start_ip_address":{"type":"string","required":true}}}},"azurerm_nat_gateway":{"block":{"attributes":{"idle_timeout_in_minutes":{"type":"number","optional":true,"default":4},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"resource_guid":{"type":"string","computed":true},"sku_name":{"type":"string","optional":true,"default":"Standard"},"tags":{"type":["map","string"],"optional":true},"zones":{"type":["set","string"],"optional":true}}}},"azurerm_nat_gateway_public_ip_association":{"block":{"attributes":{"nat_gateway_id":{"type":"string","required":true},"public_ip_address_id":{"type":"string","required":true}}}},"azurerm_nat_gateway_public_ip_prefix_association":{"block":{"attributes":{"nat_gateway_id":{"type":"string","required":true},"public_ip_prefix_id":{"type":"string","required":true}}}},"azurerm_netapp_account":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"active_directory":{"nesting_mode":3,"block":{"attributes":{"aes_encryption_enabled":{"type":"bool","optional":true,"default":false},"dns_servers":{"type":["list","string"],"required":true},"domain":{"type":"string","required":true},"kerberos_ad_name":{"type":"string","optional":true},"kerberos_kdc_ip":{"type":"string","optional":true},"ldap_over_tls_enabled":{"type":"bool","optional":true,"default":false,"required_with":["active_directory.0.server_root_ca_certificate"]},"ldap_signing_enabled":{"type":"bool","optional":true,"default":false},"local_nfs_users_with_ldap_allowed":{"type":"bool","optional":true,"default":false},"organizational_unit":{"type":"string","optional":true,"default":"CN=Computers"},"password":{"type":"string","required":true},"server_root_ca_certificate":{"type":"string","optional":true,"required_with":["active_directory.0.ldap_over_tls_enabled"]},"site_name":{"type":"string","optional":true,"default":"Default-First-Site-Name"},"smb_server_name":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_netapp_account_encryption":{"block":{"attributes":{"encryption_key":{"type":"string","required":true},"netapp_account_id":{"type":"string","required":true},"system_assigned_identity_principal_id":{"type":"string","optional":true,"conflicts_with":["user_assigned_identity_id"]},"user_assigned_identity_id":{"type":"string","optional":true,"conflicts_with":["system_assigned_identity_principal_id"]}}}},"azurerm_netapp_pool":{"block":{"attributes":{"account_name":{"type":"string","required":true},"encryption_type":{"type":"string","optional":true,"default":"Single"},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"qos_type":{"type":"string","optional":true,"default":"Auto"},"resource_group_name":{"type":"string","required":true},"service_level":{"type":"string","required":true},"size_in_tb":{"type":"number","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_netapp_snapshot":{"block":{"attributes":{"account_name":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"pool_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"volume_name":{"type":"string","required":true}}}},"azurerm_netapp_snapshot_policy":{"block":{"attributes":{"account_name":{"type":"string","required":true},"enabled":{"type":"bool","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"daily_schedule":{"nesting_mode":3,"block":{"attributes":{"hour":{"type":"number","required":true},"minute":{"type":"number","required":true},"snapshots_to_keep":{"type":"number","required":true}}},"optional":true},"hourly_schedule":{"nesting_mode":3,"block":{"attributes":{"minute":{"type":"number","required":true},"snapshots_to_keep":{"type":"number","required":true}}},"optional":true},"monthly_schedule":{"nesting_mode":3,"block":{"attributes":{"days_of_month":{"type":["set","number"],"required":true},"hour":{"type":"number","required":true},"minute":{"type":"number","required":true},"snapshots_to_keep":{"type":"number","required":true}}},"optional":true},"weekly_schedule":{"nesting_mode":3,"block":{"attributes":{"days_of_week":{"type":["set","string"],"required":true},"hour":{"type":"number","required":true},"minute":{"type":"number","required":true},"snapshots_to_keep":{"type":"number","required":true}}},"optional":true}}}},"azurerm_netapp_volume":{"block":{"attributes":{"account_name":{"type":"string","required":true},"azure_vmware_data_store_enabled":{"type":"bool","optional":true,"default":false},"create_from_snapshot_resource_id":{"type":"string","optional":true},"encryption_key_source":{"type":"string","optional":true,"computed":true},"kerberos_enabled":{"type":"bool","optional":true},"key_vault_private_endpoint_id":{"type":"string","optional":true,"computed":true,"required_with":["encryption_key_source"]},"location":{"type":"string","required":true},"mount_ip_addresses":{"type":["list","string"],"computed":true},"name":{"type":"string","required":true},"network_features":{"type":"string","optional":true,"default":"Basic"},"pool_name":{"type":"string","required":true},"protocols":{"type":["set","string"],"optional":true,"computed":true},"resource_group_name":{"type":"string","required":true},"security_style":{"type":"string","optional":true,"computed":true},"service_level":{"type":"string","required":true},"smb3_protocol_encryption_enabled":{"type":"bool","optional":true},"smb_access_based_enumeration_enabled":{"type":"bool","optional":true,"default":false},"smb_continuous_availability_enabled":{"type":"bool","optional":true},"smb_non_browsable_enabled":{"type":"bool","optional":true,"default":false},"snapshot_directory_visible":{"type":"bool","optional":true,"computed":true},"storage_quota_in_gb":{"type":"number","required":true},"subnet_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"throughput_in_mibps":{"type":"number","optional":true,"computed":true},"volume_path":{"type":"string","required":true},"zone":{"type":"string","optional":true}},"block_types":{"data_protection_replication":{"nesting_mode":3,"block":{"attributes":{"endpoint_type":{"type":"string","optional":true,"default":"dst"},"remote_volume_location":{"type":"string","required":true},"remote_volume_resource_id":{"type":"string","required":true},"replication_frequency":{"type":"string","required":true}}},"optional":true},"data_protection_snapshot_policy":{"nesting_mode":3,"block":{"attributes":{"snapshot_policy_id":{"type":"string","required":true}}},"optional":true},"export_policy_rule":{"nesting_mode":3,"block":{"attributes":{"allowed_clients":{"type":["set","string"],"required":true},"kerberos_5_read_only_enabled":{"type":"bool","optional":true},"kerberos_5_read_write_enabled":{"type":"bool","optional":true},"kerberos_5i_read_only_enabled":{"type":"bool","optional":true},"kerberos_5i_read_write_enabled":{"type":"bool","optional":true},"kerberos_5p_read_only_enabled":{"type":"bool","optional":true},"kerberos_5p_read_write_enabled":{"type":"bool","optional":true},"protocols_enabled":{"type":["list","string"],"optional":true},"root_access_enabled":{"type":"bool","optional":true},"rule_index":{"type":"number","required":true},"unix_read_only":{"type":"bool","optional":true},"unix_read_write":{"type":"bool","optional":true}}},"optional":true}}}},"azurerm_netapp_volume_group_sap_hana":{"block":{"attributes":{"account_name":{"type":"string","required":true},"application_identifier":{"type":"string","required":true},"group_description":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}},"block_types":{"volume":{"nesting_mode":3,"block":{"attributes":{"capacity_pool_id":{"type":"string","required":true},"id":{"type":"string","computed":true},"mount_ip_addresses":{"type":["list","string"],"computed":true},"name":{"type":"string","required":true},"protocols":{"type":["list","string"],"required":true},"proximity_placement_group_id":{"type":"string","optional":true},"security_style":{"type":"string","required":true},"service_level":{"type":"string","required":true},"snapshot_directory_visible":{"type":"bool","required":true},"storage_quota_in_gb":{"type":"number","required":true},"subnet_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"throughput_in_mibps":{"type":"number","required":true},"volume_path":{"type":"string","required":true},"volume_spec_name":{"type":"string","required":true}},"block_types":{"data_protection_replication":{"nesting_mode":3,"block":{"attributes":{"endpoint_type":{"type":"string","optional":true,"default":"dst"},"remote_volume_location":{"type":"string","required":true},"remote_volume_resource_id":{"type":"string","required":true},"replication_frequency":{"type":"string","required":true}}},"optional":true},"data_protection_snapshot_policy":{"nesting_mode":3,"block":{"attributes":{"snapshot_policy_id":{"type":"string","required":true}}},"optional":true},"export_policy_rule":{"nesting_mode":3,"block":{"attributes":{"allowed_clients":{"type":"string","required":true},"nfsv3_enabled":{"type":"bool","required":true},"nfsv41_enabled":{"type":"bool","required":true},"root_access_enabled":{"type":"bool","optional":true,"default":true},"rule_index":{"type":"number","required":true},"unix_read_only":{"type":"bool","optional":true,"default":false},"unix_read_write":{"type":"bool","optional":true,"default":true}}},"required":true}}},"required":true}}}},"azurerm_netapp_volume_quota_rule":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"quota_size_in_kib":{"type":"number","required":true},"quota_target":{"type":"string","optional":true},"quota_type":{"type":"string","required":true},"volume_id":{"type":"string","required":true}}}},"azurerm_network_connection_monitor":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"network_watcher_id":{"type":"string","required":true},"notes":{"type":"string","optional":true},"output_workspace_resource_ids":{"type":["set","string"],"optional":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"endpoint":{"nesting_mode":4,"block":{"attributes":{"address":{"type":"string","optional":true},"coverage_level":{"type":"string","optional":true},"excluded_ip_addresses":{"type":["set","string"],"optional":true},"included_ip_addresses":{"type":["set","string"],"optional":true},"name":{"type":"string","required":true},"target_resource_id":{"type":"string","optional":true},"target_resource_type":{"type":"string","optional":true}},"block_types":{"filter":{"nesting_mode":3,"block":{"attributes":{"type":{"type":"string","optional":true,"default":"Include"}},"block_types":{"item":{"nesting_mode":4,"block":{"attributes":{"address":{"type":"string","optional":true},"type":{"type":"string","optional":true,"default":"AgentAddress"}}},"optional":true}}},"optional":true}}},"required":true},"test_configuration":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"preferred_ip_version":{"type":"string","optional":true},"protocol":{"type":"string","required":true},"test_frequency_in_seconds":{"type":"number","optional":true,"default":60}},"block_types":{"http_configuration":{"nesting_mode":3,"block":{"attributes":{"method":{"type":"string","optional":true,"default":"Get"},"path":{"type":"string","optional":true},"port":{"type":"number","optional":true},"prefer_https":{"type":"bool","optional":true,"default":false},"valid_status_code_ranges":{"type":["set","string"],"optional":true}},"block_types":{"request_header":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true},"icmp_configuration":{"nesting_mode":3,"block":{"attributes":{"trace_route_enabled":{"type":"bool","optional":true,"default":true}}},"optional":true},"success_threshold":{"nesting_mode":3,"block":{"attributes":{"checks_failed_percent":{"type":"number","optional":true},"round_trip_time_ms":{"type":"number","optional":true}}},"optional":true},"tcp_configuration":{"nesting_mode":3,"block":{"attributes":{"destination_port_behavior":{"type":"string","optional":true},"port":{"type":"number","required":true},"trace_route_enabled":{"type":"bool","optional":true,"default":true}}},"optional":true}}},"required":true},"test_group":{"nesting_mode":4,"block":{"attributes":{"destination_endpoints":{"type":["set","string"],"required":true},"enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"source_endpoints":{"type":["set","string"],"required":true},"test_configuration_names":{"type":["set","string"],"required":true}}},"required":true}}}},"azurerm_network_ddos_protection_plan":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"virtual_network_ids":{"type":["list","string"],"computed":true}}}},"azurerm_network_function_azure_traffic_collector":{"block":{"attributes":{"collector_policy_ids":{"type":["list","string"],"computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"virtual_hub_id":{"type":["list","string"],"computed":true}}}},"azurerm_network_function_collector_policy":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"traffic_collector_id":{"type":"string","required":true}},"block_types":{"ipfx_emission":{"nesting_mode":3,"block":{"attributes":{"destination_types":{"type":["list","string"],"required":true}}},"required":true},"ipfx_ingestion":{"nesting_mode":3,"block":{"attributes":{"source_resource_ids":{"type":["list","string"],"required":true}}},"required":true}}}},"azurerm_network_interface":{"block":{"attributes":{"accelerated_networking_enabled":{"type":"bool","optional":true},"applied_dns_servers":{"type":["list","string"],"computed":true},"auxiliary_mode":{"type":"string","optional":true,"required_with":["auxiliary_sku"]},"auxiliary_sku":{"type":"string","optional":true,"required_with":["auxiliary_mode"]},"dns_servers":{"type":["list","string"],"optional":true},"edge_zone":{"type":"string","optional":true},"internal_dns_name_label":{"type":"string","optional":true},"internal_domain_name_suffix":{"type":"string","computed":true},"ip_forwarding_enabled":{"type":"bool","optional":true},"location":{"type":"string","required":true},"mac_address":{"type":"string","computed":true},"name":{"type":"string","required":true},"private_ip_address":{"type":"string","computed":true},"private_ip_addresses":{"type":["list","string"],"computed":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"virtual_machine_id":{"type":"string","computed":true}},"block_types":{"ip_configuration":{"nesting_mode":3,"block":{"attributes":{"gateway_load_balancer_frontend_ip_configuration_id":{"type":"string","optional":true,"computed":true},"name":{"type":"string","required":true},"primary":{"type":"bool","optional":true,"computed":true},"private_ip_address":{"type":"string","optional":true,"computed":true},"private_ip_address_allocation":{"type":"string","required":true},"private_ip_address_version":{"type":"string","optional":true,"default":"IPv4"},"public_ip_address_id":{"type":"string","optional":true},"subnet_id":{"type":"string","optional":true}}},"required":true}}}},"azurerm_network_interface_application_gateway_backend_address_pool_association":{"block":{"attributes":{"backend_address_pool_id":{"type":"string","required":true},"ip_configuration_name":{"type":"string","required":true},"network_interface_id":{"type":"string","required":true}}}},"azurerm_network_interface_application_security_group_association":{"block":{"attributes":{"application_security_group_id":{"type":"string","required":true},"network_interface_id":{"type":"string","required":true}}}},"azurerm_network_interface_backend_address_pool_association":{"block":{"attributes":{"backend_address_pool_id":{"type":"string","required":true},"ip_configuration_name":{"type":"string","required":true},"network_interface_id":{"type":"string","required":true}}}},"azurerm_network_interface_nat_rule_association":{"block":{"attributes":{"ip_configuration_name":{"type":"string","required":true},"nat_rule_id":{"type":"string","required":true},"network_interface_id":{"type":"string","required":true}}}},"azurerm_network_interface_security_group_association":{"block":{"attributes":{"network_interface_id":{"type":"string","required":true},"network_security_group_id":{"type":"string","required":true}}}},"azurerm_network_manager":{"block":{"attributes":{"cross_tenant_scopes":{"type":["list",["object",{"management_groups":["list","string"],"subscriptions":["list","string"],"tenant_id":"string"}]],"computed":true},"description":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"scope_accesses":{"type":["list","string"],"required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"scope":{"nesting_mode":3,"block":{"attributes":{"management_group_ids":{"type":["list","string"],"optional":true,"at_least_one_of":["scope.0.management_group_ids","scope.0.subscription_ids"]},"subscription_ids":{"type":["list","string"],"optional":true,"at_least_one_of":["scope.0.management_group_ids","scope.0.subscription_ids"]}}},"required":true}}}},"azurerm_network_manager_admin_rule":{"block":{"attributes":{"action":{"type":"string","required":true},"admin_rule_collection_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"destination_port_ranges":{"type":["list","string"],"optional":true},"direction":{"type":"string","required":true},"name":{"type":"string","required":true},"priority":{"type":"number","required":true},"protocol":{"type":"string","required":true},"source_port_ranges":{"type":["list","string"],"optional":true}},"block_types":{"destination":{"nesting_mode":3,"block":{"attributes":{"address_prefix":{"type":"string","required":true},"address_prefix_type":{"type":"string","required":true}}},"optional":true},"source":{"nesting_mode":3,"block":{"attributes":{"address_prefix":{"type":"string","required":true},"address_prefix_type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_network_manager_admin_rule_collection":{"block":{"attributes":{"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"network_group_ids":{"type":["list","string"],"required":true},"security_admin_configuration_id":{"type":"string","required":true}}}},"azurerm_network_manager_connectivity_configuration":{"block":{"attributes":{"connectivity_topology":{"type":"string","required":true},"delete_existing_peering_enabled":{"type":"bool","optional":true},"description":{"type":"string","optional":true},"global_mesh_enabled":{"type":"bool","optional":true},"name":{"type":"string","required":true},"network_manager_id":{"type":"string","required":true}},"block_types":{"applies_to_group":{"nesting_mode":3,"block":{"attributes":{"global_mesh_enabled":{"type":"bool","optional":true},"group_connectivity":{"type":"string","required":true},"network_group_id":{"type":"string","required":true},"use_hub_gateway":{"type":"bool","optional":true}}},"required":true},"hub":{"nesting_mode":3,"block":{"attributes":{"resource_id":{"type":"string","required":true},"resource_type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_network_manager_deployment":{"block":{"attributes":{"configuration_ids":{"type":["list","string"],"required":true},"location":{"type":"string","required":true},"network_manager_id":{"type":"string","required":true},"scope_access":{"type":"string","required":true},"triggers":{"type":["map","string"],"optional":true}}}},"azurerm_network_manager_management_group_connection":{"block":{"attributes":{"connection_state":{"type":"string","computed":true},"description":{"type":"string","optional":true},"management_group_id":{"type":"string","required":true},"name":{"type":"string","required":true},"network_manager_id":{"type":"string","required":true}}}},"azurerm_network_manager_network_group":{"block":{"attributes":{"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"network_manager_id":{"type":"string","required":true}}}},"azurerm_network_manager_scope_connection":{"block":{"attributes":{"connection_state":{"type":"string","computed":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"network_manager_id":{"type":"string","required":true},"target_scope_id":{"type":"string","required":true},"tenant_id":{"type":"string","required":true}}}},"azurerm_network_manager_security_admin_configuration":{"block":{"attributes":{"apply_on_network_intent_policy_based_services":{"type":["list","string"],"optional":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"network_manager_id":{"type":"string","required":true}}}},"azurerm_network_manager_static_member":{"block":{"attributes":{"name":{"type":"string","required":true},"network_group_id":{"type":"string","required":true},"region":{"type":"string","computed":true},"target_virtual_network_id":{"type":"string","required":true}}}},"azurerm_network_manager_subscription_connection":{"block":{"attributes":{"connection_state":{"type":"string","computed":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"network_manager_id":{"type":"string","required":true},"subscription_id":{"type":"string","required":true}}}},"azurerm_network_packet_capture":{"block":{"attributes":{"maximum_bytes_per_packet":{"type":"number","optional":true,"default":0},"maximum_bytes_per_session":{"type":"number","optional":true,"default":1073741824},"maximum_capture_duration":{"type":"number","optional":true,"default":18000},"name":{"type":"string","required":true},"network_watcher_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"target_resource_id":{"type":"string","required":true}},"block_types":{"filter":{"nesting_mode":3,"block":{"attributes":{"local_ip_address":{"type":"string","optional":true},"local_port":{"type":"string","optional":true},"protocol":{"type":"string","required":true},"remote_ip_address":{"type":"string","optional":true},"remote_port":{"type":"string","optional":true}}},"optional":true},"storage_location":{"nesting_mode":3,"block":{"attributes":{"file_path":{"type":"string","optional":true,"at_least_one_of":["storage_location.0.file_path","storage_location.0.storage_account_id"]},"storage_account_id":{"type":"string","optional":true,"at_least_one_of":["storage_location.0.file_path","storage_location.0.storage_account_id"]},"storage_path":{"type":"string","computed":true}}},"required":true}}}},"azurerm_network_profile":{"block":{"attributes":{"container_network_interface_ids":{"type":["list","string"],"computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"container_network_interface":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true}},"block_types":{"ip_configuration":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"subnet_id":{"type":"string","required":true}}},"required":true}}},"required":true}}}},"azurerm_network_security_group":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"security_rule":{"type":["set",["object",{"access":"string","description":"string","destination_address_prefix":"string","destination_address_prefixes":["set","string"],"destination_application_security_group_ids":["set","string"],"destination_port_range":"string","destination_port_ranges":["set","string"],"direction":"string","name":"string","priority":"number","protocol":"string","source_address_prefix":"string","source_address_prefixes":["set","string"],"source_application_security_group_ids":["set","string"],"source_port_range":"string","source_port_ranges":["set","string"]}]],"optional":true,"computed":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_network_security_rule":{"block":{"attributes":{"access":{"type":"string","required":true},"description":{"type":"string","optional":true},"destination_address_prefix":{"type":"string","optional":true,"conflicts_with":["destination_address_prefixes"]},"destination_address_prefixes":{"type":["set","string"],"optional":true,"conflicts_with":["destination_address_prefix"]},"destination_application_security_group_ids":{"type":["set","string"],"optional":true},"destination_port_range":{"type":"string","optional":true,"conflicts_with":["destination_port_ranges"]},"destination_port_ranges":{"type":["set","string"],"optional":true,"conflicts_with":["destination_port_range"]},"direction":{"type":"string","required":true},"name":{"type":"string","required":true},"network_security_group_name":{"type":"string","required":true},"priority":{"type":"number","required":true},"protocol":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"source_address_prefix":{"type":"string","optional":true,"conflicts_with":["source_address_prefixes"]},"source_address_prefixes":{"type":["set","string"],"optional":true,"conflicts_with":["source_address_prefix"]},"source_application_security_group_ids":{"type":["set","string"],"optional":true},"source_port_range":{"type":"string","optional":true,"conflicts_with":["source_port_ranges"]},"source_port_ranges":{"type":["set","string"],"optional":true,"conflicts_with":["source_port_range"]}}}},"azurerm_network_watcher":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_network_watcher_flow_log":{"block":{"attributes":{"enabled":{"type":"bool","required":true},"location":{"type":"string","optional":true,"computed":true},"name":{"type":"string","required":true},"network_security_group_id":{"type":"string","required":true},"network_watcher_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"storage_account_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"version":{"type":"number","optional":true,"default":1}},"block_types":{"retention_policy":{"nesting_mode":3,"block":{"attributes":{"days":{"type":"number","required":true},"enabled":{"type":"bool","required":true}}},"required":true},"traffic_analytics":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","required":true},"interval_in_minutes":{"type":"number","optional":true,"default":60},"workspace_id":{"type":"string","required":true},"workspace_region":{"type":"string","required":true},"workspace_resource_id":{"type":"string","required":true}}},"optional":true}}}},"azurerm_new_relic_monitor":{"block":{"attributes":{"account_creation_source":{"type":"string","optional":true,"default":"LIFTR"},"account_id":{"type":"string","optional":true,"computed":true},"ingestion_key":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"org_creation_source":{"type":"string","optional":true,"default":"LIFTR"},"organization_id":{"type":"string","optional":true,"computed":true},"resource_group_name":{"type":"string","required":true},"user_id":{"type":"string","optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"plan":{"nesting_mode":3,"block":{"attributes":{"billing_cycle":{"type":"string","optional":true,"default":"MONTHLY"},"effective_date":{"type":"string","required":true},"plan_id":{"type":"string","optional":true,"default":"newrelic-pay-as-you-go-free-live"},"usage_type":{"type":"string","optional":true,"default":"PAYG"}}},"required":true},"user":{"nesting_mode":3,"block":{"attributes":{"email":{"type":"string","required":true},"first_name":{"type":"string","required":true},"last_name":{"type":"string","required":true},"phone_number":{"type":"string","required":true}}},"required":true}}}},"azurerm_new_relic_tag_rule":{"block":{"attributes":{"activity_log_enabled":{"type":"bool","optional":true,"default":false},"azure_active_directory_log_enabled":{"type":"bool","optional":true,"default":false},"metric_enabled":{"type":"bool","optional":true,"default":false},"monitor_id":{"type":"string","required":true},"subscription_log_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"log_tag_filter":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"metric_tag_filter":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}}},"azurerm_nginx_certificate":{"block":{"attributes":{"certificate_virtual_path":{"type":"string","required":true},"key_vault_secret_id":{"type":"string","required":true},"key_virtual_path":{"type":"string","required":true},"name":{"type":"string","required":true},"nginx_deployment_id":{"type":"string","required":true}}}},"azurerm_nginx_configuration":{"block":{"attributes":{"nginx_deployment_id":{"type":"string","required":true},"package_data":{"type":"string","optional":true,"conflicts_with":["protected_file","config_file"],"at_least_one_of":["config_file","package_data"]},"root_file":{"type":"string","required":true}},"block_types":{"config_file":{"nesting_mode":4,"block":{"attributes":{"content":{"type":"string","required":true},"virtual_path":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["config_file","package_data"]},"protected_file":{"nesting_mode":4,"block":{"attributes":{"content":{"type":"string","required":true},"virtual_path":{"type":"string","required":true}}},"optional":true,"required_with":["config_file"]}}}},"azurerm_nginx_deployment":{"block":{"attributes":{"automatic_upgrade_channel":{"type":"string","optional":true,"default":"stable"},"capacity":{"type":"number","optional":true,"conflicts_with":["auto_scale_profile"]},"diagnose_support_enabled":{"type":"bool","optional":true},"email":{"type":"string","optional":true},"ip_address":{"type":"string","computed":true},"location":{"type":"string","required":true},"managed_resource_group":{"type":"string","optional":true,"computed":true},"name":{"type":"string","required":true},"nginx_version":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"sku":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"auto_scale_profile":{"nesting_mode":3,"block":{"attributes":{"max_capacity":{"type":"number","required":true},"min_capacity":{"type":"number","required":true},"name":{"type":"string","required":true}}},"optional":true,"conflicts_with":["capacity"]},"frontend_private":{"nesting_mode":3,"block":{"attributes":{"allocation_method":{"type":"string","required":true},"ip_address":{"type":"string","required":true},"subnet_id":{"type":"string","required":true}}},"optional":true,"conflicts_with":["frontend_public"]},"frontend_public":{"nesting_mode":3,"block":{"attributes":{"ip_address":{"type":["list","string"],"optional":true}}},"optional":true,"conflicts_with":["frontend_private"]},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"logging_storage_account":{"nesting_mode":3,"block":{"attributes":{"container_name":{"type":"string","optional":true},"name":{"type":"string","optional":true}}},"optional":true},"network_interface":{"nesting_mode":3,"block":{"attributes":{"subnet_id":{"type":"string","required":true}}},"optional":true}}}},"azurerm_notification_hub":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"namespace_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"apns_credential":{"nesting_mode":3,"block":{"attributes":{"application_mode":{"type":"string","required":true},"bundle_id":{"type":"string","required":true},"key_id":{"type":"string","required":true},"team_id":{"type":"string","required":true},"token":{"type":"string","required":true}}},"optional":true},"browser_credential":{"nesting_mode":3,"block":{"attributes":{"subject":{"type":"string","required":true},"vapid_private_key":{"type":"string","required":true},"vapid_public_key":{"type":"string","required":true}}},"optional":true},"gcm_credential":{"nesting_mode":3,"block":{"attributes":{"api_key":{"type":"string","required":true}}},"optional":true}}}},"azurerm_notification_hub_authorization_rule":{"block":{"attributes":{"listen":{"type":"bool","optional":true,"default":false},"manage":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"namespace_name":{"type":"string","required":true},"notification_hub_name":{"type":"string","required":true},"primary_access_key":{"type":"string","computed":true},"primary_connection_string":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"secondary_access_key":{"type":"string","computed":true},"secondary_connection_string":{"type":"string","computed":true},"send":{"type":"bool","optional":true,"default":false}}}},"azurerm_notification_hub_namespace":{"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"namespace_type":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"servicebus_endpoint":{"type":"string","computed":true},"sku_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_oracle_exadata_infrastructure":{"block":{"attributes":{"compute_count":{"type":"number","required":true},"customer_contacts":{"type":["list","string"],"optional":true,"computed":true},"display_name":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"shape":{"type":"string","required":true},"storage_count":{"type":"number","required":true},"tags":{"type":["map","string"],"optional":true},"zones":{"type":["set","string"],"required":true}},"block_types":{"maintenance_window":{"nesting_mode":3,"block":{"attributes":{"days_of_week":{"type":["list","string"],"optional":true,"computed":true},"hours_of_day":{"type":["list","number"],"optional":true,"computed":true},"lead_time_in_weeks":{"type":"number","optional":true,"computed":true},"months":{"type":["list","string"],"optional":true,"computed":true},"patching_mode":{"type":"string","optional":true,"computed":true},"preference":{"type":"string","optional":true,"computed":true},"weeks_of_month":{"type":["list","number"],"optional":true,"computed":true}}},"optional":true,"computed":true}}}},"azurerm_orbital_contact":{"block":{"attributes":{"contact_profile_id":{"type":"string","required":true},"ground_station_name":{"type":"string","required":true},"name":{"type":"string","required":true},"reservation_end_time":{"type":"string","required":true},"reservation_start_time":{"type":"string","required":true},"spacecraft_id":{"type":"string","required":true}}}},"azurerm_orbital_contact_profile":{"block":{"attributes":{"auto_tracking":{"type":"string","required":true},"event_hub_uri":{"type":"string","optional":true},"location":{"type":"string","required":true},"minimum_elevation_degrees":{"type":"number","optional":true},"minimum_variable_contact_duration":{"type":"string","required":true},"name":{"type":"string","required":true},"network_configuration_subnet_id":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"links":{"nesting_mode":3,"block":{"attributes":{"direction":{"type":"string","required":true},"name":{"type":"string","required":true},"polarization":{"type":"string","required":true}},"block_types":{"channels":{"nesting_mode":3,"block":{"attributes":{"bandwidth_mhz":{"type":"number","required":true},"center_frequency_mhz":{"type":"number","required":true},"demodulation_configuration":{"type":"string","optional":true},"modulation_configuration":{"type":"string","optional":true},"name":{"type":"string","required":true}},"block_types":{"end_point":{"nesting_mode":4,"block":{"attributes":{"end_point_name":{"type":"string","required":true},"ip_address":{"type":"string","optional":true},"port":{"type":"string","required":true},"protocol":{"type":"string","required":true}}},"required":true}}},"required":true}}},"required":true}}}},"azurerm_orbital_spacecraft":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"norad_id":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"title_line":{"type":"string","required":true},"two_line_elements":{"type":["list","string"],"required":true}},"block_types":{"links":{"nesting_mode":3,"block":{"attributes":{"bandwidth_mhz":{"type":"number","required":true},"center_frequency_mhz":{"type":"number","required":true},"direction":{"type":"string","required":true},"name":{"type":"string","required":true},"polarization":{"type":"string","required":true}}},"required":true}}}},"azurerm_orchestrated_virtual_machine_scale_set":{"block":{"attributes":{"capacity_reservation_group_id":{"type":"string","optional":true,"conflicts_with":["proximity_placement_group_id"]},"encryption_at_host_enabled":{"type":"bool","optional":true},"eviction_policy":{"type":"string","optional":true},"extension_operations_enabled":{"type":"bool","optional":true,"default":true},"extensions_time_budget":{"type":"string","optional":true,"default":"PT1H30M"},"instances":{"type":"number","optional":true,"computed":true},"license_type":{"type":"string","optional":true},"location":{"type":"string","required":true},"max_bid_price":{"type":"number","optional":true,"default":-1},"name":{"type":"string","required":true},"platform_fault_domain_count":{"type":"number","required":true},"priority":{"type":"string","optional":true,"default":"Regular"},"proximity_placement_group_id":{"type":"string","optional":true,"conflicts_with":["capacity_reservation_group_id"]},"resource_group_name":{"type":"string","required":true},"single_placement_group":{"type":"bool","optional":true,"computed":true},"sku_name":{"type":"string","optional":true},"source_image_id":{"type":"string","optional":true,"conflicts_with":["source_image_reference"]},"tags":{"type":["map","string"],"optional":true},"unique_id":{"type":"string","computed":true},"user_data_base64":{"type":"string","optional":true},"zone_balance":{"type":"bool","optional":true,"default":false},"zones":{"type":["set","string"],"optional":true}},"block_types":{"additional_capabilities":{"nesting_mode":3,"block":{"attributes":{"ultra_ssd_enabled":{"type":"bool","optional":true,"default":false}}},"optional":true},"automatic_instance_repair":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"computed":true},"enabled":{"type":"bool","required":true},"grace_period":{"type":"string","optional":true,"computed":true}}},"optional":true,"computed":true},"boot_diagnostics":{"nesting_mode":3,"block":{"attributes":{"storage_account_uri":{"type":"string","optional":true}}},"optional":true},"data_disk":{"nesting_mode":3,"block":{"attributes":{"caching":{"type":"string","required":true},"create_option":{"type":"string","optional":true,"default":"Empty"},"disk_encryption_set_id":{"type":"string","optional":true},"disk_size_gb":{"type":"number","optional":true,"computed":true},"lun":{"type":"number","optional":true,"computed":true},"storage_account_type":{"type":"string","required":true},"ultra_ssd_disk_iops_read_write":{"type":"number","optional":true,"computed":true},"ultra_ssd_disk_mbps_read_write":{"type":"number","optional":true,"computed":true},"write_accelerator_enabled":{"type":"bool","optional":true,"default":false}}},"optional":true},"extension":{"nesting_mode":4,"block":{"attributes":{"auto_upgrade_minor_version_enabled":{"type":"bool","optional":true,"default":true},"extensions_to_provision_after_vm_creation":{"type":["list","string"],"optional":true},"failure_suppression_enabled":{"type":"bool","optional":true,"default":false},"force_extension_execution_on_change":{"type":"string","optional":true},"name":{"type":"string","required":true},"protected_settings":{"type":"string","optional":true},"publisher":{"type":"string","required":true},"settings":{"type":"string","optional":true},"type":{"type":"string","required":true},"type_handler_version":{"type":"string","required":true}},"block_types":{"protected_settings_from_key_vault":{"nesting_mode":3,"block":{"attributes":{"secret_url":{"type":"string","required":true},"source_vault_id":{"type":"string","required":true}}},"optional":true}}},"optional":true,"computed":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"required":true},"type":{"type":"string","required":true}}},"optional":true},"network_interface":{"nesting_mode":3,"block":{"attributes":{"dns_servers":{"type":["list","string"],"optional":true},"enable_accelerated_networking":{"type":"bool","optional":true,"default":false},"enable_ip_forwarding":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"network_security_group_id":{"type":"string","optional":true},"primary":{"type":"bool","optional":true,"default":false}},"block_types":{"ip_configuration":{"nesting_mode":3,"block":{"attributes":{"application_gateway_backend_address_pool_ids":{"type":["set","string"],"optional":true},"application_security_group_ids":{"type":["set","string"],"optional":true},"load_balancer_backend_address_pool_ids":{"type":["set","string"],"optional":true},"name":{"type":"string","required":true},"primary":{"type":"bool","optional":true,"default":false},"subnet_id":{"type":"string","optional":true},"version":{"type":"string","optional":true,"default":"IPv4"}},"block_types":{"public_ip_address":{"nesting_mode":3,"block":{"attributes":{"domain_name_label":{"type":"string","optional":true},"idle_timeout_in_minutes":{"type":"number","optional":true,"computed":true},"name":{"type":"string","required":true},"public_ip_prefix_id":{"type":"string","optional":true},"sku_name":{"type":"string","optional":true},"version":{"type":"string","optional":true,"default":"IPv4"}},"block_types":{"ip_tag":{"nesting_mode":3,"block":{"attributes":{"tag":{"type":"string","required":true},"type":{"type":"string","required":true}}},"optional":true}}},"optional":true}}},"required":true}}},"optional":true},"os_disk":{"nesting_mode":3,"block":{"attributes":{"caching":{"type":"string","required":true},"disk_encryption_set_id":{"type":"string","optional":true},"disk_size_gb":{"type":"number","optional":true,"computed":true},"storage_account_type":{"type":"string","required":true},"write_accelerator_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"diff_disk_settings":{"nesting_mode":3,"block":{"attributes":{"option":{"type":"string","required":true},"placement":{"type":"string","optional":true,"default":"CacheDisk"}}},"optional":true}}},"optional":true},"os_profile":{"nesting_mode":3,"block":{"attributes":{"custom_data":{"type":"string","optional":true}},"block_types":{"linux_configuration":{"nesting_mode":3,"block":{"attributes":{"admin_password":{"type":"string","optional":true},"admin_username":{"type":"string","required":true},"computer_name_prefix":{"type":"string","optional":true,"computed":true},"disable_password_authentication":{"type":"bool","optional":true,"default":true},"patch_assessment_mode":{"type":"string","optional":true,"default":"ImageDefault"},"patch_mode":{"type":"string","optional":true,"default":"ImageDefault"},"provision_vm_agent":{"type":"bool","optional":true,"default":true}},"block_types":{"admin_ssh_key":{"nesting_mode":4,"block":{"attributes":{"public_key":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true},"secret":{"nesting_mode":3,"block":{"attributes":{"key_vault_id":{"type":"string","required":true}},"block_types":{"certificate":{"nesting_mode":4,"block":{"attributes":{"url":{"type":"string","required":true}}},"required":true}}},"optional":true}}},"optional":true},"windows_configuration":{"nesting_mode":3,"block":{"attributes":{"admin_password":{"type":"string","required":true},"admin_username":{"type":"string","required":true},"computer_name_prefix":{"type":"string","optional":true,"computed":true},"enable_automatic_updates":{"type":"bool","optional":true,"default":true},"hotpatching_enabled":{"type":"bool","optional":true,"default":false},"patch_assessment_mode":{"type":"string","optional":true,"default":"ImageDefault"},"patch_mode":{"type":"string","optional":true,"default":"AutomaticByOS"},"provision_vm_agent":{"type":"bool","optional":true,"default":true},"timezone":{"type":"string","optional":true}},"block_types":{"additional_unattend_content":{"nesting_mode":3,"block":{"attributes":{"content":{"type":"string","required":true},"setting":{"type":"string","required":true}}},"optional":true},"secret":{"nesting_mode":3,"block":{"attributes":{"key_vault_id":{"type":"string","required":true}},"block_types":{"certificate":{"nesting_mode":4,"block":{"attributes":{"store":{"type":"string","required":true},"url":{"type":"string","required":true}}},"required":true}}},"optional":true},"winrm_listener":{"nesting_mode":4,"block":{"attributes":{"certificate_url":{"type":"string","optional":true},"protocol":{"type":"string","required":true}}},"optional":true}}},"optional":true}}},"optional":true},"plan":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"product":{"type":"string","required":true},"publisher":{"type":"string","required":true}}},"optional":true},"priority_mix":{"nesting_mode":3,"block":{"attributes":{"base_regular_count":{"type":"number","optional":true,"default":0},"regular_percentage_above_base":{"type":"number","optional":true,"default":0}}},"optional":true},"source_image_reference":{"nesting_mode":3,"block":{"attributes":{"offer":{"type":"string","required":true},"publisher":{"type":"string","required":true},"sku":{"type":"string","required":true},"version":{"type":"string","required":true}}},"optional":true,"conflicts_with":["source_image_id"]},"termination_notification":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","required":true},"timeout":{"type":"string","optional":true,"default":"PT5M"}}},"optional":true,"computed":true}}}},"azurerm_palo_alto_local_rulestack":{"block":{"attributes":{"anti_spyware_profile":{"type":"string","optional":true},"anti_virus_profile":{"type":"string","optional":true},"description":{"type":"string","optional":true},"dns_subscription":{"type":"string","optional":true},"file_blocking_profile":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"url_filtering_profile":{"type":"string","optional":true},"vulnerability_profile":{"type":"string","optional":true}}}},"azurerm_palo_alto_local_rulestack_certificate":{"block":{"attributes":{"audit_comment":{"type":"string","optional":true},"description":{"type":"string","optional":true},"key_vault_certificate_id":{"type":"string","optional":true,"exactly_one_of":["self_signed","key_vault_certificate_id"]},"name":{"type":"string","required":true},"rulestack_id":{"type":"string","required":true},"self_signed":{"type":"bool","optional":true,"default":false,"exactly_one_of":["key_vault_certificate_id","self_signed"]}}}},"azurerm_palo_alto_local_rulestack_fqdn_list":{"block":{"attributes":{"audit_comment":{"type":"string","optional":true},"description":{"type":"string","optional":true},"fully_qualified_domain_names":{"type":["list","string"],"required":true},"name":{"type":"string","required":true},"rulestack_id":{"type":"string","required":true}}}},"azurerm_palo_alto_local_rulestack_outbound_trust_certificate_association":{"block":{"attributes":{"certificate_id":{"type":"string","required":true}}}},"azurerm_palo_alto_local_rulestack_outbound_untrust_certificate_association":{"block":{"attributes":{"certificate_id":{"type":"string","required":true}}}},"azurerm_palo_alto_local_rulestack_prefix_list":{"block":{"attributes":{"audit_comment":{"type":"string","optional":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"prefix_list":{"type":["list","string"],"required":true},"rulestack_id":{"type":"string","required":true}}}},"azurerm_palo_alto_local_rulestack_rule":{"block":{"attributes":{"action":{"type":"string","required":true},"applications":{"type":["list","string"],"required":true},"audit_comment":{"type":"string","optional":true},"decryption_rule_type":{"type":"string","optional":true,"default":"None"},"description":{"type":"string","optional":true},"enabled":{"type":"bool","optional":true,"default":true},"inspection_certificate_id":{"type":"string","optional":true},"logging_enabled":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"negate_destination":{"type":"bool","optional":true,"default":false},"negate_source":{"type":"bool","optional":true,"default":false},"priority":{"type":"number","required":true},"protocol":{"type":"string","optional":true,"exactly_one_of":["protocol","protocol_ports"]},"protocol_ports":{"type":["list","string"],"optional":true,"exactly_one_of":["protocol","protocol_ports"]},"rulestack_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"category":{"nesting_mode":3,"block":{"attributes":{"custom_urls":{"type":["list","string"],"required":true},"feeds":{"type":["list","string"],"optional":true}}},"optional":true},"destination":{"nesting_mode":3,"block":{"attributes":{"cidrs":{"type":["list","string"],"optional":true,"at_least_one_of":["destination.0.cidrs","destination.0.countries","destination.0.feeds","destination.0.local_rulestack_fqdn_list_ids","destination.0.local_rulestack_prefix_list_ids"]},"countries":{"type":["list","string"],"optional":true,"at_least_one_of":["destination.0.cidrs","destination.0.countries","destination.0.feeds","destination.0.local_rulestack_fqdn_list_ids","destination.0.local_rulestack_prefix_list_ids"]},"feeds":{"type":["list","string"],"optional":true,"at_least_one_of":["destination.0.cidrs","destination.0.countries","destination.0.feeds","destination.0.local_rulestack_fqdn_list_ids","destination.0.local_rulestack_prefix_list_ids"]},"local_rulestack_fqdn_list_ids":{"type":["list","string"],"optional":true,"at_least_one_of":["destination.0.cidrs","destination.0.countries","destination.0.feeds","destination.0.local_rulestack_fqdn_list_ids","destination.0.local_rulestack_prefix_list_ids"]},"local_rulestack_prefix_list_ids":{"type":["list","string"],"optional":true,"at_least_one_of":["destination.0.cidrs","destination.0.countries","destination.0.feeds","destination.0.local_rulestack_fqdn_list_ids","destination.0.local_rulestack_prefix_list_ids"]}}},"required":true},"source":{"nesting_mode":3,"block":{"attributes":{"cidrs":{"type":["list","string"],"optional":true,"at_least_one_of":["source.0.cidrs","source.0.countries","source.0.feeds","source.0.local_rulestack_prefix_list_ids"]},"countries":{"type":["list","string"],"optional":true,"at_least_one_of":["source.0.cidrs","source.0.countries","source.0.feeds","source.0.local_rulestack_prefix_list_ids"]},"feeds":{"type":["list","string"],"optional":true,"at_least_one_of":["source.0.cidrs","source.0.countries","source.0.feeds","source.0.local_rulestack_prefix_list_ids"]},"local_rulestack_prefix_list_ids":{"type":["list","string"],"optional":true,"at_least_one_of":["source.0.cidrs","source.0.countries","source.0.feeds","source.0.local_rulestack_prefix_list_ids"]}}},"required":true}}}},"azurerm_palo_alto_next_generation_firewall_virtual_hub_local_rulestack":{"block":{"attributes":{"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"rulestack_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"destination_nat":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"protocol":{"type":"string","required":true}},"block_types":{"backend_config":{"nesting_mode":3,"block":{"attributes":{"port":{"type":"number","required":true},"public_ip_address":{"type":"string","required":true}}},"optional":true},"frontend_config":{"nesting_mode":3,"block":{"attributes":{"port":{"type":"number","required":true},"public_ip_address_id":{"type":"string","required":true}}},"optional":true}}},"optional":true},"dns_settings":{"nesting_mode":3,"block":{"attributes":{"azure_dns_servers":{"type":["list","string"],"computed":true},"dns_servers":{"type":["list","string"],"optional":true,"conflicts_with":["dns_settings.0.use_azure_dns"]},"use_azure_dns":{"type":"bool","optional":true,"default":false,"conflicts_with":["dns_settings.0.dns_servers"]}}},"optional":true},"network_profile":{"nesting_mode":3,"block":{"attributes":{"egress_nat_ip_address_ids":{"type":["list","string"],"optional":true},"egress_nat_ip_addresses":{"type":["list","string"],"computed":true},"ip_of_trust_for_user_defined_routes":{"type":"string","computed":true},"network_virtual_appliance_id":{"type":"string","required":true},"public_ip_address_ids":{"type":["list","string"],"required":true},"public_ip_addresses":{"type":["list","string"],"computed":true},"trusted_address_ranges":{"type":["list","string"],"optional":true},"trusted_subnet_id":{"type":"string","computed":true},"untrusted_subnet_id":{"type":"string","computed":true},"virtual_hub_id":{"type":"string","required":true}}},"required":true}}}},"azurerm_palo_alto_next_generation_firewall_virtual_hub_panorama":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"panorama":{"type":["list",["object",{"device_group_name":"string","host_name":"string","name":"string","panorama_server_1":"string","panorama_server_2":"string","template_name":"string","virtual_machine_ssh_key":"string"}]],"computed":true},"panorama_base64_config":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"destination_nat":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"protocol":{"type":"string","required":true}},"block_types":{"backend_config":{"nesting_mode":3,"block":{"attributes":{"port":{"type":"number","required":true},"public_ip_address":{"type":"string","required":true}}},"optional":true},"frontend_config":{"nesting_mode":3,"block":{"attributes":{"port":{"type":"number","required":true},"public_ip_address_id":{"type":"string","required":true}}},"optional":true}}},"optional":true},"dns_settings":{"nesting_mode":3,"block":{"attributes":{"azure_dns_servers":{"type":["list","string"],"computed":true},"dns_servers":{"type":["list","string"],"optional":true,"conflicts_with":["dns_settings.0.use_azure_dns"]},"use_azure_dns":{"type":"bool","optional":true,"default":false,"conflicts_with":["dns_settings.0.dns_servers"]}}},"optional":true},"network_profile":{"nesting_mode":3,"block":{"attributes":{"egress_nat_ip_address_ids":{"type":["list","string"],"optional":true},"egress_nat_ip_addresses":{"type":["list","string"],"computed":true},"ip_of_trust_for_user_defined_routes":{"type":"string","computed":true},"network_virtual_appliance_id":{"type":"string","required":true},"public_ip_address_ids":{"type":["list","string"],"required":true},"public_ip_addresses":{"type":["list","string"],"computed":true},"trusted_address_ranges":{"type":["list","string"],"optional":true},"trusted_subnet_id":{"type":"string","computed":true},"untrusted_subnet_id":{"type":"string","computed":true},"virtual_hub_id":{"type":"string","required":true}}},"required":true}}}},"azurerm_palo_alto_next_generation_firewall_virtual_network_local_rulestack":{"block":{"attributes":{"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"rulestack_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"destination_nat":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"protocol":{"type":"string","required":true}},"block_types":{"backend_config":{"nesting_mode":3,"block":{"attributes":{"port":{"type":"number","required":true},"public_ip_address":{"type":"string","required":true}}},"optional":true},"frontend_config":{"nesting_mode":3,"block":{"attributes":{"port":{"type":"number","required":true},"public_ip_address_id":{"type":"string","required":true}}},"optional":true}}},"optional":true},"dns_settings":{"nesting_mode":3,"block":{"attributes":{"azure_dns_servers":{"type":["list","string"],"computed":true},"dns_servers":{"type":["list","string"],"optional":true,"conflicts_with":["dns_settings.0.use_azure_dns"]},"use_azure_dns":{"type":"bool","optional":true,"default":false,"conflicts_with":["dns_settings.0.dns_servers"]}}},"optional":true},"network_profile":{"nesting_mode":3,"block":{"attributes":{"egress_nat_ip_address_ids":{"type":["list","string"],"optional":true},"egress_nat_ip_addresses":{"type":["list","string"],"computed":true},"public_ip_address_ids":{"type":["list","string"],"required":true},"public_ip_addresses":{"type":["list","string"],"computed":true},"trusted_address_ranges":{"type":["list","string"],"optional":true}},"block_types":{"vnet_configuration":{"nesting_mode":3,"block":{"attributes":{"ip_of_trust_for_user_defined_routes":{"type":"string","computed":true},"trusted_subnet_id":{"type":"string","optional":true},"untrusted_subnet_id":{"type":"string","optional":true},"virtual_network_id":{"type":"string","required":true}}},"required":true}}},"required":true}}}},"azurerm_palo_alto_next_generation_firewall_virtual_network_panorama":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"panorama":{"type":["list",["object",{"device_group_name":"string","host_name":"string","name":"string","panorama_server_1":"string","panorama_server_2":"string","template_name":"string","virtual_machine_ssh_key":"string"}]],"computed":true},"panorama_base64_config":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"destination_nat":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"protocol":{"type":"string","required":true}},"block_types":{"backend_config":{"nesting_mode":3,"block":{"attributes":{"port":{"type":"number","required":true},"public_ip_address":{"type":"string","required":true}}},"optional":true},"frontend_config":{"nesting_mode":3,"block":{"attributes":{"port":{"type":"number","required":true},"public_ip_address_id":{"type":"string","required":true}}},"optional":true}}},"optional":true},"dns_settings":{"nesting_mode":3,"block":{"attributes":{"azure_dns_servers":{"type":["list","string"],"computed":true},"dns_servers":{"type":["list","string"],"optional":true,"conflicts_with":["dns_settings.0.use_azure_dns"]},"use_azure_dns":{"type":"bool","optional":true,"default":false,"conflicts_with":["dns_settings.0.dns_servers"]}}},"optional":true},"network_profile":{"nesting_mode":3,"block":{"attributes":{"egress_nat_ip_address_ids":{"type":["list","string"],"optional":true},"egress_nat_ip_addresses":{"type":["list","string"],"computed":true},"public_ip_address_ids":{"type":["list","string"],"required":true},"public_ip_addresses":{"type":["list","string"],"computed":true},"trusted_address_ranges":{"type":["list","string"],"optional":true}},"block_types":{"vnet_configuration":{"nesting_mode":3,"block":{"attributes":{"ip_of_trust_for_user_defined_routes":{"type":"string","computed":true},"trusted_subnet_id":{"type":"string","optional":true},"untrusted_subnet_id":{"type":"string","optional":true},"virtual_network_id":{"type":"string","required":true}}},"required":true}}},"required":true}}}},"azurerm_palo_alto_virtual_network_appliance":{"block":{"attributes":{"name":{"type":"string","required":true},"virtual_hub_id":{"type":"string","required":true}}}},"azurerm_pim_active_role_assignment":{"block":{"attributes":{"justification":{"type":"string","optional":true,"computed":true},"principal_id":{"type":"string","required":true},"principal_type":{"type":"string","computed":true},"role_definition_id":{"type":"string","required":true},"scope":{"type":"string","required":true}},"block_types":{"schedule":{"nesting_mode":3,"block":{"attributes":{"start_date_time":{"type":"string","optional":true,"computed":true}},"block_types":{"expiration":{"nesting_mode":3,"block":{"attributes":{"duration_days":{"type":"number","optional":true,"computed":true,"conflicts_with":["schedule.0.expiration.0.duration_hours","schedule.0.expiration.0.end_date_time"]},"duration_hours":{"type":"number","optional":true,"computed":true,"conflicts_with":["schedule.0.expiration.0.duration_days","schedule.0.expiration.0.end_date_time"]},"end_date_time":{"type":"string","optional":true,"computed":true,"conflicts_with":["schedule.0.expiration.0.duration_days","schedule.0.expiration.0.duration_hours"]}}},"optional":true}}},"optional":true,"computed":true},"ticket":{"nesting_mode":3,"block":{"attributes":{"number":{"type":"string","optional":true},"system":{"type":"string","optional":true}}},"optional":true,"computed":true}}}},"azurerm_pim_eligible_role_assignment":{"block":{"attributes":{"justification":{"type":"string","optional":true,"computed":true},"principal_id":{"type":"string","required":true},"principal_type":{"type":"string","computed":true},"role_definition_id":{"type":"string","required":true},"scope":{"type":"string","required":true}},"block_types":{"schedule":{"nesting_mode":3,"block":{"attributes":{"start_date_time":{"type":"string","optional":true,"computed":true}},"block_types":{"expiration":{"nesting_mode":3,"block":{"attributes":{"duration_days":{"type":"number","optional":true,"computed":true,"conflicts_with":["schedule.0.expiration.0.duration_hours","schedule.0.expiration.0.end_date_time"]},"duration_hours":{"type":"number","optional":true,"computed":true,"conflicts_with":["schedule.0.expiration.0.duration_days","schedule.0.expiration.0.end_date_time"]},"end_date_time":{"type":"string","optional":true,"computed":true,"conflicts_with":["schedule.0.expiration.0.duration_days","schedule.0.expiration.0.duration_hours"]}}},"optional":true}}},"optional":true,"computed":true},"ticket":{"nesting_mode":3,"block":{"attributes":{"number":{"type":"string","optional":true},"system":{"type":"string","optional":true}}},"optional":true,"computed":true}}}},"azurerm_point_to_site_vpn_gateway":{"block":{"attributes":{"dns_servers":{"type":["list","string"],"optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"routing_preference_internet_enabled":{"type":"bool","optional":true,"default":false},"scale_unit":{"type":"number","required":true},"tags":{"type":["map","string"],"optional":true},"virtual_hub_id":{"type":"string","required":true},"vpn_server_configuration_id":{"type":"string","required":true}},"block_types":{"connection_configuration":{"nesting_mode":3,"block":{"attributes":{"internet_security_enabled":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true}},"block_types":{"route":{"nesting_mode":3,"block":{"attributes":{"associated_route_table_id":{"type":"string","required":true},"inbound_route_map_id":{"type":"string","optional":true},"outbound_route_map_id":{"type":"string","optional":true}},"block_types":{"propagated_route_table":{"nesting_mode":3,"block":{"attributes":{"ids":{"type":["list","string"],"required":true},"labels":{"type":["set","string"],"optional":true}}},"optional":true}}},"optional":true,"computed":true},"vpn_client_address_pool":{"nesting_mode":3,"block":{"attributes":{"address_prefixes":{"type":["set","string"],"required":true}}},"required":true}}},"required":true}}}},"azurerm_policy_definition":{"block":{"attributes":{"description":{"type":"string","optional":true},"display_name":{"type":"string","required":true},"management_group_id":{"type":"string","optional":true},"metadata":{"type":"string","optional":true,"computed":true},"mode":{"type":"string","required":true},"name":{"type":"string","required":true},"parameters":{"type":"string","optional":true},"policy_rule":{"type":"string","optional":true},"policy_type":{"type":"string","required":true},"role_definition_ids":{"type":["list","string"],"computed":true}}}},"azurerm_policy_set_definition":{"block":{"attributes":{"description":{"type":"string","optional":true},"display_name":{"type":"string","required":true},"management_group_id":{"type":"string","optional":true},"metadata":{"type":"string","optional":true,"computed":true},"name":{"type":"string","required":true},"parameters":{"type":"string","optional":true},"policy_type":{"type":"string","required":true}},"block_types":{"policy_definition_group":{"nesting_mode":4,"block":{"attributes":{"additional_metadata_resource_id":{"type":"string","optional":true},"category":{"type":"string","optional":true},"description":{"type":"string","optional":true},"display_name":{"type":"string","optional":true},"name":{"type":"string","required":true}}},"optional":true},"policy_definition_reference":{"nesting_mode":3,"block":{"attributes":{"parameter_values":{"type":"string","optional":true},"policy_definition_id":{"type":"string","required":true},"policy_group_names":{"type":["set","string"],"optional":true},"reference_id":{"type":"string","optional":true,"computed":true}}},"required":true}}}},"azurerm_policy_virtual_machine_configuration_assignment":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"virtual_machine_id":{"type":"string","required":true}},"block_types":{"configuration":{"nesting_mode":3,"block":{"attributes":{"assignment_type":{"type":"string","optional":true},"content_hash":{"type":"string","optional":true,"computed":true},"content_uri":{"type":"string","optional":true,"computed":true},"version":{"type":"string","optional":true}},"block_types":{"parameter":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"required":true}}}},"azurerm_portal_dashboard":{"block":{"attributes":{"dashboard_properties":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_portal_tenant_configuration":{"block":{"attributes":{"private_markdown_storage_enforced":{"type":"bool","required":true}}}},"azurerm_postgresql_active_directory_administrator":{"block":{"attributes":{"login":{"type":"string","required":true},"object_id":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"server_name":{"type":"string","required":true},"tenant_id":{"type":"string","required":true}}}},"azurerm_postgresql_configuration":{"block":{"attributes":{"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"server_name":{"type":"string","required":true},"value":{"type":"string","required":true}}}},"azurerm_postgresql_database":{"block":{"attributes":{"charset":{"type":"string","required":true},"collation":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"server_name":{"type":"string","required":true}}}},"azurerm_postgresql_firewall_rule":{"block":{"attributes":{"end_ip_address":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"server_name":{"type":"string","required":true},"start_ip_address":{"type":"string","required":true}}}},"azurerm_postgresql_flexible_server":{"block":{"attributes":{"administrator_login":{"type":"string","optional":true,"computed":true},"administrator_password":{"type":"string","optional":true},"auto_grow_enabled":{"type":"bool","optional":true,"default":false},"backup_retention_days":{"type":"number","optional":true,"computed":true},"create_mode":{"type":"string","optional":true},"delegated_subnet_id":{"type":"string","optional":true},"fqdn":{"type":"string","computed":true},"geo_redundant_backup_enabled":{"type":"bool","optional":true,"default":false},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"point_in_time_restore_time_in_utc":{"type":"string","optional":true},"private_dns_zone_id":{"type":"string","optional":true,"computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"replication_role":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","optional":true,"computed":true},"source_server_id":{"type":"string","optional":true},"storage_mb":{"type":"number","optional":true,"computed":true},"storage_tier":{"type":"string","optional":true,"computed":true},"tags":{"type":["map","string"],"optional":true},"version":{"type":"string","optional":true,"computed":true},"zone":{"type":"string","optional":true}},"block_types":{"authentication":{"nesting_mode":3,"block":{"attributes":{"active_directory_auth_enabled":{"type":"bool","optional":true,"default":false},"password_auth_enabled":{"type":"bool","optional":true,"default":true},"tenant_id":{"type":"string","optional":true,"required_with":["authentication.0.active_directory_auth_enabled"]}}},"optional":true,"computed":true},"customer_managed_key":{"nesting_mode":3,"block":{"attributes":{"geo_backup_key_vault_key_id":{"type":"string","optional":true,"required_with":["identity","customer_managed_key.0.geo_backup_user_assigned_identity_id"]},"geo_backup_user_assigned_identity_id":{"type":"string","optional":true},"key_vault_key_id":{"type":"string","required":true,"required_with":["identity","customer_managed_key.0.primary_user_assigned_identity_id"]},"primary_user_assigned_identity_id":{"type":"string","optional":true}}},"optional":true},"high_availability":{"nesting_mode":3,"block":{"attributes":{"mode":{"type":"string","required":true},"standby_availability_zone":{"type":"string","optional":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"required":true},"type":{"type":"string","required":true}}},"optional":true},"maintenance_window":{"nesting_mode":3,"block":{"attributes":{"day_of_week":{"type":"number","optional":true,"default":0},"start_hour":{"type":"number","optional":true,"default":0},"start_minute":{"type":"number","optional":true,"default":0}}},"optional":true}}}},"azurerm_postgresql_flexible_server_active_directory_administrator":{"block":{"attributes":{"object_id":{"type":"string","required":true},"principal_name":{"type":"string","required":true},"principal_type":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"server_name":{"type":"string","required":true},"tenant_id":{"type":"string","required":true}}}},"azurerm_postgresql_flexible_server_configuration":{"block":{"attributes":{"name":{"type":"string","required":true},"server_id":{"type":"string","required":true},"value":{"type":"string","required":true}}}},"azurerm_postgresql_flexible_server_database":{"block":{"attributes":{"charset":{"type":"string","optional":true,"default":"UTF8"},"collation":{"type":"string","optional":true,"default":"en_US.utf8"},"name":{"type":"string","required":true},"server_id":{"type":"string","required":true}}}},"azurerm_postgresql_flexible_server_firewall_rule":{"block":{"attributes":{"end_ip_address":{"type":"string","required":true},"name":{"type":"string","required":true},"server_id":{"type":"string","required":true},"start_ip_address":{"type":"string","required":true}}}},"azurerm_postgresql_flexible_server_virtual_endpoint":{"block":{"attributes":{"name":{"type":"string","required":true},"replica_server_id":{"type":"string","required":true},"source_server_id":{"type":"string","required":true},"type":{"type":"string","required":true}}}},"azurerm_postgresql_server":{"block":{"attributes":{"administrator_login":{"type":"string","optional":true,"computed":true},"administrator_login_password":{"type":"string","optional":true},"auto_grow_enabled":{"type":"bool","optional":true,"default":true},"backup_retention_days":{"type":"number","optional":true,"computed":true},"create_mode":{"type":"string","optional":true,"default":"Default"},"creation_source_server_id":{"type":"string","optional":true},"fqdn":{"type":"string","computed":true},"geo_redundant_backup_enabled":{"type":"bool","optional":true,"default":false},"infrastructure_encryption_enabled":{"type":"bool","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"restore_point_in_time":{"type":"string","optional":true},"sku_name":{"type":"string","required":true},"ssl_enforcement_enabled":{"type":"bool","required":true},"ssl_minimal_tls_version_enforced":{"type":"string","optional":true,"default":"TLS1_2"},"storage_mb":{"type":"number","optional":true,"computed":true},"tags":{"type":["map","string"],"optional":true},"version":{"type":"string","required":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"threat_detection_policy":{"nesting_mode":3,"block":{"attributes":{"disabled_alerts":{"type":["set","string"],"optional":true,"at_least_one_of":["threat_detection_policy.0.enabled","threat_detection_policy.0.disabled_alerts","threat_detection_policy.0.email_account_admins","threat_detection_policy.0.email_addresses","threat_detection_policy.0.retention_days","threat_detection_policy.0.storage_account_access_key","threat_detection_policy.0.storage_endpoint"]},"email_account_admins":{"type":"bool","optional":true,"at_least_one_of":["threat_detection_policy.0.enabled","threat_detection_policy.0.disabled_alerts","threat_detection_policy.0.email_account_admins","threat_detection_policy.0.email_addresses","threat_detection_policy.0.retention_days","threat_detection_policy.0.storage_account_access_key","threat_detection_policy.0.storage_endpoint"]},"email_addresses":{"type":["set","string"],"optional":true,"at_least_one_of":["threat_detection_policy.0.enabled","threat_detection_policy.0.disabled_alerts","threat_detection_policy.0.email_account_admins","threat_detection_policy.0.email_addresses","threat_detection_policy.0.retention_days","threat_detection_policy.0.storage_account_access_key","threat_detection_policy.0.storage_endpoint"]},"enabled":{"type":"bool","optional":true,"at_least_one_of":["threat_detection_policy.0.enabled","threat_detection_policy.0.disabled_alerts","threat_detection_policy.0.email_account_admins","threat_detection_policy.0.email_addresses","threat_detection_policy.0.retention_days","threat_detection_policy.0.storage_account_access_key","threat_detection_policy.0.storage_endpoint"]},"retention_days":{"type":"number","optional":true,"at_least_one_of":["threat_detection_policy.0.enabled","threat_detection_policy.0.disabled_alerts","threat_detection_policy.0.email_account_admins","threat_detection_policy.0.email_addresses","threat_detection_policy.0.retention_days","threat_detection_policy.0.storage_account_access_key","threat_detection_policy.0.storage_endpoint"]},"storage_account_access_key":{"type":"string","optional":true,"at_least_one_of":["threat_detection_policy.0.enabled","threat_detection_policy.0.disabled_alerts","threat_detection_policy.0.email_account_admins","threat_detection_policy.0.email_addresses","threat_detection_policy.0.retention_days","threat_detection_policy.0.storage_account_access_key","threat_detection_policy.0.storage_endpoint"]},"storage_endpoint":{"type":"string","optional":true,"at_least_one_of":["threat_detection_policy.0.enabled","threat_detection_policy.0.disabled_alerts","threat_detection_policy.0.email_account_admins","threat_detection_policy.0.email_addresses","threat_detection_policy.0.retention_days","threat_detection_policy.0.storage_account_access_key","threat_detection_policy.0.storage_endpoint"]}}},"optional":true}}}},"azurerm_postgresql_server_key":{"block":{"attributes":{"key_vault_key_id":{"type":"string","required":true},"server_id":{"type":"string","required":true}}}},"azurerm_postgresql_virtual_network_rule":{"block":{"attributes":{"ignore_missing_vnet_service_endpoint":{"type":"bool","optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"server_name":{"type":"string","required":true},"subnet_id":{"type":"string","required":true}}}},"azurerm_powerbi_embedded":{"block":{"attributes":{"administrators":{"type":["set","string"],"required":true},"location":{"type":"string","required":true},"mode":{"type":"string","optional":true,"default":"Gen1"},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_private_dns_a_record":{"block":{"attributes":{"fqdn":{"type":"string","computed":true},"name":{"type":"string","required":true},"records":{"type":["set","string"],"required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"ttl":{"type":"number","required":true},"zone_name":{"type":"string","required":true}}}},"azurerm_private_dns_aaaa_record":{"block":{"attributes":{"fqdn":{"type":"string","computed":true},"name":{"type":"string","required":true},"records":{"type":["set","string"],"required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"ttl":{"type":"number","required":true},"zone_name":{"type":"string","required":true}}}},"azurerm_private_dns_cname_record":{"block":{"attributes":{"fqdn":{"type":"string","computed":true},"name":{"type":"string","required":true},"record":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"ttl":{"type":"number","required":true},"zone_name":{"type":"string","required":true}}}},"azurerm_private_dns_mx_record":{"block":{"attributes":{"fqdn":{"type":"string","computed":true},"name":{"type":"string","optional":true,"default":"@"},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"ttl":{"type":"number","required":true},"zone_name":{"type":"string","required":true}},"block_types":{"record":{"nesting_mode":4,"block":{"attributes":{"exchange":{"type":"string","required":true},"preference":{"type":"number","required":true}}},"required":true}}}},"azurerm_private_dns_ptr_record":{"block":{"attributes":{"fqdn":{"type":"string","computed":true},"name":{"type":"string","required":true},"records":{"type":["set","string"],"required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"ttl":{"type":"number","required":true},"zone_name":{"type":"string","required":true}}}},"azurerm_private_dns_resolver":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"virtual_network_id":{"type":"string","required":true}}}},"azurerm_private_dns_resolver_dns_forwarding_ruleset":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"private_dns_resolver_outbound_endpoint_ids":{"type":["list","string"],"required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_private_dns_resolver_forwarding_rule":{"block":{"attributes":{"dns_forwarding_ruleset_id":{"type":"string","required":true},"domain_name":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":true},"metadata":{"type":["map","string"],"optional":true},"name":{"type":"string","required":true}},"block_types":{"target_dns_servers":{"nesting_mode":3,"block":{"attributes":{"ip_address":{"type":"string","required":true},"port":{"type":"number","optional":true}}},"required":true}}}},"azurerm_private_dns_resolver_inbound_endpoint":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"private_dns_resolver_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"ip_configurations":{"nesting_mode":3,"block":{"attributes":{"private_ip_address":{"type":"string","optional":true,"computed":true},"private_ip_allocation_method":{"type":"string","optional":true,"default":"Dynamic"},"subnet_id":{"type":"string","required":true}}},"required":true}}}},"azurerm_private_dns_resolver_outbound_endpoint":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"private_dns_resolver_id":{"type":"string","required":true},"subnet_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_private_dns_resolver_virtual_network_link":{"block":{"attributes":{"dns_forwarding_ruleset_id":{"type":"string","required":true},"metadata":{"type":["map","string"],"optional":true},"name":{"type":"string","required":true},"virtual_network_id":{"type":"string","required":true}}}},"azurerm_private_dns_srv_record":{"block":{"attributes":{"fqdn":{"type":"string","computed":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"ttl":{"type":"number","required":true},"zone_name":{"type":"string","required":true}},"block_types":{"record":{"nesting_mode":4,"block":{"attributes":{"port":{"type":"number","required":true},"priority":{"type":"number","required":true},"target":{"type":"string","required":true},"weight":{"type":"number","required":true}}},"required":true}}}},"azurerm_private_dns_txt_record":{"block":{"attributes":{"fqdn":{"type":"string","computed":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"ttl":{"type":"number","required":true},"zone_name":{"type":"string","required":true}},"block_types":{"record":{"nesting_mode":4,"block":{"attributes":{"value":{"type":"string","required":true}}},"required":true}}}},"azurerm_private_dns_zone":{"block":{"attributes":{"max_number_of_record_sets":{"type":"number","computed":true},"max_number_of_virtual_network_links":{"type":"number","computed":true},"max_number_of_virtual_network_links_with_registration":{"type":"number","computed":true},"name":{"type":"string","required":true},"number_of_record_sets":{"type":"number","computed":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"soa_record":{"nesting_mode":3,"block":{"attributes":{"email":{"type":"string","required":true},"expire_time":{"type":"number","optional":true,"default":2419200},"fqdn":{"type":"string","computed":true},"host_name":{"type":"string","computed":true},"minimum_ttl":{"type":"number","optional":true,"default":10},"refresh_time":{"type":"number","optional":true,"default":3600},"retry_time":{"type":"number","optional":true,"default":300},"serial_number":{"type":"number","computed":true},"tags":{"type":["map","string"],"optional":true},"ttl":{"type":"number","optional":true,"default":3600}}},"optional":true,"computed":true}}}},"azurerm_private_dns_zone_virtual_network_link":{"block":{"attributes":{"name":{"type":"string","required":true},"private_dns_zone_name":{"type":"string","required":true},"registration_enabled":{"type":"bool","optional":true,"default":false},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"virtual_network_id":{"type":"string","required":true}}}},"azurerm_private_endpoint":{"block":{"attributes":{"custom_dns_configs":{"type":["list",["object",{"fqdn":"string","ip_addresses":["list","string"]}]],"computed":true},"custom_network_interface_name":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"network_interface":{"type":["list",["object",{"id":"string","name":"string"}]],"computed":true},"private_dns_zone_configs":{"type":["list",["object",{"id":"string","name":"string","private_dns_zone_id":"string","record_sets":["list",["object",{"fqdn":"string","ip_addresses":["list","string"],"name":"string","ttl":"number","type":"string"}]]}]],"computed":true},"resource_group_name":{"type":"string","required":true},"subnet_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"ip_configuration":{"nesting_mode":3,"block":{"attributes":{"member_name":{"type":"string","optional":true,"computed":true},"name":{"type":"string","required":true},"private_ip_address":{"type":"string","required":true},"subresource_name":{"type":"string","optional":true}}},"optional":true},"private_dns_zone_group":{"nesting_mode":3,"block":{"attributes":{"id":{"type":"string","computed":true},"name":{"type":"string","required":true},"private_dns_zone_ids":{"type":["list","string"],"required":true}}},"optional":true},"private_service_connection":{"nesting_mode":3,"block":{"attributes":{"is_manual_connection":{"type":"bool","required":true},"name":{"type":"string","required":true},"private_connection_resource_alias":{"type":"string","optional":true,"exactly_one_of":["private_service_connection.0.private_connection_resource_alias","private_service_connection.0.private_connection_resource_id"]},"private_connection_resource_id":{"type":"string","optional":true,"exactly_one_of":["private_service_connection.0.private_connection_resource_alias","private_service_connection.0.private_connection_resource_id"]},"private_ip_address":{"type":"string","computed":true},"request_message":{"type":"string","optional":true},"subresource_names":{"type":["list","string"],"optional":true}}},"required":true}}}},"azurerm_private_endpoint_application_security_group_association":{"block":{"attributes":{"application_security_group_id":{"type":"string","required":true},"private_endpoint_id":{"type":"string","required":true}}}},"azurerm_private_link_service":{"block":{"attributes":{"alias":{"type":"string","computed":true},"auto_approval_subscription_ids":{"type":["set","string"],"optional":true},"enable_proxy_protocol":{"type":"bool","optional":true},"fqdns":{"type":["list","string"],"optional":true},"load_balancer_frontend_ip_configuration_ids":{"type":["set","string"],"required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"visibility_subscription_ids":{"type":["set","string"],"optional":true}},"block_types":{"nat_ip_configuration":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"primary":{"type":"bool","required":true},"private_ip_address":{"type":"string","optional":true},"private_ip_address_version":{"type":"string","optional":true,"default":"IPv4"},"subnet_id":{"type":"string","required":true}}},"required":true}}}},"azurerm_proximity_placement_group":{"block":{"attributes":{"allowed_vm_sizes":{"type":["set","string"],"optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"zone":{"type":"string","optional":true,"required_with":["allowed_vm_sizes"]}}}},"azurerm_public_ip":{"block":{"attributes":{"allocation_method":{"type":"string","required":true},"ddos_protection_mode":{"type":"string","optional":true,"default":"VirtualNetworkInherited"},"ddos_protection_plan_id":{"type":"string","optional":true},"domain_name_label":{"type":"string","optional":true},"edge_zone":{"type":"string","optional":true},"fqdn":{"type":"string","computed":true},"idle_timeout_in_minutes":{"type":"number","optional":true,"default":4},"ip_address":{"type":"string","computed":true},"ip_tags":{"type":["map","string"],"optional":true},"ip_version":{"type":"string","optional":true,"default":"IPv4"},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"public_ip_prefix_id":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"reverse_fqdn":{"type":"string","optional":true},"sku":{"type":"string","optional":true,"default":"Standard"},"sku_tier":{"type":"string","optional":true,"default":"Regional"},"tags":{"type":["map","string"],"optional":true},"zones":{"type":["set","string"],"optional":true}}}},"azurerm_public_ip_prefix":{"block":{"attributes":{"ip_prefix":{"type":"string","computed":true},"ip_version":{"type":"string","optional":true,"default":"IPv4"},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"prefix_length":{"type":"number","optional":true,"default":28},"resource_group_name":{"type":"string","required":true},"sku":{"type":"string","optional":true,"default":"Standard"},"tags":{"type":["map","string"],"optional":true},"zones":{"type":["set","string"],"optional":true}}}},"azurerm_purview_account":{"block":{"attributes":{"atlas_kafka_endpoint_primary_connection_string":{"type":"string","computed":true},"atlas_kafka_endpoint_secondary_connection_string":{"type":"string","computed":true},"catalog_endpoint":{"type":"string","computed":true},"guardian_endpoint":{"type":"string","computed":true},"location":{"type":"string","required":true},"managed_resource_group_name":{"type":"string","optional":true,"computed":true},"managed_resources":{"type":["list",["object",{"event_hub_namespace_id":"string","resource_group_id":"string","storage_account_id":"string"}]],"computed":true},"name":{"type":"string","required":true},"public_network_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"scan_endpoint":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"required":true}}}},"azurerm_recovery_services_vault":{"block":{"attributes":{"classic_vmware_replication_enabled":{"type":"bool","optional":true},"cross_region_restore_enabled":{"type":"bool","optional":true,"default":false},"immutability":{"type":"string","optional":true,"computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"sku":{"type":"string","required":true},"soft_delete_enabled":{"type":"bool","optional":true,"default":true},"storage_mode_type":{"type":"string","optional":true,"default":"GeoRedundant"},"tags":{"type":["map","string"],"optional":true}},"block_types":{"encryption":{"nesting_mode":3,"block":{"attributes":{"infrastructure_encryption_enabled":{"type":"bool","required":true},"key_id":{"type":"string","required":true},"use_system_assigned_identity":{"type":"bool","optional":true,"default":true},"user_assigned_identity_id":{"type":"string","optional":true}}},"optional":true,"required_with":["identity"]},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"monitoring":{"nesting_mode":3,"block":{"attributes":{"alerts_for_all_job_failures_enabled":{"type":"bool","optional":true,"default":true},"alerts_for_critical_operation_failures_enabled":{"type":"bool","optional":true,"default":true}}},"optional":true}}}},"azurerm_recovery_services_vault_resource_guard_association":{"block":{"attributes":{"resource_guard_id":{"type":"string","required":true},"vault_id":{"type":"string","required":true}}}},"azurerm_redhat_openshift_cluster":{"block":{"attributes":{"console_url":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"api_server_profile":{"nesting_mode":3,"block":{"attributes":{"ip_address":{"type":"string","computed":true},"url":{"type":"string","computed":true},"visibility":{"type":"string","required":true}}},"required":true},"cluster_profile":{"nesting_mode":3,"block":{"attributes":{"domain":{"type":"string","required":true},"fips_enabled":{"type":"bool","optional":true,"default":false},"managed_resource_group_name":{"type":"string","optional":true},"pull_secret":{"type":"string","optional":true},"resource_group_id":{"type":"string","computed":true},"version":{"type":"string","required":true}}},"required":true},"ingress_profile":{"nesting_mode":3,"block":{"attributes":{"ip_address":{"type":"string","computed":true},"name":{"type":"string","computed":true},"visibility":{"type":"string","required":true}}},"required":true},"main_profile":{"nesting_mode":3,"block":{"attributes":{"disk_encryption_set_id":{"type":"string","optional":true},"encryption_at_host_enabled":{"type":"bool","optional":true,"default":false},"subnet_id":{"type":"string","required":true},"vm_size":{"type":"string","required":true}}},"required":true},"network_profile":{"nesting_mode":3,"block":{"attributes":{"outbound_type":{"type":"string","optional":true,"default":"Loadbalancer"},"pod_cidr":{"type":"string","required":true},"preconfigured_network_security_group_enabled":{"type":"bool","optional":true,"default":false},"service_cidr":{"type":"string","required":true}}},"required":true},"service_principal":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","required":true}}},"required":true},"worker_profile":{"nesting_mode":3,"block":{"attributes":{"disk_encryption_set_id":{"type":"string","optional":true},"disk_size_gb":{"type":"number","required":true},"encryption_at_host_enabled":{"type":"bool","optional":true,"default":false},"node_count":{"type":"number","required":true},"subnet_id":{"type":"string","required":true},"vm_size":{"type":"string","required":true}}},"required":true}}}},"azurerm_redis_cache":{"block":{"attributes":{"access_keys_authentication_enabled":{"type":"bool","optional":true,"default":true},"capacity":{"type":"number","required":true},"family":{"type":"string","required":true},"hostname":{"type":"string","computed":true},"location":{"type":"string","required":true},"minimum_tls_version":{"type":"string","optional":true,"default":"1.2"},"name":{"type":"string","required":true},"non_ssl_port_enabled":{"type":"bool","optional":true,"default":false},"port":{"type":"number","computed":true},"primary_access_key":{"type":"string","computed":true},"primary_connection_string":{"type":"string","computed":true},"private_static_ip_address":{"type":"string","optional":true,"computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"redis_version":{"type":"string","optional":true,"default":6},"replicas_per_master":{"type":"number","optional":true,"computed":true},"replicas_per_primary":{"type":"number","optional":true,"computed":true},"resource_group_name":{"type":"string","required":true},"secondary_access_key":{"type":"string","computed":true},"secondary_connection_string":{"type":"string","computed":true},"shard_count":{"type":"number","optional":true},"sku_name":{"type":"string","required":true},"ssl_port":{"type":"number","computed":true},"subnet_id":{"type":"string","optional":true},"tags":{"type":["map","string"],"optional":true},"tenant_settings":{"type":["map","string"],"optional":true},"zones":{"type":["set","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"patch_schedule":{"nesting_mode":3,"block":{"attributes":{"day_of_week":{"type":"string","required":true},"maintenance_window":{"type":"string","optional":true,"default":"PT5H"},"start_hour_utc":{"type":"number","optional":true}}},"optional":true},"redis_configuration":{"nesting_mode":3,"block":{"attributes":{"active_directory_authentication_enabled":{"type":"bool","optional":true},"aof_backup_enabled":{"type":"bool","optional":true},"aof_storage_connection_string_0":{"type":"string","optional":true},"aof_storage_connection_string_1":{"type":"string","optional":true},"authentication_enabled":{"type":"bool","optional":true,"default":true},"data_persistence_authentication_method":{"type":"string","optional":true},"maxclients":{"type":"number","computed":true},"maxfragmentationmemory_reserved":{"type":"number","optional":true,"computed":true},"maxmemory_delta":{"type":"number","optional":true,"computed":true},"maxmemory_policy":{"type":"string","optional":true,"default":"volatile-lru"},"maxmemory_reserved":{"type":"number","optional":true,"computed":true},"notify_keyspace_events":{"type":"string","optional":true},"rdb_backup_enabled":{"type":"bool","optional":true},"rdb_backup_frequency":{"type":"number","optional":true},"rdb_backup_max_snapshot_count":{"type":"number","optional":true},"rdb_storage_connection_string":{"type":"string","optional":true},"storage_account_subscription_id":{"type":"string","optional":true}}},"optional":true,"computed":true}}}},"azurerm_redis_cache_access_policy":{"block":{"attributes":{"name":{"type":"string","required":true},"permissions":{"type":"string","required":true},"redis_cache_id":{"type":"string","required":true}}}},"azurerm_redis_cache_access_policy_assignment":{"block":{"attributes":{"access_policy_name":{"type":"string","required":true},"name":{"type":"string","required":true},"object_id":{"type":"string","required":true},"object_id_alias":{"type":"string","required":true},"redis_cache_id":{"type":"string","required":true}}}},"azurerm_redis_enterprise_cluster":{"block":{"attributes":{"hostname":{"type":"string","computed":true},"location":{"type":"string","required":true},"minimum_tls_version":{"type":"string","optional":true,"default":"1.2"},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"zones":{"type":["set","string"],"optional":true}}}},"azurerm_redis_enterprise_database":{"block":{"attributes":{"client_protocol":{"type":"string","optional":true,"default":"Encrypted"},"cluster_id":{"type":"string","required":true},"clustering_policy":{"type":"string","optional":true,"default":"OSSCluster"},"eviction_policy":{"type":"string","optional":true,"default":"VolatileLRU"},"linked_database_group_nickname":{"type":"string","optional":true,"required_with":["linked_database_id"]},"linked_database_id":{"type":["set","string"],"optional":true},"name":{"type":"string","optional":true,"default":"default"},"port":{"type":"number","optional":true,"default":10000},"primary_access_key":{"type":"string","computed":true},"secondary_access_key":{"type":"string","computed":true}},"block_types":{"module":{"nesting_mode":3,"block":{"attributes":{"args":{"type":"string","optional":true,"default":""},"name":{"type":"string","required":true},"version":{"type":"string","computed":true}}},"optional":true}}}},"azurerm_redis_firewall_rule":{"block":{"attributes":{"end_ip":{"type":"string","required":true},"name":{"type":"string","required":true},"redis_cache_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"start_ip":{"type":"string","required":true}}}},"azurerm_redis_linked_server":{"block":{"attributes":{"geo_replicated_primary_host_name":{"type":"string","computed":true},"linked_redis_cache_id":{"type":"string","required":true},"linked_redis_cache_location":{"type":"string","required":true},"name":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"server_role":{"type":"string","required":true},"target_redis_cache_name":{"type":"string","required":true}}}},"azurerm_relay_hybrid_connection":{"block":{"attributes":{"name":{"type":"string","required":true},"relay_namespace_name":{"type":"string","required":true},"requires_client_authorization":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"user_metadata":{"type":"string","optional":true}}}},"azurerm_relay_hybrid_connection_authorization_rule":{"block":{"attributes":{"hybrid_connection_name":{"type":"string","required":true},"listen":{"type":"bool","optional":true,"default":false},"manage":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"namespace_name":{"type":"string","required":true},"primary_connection_string":{"type":"string","computed":true},"primary_key":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"secondary_connection_string":{"type":"string","computed":true},"secondary_key":{"type":"string","computed":true},"send":{"type":"bool","optional":true,"default":false}}}},"azurerm_relay_namespace":{"block":{"attributes":{"location":{"type":"string","required":true},"metric_id":{"type":"string","computed":true},"name":{"type":"string","required":true},"primary_connection_string":{"type":"string","computed":true},"primary_key":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"secondary_connection_string":{"type":"string","computed":true},"secondary_key":{"type":"string","computed":true},"sku_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_relay_namespace_authorization_rule":{"block":{"attributes":{"listen":{"type":"bool","optional":true,"default":false},"manage":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"namespace_name":{"type":"string","required":true},"primary_connection_string":{"type":"string","computed":true},"primary_key":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"secondary_connection_string":{"type":"string","computed":true},"secondary_key":{"type":"string","computed":true},"send":{"type":"bool","optional":true,"default":false}}}},"azurerm_resource_deployment_script_azure_cli":{"block":{"attributes":{"cleanup_preference":{"type":"string","optional":true,"default":"Always"},"command_line":{"type":"string","optional":true},"force_update_tag":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"outputs":{"type":"string","computed":true},"primary_script_uri":{"type":"string","optional":true,"exactly_one_of":["primary_script_uri","script_content"]},"resource_group_name":{"type":"string","required":true},"retention_interval":{"type":"string","required":true},"script_content":{"type":"string","optional":true,"exactly_one_of":["primary_script_uri","script_content"]},"supporting_script_uris":{"type":["list","string"],"optional":true},"tags":{"type":["map","string"],"optional":true},"timeout":{"type":"string","optional":true,"default":"P1D"},"version":{"type":"string","required":true}},"block_types":{"container":{"nesting_mode":3,"block":{"attributes":{"container_group_name":{"type":"string","optional":true}}},"optional":true},"environment_variable":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"secure_value":{"type":"string","optional":true},"value":{"type":"string","optional":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"required":true},"type":{"type":"string","required":true}}},"optional":true},"storage_account":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"name":{"type":"string","required":true}}},"optional":true}}}},"azurerm_resource_deployment_script_azure_power_shell":{"block":{"attributes":{"cleanup_preference":{"type":"string","optional":true,"default":"Always"},"command_line":{"type":"string","optional":true},"force_update_tag":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"outputs":{"type":"string","computed":true},"primary_script_uri":{"type":"string","optional":true,"exactly_one_of":["primary_script_uri","script_content"]},"resource_group_name":{"type":"string","required":true},"retention_interval":{"type":"string","required":true},"script_content":{"type":"string","optional":true,"exactly_one_of":["primary_script_uri","script_content"]},"supporting_script_uris":{"type":["list","string"],"optional":true},"tags":{"type":["map","string"],"optional":true},"timeout":{"type":"string","optional":true,"default":"P1D"},"version":{"type":"string","required":true}},"block_types":{"container":{"nesting_mode":3,"block":{"attributes":{"container_group_name":{"type":"string","optional":true}}},"optional":true},"environment_variable":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"secure_value":{"type":"string","optional":true},"value":{"type":"string","optional":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"required":true},"type":{"type":"string","required":true}}},"optional":true},"storage_account":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"name":{"type":"string","required":true}}},"optional":true}}}},"azurerm_resource_group":{"block":{"attributes":{"location":{"type":"string","required":true},"managed_by":{"type":"string","optional":true},"name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_resource_group_cost_management_export":{"block":{"attributes":{"active":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"recurrence_period_end_date":{"type":"string","required":true},"recurrence_period_start_date":{"type":"string","required":true},"recurrence_type":{"type":"string","required":true},"resource_group_id":{"type":"string","required":true}},"block_types":{"export_data_options":{"nesting_mode":3,"block":{"attributes":{"time_frame":{"type":"string","required":true},"type":{"type":"string","required":true}}},"required":true},"export_data_storage_location":{"nesting_mode":3,"block":{"attributes":{"container_id":{"type":"string","required":true},"root_folder_path":{"type":"string","required":true}}},"required":true}}}},"azurerm_resource_group_cost_management_view":{"block":{"attributes":{"accumulated":{"type":"bool","required":true},"chart_type":{"type":"string","required":true},"display_name":{"type":"string","required":true},"name":{"type":"string","required":true},"report_type":{"type":"string","required":true},"resource_group_id":{"type":"string","required":true},"timeframe":{"type":"string","required":true}},"block_types":{"dataset":{"nesting_mode":3,"block":{"attributes":{"granularity":{"type":"string","required":true}},"block_types":{"aggregation":{"nesting_mode":4,"block":{"attributes":{"column_name":{"type":"string","required":true},"name":{"type":"string","required":true}}},"required":true},"grouping":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"type":{"type":"string","required":true}}},"optional":true},"sorting":{"nesting_mode":3,"block":{"attributes":{"direction":{"type":"string","required":true},"name":{"type":"string","required":true}}},"optional":true}}},"required":true},"kpi":{"nesting_mode":3,"block":{"attributes":{"type":{"type":"string","required":true}}},"optional":true},"pivot":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_resource_group_policy_assignment":{"block":{"attributes":{"description":{"type":"string","optional":true},"display_name":{"type":"string","optional":true},"enforce":{"type":"bool","optional":true,"default":true},"location":{"type":"string","optional":true},"metadata":{"type":"string","optional":true,"computed":true},"name":{"type":"string","required":true},"not_scopes":{"type":["list","string"],"optional":true},"parameters":{"type":"string","optional":true},"policy_definition_id":{"type":"string","required":true},"resource_group_id":{"type":"string","required":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"non_compliance_message":{"nesting_mode":3,"block":{"attributes":{"content":{"type":"string","required":true},"policy_definition_reference_id":{"type":"string","optional":true}}},"optional":true},"overrides":{"nesting_mode":3,"block":{"attributes":{"value":{"type":"string","required":true}},"block_types":{"selectors":{"nesting_mode":3,"block":{"attributes":{"in":{"type":["list","string"],"optional":true},"kind":{"type":"string","computed":true},"not_in":{"type":["list","string"],"optional":true}}},"optional":true}}},"optional":true},"resource_selectors":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","optional":true}},"block_types":{"selectors":{"nesting_mode":3,"block":{"attributes":{"in":{"type":["list","string"],"optional":true},"kind":{"type":"string","required":true},"not_in":{"type":["list","string"],"optional":true}}},"required":true}}},"optional":true}}}},"azurerm_resource_group_policy_exemption":{"block":{"attributes":{"description":{"type":"string","optional":true},"display_name":{"type":"string","optional":true},"exemption_category":{"type":"string","required":true},"expires_on":{"type":"string","optional":true},"metadata":{"type":"string","optional":true,"computed":true},"name":{"type":"string","required":true},"policy_assignment_id":{"type":"string","required":true},"policy_definition_reference_ids":{"type":["list","string"],"optional":true},"resource_group_id":{"type":"string","required":true}}}},"azurerm_resource_group_policy_remediation":{"block":{"attributes":{"failure_percentage":{"type":"number","optional":true},"location_filters":{"type":["list","string"],"optional":true},"name":{"type":"string","required":true},"parallel_deployments":{"type":"number","optional":true},"policy_assignment_id":{"type":"string","required":true},"policy_definition_reference_id":{"type":"string","optional":true},"resource_count":{"type":"number","optional":true},"resource_discovery_mode":{"type":"string","optional":true,"default":"ExistingNonCompliant"},"resource_group_id":{"type":"string","required":true}}}},"azurerm_resource_group_template_deployment":{"block":{"attributes":{"debug_level":{"type":"string","optional":true},"deployment_mode":{"type":"string","required":true},"name":{"type":"string","required":true},"output_content":{"type":"string","computed":true},"parameters_content":{"type":"string","optional":true,"computed":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"template_content":{"type":"string","optional":true,"computed":true,"exactly_one_of":["template_content","template_spec_version_id"]},"template_spec_version_id":{"type":"string","optional":true,"exactly_one_of":["template_content","template_spec_version_id"]}}}},"azurerm_resource_management_private_link":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_resource_management_private_link_association":{"block":{"attributes":{"management_group_id":{"type":"string","required":true},"name":{"type":"string","optional":true},"public_network_access_enabled":{"type":"bool","required":true},"resource_management_private_link_id":{"type":"string","required":true},"tenant_id":{"type":"string","computed":true}}}},"azurerm_resource_policy_assignment":{"block":{"attributes":{"description":{"type":"string","optional":true},"display_name":{"type":"string","optional":true},"enforce":{"type":"bool","optional":true,"default":true},"location":{"type":"string","optional":true},"metadata":{"type":"string","optional":true,"computed":true},"name":{"type":"string","required":true},"not_scopes":{"type":["list","string"],"optional":true},"parameters":{"type":"string","optional":true},"policy_definition_id":{"type":"string","required":true},"resource_id":{"type":"string","required":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"non_compliance_message":{"nesting_mode":3,"block":{"attributes":{"content":{"type":"string","required":true},"policy_definition_reference_id":{"type":"string","optional":true}}},"optional":true},"overrides":{"nesting_mode":3,"block":{"attributes":{"value":{"type":"string","required":true}},"block_types":{"selectors":{"nesting_mode":3,"block":{"attributes":{"in":{"type":["list","string"],"optional":true},"kind":{"type":"string","computed":true},"not_in":{"type":["list","string"],"optional":true}}},"optional":true}}},"optional":true},"resource_selectors":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","optional":true}},"block_types":{"selectors":{"nesting_mode":3,"block":{"attributes":{"in":{"type":["list","string"],"optional":true},"kind":{"type":"string","required":true},"not_in":{"type":["list","string"],"optional":true}}},"required":true}}},"optional":true}}}},"azurerm_resource_policy_exemption":{"block":{"attributes":{"description":{"type":"string","optional":true},"display_name":{"type":"string","optional":true},"exemption_category":{"type":"string","required":true},"expires_on":{"type":"string","optional":true},"metadata":{"type":"string","optional":true,"computed":true},"name":{"type":"string","required":true},"policy_assignment_id":{"type":"string","required":true},"policy_definition_reference_ids":{"type":["list","string"],"optional":true},"resource_id":{"type":"string","required":true}}}},"azurerm_resource_policy_remediation":{"block":{"attributes":{"failure_percentage":{"type":"number","optional":true},"location_filters":{"type":["list","string"],"optional":true},"name":{"type":"string","required":true},"parallel_deployments":{"type":"number","optional":true},"policy_assignment_id":{"type":"string","required":true},"policy_definition_reference_id":{"type":"string","optional":true},"resource_count":{"type":"number","optional":true},"resource_discovery_mode":{"type":"string","optional":true,"default":"ExistingNonCompliant"},"resource_id":{"type":"string","required":true}}}},"azurerm_resource_provider_registration":{"block":{"attributes":{"name":{"type":"string","required":true}},"block_types":{"feature":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"registered":{"type":"bool","required":true}}},"optional":true}}}},"azurerm_restore_point_collection":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"source_virtual_machine_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_role_assignment":{"block":{"attributes":{"condition":{"type":"string","optional":true,"required_with":["condition_version"]},"condition_version":{"type":"string","optional":true,"required_with":["condition"]},"delegated_managed_identity_resource_id":{"type":"string","optional":true},"description":{"type":"string","optional":true},"name":{"type":"string","optional":true,"computed":true},"principal_id":{"type":"string","required":true},"principal_type":{"type":"string","optional":true,"computed":true},"role_definition_id":{"type":"string","optional":true,"computed":true,"conflicts_with":["role_definition_name"]},"role_definition_name":{"type":"string","optional":true,"computed":true,"conflicts_with":["role_definition_id"]},"scope":{"type":"string","required":true},"skip_service_principal_aad_check":{"type":"bool","optional":true,"computed":true}}}},"azurerm_role_definition":{"block":{"attributes":{"assignable_scopes":{"type":["list","string"],"optional":true,"computed":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"role_definition_id":{"type":"string","optional":true,"computed":true},"role_definition_resource_id":{"type":"string","computed":true},"scope":{"type":"string","required":true}},"block_types":{"permissions":{"nesting_mode":3,"block":{"attributes":{"actions":{"type":["list","string"],"optional":true},"data_actions":{"type":["set","string"],"optional":true},"not_actions":{"type":["list","string"],"optional":true},"not_data_actions":{"type":["set","string"],"optional":true}}},"optional":true}}}},"azurerm_role_management_policy":{"block":{"attributes":{"description":{"type":"string","computed":true},"name":{"type":"string","computed":true},"role_definition_id":{"type":"string","required":true},"scope":{"type":"string","required":true}},"block_types":{"activation_rules":{"nesting_mode":3,"block":{"attributes":{"maximum_duration":{"type":"string","optional":true,"computed":true},"require_approval":{"type":"bool","optional":true,"computed":true},"require_justification":{"type":"bool","optional":true,"computed":true},"require_multifactor_authentication":{"type":"bool","optional":true,"computed":true,"conflicts_with":["activation_rules.0.required_conditional_access_authentication_context"]},"require_ticket_info":{"type":"bool","optional":true,"computed":true},"required_conditional_access_authentication_context":{"type":"string","optional":true,"computed":true,"conflicts_with":["activation_rules.0.require_multifactor_authentication"]}},"block_types":{"approval_stage":{"nesting_mode":3,"block":{"block_types":{"primary_approver":{"nesting_mode":4,"block":{"attributes":{"object_id":{"type":"string","required":true},"type":{"type":"string","required":true}}},"required":true}}},"optional":true}}},"optional":true,"computed":true},"active_assignment_rules":{"nesting_mode":3,"block":{"attributes":{"expiration_required":{"type":"bool","optional":true,"computed":true},"expire_after":{"type":"string","optional":true,"computed":true},"require_justification":{"type":"bool","optional":true,"computed":true},"require_multifactor_authentication":{"type":"bool","optional":true,"computed":true},"require_ticket_info":{"type":"bool","optional":true,"computed":true}}},"optional":true,"computed":true},"eligible_assignment_rules":{"nesting_mode":3,"block":{"attributes":{"expiration_required":{"type":"bool","optional":true,"computed":true},"expire_after":{"type":"string","optional":true,"computed":true}}},"optional":true,"computed":true},"notification_rules":{"nesting_mode":3,"block":{"block_types":{"active_assignments":{"nesting_mode":3,"block":{"block_types":{"admin_notifications":{"nesting_mode":3,"block":{"attributes":{"additional_recipients":{"type":["set","string"],"optional":true,"computed":true},"default_recipients":{"type":"bool","required":true},"notification_level":{"type":"string","required":true}}},"optional":true,"computed":true},"approver_notifications":{"nesting_mode":3,"block":{"attributes":{"additional_recipients":{"type":["set","string"],"optional":true,"computed":true},"default_recipients":{"type":"bool","required":true},"notification_level":{"type":"string","required":true}}},"optional":true,"computed":true},"assignee_notifications":{"nesting_mode":3,"block":{"attributes":{"additional_recipients":{"type":["set","string"],"optional":true,"computed":true},"default_recipients":{"type":"bool","required":true},"notification_level":{"type":"string","required":true}}},"optional":true,"computed":true}}},"optional":true,"computed":true},"eligible_activations":{"nesting_mode":3,"block":{"block_types":{"admin_notifications":{"nesting_mode":3,"block":{"attributes":{"additional_recipients":{"type":["set","string"],"optional":true,"computed":true},"default_recipients":{"type":"bool","required":true},"notification_level":{"type":"string","required":true}}},"optional":true,"computed":true},"approver_notifications":{"nesting_mode":3,"block":{"attributes":{"additional_recipients":{"type":["set","string"],"optional":true,"computed":true},"default_recipients":{"type":"bool","required":true},"notification_level":{"type":"string","required":true}}},"optional":true,"computed":true},"assignee_notifications":{"nesting_mode":3,"block":{"attributes":{"additional_recipients":{"type":["set","string"],"optional":true,"computed":true},"default_recipients":{"type":"bool","required":true},"notification_level":{"type":"string","required":true}}},"optional":true,"computed":true}}},"optional":true,"computed":true},"eligible_assignments":{"nesting_mode":3,"block":{"block_types":{"admin_notifications":{"nesting_mode":3,"block":{"attributes":{"additional_recipients":{"type":["set","string"],"optional":true,"computed":true},"default_recipients":{"type":"bool","required":true},"notification_level":{"type":"string","required":true}}},"optional":true,"computed":true},"approver_notifications":{"nesting_mode":3,"block":{"attributes":{"additional_recipients":{"type":["set","string"],"optional":true,"computed":true},"default_recipients":{"type":"bool","required":true},"notification_level":{"type":"string","required":true}}},"optional":true,"computed":true},"assignee_notifications":{"nesting_mode":3,"block":{"attributes":{"additional_recipients":{"type":["set","string"],"optional":true,"computed":true},"default_recipients":{"type":"bool","required":true},"notification_level":{"type":"string","required":true}}},"optional":true,"computed":true}}},"optional":true,"computed":true}}},"optional":true,"computed":true}}}},"azurerm_route":{"block":{"attributes":{"address_prefix":{"type":"string","required":true},"name":{"type":"string","required":true},"next_hop_in_ip_address":{"type":"string","optional":true},"next_hop_type":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"route_table_name":{"type":"string","required":true}}}},"azurerm_route_filter":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"rule":{"type":["list",["object",{"access":"string","communities":["list","string"],"name":"string","rule_type":"string"}]],"optional":true,"computed":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_route_map":{"block":{"attributes":{"name":{"type":"string","required":true},"virtual_hub_id":{"type":"string","required":true}},"block_types":{"rule":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"next_step_if_matched":{"type":"string","optional":true,"default":"Unknown"}},"block_types":{"action":{"nesting_mode":3,"block":{"attributes":{"type":{"type":"string","required":true}},"block_types":{"parameter":{"nesting_mode":3,"block":{"attributes":{"as_path":{"type":["list","string"],"optional":true},"community":{"type":["list","string"],"optional":true},"route_prefix":{"type":["list","string"],"optional":true}}},"optional":true}}},"optional":true},"match_criterion":{"nesting_mode":3,"block":{"attributes":{"as_path":{"type":["list","string"],"optional":true},"community":{"type":["list","string"],"optional":true},"match_condition":{"type":"string","required":true},"route_prefix":{"type":["list","string"],"optional":true}}},"optional":true}}},"optional":true}}}},"azurerm_route_server":{"block":{"attributes":{"branch_to_branch_traffic_enabled":{"type":"bool","optional":true,"default":false},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"public_ip_address_id":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"routing_state":{"type":"string","computed":true},"sku":{"type":"string","required":true},"subnet_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"virtual_router_asn":{"type":"number","computed":true},"virtual_router_ips":{"type":["set","string"],"computed":true}}}},"azurerm_route_server_bgp_connection":{"block":{"attributes":{"name":{"type":"string","required":true},"peer_asn":{"type":"number","required":true},"peer_ip":{"type":"string","required":true},"route_server_id":{"type":"string","required":true}}}},"azurerm_route_table":{"block":{"attributes":{"bgp_route_propagation_enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"route":{"type":["set",["object",{"address_prefix":"string","name":"string","next_hop_in_ip_address":"string","next_hop_type":"string"}]],"optional":true,"computed":true},"subnets":{"type":["set","string"],"computed":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_search_service":{"block":{"attributes":{"allowed_ips":{"type":["set","string"],"optional":true},"authentication_failure_mode":{"type":"string","optional":true},"customer_managed_key_enforcement_enabled":{"type":"bool","optional":true,"default":false},"hosting_mode":{"type":"string","optional":true,"default":"default"},"local_authentication_enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"partition_count":{"type":"number","optional":true,"default":1},"primary_key":{"type":"string","computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"query_keys":{"type":["list",["object",{"key":"string","name":"string"}]],"computed":true},"replica_count":{"type":"number","optional":true,"default":1},"resource_group_name":{"type":"string","required":true},"secondary_key":{"type":"string","computed":true},"semantic_search_sku":{"type":"string","optional":true},"sku":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_search_shared_private_link_service":{"block":{"attributes":{"name":{"type":"string","required":true},"request_message":{"type":"string","optional":true},"search_service_id":{"type":"string","required":true},"status":{"type":"string","computed":true},"subresource_name":{"type":"string","required":true},"target_resource_id":{"type":"string","required":true}}}},"azurerm_security_center_assessment":{"block":{"attributes":{"additional_data":{"type":["map","string"],"optional":true},"assessment_policy_id":{"type":"string","required":true},"target_resource_id":{"type":"string","required":true}},"block_types":{"status":{"nesting_mode":3,"block":{"attributes":{"cause":{"type":"string","optional":true},"code":{"type":"string","required":true},"description":{"type":"string","optional":true}}},"required":true}}}},"azurerm_security_center_assessment_policy":{"block":{"attributes":{"categories":{"type":["set","string"],"optional":true,"computed":true},"description":{"type":"string","required":true},"display_name":{"type":"string","required":true},"implementation_effort":{"type":"string","optional":true},"name":{"type":"string","computed":true},"remediation_description":{"type":"string","optional":true},"severity":{"type":"string","optional":true,"default":"Medium"},"threats":{"type":["set","string"],"optional":true},"user_impact":{"type":"string","optional":true}}}},"azurerm_security_center_auto_provisioning":{"block":{"attributes":{"auto_provision":{"type":"string","required":true}}}},"azurerm_security_center_automation":{"block":{"attributes":{"description":{"type":"string","optional":true},"enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"scopes":{"type":["list","string"],"required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"action":{"nesting_mode":3,"block":{"attributes":{"connection_string":{"type":"string","optional":true},"resource_id":{"type":"string","required":true},"trigger_url":{"type":"string","optional":true},"type":{"type":"string","required":true}}},"required":true},"source":{"nesting_mode":3,"block":{"attributes":{"event_source":{"type":"string","required":true}},"block_types":{"rule_set":{"nesting_mode":3,"block":{"block_types":{"rule":{"nesting_mode":3,"block":{"attributes":{"expected_value":{"type":"string","required":true},"operator":{"type":"string","required":true},"property_path":{"type":"string","required":true},"property_type":{"type":"string","required":true}}},"required":true}}},"optional":true}}},"required":true}}}},"azurerm_security_center_contact":{"block":{"attributes":{"alert_notifications":{"type":"bool","required":true},"alerts_to_admins":{"type":"bool","required":true},"email":{"type":"string","required":true},"name":{"type":"string","required":true},"phone":{"type":"string","optional":true}}}},"azurerm_security_center_server_vulnerability_assessment_virtual_machine":{"block":{"attributes":{"virtual_machine_id":{"type":"string","required":true}}}},"azurerm_security_center_server_vulnerability_assessments_setting":{"block":{"attributes":{"vulnerability_assessment_provider":{"type":"string","required":true}}}},"azurerm_security_center_setting":{"block":{"attributes":{"enabled":{"type":"bool","required":true},"setting_name":{"type":"string","required":true}}}},"azurerm_security_center_storage_defender":{"block":{"attributes":{"malware_scanning_on_upload_cap_gb_per_month":{"type":"number","optional":true,"default":-1},"malware_scanning_on_upload_enabled":{"type":"bool","optional":true,"default":false},"override_subscription_settings_enabled":{"type":"bool","optional":true,"default":false},"scan_results_event_grid_topic_id":{"type":"string","optional":true},"sensitive_data_discovery_enabled":{"type":"bool","optional":true,"default":false},"storage_account_id":{"type":"string","required":true}}}},"azurerm_security_center_subscription_pricing":{"block":{"attributes":{"resource_type":{"type":"string","optional":true,"default":"VirtualMachines"},"subplan":{"type":"string","optional":true},"tier":{"type":"string","required":true}},"block_types":{"extension":{"nesting_mode":4,"block":{"attributes":{"additional_extension_properties":{"type":["map","string"],"optional":true},"name":{"type":"string","required":true}}},"optional":true}}}},"azurerm_security_center_workspace":{"block":{"attributes":{"scope":{"type":"string","required":true},"workspace_id":{"type":"string","required":true}}}},"azurerm_sentinel_alert_rule_anomaly_built_in":{"block":{"attributes":{"anomaly_settings_version":{"type":"number","computed":true},"anomaly_version":{"type":"string","computed":true},"description":{"type":"string","computed":true},"display_name":{"type":"string","optional":true,"computed":true,"exactly_one_of":["name","display_name"]},"enabled":{"type":"bool","required":true},"frequency":{"type":"string","computed":true},"log_analytics_workspace_id":{"type":"string","required":true},"mode":{"type":"string","required":true},"multi_select_observation":{"type":["list",["object",{"description":"string","name":"string","supported_values":["list","string"],"values":["list","string"]}]],"computed":true},"name":{"type":"string","optional":true,"computed":true,"exactly_one_of":["name","display_name"]},"prioritized_exclude_observation":{"type":["list",["object",{"description":"string","exclude":"string","name":"string","prioritize":"string"}]],"computed":true},"required_data_connector":{"type":["list",["object",{"connector_id":"string","data_types":["list","string"]}]],"computed":true},"settings_definition_id":{"type":"string","computed":true},"single_select_observation":{"type":["list",["object",{"description":"string","name":"string","supported_values":["list","string"],"value":"string"}]],"computed":true},"tactics":{"type":["list","string"],"computed":true},"techniques":{"type":["list","string"],"computed":true},"threshold_observation":{"type":["list",["object",{"description":"string","max":"string","min":"string","name":"string","value":"string"}]],"computed":true}}}},"azurerm_sentinel_alert_rule_anomaly_duplicate":{"block":{"attributes":{"anomaly_settings_version":{"type":"number","computed":true},"anomaly_version":{"type":"string","computed":true},"built_in_rule_id":{"type":"string","required":true},"description":{"type":"string","computed":true},"display_name":{"type":"string","required":true},"enabled":{"type":"bool","required":true},"frequency":{"type":"string","computed":true},"is_default_settings":{"type":"bool","computed":true},"log_analytics_workspace_id":{"type":"string","required":true},"mode":{"type":"string","required":true},"name":{"type":"string","computed":true},"required_data_connector":{"type":["list",["object",{"connector_id":"string","data_types":["list","string"]}]],"computed":true},"settings_definition_id":{"type":"string","computed":true},"tactics":{"type":["list","string"],"computed":true},"techniques":{"type":["list","string"],"computed":true}},"block_types":{"multi_select_observation":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","computed":true},"name":{"type":"string","required":true},"supported_values":{"type":["list","string"],"computed":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"computed":true},"prioritized_exclude_observation":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","computed":true},"exclude":{"type":"string","optional":true},"name":{"type":"string","required":true},"prioritize":{"type":"string","optional":true}}},"optional":true,"computed":true},"single_select_observation":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","computed":true},"name":{"type":"string","required":true},"supported_values":{"type":["list","string"],"computed":true},"value":{"type":"string","required":true}}},"optional":true,"computed":true},"threshold_observation":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","computed":true},"max":{"type":"string","computed":true},"min":{"type":"string","computed":true},"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true,"computed":true}}}},"azurerm_sentinel_alert_rule_fusion":{"block":{"attributes":{"alert_rule_template_guid":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":true},"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true}},"block_types":{"source":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true}},"block_types":{"sub_type":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"severities_allowed":{"type":["set","string"],"required":true}}},"optional":true}}},"optional":true,"computed":true}}}},"azurerm_sentinel_alert_rule_machine_learning_behavior_analytics":{"block":{"attributes":{"alert_rule_template_guid":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":true},"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true}}}},"azurerm_sentinel_alert_rule_ms_security_incident":{"block":{"attributes":{"alert_rule_template_guid":{"type":"string","optional":true},"description":{"type":"string","optional":true},"display_name":{"type":"string","required":true},"display_name_exclude_filter":{"type":["set","string"],"optional":true},"display_name_filter":{"type":["set","string"],"optional":true},"enabled":{"type":"bool","optional":true,"default":true},"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true},"product_filter":{"type":"string","required":true},"severity_filter":{"type":["set","string"],"required":true}}}},"azurerm_sentinel_alert_rule_nrt":{"block":{"attributes":{"alert_rule_template_guid":{"type":"string","optional":true},"alert_rule_template_version":{"type":"string","optional":true},"custom_details":{"type":["map","string"],"optional":true},"description":{"type":"string","optional":true},"display_name":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":true},"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true},"query":{"type":"string","required":true},"severity":{"type":"string","required":true},"suppression_duration":{"type":"string","optional":true,"default":"PT5H"},"suppression_enabled":{"type":"bool","optional":true,"default":false},"tactics":{"type":["set","string"],"optional":true},"techniques":{"type":["set","string"],"optional":true}},"block_types":{"alert_details_override":{"nesting_mode":3,"block":{"attributes":{"description_format":{"type":"string","optional":true},"display_name_format":{"type":"string","optional":true},"severity_column_name":{"type":"string","optional":true},"tactics_column_name":{"type":"string","optional":true}},"block_types":{"dynamic_property":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true},"entity_mapping":{"nesting_mode":3,"block":{"attributes":{"entity_type":{"type":"string","required":true}},"block_types":{"field_mapping":{"nesting_mode":3,"block":{"attributes":{"column_name":{"type":"string","required":true},"identifier":{"type":"string","required":true}}},"required":true}}},"optional":true},"event_grouping":{"nesting_mode":3,"block":{"attributes":{"aggregation_method":{"type":"string","required":true}}},"required":true},"incident":{"nesting_mode":3,"block":{"attributes":{"create_incident_enabled":{"type":"bool","required":true}},"block_types":{"grouping":{"nesting_mode":3,"block":{"attributes":{"by_alert_details":{"type":["list","string"],"optional":true},"by_custom_details":{"type":["list","string"],"optional":true},"by_entities":{"type":["list","string"],"optional":true},"enabled":{"type":"bool","optional":true,"default":true},"entity_matching_method":{"type":"string","optional":true,"default":"AnyAlert"},"lookback_duration":{"type":"string","optional":true,"default":"PT5M"},"reopen_closed_incidents":{"type":"bool","optional":true,"default":false}}},"required":true}}},"optional":true,"computed":true},"sentinel_entity_mapping":{"nesting_mode":3,"block":{"attributes":{"column_name":{"type":"string","required":true}}},"optional":true}}}},"azurerm_sentinel_alert_rule_scheduled":{"block":{"attributes":{"alert_rule_template_guid":{"type":"string","optional":true},"alert_rule_template_version":{"type":"string","optional":true},"custom_details":{"type":["map","string"],"optional":true},"description":{"type":"string","optional":true},"display_name":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":true},"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true},"query":{"type":"string","required":true},"query_frequency":{"type":"string","optional":true,"default":"PT5H"},"query_period":{"type":"string","optional":true,"default":"PT5H"},"severity":{"type":"string","required":true},"suppression_duration":{"type":"string","optional":true,"default":"PT5H"},"suppression_enabled":{"type":"bool","optional":true,"default":false},"tactics":{"type":["set","string"],"optional":true},"techniques":{"type":["set","string"],"optional":true},"trigger_operator":{"type":"string","optional":true,"default":"GreaterThan"},"trigger_threshold":{"type":"number","optional":true,"default":0}},"block_types":{"alert_details_override":{"nesting_mode":3,"block":{"attributes":{"description_format":{"type":"string","optional":true},"display_name_format":{"type":"string","optional":true},"severity_column_name":{"type":"string","optional":true},"tactics_column_name":{"type":"string","optional":true}},"block_types":{"dynamic_property":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true},"entity_mapping":{"nesting_mode":3,"block":{"attributes":{"entity_type":{"type":"string","required":true}},"block_types":{"field_mapping":{"nesting_mode":3,"block":{"attributes":{"column_name":{"type":"string","required":true},"identifier":{"type":"string","required":true}}},"required":true}}},"optional":true},"event_grouping":{"nesting_mode":3,"block":{"attributes":{"aggregation_method":{"type":"string","required":true}}},"optional":true},"incident":{"nesting_mode":3,"block":{"attributes":{"create_incident_enabled":{"type":"bool","required":true}},"block_types":{"grouping":{"nesting_mode":3,"block":{"attributes":{"by_alert_details":{"type":["list","string"],"optional":true},"by_custom_details":{"type":["list","string"],"optional":true},"by_entities":{"type":["list","string"],"optional":true},"enabled":{"type":"bool","optional":true,"default":true},"entity_matching_method":{"type":"string","optional":true,"default":"AnyAlert"},"lookback_duration":{"type":"string","optional":true,"default":"PT5M"},"reopen_closed_incidents":{"type":"bool","optional":true,"default":false}}},"required":true}}},"optional":true,"computed":true},"sentinel_entity_mapping":{"nesting_mode":3,"block":{"attributes":{"column_name":{"type":"string","required":true}}},"optional":true}}}},"azurerm_sentinel_alert_rule_threat_intelligence":{"block":{"attributes":{"alert_rule_template_guid":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":true},"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true}}}},"azurerm_sentinel_automation_rule":{"block":{"attributes":{"condition_json":{"type":"string","optional":true},"display_name":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":true},"expiration":{"type":"string","optional":true},"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true},"order":{"type":"number","required":true},"triggers_on":{"type":"string","optional":true,"default":"Incidents"},"triggers_when":{"type":"string","optional":true,"default":"Created"}},"block_types":{"action_incident":{"nesting_mode":3,"block":{"attributes":{"classification":{"type":"string","optional":true},"classification_comment":{"type":"string","optional":true},"labels":{"type":["list","string"],"optional":true},"order":{"type":"number","required":true},"owner_id":{"type":"string","optional":true},"severity":{"type":"string","optional":true},"status":{"type":"string","optional":true}}},"optional":true,"at_least_one_of":["action_incident","action_playbook"]},"action_playbook":{"nesting_mode":3,"block":{"attributes":{"logic_app_id":{"type":"string","required":true},"order":{"type":"number","required":true},"tenant_id":{"type":"string","optional":true,"computed":true}}},"optional":true,"at_least_one_of":["action_incident","action_playbook"]}}}},"azurerm_sentinel_data_connector_aws_cloud_trail":{"block":{"attributes":{"aws_role_arn":{"type":"string","required":true},"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true}}}},"azurerm_sentinel_data_connector_aws_s3":{"block":{"attributes":{"aws_role_arn":{"type":"string","required":true},"destination_table":{"type":"string","required":true},"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true},"sqs_urls":{"type":["list","string"],"required":true}}}},"azurerm_sentinel_data_connector_azure_active_directory":{"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true},"tenant_id":{"type":"string","optional":true,"computed":true}}}},"azurerm_sentinel_data_connector_azure_advanced_threat_protection":{"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true},"tenant_id":{"type":"string","optional":true,"computed":true}}}},"azurerm_sentinel_data_connector_azure_security_center":{"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true},"subscription_id":{"type":"string","optional":true,"computed":true}}}},"azurerm_sentinel_data_connector_dynamics_365":{"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true},"tenant_id":{"type":"string","optional":true,"computed":true}}}},"azurerm_sentinel_data_connector_iot":{"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true},"subscription_id":{"type":"string","optional":true,"computed":true}}}},"azurerm_sentinel_data_connector_microsoft_cloud_app_security":{"block":{"attributes":{"alerts_enabled":{"type":"bool","optional":true,"default":true},"discovery_logs_enabled":{"type":"bool","optional":true,"default":true},"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true},"tenant_id":{"type":"string","optional":true,"computed":true}}}},"azurerm_sentinel_data_connector_microsoft_defender_advanced_threat_protection":{"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true},"tenant_id":{"type":"string","optional":true,"computed":true}}}},"azurerm_sentinel_data_connector_microsoft_threat_intelligence":{"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"microsoft_emerging_threat_feed_lookback_date":{"type":"string","required":true},"name":{"type":"string","required":true},"tenant_id":{"type":"string","optional":true,"computed":true}}}},"azurerm_sentinel_data_connector_microsoft_threat_protection":{"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true},"tenant_id":{"type":"string","optional":true,"computed":true}}}},"azurerm_sentinel_data_connector_office_365":{"block":{"attributes":{"exchange_enabled":{"type":"bool","optional":true,"default":true},"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true},"sharepoint_enabled":{"type":"bool","optional":true,"default":true},"teams_enabled":{"type":"bool","optional":true,"default":true},"tenant_id":{"type":"string","optional":true,"computed":true}}}},"azurerm_sentinel_data_connector_office_365_project":{"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true},"tenant_id":{"type":"string","optional":true,"computed":true}}}},"azurerm_sentinel_data_connector_office_atp":{"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true},"tenant_id":{"type":"string","optional":true,"computed":true}}}},"azurerm_sentinel_data_connector_office_irm":{"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true},"tenant_id":{"type":"string","optional":true,"computed":true}}}},"azurerm_sentinel_data_connector_office_power_bi":{"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true},"tenant_id":{"type":"string","optional":true,"computed":true}}}},"azurerm_sentinel_data_connector_threat_intelligence":{"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"lookback_date":{"type":"string","optional":true,"default":"1970-01-01T00:00:00Z"},"name":{"type":"string","required":true},"tenant_id":{"type":"string","optional":true,"computed":true}}}},"azurerm_sentinel_data_connector_threat_intelligence_taxii":{"block":{"attributes":{"api_root_url":{"type":"string","required":true},"collection_id":{"type":"string","required":true},"display_name":{"type":"string","required":true},"log_analytics_workspace_id":{"type":"string","required":true},"lookback_date":{"type":"string","optional":true,"default":"1970-01-01T00:00:00Z"},"name":{"type":"string","required":true},"password":{"type":"string","optional":true},"polling_frequency":{"type":"string","optional":true,"default":"OnceAnHour"},"tenant_id":{"type":"string","optional":true,"computed":true},"user_name":{"type":"string","optional":true}}}},"azurerm_sentinel_log_analytics_workspace_onboarding":{"block":{"attributes":{"customer_managed_key_enabled":{"type":"bool","optional":true,"default":false},"workspace_id":{"type":"string","required":true}}}},"azurerm_sentinel_metadata":{"block":{"attributes":{"content_id":{"type":"string","required":true},"content_schema_version":{"type":"string","optional":true,"default":"2.0"},"custom_version":{"type":"string","optional":true},"dependency":{"type":"string","optional":true},"first_publish_date":{"type":"string","optional":true},"icon_id":{"type":"string","optional":true},"kind":{"type":"string","required":true},"last_publish_date":{"type":"string","optional":true},"name":{"type":"string","required":true},"parent_id":{"type":"string","required":true},"preview_images":{"type":["list","string"],"optional":true},"preview_images_dark":{"type":["list","string"],"optional":true},"providers":{"type":["list","string"],"optional":true},"threat_analysis_tactics":{"type":["list","string"],"optional":true},"threat_analysis_techniques":{"type":["list","string"],"optional":true},"version":{"type":"string","optional":true},"workspace_id":{"type":"string","required":true}},"block_types":{"author":{"nesting_mode":3,"block":{"attributes":{"email":{"type":"string","optional":true},"link":{"type":"string","optional":true},"name":{"type":"string","optional":true}}},"optional":true},"category":{"nesting_mode":3,"block":{"attributes":{"domains":{"type":["list","string"],"optional":true},"verticals":{"type":["list","string"],"optional":true}}},"optional":true},"source":{"nesting_mode":3,"block":{"attributes":{"id":{"type":"string","optional":true},"kind":{"type":"string","required":true},"name":{"type":"string","optional":true}}},"optional":true,"computed":true},"support":{"nesting_mode":3,"block":{"attributes":{"email":{"type":"string","optional":true},"link":{"type":"string","optional":true},"name":{"type":"string","optional":true},"tier":{"type":"string","required":true}}},"optional":true}}}},"azurerm_sentinel_threat_intelligence_indicator":{"block":{"attributes":{"confidence":{"type":"number","optional":true,"default":-1},"created_by":{"type":"string","optional":true},"created_on":{"type":"string","computed":true},"defanged":{"type":"bool","computed":true},"description":{"type":"string","optional":true},"display_name":{"type":"string","required":true},"extension":{"type":"string","optional":true,"computed":true},"external_id":{"type":"string","computed":true},"external_last_updated_time_utc":{"type":"string","computed":true},"guid":{"type":"string","computed":true},"indicator_type":{"type":["list","string"],"computed":true},"language":{"type":"string","optional":true},"last_updated_time_utc":{"type":"string","computed":true},"object_marking_refs":{"type":["list","string"],"optional":true},"parsed_pattern":{"type":["list",["object",{"pattern_type_key":"string","pattern_type_values":["list",["object",{"value":"string","value_type":"string"}]]}]],"computed":true},"pattern":{"type":"string","required":true},"pattern_type":{"type":"string","required":true},"pattern_version":{"type":"string","optional":true},"revoked":{"type":"bool","optional":true,"default":false},"source":{"type":"string","required":true},"tags":{"type":["list","string"],"optional":true},"threat_types":{"type":["list","string"],"optional":true},"validate_from_utc":{"type":"string","required":true},"validate_until_utc":{"type":"string","optional":true},"workspace_id":{"type":"string","required":true}},"block_types":{"external_reference":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"hashes":{"type":["map","string"],"optional":true},"id":{"type":"string","computed":true},"source_name":{"type":"string","optional":true},"url":{"type":"string","optional":true}}},"optional":true},"granular_marking":{"nesting_mode":3,"block":{"attributes":{"language":{"type":"string","optional":true},"marking_ref":{"type":"string","optional":true},"selectors":{"type":["list","string"],"optional":true}}},"optional":true},"kill_chain_phase":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_sentinel_watchlist":{"block":{"attributes":{"default_duration":{"type":"string","optional":true},"description":{"type":"string","optional":true},"display_name":{"type":"string","required":true},"item_search_key":{"type":"string","required":true},"labels":{"type":["list","string"],"optional":true},"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true}}}},"azurerm_sentinel_watchlist_item":{"block":{"attributes":{"name":{"type":"string","optional":true,"computed":true},"properties":{"type":["map","string"],"required":true},"watchlist_id":{"type":"string","required":true}}}},"azurerm_service_fabric_cluster":{"block":{"attributes":{"add_on_features":{"type":["set","string"],"optional":true},"cluster_code_version":{"type":"string","optional":true,"computed":true},"cluster_endpoint":{"type":"string","computed":true},"location":{"type":"string","required":true},"management_endpoint":{"type":"string","required":true},"name":{"type":"string","required":true},"reliability_level":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"service_fabric_zonal_upgrade_mode":{"type":"string","optional":true},"tags":{"type":["map","string"],"optional":true},"upgrade_mode":{"type":"string","required":true},"vm_image":{"type":"string","required":true},"vmss_zonal_upgrade_mode":{"type":"string","optional":true}},"block_types":{"azure_active_directory":{"nesting_mode":3,"block":{"attributes":{"client_application_id":{"type":"string","required":true},"cluster_application_id":{"type":"string","required":true},"tenant_id":{"type":"string","required":true}}},"optional":true},"certificate":{"nesting_mode":3,"block":{"attributes":{"thumbprint":{"type":"string","required":true},"thumbprint_secondary":{"type":"string","optional":true},"x509_store_name":{"type":"string","required":true}}},"optional":true,"conflicts_with":["certificate_common_names"]},"certificate_common_names":{"nesting_mode":3,"block":{"attributes":{"x509_store_name":{"type":"string","required":true}},"block_types":{"common_names":{"nesting_mode":4,"block":{"attributes":{"certificate_common_name":{"type":"string","required":true},"certificate_issuer_thumbprint":{"type":"string","optional":true}}},"required":true}}},"optional":true,"conflicts_with":["certificate"]},"client_certificate_common_name":{"nesting_mode":3,"block":{"attributes":{"common_name":{"type":"string","required":true},"is_admin":{"type":"bool","required":true},"issuer_thumbprint":{"type":"string","optional":true}}},"optional":true},"client_certificate_thumbprint":{"nesting_mode":3,"block":{"attributes":{"is_admin":{"type":"bool","required":true},"thumbprint":{"type":"string","required":true}}},"optional":true},"diagnostics_config":{"nesting_mode":3,"block":{"attributes":{"blob_endpoint":{"type":"string","required":true},"protected_account_key_name":{"type":"string","required":true},"queue_endpoint":{"type":"string","required":true},"storage_account_name":{"type":"string","required":true},"table_endpoint":{"type":"string","required":true}}},"optional":true},"fabric_settings":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true},"node_type":{"nesting_mode":3,"block":{"attributes":{"capacities":{"type":["map","string"],"optional":true},"client_endpoint_port":{"type":"number","required":true},"durability_level":{"type":"string","optional":true,"default":"Bronze"},"http_endpoint_port":{"type":"number","required":true},"instance_count":{"type":"number","required":true},"is_primary":{"type":"bool","required":true},"is_stateless":{"type":"bool","optional":true},"multiple_availability_zones":{"type":"bool","optional":true},"name":{"type":"string","required":true},"placement_properties":{"type":["map","string"],"optional":true},"reverse_proxy_endpoint_port":{"type":"number","optional":true}},"block_types":{"application_ports":{"nesting_mode":3,"block":{"attributes":{"end_port":{"type":"number","required":true},"start_port":{"type":"number","required":true}}},"optional":true,"computed":true},"ephemeral_ports":{"nesting_mode":3,"block":{"attributes":{"end_port":{"type":"number","required":true},"start_port":{"type":"number","required":true}}},"optional":true,"computed":true}}},"required":true},"reverse_proxy_certificate":{"nesting_mode":3,"block":{"attributes":{"thumbprint":{"type":"string","required":true},"thumbprint_secondary":{"type":"string","optional":true},"x509_store_name":{"type":"string","required":true}}},"optional":true,"conflicts_with":["reverse_proxy_certificate_common_names"]},"reverse_proxy_certificate_common_names":{"nesting_mode":3,"block":{"attributes":{"x509_store_name":{"type":"string","required":true}},"block_types":{"common_names":{"nesting_mode":4,"block":{"attributes":{"certificate_common_name":{"type":"string","required":true},"certificate_issuer_thumbprint":{"type":"string","optional":true}}},"required":true}}},"optional":true,"conflicts_with":["reverse_proxy_certificate"]},"upgrade_policy":{"nesting_mode":3,"block":{"attributes":{"force_restart_enabled":{"type":"bool","optional":true},"health_check_retry_timeout":{"type":"string","optional":true,"default":"00:45:00"},"health_check_stable_duration":{"type":"string","optional":true,"default":"00:01:00"},"health_check_wait_duration":{"type":"string","optional":true,"default":"00:00:30"},"upgrade_domain_timeout":{"type":"string","optional":true,"default":"02:00:00"},"upgrade_replica_set_check_timeout":{"type":"string","optional":true,"default":"10675199.02:48:05.4775807"},"upgrade_timeout":{"type":"string","optional":true,"default":"12:00:00"}},"block_types":{"delta_health_policy":{"nesting_mode":3,"block":{"attributes":{"max_delta_unhealthy_applications_percent":{"type":"number","optional":true,"default":0},"max_delta_unhealthy_nodes_percent":{"type":"number","optional":true,"default":0},"max_upgrade_domain_delta_unhealthy_nodes_percent":{"type":"number","optional":true,"default":0}}},"optional":true},"health_policy":{"nesting_mode":3,"block":{"attributes":{"max_unhealthy_applications_percent":{"type":"number","optional":true,"default":0},"max_unhealthy_nodes_percent":{"type":"number","optional":true,"default":0}}},"optional":true}}},"optional":true}}}},"azurerm_service_fabric_managed_cluster":{"block":{"attributes":{"backup_service_enabled":{"type":"bool","optional":true},"client_connection_port":{"type":"number","required":true},"dns_name":{"type":"string","optional":true,"computed":true},"dns_service_enabled":{"type":"bool","optional":true},"http_gateway_port":{"type":"number","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"password":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"sku":{"type":"string","optional":true,"default":"Basic"},"tags":{"type":["map","string"],"optional":true},"upgrade_wave":{"type":"string","optional":true,"default":"Wave0"},"username":{"type":"string","optional":true}},"block_types":{"authentication":{"nesting_mode":3,"block":{"block_types":{"active_directory":{"nesting_mode":3,"block":{"attributes":{"client_application_id":{"type":"string","required":true},"cluster_application_id":{"type":"string","required":true},"tenant_id":{"type":"string","required":true}}},"optional":true},"certificate":{"nesting_mode":3,"block":{"attributes":{"common_name":{"type":"string","optional":true},"thumbprint":{"type":"string","required":true},"type":{"type":"string","required":true}}},"optional":true}}},"optional":true},"custom_fabric_setting":{"nesting_mode":3,"block":{"attributes":{"parameter":{"type":"string","required":true},"section":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"lb_rule":{"nesting_mode":3,"block":{"attributes":{"backend_port":{"type":"number","required":true},"frontend_port":{"type":"number","required":true},"probe_protocol":{"type":"string","required":true},"probe_request_path":{"type":"string","optional":true},"protocol":{"type":"string","required":true}}},"required":true},"node_type":{"nesting_mode":3,"block":{"attributes":{"application_port_range":{"type":"string","required":true},"capacities":{"type":["map","string"],"optional":true},"data_disk_size_gb":{"type":"number","required":true},"data_disk_type":{"type":"string","optional":true,"default":"Standard_LRS"},"ephemeral_port_range":{"type":"string","required":true},"id":{"type":"string","computed":true},"multiple_placement_groups_enabled":{"type":"bool","optional":true},"name":{"type":"string","required":true},"placement_properties":{"type":["map","string"],"optional":true},"primary":{"type":"bool","optional":true},"stateless":{"type":"bool","optional":true},"vm_image_offer":{"type":"string","required":true},"vm_image_publisher":{"type":"string","required":true},"vm_image_sku":{"type":"string","required":true},"vm_image_version":{"type":"string","required":true},"vm_instance_count":{"type":"number","required":true},"vm_size":{"type":"string","required":true}},"block_types":{"vm_secrets":{"nesting_mode":3,"block":{"attributes":{"vault_id":{"type":"string","required":true}},"block_types":{"certificates":{"nesting_mode":3,"block":{"attributes":{"store":{"type":"string","required":true},"url":{"type":"string","required":true}}},"required":true}}},"optional":true}}},"optional":true}}}},"azurerm_service_plan":{"block":{"attributes":{"app_service_environment_id":{"type":"string","optional":true},"kind":{"type":"string","computed":true},"location":{"type":"string","required":true},"maximum_elastic_worker_count":{"type":"number","optional":true,"computed":true},"name":{"type":"string","required":true},"os_type":{"type":"string","required":true},"per_site_scaling_enabled":{"type":"bool","optional":true,"default":false},"reserved":{"type":"bool","computed":true},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"worker_count":{"type":"number","optional":true,"computed":true},"zone_balancing_enabled":{"type":"bool","optional":true}}}},"azurerm_servicebus_namespace":{"block":{"attributes":{"capacity":{"type":"number","optional":true,"default":0},"default_primary_connection_string":{"type":"string","computed":true},"default_primary_key":{"type":"string","computed":true},"default_secondary_connection_string":{"type":"string","computed":true},"default_secondary_key":{"type":"string","computed":true},"endpoint":{"type":"string","computed":true},"local_auth_enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"minimum_tls_version":{"type":"string","optional":true,"default":"1.2"},"name":{"type":"string","required":true},"premium_messaging_partitions":{"type":"number","optional":true,"default":0},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"sku":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"customer_managed_key":{"nesting_mode":3,"block":{"attributes":{"identity_id":{"type":"string","required":true},"infrastructure_encryption_enabled":{"type":"bool","optional":true},"key_vault_key_id":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"network_rule_set":{"nesting_mode":3,"block":{"attributes":{"default_action":{"type":"string","optional":true,"default":"Allow"},"ip_rules":{"type":["set","string"],"optional":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"trusted_services_allowed":{"type":"bool","optional":true,"default":false}},"block_types":{"network_rules":{"nesting_mode":4,"block":{"attributes":{"ignore_missing_vnet_service_endpoint":{"type":"bool","optional":true,"default":false},"subnet_id":{"type":"string","required":true}}},"optional":true}}},"optional":true,"computed":true}}}},"azurerm_servicebus_namespace_authorization_rule":{"block":{"attributes":{"listen":{"type":"bool","optional":true,"default":false},"manage":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"namespace_id":{"type":"string","required":true},"primary_connection_string":{"type":"string","computed":true},"primary_connection_string_alias":{"type":"string","computed":true},"primary_key":{"type":"string","computed":true},"secondary_connection_string":{"type":"string","computed":true},"secondary_connection_string_alias":{"type":"string","computed":true},"secondary_key":{"type":"string","computed":true},"send":{"type":"bool","optional":true,"default":false}}}},"azurerm_servicebus_namespace_disaster_recovery_config":{"block":{"attributes":{"alias_authorization_rule_id":{"type":"string","optional":true},"default_primary_key":{"type":"string","computed":true},"default_secondary_key":{"type":"string","computed":true},"name":{"type":"string","required":true},"partner_namespace_id":{"type":"string","required":true},"primary_connection_string_alias":{"type":"string","computed":true},"primary_namespace_id":{"type":"string","required":true},"secondary_connection_string_alias":{"type":"string","computed":true}}}},"azurerm_servicebus_queue":{"block":{"attributes":{"auto_delete_on_idle":{"type":"string","optional":true,"computed":true},"batched_operations_enabled":{"type":"bool","optional":true,"default":true},"dead_lettering_on_message_expiration":{"type":"bool","optional":true,"default":false},"default_message_ttl":{"type":"string","optional":true,"computed":true},"duplicate_detection_history_time_window":{"type":"string","optional":true,"default":"PT10M"},"express_enabled":{"type":"bool","optional":true,"default":false},"forward_dead_lettered_messages_to":{"type":"string","optional":true},"forward_to":{"type":"string","optional":true},"lock_duration":{"type":"string","optional":true,"default":"PT1M"},"max_delivery_count":{"type":"number","optional":true,"default":10},"max_message_size_in_kilobytes":{"type":"number","optional":true,"computed":true},"max_size_in_megabytes":{"type":"number","optional":true,"computed":true},"name":{"type":"string","required":true},"namespace_id":{"type":"string","required":true},"partitioning_enabled":{"type":"bool","optional":true,"default":false},"requires_duplicate_detection":{"type":"bool","optional":true,"default":false},"requires_session":{"type":"bool","optional":true,"default":false},"status":{"type":"string","optional":true,"default":"Active"}}}},"azurerm_servicebus_queue_authorization_rule":{"block":{"attributes":{"listen":{"type":"bool","optional":true,"default":false},"manage":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"primary_connection_string":{"type":"string","computed":true},"primary_connection_string_alias":{"type":"string","computed":true},"primary_key":{"type":"string","computed":true},"queue_id":{"type":"string","required":true},"secondary_connection_string":{"type":"string","computed":true},"secondary_connection_string_alias":{"type":"string","computed":true},"secondary_key":{"type":"string","computed":true},"send":{"type":"bool","optional":true,"default":false}}}},"azurerm_servicebus_subscription":{"block":{"attributes":{"auto_delete_on_idle":{"type":"string","optional":true,"default":"P10675199DT2H48M5.4775807S"},"batched_operations_enabled":{"type":"bool","optional":true},"client_scoped_subscription_enabled":{"type":"bool","optional":true,"default":false},"dead_lettering_on_filter_evaluation_error":{"type":"bool","optional":true,"default":true},"dead_lettering_on_message_expiration":{"type":"bool","optional":true},"default_message_ttl":{"type":"string","optional":true,"default":"P10675199DT2H48M5.4775807S"},"forward_dead_lettered_messages_to":{"type":"string","optional":true},"forward_to":{"type":"string","optional":true},"lock_duration":{"type":"string","optional":true,"default":"PT1M"},"max_delivery_count":{"type":"number","required":true},"name":{"type":"string","required":true},"requires_session":{"type":"bool","optional":true},"status":{"type":"string","optional":true,"default":"Active"},"topic_id":{"type":"string","required":true}},"block_types":{"client_scoped_subscription":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","optional":true},"is_client_scoped_subscription_durable":{"type":"bool","computed":true},"is_client_scoped_subscription_shareable":{"type":"bool","optional":true,"default":true}}},"optional":true}}}},"azurerm_servicebus_subscription_rule":{"block":{"attributes":{"action":{"type":"string","optional":true},"filter_type":{"type":"string","required":true},"name":{"type":"string","required":true},"sql_filter":{"type":"string","optional":true},"sql_filter_compatibility_level":{"type":"number","computed":true},"subscription_id":{"type":"string","required":true}},"block_types":{"correlation_filter":{"nesting_mode":3,"block":{"attributes":{"content_type":{"type":"string","optional":true,"at_least_one_of":["correlation_filter.0.correlation_id","correlation_filter.0.message_id","correlation_filter.0.to","correlation_filter.0.reply_to","correlation_filter.0.label","correlation_filter.0.session_id","correlation_filter.0.reply_to_session_id","correlation_filter.0.content_type","correlation_filter.0.properties"]},"correlation_id":{"type":"string","optional":true,"at_least_one_of":["correlation_filter.0.correlation_id","correlation_filter.0.message_id","correlation_filter.0.to","correlation_filter.0.reply_to","correlation_filter.0.label","correlation_filter.0.session_id","correlation_filter.0.reply_to_session_id","correlation_filter.0.content_type","correlation_filter.0.properties"]},"label":{"type":"string","optional":true,"at_least_one_of":["correlation_filter.0.correlation_id","correlation_filter.0.message_id","correlation_filter.0.to","correlation_filter.0.reply_to","correlation_filter.0.label","correlation_filter.0.session_id","correlation_filter.0.reply_to_session_id","correlation_filter.0.content_type","correlation_filter.0.properties"]},"message_id":{"type":"string","optional":true,"at_least_one_of":["correlation_filter.0.correlation_id","correlation_filter.0.message_id","correlation_filter.0.to","correlation_filter.0.reply_to","correlation_filter.0.label","correlation_filter.0.session_id","correlation_filter.0.reply_to_session_id","correlation_filter.0.content_type","correlation_filter.0.properties"]},"properties":{"type":["map","string"],"optional":true,"at_least_one_of":["correlation_filter.0.correlation_id","correlation_filter.0.message_id","correlation_filter.0.to","correlation_filter.0.reply_to","correlation_filter.0.label","correlation_filter.0.session_id","correlation_filter.0.reply_to_session_id","correlation_filter.0.content_type","correlation_filter.0.properties"]},"reply_to":{"type":"string","optional":true,"at_least_one_of":["correlation_filter.0.correlation_id","correlation_filter.0.message_id","correlation_filter.0.to","correlation_filter.0.reply_to","correlation_filter.0.label","correlation_filter.0.session_id","correlation_filter.0.reply_to_session_id","correlation_filter.0.content_type","correlation_filter.0.properties"]},"reply_to_session_id":{"type":"string","optional":true,"at_least_one_of":["correlation_filter.0.correlation_id","correlation_filter.0.message_id","correlation_filter.0.to","correlation_filter.0.reply_to","correlation_filter.0.label","correlation_filter.0.session_id","correlation_filter.0.reply_to_session_id","correlation_filter.0.content_type","correlation_filter.0.properties"]},"session_id":{"type":"string","optional":true,"at_least_one_of":["correlation_filter.0.correlation_id","correlation_filter.0.message_id","correlation_filter.0.to","correlation_filter.0.reply_to","correlation_filter.0.label","correlation_filter.0.session_id","correlation_filter.0.reply_to_session_id","correlation_filter.0.content_type","correlation_filter.0.properties"]},"to":{"type":"string","optional":true,"at_least_one_of":["correlation_filter.0.correlation_id","correlation_filter.0.message_id","correlation_filter.0.to","correlation_filter.0.reply_to","correlation_filter.0.label","correlation_filter.0.session_id","correlation_filter.0.reply_to_session_id","correlation_filter.0.content_type","correlation_filter.0.properties"]}}},"optional":true,"conflicts_with":["sql_filter"]}}}},"azurerm_servicebus_topic":{"block":{"attributes":{"auto_delete_on_idle":{"type":"string","optional":true,"default":"P10675199DT2H48M5.4775807S"},"batched_operations_enabled":{"type":"bool","optional":true},"default_message_ttl":{"type":"string","optional":true,"default":"P10675199DT2H48M5.4775807S"},"duplicate_detection_history_time_window":{"type":"string","optional":true,"default":"PT10M"},"express_enabled":{"type":"bool","optional":true},"max_message_size_in_kilobytes":{"type":"number","optional":true,"computed":true},"max_size_in_megabytes":{"type":"number","optional":true,"computed":true},"name":{"type":"string","required":true},"namespace_id":{"type":"string","required":true},"partitioning_enabled":{"type":"bool","optional":true},"requires_duplicate_detection":{"type":"bool","optional":true},"status":{"type":"string","optional":true,"default":"Active"},"support_ordering":{"type":"bool","optional":true}}}},"azurerm_servicebus_topic_authorization_rule":{"block":{"attributes":{"listen":{"type":"bool","optional":true,"default":false},"manage":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"primary_connection_string":{"type":"string","computed":true},"primary_connection_string_alias":{"type":"string","computed":true},"primary_key":{"type":"string","computed":true},"secondary_connection_string":{"type":"string","computed":true},"secondary_connection_string_alias":{"type":"string","computed":true},"secondary_key":{"type":"string","computed":true},"send":{"type":"bool","optional":true,"default":false},"topic_id":{"type":"string","required":true}}}},"azurerm_shared_image":{"block":{"attributes":{"accelerated_network_support_enabled":{"type":"bool","optional":true},"architecture":{"type":"string","optional":true,"default":"x64"},"confidential_vm_enabled":{"type":"bool","optional":true,"conflicts_with":["trusted_launch_supported","trusted_launch_enabled","confidential_vm_supported"]},"confidential_vm_supported":{"type":"bool","optional":true,"conflicts_with":["trusted_launch_supported","trusted_launch_enabled","confidential_vm_enabled"]},"description":{"type":"string","optional":true},"disk_controller_type_nvme_enabled":{"type":"bool","optional":true},"disk_types_not_allowed":{"type":["set","string"],"optional":true},"end_of_life_date":{"type":"string","optional":true},"eula":{"type":"string","optional":true},"gallery_name":{"type":"string","required":true},"hibernation_enabled":{"type":"bool","optional":true},"hyper_v_generation":{"type":"string","optional":true,"default":"V1"},"location":{"type":"string","required":true},"max_recommended_memory_in_gb":{"type":"number","optional":true},"max_recommended_vcpu_count":{"type":"number","optional":true},"min_recommended_memory_in_gb":{"type":"number","optional":true},"min_recommended_vcpu_count":{"type":"number","optional":true},"name":{"type":"string","required":true},"os_type":{"type":"string","required":true},"privacy_statement_uri":{"type":"string","optional":true},"release_note_uri":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"specialized":{"type":"bool","optional":true},"tags":{"type":["map","string"],"optional":true},"trusted_launch_enabled":{"type":"bool","optional":true,"conflicts_with":["trusted_launch_supported","confidential_vm_supported","confidential_vm_enabled"]},"trusted_launch_supported":{"type":"bool","optional":true,"conflicts_with":["trusted_launch_enabled","confidential_vm_supported","confidential_vm_enabled"]}},"block_types":{"identifier":{"nesting_mode":3,"block":{"attributes":{"offer":{"type":"string","required":true},"publisher":{"type":"string","required":true},"sku":{"type":"string","required":true}}},"required":true},"purchase_plan":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"product":{"type":"string","optional":true},"publisher":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_shared_image_gallery":{"block":{"attributes":{"description":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"unique_name":{"type":"string","computed":true}},"block_types":{"sharing":{"nesting_mode":3,"block":{"attributes":{"permission":{"type":"string","required":true}},"block_types":{"community_gallery":{"nesting_mode":3,"block":{"attributes":{"eula":{"type":"string","required":true},"name":{"type":"string","computed":true},"prefix":{"type":"string","required":true},"publisher_email":{"type":"string","required":true},"publisher_uri":{"type":"string","required":true}}},"optional":true}}},"optional":true}}}},"azurerm_shared_image_version":{"block":{"attributes":{"blob_uri":{"type":"string","optional":true,"exactly_one_of":["blob_uri","os_disk_snapshot_id","managed_image_id"],"required_with":["storage_account_id"]},"deletion_of_replicated_locations_enabled":{"type":"bool","optional":true,"default":false},"end_of_life_date":{"type":"string","optional":true},"exclude_from_latest":{"type":"bool","optional":true,"default":false},"gallery_name":{"type":"string","required":true},"image_name":{"type":"string","required":true},"location":{"type":"string","required":true},"managed_image_id":{"type":"string","optional":true,"exactly_one_of":["blob_uri","os_disk_snapshot_id","managed_image_id"]},"name":{"type":"string","required":true},"os_disk_snapshot_id":{"type":"string","optional":true,"exactly_one_of":["blob_uri","os_disk_snapshot_id","managed_image_id"]},"replication_mode":{"type":"string","optional":true,"default":"Full"},"resource_group_name":{"type":"string","required":true},"storage_account_id":{"type":"string","optional":true,"required_with":["blob_uri"]},"tags":{"type":["map","string"],"optional":true}},"block_types":{"target_region":{"nesting_mode":3,"block":{"attributes":{"disk_encryption_set_id":{"type":"string","optional":true},"exclude_from_latest_enabled":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"regional_replica_count":{"type":"number","required":true},"storage_account_type":{"type":"string","optional":true,"default":"Standard_LRS"}}},"required":true}}}},"azurerm_signalr_service":{"block":{"attributes":{"aad_auth_enabled":{"type":"bool","optional":true,"default":true},"connectivity_logs_enabled":{"type":"bool","optional":true,"default":false},"hostname":{"type":"string","computed":true},"http_request_logs_enabled":{"type":"bool","optional":true,"default":false},"ip_address":{"type":"string","computed":true},"live_trace_enabled":{"type":"bool","optional":true,"default":false},"local_auth_enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"messaging_logs_enabled":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"primary_access_key":{"type":"string","computed":true},"primary_connection_string":{"type":"string","computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"public_port":{"type":"number","computed":true},"resource_group_name":{"type":"string","required":true},"secondary_access_key":{"type":"string","computed":true},"secondary_connection_string":{"type":"string","computed":true},"server_port":{"type":"number","computed":true},"serverless_connection_timeout_in_seconds":{"type":"number","optional":true,"default":30},"service_mode":{"type":"string","optional":true,"default":"Default"},"tags":{"type":["map","string"],"optional":true},"tls_client_cert_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"cors":{"nesting_mode":3,"block":{"attributes":{"allowed_origins":{"type":["set","string"],"required":true}}},"optional":true,"computed":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"live_trace":{"nesting_mode":3,"block":{"attributes":{"connectivity_logs_enabled":{"type":"bool","optional":true,"default":true},"enabled":{"type":"bool","optional":true,"default":true},"http_request_logs_enabled":{"type":"bool","optional":true,"default":true},"messaging_logs_enabled":{"type":"bool","optional":true,"default":true}}},"optional":true},"sku":{"nesting_mode":3,"block":{"attributes":{"capacity":{"type":"number","required":true},"name":{"type":"string","required":true}}},"required":true},"upstream_endpoint":{"nesting_mode":4,"block":{"attributes":{"category_pattern":{"type":["list","string"],"required":true},"event_pattern":{"type":["list","string"],"required":true},"hub_pattern":{"type":["list","string"],"required":true},"url_template":{"type":"string","required":true},"user_assigned_identity_id":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_signalr_service_custom_certificate":{"block":{"attributes":{"certificate_version":{"type":"string","computed":true},"custom_certificate_id":{"type":"string","required":true},"name":{"type":"string","required":true},"signalr_service_id":{"type":"string","required":true}}}},"azurerm_signalr_service_custom_domain":{"block":{"attributes":{"domain_name":{"type":"string","required":true},"name":{"type":"string","required":true},"signalr_custom_certificate_id":{"type":"string","required":true},"signalr_service_id":{"type":"string","required":true}}}},"azurerm_signalr_service_network_acl":{"block":{"attributes":{"default_action":{"type":"string","required":true},"signalr_service_id":{"type":"string","required":true}},"block_types":{"private_endpoint":{"nesting_mode":4,"block":{"attributes":{"allowed_request_types":{"type":["set","string"],"optional":true},"denied_request_types":{"type":["set","string"],"optional":true},"id":{"type":"string","required":true}}},"optional":true},"public_network":{"nesting_mode":3,"block":{"attributes":{"allowed_request_types":{"type":["set","string"],"optional":true,"conflicts_with":["public_network.0.denied_request_types"]},"denied_request_types":{"type":["set","string"],"optional":true,"conflicts_with":["public_network.0.allowed_request_types"]}}},"required":true}}}},"azurerm_signalr_shared_private_link_resource":{"block":{"attributes":{"name":{"type":"string","required":true},"request_message":{"type":"string","optional":true},"signalr_service_id":{"type":"string","required":true},"status":{"type":"string","computed":true},"sub_resource_name":{"type":"string","required":true},"target_resource_id":{"type":"string","required":true}}}},"azurerm_site_recovery_fabric":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"recovery_vault_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_site_recovery_hyperv_network_mapping":{"block":{"attributes":{"name":{"type":"string","required":true},"recovery_vault_id":{"type":"string","required":true},"source_network_name":{"type":"string","required":true},"source_system_center_virtual_machine_manager_name":{"type":"string","required":true},"target_network_id":{"type":"string","required":true}}}},"azurerm_site_recovery_hyperv_replication_policy":{"block":{"attributes":{"application_consistent_snapshot_frequency_in_hours":{"type":"number","required":true},"name":{"type":"string","required":true},"recovery_point_retention_in_hours":{"type":"number","required":true},"recovery_vault_id":{"type":"string","required":true},"replication_interval_in_seconds":{"type":"number","required":true}}}},"azurerm_site_recovery_hyperv_replication_policy_association":{"block":{"attributes":{"hyperv_site_id":{"type":"string","required":true},"name":{"type":"string","required":true},"policy_id":{"type":"string","required":true}}}},"azurerm_site_recovery_network_mapping":{"block":{"attributes":{"name":{"type":"string","required":true},"recovery_vault_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"source_network_id":{"type":"string","required":true},"source_recovery_fabric_name":{"type":"string","required":true},"target_network_id":{"type":"string","required":true},"target_recovery_fabric_name":{"type":"string","required":true}}}},"azurerm_site_recovery_protection_container":{"block":{"attributes":{"name":{"type":"string","required":true},"recovery_fabric_name":{"type":"string","required":true},"recovery_vault_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_site_recovery_protection_container_mapping":{"block":{"attributes":{"name":{"type":"string","required":true},"recovery_fabric_name":{"type":"string","required":true},"recovery_replication_policy_id":{"type":"string","required":true},"recovery_source_protection_container_name":{"type":"string","required":true},"recovery_target_protection_container_id":{"type":"string","required":true},"recovery_vault_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}},"block_types":{"automatic_update":{"nesting_mode":3,"block":{"attributes":{"authentication_type":{"type":"string","optional":true,"default":"SystemAssignedIdentity"},"automation_account_id":{"type":"string","optional":true},"enabled":{"type":"bool","optional":true,"default":false}}},"optional":true,"computed":true}}}},"azurerm_site_recovery_replicated_vm":{"block":{"attributes":{"managed_disk":{"type":["set",["object",{"disk_id":"string","staging_storage_account_id":"string","target_disk_encryption":["list",["object",{"disk_encryption_key":["list",["object",{"secret_url":"string","vault_id":"string"}]],"key_encryption_key":["list",["object",{"key_url":"string","vault_id":"string"}]]}]],"target_disk_encryption_set_id":"string","target_disk_type":"string","target_replica_disk_type":"string","target_resource_group_id":"string"}]],"optional":true,"computed":true},"multi_vm_group_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"network_interface":{"type":["set",["object",{"failover_test_public_ip_address_id":"string","failover_test_static_ip":"string","failover_test_subnet_name":"string","recovery_public_ip_address_id":"string","source_network_interface_id":"string","target_static_ip":"string","target_subnet_name":"string"}]],"optional":true,"computed":true},"recovery_replication_policy_id":{"type":"string","required":true},"recovery_vault_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"source_recovery_fabric_name":{"type":"string","required":true},"source_recovery_protection_container_name":{"type":"string","required":true},"source_vm_id":{"type":"string","required":true},"target_availability_set_id":{"type":"string","optional":true,"conflicts_with":["target_zone"]},"target_boot_diagnostic_storage_account_id":{"type":"string","optional":true},"target_capacity_reservation_group_id":{"type":"string","optional":true},"target_edge_zone":{"type":"string","optional":true},"target_network_id":{"type":"string","optional":true,"computed":true},"target_proximity_placement_group_id":{"type":"string","optional":true},"target_recovery_fabric_id":{"type":"string","required":true},"target_recovery_protection_container_id":{"type":"string","required":true},"target_resource_group_id":{"type":"string","required":true},"target_virtual_machine_scale_set_id":{"type":"string","optional":true},"target_virtual_machine_size":{"type":"string","optional":true,"computed":true},"target_zone":{"type":"string","optional":true},"test_network_id":{"type":"string","optional":true,"computed":true},"unmanaged_disk":{"type":["set",["object",{"disk_uri":"string","staging_storage_account_id":"string","target_storage_account_id":"string"}]],"optional":true,"computed":true}}}},"azurerm_site_recovery_replication_policy":{"block":{"attributes":{"application_consistent_snapshot_frequency_in_minutes":{"type":"number","required":true},"name":{"type":"string","required":true},"recovery_point_retention_in_minutes":{"type":"number","required":true},"recovery_vault_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_site_recovery_replication_recovery_plan":{"block":{"attributes":{"name":{"type":"string","required":true},"recovery_vault_id":{"type":"string","required":true},"source_recovery_fabric_id":{"type":"string","required":true},"target_recovery_fabric_id":{"type":"string","required":true}},"block_types":{"azure_to_azure_settings":{"nesting_mode":3,"block":{"attributes":{"primary_edge_zone":{"type":"string","optional":true,"required_with":["azure_to_azure_settings.0.recovery_edge_zone"]},"primary_zone":{"type":"string","optional":true,"required_with":["azure_to_azure_settings.0.recovery_zone"]},"recovery_edge_zone":{"type":"string","optional":true,"required_with":["azure_to_azure_settings.0.primary_edge_zone"]},"recovery_zone":{"type":"string","optional":true,"required_with":["azure_to_azure_settings.0.primary_zone"]}}},"optional":true},"boot_recovery_group":{"nesting_mode":3,"block":{"attributes":{"replicated_protected_items":{"type":["list","string"],"optional":true}},"block_types":{"post_action":{"nesting_mode":3,"block":{"attributes":{"fabric_location":{"type":"string","optional":true},"fail_over_directions":{"type":["set","string"],"required":true},"fail_over_types":{"type":["set","string"],"required":true},"manual_action_instruction":{"type":"string","optional":true},"name":{"type":"string","required":true},"runbook_id":{"type":"string","optional":true},"script_path":{"type":"string","optional":true},"type":{"type":"string","required":true}}},"optional":true},"pre_action":{"nesting_mode":3,"block":{"attributes":{"fabric_location":{"type":"string","optional":true},"fail_over_directions":{"type":["set","string"],"required":true},"fail_over_types":{"type":["set","string"],"required":true},"manual_action_instruction":{"type":"string","optional":true},"name":{"type":"string","required":true},"runbook_id":{"type":"string","optional":true},"script_path":{"type":"string","optional":true},"type":{"type":"string","required":true}}},"optional":true}}},"required":true},"failover_recovery_group":{"nesting_mode":3,"block":{"block_types":{"post_action":{"nesting_mode":3,"block":{"attributes":{"fabric_location":{"type":"string","optional":true},"fail_over_directions":{"type":["set","string"],"required":true},"fail_over_types":{"type":["set","string"],"required":true},"manual_action_instruction":{"type":"string","optional":true},"name":{"type":"string","required":true},"runbook_id":{"type":"string","optional":true},"script_path":{"type":"string","optional":true},"type":{"type":"string","required":true}}},"optional":true},"pre_action":{"nesting_mode":3,"block":{"attributes":{"fabric_location":{"type":"string","optional":true},"fail_over_directions":{"type":["set","string"],"required":true},"fail_over_types":{"type":["set","string"],"required":true},"manual_action_instruction":{"type":"string","optional":true},"name":{"type":"string","required":true},"runbook_id":{"type":"string","optional":true},"script_path":{"type":"string","optional":true},"type":{"type":"string","required":true}}},"optional":true}}},"required":true},"shutdown_recovery_group":{"nesting_mode":3,"block":{"block_types":{"post_action":{"nesting_mode":3,"block":{"attributes":{"fabric_location":{"type":"string","optional":true},"fail_over_directions":{"type":["set","string"],"required":true},"fail_over_types":{"type":["set","string"],"required":true},"manual_action_instruction":{"type":"string","optional":true},"name":{"type":"string","required":true},"runbook_id":{"type":"string","optional":true},"script_path":{"type":"string","optional":true},"type":{"type":"string","required":true}}},"optional":true},"pre_action":{"nesting_mode":3,"block":{"attributes":{"fabric_location":{"type":"string","optional":true},"fail_over_directions":{"type":["set","string"],"required":true},"fail_over_types":{"type":["set","string"],"required":true},"manual_action_instruction":{"type":"string","optional":true},"name":{"type":"string","required":true},"runbook_id":{"type":"string","optional":true},"script_path":{"type":"string","optional":true},"type":{"type":"string","required":true}}},"optional":true}}},"required":true}}}},"azurerm_site_recovery_services_vault_hyperv_site":{"block":{"attributes":{"name":{"type":"string","required":true},"recovery_vault_id":{"type":"string","required":true}}}},"azurerm_site_recovery_vmware_replicated_vm":{"block":{"attributes":{"appliance_name":{"type":"string","required":true},"default_log_storage_account_id":{"type":"string","optional":true,"exactly_one_of":["managed_disk","default_log_storage_account_id"]},"default_recovery_disk_type":{"type":"string","optional":true,"exactly_one_of":["managed_disk","default_recovery_disk_type"]},"default_target_disk_encryption_set_id":{"type":"string","optional":true},"license_type":{"type":"string","optional":true,"default":"NotSpecified"},"multi_vm_group_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"physical_server_credential_name":{"type":"string","required":true},"recovery_replication_policy_id":{"type":"string","required":true},"recovery_vault_id":{"type":"string","required":true},"source_vm_name":{"type":"string","required":true},"target_availability_set_id":{"type":"string","optional":true,"conflicts_with":["target_zone"]},"target_boot_diagnostics_storage_account_id":{"type":"string","optional":true},"target_network_id":{"type":"string","optional":true,"required_with":["network_interface"]},"target_proximity_placement_group_id":{"type":"string","optional":true},"target_resource_group_id":{"type":"string","required":true},"target_vm_name":{"type":"string","required":true},"target_vm_size":{"type":"string","optional":true},"target_zone":{"type":"string","optional":true,"conflicts_with":["target_availability_set_id"]},"test_network_id":{"type":"string","optional":true}},"block_types":{"managed_disk":{"nesting_mode":3,"block":{"attributes":{"disk_id":{"type":"string","required":true},"log_storage_account_id":{"type":"string","optional":true},"target_disk_encryption_set_id":{"type":"string","optional":true},"target_disk_type":{"type":"string","required":true}}},"optional":true},"network_interface":{"nesting_mode":3,"block":{"attributes":{"is_primary":{"type":"bool","required":true},"source_mac_address":{"type":"string","required":true},"target_static_ip":{"type":"string","optional":true},"target_subnet_name":{"type":"string","optional":true},"test_subnet_name":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_site_recovery_vmware_replication_policy":{"block":{"attributes":{"application_consistent_snapshot_frequency_in_minutes":{"type":"number","required":true},"name":{"type":"string","required":true},"recovery_point_retention_in_minutes":{"type":"number","required":true},"recovery_vault_id":{"type":"string","required":true}}}},"azurerm_site_recovery_vmware_replication_policy_association":{"block":{"attributes":{"name":{"type":"string","required":true},"policy_id":{"type":"string","required":true},"recovery_vault_id":{"type":"string","required":true}}}},"azurerm_snapshot":{"block":{"attributes":{"create_option":{"type":"string","required":true},"disk_access_id":{"type":"string","optional":true},"disk_size_gb":{"type":"number","optional":true,"computed":true},"incremental_enabled":{"type":"bool","optional":true,"default":false},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"network_access_policy":{"type":"string","optional":true,"default":"AllowAll"},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"source_resource_id":{"type":"string","optional":true},"source_uri":{"type":"string","optional":true},"storage_account_id":{"type":"string","optional":true},"tags":{"type":["map","string"],"optional":true},"trusted_launch_enabled":{"type":"bool","computed":true}},"block_types":{"encryption_settings":{"nesting_mode":3,"block":{"block_types":{"disk_encryption_key":{"nesting_mode":3,"block":{"attributes":{"secret_url":{"type":"string","required":true},"source_vault_id":{"type":"string","required":true}}},"required":true},"key_encryption_key":{"nesting_mode":3,"block":{"attributes":{"key_url":{"type":"string","required":true},"source_vault_id":{"type":"string","required":true}}},"optional":true}}},"optional":true}}}},"azurerm_source_control_token":{"block":{"attributes":{"token":{"type":"string","required":true},"token_secret":{"type":"string","optional":true},"type":{"type":"string","required":true}}}},"azurerm_spatial_anchors_account":{"block":{"attributes":{"account_domain":{"type":"string","computed":true},"account_id":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_spring_cloud_accelerator":{"block":{"attributes":{"name":{"type":"string","required":true},"spring_cloud_service_id":{"type":"string","required":true}}}},"azurerm_spring_cloud_active_deployment":{"block":{"attributes":{"deployment_name":{"type":"string","required":true},"spring_cloud_app_id":{"type":"string","required":true}}}},"azurerm_spring_cloud_api_portal":{"block":{"attributes":{"api_try_out_enabled":{"type":"bool","optional":true},"gateway_ids":{"type":["set","string"],"optional":true},"https_only_enabled":{"type":"bool","optional":true},"instance_count":{"type":"number","optional":true,"default":1},"name":{"type":"string","required":true},"public_network_access_enabled":{"type":"bool","optional":true},"spring_cloud_service_id":{"type":"string","required":true},"url":{"type":"string","computed":true}},"block_types":{"sso":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","optional":true},"client_secret":{"type":"string","optional":true},"issuer_uri":{"type":"string","optional":true},"scope":{"type":["set","string"],"optional":true}}},"optional":true}}}},"azurerm_spring_cloud_api_portal_custom_domain":{"block":{"attributes":{"name":{"type":"string","required":true},"spring_cloud_api_portal_id":{"type":"string","required":true},"thumbprint":{"type":"string","optional":true}}}},"azurerm_spring_cloud_app":{"block":{"attributes":{"addon_json":{"type":"string","optional":true,"computed":true},"fqdn":{"type":"string","computed":true},"https_only":{"type":"bool","optional":true,"default":false},"is_public":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"public_endpoint_enabled":{"type":"bool","optional":true},"resource_group_name":{"type":"string","required":true},"service_name":{"type":"string","required":true},"tls_enabled":{"type":"bool","optional":true,"default":false},"url":{"type":"string","computed":true}},"block_types":{"custom_persistent_disk":{"nesting_mode":3,"block":{"attributes":{"mount_options":{"type":["set","string"],"optional":true},"mount_path":{"type":"string","required":true},"read_only_enabled":{"type":"bool","optional":true,"default":false},"share_name":{"type":"string","required":true},"storage_name":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"ingress_settings":{"nesting_mode":3,"block":{"attributes":{"backend_protocol":{"type":"string","optional":true,"default":"Default"},"read_timeout_in_seconds":{"type":"number","optional":true,"default":300},"send_timeout_in_seconds":{"type":"number","optional":true,"default":60},"session_affinity":{"type":"string","optional":true,"default":"None"},"session_cookie_max_age":{"type":"number","optional":true}}},"optional":true,"computed":true},"persistent_disk":{"nesting_mode":3,"block":{"attributes":{"mount_path":{"type":"string","optional":true,"default":"/persistent"},"size_in_gb":{"type":"number","required":true}}},"optional":true,"computed":true}}}},"azurerm_spring_cloud_app_cosmosdb_association":{"block":{"attributes":{"api_type":{"type":"string","required":true},"cosmosdb_access_key":{"type":"string","required":true},"cosmosdb_account_id":{"type":"string","required":true},"cosmosdb_cassandra_keyspace_name":{"type":"string","optional":true,"conflicts_with":["cosmosdb_gremlin_database_name","cosmosdb_gremlin_graph_name","cosmosdb_mongo_database_name","cosmosdb_sql_database_name"]},"cosmosdb_gremlin_database_name":{"type":"string","optional":true,"conflicts_with":["cosmosdb_cassandra_keyspace_name","cosmosdb_mongo_database_name","cosmosdb_sql_database_name"],"required_with":["cosmosdb_gremlin_graph_name"]},"cosmosdb_gremlin_graph_name":{"type":"string","optional":true,"conflicts_with":["cosmosdb_cassandra_keyspace_name","cosmosdb_mongo_database_name","cosmosdb_sql_database_name"],"required_with":["cosmosdb_gremlin_database_name"]},"cosmosdb_mongo_database_name":{"type":"string","optional":true,"conflicts_with":["cosmosdb_cassandra_keyspace_name","cosmosdb_gremlin_database_name","cosmosdb_gremlin_graph_name","cosmosdb_sql_database_name"]},"cosmosdb_sql_database_name":{"type":"string","optional":true,"conflicts_with":["cosmosdb_cassandra_keyspace_name","cosmosdb_gremlin_database_name","cosmosdb_gremlin_graph_name","cosmosdb_mongo_database_name"]},"name":{"type":"string","required":true},"spring_cloud_app_id":{"type":"string","required":true}}}},"azurerm_spring_cloud_app_dynamics_application_performance_monitoring":{"block":{"attributes":{"agent_account_access_key":{"type":"string","required":true},"agent_account_name":{"type":"string","required":true},"agent_application_name":{"type":"string","optional":true},"agent_node_name":{"type":"string","optional":true},"agent_tier_name":{"type":"string","optional":true},"agent_unique_host_id":{"type":"string","optional":true},"controller_host_name":{"type":"string","required":true},"controller_port":{"type":"number","optional":true},"controller_ssl_enabled":{"type":"bool","optional":true},"globally_enabled":{"type":"bool","optional":true},"name":{"type":"string","required":true},"spring_cloud_service_id":{"type":"string","required":true}}}},"azurerm_spring_cloud_app_mysql_association":{"block":{"attributes":{"database_name":{"type":"string","required":true},"mysql_server_id":{"type":"string","required":true},"name":{"type":"string","required":true},"password":{"type":"string","required":true},"spring_cloud_app_id":{"type":"string","required":true},"username":{"type":"string","required":true}}}},"azurerm_spring_cloud_app_redis_association":{"block":{"attributes":{"name":{"type":"string","required":true},"redis_access_key":{"type":"string","required":true},"redis_cache_id":{"type":"string","required":true},"spring_cloud_app_id":{"type":"string","required":true},"ssl_enabled":{"type":"bool","optional":true,"default":true}}}},"azurerm_spring_cloud_application_insights_application_performance_monitoring":{"block":{"attributes":{"connection_string":{"type":"string","optional":true},"globally_enabled":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"role_instance":{"type":"string","optional":true},"role_name":{"type":"string","optional":true},"sampling_percentage":{"type":"number","optional":true},"sampling_requests_per_second":{"type":"number","optional":true},"spring_cloud_service_id":{"type":"string","required":true}}}},"azurerm_spring_cloud_application_live_view":{"block":{"attributes":{"name":{"type":"string","required":true},"spring_cloud_service_id":{"type":"string","required":true}}}},"azurerm_spring_cloud_build_deployment":{"block":{"attributes":{"addon_json":{"type":"string","optional":true,"computed":true},"application_performance_monitoring_ids":{"type":["list","string"],"optional":true},"build_result_id":{"type":"string","required":true},"environment_variables":{"type":["map","string"],"optional":true},"instance_count":{"type":"number","optional":true,"default":1},"name":{"type":"string","required":true},"spring_cloud_app_id":{"type":"string","required":true}},"block_types":{"quota":{"nesting_mode":3,"block":{"attributes":{"cpu":{"type":"string","optional":true,"computed":true},"memory":{"type":"string","optional":true,"computed":true}}},"optional":true,"computed":true}}}},"azurerm_spring_cloud_build_pack_binding":{"block":{"attributes":{"binding_type":{"type":"string","optional":true},"name":{"type":"string","required":true},"spring_cloud_builder_id":{"type":"string","required":true}},"block_types":{"launch":{"nesting_mode":3,"block":{"attributes":{"properties":{"type":["map","string"],"optional":true},"secrets":{"type":["map","string"],"optional":true}}},"optional":true}}}},"azurerm_spring_cloud_builder":{"block":{"attributes":{"name":{"type":"string","required":true},"spring_cloud_service_id":{"type":"string","required":true}},"block_types":{"build_pack_group":{"nesting_mode":4,"block":{"attributes":{"build_pack_ids":{"type":["list","string"],"optional":true},"name":{"type":"string","required":true}}},"required":true},"stack":{"nesting_mode":3,"block":{"attributes":{"id":{"type":"string","required":true},"version":{"type":"string","required":true}}},"required":true}}}},"azurerm_spring_cloud_certificate":{"block":{"attributes":{"certificate_content":{"type":"string","optional":true,"at_least_one_of":["key_vault_certificate_id","certificate_content"]},"exclude_private_key":{"type":"bool","optional":true},"key_vault_certificate_id":{"type":"string","optional":true,"at_least_one_of":["key_vault_certificate_id","certificate_content"]},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"service_name":{"type":"string","required":true},"thumbprint":{"type":"string","computed":true}}}},"azurerm_spring_cloud_configuration_service":{"block":{"attributes":{"generation":{"type":"string","optional":true},"name":{"type":"string","required":true},"refresh_interval_in_seconds":{"type":"number","optional":true},"spring_cloud_service_id":{"type":"string","required":true}},"block_types":{"repository":{"nesting_mode":3,"block":{"attributes":{"ca_certificate_id":{"type":"string","optional":true},"host_key":{"type":"string","optional":true},"host_key_algorithm":{"type":"string","optional":true},"label":{"type":"string","required":true},"name":{"type":"string","required":true},"password":{"type":"string","optional":true},"patterns":{"type":["set","string"],"required":true},"private_key":{"type":"string","optional":true},"search_paths":{"type":["set","string"],"optional":true},"strict_host_key_checking":{"type":"bool","optional":true},"uri":{"type":"string","required":true},"username":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_spring_cloud_connection":{"block":{"attributes":{"client_type":{"type":"string","optional":true,"default":"none"},"name":{"type":"string","required":true},"spring_cloud_id":{"type":"string","required":true},"target_resource_id":{"type":"string","required":true},"vnet_solution":{"type":"string","optional":true}},"block_types":{"authentication":{"nesting_mode":3,"block":{"attributes":{"certificate":{"type":"string","optional":true},"client_id":{"type":"string","optional":true},"name":{"type":"string","optional":true},"principal_id":{"type":"string","optional":true},"secret":{"type":"string","optional":true},"subscription_id":{"type":"string","optional":true},"type":{"type":"string","required":true}}},"required":true},"secret_store":{"nesting_mode":3,"block":{"attributes":{"key_vault_id":{"type":"string","required":true}}},"optional":true}}}},"azurerm_spring_cloud_container_deployment":{"block":{"attributes":{"addon_json":{"type":"string","optional":true,"computed":true},"application_performance_monitoring_ids":{"type":["list","string"],"optional":true},"arguments":{"type":["list","string"],"optional":true},"commands":{"type":["list","string"],"optional":true},"environment_variables":{"type":["map","string"],"optional":true},"image":{"type":"string","required":true},"instance_count":{"type":"number","optional":true,"default":1},"language_framework":{"type":"string","optional":true},"name":{"type":"string","required":true},"server":{"type":"string","required":true},"spring_cloud_app_id":{"type":"string","required":true}},"block_types":{"quota":{"nesting_mode":3,"block":{"attributes":{"cpu":{"type":"string","optional":true,"computed":true},"memory":{"type":"string","optional":true,"computed":true}}},"optional":true,"computed":true}}}},"azurerm_spring_cloud_custom_domain":{"block":{"attributes":{"certificate_name":{"type":"string","optional":true,"required_with":["thumbprint"]},"name":{"type":"string","required":true},"spring_cloud_app_id":{"type":"string","required":true},"thumbprint":{"type":"string","optional":true,"required_with":["certificate_name"]}}}},"azurerm_spring_cloud_customized_accelerator":{"block":{"attributes":{"accelerator_tags":{"type":["list","string"],"optional":true},"accelerator_type":{"type":"string","optional":true,"default":"Accelerator"},"description":{"type":"string","optional":true},"display_name":{"type":"string","optional":true},"icon_url":{"type":"string","optional":true},"name":{"type":"string","required":true},"spring_cloud_accelerator_id":{"type":"string","required":true}},"block_types":{"git_repository":{"nesting_mode":3,"block":{"attributes":{"branch":{"type":"string","optional":true,"exactly_one_of":["git_repository.0.branch","git_repository.0.commit","git_repository.0.git_tag"]},"ca_certificate_id":{"type":"string","optional":true},"commit":{"type":"string","optional":true,"exactly_one_of":["git_repository.0.branch","git_repository.0.commit","git_repository.0.git_tag"]},"git_tag":{"type":"string","optional":true,"exactly_one_of":["git_repository.0.branch","git_repository.0.commit","git_repository.0.git_tag"]},"interval_in_seconds":{"type":"number","optional":true},"path":{"type":"string","optional":true},"url":{"type":"string","required":true}},"block_types":{"basic_auth":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true,"conflicts_with":["git_repository.0.ssh_auth"]},"ssh_auth":{"nesting_mode":3,"block":{"attributes":{"host_key":{"type":"string","optional":true},"host_key_algorithm":{"type":"string","optional":true},"private_key":{"type":"string","required":true}}},"optional":true,"conflicts_with":["git_repository.0.basic_auth"]}}},"required":true}}}},"azurerm_spring_cloud_dev_tool_portal":{"block":{"attributes":{"application_accelerator_enabled":{"type":"bool","optional":true,"computed":true},"application_live_view_enabled":{"type":"bool","optional":true,"computed":true},"name":{"type":"string","required":true},"public_network_access_enabled":{"type":"bool","optional":true},"spring_cloud_service_id":{"type":"string","required":true}},"block_types":{"sso":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","optional":true},"client_secret":{"type":"string","optional":true},"metadata_url":{"type":"string","optional":true},"scope":{"type":["set","string"],"optional":true}}},"optional":true}}}},"azurerm_spring_cloud_dynatrace_application_performance_monitoring":{"block":{"attributes":{"api_token":{"type":"string","optional":true},"api_url":{"type":"string","optional":true},"connection_point":{"type":"string","required":true},"environment_id":{"type":"string","optional":true},"globally_enabled":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"spring_cloud_service_id":{"type":"string","required":true},"tenant":{"type":"string","required":true},"tenant_token":{"type":"string","required":true}}}},"azurerm_spring_cloud_elastic_application_performance_monitoring":{"block":{"attributes":{"application_packages":{"type":["list","string"],"required":true},"globally_enabled":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"server_url":{"type":"string","required":true},"service_name":{"type":"string","required":true},"spring_cloud_service_id":{"type":"string","required":true}}}},"azurerm_spring_cloud_gateway":{"block":{"attributes":{"application_performance_monitoring_ids":{"type":["list","string"],"optional":true},"application_performance_monitoring_types":{"type":["list","string"],"optional":true},"environment_variables":{"type":["map","string"],"optional":true},"https_only":{"type":"bool","optional":true},"instance_count":{"type":"number","optional":true,"default":1},"name":{"type":"string","required":true},"public_network_access_enabled":{"type":"bool","optional":true},"sensitive_environment_variables":{"type":["map","string"],"optional":true},"spring_cloud_service_id":{"type":"string","required":true},"url":{"type":"string","computed":true}},"block_types":{"api_metadata":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"documentation_url":{"type":"string","optional":true},"server_url":{"type":"string","optional":true},"title":{"type":"string","optional":true},"version":{"type":"string","optional":true}}},"optional":true},"client_authorization":{"nesting_mode":3,"block":{"attributes":{"certificate_ids":{"type":["list","string"],"optional":true},"verification_enabled":{"type":"bool","optional":true}}},"optional":true},"cors":{"nesting_mode":3,"block":{"attributes":{"allowed_headers":{"type":["set","string"],"optional":true},"allowed_methods":{"type":["set","string"],"optional":true},"allowed_origin_patterns":{"type":["set","string"],"optional":true},"allowed_origins":{"type":["set","string"],"optional":true},"credentials_allowed":{"type":"bool","optional":true},"exposed_headers":{"type":["set","string"],"optional":true},"max_age_seconds":{"type":"number","optional":true}}},"optional":true},"local_response_cache_per_instance":{"nesting_mode":3,"block":{"attributes":{"size":{"type":"string","optional":true},"time_to_live":{"type":"string","optional":true}}},"optional":true,"conflicts_with":["local_response_cache_per_route"]},"local_response_cache_per_route":{"nesting_mode":3,"block":{"attributes":{"size":{"type":"string","optional":true},"time_to_live":{"type":"string","optional":true}}},"optional":true,"conflicts_with":["local_response_cache_per_instance"]},"quota":{"nesting_mode":3,"block":{"attributes":{"cpu":{"type":"string","optional":true,"default":"1"},"memory":{"type":"string","optional":true,"default":"2Gi"}}},"optional":true,"computed":true},"sso":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","optional":true},"client_secret":{"type":"string","optional":true},"issuer_uri":{"type":"string","optional":true},"scope":{"type":["set","string"],"optional":true}}},"optional":true}}}},"azurerm_spring_cloud_gateway_custom_domain":{"block":{"attributes":{"name":{"type":"string","required":true},"spring_cloud_gateway_id":{"type":"string","required":true},"thumbprint":{"type":"string","optional":true}}}},"azurerm_spring_cloud_gateway_route_config":{"block":{"attributes":{"filters":{"type":["set","string"],"optional":true},"name":{"type":"string","required":true},"predicates":{"type":["set","string"],"optional":true},"protocol":{"type":"string","required":true},"spring_cloud_app_id":{"type":"string","optional":true},"spring_cloud_gateway_id":{"type":"string","required":true},"sso_validation_enabled":{"type":"bool","optional":true}},"block_types":{"open_api":{"nesting_mode":3,"block":{"attributes":{"uri":{"type":"string","optional":true}}},"optional":true},"route":{"nesting_mode":4,"block":{"attributes":{"classification_tags":{"type":["set","string"],"optional":true},"description":{"type":"string","optional":true},"filters":{"type":["set","string"],"optional":true},"order":{"type":"number","required":true},"predicates":{"type":["set","string"],"optional":true},"sso_validation_enabled":{"type":"bool","optional":true},"title":{"type":"string","optional":true},"token_relay":{"type":"bool","optional":true},"uri":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_spring_cloud_java_deployment":{"block":{"attributes":{"environment_variables":{"type":["map","string"],"optional":true},"instance_count":{"type":"number","optional":true,"default":1},"jvm_options":{"type":"string","optional":true},"name":{"type":"string","required":true},"runtime_version":{"type":"string","optional":true,"default":"Java_8"},"spring_cloud_app_id":{"type":"string","required":true}},"block_types":{"quota":{"nesting_mode":3,"block":{"attributes":{"cpu":{"type":"string","optional":true,"computed":true},"memory":{"type":"string","optional":true,"computed":true}}},"optional":true,"computed":true}}}},"azurerm_spring_cloud_new_relic_application_performance_monitoring":{"block":{"attributes":{"agent_enabled":{"type":"bool","optional":true,"default":true},"app_name":{"type":"string","required":true},"app_server_port":{"type":"number","optional":true},"audit_mode_enabled":{"type":"bool","optional":true},"auto_app_naming_enabled":{"type":"bool","optional":true},"auto_transaction_naming_enabled":{"type":"bool","optional":true,"default":true},"custom_tracing_enabled":{"type":"bool","optional":true,"default":true},"globally_enabled":{"type":"bool","optional":true},"labels":{"type":["map","string"],"optional":true},"license_key":{"type":"string","required":true},"name":{"type":"string","required":true},"spring_cloud_service_id":{"type":"string","required":true}}}},"azurerm_spring_cloud_service":{"block":{"attributes":{"build_agent_pool_size":{"type":"string","optional":true},"location":{"type":"string","required":true},"log_stream_public_endpoint_enabled":{"type":"bool","optional":true},"managed_environment_id":{"type":"string","optional":true},"name":{"type":"string","required":true},"outbound_public_ip_addresses":{"type":["list","string"],"computed":true},"required_network_traffic_rules":{"type":["list",["object",{"direction":"string","fqdns":["list","string"],"ip_addresses":["list","string"],"port":"number","protocol":"string"}]],"computed":true},"resource_group_name":{"type":"string","required":true},"service_registry_enabled":{"type":"bool","optional":true},"service_registry_id":{"type":"string","computed":true},"sku_name":{"type":"string","optional":true,"default":"S0"},"sku_tier":{"type":"string","optional":true,"computed":true},"tags":{"type":["map","string"],"optional":true},"zone_redundant":{"type":"bool","optional":true,"default":false}},"block_types":{"config_server_git_setting":{"nesting_mode":3,"block":{"attributes":{"label":{"type":"string","optional":true},"search_paths":{"type":["list","string"],"optional":true},"uri":{"type":"string","required":true}},"block_types":{"http_basic_auth":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true,"conflicts_with":["config_server_git_setting.0.ssh_auth"]},"repository":{"nesting_mode":3,"block":{"attributes":{"label":{"type":"string","optional":true},"name":{"type":"string","required":true},"pattern":{"type":["list","string"],"optional":true},"search_paths":{"type":["list","string"],"optional":true},"uri":{"type":"string","required":true}},"block_types":{"http_basic_auth":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true},"ssh_auth":{"nesting_mode":3,"block":{"attributes":{"host_key":{"type":"string","optional":true},"host_key_algorithm":{"type":"string","optional":true},"private_key":{"type":"string","required":true},"strict_host_key_checking_enabled":{"type":"bool","optional":true,"default":true}}},"optional":true}}},"optional":true},"ssh_auth":{"nesting_mode":3,"block":{"attributes":{"host_key":{"type":"string","optional":true},"host_key_algorithm":{"type":"string","optional":true},"private_key":{"type":"string","required":true},"strict_host_key_checking_enabled":{"type":"bool","optional":true,"default":true}}},"optional":true,"conflicts_with":["config_server_git_setting.0.http_basic_auth"]}}},"optional":true},"container_registry":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"password":{"type":"string","required":true},"server":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true},"default_build_service":{"nesting_mode":3,"block":{"attributes":{"container_registry_name":{"type":"string","optional":true}}},"optional":true},"marketplace":{"nesting_mode":3,"block":{"attributes":{"plan":{"type":"string","required":true},"product":{"type":"string","required":true},"publisher":{"type":"string","required":true}}},"optional":true,"computed":true},"network":{"nesting_mode":3,"block":{"attributes":{"app_network_resource_group":{"type":"string","optional":true,"computed":true},"app_subnet_id":{"type":"string","required":true},"cidr_ranges":{"type":["list","string"],"required":true},"outbound_type":{"type":"string","optional":true,"default":"loadBalancer"},"read_timeout_seconds":{"type":"number","optional":true},"service_runtime_network_resource_group":{"type":"string","optional":true,"computed":true},"service_runtime_subnet_id":{"type":"string","required":true}}},"optional":true},"trace":{"nesting_mode":3,"block":{"attributes":{"connection_string":{"type":"string","optional":true},"sample_rate":{"type":"number","optional":true,"default":10}}},"optional":true}}}},"azurerm_spring_cloud_storage":{"block":{"attributes":{"name":{"type":"string","required":true},"spring_cloud_service_id":{"type":"string","required":true},"storage_account_key":{"type":"string","required":true},"storage_account_name":{"type":"string","required":true}}}},"azurerm_ssh_public_key":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"public_key":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_stack_hci_cluster":{"block":{"attributes":{"automanage_configuration_id":{"type":"string","optional":true},"client_id":{"type":"string","optional":true},"cloud_id":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"resource_provider_object_id":{"type":"string","computed":true},"service_endpoint":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true},"tenant_id":{"type":"string","optional":true,"computed":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_stack_hci_deployment_setting":{"block":{"attributes":{"arc_resource_ids":{"type":["list","string"],"required":true},"stack_hci_cluster_id":{"type":"string","required":true},"version":{"type":"string","required":true}},"block_types":{"scale_unit":{"nesting_mode":3,"block":{"attributes":{"active_directory_organizational_unit_path":{"type":"string","required":true},"bitlocker_boot_volume_enabled":{"type":"bool","optional":true,"default":true},"bitlocker_data_volume_enabled":{"type":"bool","optional":true,"default":true},"credential_guard_enabled":{"type":"bool","optional":true,"default":false},"domain_fqdn":{"type":"string","required":true},"drift_control_enabled":{"type":"bool","optional":true,"default":true},"drtm_protection_enabled":{"type":"bool","optional":true,"default":true},"episodic_data_upload_enabled":{"type":"bool","optional":true,"default":true},"eu_location_enabled":{"type":"bool","optional":true,"default":false},"hvci_protection_enabled":{"type":"bool","optional":true,"default":true},"name_prefix":{"type":"string","required":true},"secrets_location":{"type":"string","required":true},"side_channel_mitigation_enabled":{"type":"bool","optional":true,"default":true},"smb_cluster_encryption_enabled":{"type":"bool","optional":true,"default":false},"smb_signing_enabled":{"type":"bool","optional":true,"default":true},"streaming_data_client_enabled":{"type":"bool","optional":true,"default":true},"wdac_enabled":{"type":"bool","optional":true,"default":true}},"block_types":{"cluster":{"nesting_mode":3,"block":{"attributes":{"azure_service_endpoint":{"type":"string","required":true},"cloud_account_name":{"type":"string","required":true},"name":{"type":"string","required":true},"witness_path":{"type":"string","required":true},"witness_type":{"type":"string","required":true}}},"required":true},"host_network":{"nesting_mode":3,"block":{"attributes":{"storage_auto_ip_enabled":{"type":"bool","optional":true,"default":true},"storage_connectivity_switchless_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"intent":{"nesting_mode":3,"block":{"attributes":{"adapter":{"type":["list","string"],"required":true},"adapter_property_override_enabled":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"qos_policy_override_enabled":{"type":"bool","optional":true,"default":false},"traffic_type":{"type":["list","string"],"required":true},"virtual_switch_configuration_override_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"adapter_property_override":{"nesting_mode":3,"block":{"attributes":{"jumbo_packet":{"type":"string","optional":true},"network_direct":{"type":"string","optional":true},"network_direct_technology":{"type":"string","optional":true}}},"optional":true},"qos_policy_override":{"nesting_mode":3,"block":{"attributes":{"bandwidth_percentage_smb":{"type":"string","optional":true},"priority_value8021_action_cluster":{"type":"string","optional":true},"priority_value8021_action_smb":{"type":"string","optional":true}}},"optional":true},"virtual_switch_configuration_override":{"nesting_mode":3,"block":{"attributes":{"enable_iov":{"type":"string","optional":true},"load_balancing_algorithm":{"type":"string","optional":true}}},"optional":true}}},"required":true},"storage_network":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"network_adapter_name":{"type":"string","required":true},"vlan_id":{"type":"string","required":true}}},"required":true}}},"required":true},"infrastructure_network":{"nesting_mode":3,"block":{"attributes":{"dhcp_enabled":{"type":"bool","optional":true,"default":false},"dns_server":{"type":["list","string"],"required":true},"gateway":{"type":"string","required":true},"subnet_mask":{"type":"string","required":true}},"block_types":{"ip_pool":{"nesting_mode":3,"block":{"attributes":{"ending_address":{"type":"string","required":true},"starting_address":{"type":"string","required":true}}},"required":true}}},"required":true},"optional_service":{"nesting_mode":3,"block":{"attributes":{"custom_location":{"type":"string","required":true}}},"required":true},"physical_node":{"nesting_mode":3,"block":{"attributes":{"ipv4_address":{"type":"string","required":true},"name":{"type":"string","required":true}}},"required":true},"storage":{"nesting_mode":3,"block":{"attributes":{"configuration_mode":{"type":"string","required":true}}},"required":true}}},"required":true}}}},"azurerm_stack_hci_logical_network":{"block":{"attributes":{"custom_location_id":{"type":"string","required":true},"dns_servers":{"type":["list","string"],"optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"virtual_switch_name":{"type":"string","required":true}},"block_types":{"subnet":{"nesting_mode":3,"block":{"attributes":{"address_prefix":{"type":"string","optional":true},"ip_allocation_method":{"type":"string","required":true},"vlan_id":{"type":"number","optional":true}},"block_types":{"ip_pool":{"nesting_mode":3,"block":{"attributes":{"end":{"type":"string","required":true},"start":{"type":"string","required":true}}},"optional":true},"route":{"nesting_mode":3,"block":{"attributes":{"address_prefix":{"type":"string","required":true},"name":{"type":"string","required":true},"next_hop_ip_address":{"type":"string","required":true}}},"optional":true}}},"required":true}}}},"azurerm_stack_hci_storage_path":{"block":{"attributes":{"custom_location_id":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"path":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_stack_hci_virtual_hard_disk":{"block":{"attributes":{"block_size_in_bytes":{"type":"number","optional":true},"custom_location_id":{"type":"string","required":true},"disk_file_format":{"type":"string","optional":true},"disk_size_in_gb":{"type":"number","required":true},"dynamic_enabled":{"type":"bool","optional":true,"default":false},"hyperv_generation":{"type":"string","optional":true},"location":{"type":"string","required":true},"logical_sector_in_bytes":{"type":"number","optional":true},"name":{"type":"string","required":true},"physical_sector_in_bytes":{"type":"number","optional":true},"resource_group_name":{"type":"string","required":true},"storage_path_id":{"type":"string","optional":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_static_site":{"block":{"attributes":{"api_key":{"type":"string","computed":true},"app_settings":{"type":["map","string"],"optional":true},"default_host_name":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"sku_size":{"type":"string","optional":true,"default":"Free"},"sku_tier":{"type":"string","optional":true,"default":"Free"},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_static_site_custom_domain":{"block":{"attributes":{"domain_name":{"type":"string","required":true},"static_site_id":{"type":"string","required":true},"validation_token":{"type":"string","computed":true},"validation_type":{"type":"string","optional":true}}}},"azurerm_static_web_app":{"block":{"attributes":{"api_key":{"type":"string","computed":true},"app_settings":{"type":["map","string"],"optional":true},"configuration_file_changes_enabled":{"type":"bool","optional":true,"default":true},"default_host_name":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"preview_environments_enabled":{"type":"bool","optional":true,"default":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"sku_size":{"type":"string","optional":true,"default":"Free"},"sku_tier":{"type":"string","optional":true,"default":"Free"},"tags":{"type":["map","string"],"optional":true}},"block_types":{"basic_auth":{"nesting_mode":3,"block":{"attributes":{"environments":{"type":"string","required":true},"password":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_static_web_app_custom_domain":{"block":{"attributes":{"domain_name":{"type":"string","required":true},"static_web_app_id":{"type":"string","required":true},"validation_token":{"type":"string","computed":true},"validation_type":{"type":"string","required":true}}}},"azurerm_static_web_app_function_app_registration":{"block":{"attributes":{"function_app_id":{"type":"string","required":true},"static_web_app_id":{"type":"string","required":true}}}},"azurerm_storage_account":{"block":{"attributes":{"access_tier":{"type":"string","optional":true,"computed":true},"account_kind":{"type":"string","optional":true,"default":"StorageV2"},"account_replication_type":{"type":"string","required":true},"account_tier":{"type":"string","required":true},"allow_nested_items_to_be_public":{"type":"bool","optional":true,"default":true},"allowed_copy_scope":{"type":"string","optional":true},"cross_tenant_replication_enabled":{"type":"bool","optional":true,"default":false},"default_to_oauth_authentication":{"type":"bool","optional":true,"default":false},"dns_endpoint_type":{"type":"string","optional":true,"default":"Standard"},"edge_zone":{"type":"string","optional":true},"https_traffic_only_enabled":{"type":"bool","optional":true,"default":true},"infrastructure_encryption_enabled":{"type":"bool","optional":true,"default":false},"is_hns_enabled":{"type":"bool","optional":true,"default":false},"large_file_share_enabled":{"type":"bool","optional":true,"computed":true},"local_user_enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"min_tls_version":{"type":"string","optional":true,"default":"TLS1_2"},"name":{"type":"string","required":true},"nfsv3_enabled":{"type":"bool","optional":true,"default":false},"primary_access_key":{"type":"string","computed":true},"primary_blob_connection_string":{"type":"string","computed":true},"primary_blob_endpoint":{"type":"string","computed":true},"primary_blob_host":{"type":"string","computed":true},"primary_blob_internet_endpoint":{"type":"string","computed":true},"primary_blob_internet_host":{"type":"string","computed":true},"primary_blob_microsoft_endpoint":{"type":"string","computed":true},"primary_blob_microsoft_host":{"type":"string","computed":true},"primary_connection_string":{"type":"string","computed":true},"primary_dfs_endpoint":{"type":"string","computed":true},"primary_dfs_host":{"type":"string","computed":true},"primary_dfs_internet_endpoint":{"type":"string","computed":true},"primary_dfs_internet_host":{"type":"string","computed":true},"primary_dfs_microsoft_endpoint":{"type":"string","computed":true},"primary_dfs_microsoft_host":{"type":"string","computed":true},"primary_file_endpoint":{"type":"string","computed":true},"primary_file_host":{"type":"string","computed":true},"primary_file_internet_endpoint":{"type":"string","computed":true},"primary_file_internet_host":{"type":"string","computed":true},"primary_file_microsoft_endpoint":{"type":"string","computed":true},"primary_file_microsoft_host":{"type":"string","computed":true},"primary_location":{"type":"string","computed":true},"primary_queue_endpoint":{"type":"string","computed":true},"primary_queue_host":{"type":"string","computed":true},"primary_queue_microsoft_endpoint":{"type":"string","computed":true},"primary_queue_microsoft_host":{"type":"string","computed":true},"primary_table_endpoint":{"type":"string","computed":true},"primary_table_host":{"type":"string","computed":true},"primary_table_microsoft_endpoint":{"type":"string","computed":true},"primary_table_microsoft_host":{"type":"string","computed":true},"primary_web_endpoint":{"type":"string","computed":true},"primary_web_host":{"type":"string","computed":true},"primary_web_internet_endpoint":{"type":"string","computed":true},"primary_web_internet_host":{"type":"string","computed":true},"primary_web_microsoft_endpoint":{"type":"string","computed":true},"primary_web_microsoft_host":{"type":"string","computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"queue_encryption_key_type":{"type":"string","optional":true,"default":"Service"},"resource_group_name":{"type":"string","required":true},"secondary_access_key":{"type":"string","computed":true},"secondary_blob_connection_string":{"type":"string","computed":true},"secondary_blob_endpoint":{"type":"string","computed":true},"secondary_blob_host":{"type":"string","computed":true},"secondary_blob_internet_endpoint":{"type":"string","computed":true},"secondary_blob_internet_host":{"type":"string","computed":true},"secondary_blob_microsoft_endpoint":{"type":"string","computed":true},"secondary_blob_microsoft_host":{"type":"string","computed":true},"secondary_connection_string":{"type":"string","computed":true},"secondary_dfs_endpoint":{"type":"string","computed":true},"secondary_dfs_host":{"type":"string","computed":true},"secondary_dfs_internet_endpoint":{"type":"string","computed":true},"secondary_dfs_internet_host":{"type":"string","computed":true},"secondary_dfs_microsoft_endpoint":{"type":"string","computed":true},"secondary_dfs_microsoft_host":{"type":"string","computed":true},"secondary_file_endpoint":{"type":"string","computed":true},"secondary_file_host":{"type":"string","computed":true},"secondary_file_internet_endpoint":{"type":"string","computed":true},"secondary_file_internet_host":{"type":"string","computed":true},"secondary_file_microsoft_endpoint":{"type":"string","computed":true},"secondary_file_microsoft_host":{"type":"string","computed":true},"secondary_location":{"type":"string","computed":true},"secondary_queue_endpoint":{"type":"string","computed":true},"secondary_queue_host":{"type":"string","computed":true},"secondary_queue_microsoft_endpoint":{"type":"string","computed":true},"secondary_queue_microsoft_host":{"type":"string","computed":true},"secondary_table_endpoint":{"type":"string","computed":true},"secondary_table_host":{"type":"string","computed":true},"secondary_table_microsoft_endpoint":{"type":"string","computed":true},"secondary_table_microsoft_host":{"type":"string","computed":true},"secondary_web_endpoint":{"type":"string","computed":true},"secondary_web_host":{"type":"string","computed":true},"secondary_web_internet_endpoint":{"type":"string","computed":true},"secondary_web_internet_host":{"type":"string","computed":true},"secondary_web_microsoft_endpoint":{"type":"string","computed":true},"secondary_web_microsoft_host":{"type":"string","computed":true},"sftp_enabled":{"type":"bool","optional":true,"default":false},"shared_access_key_enabled":{"type":"bool","optional":true,"default":true},"table_encryption_key_type":{"type":"string","optional":true,"default":"Service"},"tags":{"type":["map","string"],"optional":true}},"block_types":{"azure_files_authentication":{"nesting_mode":3,"block":{"attributes":{"default_share_level_permission":{"type":"string","optional":true,"default":"None"},"directory_type":{"type":"string","required":true}},"block_types":{"active_directory":{"nesting_mode":3,"block":{"attributes":{"domain_guid":{"type":"string","required":true},"domain_name":{"type":"string","required":true},"domain_sid":{"type":"string","optional":true},"forest_name":{"type":"string","optional":true},"netbios_domain_name":{"type":"string","optional":true},"storage_sid":{"type":"string","optional":true}}},"optional":true,"computed":true}}},"optional":true},"blob_properties":{"nesting_mode":3,"block":{"attributes":{"change_feed_enabled":{"type":"bool","optional":true,"default":false},"change_feed_retention_in_days":{"type":"number","optional":true},"default_service_version":{"type":"string","optional":true,"computed":true},"last_access_time_enabled":{"type":"bool","optional":true,"default":false},"versioning_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"container_delete_retention_policy":{"nesting_mode":3,"block":{"attributes":{"days":{"type":"number","optional":true,"default":7}}},"optional":true},"cors_rule":{"nesting_mode":3,"block":{"attributes":{"allowed_headers":{"type":["list","string"],"required":true},"allowed_methods":{"type":["list","string"],"required":true},"allowed_origins":{"type":["list","string"],"required":true},"exposed_headers":{"type":["list","string"],"required":true},"max_age_in_seconds":{"type":"number","required":true}}},"optional":true},"delete_retention_policy":{"nesting_mode":3,"block":{"attributes":{"days":{"type":"number","optional":true,"default":7},"permanent_delete_enabled":{"type":"bool","optional":true,"default":false}}},"optional":true},"restore_policy":{"nesting_mode":3,"block":{"attributes":{"days":{"type":"number","required":true}}},"optional":true,"required_with":["blob_properties.0.delete_retention_policy"]}}},"optional":true,"computed":true},"custom_domain":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"use_subdomain":{"type":"bool","optional":true,"default":false}}},"optional":true},"customer_managed_key":{"nesting_mode":3,"block":{"attributes":{"key_vault_key_id":{"type":"string","optional":true,"exactly_one_of":["customer_managed_key.0.managed_hsm_key_id","customer_managed_key.0.key_vault_key_id"]},"managed_hsm_key_id":{"type":"string","optional":true,"exactly_one_of":["customer_managed_key.0.managed_hsm_key_id","customer_managed_key.0.key_vault_key_id"]},"user_assigned_identity_id":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"immutability_policy":{"nesting_mode":3,"block":{"attributes":{"allow_protected_append_writes":{"type":"bool","required":true},"period_since_creation_in_days":{"type":"number","required":true},"state":{"type":"string","required":true}}},"optional":true},"network_rules":{"nesting_mode":3,"block":{"attributes":{"bypass":{"type":["set","string"],"optional":true,"computed":true},"default_action":{"type":"string","required":true},"ip_rules":{"type":["set","string"],"optional":true,"computed":true},"virtual_network_subnet_ids":{"type":["set","string"],"optional":true,"computed":true}},"block_types":{"private_link_access":{"nesting_mode":3,"block":{"attributes":{"endpoint_resource_id":{"type":"string","required":true},"endpoint_tenant_id":{"type":"string","optional":true,"computed":true}}},"optional":true}}},"optional":true,"computed":true},"queue_properties":{"nesting_mode":3,"block":{"block_types":{"cors_rule":{"nesting_mode":3,"block":{"attributes":{"allowed_headers":{"type":["list","string"],"required":true},"allowed_methods":{"type":["list","string"],"required":true},"allowed_origins":{"type":["list","string"],"required":true},"exposed_headers":{"type":["list","string"],"required":true},"max_age_in_seconds":{"type":"number","required":true}}},"optional":true},"hour_metrics":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","required":true},"include_apis":{"type":"bool","optional":true},"retention_policy_days":{"type":"number","optional":true},"version":{"type":"string","required":true}}},"optional":true,"computed":true},"logging":{"nesting_mode":3,"block":{"attributes":{"delete":{"type":"bool","required":true},"read":{"type":"bool","required":true},"retention_policy_days":{"type":"number","optional":true},"version":{"type":"string","required":true},"write":{"type":"bool","required":true}}},"optional":true,"computed":true},"minute_metrics":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","required":true},"include_apis":{"type":"bool","optional":true},"retention_policy_days":{"type":"number","optional":true},"version":{"type":"string","required":true}}},"optional":true,"computed":true}}},"optional":true,"computed":true},"routing":{"nesting_mode":3,"block":{"attributes":{"choice":{"type":"string","optional":true,"default":"MicrosoftRouting"},"publish_internet_endpoints":{"type":"bool","optional":true,"default":false},"publish_microsoft_endpoints":{"type":"bool","optional":true,"default":false}}},"optional":true,"computed":true},"sas_policy":{"nesting_mode":3,"block":{"attributes":{"expiration_action":{"type":"string","optional":true,"default":"Log"},"expiration_period":{"type":"string","required":true}}},"optional":true},"share_properties":{"nesting_mode":3,"block":{"block_types":{"cors_rule":{"nesting_mode":3,"block":{"attributes":{"allowed_headers":{"type":["list","string"],"required":true},"allowed_methods":{"type":["list","string"],"required":true},"allowed_origins":{"type":["list","string"],"required":true},"exposed_headers":{"type":["list","string"],"required":true},"max_age_in_seconds":{"type":"number","required":true}}},"optional":true},"retention_policy":{"nesting_mode":3,"block":{"attributes":{"days":{"type":"number","optional":true,"default":7}}},"optional":true},"smb":{"nesting_mode":3,"block":{"attributes":{"authentication_types":{"type":["set","string"],"optional":true},"channel_encryption_type":{"type":["set","string"],"optional":true},"kerberos_ticket_encryption_type":{"type":["set","string"],"optional":true},"multichannel_enabled":{"type":"bool","optional":true,"default":false},"versions":{"type":["set","string"],"optional":true}}},"optional":true}}},"optional":true,"computed":true},"static_website":{"nesting_mode":3,"block":{"attributes":{"error_404_document":{"type":"string","optional":true},"index_document":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_storage_account_customer_managed_key":{"block":{"attributes":{"federated_identity_client_id":{"type":"string","optional":true,"required_with":["user_assigned_identity_id"]},"key_name":{"type":"string","required":true},"key_vault_id":{"type":"string","optional":true,"exactly_one_of":["managed_hsm_key_id","key_vault_id","key_vault_uri"]},"key_vault_uri":{"type":"string","optional":true,"computed":true,"exactly_one_of":["managed_hsm_key_id","key_vault_id","key_vault_uri"]},"key_version":{"type":"string","optional":true},"managed_hsm_key_id":{"type":"string","optional":true,"exactly_one_of":["managed_hsm_key_id","key_vault_id","key_vault_uri"]},"storage_account_id":{"type":"string","required":true},"user_assigned_identity_id":{"type":"string","optional":true}}}},"azurerm_storage_account_local_user":{"block":{"attributes":{"home_directory":{"type":"string","optional":true},"name":{"type":"string","required":true},"password":{"type":"string","computed":true},"sid":{"type":"string","computed":true},"ssh_key_enabled":{"type":"bool","optional":true,"default":false,"at_least_one_of":["ssh_key_enabled","ssh_password_enabled"]},"ssh_password_enabled":{"type":"bool","optional":true,"default":false,"at_least_one_of":["ssh_key_enabled","ssh_password_enabled"]},"storage_account_id":{"type":"string","required":true}},"block_types":{"permission_scope":{"nesting_mode":3,"block":{"attributes":{"resource_name":{"type":"string","required":true},"service":{"type":"string","required":true}},"block_types":{"permissions":{"nesting_mode":3,"block":{"attributes":{"create":{"type":"bool","optional":true,"default":false},"delete":{"type":"bool","optional":true,"default":false},"list":{"type":"bool","optional":true,"default":false},"read":{"type":"bool","optional":true,"default":false},"write":{"type":"bool","optional":true,"default":false}}},"required":true}}},"optional":true},"ssh_authorized_key":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"key":{"type":"string","required":true}}},"optional":true,"required_with":["ssh_key_enabled"]}}}},"azurerm_storage_account_network_rules":{"block":{"attributes":{"bypass":{"type":["set","string"],"optional":true,"computed":true},"default_action":{"type":"string","required":true},"ip_rules":{"type":["set","string"],"optional":true},"storage_account_id":{"type":"string","required":true},"virtual_network_subnet_ids":{"type":["set","string"],"optional":true}},"block_types":{"private_link_access":{"nesting_mode":3,"block":{"attributes":{"endpoint_resource_id":{"type":"string","required":true},"endpoint_tenant_id":{"type":"string","optional":true,"computed":true}}},"optional":true}}}},"azurerm_storage_blob":{"block":{"attributes":{"access_tier":{"type":"string","optional":true,"computed":true},"cache_control":{"type":"string","optional":true},"content_md5":{"type":"string","optional":true,"conflicts_with":["source_uri"]},"content_type":{"type":"string","optional":true,"default":"application/octet-stream"},"encryption_scope":{"type":"string","optional":true},"metadata":{"type":["map","string"],"optional":true,"computed":true},"name":{"type":"string","required":true},"parallelism":{"type":"number","optional":true,"default":8},"size":{"type":"number","optional":true,"default":0},"source":{"type":"string","optional":true,"conflicts_with":["source_uri","source_content"]},"source_content":{"type":"string","optional":true,"conflicts_with":["source","source_uri"]},"source_uri":{"type":"string","optional":true,"conflicts_with":["source","source_content"]},"storage_account_name":{"type":"string","required":true},"storage_container_name":{"type":"string","required":true},"type":{"type":"string","required":true},"url":{"type":"string","computed":true}}}},"azurerm_storage_blob_inventory_policy":{"block":{"attributes":{"storage_account_id":{"type":"string","required":true}},"block_types":{"rules":{"nesting_mode":4,"block":{"attributes":{"format":{"type":"string","required":true},"name":{"type":"string","required":true},"schedule":{"type":"string","required":true},"schema_fields":{"type":["list","string"],"required":true},"scope":{"type":"string","required":true},"storage_container_name":{"type":"string","required":true}},"block_types":{"filter":{"nesting_mode":3,"block":{"attributes":{"blob_types":{"type":["set","string"],"required":true},"exclude_prefixes":{"type":["set","string"],"optional":true},"include_blob_versions":{"type":"bool","optional":true,"default":false},"include_deleted":{"type":"bool","optional":true,"default":false},"include_snapshots":{"type":"bool","optional":true,"default":false},"prefix_match":{"type":["set","string"],"optional":true}}},"optional":true}}},"required":true}}}},"azurerm_storage_container":{"block":{"attributes":{"container_access_type":{"type":"string","optional":true,"default":"private"},"default_encryption_scope":{"type":"string","optional":true,"computed":true},"encryption_scope_override_enabled":{"type":"bool","optional":true,"default":true,"required_with":["default_encryption_scope"]},"has_immutability_policy":{"type":"bool","computed":true},"has_legal_hold":{"type":"bool","computed":true},"metadata":{"type":["map","string"],"optional":true,"computed":true},"name":{"type":"string","required":true},"resource_manager_id":{"type":"string","computed":true},"storage_account_name":{"type":"string","required":true}}}},"azurerm_storage_container_immutability_policy":{"block":{"attributes":{"immutability_period_in_days":{"type":"number","required":true},"locked":{"type":"bool","optional":true,"default":false},"protected_append_writes_all_enabled":{"type":"bool","optional":true,"default":false},"protected_append_writes_enabled":{"type":"bool","optional":true,"default":false},"storage_container_resource_manager_id":{"type":"string","required":true}}}},"azurerm_storage_data_lake_gen2_filesystem":{"block":{"attributes":{"default_encryption_scope":{"type":"string","optional":true,"computed":true},"group":{"type":"string","optional":true,"computed":true},"name":{"type":"string","required":true},"owner":{"type":"string","optional":true,"computed":true},"properties":{"type":["map","string"],"optional":true},"storage_account_id":{"type":"string","required":true}},"block_types":{"ace":{"nesting_mode":4,"block":{"attributes":{"id":{"type":"string","optional":true},"permissions":{"type":"string","required":true},"scope":{"type":"string","optional":true,"default":"access"},"type":{"type":"string","required":true}}},"optional":true,"computed":true}}}},"azurerm_storage_data_lake_gen2_path":{"block":{"attributes":{"filesystem_name":{"type":"string","required":true},"group":{"type":"string","optional":true,"computed":true},"owner":{"type":"string","optional":true,"computed":true},"path":{"type":"string","required":true},"resource":{"type":"string","required":true},"storage_account_id":{"type":"string","required":true}},"block_types":{"ace":{"nesting_mode":4,"block":{"attributes":{"id":{"type":"string","optional":true},"permissions":{"type":"string","required":true},"scope":{"type":"string","optional":true,"default":"access"},"type":{"type":"string","required":true}}},"optional":true,"computed":true}}}},"azurerm_storage_encryption_scope":{"block":{"attributes":{"infrastructure_encryption_required":{"type":"bool","optional":true},"key_vault_key_id":{"type":"string","optional":true},"name":{"type":"string","required":true},"source":{"type":"string","required":true},"storage_account_id":{"type":"string","required":true}}}},"azurerm_storage_management_policy":{"block":{"attributes":{"storage_account_id":{"type":"string","required":true}},"block_types":{"rule":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","required":true},"name":{"type":"string","required":true}},"block_types":{"actions":{"nesting_mode":3,"block":{"block_types":{"base_blob":{"nesting_mode":3,"block":{"attributes":{"auto_tier_to_hot_from_cool_enabled":{"type":"bool","optional":true},"delete_after_days_since_creation_greater_than":{"type":"number","optional":true,"default":-1},"delete_after_days_since_last_access_time_greater_than":{"type":"number","optional":true,"default":-1},"delete_after_days_since_modification_greater_than":{"type":"number","optional":true,"default":-1},"tier_to_archive_after_days_since_creation_greater_than":{"type":"number","optional":true,"default":-1},"tier_to_archive_after_days_since_last_access_time_greater_than":{"type":"number","optional":true,"default":-1},"tier_to_archive_after_days_since_last_tier_change_greater_than":{"type":"number","optional":true,"default":-1},"tier_to_archive_after_days_since_modification_greater_than":{"type":"number","optional":true,"default":-1},"tier_to_cold_after_days_since_creation_greater_than":{"type":"number","optional":true,"default":-1},"tier_to_cold_after_days_since_last_access_time_greater_than":{"type":"number","optional":true,"default":-1},"tier_to_cold_after_days_since_modification_greater_than":{"type":"number","optional":true,"default":-1},"tier_to_cool_after_days_since_creation_greater_than":{"type":"number","optional":true,"default":-1},"tier_to_cool_after_days_since_last_access_time_greater_than":{"type":"number","optional":true,"default":-1},"tier_to_cool_after_days_since_modification_greater_than":{"type":"number","optional":true,"default":-1}}},"optional":true},"snapshot":{"nesting_mode":3,"block":{"attributes":{"change_tier_to_archive_after_days_since_creation":{"type":"number","optional":true,"default":-1},"change_tier_to_cool_after_days_since_creation":{"type":"number","optional":true,"default":-1},"delete_after_days_since_creation_greater_than":{"type":"number","optional":true,"default":-1},"tier_to_archive_after_days_since_last_tier_change_greater_than":{"type":"number","optional":true,"default":-1},"tier_to_cold_after_days_since_creation_greater_than":{"type":"number","optional":true,"default":-1}}},"optional":true},"version":{"nesting_mode":3,"block":{"attributes":{"change_tier_to_archive_after_days_since_creation":{"type":"number","optional":true,"default":-1},"change_tier_to_cool_after_days_since_creation":{"type":"number","optional":true,"default":-1},"delete_after_days_since_creation":{"type":"number","optional":true,"default":-1},"tier_to_archive_after_days_since_last_tier_change_greater_than":{"type":"number","optional":true,"default":-1},"tier_to_cold_after_days_since_creation_greater_than":{"type":"number","optional":true,"default":-1}}},"optional":true}}},"required":true},"filters":{"nesting_mode":3,"block":{"attributes":{"blob_types":{"type":["set","string"],"required":true},"prefix_match":{"type":["set","string"],"optional":true}},"block_types":{"match_blob_index_tag":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"operation":{"type":"string","optional":true,"default":"=="},"value":{"type":"string","required":true}}},"optional":true}}},"required":true}}},"optional":true}}}},"azurerm_storage_mover":{"block":{"attributes":{"description":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_storage_mover_agent":{"block":{"attributes":{"arc_virtual_machine_id":{"type":"string","required":true},"arc_virtual_machine_uuid":{"type":"string","required":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"storage_mover_id":{"type":"string","required":true}}}},"azurerm_storage_mover_job_definition":{"block":{"attributes":{"agent_name":{"type":"string","optional":true},"copy_mode":{"type":"string","required":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"source_name":{"type":"string","required":true},"source_sub_path":{"type":"string","optional":true},"storage_mover_project_id":{"type":"string","required":true},"target_name":{"type":"string","required":true},"target_sub_path":{"type":"string","optional":true}}}},"azurerm_storage_mover_project":{"block":{"attributes":{"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"storage_mover_id":{"type":"string","required":true}}}},"azurerm_storage_mover_source_endpoint":{"block":{"attributes":{"description":{"type":"string","optional":true},"export":{"type":"string","optional":true},"host":{"type":"string","required":true},"name":{"type":"string","required":true},"nfs_version":{"type":"string","optional":true,"default":"NFSauto"},"storage_mover_id":{"type":"string","required":true}}}},"azurerm_storage_mover_target_endpoint":{"block":{"attributes":{"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"storage_account_id":{"type":"string","required":true},"storage_container_name":{"type":"string","required":true},"storage_mover_id":{"type":"string","required":true}}}},"azurerm_storage_object_replication":{"block":{"attributes":{"destination_object_replication_id":{"type":"string","computed":true},"destination_storage_account_id":{"type":"string","required":true},"source_object_replication_id":{"type":"string","computed":true},"source_storage_account_id":{"type":"string","required":true}},"block_types":{"rules":{"nesting_mode":4,"block":{"attributes":{"copy_blobs_created_after":{"type":"string","optional":true,"default":"OnlyNewObjects"},"destination_container_name":{"type":"string","required":true},"filter_out_blobs_with_prefix":{"type":["set","string"],"optional":true},"name":{"type":"string","computed":true},"source_container_name":{"type":"string","required":true}}},"required":true}}}},"azurerm_storage_queue":{"block":{"attributes":{"metadata":{"type":["map","string"],"optional":true},"name":{"type":"string","required":true},"resource_manager_id":{"type":"string","computed":true},"storage_account_name":{"type":"string","required":true}}}},"azurerm_storage_share":{"block":{"attributes":{"access_tier":{"type":"string","optional":true,"computed":true},"enabled_protocol":{"type":"string","optional":true,"default":"SMB"},"metadata":{"type":["map","string"],"optional":true,"computed":true},"name":{"type":"string","required":true},"quota":{"type":"number","required":true},"resource_manager_id":{"type":"string","computed":true},"storage_account_name":{"type":"string","required":true},"url":{"type":"string","computed":true}},"block_types":{"acl":{"nesting_mode":4,"block":{"attributes":{"id":{"type":"string","required":true}},"block_types":{"access_policy":{"nesting_mode":3,"block":{"attributes":{"expiry":{"type":"string","optional":true},"permissions":{"type":"string","required":true},"start":{"type":"string","optional":true}}},"optional":true}}},"optional":true}}}},"azurerm_storage_share_directory":{"block":{"attributes":{"metadata":{"type":["map","string"],"optional":true},"name":{"type":"string","required":true},"storage_share_id":{"type":"string","required":true}}}},"azurerm_storage_share_file":{"block":{"attributes":{"content_disposition":{"type":"string","optional":true},"content_encoding":{"type":"string","optional":true},"content_length":{"type":"number","computed":true},"content_md5":{"type":"string","optional":true},"content_type":{"type":"string","optional":true,"default":"application/octet-stream"},"metadata":{"type":["map","string"],"optional":true},"name":{"type":"string","required":true},"path":{"type":"string","optional":true,"default":""},"source":{"type":"string","optional":true},"storage_share_id":{"type":"string","required":true}}}},"azurerm_storage_sync":{"block":{"attributes":{"incoming_traffic_policy":{"type":"string","optional":true,"default":"AllowAllTraffic"},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"registered_servers":{"type":["list","string"],"computed":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_storage_sync_cloud_endpoint":{"block":{"attributes":{"file_share_name":{"type":"string","required":true},"name":{"type":"string","required":true},"storage_account_id":{"type":"string","required":true},"storage_account_tenant_id":{"type":"string","optional":true,"computed":true},"storage_sync_group_id":{"type":"string","required":true}}}},"azurerm_storage_sync_group":{"block":{"attributes":{"name":{"type":"string","required":true},"storage_sync_id":{"type":"string","required":true}}}},"azurerm_storage_sync_server_endpoint":{"block":{"attributes":{"cloud_tiering_enabled":{"type":"bool","optional":true,"default":false},"initial_download_policy":{"type":"string","optional":true,"default":"NamespaceThenModifiedFiles"},"local_cache_mode":{"type":"string","optional":true,"default":"UpdateLocallyCachedFiles"},"name":{"type":"string","required":true},"registered_server_id":{"type":"string","required":true},"server_local_path":{"type":"string","required":true},"storage_sync_group_id":{"type":"string","required":true},"tier_files_older_than_days":{"type":"number","optional":true},"volume_free_space_percent":{"type":"number","optional":true,"default":20}}}},"azurerm_storage_table":{"block":{"attributes":{"name":{"type":"string","required":true},"storage_account_name":{"type":"string","required":true}},"block_types":{"acl":{"nesting_mode":4,"block":{"attributes":{"id":{"type":"string","required":true}},"block_types":{"access_policy":{"nesting_mode":3,"block":{"attributes":{"expiry":{"type":"string","required":true},"permissions":{"type":"string","required":true},"start":{"type":"string","required":true}}},"optional":true}}},"optional":true}}}},"azurerm_storage_table_entity":{"block":{"attributes":{"entity":{"type":["map","string"],"required":true},"partition_key":{"type":"string","required":true},"row_key":{"type":"string","required":true},"storage_table_id":{"type":"string","required":true}}}},"azurerm_stream_analytics_cluster":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"streaming_capacity":{"type":"number","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_stream_analytics_function_javascript_uda":{"block":{"attributes":{"name":{"type":"string","required":true},"script":{"type":"string","required":true},"stream_analytics_job_id":{"type":"string","required":true}},"block_types":{"input":{"nesting_mode":3,"block":{"attributes":{"configuration_parameter":{"type":"bool","optional":true,"default":false},"type":{"type":"string","required":true}}},"required":true},"output":{"nesting_mode":3,"block":{"attributes":{"type":{"type":"string","required":true}}},"required":true}}}},"azurerm_stream_analytics_function_javascript_udf":{"block":{"attributes":{"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"script":{"type":"string","required":true},"stream_analytics_job_name":{"type":"string","required":true}},"block_types":{"input":{"nesting_mode":3,"block":{"attributes":{"configuration_parameter":{"type":"bool","optional":true,"default":false},"type":{"type":"string","required":true}}},"required":true},"output":{"nesting_mode":3,"block":{"attributes":{"type":{"type":"string","required":true}}},"required":true}}}},"azurerm_stream_analytics_job":{"block":{"attributes":{"compatibility_level":{"type":"string","optional":true,"computed":true},"content_storage_policy":{"type":"string","optional":true,"default":"SystemAccount"},"data_locale":{"type":"string","optional":true,"default":"en-US"},"events_late_arrival_max_delay_in_seconds":{"type":"number","optional":true,"default":5},"events_out_of_order_max_delay_in_seconds":{"type":"number","optional":true,"default":0},"events_out_of_order_policy":{"type":"string","optional":true,"default":"Adjust"},"job_id":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"output_error_policy":{"type":"string","optional":true,"default":"Drop"},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","optional":true,"default":"Standard"},"stream_analytics_cluster_id":{"type":"string","optional":true},"streaming_units":{"type":"number","optional":true},"tags":{"type":["map","string"],"optional":true},"transformation_query":{"type":"string","required":true},"type":{"type":"string","optional":true,"default":"Cloud"}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"job_storage_account":{"nesting_mode":3,"block":{"attributes":{"account_key":{"type":"string","required":true},"account_name":{"type":"string","required":true},"authentication_mode":{"type":"string","optional":true,"default":"ConnectionString"}}},"optional":true}}}},"azurerm_stream_analytics_job_schedule":{"block":{"attributes":{"last_output_time":{"type":"string","computed":true},"start_mode":{"type":"string","required":true},"start_time":{"type":"string","optional":true,"computed":true},"stream_analytics_job_id":{"type":"string","required":true}}}},"azurerm_stream_analytics_managed_private_endpoint":{"block":{"attributes":{"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"stream_analytics_cluster_name":{"type":"string","required":true},"subresource_name":{"type":"string","required":true},"target_resource_id":{"type":"string","required":true}}}},"azurerm_stream_analytics_output_blob":{"block":{"attributes":{"authentication_mode":{"type":"string","optional":true,"default":"ConnectionString"},"batch_max_wait_time":{"type":"string","optional":true},"batch_min_rows":{"type":"number","optional":true},"blob_write_mode":{"type":"string","optional":true,"default":"Append"},"date_format":{"type":"string","required":true},"name":{"type":"string","required":true},"path_pattern":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"storage_account_key":{"type":"string","optional":true},"storage_account_name":{"type":"string","required":true},"storage_container_name":{"type":"string","required":true},"stream_analytics_job_name":{"type":"string","required":true},"time_format":{"type":"string","required":true}},"block_types":{"serialization":{"nesting_mode":3,"block":{"attributes":{"encoding":{"type":"string","optional":true},"field_delimiter":{"type":"string","optional":true},"format":{"type":"string","optional":true},"type":{"type":"string","required":true}}},"required":true}}}},"azurerm_stream_analytics_output_cosmosdb":{"block":{"attributes":{"container_name":{"type":"string","required":true},"cosmosdb_account_key":{"type":"string","required":true},"cosmosdb_sql_database_id":{"type":"string","required":true},"document_id":{"type":"string","optional":true},"name":{"type":"string","required":true},"partition_key":{"type":"string","optional":true},"stream_analytics_job_id":{"type":"string","required":true}}}},"azurerm_stream_analytics_output_eventhub":{"block":{"attributes":{"authentication_mode":{"type":"string","optional":true,"default":"ConnectionString"},"eventhub_name":{"type":"string","required":true},"name":{"type":"string","required":true},"partition_key":{"type":"string","optional":true},"property_columns":{"type":["list","string"],"optional":true},"resource_group_name":{"type":"string","required":true},"servicebus_namespace":{"type":"string","required":true},"shared_access_policy_key":{"type":"string","optional":true},"shared_access_policy_name":{"type":"string","optional":true},"stream_analytics_job_name":{"type":"string","required":true}},"block_types":{"serialization":{"nesting_mode":3,"block":{"attributes":{"encoding":{"type":"string","optional":true},"field_delimiter":{"type":"string","optional":true},"format":{"type":"string","optional":true},"type":{"type":"string","required":true}}},"required":true}}}},"azurerm_stream_analytics_output_function":{"block":{"attributes":{"api_key":{"type":"string","required":true},"batch_max_count":{"type":"number","optional":true,"default":100},"batch_max_in_bytes":{"type":"number","optional":true,"default":262144},"function_app":{"type":"string","required":true},"function_name":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"stream_analytics_job_name":{"type":"string","required":true}}}},"azurerm_stream_analytics_output_mssql":{"block":{"attributes":{"authentication_mode":{"type":"string","optional":true,"default":"ConnectionString"},"database":{"type":"string","required":true},"max_batch_count":{"type":"number","optional":true,"default":10000},"max_writer_count":{"type":"number","optional":true,"default":1},"name":{"type":"string","required":true},"password":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"server":{"type":"string","required":true},"stream_analytics_job_name":{"type":"string","required":true},"table":{"type":"string","required":true},"user":{"type":"string","optional":true}}}},"azurerm_stream_analytics_output_powerbi":{"block":{"attributes":{"dataset":{"type":"string","required":true},"group_id":{"type":"string","required":true},"group_name":{"type":"string","required":true},"name":{"type":"string","required":true},"stream_analytics_job_id":{"type":"string","required":true},"table":{"type":"string","required":true},"token_user_display_name":{"type":"string","optional":true},"token_user_principal_name":{"type":"string","optional":true}}}},"azurerm_stream_analytics_output_servicebus_queue":{"block":{"attributes":{"authentication_mode":{"type":"string","optional":true,"default":"ConnectionString"},"name":{"type":"string","required":true},"property_columns":{"type":["list","string"],"optional":true},"queue_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"servicebus_namespace":{"type":"string","required":true},"shared_access_policy_key":{"type":"string","optional":true},"shared_access_policy_name":{"type":"string","optional":true},"stream_analytics_job_name":{"type":"string","required":true},"system_property_columns":{"type":["map","string"],"optional":true}},"block_types":{"serialization":{"nesting_mode":3,"block":{"attributes":{"encoding":{"type":"string","optional":true},"field_delimiter":{"type":"string","optional":true},"format":{"type":"string","optional":true},"type":{"type":"string","required":true}}},"required":true}}}},"azurerm_stream_analytics_output_servicebus_topic":{"block":{"attributes":{"authentication_mode":{"type":"string","optional":true,"default":"ConnectionString"},"name":{"type":"string","required":true},"property_columns":{"type":["list","string"],"optional":true},"resource_group_name":{"type":"string","required":true},"servicebus_namespace":{"type":"string","required":true},"shared_access_policy_key":{"type":"string","optional":true},"shared_access_policy_name":{"type":"string","optional":true},"stream_analytics_job_name":{"type":"string","required":true},"system_property_columns":{"type":["map","string"],"optional":true},"topic_name":{"type":"string","required":true}},"block_types":{"serialization":{"nesting_mode":3,"block":{"attributes":{"encoding":{"type":"string","optional":true},"field_delimiter":{"type":"string","optional":true},"format":{"type":"string","optional":true},"type":{"type":"string","required":true}}},"required":true}}}},"azurerm_stream_analytics_output_synapse":{"block":{"attributes":{"database":{"type":"string","required":true},"name":{"type":"string","required":true},"password":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"server":{"type":"string","required":true},"stream_analytics_job_name":{"type":"string","required":true},"table":{"type":"string","required":true},"user":{"type":"string","required":true}}}},"azurerm_stream_analytics_output_table":{"block":{"attributes":{"batch_size":{"type":"number","required":true},"columns_to_remove":{"type":["list","string"],"optional":true},"name":{"type":"string","required":true},"partition_key":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"row_key":{"type":"string","required":true},"storage_account_key":{"type":"string","required":true},"storage_account_name":{"type":"string","required":true},"stream_analytics_job_name":{"type":"string","required":true},"table":{"type":"string","required":true}}}},"azurerm_stream_analytics_reference_input_blob":{"block":{"attributes":{"authentication_mode":{"type":"string","optional":true,"default":"ConnectionString"},"date_format":{"type":"string","required":true},"name":{"type":"string","required":true},"path_pattern":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"storage_account_key":{"type":"string","optional":true},"storage_account_name":{"type":"string","required":true},"storage_container_name":{"type":"string","required":true},"stream_analytics_job_name":{"type":"string","required":true},"time_format":{"type":"string","required":true}},"block_types":{"serialization":{"nesting_mode":3,"block":{"attributes":{"encoding":{"type":"string","optional":true},"field_delimiter":{"type":"string","optional":true},"type":{"type":"string","required":true}}},"required":true}}}},"azurerm_stream_analytics_reference_input_mssql":{"block":{"attributes":{"database":{"type":"string","required":true},"delta_snapshot_query":{"type":"string","optional":true},"full_snapshot_query":{"type":"string","required":true},"name":{"type":"string","required":true},"password":{"type":"string","required":true},"refresh_interval_duration":{"type":"string","optional":true},"refresh_type":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"server":{"type":"string","required":true},"stream_analytics_job_name":{"type":"string","required":true},"table":{"type":"string","optional":true},"username":{"type":"string","required":true}}}},"azurerm_stream_analytics_stream_input_blob":{"block":{"attributes":{"date_format":{"type":"string","required":true},"name":{"type":"string","required":true},"path_pattern":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"storage_account_key":{"type":"string","required":true},"storage_account_name":{"type":"string","required":true},"storage_container_name":{"type":"string","required":true},"stream_analytics_job_name":{"type":"string","required":true},"time_format":{"type":"string","required":true}},"block_types":{"serialization":{"nesting_mode":3,"block":{"attributes":{"encoding":{"type":"string","optional":true},"field_delimiter":{"type":"string","optional":true},"type":{"type":"string","required":true}}},"required":true}}}},"azurerm_stream_analytics_stream_input_eventhub":{"block":{"attributes":{"authentication_mode":{"type":"string","optional":true,"default":"ConnectionString"},"eventhub_consumer_group_name":{"type":"string","optional":true},"eventhub_name":{"type":"string","required":true},"name":{"type":"string","required":true},"partition_key":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"servicebus_namespace":{"type":"string","required":true},"shared_access_policy_key":{"type":"string","optional":true},"shared_access_policy_name":{"type":"string","optional":true},"stream_analytics_job_name":{"type":"string","required":true}},"block_types":{"serialization":{"nesting_mode":3,"block":{"attributes":{"encoding":{"type":"string","optional":true},"field_delimiter":{"type":"string","optional":true},"type":{"type":"string","required":true}}},"required":true}}}},"azurerm_stream_analytics_stream_input_eventhub_v2":{"block":{"attributes":{"authentication_mode":{"type":"string","optional":true,"default":"ConnectionString"},"eventhub_consumer_group_name":{"type":"string","optional":true},"eventhub_name":{"type":"string","required":true},"name":{"type":"string","required":true},"partition_key":{"type":"string","optional":true},"servicebus_namespace":{"type":"string","required":true},"shared_access_policy_key":{"type":"string","optional":true},"shared_access_policy_name":{"type":"string","optional":true},"stream_analytics_job_id":{"type":"string","required":true}},"block_types":{"serialization":{"nesting_mode":3,"block":{"attributes":{"encoding":{"type":"string","optional":true},"field_delimiter":{"type":"string","optional":true},"type":{"type":"string","required":true}}},"required":true}}}},"azurerm_stream_analytics_stream_input_iothub":{"block":{"attributes":{"endpoint":{"type":"string","required":true},"eventhub_consumer_group_name":{"type":"string","required":true},"iothub_namespace":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"shared_access_policy_key":{"type":"string","required":true},"shared_access_policy_name":{"type":"string","required":true},"stream_analytics_job_name":{"type":"string","required":true}},"block_types":{"serialization":{"nesting_mode":3,"block":{"attributes":{"encoding":{"type":"string","optional":true},"field_delimiter":{"type":"string","optional":true},"type":{"type":"string","required":true}}},"required":true}}}},"azurerm_subnet":{"block":{"attributes":{"address_prefixes":{"type":["list","string"],"required":true},"default_outbound_access_enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"private_endpoint_network_policies":{"type":"string","optional":true,"default":"Disabled"},"private_link_service_network_policies_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"service_endpoint_policy_ids":{"type":["set","string"],"optional":true},"service_endpoints":{"type":["set","string"],"optional":true},"virtual_network_name":{"type":"string","required":true}},"block_types":{"delegation":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true}},"block_types":{"service_delegation":{"nesting_mode":3,"block":{"attributes":{"actions":{"type":["set","string"],"optional":true},"name":{"type":"string","required":true}}},"required":true}}},"optional":true}}}},"azurerm_subnet_nat_gateway_association":{"block":{"attributes":{"nat_gateway_id":{"type":"string","required":true},"subnet_id":{"type":"string","required":true}}}},"azurerm_subnet_network_security_group_association":{"block":{"attributes":{"network_security_group_id":{"type":"string","required":true},"subnet_id":{"type":"string","required":true}}}},"azurerm_subnet_route_table_association":{"block":{"attributes":{"route_table_id":{"type":"string","required":true},"subnet_id":{"type":"string","required":true}}}},"azurerm_subnet_service_endpoint_storage_policy":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"definition":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"service":{"type":"string","optional":true,"default":"Microsoft.Storage"},"service_resources":{"type":["set","string"],"required":true}}},"optional":true}}}},"azurerm_subscription":{"block":{"attributes":{"alias":{"type":"string","optional":true,"computed":true},"billing_scope_id":{"type":"string","optional":true,"exactly_one_of":["subscription_id","billing_scope_id"]},"subscription_id":{"type":"string","optional":true,"computed":true,"exactly_one_of":["subscription_id","billing_scope_id"]},"subscription_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"tenant_id":{"type":"string","computed":true},"workload":{"type":"string","optional":true}}}},"azurerm_subscription_cost_management_export":{"block":{"attributes":{"active":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"recurrence_period_end_date":{"type":"string","required":true},"recurrence_period_start_date":{"type":"string","required":true},"recurrence_type":{"type":"string","required":true},"subscription_id":{"type":"string","required":true}},"block_types":{"export_data_options":{"nesting_mode":3,"block":{"attributes":{"time_frame":{"type":"string","required":true},"type":{"type":"string","required":true}}},"required":true},"export_data_storage_location":{"nesting_mode":3,"block":{"attributes":{"container_id":{"type":"string","required":true},"root_folder_path":{"type":"string","required":true}}},"required":true}}}},"azurerm_subscription_cost_management_view":{"block":{"attributes":{"accumulated":{"type":"bool","required":true},"chart_type":{"type":"string","required":true},"display_name":{"type":"string","required":true},"name":{"type":"string","required":true},"report_type":{"type":"string","required":true},"subscription_id":{"type":"string","required":true},"timeframe":{"type":"string","required":true}},"block_types":{"dataset":{"nesting_mode":3,"block":{"attributes":{"granularity":{"type":"string","required":true}},"block_types":{"aggregation":{"nesting_mode":4,"block":{"attributes":{"column_name":{"type":"string","required":true},"name":{"type":"string","required":true}}},"required":true},"grouping":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"type":{"type":"string","required":true}}},"optional":true},"sorting":{"nesting_mode":3,"block":{"attributes":{"direction":{"type":"string","required":true},"name":{"type":"string","required":true}}},"optional":true}}},"required":true},"kpi":{"nesting_mode":3,"block":{"attributes":{"type":{"type":"string","required":true}}},"optional":true},"pivot":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_subscription_policy_assignment":{"block":{"attributes":{"description":{"type":"string","optional":true},"display_name":{"type":"string","optional":true},"enforce":{"type":"bool","optional":true,"default":true},"location":{"type":"string","optional":true},"metadata":{"type":"string","optional":true,"computed":true},"name":{"type":"string","required":true},"not_scopes":{"type":["list","string"],"optional":true},"parameters":{"type":"string","optional":true},"policy_definition_id":{"type":"string","required":true},"subscription_id":{"type":"string","required":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"non_compliance_message":{"nesting_mode":3,"block":{"attributes":{"content":{"type":"string","required":true},"policy_definition_reference_id":{"type":"string","optional":true}}},"optional":true},"overrides":{"nesting_mode":3,"block":{"attributes":{"value":{"type":"string","required":true}},"block_types":{"selectors":{"nesting_mode":3,"block":{"attributes":{"in":{"type":["list","string"],"optional":true},"kind":{"type":"string","computed":true},"not_in":{"type":["list","string"],"optional":true}}},"optional":true}}},"optional":true},"resource_selectors":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","optional":true}},"block_types":{"selectors":{"nesting_mode":3,"block":{"attributes":{"in":{"type":["list","string"],"optional":true},"kind":{"type":"string","required":true},"not_in":{"type":["list","string"],"optional":true}}},"required":true}}},"optional":true}}}},"azurerm_subscription_policy_exemption":{"block":{"attributes":{"description":{"type":"string","optional":true},"display_name":{"type":"string","optional":true},"exemption_category":{"type":"string","required":true},"expires_on":{"type":"string","optional":true},"metadata":{"type":"string","optional":true,"computed":true},"name":{"type":"string","required":true},"policy_assignment_id":{"type":"string","required":true},"policy_definition_reference_ids":{"type":["list","string"],"optional":true},"subscription_id":{"type":"string","required":true}}}},"azurerm_subscription_policy_remediation":{"block":{"attributes":{"failure_percentage":{"type":"number","optional":true},"location_filters":{"type":["list","string"],"optional":true},"name":{"type":"string","required":true},"parallel_deployments":{"type":"number","optional":true},"policy_assignment_id":{"type":"string","required":true},"policy_definition_reference_id":{"type":"string","optional":true},"resource_count":{"type":"number","optional":true},"resource_discovery_mode":{"type":"string","optional":true,"default":"ExistingNonCompliant"},"subscription_id":{"type":"string","required":true}}}},"azurerm_subscription_template_deployment":{"block":{"attributes":{"debug_level":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"output_content":{"type":"string","computed":true},"parameters_content":{"type":"string","optional":true,"computed":true},"tags":{"type":["map","string"],"optional":true},"template_content":{"type":"string","optional":true,"computed":true,"exactly_one_of":["template_content","template_spec_version_id"]},"template_spec_version_id":{"type":"string","optional":true,"exactly_one_of":["template_content","template_spec_version_id"]}}}},"azurerm_synapse_firewall_rule":{"block":{"attributes":{"end_ip_address":{"type":"string","required":true},"name":{"type":"string","required":true},"start_ip_address":{"type":"string","required":true},"synapse_workspace_id":{"type":"string","required":true}}}},"azurerm_synapse_integration_runtime_azure":{"block":{"attributes":{"compute_type":{"type":"string","optional":true,"default":"General"},"core_count":{"type":"number","optional":true,"default":8},"description":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"synapse_workspace_id":{"type":"string","required":true},"time_to_live_min":{"type":"number","optional":true,"default":0}}}},"azurerm_synapse_integration_runtime_self_hosted":{"block":{"attributes":{"authorization_key_primary":{"type":"string","computed":true},"authorization_key_secondary":{"type":"string","computed":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"synapse_workspace_id":{"type":"string","required":true}}}},"azurerm_synapse_linked_service":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"synapse_workspace_id":{"type":"string","required":true},"type":{"type":"string","required":true},"type_properties_json":{"type":"string","required":true}},"block_types":{"integration_runtime":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true}}}},"azurerm_synapse_managed_private_endpoint":{"block":{"attributes":{"name":{"type":"string","required":true},"subresource_name":{"type":"string","required":true},"synapse_workspace_id":{"type":"string","required":true},"target_resource_id":{"type":"string","required":true}}}},"azurerm_synapse_private_link_hub":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_synapse_role_assignment":{"block":{"attributes":{"principal_id":{"type":"string","required":true},"principal_type":{"type":"string","optional":true},"role_name":{"type":"string","required":true},"synapse_spark_pool_id":{"type":"string","optional":true,"exactly_one_of":["synapse_workspace_id","synapse_spark_pool_id"]},"synapse_workspace_id":{"type":"string","optional":true,"exactly_one_of":["synapse_workspace_id","synapse_spark_pool_id"]}}}},"azurerm_synapse_spark_pool":{"block":{"attributes":{"cache_size":{"type":"number","optional":true},"compute_isolation_enabled":{"type":"bool","optional":true,"default":false},"dynamic_executor_allocation_enabled":{"type":"bool","optional":true,"default":false},"max_executors":{"type":"number","optional":true},"min_executors":{"type":"number","optional":true},"name":{"type":"string","required":true},"node_count":{"type":"number","optional":true,"computed":true,"exactly_one_of":["node_count","auto_scale"]},"node_size":{"type":"string","required":true},"node_size_family":{"type":"string","required":true},"session_level_packages_enabled":{"type":"bool","optional":true,"default":false},"spark_events_folder":{"type":"string","optional":true,"default":"/events"},"spark_log_folder":{"type":"string","optional":true,"default":"/logs"},"spark_version":{"type":"string","required":true},"synapse_workspace_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"auto_pause":{"nesting_mode":3,"block":{"attributes":{"delay_in_minutes":{"type":"number","required":true}}},"optional":true},"auto_scale":{"nesting_mode":3,"block":{"attributes":{"max_node_count":{"type":"number","required":true},"min_node_count":{"type":"number","required":true}}},"optional":true,"exactly_one_of":["node_count","auto_scale"]},"library_requirement":{"nesting_mode":3,"block":{"attributes":{"content":{"type":"string","required":true},"filename":{"type":"string","required":true}}},"optional":true},"spark_config":{"nesting_mode":3,"block":{"attributes":{"content":{"type":"string","required":true},"filename":{"type":"string","required":true}}},"optional":true}}}},"azurerm_synapse_sql_pool":{"block":{"attributes":{"collation":{"type":"string","optional":true,"computed":true},"create_mode":{"type":"string","optional":true,"default":"Default"},"data_encrypted":{"type":"bool","optional":true},"geo_backup_policy_enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"recovery_database_id":{"type":"string","optional":true,"conflicts_with":["restore"]},"sku_name":{"type":"string","required":true},"storage_account_type":{"type":"string","required":true},"synapse_workspace_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"restore":{"nesting_mode":3,"block":{"attributes":{"point_in_time":{"type":"string","required":true},"source_database_id":{"type":"string","required":true}}},"optional":true,"conflicts_with":["recovery_database_id"]}}}},"azurerm_synapse_sql_pool_extended_auditing_policy":{"block":{"attributes":{"log_monitoring_enabled":{"type":"bool","optional":true,"default":true},"retention_in_days":{"type":"number","optional":true,"default":0},"sql_pool_id":{"type":"string","required":true},"storage_account_access_key":{"type":"string","optional":true},"storage_account_access_key_is_secondary":{"type":"bool","optional":true,"default":false},"storage_endpoint":{"type":"string","optional":true}}}},"azurerm_synapse_sql_pool_security_alert_policy":{"block":{"attributes":{"disabled_alerts":{"type":["set","string"],"optional":true},"email_account_admins_enabled":{"type":"bool","optional":true,"default":false},"email_addresses":{"type":["set","string"],"optional":true},"policy_state":{"type":"string","required":true},"retention_days":{"type":"number","optional":true,"default":0},"sql_pool_id":{"type":"string","required":true},"storage_account_access_key":{"type":"string","optional":true},"storage_endpoint":{"type":"string","optional":true}}}},"azurerm_synapse_sql_pool_vulnerability_assessment":{"block":{"attributes":{"sql_pool_security_alert_policy_id":{"type":"string","required":true},"storage_account_access_key":{"type":"string","optional":true},"storage_container_path":{"type":"string","required":true},"storage_container_sas_key":{"type":"string","optional":true}},"block_types":{"recurring_scans":{"nesting_mode":3,"block":{"attributes":{"email_subscription_admins_enabled":{"type":"bool","optional":true,"default":true},"emails":{"type":["list","string"],"optional":true},"enabled":{"type":"bool","optional":true,"default":false}}},"optional":true,"computed":true}}}},"azurerm_synapse_sql_pool_vulnerability_assessment_baseline":{"block":{"attributes":{"name":{"type":"string","required":true},"rule_name":{"type":"string","required":true},"sql_pool_vulnerability_assessment_id":{"type":"string","required":true}},"block_types":{"baseline":{"nesting_mode":3,"block":{"attributes":{"result":{"type":["list","string"],"required":true}}},"optional":true}}}},"azurerm_synapse_sql_pool_workload_classifier":{"block":{"attributes":{"context":{"type":"string","optional":true},"end_time":{"type":"string","optional":true},"importance":{"type":"string","optional":true},"label":{"type":"string","optional":true},"member_name":{"type":"string","required":true},"name":{"type":"string","required":true},"start_time":{"type":"string","optional":true},"workload_group_id":{"type":"string","required":true}}}},"azurerm_synapse_sql_pool_workload_group":{"block":{"attributes":{"importance":{"type":"string","optional":true,"default":"normal"},"max_resource_percent":{"type":"number","required":true},"max_resource_percent_per_request":{"type":"number","optional":true,"default":3},"min_resource_percent":{"type":"number","required":true},"min_resource_percent_per_request":{"type":"number","optional":true},"name":{"type":"string","required":true},"query_execution_timeout_in_seconds":{"type":"number","optional":true},"sql_pool_id":{"type":"string","required":true}}}},"azurerm_synapse_workspace":{"block":{"attributes":{"azuread_authentication_only":{"type":"bool","optional":true,"default":false},"compute_subnet_id":{"type":"string","optional":true},"connectivity_endpoints":{"type":["map","string"],"computed":true},"data_exfiltration_protection_enabled":{"type":"bool","optional":true},"linking_allowed_for_aad_tenant_ids":{"type":["list","string"],"optional":true},"location":{"type":"string","required":true},"managed_resource_group_name":{"type":"string","optional":true,"computed":true},"managed_virtual_network_enabled":{"type":"bool","optional":true},"name":{"type":"string","required":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"purview_id":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"sql_administrator_login":{"type":"string","optional":true},"sql_administrator_login_password":{"type":"string","optional":true},"sql_identity_control_enabled":{"type":"bool","optional":true},"storage_data_lake_gen2_filesystem_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"azure_devops_repo":{"nesting_mode":3,"block":{"attributes":{"account_name":{"type":"string","required":true},"branch_name":{"type":"string","required":true},"last_commit_id":{"type":"string","optional":true},"project_name":{"type":"string","required":true},"repository_name":{"type":"string","required":true},"root_folder":{"type":"string","required":true},"tenant_id":{"type":"string","optional":true,"computed":true}}},"optional":true,"conflicts_with":["github_repo"]},"customer_managed_key":{"nesting_mode":3,"block":{"attributes":{"key_name":{"type":"string","optional":true,"default":"cmk"},"key_versionless_id":{"type":"string","required":true},"user_assigned_identity_id":{"type":"string","optional":true}}},"optional":true},"github_repo":{"nesting_mode":3,"block":{"attributes":{"account_name":{"type":"string","required":true},"branch_name":{"type":"string","required":true},"git_url":{"type":"string","optional":true},"last_commit_id":{"type":"string","optional":true},"repository_name":{"type":"string","required":true},"root_folder":{"type":"string","required":true}}},"optional":true,"conflicts_with":["azure_devops_repo"]},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_synapse_workspace_aad_admin":{"block":{"attributes":{"login":{"type":"string","required":true},"object_id":{"type":"string","required":true},"synapse_workspace_id":{"type":"string","required":true},"tenant_id":{"type":"string","required":true}}}},"azurerm_synapse_workspace_extended_auditing_policy":{"block":{"attributes":{"log_monitoring_enabled":{"type":"bool","optional":true,"default":true},"retention_in_days":{"type":"number","optional":true,"default":0},"storage_account_access_key":{"type":"string","optional":true},"storage_account_access_key_is_secondary":{"type":"bool","optional":true,"default":false},"storage_endpoint":{"type":"string","optional":true},"synapse_workspace_id":{"type":"string","required":true}}}},"azurerm_synapse_workspace_key":{"block":{"attributes":{"active":{"type":"bool","required":true},"customer_managed_key_name":{"type":"string","required":true},"customer_managed_key_versionless_id":{"type":"string","optional":true},"synapse_workspace_id":{"type":"string","required":true}}}},"azurerm_synapse_workspace_security_alert_policy":{"block":{"attributes":{"disabled_alerts":{"type":["set","string"],"optional":true},"email_account_admins_enabled":{"type":"bool","optional":true,"default":false},"email_addresses":{"type":["set","string"],"optional":true},"policy_state":{"type":"string","required":true},"retention_days":{"type":"number","optional":true,"default":0},"storage_account_access_key":{"type":"string","optional":true},"storage_endpoint":{"type":"string","optional":true},"synapse_workspace_id":{"type":"string","required":true}}}},"azurerm_synapse_workspace_sql_aad_admin":{"block":{"attributes":{"login":{"type":"string","required":true},"object_id":{"type":"string","required":true},"synapse_workspace_id":{"type":"string","required":true},"tenant_id":{"type":"string","required":true}}}},"azurerm_synapse_workspace_vulnerability_assessment":{"block":{"attributes":{"storage_account_access_key":{"type":"string","optional":true},"storage_container_path":{"type":"string","required":true},"storage_container_sas_key":{"type":"string","optional":true},"workspace_security_alert_policy_id":{"type":"string","required":true}},"block_types":{"recurring_scans":{"nesting_mode":3,"block":{"attributes":{"email_subscription_admins_enabled":{"type":"bool","optional":true,"default":true},"emails":{"type":["list","string"],"optional":true},"enabled":{"type":"bool","optional":true,"default":false}}},"optional":true,"computed":true}}}},"azurerm_system_center_virtual_machine_manager_availability_set":{"block":{"attributes":{"custom_location_id":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"system_center_virtual_machine_manager_server_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_system_center_virtual_machine_manager_cloud":{"block":{"attributes":{"custom_location_id":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"system_center_virtual_machine_manager_server_inventory_item_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_system_center_virtual_machine_manager_server":{"block":{"attributes":{"custom_location_id":{"type":"string","required":true},"fqdn":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"password":{"type":"string","required":true},"port":{"type":"number","optional":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"username":{"type":"string","required":true}}}},"azurerm_system_center_virtual_machine_manager_virtual_machine_template":{"block":{"attributes":{"custom_location_id":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"system_center_virtual_machine_manager_server_inventory_item_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_system_center_virtual_machine_manager_virtual_network":{"block":{"attributes":{"custom_location_id":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"system_center_virtual_machine_manager_server_inventory_item_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_tenant_template_deployment":{"block":{"attributes":{"debug_level":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"output_content":{"type":"string","computed":true},"parameters_content":{"type":"string","optional":true,"computed":true},"tags":{"type":["map","string"],"optional":true},"template_content":{"type":"string","optional":true,"computed":true,"exactly_one_of":["template_content","template_spec_version_id"]},"template_spec_version_id":{"type":"string","optional":true,"exactly_one_of":["template_content","template_spec_version_id"]}}}},"azurerm_traffic_manager_azure_endpoint":{"block":{"attributes":{"always_serve_enabled":{"type":"bool","optional":true,"default":false},"enabled":{"type":"bool","optional":true,"default":true},"geo_mappings":{"type":["list","string"],"optional":true},"name":{"type":"string","required":true},"priority":{"type":"number","optional":true,"default":1},"profile_id":{"type":"string","required":true},"target_resource_id":{"type":"string","required":true},"weight":{"type":"number","optional":true,"default":1}},"block_types":{"custom_header":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"subnet":{"nesting_mode":3,"block":{"attributes":{"first":{"type":"string","required":true},"last":{"type":"string","optional":true},"scope":{"type":"number","optional":true}}},"optional":true}}}},"azurerm_traffic_manager_external_endpoint":{"block":{"attributes":{"always_serve_enabled":{"type":"bool","optional":true,"default":false},"enabled":{"type":"bool","optional":true,"default":true},"endpoint_location":{"type":"string","optional":true,"computed":true},"geo_mappings":{"type":["list","string"],"optional":true},"name":{"type":"string","required":true},"priority":{"type":"number","optional":true,"default":1},"profile_id":{"type":"string","required":true},"target":{"type":"string","required":true},"weight":{"type":"number","optional":true,"default":1}},"block_types":{"custom_header":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"subnet":{"nesting_mode":3,"block":{"attributes":{"first":{"type":"string","required":true},"last":{"type":"string","optional":true},"scope":{"type":"number","optional":true}}},"optional":true}}}},"azurerm_traffic_manager_nested_endpoint":{"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"endpoint_location":{"type":"string","optional":true,"computed":true},"geo_mappings":{"type":["list","string"],"optional":true},"minimum_child_endpoints":{"type":"number","required":true},"minimum_required_child_endpoints_ipv4":{"type":"number","optional":true},"minimum_required_child_endpoints_ipv6":{"type":"number","optional":true},"name":{"type":"string","required":true},"priority":{"type":"number","optional":true,"default":1},"profile_id":{"type":"string","required":true},"target_resource_id":{"type":"string","required":true},"weight":{"type":"number","optional":true,"default":1}},"block_types":{"custom_header":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"subnet":{"nesting_mode":3,"block":{"attributes":{"first":{"type":"string","required":true},"last":{"type":"string","optional":true},"scope":{"type":"number","optional":true}}},"optional":true}}}},"azurerm_traffic_manager_profile":{"block":{"attributes":{"fqdn":{"type":"string","computed":true},"max_return":{"type":"number","optional":true},"name":{"type":"string","required":true},"profile_status":{"type":"string","optional":true,"default":"Enabled"},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"traffic_routing_method":{"type":"string","required":true},"traffic_view_enabled":{"type":"bool","optional":true}},"block_types":{"dns_config":{"nesting_mode":3,"block":{"attributes":{"relative_name":{"type":"string","required":true},"ttl":{"type":"number","required":true}}},"required":true},"monitor_config":{"nesting_mode":3,"block":{"attributes":{"expected_status_code_ranges":{"type":["list","string"],"optional":true},"interval_in_seconds":{"type":"number","optional":true,"default":30},"path":{"type":"string","optional":true},"port":{"type":"number","required":true},"protocol":{"type":"string","required":true},"timeout_in_seconds":{"type":"number","optional":true,"default":10},"tolerated_number_of_failures":{"type":"number","optional":true,"default":3}},"block_types":{"custom_header":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"required":true}}}},"azurerm_user_assigned_identity":{"block":{"attributes":{"client_id":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"principal_id":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"tenant_id":{"type":"string","computed":true}}}},"azurerm_virtual_desktop_application":{"block":{"attributes":{"application_group_id":{"type":"string","required":true},"command_line_argument_policy":{"type":"string","required":true},"command_line_arguments":{"type":"string","optional":true},"description":{"type":"string","optional":true},"friendly_name":{"type":"string","optional":true,"computed":true},"icon_index":{"type":"number","optional":true},"icon_path":{"type":"string","optional":true,"computed":true},"name":{"type":"string","required":true},"path":{"type":"string","required":true},"show_in_portal":{"type":"bool","optional":true}}}},"azurerm_virtual_desktop_application_group":{"block":{"attributes":{"default_desktop_display_name":{"type":"string","optional":true},"description":{"type":"string","optional":true},"friendly_name":{"type":"string","optional":true},"host_pool_id":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"type":{"type":"string","required":true}}}},"azurerm_virtual_desktop_host_pool":{"block":{"attributes":{"custom_rdp_properties":{"type":"string","optional":true},"description":{"type":"string","optional":true},"friendly_name":{"type":"string","optional":true},"load_balancer_type":{"type":"string","required":true},"location":{"type":"string","required":true},"maximum_sessions_allowed":{"type":"number","optional":true,"default":999999},"name":{"type":"string","required":true},"personal_desktop_assignment_type":{"type":"string","optional":true},"preferred_app_group_type":{"type":"string","optional":true,"default":"Desktop"},"public_network_access":{"type":"string","optional":true,"default":"Enabled"},"resource_group_name":{"type":"string","required":true},"start_vm_on_connect":{"type":"bool","optional":true,"default":false},"tags":{"type":["map","string"],"optional":true},"type":{"type":"string","required":true},"validate_environment":{"type":"bool","optional":true,"default":false},"vm_template":{"type":"string","optional":true}},"block_types":{"scheduled_agent_updates":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":false},"timezone":{"type":"string","optional":true,"default":"UTC"},"use_session_host_timezone":{"type":"bool","optional":true,"default":false}},"block_types":{"schedule":{"nesting_mode":3,"block":{"attributes":{"day_of_week":{"type":"string","required":true},"hour_of_day":{"type":"number","required":true}}},"optional":true}}},"optional":true}}}},"azurerm_virtual_desktop_host_pool_registration_info":{"block":{"attributes":{"expiration_date":{"type":"string","required":true},"hostpool_id":{"type":"string","required":true},"token":{"type":"string","computed":true}}}},"azurerm_virtual_desktop_scaling_plan":{"block":{"attributes":{"description":{"type":"string","optional":true},"exclusion_tag":{"type":"string","optional":true},"friendly_name":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"time_zone":{"type":"string","required":true}},"block_types":{"host_pool":{"nesting_mode":3,"block":{"attributes":{"hostpool_id":{"type":"string","required":true},"scaling_plan_enabled":{"type":"bool","required":true}}},"optional":true,"computed":true},"schedule":{"nesting_mode":3,"block":{"attributes":{"days_of_week":{"type":["set","string"],"required":true},"name":{"type":"string","required":true},"off_peak_load_balancing_algorithm":{"type":"string","required":true},"off_peak_start_time":{"type":"string","required":true},"peak_load_balancing_algorithm":{"type":"string","required":true},"peak_start_time":{"type":"string","required":true},"ramp_down_capacity_threshold_percent":{"type":"number","required":true},"ramp_down_force_logoff_users":{"type":"bool","required":true},"ramp_down_load_balancing_algorithm":{"type":"string","required":true},"ramp_down_minimum_hosts_percent":{"type":"number","required":true},"ramp_down_notification_message":{"type":"string","required":true},"ramp_down_start_time":{"type":"string","required":true},"ramp_down_stop_hosts_when":{"type":"string","required":true},"ramp_down_wait_time_minutes":{"type":"number","required":true},"ramp_up_capacity_threshold_percent":{"type":"number","optional":true},"ramp_up_load_balancing_algorithm":{"type":"string","required":true},"ramp_up_minimum_hosts_percent":{"type":"number","optional":true},"ramp_up_start_time":{"type":"string","required":true}}},"required":true}}}},"azurerm_virtual_desktop_scaling_plan_host_pool_association":{"block":{"attributes":{"enabled":{"type":"bool","required":true},"host_pool_id":{"type":"string","required":true},"scaling_plan_id":{"type":"string","required":true}}}},"azurerm_virtual_desktop_workspace":{"block":{"attributes":{"description":{"type":"string","optional":true},"friendly_name":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_virtual_desktop_workspace_application_group_association":{"block":{"attributes":{"application_group_id":{"type":"string","required":true},"workspace_id":{"type":"string","required":true}}}},"azurerm_virtual_hub":{"block":{"attributes":{"address_prefix":{"type":"string","optional":true},"default_route_table_id":{"type":"string","computed":true},"hub_routing_preference":{"type":"string","optional":true,"default":"ExpressRoute"},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"sku":{"type":"string","optional":true},"tags":{"type":["map","string"],"optional":true},"virtual_router_asn":{"type":"number","computed":true},"virtual_router_auto_scale_min_capacity":{"type":"number","optional":true,"default":2},"virtual_router_ips":{"type":["list","string"],"computed":true},"virtual_wan_id":{"type":"string","optional":true}},"block_types":{"route":{"nesting_mode":4,"block":{"attributes":{"address_prefixes":{"type":["list","string"],"required":true},"next_hop_ip_address":{"type":"string","required":true}}},"optional":true}}}},"azurerm_virtual_hub_bgp_connection":{"block":{"attributes":{"name":{"type":"string","required":true},"peer_asn":{"type":"number","required":true},"peer_ip":{"type":"string","required":true},"virtual_hub_id":{"type":"string","required":true},"virtual_network_connection_id":{"type":"string","optional":true}}}},"azurerm_virtual_hub_connection":{"block":{"attributes":{"internet_security_enabled":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"remote_virtual_network_id":{"type":"string","required":true},"virtual_hub_id":{"type":"string","required":true}},"block_types":{"routing":{"nesting_mode":3,"block":{"attributes":{"associated_route_table_id":{"type":"string","optional":true,"computed":true,"at_least_one_of":["routing.0.associated_route_table_id","routing.0.propagated_route_table","routing.0.static_vnet_route"]},"inbound_route_map_id":{"type":"string","optional":true},"outbound_route_map_id":{"type":"string","optional":true},"static_vnet_local_route_override_criteria":{"type":"string","optional":true,"default":"Contains"}},"block_types":{"propagated_route_table":{"nesting_mode":3,"block":{"attributes":{"labels":{"type":["set","string"],"optional":true,"computed":true,"at_least_one_of":["routing.0.propagated_route_table.0.labels","routing.0.propagated_route_table.0.route_table_ids"]},"route_table_ids":{"type":["list","string"],"optional":true,"computed":true,"at_least_one_of":["routing.0.propagated_route_table.0.labels","routing.0.propagated_route_table.0.route_table_ids"]}}},"optional":true,"computed":true,"at_least_one_of":["routing.0.associated_route_table_id","routing.0.propagated_route_table","routing.0.static_vnet_route"]},"static_vnet_route":{"nesting_mode":3,"block":{"attributes":{"address_prefixes":{"type":["set","string"],"optional":true},"name":{"type":"string","optional":true},"next_hop_ip_address":{"type":"string","optional":true}}},"optional":true,"at_least_one_of":["routing.0.associated_route_table_id","routing.0.propagated_route_table","routing.0.static_vnet_route"]}}},"optional":true,"computed":true}}}},"azurerm_virtual_hub_ip":{"block":{"attributes":{"name":{"type":"string","required":true},"private_ip_address":{"type":"string","optional":true},"private_ip_allocation_method":{"type":"string","optional":true,"default":"Dynamic"},"public_ip_address_id":{"type":"string","required":true},"subnet_id":{"type":"string","required":true},"virtual_hub_id":{"type":"string","required":true}}}},"azurerm_virtual_hub_route_table":{"block":{"attributes":{"labels":{"type":["set","string"],"optional":true},"name":{"type":"string","required":true},"virtual_hub_id":{"type":"string","required":true}},"block_types":{"route":{"nesting_mode":4,"block":{"attributes":{"destinations":{"type":["set","string"],"required":true},"destinations_type":{"type":"string","required":true},"name":{"type":"string","required":true},"next_hop":{"type":"string","required":true},"next_hop_type":{"type":"string","optional":true,"default":"ResourceId"}}},"optional":true,"computed":true}}}},"azurerm_virtual_hub_route_table_route":{"block":{"attributes":{"destinations":{"type":["set","string"],"required":true},"destinations_type":{"type":"string","required":true},"name":{"type":"string","required":true},"next_hop":{"type":"string","required":true},"next_hop_type":{"type":"string","optional":true,"default":"ResourceId"},"route_table_id":{"type":"string","required":true}}}},"azurerm_virtual_hub_routing_intent":{"block":{"attributes":{"name":{"type":"string","required":true},"virtual_hub_id":{"type":"string","required":true}},"block_types":{"routing_policy":{"nesting_mode":3,"block":{"attributes":{"destinations":{"type":["list","string"],"required":true},"name":{"type":"string","required":true},"next_hop":{"type":"string","required":true}}},"required":true}}}},"azurerm_virtual_hub_security_partner_provider":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"security_provider_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"virtual_hub_id":{"type":"string","optional":true}}}},"azurerm_virtual_machine":{"block":{"attributes":{"availability_set_id":{"type":"string","optional":true,"computed":true,"conflicts_with":["zones"]},"delete_data_disks_on_termination":{"type":"bool","optional":true,"default":false},"delete_os_disk_on_termination":{"type":"bool","optional":true,"default":false},"license_type":{"type":"string","optional":true,"computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"network_interface_ids":{"type":["list","string"],"required":true},"primary_network_interface_id":{"type":"string","optional":true},"proximity_placement_group_id":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"vm_size":{"type":"string","required":true},"zones":{"type":["list","string"],"optional":true}},"block_types":{"additional_capabilities":{"nesting_mode":3,"block":{"attributes":{"ultra_ssd_enabled":{"type":"bool","required":true}}},"optional":true},"boot_diagnostics":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","required":true},"storage_uri":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"os_profile":{"nesting_mode":4,"block":{"attributes":{"admin_password":{"type":"string","optional":true},"admin_username":{"type":"string","required":true},"computer_name":{"type":"string","required":true},"custom_data":{"type":"string","optional":true,"computed":true}}},"optional":true},"os_profile_linux_config":{"nesting_mode":4,"block":{"attributes":{"disable_password_authentication":{"type":"bool","required":true}},"block_types":{"ssh_keys":{"nesting_mode":3,"block":{"attributes":{"key_data":{"type":"string","required":true},"path":{"type":"string","required":true}}},"optional":true}}},"optional":true,"conflicts_with":["os_profile_windows_config"]},"os_profile_secrets":{"nesting_mode":3,"block":{"attributes":{"source_vault_id":{"type":"string","required":true}},"block_types":{"vault_certificates":{"nesting_mode":3,"block":{"attributes":{"certificate_store":{"type":"string","optional":true},"certificate_url":{"type":"string","required":true}}},"optional":true}}},"optional":true},"os_profile_windows_config":{"nesting_mode":4,"block":{"attributes":{"enable_automatic_upgrades":{"type":"bool","optional":true,"default":false},"provision_vm_agent":{"type":"bool","optional":true,"default":false},"timezone":{"type":"string","optional":true}},"block_types":{"additional_unattend_config":{"nesting_mode":3,"block":{"attributes":{"component":{"type":"string","required":true},"content":{"type":"string","required":true},"pass":{"type":"string","required":true},"setting_name":{"type":"string","required":true}}},"optional":true},"winrm":{"nesting_mode":3,"block":{"attributes":{"certificate_url":{"type":"string","optional":true},"protocol":{"type":"string","required":true}}},"optional":true}}},"optional":true,"conflicts_with":["os_profile_linux_config"]},"plan":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"product":{"type":"string","required":true},"publisher":{"type":"string","required":true}}},"optional":true},"storage_data_disk":{"nesting_mode":3,"block":{"attributes":{"caching":{"type":"string","optional":true,"computed":true},"create_option":{"type":"string","required":true},"disk_size_gb":{"type":"number","optional":true,"computed":true},"lun":{"type":"number","required":true},"managed_disk_id":{"type":"string","optional":true,"computed":true},"managed_disk_type":{"type":"string","optional":true,"computed":true},"name":{"type":"string","required":true},"vhd_uri":{"type":"string","optional":true},"write_accelerator_enabled":{"type":"bool","optional":true,"default":false}}},"optional":true,"computed":true},"storage_image_reference":{"nesting_mode":4,"block":{"attributes":{"id":{"type":"string","optional":true},"offer":{"type":"string","optional":true},"publisher":{"type":"string","optional":true},"sku":{"type":"string","optional":true},"version":{"type":"string","optional":true,"computed":true}}},"optional":true,"computed":true},"storage_os_disk":{"nesting_mode":3,"block":{"attributes":{"caching":{"type":"string","optional":true,"computed":true},"create_option":{"type":"string","required":true},"disk_size_gb":{"type":"number","optional":true,"computed":true},"image_uri":{"type":"string","optional":true},"managed_disk_id":{"type":"string","optional":true,"computed":true,"conflicts_with":["storage_os_disk.0.vhd_uri"]},"managed_disk_type":{"type":"string","optional":true,"computed":true,"conflicts_with":["storage_os_disk.0.vhd_uri"]},"name":{"type":"string","required":true},"os_type":{"type":"string","optional":true,"computed":true},"vhd_uri":{"type":"string","optional":true,"conflicts_with":["storage_os_disk.0.managed_disk_id","storage_os_disk.0.managed_disk_type"]},"write_accelerator_enabled":{"type":"bool","optional":true,"default":false}}},"required":true}}}},"azurerm_virtual_machine_automanage_configuration_assignment":{"block":{"attributes":{"configuration_id":{"type":"string","required":true},"virtual_machine_id":{"type":"string","required":true}}}},"azurerm_virtual_machine_data_disk_attachment":{"block":{"attributes":{"caching":{"type":"string","required":true},"create_option":{"type":"string","optional":true,"default":"Attach"},"lun":{"type":"number","required":true},"managed_disk_id":{"type":"string","required":true},"virtual_machine_id":{"type":"string","required":true},"write_accelerator_enabled":{"type":"bool","optional":true,"default":false}}}},"azurerm_virtual_machine_extension":{"block":{"attributes":{"auto_upgrade_minor_version":{"type":"bool","optional":true},"automatic_upgrade_enabled":{"type":"bool","optional":true},"failure_suppression_enabled":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"protected_settings":{"type":"string","optional":true,"conflicts_with":["protected_settings_from_key_vault"]},"provision_after_extensions":{"type":["list","string"],"optional":true},"publisher":{"type":"string","required":true},"settings":{"type":"string","optional":true},"tags":{"type":["map","string"],"optional":true},"type":{"type":"string","required":true},"type_handler_version":{"type":"string","required":true},"virtual_machine_id":{"type":"string","required":true}},"block_types":{"protected_settings_from_key_vault":{"nesting_mode":3,"block":{"attributes":{"secret_url":{"type":"string","required":true},"source_vault_id":{"type":"string","required":true}}},"optional":true,"conflicts_with":["protected_settings"]}}}},"azurerm_virtual_machine_gallery_application_assignment":{"block":{"attributes":{"configuration_blob_uri":{"type":"string","optional":true},"gallery_application_version_id":{"type":"string","required":true},"order":{"type":"number","optional":true,"default":0},"tag":{"type":"string","optional":true},"virtual_machine_id":{"type":"string","required":true}}}},"azurerm_virtual_machine_implicit_data_disk_from_source":{"block":{"attributes":{"caching":{"type":"string","optional":true},"create_option":{"type":"string","required":true},"disk_size_gb":{"type":"number","required":true},"lun":{"type":"number","required":true},"name":{"type":"string","required":true},"source_resource_id":{"type":"string","required":true},"virtual_machine_id":{"type":"string","required":true},"write_accelerator_enabled":{"type":"bool","optional":true,"default":false}}}},"azurerm_virtual_machine_packet_capture":{"block":{"attributes":{"maximum_bytes_per_packet":{"type":"number","optional":true,"default":0},"maximum_bytes_per_session":{"type":"number","optional":true,"default":1073741824},"maximum_capture_duration_in_seconds":{"type":"number","optional":true,"default":18000},"name":{"type":"string","required":true},"network_watcher_id":{"type":"string","required":true},"virtual_machine_id":{"type":"string","required":true}},"block_types":{"filter":{"nesting_mode":3,"block":{"attributes":{"local_ip_address":{"type":"string","optional":true},"local_port":{"type":"string","optional":true},"protocol":{"type":"string","required":true},"remote_ip_address":{"type":"string","optional":true},"remote_port":{"type":"string","optional":true}}},"optional":true},"storage_location":{"nesting_mode":3,"block":{"attributes":{"file_path":{"type":"string","optional":true,"at_least_one_of":["storage_location.0.file_path","storage_location.0.storage_account_id"]},"storage_account_id":{"type":"string","optional":true,"at_least_one_of":["storage_location.0.file_path","storage_location.0.storage_account_id"]},"storage_path":{"type":"string","computed":true}}},"required":true}}}},"azurerm_virtual_machine_restore_point":{"block":{"attributes":{"crash_consistency_mode_enabled":{"type":"bool","optional":true,"default":false},"excluded_disks":{"type":["set","string"],"optional":true},"name":{"type":"string","required":true},"virtual_machine_restore_point_collection_id":{"type":"string","required":true}}}},"azurerm_virtual_machine_restore_point_collection":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"source_virtual_machine_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_virtual_machine_run_command":{"block":{"attributes":{"error_blob_uri":{"type":"string","optional":true},"instance_view":{"type":["list",["object",{"end_time":"string","error_message":"string","execution_message":"string","execution_state":"string","exit_code":"number","output":"string","start_time":"string"}]],"computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"output_blob_uri":{"type":"string","optional":true},"run_as_password":{"type":"string","optional":true},"run_as_user":{"type":"string","optional":true},"tags":{"type":["map","string"],"optional":true},"virtual_machine_id":{"type":"string","required":true}},"block_types":{"error_blob_managed_identity":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","optional":true,"conflicts_with":["error_blob_managed_identity.0.object_id"]},"object_id":{"type":"string","optional":true,"conflicts_with":["error_blob_managed_identity.0.client_id"]}}},"optional":true,"required_with":["error_blob_uri"]},"output_blob_managed_identity":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","optional":true,"conflicts_with":["output_blob_managed_identity.0.object_id"]},"object_id":{"type":"string","optional":true,"conflicts_with":["output_blob_managed_identity.0.client_id"]}}},"optional":true,"required_with":["output_blob_uri"]},"parameter":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"protected_parameter":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"source":{"nesting_mode":3,"block":{"attributes":{"command_id":{"type":"string","optional":true,"exactly_one_of":["source.0.command_id","source.0.script","source.0.script_uri"]},"script":{"type":"string","optional":true,"exactly_one_of":["source.0.command_id","source.0.script","source.0.script_uri"]},"script_uri":{"type":"string","optional":true,"exactly_one_of":["source.0.command_id","source.0.script","source.0.script_uri"]}},"block_types":{"script_uri_managed_identity":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","optional":true,"conflicts_with":["source.0.script_uri_managed_identity.0.object_id"]},"object_id":{"type":"string","optional":true,"conflicts_with":["source.0.script_uri_managed_identity.0.client_id"]}}},"optional":true,"required_with":["source.0.script_uri"]}}},"required":true}}}},"azurerm_virtual_machine_scale_set":{"block":{"attributes":{"automatic_os_upgrade":{"type":"bool","optional":true,"default":false},"eviction_policy":{"type":"string","optional":true},"health_probe_id":{"type":"string","optional":true},"license_type":{"type":"string","optional":true,"computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"overprovision":{"type":"bool","optional":true,"default":true},"priority":{"type":"string","optional":true},"proximity_placement_group_id":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"single_placement_group":{"type":"bool","optional":true,"default":true},"tags":{"type":["map","string"],"optional":true},"upgrade_policy_mode":{"type":"string","required":true},"zones":{"type":["list","string"],"optional":true}},"block_types":{"boot_diagnostics":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"storage_uri":{"type":"string","required":true}}},"optional":true},"extension":{"nesting_mode":4,"block":{"attributes":{"auto_upgrade_minor_version":{"type":"bool","optional":true},"name":{"type":"string","required":true},"protected_settings":{"type":"string","optional":true},"provision_after_extensions":{"type":["set","string"],"optional":true},"publisher":{"type":"string","required":true},"settings":{"type":"string","optional":true},"type":{"type":"string","required":true},"type_handler_version":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"network_profile":{"nesting_mode":4,"block":{"attributes":{"accelerated_networking":{"type":"bool","optional":true},"ip_forwarding":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"network_security_group_id":{"type":"string","optional":true},"primary":{"type":"bool","required":true}},"block_types":{"dns_settings":{"nesting_mode":3,"block":{"attributes":{"dns_servers":{"type":["list","string"],"required":true}}},"optional":true},"ip_configuration":{"nesting_mode":3,"block":{"attributes":{"application_gateway_backend_address_pool_ids":{"type":["set","string"],"optional":true},"application_security_group_ids":{"type":["set","string"],"optional":true},"load_balancer_backend_address_pool_ids":{"type":["set","string"],"optional":true},"load_balancer_inbound_nat_rules_ids":{"type":["set","string"],"optional":true,"computed":true},"name":{"type":"string","required":true},"primary":{"type":"bool","required":true},"subnet_id":{"type":"string","required":true}},"block_types":{"public_ip_address_configuration":{"nesting_mode":3,"block":{"attributes":{"domain_name_label":{"type":"string","required":true},"idle_timeout":{"type":"number","required":true},"name":{"type":"string","required":true}}},"optional":true}}},"required":true}}},"required":true},"os_profile":{"nesting_mode":3,"block":{"attributes":{"admin_password":{"type":"string","optional":true},"admin_username":{"type":"string","required":true},"computer_name_prefix":{"type":"string","required":true},"custom_data":{"type":"string","optional":true}}},"required":true},"os_profile_linux_config":{"nesting_mode":4,"block":{"attributes":{"disable_password_authentication":{"type":"bool","optional":true,"default":false}},"block_types":{"ssh_keys":{"nesting_mode":3,"block":{"attributes":{"key_data":{"type":"string","optional":true},"path":{"type":"string","required":true}}},"optional":true}}},"optional":true,"computed":true},"os_profile_secrets":{"nesting_mode":4,"block":{"attributes":{"source_vault_id":{"type":"string","required":true}},"block_types":{"vault_certificates":{"nesting_mode":3,"block":{"attributes":{"certificate_store":{"type":"string","optional":true},"certificate_url":{"type":"string","required":true}}},"optional":true}}},"optional":true},"os_profile_windows_config":{"nesting_mode":4,"block":{"attributes":{"enable_automatic_upgrades":{"type":"bool","optional":true},"provision_vm_agent":{"type":"bool","optional":true}},"block_types":{"additional_unattend_config":{"nesting_mode":3,"block":{"attributes":{"component":{"type":"string","required":true},"content":{"type":"string","required":true},"pass":{"type":"string","required":true},"setting_name":{"type":"string","required":true}}},"optional":true},"winrm":{"nesting_mode":3,"block":{"attributes":{"certificate_url":{"type":"string","optional":true},"protocol":{"type":"string","required":true}}},"optional":true}}},"optional":true},"plan":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"product":{"type":"string","required":true},"publisher":{"type":"string","required":true}}},"optional":true},"rolling_upgrade_policy":{"nesting_mode":3,"block":{"attributes":{"max_batch_instance_percent":{"type":"number","optional":true,"default":20},"max_unhealthy_instance_percent":{"type":"number","optional":true,"default":20},"max_unhealthy_upgraded_instance_percent":{"type":"number","optional":true,"default":20},"pause_time_between_batches":{"type":"string","optional":true,"default":"PT0S"}}},"optional":true},"sku":{"nesting_mode":3,"block":{"attributes":{"capacity":{"type":"number","required":true},"name":{"type":"string","required":true},"tier":{"type":"string","optional":true,"computed":true}}},"required":true},"storage_profile_data_disk":{"nesting_mode":3,"block":{"attributes":{"caching":{"type":"string","optional":true,"computed":true},"create_option":{"type":"string","required":true},"disk_size_gb":{"type":"number","optional":true,"computed":true},"lun":{"type":"number","required":true},"managed_disk_type":{"type":"string","optional":true,"computed":true}}},"optional":true},"storage_profile_image_reference":{"nesting_mode":4,"block":{"attributes":{"id":{"type":"string","optional":true},"offer":{"type":"string","optional":true},"publisher":{"type":"string","optional":true},"sku":{"type":"string","optional":true},"version":{"type":"string","optional":true}}},"optional":true,"computed":true},"storage_profile_os_disk":{"nesting_mode":4,"block":{"attributes":{"caching":{"type":"string","optional":true,"computed":true},"create_option":{"type":"string","required":true},"image":{"type":"string","optional":true},"managed_disk_type":{"type":"string","optional":true,"computed":true},"name":{"type":"string","optional":true},"os_type":{"type":"string","optional":true},"vhd_containers":{"type":["set","string"],"optional":true}}},"required":true}}}},"azurerm_virtual_machine_scale_set_extension":{"block":{"attributes":{"auto_upgrade_minor_version":{"type":"bool","optional":true,"default":true},"automatic_upgrade_enabled":{"type":"bool","optional":true},"failure_suppression_enabled":{"type":"bool","optional":true,"default":false},"force_update_tag":{"type":"string","optional":true},"name":{"type":"string","required":true},"protected_settings":{"type":"string","optional":true},"provision_after_extensions":{"type":["list","string"],"optional":true},"publisher":{"type":"string","required":true},"settings":{"type":"string","optional":true},"type":{"type":"string","required":true},"type_handler_version":{"type":"string","required":true},"virtual_machine_scale_set_id":{"type":"string","required":true}},"block_types":{"protected_settings_from_key_vault":{"nesting_mode":3,"block":{"attributes":{"secret_url":{"type":"string","required":true},"source_vault_id":{"type":"string","required":true}}},"optional":true,"conflicts_with":["protected_settings"]}}}},"azurerm_virtual_machine_scale_set_packet_capture":{"block":{"attributes":{"maximum_bytes_per_packet":{"type":"number","optional":true,"default":0},"maximum_bytes_per_session":{"type":"number","optional":true,"default":1073741824},"maximum_capture_duration_in_seconds":{"type":"number","optional":true,"default":18000},"name":{"type":"string","required":true},"network_watcher_id":{"type":"string","required":true},"virtual_machine_scale_set_id":{"type":"string","required":true}},"block_types":{"filter":{"nesting_mode":3,"block":{"attributes":{"local_ip_address":{"type":"string","optional":true},"local_port":{"type":"string","optional":true},"protocol":{"type":"string","required":true},"remote_ip_address":{"type":"string","optional":true},"remote_port":{"type":"string","optional":true}}},"optional":true},"machine_scope":{"nesting_mode":3,"block":{"attributes":{"exclude_instance_ids":{"type":["list","string"],"optional":true,"conflicts_with":["machine_scope.0.include_instance_ids"]},"include_instance_ids":{"type":["list","string"],"optional":true,"conflicts_with":["machine_scope.0.exclude_instance_ids"]}}},"optional":true},"storage_location":{"nesting_mode":3,"block":{"attributes":{"file_path":{"type":"string","optional":true,"at_least_one_of":["storage_location.0.file_path","storage_location.0.storage_account_id"]},"storage_account_id":{"type":"string","optional":true,"at_least_one_of":["storage_location.0.file_path","storage_location.0.storage_account_id"]},"storage_path":{"type":"string","computed":true}}},"required":true}}}},"azurerm_virtual_network":{"block":{"attributes":{"address_space":{"type":["set","string"],"required":true},"bgp_community":{"type":"string","optional":true},"dns_servers":{"type":["list","string"],"optional":true,"computed":true},"edge_zone":{"type":"string","optional":true},"flow_timeout_in_minutes":{"type":"number","optional":true},"guid":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"subnet":{"type":["set",["object",{"address_prefixes":["list","string"],"default_outbound_access_enabled":"bool","delegation":["list",["object",{"name":"string","service_delegation":["list",["object",{"actions":["set","string"],"name":"string"}]]}]],"id":"string","name":"string","private_endpoint_network_policies":"string","private_link_service_network_policies_enabled":"bool","route_table_id":"string","security_group":"string","service_endpoint_policy_ids":["set","string"],"service_endpoints":["set","string"]}]],"optional":true,"computed":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"ddos_protection_plan":{"nesting_mode":3,"block":{"attributes":{"enable":{"type":"bool","required":true},"id":{"type":"string","required":true}}},"optional":true},"encryption":{"nesting_mode":3,"block":{"attributes":{"enforcement":{"type":"string","required":true}}},"optional":true}}}},"azurerm_virtual_network_dns_servers":{"block":{"attributes":{"dns_servers":{"type":["list","string"],"optional":true},"virtual_network_id":{"type":"string","required":true}}}},"azurerm_virtual_network_gateway":{"block":{"attributes":{"active_active":{"type":"bool","optional":true,"computed":true},"bgp_route_translation_for_nat_enabled":{"type":"bool","optional":true,"default":false},"default_local_network_gateway_id":{"type":"string","optional":true},"dns_forwarding_enabled":{"type":"bool","optional":true},"edge_zone":{"type":"string","optional":true},"enable_bgp":{"type":"bool","optional":true,"computed":true},"generation":{"type":"string","optional":true,"computed":true},"ip_sec_replay_protection_enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"private_ip_address_enabled":{"type":"bool","optional":true},"remote_vnet_traffic_enabled":{"type":"bool","optional":true,"default":false},"resource_group_name":{"type":"string","required":true},"sku":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"type":{"type":"string","required":true},"virtual_wan_traffic_enabled":{"type":"bool","optional":true,"default":false},"vpn_type":{"type":"string","optional":true,"default":"RouteBased"}},"block_types":{"bgp_settings":{"nesting_mode":3,"block":{"attributes":{"asn":{"type":"number","optional":true,"at_least_one_of":["bgp_settings.0.asn","bgp_settings.0.peer_weight","bgp_settings.0.peering_addresses"]},"peer_weight":{"type":"number","optional":true,"at_least_one_of":["bgp_settings.0.asn","bgp_settings.0.peer_weight","bgp_settings.0.peering_addresses"]}},"block_types":{"peering_addresses":{"nesting_mode":3,"block":{"attributes":{"apipa_addresses":{"type":["list","string"],"optional":true},"default_addresses":{"type":["list","string"],"computed":true},"ip_configuration_name":{"type":"string","optional":true,"computed":true},"tunnel_ip_addresses":{"type":["list","string"],"computed":true}}},"optional":true,"computed":true,"at_least_one_of":["bgp_settings.0.asn","bgp_settings.0.peer_weight","bgp_settings.0.peering_addresses"]}}},"optional":true,"computed":true},"custom_route":{"nesting_mode":3,"block":{"attributes":{"address_prefixes":{"type":["set","string"],"optional":true}}},"optional":true},"ip_configuration":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","optional":true,"default":"vnetGatewayConfig"},"private_ip_address_allocation":{"type":"string","optional":true,"default":"Dynamic"},"public_ip_address_id":{"type":"string","required":true},"subnet_id":{"type":"string","required":true}}},"required":true},"policy_group":{"nesting_mode":3,"block":{"attributes":{"is_default":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"priority":{"type":"number","optional":true,"default":0}},"block_types":{"policy_member":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"type":{"type":"string","required":true},"value":{"type":"string","required":true}}},"required":true}}},"optional":true},"vpn_client_configuration":{"nesting_mode":3,"block":{"attributes":{"aad_audience":{"type":"string","optional":true,"required_with":["vpn_client_configuration.0.aad_issuer","vpn_client_configuration.0.aad_tenant"]},"aad_issuer":{"type":"string","optional":true,"required_with":["vpn_client_configuration.0.aad_audience","vpn_client_configuration.0.aad_tenant"]},"aad_tenant":{"type":"string","optional":true,"required_with":["vpn_client_configuration.0.aad_audience","vpn_client_configuration.0.aad_issuer"]},"address_space":{"type":["list","string"],"required":true},"radius_server_address":{"type":"string","optional":true,"required_with":["vpn_client_configuration.0.radius_server_secret"]},"radius_server_secret":{"type":"string","optional":true,"required_with":["vpn_client_configuration.0.radius_server_address"]},"vpn_auth_types":{"type":["set","string"],"optional":true,"computed":true},"vpn_client_protocols":{"type":["set","string"],"optional":true,"computed":true}},"block_types":{"ipsec_policy":{"nesting_mode":3,"block":{"attributes":{"dh_group":{"type":"string","required":true},"ike_encryption":{"type":"string","required":true},"ike_integrity":{"type":"string","required":true},"ipsec_encryption":{"type":"string","required":true},"ipsec_integrity":{"type":"string","required":true},"pfs_group":{"type":"string","required":true},"sa_data_size_in_kilobytes":{"type":"number","required":true},"sa_lifetime_in_seconds":{"type":"number","required":true}}},"optional":true},"radius_server":{"nesting_mode":3,"block":{"attributes":{"address":{"type":"string","required":true},"score":{"type":"number","required":true},"secret":{"type":"string","required":true}}},"optional":true},"revoked_certificate":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"thumbprint":{"type":"string","required":true}}},"optional":true},"root_certificate":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"public_cert_data":{"type":"string","required":true}}},"optional":true},"virtual_network_gateway_client_connection":{"nesting_mode":3,"block":{"attributes":{"address_prefixes":{"type":["list","string"],"required":true},"name":{"type":"string","required":true},"policy_group_names":{"type":["list","string"],"required":true}}},"optional":true}}},"optional":true}}}},"azurerm_virtual_network_gateway_connection":{"block":{"attributes":{"authorization_key":{"type":"string","optional":true},"connection_mode":{"type":"string","optional":true,"default":"Default"},"connection_protocol":{"type":"string","optional":true,"computed":true},"dpd_timeout_seconds":{"type":"number","optional":true},"egress_nat_rule_ids":{"type":["set","string"],"optional":true},"enable_bgp":{"type":"bool","optional":true,"computed":true},"express_route_circuit_id":{"type":"string","optional":true},"express_route_gateway_bypass":{"type":"bool","optional":true,"computed":true},"ingress_nat_rule_ids":{"type":["set","string"],"optional":true},"local_azure_ip_address_enabled":{"type":"bool","optional":true},"local_network_gateway_id":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"peer_virtual_network_gateway_id":{"type":"string","optional":true},"private_link_fast_path_enabled":{"type":"bool","optional":true,"default":false},"resource_group_name":{"type":"string","required":true},"routing_weight":{"type":"number","optional":true,"computed":true},"shared_key":{"type":"string","optional":true,"computed":true},"tags":{"type":["map","string"],"optional":true},"type":{"type":"string","required":true},"use_policy_based_traffic_selectors":{"type":"bool","optional":true,"computed":true},"virtual_network_gateway_id":{"type":"string","required":true}},"block_types":{"custom_bgp_addresses":{"nesting_mode":3,"block":{"attributes":{"primary":{"type":"string","required":true},"secondary":{"type":"string","optional":true}}},"optional":true},"ipsec_policy":{"nesting_mode":3,"block":{"attributes":{"dh_group":{"type":"string","required":true},"ike_encryption":{"type":"string","required":true},"ike_integrity":{"type":"string","required":true},"ipsec_encryption":{"type":"string","required":true},"ipsec_integrity":{"type":"string","required":true},"pfs_group":{"type":"string","required":true},"sa_datasize":{"type":"number","optional":true,"computed":true},"sa_lifetime":{"type":"number","optional":true,"computed":true}}},"optional":true},"traffic_selector_policy":{"nesting_mode":3,"block":{"attributes":{"local_address_cidrs":{"type":["list","string"],"required":true},"remote_address_cidrs":{"type":["list","string"],"required":true}}},"optional":true}}}},"azurerm_virtual_network_gateway_nat_rule":{"block":{"attributes":{"ip_configuration_id":{"type":"string","optional":true},"mode":{"type":"string","optional":true,"default":"EgressSnat"},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"type":{"type":"string","optional":true,"default":"Static"},"virtual_network_gateway_id":{"type":"string","required":true}},"block_types":{"external_mapping":{"nesting_mode":3,"block":{"attributes":{"address_space":{"type":"string","required":true},"port_range":{"type":"string","optional":true}}},"required":true},"internal_mapping":{"nesting_mode":3,"block":{"attributes":{"address_space":{"type":"string","required":true},"port_range":{"type":"string","optional":true}}},"required":true}}}},"azurerm_virtual_network_peering":{"block":{"attributes":{"allow_forwarded_traffic":{"type":"bool","optional":true,"default":false},"allow_gateway_transit":{"type":"bool","optional":true,"default":false},"allow_virtual_network_access":{"type":"bool","optional":true,"default":true},"local_subnet_names":{"type":["list","string"],"optional":true},"name":{"type":"string","required":true},"only_ipv6_peering_enabled":{"type":"bool","optional":true},"peer_complete_virtual_networks_enabled":{"type":"bool","optional":true,"default":true},"remote_subnet_names":{"type":["list","string"],"optional":true},"remote_virtual_network_id":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"triggers":{"type":["map","string"],"optional":true},"use_remote_gateways":{"type":"bool","optional":true,"default":false},"virtual_network_name":{"type":"string","required":true}}}},"azurerm_virtual_wan":{"block":{"attributes":{"allow_branch_to_branch_traffic":{"type":"bool","optional":true,"default":true},"disable_vpn_encryption":{"type":"bool","optional":true,"default":false},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"office365_local_breakout_category":{"type":"string","optional":true,"default":"None"},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"type":{"type":"string","optional":true,"default":"Standard"}}}},"azurerm_vmware_cluster":{"block":{"attributes":{"cluster_node_count":{"type":"number","required":true},"cluster_number":{"type":"number","computed":true},"hosts":{"type":["list","string"],"computed":true},"name":{"type":"string","required":true},"sku_name":{"type":"string","required":true},"vmware_cloud_id":{"type":"string","required":true}}}},"azurerm_vmware_express_route_authorization":{"block":{"attributes":{"express_route_authorization_id":{"type":"string","computed":true},"express_route_authorization_key":{"type":"string","computed":true},"name":{"type":"string","required":true},"private_cloud_id":{"type":"string","required":true}}}},"azurerm_vmware_netapp_volume_attachment":{"block":{"attributes":{"name":{"type":"string","required":true},"netapp_volume_id":{"type":"string","required":true},"vmware_cluster_id":{"type":"string","required":true}}}},"azurerm_vmware_private_cloud":{"block":{"attributes":{"circuit":{"type":["list",["object",{"express_route_id":"string","express_route_private_peering_id":"string","primary_subnet_cidr":"string","secondary_subnet_cidr":"string"}]],"computed":true},"hcx_cloud_manager_endpoint":{"type":"string","computed":true},"internet_connection_enabled":{"type":"bool","optional":true,"default":false},"location":{"type":"string","required":true},"management_subnet_cidr":{"type":"string","computed":true},"name":{"type":"string","required":true},"network_subnet_cidr":{"type":"string","required":true},"nsxt_certificate_thumbprint":{"type":"string","computed":true},"nsxt_manager_endpoint":{"type":"string","computed":true},"nsxt_password":{"type":"string","optional":true},"provisioning_subnet_cidr":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"vcenter_certificate_thumbprint":{"type":"string","computed":true},"vcenter_password":{"type":"string","optional":true},"vcsa_endpoint":{"type":"string","computed":true},"vmotion_subnet_cidr":{"type":"string","computed":true}},"block_types":{"management_cluster":{"nesting_mode":3,"block":{"attributes":{"hosts":{"type":["list","string"],"computed":true},"id":{"type":"number","computed":true},"size":{"type":"number","required":true}}},"required":true}}}},"azurerm_voice_services_communications_gateway":{"block":{"attributes":{"api_bridge":{"type":"string","optional":true},"auto_generated_domain_name_label_scope":{"type":"string","optional":true,"default":"TenantReuse"},"codecs":{"type":"string","required":true},"connectivity":{"type":"string","required":true},"e911_type":{"type":"string","required":true},"emergency_dial_strings":{"type":["list","string"],"optional":true},"location":{"type":"string","required":true},"microsoft_teams_voicemail_pilot_number":{"type":"string","optional":true},"name":{"type":"string","required":true},"on_prem_mcp_enabled":{"type":"bool","optional":true},"platforms":{"type":["list","string"],"required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"service_location":{"nesting_mode":4,"block":{"attributes":{"allowed_media_source_address_prefixes":{"type":["set","string"],"optional":true},"allowed_signaling_source_address_prefixes":{"type":["set","string"],"optional":true},"esrp_addresses":{"type":["set","string"],"optional":true},"location":{"type":"string","required":true},"operator_addresses":{"type":["set","string"],"required":true}}},"required":true}}}},"azurerm_voice_services_communications_gateway_test_line":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"phone_number":{"type":"string","required":true},"purpose":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"voice_services_communications_gateway_id":{"type":"string","required":true}}}},"azurerm_vpn_gateway":{"block":{"attributes":{"bgp_route_translation_for_nat_enabled":{"type":"bool","optional":true,"default":false},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"routing_preference":{"type":"string","optional":true,"default":"Microsoft Network"},"scale_unit":{"type":"number","optional":true,"default":1},"tags":{"type":["map","string"],"optional":true},"virtual_hub_id":{"type":"string","required":true}},"block_types":{"bgp_settings":{"nesting_mode":3,"block":{"attributes":{"asn":{"type":"number","required":true},"bgp_peering_address":{"type":"string","computed":true},"peer_weight":{"type":"number","required":true}},"block_types":{"instance_0_bgp_peering_address":{"nesting_mode":3,"block":{"attributes":{"custom_ips":{"type":["set","string"],"required":true},"default_ips":{"type":["set","string"],"computed":true},"ip_configuration_id":{"type":"string","computed":true},"tunnel_ips":{"type":["set","string"],"computed":true}}},"optional":true,"computed":true},"instance_1_bgp_peering_address":{"nesting_mode":3,"block":{"attributes":{"custom_ips":{"type":["set","string"],"required":true},"default_ips":{"type":["set","string"],"computed":true},"ip_configuration_id":{"type":"string","computed":true},"tunnel_ips":{"type":["set","string"],"computed":true}}},"optional":true,"computed":true}}},"optional":true,"computed":true}}}},"azurerm_vpn_gateway_connection":{"block":{"attributes":{"internet_security_enabled":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"remote_vpn_site_id":{"type":"string","required":true},"vpn_gateway_id":{"type":"string","required":true}},"block_types":{"routing":{"nesting_mode":3,"block":{"attributes":{"associated_route_table":{"type":"string","required":true},"inbound_route_map_id":{"type":"string","optional":true},"outbound_route_map_id":{"type":"string","optional":true}},"block_types":{"propagated_route_table":{"nesting_mode":3,"block":{"attributes":{"labels":{"type":["set","string"],"optional":true},"route_table_ids":{"type":["list","string"],"required":true}}},"optional":true,"computed":true}}},"optional":true,"computed":true},"traffic_selector_policy":{"nesting_mode":4,"block":{"attributes":{"local_address_ranges":{"type":["set","string"],"required":true},"remote_address_ranges":{"type":["set","string"],"required":true}}},"optional":true},"vpn_link":{"nesting_mode":3,"block":{"attributes":{"bandwidth_mbps":{"type":"number","optional":true,"default":10},"bgp_enabled":{"type":"bool","optional":true,"default":false},"connection_mode":{"type":"string","optional":true,"default":"Default"},"egress_nat_rule_ids":{"type":["set","string"],"optional":true},"ingress_nat_rule_ids":{"type":["set","string"],"optional":true},"local_azure_ip_address_enabled":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"policy_based_traffic_selector_enabled":{"type":"bool","optional":true,"default":false},"protocol":{"type":"string","optional":true,"default":"IKEv2"},"ratelimit_enabled":{"type":"bool","optional":true,"default":false},"route_weight":{"type":"number","optional":true,"default":0},"shared_key":{"type":"string","optional":true},"vpn_site_link_id":{"type":"string","required":true}},"block_types":{"custom_bgp_address":{"nesting_mode":4,"block":{"attributes":{"ip_address":{"type":"string","required":true},"ip_configuration_id":{"type":"string","required":true}}},"optional":true},"ipsec_policy":{"nesting_mode":3,"block":{"attributes":{"dh_group":{"type":"string","required":true},"encryption_algorithm":{"type":"string","required":true},"ike_encryption_algorithm":{"type":"string","required":true},"ike_integrity_algorithm":{"type":"string","required":true},"integrity_algorithm":{"type":"string","required":true},"pfs_group":{"type":"string","required":true},"sa_data_size_kb":{"type":"number","required":true},"sa_lifetime_sec":{"type":"number","required":true}}},"optional":true}}},"required":true}}}},"azurerm_vpn_gateway_nat_rule":{"block":{"attributes":{"ip_configuration_id":{"type":"string","optional":true},"mode":{"type":"string","optional":true,"default":"EgressSnat"},"name":{"type":"string","required":true},"type":{"type":"string","optional":true,"default":"Static"},"vpn_gateway_id":{"type":"string","required":true}},"block_types":{"external_mapping":{"nesting_mode":3,"block":{"attributes":{"address_space":{"type":"string","required":true},"port_range":{"type":"string","optional":true}}},"optional":true,"exactly_one_of":["external_mapping"]},"internal_mapping":{"nesting_mode":3,"block":{"attributes":{"address_space":{"type":"string","required":true},"port_range":{"type":"string","optional":true}}},"optional":true,"exactly_one_of":["internal_mapping"]}}}},"azurerm_vpn_server_configuration":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"vpn_authentication_types":{"type":["list","string"],"required":true},"vpn_protocols":{"type":["set","string"],"optional":true,"computed":true}},"block_types":{"azure_active_directory_authentication":{"nesting_mode":3,"block":{"attributes":{"audience":{"type":"string","required":true},"issuer":{"type":"string","required":true},"tenant":{"type":"string","required":true}}},"optional":true},"client_revoked_certificate":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"thumbprint":{"type":"string","required":true}}},"optional":true},"client_root_certificate":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"public_cert_data":{"type":"string","required":true}}},"optional":true},"ipsec_policy":{"nesting_mode":3,"block":{"attributes":{"dh_group":{"type":"string","required":true},"ike_encryption":{"type":"string","required":true},"ike_integrity":{"type":"string","required":true},"ipsec_encryption":{"type":"string","required":true},"ipsec_integrity":{"type":"string","required":true},"pfs_group":{"type":"string","required":true},"sa_data_size_kilobytes":{"type":"number","required":true},"sa_lifetime_seconds":{"type":"number","required":true}}},"optional":true},"radius":{"nesting_mode":3,"block":{"block_types":{"client_root_certificate":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"thumbprint":{"type":"string","required":true}}},"optional":true},"server":{"nesting_mode":3,"block":{"attributes":{"address":{"type":"string","required":true},"score":{"type":"number","required":true},"secret":{"type":"string","required":true}}},"optional":true},"server_root_certificate":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"public_cert_data":{"type":"string","required":true}}},"optional":true}}},"optional":true}}}},"azurerm_vpn_server_configuration_policy_group":{"block":{"attributes":{"is_default":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"priority":{"type":"number","optional":true,"default":0},"vpn_server_configuration_id":{"type":"string","required":true}},"block_types":{"policy":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"type":{"type":"string","required":true},"value":{"type":"string","required":true}}},"required":true}}}},"azurerm_vpn_site":{"block":{"attributes":{"address_cidrs":{"type":["set","string"],"optional":true},"device_model":{"type":"string","optional":true},"device_vendor":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"virtual_wan_id":{"type":"string","required":true}},"block_types":{"link":{"nesting_mode":3,"block":{"attributes":{"fqdn":{"type":"string","optional":true},"id":{"type":"string","computed":true},"ip_address":{"type":"string","optional":true},"name":{"type":"string","required":true},"provider_name":{"type":"string","optional":true},"speed_in_mbps":{"type":"number","optional":true,"default":0}},"block_types":{"bgp":{"nesting_mode":3,"block":{"attributes":{"asn":{"type":"number","required":true},"peering_address":{"type":"string","required":true}}},"optional":true}}},"optional":true},"o365_policy":{"nesting_mode":3,"block":{"block_types":{"traffic_category":{"nesting_mode":3,"block":{"attributes":{"allow_endpoint_enabled":{"type":"bool","optional":true,"default":false},"default_endpoint_enabled":{"type":"bool","optional":true,"default":false},"optimize_endpoint_enabled":{"type":"bool","optional":true,"default":false}}},"optional":true,"computed":true}}},"optional":true,"computed":true}}}},"azurerm_web_app_active_slot":{"block":{"attributes":{"last_successful_swap":{"type":"string","computed":true},"overwrite_network_config":{"type":"bool","optional":true,"default":true},"slot_id":{"type":"string","required":true}}}},"azurerm_web_app_hybrid_connection":{"block":{"attributes":{"hostname":{"type":"string","required":true},"namespace_name":{"type":"string","computed":true},"port":{"type":"number","required":true},"relay_id":{"type":"string","required":true},"relay_name":{"type":"string","computed":true},"send_key_name":{"type":"string","optional":true,"default":"RootManageSharedAccessKey"},"send_key_value":{"type":"string","computed":true},"service_bus_namespace":{"type":"string","computed":true},"service_bus_suffix":{"type":"string","computed":true},"web_app_id":{"type":"string","required":true}}}},"azurerm_web_application_firewall_policy":{"block":{"attributes":{"http_listener_ids":{"type":["list","string"],"computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"path_based_rule_ids":{"type":["list","string"],"computed":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"custom_rules":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":true},"group_rate_limit_by":{"type":"string","optional":true},"name":{"type":"string","optional":true},"priority":{"type":"number","required":true},"rate_limit_duration":{"type":"string","optional":true},"rate_limit_threshold":{"type":"number","optional":true},"rule_type":{"type":"string","required":true}},"block_types":{"match_conditions":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["list","string"],"optional":true},"negation_condition":{"type":"bool","optional":true},"operator":{"type":"string","required":true},"transforms":{"type":["set","string"],"optional":true}},"block_types":{"match_variables":{"nesting_mode":3,"block":{"attributes":{"selector":{"type":"string","optional":true},"variable_name":{"type":"string","required":true}}},"required":true}}},"required":true}}},"optional":true},"managed_rules":{"nesting_mode":3,"block":{"block_types":{"exclusion":{"nesting_mode":3,"block":{"attributes":{"match_variable":{"type":"string","required":true},"selector":{"type":"string","required":true},"selector_match_operator":{"type":"string","required":true}},"block_types":{"excluded_rule_set":{"nesting_mode":3,"block":{"attributes":{"type":{"type":"string","optional":true,"default":"OWASP"},"version":{"type":"string","optional":true,"default":"3.2"}},"block_types":{"rule_group":{"nesting_mode":3,"block":{"attributes":{"excluded_rules":{"type":["list","string"],"optional":true},"rule_group_name":{"type":"string","required":true}}},"optional":true}}},"optional":true}}},"optional":true},"managed_rule_set":{"nesting_mode":3,"block":{"attributes":{"type":{"type":"string","optional":true,"default":"OWASP"},"version":{"type":"string","required":true}},"block_types":{"rule_group_override":{"nesting_mode":3,"block":{"attributes":{"rule_group_name":{"type":"string","required":true}},"block_types":{"rule":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true},"enabled":{"type":"bool","optional":true,"default":false},"id":{"type":"string","required":true}}},"optional":true}}},"optional":true}}},"required":true}}},"required":true},"policy_settings":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"file_upload_limit_in_mb":{"type":"number","optional":true,"default":100},"js_challenge_cookie_expiration_in_minutes":{"type":"number","optional":true,"default":30},"max_request_body_size_in_kb":{"type":"number","optional":true,"default":128},"mode":{"type":"string","optional":true,"default":"Prevention"},"request_body_check":{"type":"bool","optional":true,"default":true},"request_body_enforcement":{"type":"bool","optional":true,"default":true},"request_body_inspect_limit_in_kb":{"type":"number","optional":true,"default":128}},"block_types":{"log_scrubbing":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true}},"block_types":{"rule":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"match_variable":{"type":"string","required":true},"selector":{"type":"string","optional":true},"selector_match_operator":{"type":"string","optional":true,"default":"Equals"}}},"optional":true}}},"optional":true}}},"optional":true}}}},"azurerm_web_pubsub":{"block":{"attributes":{"aad_auth_enabled":{"type":"bool","optional":true,"default":true},"capacity":{"type":"number","optional":true,"default":1},"external_ip":{"type":"string","computed":true},"hostname":{"type":"string","computed":true},"local_auth_enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"primary_access_key":{"type":"string","computed":true},"primary_connection_string":{"type":"string","computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"public_port":{"type":"number","computed":true},"resource_group_name":{"type":"string","required":true},"secondary_access_key":{"type":"string","computed":true},"secondary_connection_string":{"type":"string","computed":true},"server_port":{"type":"number","computed":true},"sku":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"tls_client_cert_enabled":{"type":"bool","optional":true,"default":false},"version":{"type":"string","computed":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"live_trace":{"nesting_mode":3,"block":{"attributes":{"connectivity_logs_enabled":{"type":"bool","optional":true,"default":true},"enabled":{"type":"bool","optional":true,"default":true},"http_request_logs_enabled":{"type":"bool","optional":true,"default":true},"messaging_logs_enabled":{"type":"bool","optional":true,"default":true}}},"optional":true}}}},"azurerm_web_pubsub_custom_certificate":{"block":{"attributes":{"certificate_version":{"type":"string","computed":true},"custom_certificate_id":{"type":"string","required":true},"name":{"type":"string","required":true},"web_pubsub_id":{"type":"string","required":true}}}},"azurerm_web_pubsub_custom_domain":{"block":{"attributes":{"domain_name":{"type":"string","required":true},"name":{"type":"string","required":true},"web_pubsub_custom_certificate_id":{"type":"string","required":true},"web_pubsub_id":{"type":"string","required":true}}}},"azurerm_web_pubsub_hub":{"block":{"attributes":{"anonymous_connections_enabled":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"web_pubsub_id":{"type":"string","required":true}},"block_types":{"event_handler":{"nesting_mode":3,"block":{"attributes":{"system_events":{"type":["set","string"],"optional":true},"url_template":{"type":"string","required":true},"user_event_pattern":{"type":"string","optional":true}},"block_types":{"auth":{"nesting_mode":3,"block":{"attributes":{"managed_identity_id":{"type":"string","required":true}}},"optional":true}}},"optional":true},"event_listener":{"nesting_mode":3,"block":{"attributes":{"eventhub_name":{"type":"string","required":true},"eventhub_namespace_name":{"type":"string","required":true},"system_event_name_filter":{"type":["list","string"],"optional":true},"user_event_name_filter":{"type":["list","string"],"optional":true}}},"optional":true}}}},"azurerm_web_pubsub_network_acl":{"block":{"attributes":{"default_action":{"type":"string","optional":true,"default":"Deny"},"web_pubsub_id":{"type":"string","required":true}},"block_types":{"private_endpoint":{"nesting_mode":4,"block":{"attributes":{"allowed_request_types":{"type":["set","string"],"optional":true},"denied_request_types":{"type":["set","string"],"optional":true},"id":{"type":"string","required":true}}},"optional":true},"public_network":{"nesting_mode":3,"block":{"attributes":{"allowed_request_types":{"type":["set","string"],"optional":true,"conflicts_with":["public_network.0.denied_request_types"]},"denied_request_types":{"type":["set","string"],"optional":true,"conflicts_with":["public_network.0.allowed_request_types"]}}},"required":true}}}},"azurerm_web_pubsub_shared_private_link_resource":{"block":{"attributes":{"name":{"type":"string","required":true},"request_message":{"type":"string","optional":true},"status":{"type":"string","computed":true},"subresource_name":{"type":"string","required":true},"target_resource_id":{"type":"string","required":true},"web_pubsub_id":{"type":"string","required":true}}}},"azurerm_windows_function_app":{"block":{"attributes":{"app_settings":{"type":["map","string"],"optional":true},"builtin_logging_enabled":{"type":"bool","optional":true,"default":true},"client_certificate_enabled":{"type":"bool","optional":true,"default":false},"client_certificate_exclusion_paths":{"type":"string","optional":true},"client_certificate_mode":{"type":"string","optional":true,"default":"Optional"},"content_share_force_disabled":{"type":"bool","optional":true,"default":false},"custom_domain_verification_id":{"type":"string","computed":true},"daily_memory_time_quota":{"type":"number","optional":true,"default":0},"default_hostname":{"type":"string","computed":true},"enabled":{"type":"bool","optional":true,"default":true},"ftp_publish_basic_authentication_enabled":{"type":"bool","optional":true,"default":true},"functions_extension_version":{"type":"string","optional":true,"default":"~4"},"hosting_environment_id":{"type":"string","computed":true},"https_only":{"type":"bool","optional":true,"computed":true},"key_vault_reference_identity_id":{"type":"string","optional":true,"computed":true},"kind":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"outbound_ip_address_list":{"type":["list","string"],"computed":true},"outbound_ip_addresses":{"type":"string","computed":true},"possible_outbound_ip_address_list":{"type":["list","string"],"computed":true},"possible_outbound_ip_addresses":{"type":"string","computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"service_plan_id":{"type":"string","required":true},"site_credential":{"type":["list",["object",{"name":"string","password":"string"}]],"computed":true},"storage_account_access_key":{"type":"string","optional":true,"conflicts_with":["storage_uses_managed_identity","storage_key_vault_secret_id"]},"storage_account_name":{"type":"string","optional":true,"exactly_one_of":["storage_account_name","storage_key_vault_secret_id"]},"storage_key_vault_secret_id":{"type":"string","optional":true,"exactly_one_of":["storage_account_name","storage_key_vault_secret_id"]},"storage_uses_managed_identity":{"type":"bool","optional":true,"default":false,"conflicts_with":["storage_account_access_key","storage_key_vault_secret_id"]},"tags":{"type":["map","string"],"optional":true},"virtual_network_subnet_id":{"type":"string","optional":true},"vnet_image_pull_enabled":{"type":"bool","optional":true,"default":false},"webdeploy_publish_basic_authentication_enabled":{"type":"bool","optional":true,"default":true},"zip_deploy_file":{"type":"string","optional":true,"computed":true}},"block_types":{"auth_settings":{"nesting_mode":3,"block":{"attributes":{"additional_login_parameters":{"type":["map","string"],"optional":true},"allowed_external_redirect_urls":{"type":["list","string"],"optional":true,"computed":true},"default_provider":{"type":"string","optional":true,"computed":true},"enabled":{"type":"bool","required":true},"issuer":{"type":"string","optional":true},"runtime_version":{"type":"string","optional":true,"computed":true},"token_refresh_extension_hours":{"type":"number","optional":true,"default":72},"token_store_enabled":{"type":"bool","optional":true,"default":false},"unauthenticated_client_action":{"type":"string","optional":true,"computed":true}},"block_types":{"active_directory":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"conflicts_with":["auth_settings.0.active_directory.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings.0.active_directory.0.client_secret"]}}},"optional":true},"facebook":{"nesting_mode":3,"block":{"attributes":{"app_id":{"type":"string","required":true},"app_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.facebook.0.app_secret","auth_settings.0.facebook.0.app_secret_setting_name"]},"app_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.facebook.0.app_secret","auth_settings.0.facebook.0.app_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"github":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.github.0.client_secret","auth_settings.0.github.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.github.0.client_secret","auth_settings.0.github.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"google":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.google.0.client_secret","auth_settings.0.google.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.google.0.client_secret","auth_settings.0.google.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"microsoft":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.microsoft.0.client_secret","auth_settings.0.microsoft.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.microsoft.0.client_secret","auth_settings.0.microsoft.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"twitter":{"nesting_mode":3,"block":{"attributes":{"consumer_key":{"type":"string","required":true},"consumer_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.twitter.0.consumer_secret","auth_settings.0.twitter.0.consumer_secret_setting_name"]},"consumer_secret_setting_name":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"auth_settings_v2":{"nesting_mode":3,"block":{"attributes":{"auth_enabled":{"type":"bool","optional":true},"config_file_path":{"type":"string","optional":true},"default_provider":{"type":"string","optional":true},"excluded_paths":{"type":["list","string"],"optional":true},"forward_proxy_convention":{"type":"string","optional":true,"default":"NoProxy"},"forward_proxy_custom_host_header_name":{"type":"string","optional":true},"forward_proxy_custom_scheme_header_name":{"type":"string","optional":true},"http_route_api_prefix":{"type":"string","optional":true,"default":"/.auth"},"require_authentication":{"type":"bool","optional":true},"require_https":{"type":"bool","optional":true,"default":true},"runtime_version":{"type":"string","optional":true,"default":"~1"},"unauthenticated_action":{"type":"string","optional":true,"default":"RedirectToLoginPage"}},"block_types":{"active_directory_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_applications":{"type":["list","string"],"optional":true},"allowed_audiences":{"type":["list","string"],"optional":true},"allowed_groups":{"type":["list","string"],"optional":true},"allowed_identities":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_certificate_thumbprint":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.active_directory_v2.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.active_directory_v2.0.client_secret_certificate_thumbprint"]},"jwt_allowed_client_applications":{"type":["list","string"],"optional":true},"jwt_allowed_groups":{"type":["list","string"],"optional":true},"login_parameters":{"type":["map","string"],"optional":true},"tenant_auth_endpoint":{"type":"string","required":true},"www_authentication_disabled":{"type":"bool","optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"apple_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"computed":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"azure_static_web_app_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"custom_oidc_v2":{"nesting_mode":3,"block":{"attributes":{"authorisation_endpoint":{"type":"string","computed":true},"certification_uri":{"type":"string","computed":true},"client_credential_method":{"type":"string","computed":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","computed":true},"issuer_endpoint":{"type":"string","computed":true},"name":{"type":"string","required":true},"name_claim_type":{"type":"string","optional":true},"openid_configuration_endpoint":{"type":"string","required":true},"scopes":{"type":["list","string"],"optional":true},"token_endpoint":{"type":"string","computed":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"facebook_v2":{"nesting_mode":3,"block":{"attributes":{"app_id":{"type":"string","required":true},"app_secret_setting_name":{"type":"string","required":true},"graph_api_version":{"type":"string","optional":true,"computed":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"github_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"google_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"login":{"nesting_mode":3,"block":{"attributes":{"allowed_external_redirect_urls":{"type":["list","string"],"optional":true},"cookie_expiration_convention":{"type":"string","optional":true,"default":"FixedTime"},"cookie_expiration_time":{"type":"string","optional":true,"default":"08:00:00"},"logout_endpoint":{"type":"string","optional":true},"nonce_expiration_time":{"type":"string","optional":true,"default":"00:05:00"},"preserve_url_fragments_for_logins":{"type":"bool","optional":true,"default":false},"token_refresh_extension_time":{"type":"number","optional":true,"default":72},"token_store_enabled":{"type":"bool","optional":true,"default":false},"token_store_path":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.login.0.token_store_sas_setting_name"]},"token_store_sas_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.login.0.token_store_path"]},"validate_nonce":{"type":"bool","optional":true,"default":true}}},"required":true},"microsoft_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"twitter_v2":{"nesting_mode":3,"block":{"attributes":{"consumer_key":{"type":"string","required":true},"consumer_secret_setting_name":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]}}},"optional":true},"backup":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"storage_account_url":{"type":"string","required":true}},"block_types":{"schedule":{"nesting_mode":3,"block":{"attributes":{"frequency_interval":{"type":"number","required":true},"frequency_unit":{"type":"string","required":true},"keep_at_least_one_backup":{"type":"bool","optional":true,"default":false},"last_execution_time":{"type":"string","computed":true},"retention_period_days":{"type":"number","optional":true,"default":30},"start_time":{"type":"string","optional":true,"computed":true}}},"required":true}}},"optional":true},"connection_string":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"type":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"site_config":{"nesting_mode":3,"block":{"attributes":{"always_on":{"type":"bool","optional":true,"computed":true},"api_definition_url":{"type":"string","optional":true},"api_management_api_id":{"type":"string","optional":true},"app_command_line":{"type":"string","optional":true},"app_scale_limit":{"type":"number","optional":true,"computed":true},"application_insights_connection_string":{"type":"string","optional":true},"application_insights_key":{"type":"string","optional":true},"default_documents":{"type":["list","string"],"optional":true,"computed":true},"detailed_error_logging_enabled":{"type":"bool","computed":true},"elastic_instance_minimum":{"type":"number","optional":true,"computed":true},"ftps_state":{"type":"string","optional":true,"default":"Disabled"},"health_check_eviction_time_in_min":{"type":"number","optional":true,"required_with":["site_config.0.health_check_path"]},"health_check_path":{"type":"string","optional":true,"required_with":["site_config.0.health_check_eviction_time_in_min"]},"http2_enabled":{"type":"bool","optional":true,"default":false},"ip_restriction_default_action":{"type":"string","optional":true,"default":"Allow"},"load_balancing_mode":{"type":"string","optional":true,"default":"LeastRequests"},"managed_pipeline_mode":{"type":"string","optional":true,"default":"Integrated"},"minimum_tls_version":{"type":"string","optional":true,"default":"1.2"},"pre_warmed_instance_count":{"type":"number","optional":true,"computed":true},"remote_debugging_enabled":{"type":"bool","optional":true,"default":false},"remote_debugging_version":{"type":"string","optional":true,"computed":true},"runtime_scale_monitoring_enabled":{"type":"bool","optional":true},"scm_ip_restriction_default_action":{"type":"string","optional":true,"default":"Allow"},"scm_minimum_tls_version":{"type":"string","optional":true,"default":"1.2"},"scm_type":{"type":"string","computed":true},"scm_use_main_ip_restriction":{"type":"bool","optional":true,"default":false},"use_32_bit_worker":{"type":"bool","optional":true,"default":true},"vnet_route_all_enabled":{"type":"bool","optional":true,"default":false},"websockets_enabled":{"type":"bool","optional":true,"default":false},"windows_fx_version":{"type":"string","computed":true},"worker_count":{"type":"number","optional":true,"computed":true}},"block_types":{"app_service_logs":{"nesting_mode":3,"block":{"attributes":{"disk_quota_mb":{"type":"number","optional":true,"default":35},"retention_period_days":{"type":"number","optional":true}}},"optional":true},"application_stack":{"nesting_mode":3,"block":{"attributes":{"dotnet_version":{"type":"string","optional":true,"default":"v4.0","exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.use_custom_runtime"]},"java_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.use_custom_runtime"]},"node_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.use_custom_runtime"]},"powershell_core_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.use_custom_runtime"]},"use_custom_runtime":{"type":"bool","optional":true,"computed":true,"exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.use_custom_runtime"]},"use_dotnet_isolated_runtime":{"type":"bool","optional":true,"computed":true,"conflicts_with":["site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.use_custom_runtime"]}}},"optional":true,"computed":true},"cors":{"nesting_mode":3,"block":{"attributes":{"allowed_origins":{"type":["set","string"],"optional":true},"support_credentials":{"type":"bool","optional":true,"default":false}}},"optional":true},"ip_restriction":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"default":"Allow"},"description":{"type":"string","optional":true},"headers":{"type":["list",["object",{"x_azure_fdid":["list","string"],"x_fd_health_probe":["list","string"],"x_forwarded_for":["list","string"],"x_forwarded_host":["list","string"]}]],"optional":true},"ip_address":{"type":"string","optional":true},"name":{"type":"string","optional":true,"computed":true},"priority":{"type":"number","optional":true,"default":65000},"service_tag":{"type":"string","optional":true},"virtual_network_subnet_id":{"type":"string","optional":true}}},"optional":true},"scm_ip_restriction":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"default":"Allow"},"description":{"type":"string","optional":true},"headers":{"type":["list",["object",{"x_azure_fdid":["list","string"],"x_fd_health_probe":["list","string"],"x_forwarded_for":["list","string"],"x_forwarded_host":["list","string"]}]],"optional":true},"ip_address":{"type":"string","optional":true},"name":{"type":"string","optional":true,"computed":true},"priority":{"type":"number","optional":true,"default":65000},"service_tag":{"type":"string","optional":true},"virtual_network_subnet_id":{"type":"string","optional":true}}},"optional":true}}},"required":true},"sticky_settings":{"nesting_mode":3,"block":{"attributes":{"app_setting_names":{"type":["list","string"],"optional":true,"at_least_one_of":["sticky_settings.0.app_setting_names","sticky_settings.0.connection_string_names"]},"connection_string_names":{"type":["list","string"],"optional":true,"at_least_one_of":["sticky_settings.0.app_setting_names","sticky_settings.0.connection_string_names"]}}},"optional":true},"storage_account":{"nesting_mode":4,"block":{"attributes":{"access_key":{"type":"string","required":true},"account_name":{"type":"string","required":true},"mount_path":{"type":"string","optional":true},"name":{"type":"string","required":true},"share_name":{"type":"string","required":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_windows_function_app_slot":{"block":{"attributes":{"app_settings":{"type":["map","string"],"optional":true},"builtin_logging_enabled":{"type":"bool","optional":true,"default":true},"client_certificate_enabled":{"type":"bool","optional":true,"default":false},"client_certificate_exclusion_paths":{"type":"string","optional":true},"client_certificate_mode":{"type":"string","optional":true,"default":"Optional"},"content_share_force_disabled":{"type":"bool","optional":true,"default":false},"custom_domain_verification_id":{"type":"string","computed":true},"daily_memory_time_quota":{"type":"number","optional":true,"default":0},"default_hostname":{"type":"string","computed":true},"enabled":{"type":"bool","optional":true,"default":true},"ftp_publish_basic_authentication_enabled":{"type":"bool","optional":true,"default":true},"function_app_id":{"type":"string","required":true},"functions_extension_version":{"type":"string","optional":true,"default":"~4"},"hosting_environment_id":{"type":"string","computed":true},"https_only":{"type":"bool","optional":true,"default":false},"key_vault_reference_identity_id":{"type":"string","optional":true,"computed":true},"kind":{"type":"string","computed":true},"name":{"type":"string","required":true},"outbound_ip_address_list":{"type":["list","string"],"computed":true},"outbound_ip_addresses":{"type":"string","computed":true},"possible_outbound_ip_address_list":{"type":["list","string"],"computed":true},"possible_outbound_ip_addresses":{"type":"string","computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"service_plan_id":{"type":"string","optional":true},"site_credential":{"type":["list",["object",{"name":"string","password":"string"}]],"computed":true},"storage_account_access_key":{"type":"string","optional":true,"conflicts_with":["storage_uses_managed_identity","storage_key_vault_secret_id"]},"storage_account_name":{"type":"string","optional":true,"exactly_one_of":["storage_account_name","storage_key_vault_secret_id"]},"storage_key_vault_secret_id":{"type":"string","optional":true,"exactly_one_of":["storage_account_name","storage_key_vault_secret_id"]},"storage_uses_managed_identity":{"type":"bool","optional":true,"default":false,"conflicts_with":["storage_account_access_key","storage_key_vault_secret_id"]},"tags":{"type":["map","string"],"optional":true},"virtual_network_subnet_id":{"type":"string","optional":true},"vnet_image_pull_enabled":{"type":"bool","optional":true,"default":false},"webdeploy_publish_basic_authentication_enabled":{"type":"bool","optional":true,"default":true}},"block_types":{"auth_settings":{"nesting_mode":3,"block":{"attributes":{"additional_login_parameters":{"type":["map","string"],"optional":true},"allowed_external_redirect_urls":{"type":["list","string"],"optional":true,"computed":true},"default_provider":{"type":"string","optional":true,"computed":true},"enabled":{"type":"bool","required":true},"issuer":{"type":"string","optional":true},"runtime_version":{"type":"string","optional":true,"computed":true},"token_refresh_extension_hours":{"type":"number","optional":true,"default":72},"token_store_enabled":{"type":"bool","optional":true,"default":false},"unauthenticated_client_action":{"type":"string","optional":true,"computed":true}},"block_types":{"active_directory":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"conflicts_with":["auth_settings.0.active_directory.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings.0.active_directory.0.client_secret"]}}},"optional":true},"facebook":{"nesting_mode":3,"block":{"attributes":{"app_id":{"type":"string","required":true},"app_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.facebook.0.app_secret","auth_settings.0.facebook.0.app_secret_setting_name"]},"app_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.facebook.0.app_secret","auth_settings.0.facebook.0.app_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"github":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.github.0.client_secret","auth_settings.0.github.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.github.0.client_secret","auth_settings.0.github.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"google":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.google.0.client_secret","auth_settings.0.google.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.google.0.client_secret","auth_settings.0.google.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"microsoft":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.microsoft.0.client_secret","auth_settings.0.microsoft.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.microsoft.0.client_secret","auth_settings.0.microsoft.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"twitter":{"nesting_mode":3,"block":{"attributes":{"consumer_key":{"type":"string","required":true},"consumer_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.twitter.0.consumer_secret","auth_settings.0.twitter.0.consumer_secret_setting_name"]},"consumer_secret_setting_name":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"auth_settings_v2":{"nesting_mode":3,"block":{"attributes":{"auth_enabled":{"type":"bool","optional":true},"config_file_path":{"type":"string","optional":true},"default_provider":{"type":"string","optional":true},"excluded_paths":{"type":["list","string"],"optional":true},"forward_proxy_convention":{"type":"string","optional":true,"default":"NoProxy"},"forward_proxy_custom_host_header_name":{"type":"string","optional":true},"forward_proxy_custom_scheme_header_name":{"type":"string","optional":true},"http_route_api_prefix":{"type":"string","optional":true,"default":"/.auth"},"require_authentication":{"type":"bool","optional":true},"require_https":{"type":"bool","optional":true,"default":true},"runtime_version":{"type":"string","optional":true,"default":"~1"},"unauthenticated_action":{"type":"string","optional":true,"default":"RedirectToLoginPage"}},"block_types":{"active_directory_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_applications":{"type":["list","string"],"optional":true},"allowed_audiences":{"type":["list","string"],"optional":true},"allowed_groups":{"type":["list","string"],"optional":true},"allowed_identities":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_certificate_thumbprint":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.active_directory_v2.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.active_directory_v2.0.client_secret_certificate_thumbprint"]},"jwt_allowed_client_applications":{"type":["list","string"],"optional":true},"jwt_allowed_groups":{"type":["list","string"],"optional":true},"login_parameters":{"type":["map","string"],"optional":true},"tenant_auth_endpoint":{"type":"string","required":true},"www_authentication_disabled":{"type":"bool","optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"apple_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"computed":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"azure_static_web_app_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"custom_oidc_v2":{"nesting_mode":3,"block":{"attributes":{"authorisation_endpoint":{"type":"string","computed":true},"certification_uri":{"type":"string","computed":true},"client_credential_method":{"type":"string","computed":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","computed":true},"issuer_endpoint":{"type":"string","computed":true},"name":{"type":"string","required":true},"name_claim_type":{"type":"string","optional":true},"openid_configuration_endpoint":{"type":"string","required":true},"scopes":{"type":["list","string"],"optional":true},"token_endpoint":{"type":"string","computed":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"facebook_v2":{"nesting_mode":3,"block":{"attributes":{"app_id":{"type":"string","required":true},"app_secret_setting_name":{"type":"string","required":true},"graph_api_version":{"type":"string","optional":true,"computed":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"github_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"google_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"login":{"nesting_mode":3,"block":{"attributes":{"allowed_external_redirect_urls":{"type":["list","string"],"optional":true},"cookie_expiration_convention":{"type":"string","optional":true,"default":"FixedTime"},"cookie_expiration_time":{"type":"string","optional":true,"default":"08:00:00"},"logout_endpoint":{"type":"string","optional":true},"nonce_expiration_time":{"type":"string","optional":true,"default":"00:05:00"},"preserve_url_fragments_for_logins":{"type":"bool","optional":true,"default":false},"token_refresh_extension_time":{"type":"number","optional":true,"default":72},"token_store_enabled":{"type":"bool","optional":true,"default":false},"token_store_path":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.login.0.token_store_sas_setting_name"]},"token_store_sas_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.login.0.token_store_path"]},"validate_nonce":{"type":"bool","optional":true,"default":true}}},"required":true},"microsoft_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"twitter_v2":{"nesting_mode":3,"block":{"attributes":{"consumer_key":{"type":"string","required":true},"consumer_secret_setting_name":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]}}},"optional":true},"backup":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"storage_account_url":{"type":"string","required":true}},"block_types":{"schedule":{"nesting_mode":3,"block":{"attributes":{"frequency_interval":{"type":"number","required":true},"frequency_unit":{"type":"string","required":true},"keep_at_least_one_backup":{"type":"bool","optional":true,"default":false},"last_execution_time":{"type":"string","computed":true},"retention_period_days":{"type":"number","optional":true,"default":30},"start_time":{"type":"string","optional":true,"computed":true}}},"required":true}}},"optional":true},"connection_string":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"type":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"site_config":{"nesting_mode":3,"block":{"attributes":{"always_on":{"type":"bool","optional":true,"computed":true},"api_definition_url":{"type":"string","optional":true},"api_management_api_id":{"type":"string","optional":true},"app_command_line":{"type":"string","optional":true},"app_scale_limit":{"type":"number","optional":true,"computed":true},"application_insights_connection_string":{"type":"string","optional":true},"application_insights_key":{"type":"string","optional":true},"auto_swap_slot_name":{"type":"string","optional":true},"default_documents":{"type":["list","string"],"optional":true,"computed":true},"detailed_error_logging_enabled":{"type":"bool","computed":true},"elastic_instance_minimum":{"type":"number","optional":true,"computed":true},"ftps_state":{"type":"string","optional":true,"default":"Disabled"},"health_check_eviction_time_in_min":{"type":"number","optional":true,"default":0},"health_check_path":{"type":"string","optional":true},"http2_enabled":{"type":"bool","optional":true,"default":false},"ip_restriction_default_action":{"type":"string","optional":true,"default":"Allow"},"load_balancing_mode":{"type":"string","optional":true,"default":"LeastRequests"},"managed_pipeline_mode":{"type":"string","optional":true,"default":"Integrated"},"minimum_tls_version":{"type":"string","optional":true,"default":"1.2"},"pre_warmed_instance_count":{"type":"number","optional":true,"computed":true},"remote_debugging_enabled":{"type":"bool","optional":true,"default":false},"remote_debugging_version":{"type":"string","optional":true,"computed":true},"runtime_scale_monitoring_enabled":{"type":"bool","optional":true},"scm_ip_restriction_default_action":{"type":"string","optional":true,"default":"Allow"},"scm_minimum_tls_version":{"type":"string","optional":true,"default":"1.2"},"scm_type":{"type":"string","computed":true},"scm_use_main_ip_restriction":{"type":"bool","optional":true,"default":false},"use_32_bit_worker":{"type":"bool","optional":true,"default":true},"vnet_route_all_enabled":{"type":"bool","optional":true,"default":false},"websockets_enabled":{"type":"bool","optional":true,"default":false},"windows_fx_version":{"type":"string","computed":true},"worker_count":{"type":"number","optional":true,"computed":true}},"block_types":{"app_service_logs":{"nesting_mode":3,"block":{"attributes":{"disk_quota_mb":{"type":"number","optional":true,"default":35},"retention_period_days":{"type":"number","optional":true}}},"optional":true},"application_stack":{"nesting_mode":3,"block":{"attributes":{"dotnet_version":{"type":"string","optional":true,"default":"v4.0","exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.use_custom_runtime"]},"java_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.use_custom_runtime"]},"node_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.use_custom_runtime"]},"powershell_core_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.use_custom_runtime"]},"use_custom_runtime":{"type":"bool","optional":true,"computed":true,"exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.use_custom_runtime"]},"use_dotnet_isolated_runtime":{"type":"bool","optional":true,"computed":true,"conflicts_with":["site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.use_custom_runtime"]}}},"optional":true,"computed":true},"cors":{"nesting_mode":3,"block":{"attributes":{"allowed_origins":{"type":["set","string"],"optional":true},"support_credentials":{"type":"bool","optional":true,"default":false}}},"optional":true},"ip_restriction":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"default":"Allow"},"description":{"type":"string","optional":true},"headers":{"type":["list",["object",{"x_azure_fdid":["list","string"],"x_fd_health_probe":["list","string"],"x_forwarded_for":["list","string"],"x_forwarded_host":["list","string"]}]],"optional":true},"ip_address":{"type":"string","optional":true},"name":{"type":"string","optional":true,"computed":true},"priority":{"type":"number","optional":true,"default":65000},"service_tag":{"type":"string","optional":true},"virtual_network_subnet_id":{"type":"string","optional":true}}},"optional":true},"scm_ip_restriction":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"default":"Allow"},"description":{"type":"string","optional":true},"headers":{"type":["list",["object",{"x_azure_fdid":["list","string"],"x_fd_health_probe":["list","string"],"x_forwarded_for":["list","string"],"x_forwarded_host":["list","string"]}]],"optional":true},"ip_address":{"type":"string","optional":true},"name":{"type":"string","optional":true,"computed":true},"priority":{"type":"number","optional":true,"default":65000},"service_tag":{"type":"string","optional":true},"virtual_network_subnet_id":{"type":"string","optional":true}}},"optional":true}}},"required":true},"storage_account":{"nesting_mode":4,"block":{"attributes":{"access_key":{"type":"string","required":true},"account_name":{"type":"string","required":true},"mount_path":{"type":"string","optional":true},"name":{"type":"string","required":true},"share_name":{"type":"string","required":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_windows_virtual_machine":{"block":{"attributes":{"admin_password":{"type":"string","required":true},"admin_username":{"type":"string","required":true},"allow_extension_operations":{"type":"bool","optional":true,"default":true},"availability_set_id":{"type":"string","optional":true,"conflicts_with":["capacity_reservation_group_id","virtual_machine_scale_set_id","zone"]},"bypass_platform_safety_checks_on_user_schedule_enabled":{"type":"bool","optional":true,"default":false},"capacity_reservation_group_id":{"type":"string","optional":true,"conflicts_with":["availability_set_id","proximity_placement_group_id"]},"computer_name":{"type":"string","optional":true,"computed":true},"custom_data":{"type":"string","optional":true},"dedicated_host_group_id":{"type":"string","optional":true,"conflicts_with":["dedicated_host_id"]},"dedicated_host_id":{"type":"string","optional":true,"conflicts_with":["dedicated_host_group_id"]},"disk_controller_type":{"type":"string","optional":true,"computed":true},"edge_zone":{"type":"string","optional":true},"enable_automatic_updates":{"type":"bool","optional":true,"default":true},"encryption_at_host_enabled":{"type":"bool","optional":true},"eviction_policy":{"type":"string","optional":true},"extensions_time_budget":{"type":"string","optional":true,"default":"PT1H30M"},"hotpatching_enabled":{"type":"bool","optional":true,"default":false},"license_type":{"type":"string","optional":true},"location":{"type":"string","required":true},"max_bid_price":{"type":"number","optional":true,"default":-1},"name":{"type":"string","required":true},"network_interface_ids":{"type":["list","string"],"required":true},"patch_assessment_mode":{"type":"string","optional":true,"default":"ImageDefault"},"patch_mode":{"type":"string","optional":true,"default":"AutomaticByOS"},"platform_fault_domain":{"type":"number","optional":true,"default":-1,"required_with":["virtual_machine_scale_set_id"]},"priority":{"type":"string","optional":true,"default":"Regular"},"private_ip_address":{"type":"string","computed":true},"private_ip_addresses":{"type":["list","string"],"computed":true},"provision_vm_agent":{"type":"bool","optional":true,"default":true},"proximity_placement_group_id":{"type":"string","optional":true,"conflicts_with":["capacity_reservation_group_id"]},"public_ip_address":{"type":"string","computed":true},"public_ip_addresses":{"type":["list","string"],"computed":true},"reboot_setting":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"secure_boot_enabled":{"type":"bool","optional":true},"size":{"type":"string","required":true},"source_image_id":{"type":"string","optional":true,"exactly_one_of":["source_image_id","source_image_reference"]},"tags":{"type":["map","string"],"optional":true},"timezone":{"type":"string","optional":true},"user_data":{"type":"string","optional":true},"virtual_machine_id":{"type":"string","computed":true},"virtual_machine_scale_set_id":{"type":"string","optional":true,"conflicts_with":["availability_set_id"]},"vm_agent_platform_updates_enabled":{"type":"bool","optional":true,"default":false},"vtpm_enabled":{"type":"bool","optional":true},"zone":{"type":"string","optional":true}},"block_types":{"additional_capabilities":{"nesting_mode":3,"block":{"attributes":{"hibernation_enabled":{"type":"bool","optional":true,"default":false},"ultra_ssd_enabled":{"type":"bool","optional":true,"default":false}}},"optional":true},"additional_unattend_content":{"nesting_mode":3,"block":{"attributes":{"content":{"type":"string","required":true},"setting":{"type":"string","required":true}}},"optional":true},"boot_diagnostics":{"nesting_mode":3,"block":{"attributes":{"storage_account_uri":{"type":"string","optional":true}}},"optional":true},"gallery_application":{"nesting_mode":3,"block":{"attributes":{"automatic_upgrade_enabled":{"type":"bool","optional":true,"default":false},"configuration_blob_uri":{"type":"string","optional":true},"order":{"type":"number","optional":true,"default":0},"tag":{"type":"string","optional":true},"treat_failure_as_deployment_failure_enabled":{"type":"bool","optional":true,"default":false},"version_id":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"os_disk":{"nesting_mode":3,"block":{"attributes":{"caching":{"type":"string","required":true},"disk_encryption_set_id":{"type":"string","optional":true,"conflicts_with":["os_disk.0.secure_vm_disk_encryption_set_id"]},"disk_size_gb":{"type":"number","optional":true,"computed":true},"name":{"type":"string","optional":true,"computed":true},"secure_vm_disk_encryption_set_id":{"type":"string","optional":true,"conflicts_with":["os_disk.0.disk_encryption_set_id"]},"security_encryption_type":{"type":"string","optional":true},"storage_account_type":{"type":"string","required":true},"write_accelerator_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"diff_disk_settings":{"nesting_mode":3,"block":{"attributes":{"option":{"type":"string","required":true},"placement":{"type":"string","optional":true,"default":"CacheDisk"}}},"optional":true}}},"required":true},"os_image_notification":{"nesting_mode":3,"block":{"attributes":{"timeout":{"type":"string","optional":true,"default":"PT15M"}}},"optional":true},"plan":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"product":{"type":"string","required":true},"publisher":{"type":"string","required":true}}},"optional":true},"secret":{"nesting_mode":3,"block":{"attributes":{"key_vault_id":{"type":"string","required":true}},"block_types":{"certificate":{"nesting_mode":4,"block":{"attributes":{"store":{"type":"string","required":true},"url":{"type":"string","required":true}}},"required":true}}},"optional":true},"source_image_reference":{"nesting_mode":3,"block":{"attributes":{"offer":{"type":"string","required":true},"publisher":{"type":"string","required":true},"sku":{"type":"string","required":true},"version":{"type":"string","required":true}}},"optional":true,"exactly_one_of":["source_image_id","source_image_reference"]},"termination_notification":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","required":true},"timeout":{"type":"string","optional":true,"default":"PT5M"}}},"optional":true,"computed":true},"winrm_listener":{"nesting_mode":4,"block":{"attributes":{"certificate_url":{"type":"string","optional":true},"protocol":{"type":"string","required":true}}},"optional":true}}}},"azurerm_windows_virtual_machine_scale_set":{"block":{"attributes":{"admin_password":{"type":"string","required":true},"admin_username":{"type":"string","required":true},"capacity_reservation_group_id":{"type":"string","optional":true,"conflicts_with":["proximity_placement_group_id"]},"computer_name_prefix":{"type":"string","optional":true,"computed":true},"custom_data":{"type":"string","optional":true},"do_not_run_extensions_on_overprovisioned_machines":{"type":"bool","optional":true,"default":false},"edge_zone":{"type":"string","optional":true},"enable_automatic_updates":{"type":"bool","optional":true,"default":true},"encryption_at_host_enabled":{"type":"bool","optional":true},"eviction_policy":{"type":"string","optional":true},"extension_operations_enabled":{"type":"bool","optional":true,"default":true},"extensions_time_budget":{"type":"string","optional":true,"default":"PT1H30M"},"health_probe_id":{"type":"string","optional":true},"host_group_id":{"type":"string","optional":true},"instances":{"type":"number","required":true},"license_type":{"type":"string","optional":true},"location":{"type":"string","required":true},"max_bid_price":{"type":"number","optional":true,"default":-1},"name":{"type":"string","required":true},"overprovision":{"type":"bool","optional":true,"default":true},"platform_fault_domain_count":{"type":"number","optional":true,"computed":true},"priority":{"type":"string","optional":true,"default":"Regular"},"provision_vm_agent":{"type":"bool","optional":true,"default":true},"proximity_placement_group_id":{"type":"string","optional":true,"conflicts_with":["capacity_reservation_group_id"]},"resource_group_name":{"type":"string","required":true},"secure_boot_enabled":{"type":"bool","optional":true},"single_placement_group":{"type":"bool","optional":true,"default":true},"sku":{"type":"string","required":true},"source_image_id":{"type":"string","optional":true,"exactly_one_of":["source_image_id","source_image_reference"]},"tags":{"type":["map","string"],"optional":true},"timezone":{"type":"string","optional":true},"unique_id":{"type":"string","computed":true},"upgrade_mode":{"type":"string","optional":true,"default":"Manual"},"user_data":{"type":"string","optional":true},"vtpm_enabled":{"type":"bool","optional":true},"zone_balance":{"type":"bool","optional":true,"default":false},"zones":{"type":["set","string"],"optional":true}},"block_types":{"additional_capabilities":{"nesting_mode":3,"block":{"attributes":{"ultra_ssd_enabled":{"type":"bool","optional":true,"default":false}}},"optional":true},"additional_unattend_content":{"nesting_mode":3,"block":{"attributes":{"content":{"type":"string","required":true},"setting":{"type":"string","required":true}}},"optional":true},"automatic_instance_repair":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"computed":true},"enabled":{"type":"bool","required":true},"grace_period":{"type":"string","optional":true,"computed":true}}},"optional":true,"computed":true},"automatic_os_upgrade_policy":{"nesting_mode":3,"block":{"attributes":{"disable_automatic_rollback":{"type":"bool","required":true},"enable_automatic_os_upgrade":{"type":"bool","required":true}}},"optional":true},"boot_diagnostics":{"nesting_mode":3,"block":{"attributes":{"storage_account_uri":{"type":"string","optional":true}}},"optional":true},"data_disk":{"nesting_mode":3,"block":{"attributes":{"caching":{"type":"string","required":true},"create_option":{"type":"string","optional":true,"default":"Empty"},"disk_encryption_set_id":{"type":"string","optional":true},"disk_size_gb":{"type":"number","required":true},"lun":{"type":"number","required":true},"name":{"type":"string","optional":true},"storage_account_type":{"type":"string","required":true},"ultra_ssd_disk_iops_read_write":{"type":"number","optional":true,"computed":true},"ultra_ssd_disk_mbps_read_write":{"type":"number","optional":true,"computed":true},"write_accelerator_enabled":{"type":"bool","optional":true,"default":false}}},"optional":true},"extension":{"nesting_mode":4,"block":{"attributes":{"auto_upgrade_minor_version":{"type":"bool","optional":true,"default":true},"automatic_upgrade_enabled":{"type":"bool","optional":true,"default":false},"force_update_tag":{"type":"string","optional":true},"name":{"type":"string","required":true},"protected_settings":{"type":"string","optional":true},"provision_after_extensions":{"type":["list","string"],"optional":true},"publisher":{"type":"string","required":true},"settings":{"type":"string","optional":true},"type":{"type":"string","required":true},"type_handler_version":{"type":"string","required":true}},"block_types":{"protected_settings_from_key_vault":{"nesting_mode":3,"block":{"attributes":{"secret_url":{"type":"string","required":true},"source_vault_id":{"type":"string","required":true}}},"optional":true}}},"optional":true,"computed":true},"gallery_application":{"nesting_mode":3,"block":{"attributes":{"configuration_blob_uri":{"type":"string","optional":true},"order":{"type":"number","optional":true,"default":0},"tag":{"type":"string","optional":true},"version_id":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"network_interface":{"nesting_mode":3,"block":{"attributes":{"dns_servers":{"type":["list","string"],"optional":true},"enable_accelerated_networking":{"type":"bool","optional":true,"default":false},"enable_ip_forwarding":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"network_security_group_id":{"type":"string","optional":true},"primary":{"type":"bool","optional":true,"default":false}},"block_types":{"ip_configuration":{"nesting_mode":3,"block":{"attributes":{"application_gateway_backend_address_pool_ids":{"type":["set","string"],"optional":true},"application_security_group_ids":{"type":["set","string"],"optional":true},"load_balancer_backend_address_pool_ids":{"type":["set","string"],"optional":true},"load_balancer_inbound_nat_rules_ids":{"type":["set","string"],"optional":true},"name":{"type":"string","required":true},"primary":{"type":"bool","optional":true,"default":false},"subnet_id":{"type":"string","optional":true},"version":{"type":"string","optional":true,"default":"IPv4"}},"block_types":{"public_ip_address":{"nesting_mode":3,"block":{"attributes":{"domain_name_label":{"type":"string","optional":true},"idle_timeout_in_minutes":{"type":"number","optional":true,"computed":true},"name":{"type":"string","required":true},"public_ip_prefix_id":{"type":"string","optional":true},"version":{"type":"string","optional":true,"default":"IPv4"}},"block_types":{"ip_tag":{"nesting_mode":3,"block":{"attributes":{"tag":{"type":"string","required":true},"type":{"type":"string","required":true}}},"optional":true}}},"optional":true}}},"required":true}}},"required":true},"os_disk":{"nesting_mode":3,"block":{"attributes":{"caching":{"type":"string","required":true},"disk_encryption_set_id":{"type":"string","optional":true,"conflicts_with":["os_disk.0.secure_vm_disk_encryption_set_id"]},"disk_size_gb":{"type":"number","optional":true,"computed":true},"secure_vm_disk_encryption_set_id":{"type":"string","optional":true,"conflicts_with":["os_disk.0.disk_encryption_set_id"]},"security_encryption_type":{"type":"string","optional":true},"storage_account_type":{"type":"string","required":true},"write_accelerator_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"diff_disk_settings":{"nesting_mode":3,"block":{"attributes":{"option":{"type":"string","required":true},"placement":{"type":"string","optional":true,"default":"CacheDisk"}}},"optional":true}}},"required":true},"plan":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"product":{"type":"string","required":true},"publisher":{"type":"string","required":true}}},"optional":true},"rolling_upgrade_policy":{"nesting_mode":3,"block":{"attributes":{"cross_zone_upgrades_enabled":{"type":"bool","optional":true},"max_batch_instance_percent":{"type":"number","required":true},"max_unhealthy_instance_percent":{"type":"number","required":true},"max_unhealthy_upgraded_instance_percent":{"type":"number","required":true},"maximum_surge_instances_enabled":{"type":"bool","optional":true},"pause_time_between_batches":{"type":"string","required":true},"prioritize_unhealthy_instances_enabled":{"type":"bool","optional":true}}},"optional":true},"scale_in":{"nesting_mode":3,"block":{"attributes":{"force_deletion_enabled":{"type":"bool","optional":true,"default":false},"rule":{"type":"string","optional":true,"default":"Default"}}},"optional":true},"secret":{"nesting_mode":3,"block":{"attributes":{"key_vault_id":{"type":"string","required":true}},"block_types":{"certificate":{"nesting_mode":4,"block":{"attributes":{"store":{"type":"string","required":true},"url":{"type":"string","required":true}}},"required":true}}},"optional":true},"source_image_reference":{"nesting_mode":3,"block":{"attributes":{"offer":{"type":"string","required":true},"publisher":{"type":"string","required":true},"sku":{"type":"string","required":true},"version":{"type":"string","required":true}}},"optional":true,"exactly_one_of":["source_image_id","source_image_reference"]},"spot_restore":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":false},"timeout":{"type":"string","optional":true,"default":"PT1H"}}},"optional":true,"computed":true},"termination_notification":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","required":true},"timeout":{"type":"string","optional":true,"default":"PT5M"}}},"optional":true,"computed":true},"winrm_listener":{"nesting_mode":4,"block":{"attributes":{"certificate_url":{"type":"string","optional":true},"protocol":{"type":"string","required":true}}},"optional":true}}}},"azurerm_windows_web_app":{"block":{"attributes":{"app_settings":{"type":["map","string"],"optional":true},"client_affinity_enabled":{"type":"bool","optional":true,"default":false},"client_certificate_enabled":{"type":"bool","optional":true,"default":false},"client_certificate_exclusion_paths":{"type":"string","optional":true},"client_certificate_mode":{"type":"string","optional":true,"default":"Required"},"custom_domain_verification_id":{"type":"string","computed":true},"default_hostname":{"type":"string","computed":true},"enabled":{"type":"bool","optional":true,"default":true},"ftp_publish_basic_authentication_enabled":{"type":"bool","optional":true,"default":true},"hosting_environment_id":{"type":"string","computed":true},"https_only":{"type":"bool","optional":true,"default":false},"key_vault_reference_identity_id":{"type":"string","optional":true,"computed":true},"kind":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"outbound_ip_address_list":{"type":["list","string"],"computed":true},"outbound_ip_addresses":{"type":"string","computed":true},"possible_outbound_ip_address_list":{"type":["list","string"],"computed":true},"possible_outbound_ip_addresses":{"type":"string","computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"service_plan_id":{"type":"string","required":true},"site_credential":{"type":["list",["object",{"name":"string","password":"string"}]],"computed":true},"tags":{"type":["map","string"],"optional":true},"virtual_network_subnet_id":{"type":"string","optional":true},"webdeploy_publish_basic_authentication_enabled":{"type":"bool","optional":true,"default":true},"zip_deploy_file":{"type":"string","optional":true,"computed":true}},"block_types":{"auth_settings":{"nesting_mode":3,"block":{"attributes":{"additional_login_parameters":{"type":["map","string"],"optional":true},"allowed_external_redirect_urls":{"type":["list","string"],"optional":true,"computed":true},"default_provider":{"type":"string","optional":true,"computed":true},"enabled":{"type":"bool","required":true},"issuer":{"type":"string","optional":true},"runtime_version":{"type":"string","optional":true,"computed":true},"token_refresh_extension_hours":{"type":"number","optional":true,"default":72},"token_store_enabled":{"type":"bool","optional":true,"default":false},"unauthenticated_client_action":{"type":"string","optional":true,"computed":true}},"block_types":{"active_directory":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"conflicts_with":["auth_settings.0.active_directory.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings.0.active_directory.0.client_secret"]}}},"optional":true},"facebook":{"nesting_mode":3,"block":{"attributes":{"app_id":{"type":"string","required":true},"app_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.facebook.0.app_secret","auth_settings.0.facebook.0.app_secret_setting_name"]},"app_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.facebook.0.app_secret","auth_settings.0.facebook.0.app_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"github":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.github.0.client_secret","auth_settings.0.github.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.github.0.client_secret","auth_settings.0.github.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"google":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.google.0.client_secret","auth_settings.0.google.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.google.0.client_secret","auth_settings.0.google.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"microsoft":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.microsoft.0.client_secret","auth_settings.0.microsoft.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.microsoft.0.client_secret","auth_settings.0.microsoft.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"twitter":{"nesting_mode":3,"block":{"attributes":{"consumer_key":{"type":"string","required":true},"consumer_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.twitter.0.consumer_secret","auth_settings.0.twitter.0.consumer_secret_setting_name"]},"consumer_secret_setting_name":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"auth_settings_v2":{"nesting_mode":3,"block":{"attributes":{"auth_enabled":{"type":"bool","optional":true},"config_file_path":{"type":"string","optional":true},"default_provider":{"type":"string","optional":true},"excluded_paths":{"type":["list","string"],"optional":true},"forward_proxy_convention":{"type":"string","optional":true,"default":"NoProxy"},"forward_proxy_custom_host_header_name":{"type":"string","optional":true},"forward_proxy_custom_scheme_header_name":{"type":"string","optional":true},"http_route_api_prefix":{"type":"string","optional":true,"default":"/.auth"},"require_authentication":{"type":"bool","optional":true},"require_https":{"type":"bool","optional":true,"default":true},"runtime_version":{"type":"string","optional":true,"default":"~1"},"unauthenticated_action":{"type":"string","optional":true,"default":"RedirectToLoginPage"}},"block_types":{"active_directory_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_applications":{"type":["list","string"],"optional":true},"allowed_audiences":{"type":["list","string"],"optional":true},"allowed_groups":{"type":["list","string"],"optional":true},"allowed_identities":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_certificate_thumbprint":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.active_directory_v2.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.active_directory_v2.0.client_secret_certificate_thumbprint"]},"jwt_allowed_client_applications":{"type":["list","string"],"optional":true},"jwt_allowed_groups":{"type":["list","string"],"optional":true},"login_parameters":{"type":["map","string"],"optional":true},"tenant_auth_endpoint":{"type":"string","required":true},"www_authentication_disabled":{"type":"bool","optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"apple_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"computed":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"azure_static_web_app_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"custom_oidc_v2":{"nesting_mode":3,"block":{"attributes":{"authorisation_endpoint":{"type":"string","computed":true},"certification_uri":{"type":"string","computed":true},"client_credential_method":{"type":"string","computed":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","computed":true},"issuer_endpoint":{"type":"string","computed":true},"name":{"type":"string","required":true},"name_claim_type":{"type":"string","optional":true},"openid_configuration_endpoint":{"type":"string","required":true},"scopes":{"type":["list","string"],"optional":true},"token_endpoint":{"type":"string","computed":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"facebook_v2":{"nesting_mode":3,"block":{"attributes":{"app_id":{"type":"string","required":true},"app_secret_setting_name":{"type":"string","required":true},"graph_api_version":{"type":"string","optional":true,"computed":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"github_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"google_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"login":{"nesting_mode":3,"block":{"attributes":{"allowed_external_redirect_urls":{"type":["list","string"],"optional":true},"cookie_expiration_convention":{"type":"string","optional":true,"default":"FixedTime"},"cookie_expiration_time":{"type":"string","optional":true,"default":"08:00:00"},"logout_endpoint":{"type":"string","optional":true},"nonce_expiration_time":{"type":"string","optional":true,"default":"00:05:00"},"preserve_url_fragments_for_logins":{"type":"bool","optional":true,"default":false},"token_refresh_extension_time":{"type":"number","optional":true,"default":72},"token_store_enabled":{"type":"bool","optional":true,"default":false},"token_store_path":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.login.0.token_store_sas_setting_name"]},"token_store_sas_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.login.0.token_store_path"]},"validate_nonce":{"type":"bool","optional":true,"default":true}}},"required":true},"microsoft_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"twitter_v2":{"nesting_mode":3,"block":{"attributes":{"consumer_key":{"type":"string","required":true},"consumer_secret_setting_name":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]}}},"optional":true},"backup":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"storage_account_url":{"type":"string","required":true}},"block_types":{"schedule":{"nesting_mode":3,"block":{"attributes":{"frequency_interval":{"type":"number","required":true},"frequency_unit":{"type":"string","required":true},"keep_at_least_one_backup":{"type":"bool","optional":true,"default":false},"last_execution_time":{"type":"string","computed":true},"retention_period_days":{"type":"number","optional":true,"default":30},"start_time":{"type":"string","optional":true,"computed":true}}},"required":true}}},"optional":true},"connection_string":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"type":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"logs":{"nesting_mode":3,"block":{"attributes":{"detailed_error_messages":{"type":"bool","optional":true,"default":false},"failed_request_tracing":{"type":"bool","optional":true,"default":false}},"block_types":{"application_logs":{"nesting_mode":3,"block":{"attributes":{"file_system_level":{"type":"string","required":true}},"block_types":{"azure_blob_storage":{"nesting_mode":3,"block":{"attributes":{"level":{"type":"string","required":true},"retention_in_days":{"type":"number","required":true},"sas_url":{"type":"string","required":true}}},"optional":true}}},"optional":true},"http_logs":{"nesting_mode":3,"block":{"block_types":{"azure_blob_storage":{"nesting_mode":3,"block":{"attributes":{"retention_in_days":{"type":"number","optional":true,"default":0},"sas_url":{"type":"string","required":true}}},"optional":true,"conflicts_with":["logs.0.http_logs.0.file_system"]},"file_system":{"nesting_mode":3,"block":{"attributes":{"retention_in_days":{"type":"number","required":true},"retention_in_mb":{"type":"number","required":true}}},"optional":true,"conflicts_with":["logs.0.http_logs.0.azure_blob_storage"]}}},"optional":true}}},"optional":true},"site_config":{"nesting_mode":3,"block":{"attributes":{"always_on":{"type":"bool","optional":true,"default":true},"api_definition_url":{"type":"string","optional":true},"api_management_api_id":{"type":"string","optional":true},"app_command_line":{"type":"string","optional":true},"container_registry_managed_identity_client_id":{"type":"string","optional":true},"container_registry_use_managed_identity":{"type":"bool","optional":true,"default":false},"default_documents":{"type":["list","string"],"optional":true,"computed":true},"detailed_error_logging_enabled":{"type":"bool","computed":true},"ftps_state":{"type":"string","optional":true,"default":"Disabled"},"health_check_eviction_time_in_min":{"type":"number","optional":true,"required_with":["site_config.0.health_check_path"]},"health_check_path":{"type":"string","optional":true,"required_with":["site_config.0.health_check_eviction_time_in_min"]},"http2_enabled":{"type":"bool","optional":true,"default":false},"ip_restriction_default_action":{"type":"string","optional":true,"default":"Allow"},"linux_fx_version":{"type":"string","computed":true},"load_balancing_mode":{"type":"string","optional":true,"default":"LeastRequests"},"local_mysql_enabled":{"type":"bool","optional":true,"default":false},"managed_pipeline_mode":{"type":"string","optional":true,"default":"Integrated"},"minimum_tls_version":{"type":"string","optional":true,"default":"1.2"},"remote_debugging_enabled":{"type":"bool","optional":true,"default":false},"remote_debugging_version":{"type":"string","optional":true,"computed":true},"scm_ip_restriction_default_action":{"type":"string","optional":true,"default":"Allow"},"scm_minimum_tls_version":{"type":"string","optional":true,"default":"1.2"},"scm_type":{"type":"string","computed":true},"scm_use_main_ip_restriction":{"type":"bool","optional":true,"default":false},"use_32_bit_worker":{"type":"bool","optional":true,"default":true},"vnet_route_all_enabled":{"type":"bool","optional":true,"default":false},"websockets_enabled":{"type":"bool","optional":true,"default":false},"windows_fx_version":{"type":"string","computed":true},"worker_count":{"type":"number","optional":true,"computed":true}},"block_types":{"application_stack":{"nesting_mode":3,"block":{"attributes":{"current_stack":{"type":"string","optional":true,"computed":true},"docker_image_name":{"type":"string","optional":true,"at_least_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.dotnet_core_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python"]},"docker_registry_password":{"type":"string","optional":true},"docker_registry_url":{"type":"string","optional":true,"required_with":["site_config.0.application_stack.0.docker_image_name"]},"docker_registry_username":{"type":"string","optional":true},"dotnet_core_version":{"type":"string","optional":true,"at_least_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.dotnet_core_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python"]},"dotnet_version":{"type":"string","optional":true,"computed":true,"at_least_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.dotnet_core_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python"]},"java_container":{"type":"string","optional":true,"conflicts_with":["site_config.0.application_stack.0.tomcat_version"],"required_with":["site_config.0.application_stack.0.java_container_version"]},"java_container_version":{"type":"string","optional":true,"required_with":["site_config.0.application_stack.0.java_container"]},"java_embedded_server_enabled":{"type":"bool","optional":true,"computed":true,"conflicts_with":["site_config.0.application_stack.0.tomcat_version"],"required_with":["site_config.0.application_stack.0.java_version"]},"java_version":{"type":"string","optional":true,"at_least_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.dotnet_core_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python"]},"node_version":{"type":"string","optional":true,"at_least_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.dotnet_core_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python"]},"php_version":{"type":"string","optional":true,"computed":true,"at_least_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.dotnet_core_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python"]},"python":{"type":"bool","optional":true,"default":false,"at_least_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.dotnet_core_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python"]},"tomcat_version":{"type":"string","optional":true,"conflicts_with":["site_config.0.application_stack.0.java_embedded_server_enabled"],"required_with":["site_config.0.application_stack.0.java_version"]}}},"optional":true,"computed":true},"auto_heal_setting":{"nesting_mode":3,"block":{"block_types":{"action":{"nesting_mode":3,"block":{"attributes":{"action_type":{"type":"string","required":true},"minimum_process_execution_time":{"type":"string","optional":true,"computed":true}},"block_types":{"custom_action":{"nesting_mode":3,"block":{"attributes":{"executable":{"type":"string","required":true},"parameters":{"type":"string","optional":true}}},"optional":true}}},"required":true},"trigger":{"nesting_mode":3,"block":{"attributes":{"private_memory_kb":{"type":"number","optional":true}},"block_types":{"requests":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true},"interval":{"type":"string","required":true}}},"optional":true},"slow_request":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true},"interval":{"type":"string","required":true},"time_taken":{"type":"string","required":true}}},"optional":true},"slow_request_with_path":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true},"interval":{"type":"string","required":true},"path":{"type":"string","optional":true},"time_taken":{"type":"string","required":true}}},"optional":true},"status_code":{"nesting_mode":4,"block":{"attributes":{"count":{"type":"number","required":true},"interval":{"type":"string","required":true},"path":{"type":"string","optional":true},"status_code_range":{"type":"string","required":true},"sub_status":{"type":"number","optional":true},"win32_status_code":{"type":"number","optional":true}}},"optional":true}}},"required":true}}},"optional":true},"cors":{"nesting_mode":3,"block":{"attributes":{"allowed_origins":{"type":["set","string"],"optional":true},"support_credentials":{"type":"bool","optional":true,"default":false}}},"optional":true},"handler_mapping":{"nesting_mode":4,"block":{"attributes":{"arguments":{"type":"string","optional":true},"extension":{"type":"string","required":true},"script_processor_path":{"type":"string","required":true}}},"optional":true},"ip_restriction":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"default":"Allow"},"description":{"type":"string","optional":true},"headers":{"type":["list",["object",{"x_azure_fdid":["list","string"],"x_fd_health_probe":["list","string"],"x_forwarded_for":["list","string"],"x_forwarded_host":["list","string"]}]],"optional":true},"ip_address":{"type":"string","optional":true},"name":{"type":"string","optional":true,"computed":true},"priority":{"type":"number","optional":true,"default":65000},"service_tag":{"type":"string","optional":true},"virtual_network_subnet_id":{"type":"string","optional":true}}},"optional":true},"scm_ip_restriction":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"default":"Allow"},"description":{"type":"string","optional":true},"headers":{"type":["list",["object",{"x_azure_fdid":["list","string"],"x_fd_health_probe":["list","string"],"x_forwarded_for":["list","string"],"x_forwarded_host":["list","string"]}]],"optional":true},"ip_address":{"type":"string","optional":true},"name":{"type":"string","optional":true,"computed":true},"priority":{"type":"number","optional":true,"default":65000},"service_tag":{"type":"string","optional":true},"virtual_network_subnet_id":{"type":"string","optional":true}}},"optional":true},"virtual_application":{"nesting_mode":4,"block":{"attributes":{"physical_path":{"type":"string","required":true},"preload":{"type":"bool","required":true},"virtual_path":{"type":"string","required":true}},"block_types":{"virtual_directory":{"nesting_mode":4,"block":{"attributes":{"physical_path":{"type":"string","optional":true},"virtual_path":{"type":"string","optional":true}}},"optional":true}}},"optional":true}}},"required":true},"sticky_settings":{"nesting_mode":3,"block":{"attributes":{"app_setting_names":{"type":["list","string"],"optional":true,"at_least_one_of":["sticky_settings.0.app_setting_names","sticky_settings.0.connection_string_names"]},"connection_string_names":{"type":["list","string"],"optional":true,"at_least_one_of":["sticky_settings.0.app_setting_names","sticky_settings.0.connection_string_names"]}}},"optional":true},"storage_account":{"nesting_mode":4,"block":{"attributes":{"access_key":{"type":"string","required":true},"account_name":{"type":"string","required":true},"mount_path":{"type":"string","optional":true},"name":{"type":"string","required":true},"share_name":{"type":"string","required":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_windows_web_app_slot":{"block":{"attributes":{"app_service_id":{"type":"string","required":true},"app_settings":{"type":["map","string"],"optional":true},"client_affinity_enabled":{"type":"bool","optional":true,"default":false},"client_certificate_enabled":{"type":"bool","optional":true,"default":false},"client_certificate_exclusion_paths":{"type":"string","optional":true},"client_certificate_mode":{"type":"string","optional":true,"default":"Required"},"custom_domain_verification_id":{"type":"string","computed":true},"default_hostname":{"type":"string","computed":true},"enabled":{"type":"bool","optional":true,"default":true},"ftp_publish_basic_authentication_enabled":{"type":"bool","optional":true,"default":true},"hosting_environment_id":{"type":"string","computed":true},"https_only":{"type":"bool","optional":true,"default":false},"key_vault_reference_identity_id":{"type":"string","optional":true,"computed":true},"kind":{"type":"string","computed":true},"name":{"type":"string","required":true},"outbound_ip_address_list":{"type":["list","string"],"computed":true},"outbound_ip_addresses":{"type":"string","computed":true},"possible_outbound_ip_address_list":{"type":["list","string"],"computed":true},"possible_outbound_ip_addresses":{"type":"string","computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"service_plan_id":{"type":"string","optional":true},"site_credential":{"type":["list",["object",{"name":"string","password":"string"}]],"computed":true},"tags":{"type":["map","string"],"optional":true},"virtual_network_subnet_id":{"type":"string","optional":true},"webdeploy_publish_basic_authentication_enabled":{"type":"bool","optional":true,"default":true},"zip_deploy_file":{"type":"string","optional":true,"computed":true}},"block_types":{"auth_settings":{"nesting_mode":3,"block":{"attributes":{"additional_login_parameters":{"type":["map","string"],"optional":true},"allowed_external_redirect_urls":{"type":["list","string"],"optional":true,"computed":true},"default_provider":{"type":"string","optional":true,"computed":true},"enabled":{"type":"bool","required":true},"issuer":{"type":"string","optional":true},"runtime_version":{"type":"string","optional":true,"computed":true},"token_refresh_extension_hours":{"type":"number","optional":true,"default":72},"token_store_enabled":{"type":"bool","optional":true,"default":false},"unauthenticated_client_action":{"type":"string","optional":true,"computed":true}},"block_types":{"active_directory":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"conflicts_with":["auth_settings.0.active_directory.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings.0.active_directory.0.client_secret"]}}},"optional":true},"facebook":{"nesting_mode":3,"block":{"attributes":{"app_id":{"type":"string","required":true},"app_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.facebook.0.app_secret","auth_settings.0.facebook.0.app_secret_setting_name"]},"app_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.facebook.0.app_secret","auth_settings.0.facebook.0.app_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"github":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.github.0.client_secret","auth_settings.0.github.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.github.0.client_secret","auth_settings.0.github.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"google":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.google.0.client_secret","auth_settings.0.google.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.google.0.client_secret","auth_settings.0.google.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"microsoft":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.microsoft.0.client_secret","auth_settings.0.microsoft.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.microsoft.0.client_secret","auth_settings.0.microsoft.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"twitter":{"nesting_mode":3,"block":{"attributes":{"consumer_key":{"type":"string","required":true},"consumer_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.twitter.0.consumer_secret","auth_settings.0.twitter.0.consumer_secret_setting_name"]},"consumer_secret_setting_name":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"auth_settings_v2":{"nesting_mode":3,"block":{"attributes":{"auth_enabled":{"type":"bool","optional":true},"config_file_path":{"type":"string","optional":true},"default_provider":{"type":"string","optional":true},"excluded_paths":{"type":["list","string"],"optional":true},"forward_proxy_convention":{"type":"string","optional":true,"default":"NoProxy"},"forward_proxy_custom_host_header_name":{"type":"string","optional":true},"forward_proxy_custom_scheme_header_name":{"type":"string","optional":true},"http_route_api_prefix":{"type":"string","optional":true,"default":"/.auth"},"require_authentication":{"type":"bool","optional":true},"require_https":{"type":"bool","optional":true,"default":true},"runtime_version":{"type":"string","optional":true,"default":"~1"},"unauthenticated_action":{"type":"string","optional":true,"default":"RedirectToLoginPage"}},"block_types":{"active_directory_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_applications":{"type":["list","string"],"optional":true},"allowed_audiences":{"type":["list","string"],"optional":true},"allowed_groups":{"type":["list","string"],"optional":true},"allowed_identities":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_certificate_thumbprint":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.active_directory_v2.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.active_directory_v2.0.client_secret_certificate_thumbprint"]},"jwt_allowed_client_applications":{"type":["list","string"],"optional":true},"jwt_allowed_groups":{"type":["list","string"],"optional":true},"login_parameters":{"type":["map","string"],"optional":true},"tenant_auth_endpoint":{"type":"string","required":true},"www_authentication_disabled":{"type":"bool","optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"apple_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"computed":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"azure_static_web_app_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"custom_oidc_v2":{"nesting_mode":3,"block":{"attributes":{"authorisation_endpoint":{"type":"string","computed":true},"certification_uri":{"type":"string","computed":true},"client_credential_method":{"type":"string","computed":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","computed":true},"issuer_endpoint":{"type":"string","computed":true},"name":{"type":"string","required":true},"name_claim_type":{"type":"string","optional":true},"openid_configuration_endpoint":{"type":"string","required":true},"scopes":{"type":["list","string"],"optional":true},"token_endpoint":{"type":"string","computed":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"facebook_v2":{"nesting_mode":3,"block":{"attributes":{"app_id":{"type":"string","required":true},"app_secret_setting_name":{"type":"string","required":true},"graph_api_version":{"type":"string","optional":true,"computed":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"github_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"google_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"login":{"nesting_mode":3,"block":{"attributes":{"allowed_external_redirect_urls":{"type":["list","string"],"optional":true},"cookie_expiration_convention":{"type":"string","optional":true,"default":"FixedTime"},"cookie_expiration_time":{"type":"string","optional":true,"default":"08:00:00"},"logout_endpoint":{"type":"string","optional":true},"nonce_expiration_time":{"type":"string","optional":true,"default":"00:05:00"},"preserve_url_fragments_for_logins":{"type":"bool","optional":true,"default":false},"token_refresh_extension_time":{"type":"number","optional":true,"default":72},"token_store_enabled":{"type":"bool","optional":true,"default":false},"token_store_path":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.login.0.token_store_sas_setting_name"]},"token_store_sas_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.login.0.token_store_path"]},"validate_nonce":{"type":"bool","optional":true,"default":true}}},"required":true},"microsoft_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"twitter_v2":{"nesting_mode":3,"block":{"attributes":{"consumer_key":{"type":"string","required":true},"consumer_secret_setting_name":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]}}},"optional":true},"backup":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"storage_account_url":{"type":"string","required":true}},"block_types":{"schedule":{"nesting_mode":3,"block":{"attributes":{"frequency_interval":{"type":"number","required":true},"frequency_unit":{"type":"string","required":true},"keep_at_least_one_backup":{"type":"bool","optional":true,"default":false},"last_execution_time":{"type":"string","computed":true},"retention_period_days":{"type":"number","optional":true,"default":30},"start_time":{"type":"string","optional":true,"computed":true}}},"required":true}}},"optional":true},"connection_string":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"type":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"logs":{"nesting_mode":3,"block":{"attributes":{"detailed_error_messages":{"type":"bool","optional":true,"default":false},"failed_request_tracing":{"type":"bool","optional":true,"default":false}},"block_types":{"application_logs":{"nesting_mode":3,"block":{"attributes":{"file_system_level":{"type":"string","required":true}},"block_types":{"azure_blob_storage":{"nesting_mode":3,"block":{"attributes":{"level":{"type":"string","required":true},"retention_in_days":{"type":"number","required":true},"sas_url":{"type":"string","required":true}}},"optional":true}}},"optional":true},"http_logs":{"nesting_mode":3,"block":{"block_types":{"azure_blob_storage":{"nesting_mode":3,"block":{"attributes":{"retention_in_days":{"type":"number","optional":true,"default":0},"sas_url":{"type":"string","required":true}}},"optional":true,"conflicts_with":["logs.0.http_logs.0.file_system"]},"file_system":{"nesting_mode":3,"block":{"attributes":{"retention_in_days":{"type":"number","required":true},"retention_in_mb":{"type":"number","required":true}}},"optional":true,"conflicts_with":["logs.0.http_logs.0.azure_blob_storage"]}}},"optional":true}}},"optional":true},"site_config":{"nesting_mode":3,"block":{"attributes":{"always_on":{"type":"bool","optional":true,"default":true},"api_definition_url":{"type":"string","optional":true},"api_management_api_id":{"type":"string","optional":true},"app_command_line":{"type":"string","optional":true},"auto_swap_slot_name":{"type":"string","optional":true},"container_registry_managed_identity_client_id":{"type":"string","optional":true},"container_registry_use_managed_identity":{"type":"bool","optional":true,"default":false},"default_documents":{"type":["list","string"],"optional":true,"computed":true},"detailed_error_logging_enabled":{"type":"bool","computed":true},"ftps_state":{"type":"string","optional":true,"default":"Disabled"},"health_check_eviction_time_in_min":{"type":"number","optional":true,"required_with":["site_config.0.health_check_path"]},"health_check_path":{"type":"string","optional":true,"required_with":["site_config.0.health_check_eviction_time_in_min"]},"http2_enabled":{"type":"bool","optional":true,"default":false},"ip_restriction_default_action":{"type":"string","optional":true,"default":"Allow"},"load_balancing_mode":{"type":"string","optional":true,"default":"LeastRequests"},"local_mysql_enabled":{"type":"bool","optional":true,"default":false},"managed_pipeline_mode":{"type":"string","optional":true,"default":"Integrated"},"minimum_tls_version":{"type":"string","optional":true,"default":"1.2"},"remote_debugging_enabled":{"type":"bool","optional":true,"default":false},"remote_debugging_version":{"type":"string","optional":true,"computed":true},"scm_ip_restriction_default_action":{"type":"string","optional":true,"default":"Allow"},"scm_minimum_tls_version":{"type":"string","optional":true,"default":"1.2"},"scm_type":{"type":"string","computed":true},"scm_use_main_ip_restriction":{"type":"bool","optional":true,"default":false},"use_32_bit_worker":{"type":"bool","optional":true,"computed":true},"vnet_route_all_enabled":{"type":"bool","optional":true,"default":false},"websockets_enabled":{"type":"bool","optional":true,"default":false},"windows_fx_version":{"type":"string","computed":true},"worker_count":{"type":"number","optional":true,"computed":true}},"block_types":{"application_stack":{"nesting_mode":3,"block":{"attributes":{"current_stack":{"type":"string","optional":true,"computed":true},"docker_image_name":{"type":"string","optional":true,"at_least_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.dotnet_core_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python"]},"docker_registry_password":{"type":"string","optional":true},"docker_registry_url":{"type":"string","optional":true,"required_with":["site_config.0.application_stack.0.docker_image_name"]},"docker_registry_username":{"type":"string","optional":true},"dotnet_core_version":{"type":"string","optional":true,"at_least_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.dotnet_core_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python"]},"dotnet_version":{"type":"string","optional":true,"computed":true,"at_least_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.dotnet_core_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python"]},"java_container":{"type":"string","optional":true,"conflicts_with":["site_config.0.application_stack.0.tomcat_version"],"required_with":["site_config.0.application_stack.0.java_container_version"]},"java_container_version":{"type":"string","optional":true,"required_with":["site_config.0.application_stack.0.java_container"]},"java_embedded_server_enabled":{"type":"bool","optional":true,"computed":true,"conflicts_with":["site_config.0.application_stack.0.tomcat_version"],"required_with":["site_config.0.application_stack.0.java_version"]},"java_version":{"type":"string","optional":true,"at_least_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.dotnet_core_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python"]},"node_version":{"type":"string","optional":true,"at_least_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.dotnet_core_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python"]},"php_version":{"type":"string","optional":true,"computed":true,"at_least_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.dotnet_core_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python"]},"python":{"type":"bool","optional":true,"default":false,"at_least_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.dotnet_core_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python"]},"tomcat_version":{"type":"string","optional":true,"conflicts_with":["site_config.0.application_stack.0.java_embedded_server_enabled"],"required_with":["site_config.0.application_stack.0.java_version"]}}},"optional":true,"computed":true},"auto_heal_setting":{"nesting_mode":3,"block":{"block_types":{"action":{"nesting_mode":3,"block":{"attributes":{"action_type":{"type":"string","required":true},"minimum_process_execution_time":{"type":"string","optional":true,"computed":true}},"block_types":{"custom_action":{"nesting_mode":3,"block":{"attributes":{"executable":{"type":"string","required":true},"parameters":{"type":"string","optional":true}}},"optional":true}}},"required":true},"trigger":{"nesting_mode":3,"block":{"attributes":{"private_memory_kb":{"type":"number","optional":true}},"block_types":{"requests":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true},"interval":{"type":"string","required":true}}},"optional":true},"slow_request":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true},"interval":{"type":"string","required":true},"time_taken":{"type":"string","required":true}}},"optional":true},"slow_request_with_path":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true},"interval":{"type":"string","required":true},"path":{"type":"string","optional":true},"time_taken":{"type":"string","required":true}}},"optional":true},"status_code":{"nesting_mode":4,"block":{"attributes":{"count":{"type":"number","required":true},"interval":{"type":"string","required":true},"path":{"type":"string","optional":true},"status_code_range":{"type":"string","required":true},"sub_status":{"type":"number","optional":true},"win32_status_code":{"type":"number","optional":true}}},"optional":true}}},"required":true}}},"optional":true},"cors":{"nesting_mode":3,"block":{"attributes":{"allowed_origins":{"type":["set","string"],"optional":true},"support_credentials":{"type":"bool","optional":true,"default":false}}},"optional":true},"handler_mapping":{"nesting_mode":4,"block":{"attributes":{"arguments":{"type":"string","optional":true},"extension":{"type":"string","required":true},"script_processor_path":{"type":"string","required":true}}},"optional":true},"ip_restriction":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"default":"Allow"},"description":{"type":"string","optional":true},"headers":{"type":["list",["object",{"x_azure_fdid":["list","string"],"x_fd_health_probe":["list","string"],"x_forwarded_for":["list","string"],"x_forwarded_host":["list","string"]}]],"optional":true},"ip_address":{"type":"string","optional":true},"name":{"type":"string","optional":true,"computed":true},"priority":{"type":"number","optional":true,"default":65000},"service_tag":{"type":"string","optional":true},"virtual_network_subnet_id":{"type":"string","optional":true}}},"optional":true},"scm_ip_restriction":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"default":"Allow"},"description":{"type":"string","optional":true},"headers":{"type":["list",["object",{"x_azure_fdid":["list","string"],"x_fd_health_probe":["list","string"],"x_forwarded_for":["list","string"],"x_forwarded_host":["list","string"]}]],"optional":true},"ip_address":{"type":"string","optional":true},"name":{"type":"string","optional":true,"computed":true},"priority":{"type":"number","optional":true,"default":65000},"service_tag":{"type":"string","optional":true},"virtual_network_subnet_id":{"type":"string","optional":true}}},"optional":true},"virtual_application":{"nesting_mode":4,"block":{"attributes":{"physical_path":{"type":"string","required":true},"preload":{"type":"bool","required":true},"virtual_path":{"type":"string","required":true}},"block_types":{"virtual_directory":{"nesting_mode":4,"block":{"attributes":{"physical_path":{"type":"string","optional":true},"virtual_path":{"type":"string","optional":true}}},"optional":true}}},"optional":true}}},"required":true},"storage_account":{"nesting_mode":4,"block":{"attributes":{"access_key":{"type":"string","required":true},"account_name":{"type":"string","required":true},"mount_path":{"type":"string","optional":true},"name":{"type":"string","required":true},"share_name":{"type":"string","required":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_workloads_sap_discovery_virtual_instance":{"block":{"attributes":{"central_server_virtual_machine_id":{"type":"string","required":true},"environment":{"type":"string","required":true},"location":{"type":"string","required":true},"managed_resource_group_name":{"type":"string","optional":true},"managed_storage_account_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"sap_product":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"required":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_workloads_sap_single_node_virtual_instance":{"block":{"attributes":{"app_location":{"type":"string","required":true},"environment":{"type":"string","required":true},"location":{"type":"string","required":true},"managed_resource_group_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"sap_fqdn":{"type":"string","required":true},"sap_product":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"required":true},"type":{"type":"string","required":true}}},"optional":true},"single_server_configuration":{"nesting_mode":3,"block":{"attributes":{"app_resource_group_name":{"type":"string","required":true},"database_type":{"type":"string","optional":true},"secondary_ip_enabled":{"type":"bool","optional":true,"default":false},"subnet_id":{"type":"string","required":true}},"block_types":{"disk_volume_configuration":{"nesting_mode":4,"block":{"attributes":{"number_of_disks":{"type":"number","required":true},"size_in_gb":{"type":"number","required":true},"sku_name":{"type":"string","required":true},"volume_name":{"type":"string","required":true}}},"optional":true},"virtual_machine_configuration":{"nesting_mode":3,"block":{"attributes":{"virtual_machine_size":{"type":"string","required":true}},"block_types":{"image":{"nesting_mode":3,"block":{"attributes":{"offer":{"type":"string","required":true},"publisher":{"type":"string","required":true},"sku":{"type":"string","required":true},"version":{"type":"string","required":true}}},"required":true},"os_profile":{"nesting_mode":3,"block":{"attributes":{"admin_username":{"type":"string","required":true},"ssh_private_key":{"type":"string","required":true},"ssh_public_key":{"type":"string","required":true}}},"required":true}}},"required":true},"virtual_machine_resource_names":{"nesting_mode":3,"block":{"attributes":{"host_name":{"type":"string","optional":true,"at_least_one_of":["single_server_configuration.0.virtual_machine_resource_names.0.data_disk","single_server_configuration.0.virtual_machine_resource_names.0.host_name","single_server_configuration.0.virtual_machine_resource_names.0.network_interface_names","single_server_configuration.0.virtual_machine_resource_names.0.os_disk_name","single_server_configuration.0.virtual_machine_resource_names.0.virtual_machine_name"]},"network_interface_names":{"type":["list","string"],"optional":true,"at_least_one_of":["single_server_configuration.0.virtual_machine_resource_names.0.data_disk","single_server_configuration.0.virtual_machine_resource_names.0.host_name","single_server_configuration.0.virtual_machine_resource_names.0.network_interface_names","single_server_configuration.0.virtual_machine_resource_names.0.os_disk_name","single_server_configuration.0.virtual_machine_resource_names.0.virtual_machine_name"]},"os_disk_name":{"type":"string","optional":true,"at_least_one_of":["single_server_configuration.0.virtual_machine_resource_names.0.data_disk","single_server_configuration.0.virtual_machine_resource_names.0.host_name","single_server_configuration.0.virtual_machine_resource_names.0.network_interface_names","single_server_configuration.0.virtual_machine_resource_names.0.os_disk_name","single_server_configuration.0.virtual_machine_resource_names.0.virtual_machine_name"]},"virtual_machine_name":{"type":"string","optional":true,"at_least_one_of":["single_server_configuration.0.virtual_machine_resource_names.0.data_disk","single_server_configuration.0.virtual_machine_resource_names.0.host_name","single_server_configuration.0.virtual_machine_resource_names.0.network_interface_names","single_server_configuration.0.virtual_machine_resource_names.0.os_disk_name","single_server_configuration.0.virtual_machine_resource_names.0.virtual_machine_name"]}},"block_types":{"data_disk":{"nesting_mode":4,"block":{"attributes":{"names":{"type":["list","string"],"required":true},"volume_name":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["single_server_configuration.0.virtual_machine_resource_names.0.data_disk","single_server_configuration.0.virtual_machine_resource_names.0.host_name","single_server_configuration.0.virtual_machine_resource_names.0.network_interface_names","single_server_configuration.0.virtual_machine_resource_names.0.os_disk_name","single_server_configuration.0.virtual_machine_resource_names.0.virtual_machine_name"]}}},"optional":true}}},"required":true}}}},"azurerm_workloads_sap_three_tier_virtual_instance":{"block":{"attributes":{"app_location":{"type":"string","required":true},"environment":{"type":"string","required":true},"location":{"type":"string","required":true},"managed_resource_group_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"sap_fqdn":{"type":"string","required":true},"sap_product":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"required":true},"type":{"type":"string","required":true}}},"optional":true},"three_tier_configuration":{"nesting_mode":3,"block":{"attributes":{"app_resource_group_name":{"type":"string","required":true},"high_availability_type":{"type":"string","optional":true},"secondary_ip_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"application_server_configuration":{"nesting_mode":3,"block":{"attributes":{"instance_count":{"type":"number","required":true},"subnet_id":{"type":"string","required":true}},"block_types":{"virtual_machine_configuration":{"nesting_mode":3,"block":{"attributes":{"virtual_machine_size":{"type":"string","required":true}},"block_types":{"image":{"nesting_mode":3,"block":{"attributes":{"offer":{"type":"string","required":true},"publisher":{"type":"string","required":true},"sku":{"type":"string","required":true},"version":{"type":"string","required":true}}},"required":true},"os_profile":{"nesting_mode":3,"block":{"attributes":{"admin_username":{"type":"string","required":true},"ssh_private_key":{"type":"string","required":true},"ssh_public_key":{"type":"string","required":true}}},"required":true}}},"required":true}}},"required":true},"central_server_configuration":{"nesting_mode":3,"block":{"attributes":{"instance_count":{"type":"number","required":true},"subnet_id":{"type":"string","required":true}},"block_types":{"virtual_machine_configuration":{"nesting_mode":3,"block":{"attributes":{"virtual_machine_size":{"type":"string","required":true}},"block_types":{"image":{"nesting_mode":3,"block":{"attributes":{"offer":{"type":"string","required":true},"publisher":{"type":"string","required":true},"sku":{"type":"string","required":true},"version":{"type":"string","required":true}}},"required":true},"os_profile":{"nesting_mode":3,"block":{"attributes":{"admin_username":{"type":"string","required":true},"ssh_private_key":{"type":"string","required":true},"ssh_public_key":{"type":"string","required":true}}},"required":true}}},"required":true}}},"required":true},"database_server_configuration":{"nesting_mode":3,"block":{"attributes":{"database_type":{"type":"string","optional":true},"instance_count":{"type":"number","required":true},"subnet_id":{"type":"string","required":true}},"block_types":{"disk_volume_configuration":{"nesting_mode":4,"block":{"attributes":{"number_of_disks":{"type":"number","required":true},"size_in_gb":{"type":"number","required":true},"sku_name":{"type":"string","required":true},"volume_name":{"type":"string","required":true}}},"optional":true},"virtual_machine_configuration":{"nesting_mode":3,"block":{"attributes":{"virtual_machine_size":{"type":"string","required":true}},"block_types":{"image":{"nesting_mode":3,"block":{"attributes":{"offer":{"type":"string","required":true},"publisher":{"type":"string","required":true},"sku":{"type":"string","required":true},"version":{"type":"string","required":true}}},"required":true},"os_profile":{"nesting_mode":3,"block":{"attributes":{"admin_username":{"type":"string","required":true},"ssh_private_key":{"type":"string","required":true},"ssh_public_key":{"type":"string","required":true}}},"required":true}}},"required":true}}},"required":true},"resource_names":{"nesting_mode":3,"block":{"block_types":{"application_server":{"nesting_mode":3,"block":{"attributes":{"availability_set_name":{"type":"string","optional":true}},"block_types":{"virtual_machine":{"nesting_mode":3,"block":{"attributes":{"host_name":{"type":"string","optional":true},"network_interface_names":{"type":["list","string"],"optional":true},"os_disk_name":{"type":"string","optional":true},"virtual_machine_name":{"type":"string","optional":true}},"block_types":{"data_disk":{"nesting_mode":4,"block":{"attributes":{"names":{"type":["list","string"],"required":true},"volume_name":{"type":"string","required":true}}},"optional":true}}},"optional":true}}},"optional":true},"central_server":{"nesting_mode":3,"block":{"attributes":{"availability_set_name":{"type":"string","optional":true}},"block_types":{"load_balancer":{"nesting_mode":3,"block":{"attributes":{"backend_pool_names":{"type":["list","string"],"optional":true},"frontend_ip_configuration_names":{"type":["list","string"],"optional":true},"health_probe_names":{"type":["list","string"],"optional":true},"name":{"type":"string","optional":true}}},"optional":true},"virtual_machine":{"nesting_mode":3,"block":{"attributes":{"host_name":{"type":"string","optional":true},"network_interface_names":{"type":["list","string"],"optional":true},"os_disk_name":{"type":"string","optional":true},"virtual_machine_name":{"type":"string","optional":true}},"block_types":{"data_disk":{"nesting_mode":4,"block":{"attributes":{"names":{"type":["list","string"],"required":true},"volume_name":{"type":"string","required":true}}},"optional":true}}},"optional":true}}},"optional":true},"database_server":{"nesting_mode":3,"block":{"attributes":{"availability_set_name":{"type":"string","optional":true}},"block_types":{"load_balancer":{"nesting_mode":3,"block":{"attributes":{"backend_pool_names":{"type":["list","string"],"optional":true},"frontend_ip_configuration_names":{"type":["list","string"],"optional":true},"health_probe_names":{"type":["list","string"],"optional":true},"name":{"type":"string","optional":true}}},"optional":true},"virtual_machine":{"nesting_mode":3,"block":{"attributes":{"host_name":{"type":"string","optional":true},"network_interface_names":{"type":["list","string"],"optional":true},"os_disk_name":{"type":"string","optional":true},"virtual_machine_name":{"type":"string","optional":true}},"block_types":{"data_disk":{"nesting_mode":4,"block":{"attributes":{"names":{"type":["list","string"],"required":true},"volume_name":{"type":"string","required":true}}},"optional":true}}},"optional":true}}},"optional":true},"shared_storage":{"nesting_mode":3,"block":{"attributes":{"account_name":{"type":"string","optional":true},"private_endpoint_name":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"transport_create_and_mount":{"nesting_mode":3,"block":{"attributes":{"resource_group_id":{"type":"string","optional":true},"storage_account_name":{"type":"string","optional":true}}},"optional":true}}},"required":true}}}}}}`) + b := []byte(`{"Version":"","resource_schemas":{"azurerm_aadb2c_directory":{"block":{"attributes":{"billing_type":{"type":"string","computed":true},"country_code":{"type":"string","optional":true,"computed":true},"data_residency_location":{"type":"string","required":true},"display_name":{"type":"string","optional":true,"computed":true},"domain_name":{"type":"string","required":true},"effective_start_date":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"tenant_id":{"type":"string","computed":true}}}},"azurerm_active_directory_domain_service":{"block":{"attributes":{"deployment_id":{"type":"string","computed":true},"domain_configuration_type":{"type":"string","optional":true},"domain_name":{"type":"string","required":true},"filtered_sync_enabled":{"type":"bool","optional":true,"default":false},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"resource_id":{"type":"string","computed":true},"sku":{"type":"string","required":true},"sync_owner":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true},"tenant_id":{"type":"string","computed":true},"version":{"type":"number","computed":true}},"block_types":{"initial_replica_set":{"nesting_mode":3,"block":{"attributes":{"domain_controller_ip_addresses":{"type":["list","string"],"computed":true},"external_access_ip_address":{"type":"string","computed":true},"id":{"type":"string","computed":true},"location":{"type":"string","computed":true},"service_status":{"type":"string","computed":true},"subnet_id":{"type":"string","required":true}}},"required":true},"notifications":{"nesting_mode":3,"block":{"attributes":{"additional_recipients":{"type":["set","string"],"optional":true},"notify_dc_admins":{"type":"bool","optional":true,"default":false},"notify_global_admins":{"type":"bool","optional":true,"default":false}}},"optional":true,"computed":true},"secure_ldap":{"nesting_mode":3,"block":{"attributes":{"certificate_expiry":{"type":"string","computed":true},"certificate_thumbprint":{"type":"string","computed":true},"enabled":{"type":"bool","required":true},"external_access_enabled":{"type":"bool","optional":true,"default":false},"pfx_certificate":{"type":"string","required":true},"pfx_certificate_password":{"type":"string","required":true},"public_certificate":{"type":"string","computed":true}}},"optional":true,"computed":true},"security":{"nesting_mode":3,"block":{"attributes":{"kerberos_armoring_enabled":{"type":"bool","optional":true,"default":false},"kerberos_rc4_encryption_enabled":{"type":"bool","optional":true,"default":false},"ntlm_v1_enabled":{"type":"bool","optional":true,"default":false},"sync_kerberos_passwords":{"type":"bool","optional":true,"default":false},"sync_ntlm_passwords":{"type":"bool","optional":true,"default":false},"sync_on_prem_passwords":{"type":"bool","optional":true,"default":false},"tls_v1_enabled":{"type":"bool","optional":true,"default":false}}},"optional":true,"computed":true}}}},"azurerm_active_directory_domain_service_replica_set":{"block":{"attributes":{"domain_controller_ip_addresses":{"type":["list","string"],"computed":true},"domain_service_id":{"type":"string","required":true},"external_access_ip_address":{"type":"string","computed":true},"location":{"type":"string","required":true},"service_status":{"type":"string","computed":true},"subnet_id":{"type":"string","required":true}}}},"azurerm_active_directory_domain_service_trust":{"block":{"attributes":{"domain_service_id":{"type":"string","required":true},"name":{"type":"string","required":true},"password":{"type":"string","required":true},"trusted_domain_dns_ips":{"type":["list","string"],"required":true},"trusted_domain_fqdn":{"type":"string","required":true}}}},"azurerm_advanced_threat_protection":{"block":{"attributes":{"enabled":{"type":"bool","required":true},"target_resource_id":{"type":"string","required":true}}}},"azurerm_advisor_suppression":{"block":{"attributes":{"name":{"type":"string","required":true},"recommendation_id":{"type":"string","required":true},"resource_id":{"type":"string","required":true},"suppression_id":{"type":"string","computed":true},"ttl":{"type":"string","optional":true}}}},"azurerm_ai_foundry":{"block":{"attributes":{"application_insights_id":{"type":"string","optional":true},"container_registry_id":{"type":"string","optional":true},"description":{"type":"string","optional":true},"discovery_url":{"type":"string","computed":true},"friendly_name":{"type":"string","optional":true},"high_business_impact_enabled":{"type":"bool","optional":true,"computed":true},"key_vault_id":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"primary_user_assigned_identity":{"type":"string","optional":true},"public_network_access":{"type":"string","optional":true,"default":"Enabled"},"resource_group_name":{"type":"string","required":true},"storage_account_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"workspace_id":{"type":"string","computed":true}},"block_types":{"encryption":{"nesting_mode":3,"block":{"attributes":{"key_id":{"type":"string","required":true},"key_vault_id":{"type":"string","required":true},"user_assigned_identity_id":{"type":"string","optional":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"required":true},"managed_network":{"nesting_mode":3,"block":{"attributes":{"isolation_mode":{"type":"string","optional":true,"computed":true}}},"optional":true,"computed":true}}}},"azurerm_ai_foundry_project":{"block":{"attributes":{"ai_services_hub_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"friendly_name":{"type":"string","optional":true},"high_business_impact_enabled":{"type":"bool","optional":true,"computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"project_id":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_ai_services":{"block":{"attributes":{"custom_subdomain_name":{"type":"string","optional":true},"endpoint":{"type":"string","computed":true},"fqdns":{"type":["list","string"],"optional":true},"local_authentication_enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"outbound_network_access_restricted":{"type":"bool","optional":true,"default":false},"primary_access_key":{"type":"string","computed":true},"public_network_access":{"type":"string","optional":true,"default":"Enabled"},"resource_group_name":{"type":"string","required":true},"secondary_access_key":{"type":"string","computed":true},"sku_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"customer_managed_key":{"nesting_mode":3,"block":{"attributes":{"identity_client_id":{"type":"string","optional":true},"key_vault_key_id":{"type":"string","optional":true,"exactly_one_of":["customer_managed_key.0.managed_hsm_key_id","customer_managed_key.0.key_vault_key_id"]},"managed_hsm_key_id":{"type":"string","optional":true,"exactly_one_of":["customer_managed_key.0.managed_hsm_key_id","customer_managed_key.0.key_vault_key_id"]}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"network_acls":{"nesting_mode":3,"block":{"attributes":{"default_action":{"type":"string","required":true},"ip_rules":{"type":["set","string"],"optional":true}},"block_types":{"virtual_network_rules":{"nesting_mode":4,"block":{"attributes":{"ignore_missing_vnet_service_endpoint":{"type":"bool","optional":true,"default":false},"subnet_id":{"type":"string","required":true}}},"optional":true}}},"optional":true,"required_with":["custom_subdomain_name"]},"storage":{"nesting_mode":3,"block":{"attributes":{"identity_client_id":{"type":"string","optional":true},"storage_account_id":{"type":"string","required":true}}},"optional":true}}}},"azurerm_analysis_services_server":{"block":{"attributes":{"admin_users":{"type":["set","string"],"optional":true},"backup_blob_container_uri":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"power_bi_service_enabled":{"type":"bool","optional":true},"querypool_connection_mode":{"type":"string","optional":true,"default":"All"},"resource_group_name":{"type":"string","required":true},"server_full_name":{"type":"string","computed":true},"sku":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"ipv4_firewall_rule":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"range_end":{"type":"string","required":true},"range_start":{"type":"string","required":true}}},"optional":true}}}},"azurerm_api_connection":{"block":{"attributes":{"display_name":{"type":"string","optional":true,"default":"Service Bus"},"managed_api_id":{"type":"string","required":true},"name":{"type":"string","required":true},"parameter_values":{"type":["map","string"],"optional":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_api_management":{"block":{"attributes":{"client_certificate_enabled":{"type":"bool","optional":true,"default":false},"developer_portal_url":{"type":"string","computed":true},"gateway_disabled":{"type":"bool","optional":true,"default":false},"gateway_regional_url":{"type":"string","computed":true},"gateway_url":{"type":"string","computed":true},"location":{"type":"string","required":true},"management_api_url":{"type":"string","computed":true},"min_api_version":{"type":"string","optional":true},"name":{"type":"string","required":true},"notification_sender_email":{"type":"string","optional":true,"computed":true},"portal_url":{"type":"string","computed":true},"private_ip_addresses":{"type":["list","string"],"computed":true},"public_ip_address_id":{"type":"string","optional":true},"public_ip_addresses":{"type":["list","string"],"computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"publisher_email":{"type":"string","required":true},"publisher_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"scm_url":{"type":"string","computed":true},"sku_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"virtual_network_type":{"type":"string","optional":true,"default":"None"},"zones":{"type":["set","string"],"optional":true}},"block_types":{"additional_location":{"nesting_mode":3,"block":{"attributes":{"capacity":{"type":"number","optional":true,"computed":true},"gateway_disabled":{"type":"bool","optional":true,"default":false},"gateway_regional_url":{"type":"string","computed":true},"location":{"type":"string","required":true},"private_ip_addresses":{"type":["list","string"],"computed":true},"public_ip_address_id":{"type":"string","optional":true},"public_ip_addresses":{"type":["list","string"],"computed":true},"zones":{"type":["set","string"],"optional":true}},"block_types":{"virtual_network_configuration":{"nesting_mode":3,"block":{"attributes":{"subnet_id":{"type":"string","required":true}}},"optional":true}}},"optional":true},"certificate":{"nesting_mode":3,"block":{"attributes":{"certificate_password":{"type":"string","optional":true},"encoded_certificate":{"type":"string","required":true},"expiry":{"type":"string","computed":true},"store_name":{"type":"string","required":true},"subject":{"type":"string","computed":true},"thumbprint":{"type":"string","computed":true}}},"optional":true},"delegation":{"nesting_mode":3,"block":{"attributes":{"subscriptions_enabled":{"type":"bool","optional":true,"default":false},"url":{"type":"string","optional":true},"user_registration_enabled":{"type":"bool","optional":true,"default":false},"validation_key":{"type":"string","optional":true}}},"optional":true,"computed":true},"hostname_configuration":{"nesting_mode":3,"block":{"block_types":{"developer_portal":{"nesting_mode":3,"block":{"attributes":{"certificate":{"type":"string","optional":true},"certificate_password":{"type":"string","optional":true},"certificate_source":{"type":"string","computed":true},"certificate_status":{"type":"string","computed":true},"expiry":{"type":"string","computed":true},"host_name":{"type":"string","required":true},"key_vault_id":{"type":"string","optional":true},"negotiate_client_certificate":{"type":"bool","optional":true,"default":false},"ssl_keyvault_identity_client_id":{"type":"string","optional":true},"subject":{"type":"string","computed":true},"thumbprint":{"type":"string","computed":true}}},"optional":true,"at_least_one_of":["hostname_configuration.0.management","hostname_configuration.0.portal","hostname_configuration.0.developer_portal","hostname_configuration.0.proxy","hostname_configuration.0.scm"]},"management":{"nesting_mode":3,"block":{"attributes":{"certificate":{"type":"string","optional":true},"certificate_password":{"type":"string","optional":true},"certificate_source":{"type":"string","computed":true},"certificate_status":{"type":"string","computed":true},"expiry":{"type":"string","computed":true},"host_name":{"type":"string","required":true},"key_vault_id":{"type":"string","optional":true},"negotiate_client_certificate":{"type":"bool","optional":true,"default":false},"ssl_keyvault_identity_client_id":{"type":"string","optional":true},"subject":{"type":"string","computed":true},"thumbprint":{"type":"string","computed":true}}},"optional":true,"at_least_one_of":["hostname_configuration.0.management","hostname_configuration.0.portal","hostname_configuration.0.developer_portal","hostname_configuration.0.proxy","hostname_configuration.0.scm"]},"portal":{"nesting_mode":3,"block":{"attributes":{"certificate":{"type":"string","optional":true},"certificate_password":{"type":"string","optional":true},"certificate_source":{"type":"string","computed":true},"certificate_status":{"type":"string","computed":true},"expiry":{"type":"string","computed":true},"host_name":{"type":"string","required":true},"key_vault_id":{"type":"string","optional":true},"negotiate_client_certificate":{"type":"bool","optional":true,"default":false},"ssl_keyvault_identity_client_id":{"type":"string","optional":true},"subject":{"type":"string","computed":true},"thumbprint":{"type":"string","computed":true}}},"optional":true,"at_least_one_of":["hostname_configuration.0.management","hostname_configuration.0.portal","hostname_configuration.0.developer_portal","hostname_configuration.0.proxy","hostname_configuration.0.scm"]},"proxy":{"nesting_mode":3,"block":{"attributes":{"certificate":{"type":"string","optional":true},"certificate_password":{"type":"string","optional":true},"certificate_source":{"type":"string","computed":true},"certificate_status":{"type":"string","computed":true},"default_ssl_binding":{"type":"bool","optional":true,"computed":true},"expiry":{"type":"string","computed":true},"host_name":{"type":"string","required":true},"key_vault_id":{"type":"string","optional":true},"negotiate_client_certificate":{"type":"bool","optional":true,"default":false},"ssl_keyvault_identity_client_id":{"type":"string","optional":true},"subject":{"type":"string","computed":true},"thumbprint":{"type":"string","computed":true}}},"optional":true,"at_least_one_of":["hostname_configuration.0.management","hostname_configuration.0.portal","hostname_configuration.0.developer_portal","hostname_configuration.0.proxy","hostname_configuration.0.scm"]},"scm":{"nesting_mode":3,"block":{"attributes":{"certificate":{"type":"string","optional":true},"certificate_password":{"type":"string","optional":true},"certificate_source":{"type":"string","computed":true},"certificate_status":{"type":"string","computed":true},"expiry":{"type":"string","computed":true},"host_name":{"type":"string","required":true},"key_vault_id":{"type":"string","optional":true},"negotiate_client_certificate":{"type":"bool","optional":true,"default":false},"ssl_keyvault_identity_client_id":{"type":"string","optional":true},"subject":{"type":"string","computed":true},"thumbprint":{"type":"string","computed":true}}},"optional":true,"at_least_one_of":["hostname_configuration.0.management","hostname_configuration.0.portal","hostname_configuration.0.developer_portal","hostname_configuration.0.proxy","hostname_configuration.0.scm"]}}},"optional":true,"computed":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"protocols":{"nesting_mode":3,"block":{"attributes":{"enable_http2":{"type":"bool","optional":true,"default":false}}},"optional":true,"computed":true},"security":{"nesting_mode":3,"block":{"attributes":{"enable_backend_ssl30":{"type":"bool","optional":true,"default":false},"enable_backend_tls10":{"type":"bool","optional":true,"default":false},"enable_backend_tls11":{"type":"bool","optional":true,"default":false},"enable_frontend_ssl30":{"type":"bool","optional":true,"default":false},"enable_frontend_tls10":{"type":"bool","optional":true,"default":false},"enable_frontend_tls11":{"type":"bool","optional":true,"default":false},"tls_ecdhe_ecdsa_with_aes128_cbc_sha_ciphers_enabled":{"type":"bool","optional":true,"default":false},"tls_ecdhe_ecdsa_with_aes256_cbc_sha_ciphers_enabled":{"type":"bool","optional":true,"default":false},"tls_ecdhe_rsa_with_aes128_cbc_sha_ciphers_enabled":{"type":"bool","optional":true,"default":false},"tls_ecdhe_rsa_with_aes256_cbc_sha_ciphers_enabled":{"type":"bool","optional":true,"default":false},"tls_rsa_with_aes128_cbc_sha256_ciphers_enabled":{"type":"bool","optional":true,"default":false},"tls_rsa_with_aes128_cbc_sha_ciphers_enabled":{"type":"bool","optional":true,"default":false},"tls_rsa_with_aes128_gcm_sha256_ciphers_enabled":{"type":"bool","optional":true,"default":false},"tls_rsa_with_aes256_cbc_sha256_ciphers_enabled":{"type":"bool","optional":true,"default":false},"tls_rsa_with_aes256_cbc_sha_ciphers_enabled":{"type":"bool","optional":true,"default":false},"tls_rsa_with_aes256_gcm_sha384_ciphers_enabled":{"type":"bool","optional":true,"default":false},"triple_des_ciphers_enabled":{"type":"bool","optional":true}}},"optional":true,"computed":true},"sign_in":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","required":true}}},"optional":true,"computed":true},"sign_up":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","required":true}},"block_types":{"terms_of_service":{"nesting_mode":3,"block":{"attributes":{"consent_required":{"type":"bool","required":true},"enabled":{"type":"bool","required":true},"text":{"type":"string","optional":true}}},"required":true}}},"optional":true,"computed":true},"tenant_access":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","required":true},"primary_key":{"type":"string","computed":true},"secondary_key":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true}}},"optional":true,"computed":true},"virtual_network_configuration":{"nesting_mode":3,"block":{"attributes":{"subnet_id":{"type":"string","required":true}}},"optional":true}}}},"azurerm_api_management_api":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"api_type":{"type":"string","optional":true,"computed":true},"description":{"type":"string","optional":true},"display_name":{"type":"string","optional":true,"computed":true},"is_current":{"type":"bool","computed":true},"is_online":{"type":"bool","computed":true},"name":{"type":"string","required":true},"path":{"type":"string","optional":true,"computed":true},"protocols":{"type":["set","string"],"optional":true,"computed":true},"resource_group_name":{"type":"string","required":true},"revision":{"type":"string","required":true},"revision_description":{"type":"string","optional":true},"service_url":{"type":"string","optional":true,"computed":true},"source_api_id":{"type":"string","optional":true},"subscription_required":{"type":"bool","optional":true,"default":true},"terms_of_service_url":{"type":"string","optional":true},"version":{"type":"string","optional":true,"computed":true},"version_description":{"type":"string","optional":true},"version_set_id":{"type":"string","optional":true,"computed":true}},"block_types":{"contact":{"nesting_mode":3,"block":{"attributes":{"email":{"type":"string","optional":true},"name":{"type":"string","optional":true},"url":{"type":"string","optional":true}}},"optional":true},"import":{"nesting_mode":3,"block":{"attributes":{"content_format":{"type":"string","required":true},"content_value":{"type":"string","required":true}},"block_types":{"wsdl_selector":{"nesting_mode":3,"block":{"attributes":{"endpoint_name":{"type":"string","required":true},"service_name":{"type":"string","required":true}}},"optional":true}}},"optional":true},"license":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","optional":true},"url":{"type":"string","optional":true}}},"optional":true},"oauth2_authorization":{"nesting_mode":3,"block":{"attributes":{"authorization_server_name":{"type":"string","required":true},"scope":{"type":"string","optional":true}}},"optional":true},"openid_authentication":{"nesting_mode":3,"block":{"attributes":{"bearer_token_sending_methods":{"type":["set","string"],"optional":true},"openid_provider_name":{"type":"string","required":true}}},"optional":true},"subscription_key_parameter_names":{"nesting_mode":3,"block":{"attributes":{"header":{"type":"string","required":true},"query":{"type":"string","required":true}}},"optional":true,"computed":true}}}},"azurerm_api_management_api_diagnostic":{"block":{"attributes":{"always_log_errors":{"type":"bool","optional":true,"computed":true},"api_management_logger_id":{"type":"string","required":true},"api_management_name":{"type":"string","required":true},"api_name":{"type":"string","required":true},"http_correlation_protocol":{"type":"string","optional":true,"computed":true},"identifier":{"type":"string","required":true},"log_client_ip":{"type":"bool","optional":true,"computed":true},"operation_name_format":{"type":"string","optional":true,"default":"Name"},"resource_group_name":{"type":"string","required":true},"sampling_percentage":{"type":"number","optional":true,"computed":true},"verbosity":{"type":"string","optional":true,"computed":true}},"block_types":{"backend_request":{"nesting_mode":3,"block":{"attributes":{"body_bytes":{"type":"number","optional":true},"headers_to_log":{"type":["set","string"],"optional":true}},"block_types":{"data_masking":{"nesting_mode":3,"block":{"block_types":{"headers":{"nesting_mode":3,"block":{"attributes":{"mode":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"query_params":{"nesting_mode":3,"block":{"attributes":{"mode":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true}}},"optional":true,"computed":true},"backend_response":{"nesting_mode":3,"block":{"attributes":{"body_bytes":{"type":"number","optional":true},"headers_to_log":{"type":["set","string"],"optional":true}},"block_types":{"data_masking":{"nesting_mode":3,"block":{"block_types":{"headers":{"nesting_mode":3,"block":{"attributes":{"mode":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"query_params":{"nesting_mode":3,"block":{"attributes":{"mode":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true}}},"optional":true,"computed":true},"frontend_request":{"nesting_mode":3,"block":{"attributes":{"body_bytes":{"type":"number","optional":true},"headers_to_log":{"type":["set","string"],"optional":true}},"block_types":{"data_masking":{"nesting_mode":3,"block":{"block_types":{"headers":{"nesting_mode":3,"block":{"attributes":{"mode":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"query_params":{"nesting_mode":3,"block":{"attributes":{"mode":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true}}},"optional":true,"computed":true},"frontend_response":{"nesting_mode":3,"block":{"attributes":{"body_bytes":{"type":"number","optional":true},"headers_to_log":{"type":["set","string"],"optional":true}},"block_types":{"data_masking":{"nesting_mode":3,"block":{"block_types":{"headers":{"nesting_mode":3,"block":{"attributes":{"mode":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"query_params":{"nesting_mode":3,"block":{"attributes":{"mode":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true}}},"optional":true,"computed":true}}}},"azurerm_api_management_api_operation":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"api_name":{"type":"string","required":true},"description":{"type":"string","optional":true},"display_name":{"type":"string","required":true},"method":{"type":"string","required":true},"operation_id":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"url_template":{"type":"string","required":true}},"block_types":{"request":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true}},"block_types":{"header":{"nesting_mode":3,"block":{"attributes":{"default_value":{"type":"string","optional":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"required":{"type":"bool","required":true},"schema_id":{"type":"string","optional":true},"type":{"type":"string","required":true},"type_name":{"type":"string","optional":true},"values":{"type":["set","string"],"optional":true}},"block_types":{"example":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"external_value":{"type":"string","optional":true},"name":{"type":"string","required":true},"summary":{"type":"string","optional":true},"value":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"query_parameter":{"nesting_mode":3,"block":{"attributes":{"default_value":{"type":"string","optional":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"required":{"type":"bool","required":true},"schema_id":{"type":"string","optional":true},"type":{"type":"string","required":true},"type_name":{"type":"string","optional":true},"values":{"type":["set","string"],"optional":true}},"block_types":{"example":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"external_value":{"type":"string","optional":true},"name":{"type":"string","required":true},"summary":{"type":"string","optional":true},"value":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"representation":{"nesting_mode":3,"block":{"attributes":{"content_type":{"type":"string","required":true},"schema_id":{"type":"string","optional":true},"type_name":{"type":"string","optional":true}},"block_types":{"example":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"external_value":{"type":"string","optional":true},"name":{"type":"string","required":true},"summary":{"type":"string","optional":true},"value":{"type":"string","optional":true}}},"optional":true},"form_parameter":{"nesting_mode":3,"block":{"attributes":{"default_value":{"type":"string","optional":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"required":{"type":"bool","required":true},"schema_id":{"type":"string","optional":true},"type":{"type":"string","required":true},"type_name":{"type":"string","optional":true},"values":{"type":["set","string"],"optional":true}},"block_types":{"example":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"external_value":{"type":"string","optional":true},"name":{"type":"string","required":true},"summary":{"type":"string","optional":true},"value":{"type":"string","optional":true}}},"optional":true}}},"optional":true}}},"optional":true}}},"optional":true,"computed":true},"response":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"status_code":{"type":"number","required":true}},"block_types":{"header":{"nesting_mode":3,"block":{"attributes":{"default_value":{"type":"string","optional":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"required":{"type":"bool","required":true},"schema_id":{"type":"string","optional":true},"type":{"type":"string","required":true},"type_name":{"type":"string","optional":true},"values":{"type":["set","string"],"optional":true}},"block_types":{"example":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"external_value":{"type":"string","optional":true},"name":{"type":"string","required":true},"summary":{"type":"string","optional":true},"value":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"representation":{"nesting_mode":3,"block":{"attributes":{"content_type":{"type":"string","required":true},"schema_id":{"type":"string","optional":true},"type_name":{"type":"string","optional":true}},"block_types":{"example":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"external_value":{"type":"string","optional":true},"name":{"type":"string","required":true},"summary":{"type":"string","optional":true},"value":{"type":"string","optional":true}}},"optional":true},"form_parameter":{"nesting_mode":3,"block":{"attributes":{"default_value":{"type":"string","optional":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"required":{"type":"bool","required":true},"schema_id":{"type":"string","optional":true},"type":{"type":"string","required":true},"type_name":{"type":"string","optional":true},"values":{"type":["set","string"],"optional":true}},"block_types":{"example":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"external_value":{"type":"string","optional":true},"name":{"type":"string","required":true},"summary":{"type":"string","optional":true},"value":{"type":"string","optional":true}}},"optional":true}}},"optional":true}}},"optional":true}}},"optional":true},"template_parameter":{"nesting_mode":3,"block":{"attributes":{"default_value":{"type":"string","optional":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"required":{"type":"bool","required":true},"schema_id":{"type":"string","optional":true},"type":{"type":"string","required":true},"type_name":{"type":"string","optional":true},"values":{"type":["set","string"],"optional":true}},"block_types":{"example":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"external_value":{"type":"string","optional":true},"name":{"type":"string","required":true},"summary":{"type":"string","optional":true},"value":{"type":"string","optional":true}}},"optional":true}}},"optional":true}}}},"azurerm_api_management_api_operation_policy":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"api_name":{"type":"string","required":true},"operation_id":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"xml_content":{"type":"string","optional":true,"computed":true,"conflicts_with":["xml_link"]},"xml_link":{"type":"string","optional":true,"conflicts_with":["xml_content"]}}}},"azurerm_api_management_api_operation_tag":{"block":{"attributes":{"api_operation_id":{"type":"string","required":true},"display_name":{"type":"string","required":true},"name":{"type":"string","required":true}}}},"azurerm_api_management_api_policy":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"api_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"xml_content":{"type":"string","optional":true,"computed":true,"conflicts_with":["xml_link"]},"xml_link":{"type":"string","optional":true,"conflicts_with":["xml_content"]}}}},"azurerm_api_management_api_release":{"block":{"attributes":{"api_id":{"type":"string","required":true},"name":{"type":"string","required":true},"notes":{"type":"string","optional":true}}}},"azurerm_api_management_api_schema":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"api_name":{"type":"string","required":true},"components":{"type":"string","optional":true,"exactly_one_of":["value","definitions","components"]},"content_type":{"type":"string","required":true},"definitions":{"type":"string","optional":true,"exactly_one_of":["value","definitions","components"]},"resource_group_name":{"type":"string","required":true},"schema_id":{"type":"string","required":true},"value":{"type":"string","optional":true,"exactly_one_of":["value","definitions","components"]}}}},"azurerm_api_management_api_tag":{"block":{"attributes":{"api_id":{"type":"string","required":true},"name":{"type":"string","required":true}}}},"azurerm_api_management_api_tag_description":{"block":{"attributes":{"api_tag_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"external_documentation_description":{"type":"string","optional":true},"external_documentation_url":{"type":"string","optional":true}}}},"azurerm_api_management_api_version_set":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"description":{"type":"string","optional":true},"display_name":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"version_header_name":{"type":"string","optional":true,"conflicts_with":["version_query_name"]},"version_query_name":{"type":"string","optional":true,"conflicts_with":["version_header_name"]},"versioning_scheme":{"type":"string","required":true}}}},"azurerm_api_management_authorization_server":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"authorization_endpoint":{"type":"string","required":true},"authorization_methods":{"type":["set","string"],"required":true},"bearer_token_sending_methods":{"type":["set","string"],"optional":true},"client_authentication_method":{"type":["set","string"],"optional":true},"client_id":{"type":"string","required":true},"client_registration_endpoint":{"type":"string","required":true},"client_secret":{"type":"string","optional":true},"default_scope":{"type":"string","optional":true},"description":{"type":"string","optional":true},"display_name":{"type":"string","required":true},"grant_types":{"type":["set","string"],"required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"resource_owner_password":{"type":"string","optional":true},"resource_owner_username":{"type":"string","optional":true},"support_state":{"type":"bool","optional":true},"token_endpoint":{"type":"string","optional":true}},"block_types":{"token_body_parameter":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}}},"azurerm_api_management_backend":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"protocol":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"resource_id":{"type":"string","optional":true},"title":{"type":"string","optional":true},"url":{"type":"string","required":true}},"block_types":{"credentials":{"nesting_mode":3,"block":{"attributes":{"certificate":{"type":["list","string"],"optional":true,"at_least_one_of":["credentials.0.authorization","credentials.0.certificate","credentials.0.header","credentials.0.query"]},"header":{"type":["map","string"],"optional":true,"at_least_one_of":["credentials.0.authorization","credentials.0.certificate","credentials.0.header","credentials.0.query"]},"query":{"type":["map","string"],"optional":true,"at_least_one_of":["credentials.0.authorization","credentials.0.certificate","credentials.0.header","credentials.0.query"]}},"block_types":{"authorization":{"nesting_mode":3,"block":{"attributes":{"parameter":{"type":"string","optional":true,"at_least_one_of":["credentials.0.authorization.0.parameter","credentials.0.authorization.0.scheme"]},"scheme":{"type":"string","optional":true,"at_least_one_of":["credentials.0.authorization.0.parameter","credentials.0.authorization.0.scheme"]}}},"optional":true,"at_least_one_of":["credentials.0.authorization","credentials.0.certificate","credentials.0.header","credentials.0.query"]}}},"optional":true},"proxy":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","optional":true},"url":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true},"service_fabric_cluster":{"nesting_mode":3,"block":{"attributes":{"client_certificate_id":{"type":"string","optional":true,"computed":true},"client_certificate_thumbprint":{"type":"string","optional":true,"computed":true},"management_endpoints":{"type":["set","string"],"required":true},"max_partition_resolution_retries":{"type":"number","required":true},"server_certificate_thumbprints":{"type":["set","string"],"optional":true,"conflicts_with":["service_fabric_cluster.0.server_x509_name"]}},"block_types":{"server_x509_name":{"nesting_mode":4,"block":{"attributes":{"issuer_certificate_thumbprint":{"type":"string","required":true},"name":{"type":"string","required":true}}},"optional":true,"conflicts_with":["service_fabric_cluster.0.server_certificate_thumbprints"]}}},"optional":true},"tls":{"nesting_mode":3,"block":{"attributes":{"validate_certificate_chain":{"type":"bool","optional":true,"at_least_one_of":["tls.0.validate_certificate_chain","tls.0.validate_certificate_name"]},"validate_certificate_name":{"type":"bool","optional":true,"at_least_one_of":["tls.0.validate_certificate_chain","tls.0.validate_certificate_name"]}}},"optional":true}}}},"azurerm_api_management_certificate":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"data":{"type":"string","optional":true,"conflicts_with":["key_vault_secret_id","key_vault_identity_client_id"],"at_least_one_of":["data","key_vault_secret_id"]},"expiration":{"type":"string","computed":true},"key_vault_identity_client_id":{"type":"string","optional":true,"required_with":["key_vault_secret_id"]},"key_vault_secret_id":{"type":"string","optional":true,"conflicts_with":["data","password"],"at_least_one_of":["data","key_vault_secret_id"]},"name":{"type":"string","required":true},"password":{"type":"string","optional":true,"required_with":["data"]},"resource_group_name":{"type":"string","required":true},"subject":{"type":"string","computed":true},"thumbprint":{"type":"string","computed":true}}}},"azurerm_api_management_custom_domain":{"block":{"attributes":{"api_management_id":{"type":"string","required":true}},"block_types":{"developer_portal":{"nesting_mode":3,"block":{"attributes":{"certificate":{"type":"string","optional":true},"certificate_password":{"type":"string","optional":true},"certificate_source":{"type":"string","computed":true},"certificate_status":{"type":"string","computed":true},"expiry":{"type":"string","computed":true},"host_name":{"type":"string","required":true},"key_vault_id":{"type":"string","optional":true},"negotiate_client_certificate":{"type":"bool","optional":true,"default":false},"ssl_keyvault_identity_client_id":{"type":"string","optional":true},"subject":{"type":"string","computed":true},"thumbprint":{"type":"string","computed":true}}},"optional":true,"at_least_one_of":["management","portal","developer_portal","gateway","scm"]},"gateway":{"nesting_mode":3,"block":{"attributes":{"certificate":{"type":"string","optional":true},"certificate_password":{"type":"string","optional":true},"certificate_source":{"type":"string","computed":true},"certificate_status":{"type":"string","computed":true},"default_ssl_binding":{"type":"bool","optional":true,"computed":true},"expiry":{"type":"string","computed":true},"host_name":{"type":"string","required":true},"key_vault_id":{"type":"string","optional":true},"negotiate_client_certificate":{"type":"bool","optional":true,"default":false},"ssl_keyvault_identity_client_id":{"type":"string","optional":true},"subject":{"type":"string","computed":true},"thumbprint":{"type":"string","computed":true}}},"optional":true,"at_least_one_of":["management","portal","developer_portal","gateway","scm"]},"management":{"nesting_mode":3,"block":{"attributes":{"certificate":{"type":"string","optional":true},"certificate_password":{"type":"string","optional":true},"certificate_source":{"type":"string","computed":true},"certificate_status":{"type":"string","computed":true},"expiry":{"type":"string","computed":true},"host_name":{"type":"string","required":true},"key_vault_id":{"type":"string","optional":true},"negotiate_client_certificate":{"type":"bool","optional":true,"default":false},"ssl_keyvault_identity_client_id":{"type":"string","optional":true},"subject":{"type":"string","computed":true},"thumbprint":{"type":"string","computed":true}}},"optional":true,"at_least_one_of":["management","portal","developer_portal","gateway","scm"]},"portal":{"nesting_mode":3,"block":{"attributes":{"certificate":{"type":"string","optional":true},"certificate_password":{"type":"string","optional":true},"certificate_source":{"type":"string","computed":true},"certificate_status":{"type":"string","computed":true},"expiry":{"type":"string","computed":true},"host_name":{"type":"string","required":true},"key_vault_id":{"type":"string","optional":true},"negotiate_client_certificate":{"type":"bool","optional":true,"default":false},"ssl_keyvault_identity_client_id":{"type":"string","optional":true},"subject":{"type":"string","computed":true},"thumbprint":{"type":"string","computed":true}}},"optional":true,"at_least_one_of":["management","portal","developer_portal","gateway","scm"]},"scm":{"nesting_mode":3,"block":{"attributes":{"certificate":{"type":"string","optional":true},"certificate_password":{"type":"string","optional":true},"certificate_source":{"type":"string","computed":true},"certificate_status":{"type":"string","computed":true},"expiry":{"type":"string","computed":true},"host_name":{"type":"string","required":true},"key_vault_id":{"type":"string","optional":true},"negotiate_client_certificate":{"type":"bool","optional":true,"default":false},"ssl_keyvault_identity_client_id":{"type":"string","optional":true},"subject":{"type":"string","computed":true},"thumbprint":{"type":"string","computed":true}}},"optional":true,"at_least_one_of":["management","portal","developer_portal","gateway","scm"]}}}},"azurerm_api_management_diagnostic":{"block":{"attributes":{"always_log_errors":{"type":"bool","optional":true,"computed":true},"api_management_logger_id":{"type":"string","required":true},"api_management_name":{"type":"string","required":true},"http_correlation_protocol":{"type":"string","optional":true,"computed":true},"identifier":{"type":"string","required":true},"log_client_ip":{"type":"bool","optional":true,"computed":true},"operation_name_format":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"sampling_percentage":{"type":"number","optional":true,"computed":true},"verbosity":{"type":"string","optional":true,"computed":true}},"block_types":{"backend_request":{"nesting_mode":3,"block":{"attributes":{"body_bytes":{"type":"number","optional":true},"headers_to_log":{"type":["set","string"],"optional":true}},"block_types":{"data_masking":{"nesting_mode":3,"block":{"block_types":{"headers":{"nesting_mode":3,"block":{"attributes":{"mode":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"query_params":{"nesting_mode":3,"block":{"attributes":{"mode":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true}}},"optional":true,"computed":true},"backend_response":{"nesting_mode":3,"block":{"attributes":{"body_bytes":{"type":"number","optional":true},"headers_to_log":{"type":["set","string"],"optional":true}},"block_types":{"data_masking":{"nesting_mode":3,"block":{"block_types":{"headers":{"nesting_mode":3,"block":{"attributes":{"mode":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"query_params":{"nesting_mode":3,"block":{"attributes":{"mode":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true}}},"optional":true,"computed":true},"frontend_request":{"nesting_mode":3,"block":{"attributes":{"body_bytes":{"type":"number","optional":true},"headers_to_log":{"type":["set","string"],"optional":true}},"block_types":{"data_masking":{"nesting_mode":3,"block":{"block_types":{"headers":{"nesting_mode":3,"block":{"attributes":{"mode":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"query_params":{"nesting_mode":3,"block":{"attributes":{"mode":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true}}},"optional":true,"computed":true},"frontend_response":{"nesting_mode":3,"block":{"attributes":{"body_bytes":{"type":"number","optional":true},"headers_to_log":{"type":["set","string"],"optional":true}},"block_types":{"data_masking":{"nesting_mode":3,"block":{"block_types":{"headers":{"nesting_mode":3,"block":{"attributes":{"mode":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"query_params":{"nesting_mode":3,"block":{"attributes":{"mode":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true}}},"optional":true,"computed":true}}}},"azurerm_api_management_email_template":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"body":{"type":"string","required":true},"description":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"subject":{"type":"string","required":true},"template_name":{"type":"string","required":true},"title":{"type":"string","computed":true}}}},"azurerm_api_management_gateway":{"block":{"attributes":{"api_management_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true}},"block_types":{"location_data":{"nesting_mode":3,"block":{"attributes":{"city":{"type":"string","optional":true},"district":{"type":"string","optional":true},"name":{"type":"string","required":true},"region":{"type":"string","optional":true}}},"required":true}}}},"azurerm_api_management_gateway_api":{"block":{"attributes":{"api_id":{"type":"string","required":true},"gateway_id":{"type":"string","required":true}}}},"azurerm_api_management_gateway_certificate_authority":{"block":{"attributes":{"api_management_id":{"type":"string","required":true},"certificate_name":{"type":"string","required":true},"gateway_name":{"type":"string","required":true},"is_trusted":{"type":"bool","optional":true}}}},"azurerm_api_management_gateway_host_name_configuration":{"block":{"attributes":{"api_management_id":{"type":"string","required":true},"certificate_id":{"type":"string","required":true},"gateway_name":{"type":"string","required":true},"host_name":{"type":"string","required":true},"http2_enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"request_client_certificate_enabled":{"type":"bool","optional":true},"tls10_enabled":{"type":"bool","optional":true},"tls11_enabled":{"type":"bool","optional":true}}}},"azurerm_api_management_global_schema":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"description":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"schema_id":{"type":"string","required":true},"type":{"type":"string","required":true},"value":{"type":"string","required":true}}}},"azurerm_api_management_group":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"description":{"type":"string","optional":true},"display_name":{"type":"string","required":true},"external_id":{"type":"string","optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"type":{"type":"string","optional":true,"default":"custom"}}}},"azurerm_api_management_group_user":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"group_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"user_id":{"type":"string","required":true}}}},"azurerm_api_management_identity_provider_aad":{"block":{"attributes":{"allowed_tenants":{"type":["list","string"],"required":true},"api_management_name":{"type":"string","required":true},"client_id":{"type":"string","required":true},"client_library":{"type":"string","optional":true},"client_secret":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"signin_tenant":{"type":"string","optional":true}}}},"azurerm_api_management_identity_provider_aadb2c":{"block":{"attributes":{"allowed_tenant":{"type":"string","required":true},"api_management_name":{"type":"string","required":true},"authority":{"type":"string","required":true},"client_id":{"type":"string","required":true},"client_library":{"type":"string","optional":true},"client_secret":{"type":"string","required":true},"password_reset_policy":{"type":"string","optional":true},"profile_editing_policy":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"signin_policy":{"type":"string","required":true},"signin_tenant":{"type":"string","required":true},"signup_policy":{"type":"string","required":true}}}},"azurerm_api_management_identity_provider_facebook":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"app_id":{"type":"string","required":true},"app_secret":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_api_management_identity_provider_google":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"client_id":{"type":"string","required":true},"client_secret":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_api_management_identity_provider_microsoft":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"client_id":{"type":"string","required":true},"client_secret":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_api_management_identity_provider_twitter":{"block":{"attributes":{"api_key":{"type":"string","required":true},"api_management_name":{"type":"string","required":true},"api_secret_key":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_api_management_logger":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"buffered":{"type":"bool","optional":true,"default":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"resource_id":{"type":"string","optional":true}},"block_types":{"application_insights":{"nesting_mode":3,"block":{"attributes":{"connection_string":{"type":"string","optional":true,"conflicts_with":["application_insights.0.instrumentation_key"],"at_least_one_of":["application_insights.0.connection_string","application_insights.0.instrumentation_key"]},"instrumentation_key":{"type":"string","optional":true,"conflicts_with":["application_insights.0.connection_string"],"at_least_one_of":["application_insights.0.connection_string","application_insights.0.instrumentation_key"]}}},"optional":true,"conflicts_with":["eventhub"]},"eventhub":{"nesting_mode":3,"block":{"attributes":{"connection_string":{"type":"string","optional":true,"conflicts_with":["eventhub.0.endpoint_uri","eventhub.0.user_assigned_identity_client_id"],"at_least_one_of":["eventhub.0.connection_string","eventhub.0.endpoint_uri"]},"endpoint_uri":{"type":"string","optional":true,"conflicts_with":["eventhub.0.connection_string"],"at_least_one_of":["eventhub.0.connection_string","eventhub.0.endpoint_uri"]},"name":{"type":"string","required":true},"user_assigned_identity_client_id":{"type":"string","optional":true,"conflicts_with":["eventhub.0.connection_string"]}}},"optional":true,"conflicts_with":["application_insights"]}}}},"azurerm_api_management_named_value":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"display_name":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"secret":{"type":"bool","optional":true,"default":false},"tags":{"type":["list","string"],"optional":true},"value":{"type":"string","optional":true,"exactly_one_of":["value","value_from_key_vault"]}},"block_types":{"value_from_key_vault":{"nesting_mode":3,"block":{"attributes":{"identity_client_id":{"type":"string","optional":true},"secret_id":{"type":"string","required":true}}},"optional":true,"exactly_one_of":["value","value_from_key_vault"],"required_with":["secret"]}}}},"azurerm_api_management_notification_recipient_email":{"block":{"attributes":{"api_management_id":{"type":"string","required":true},"email":{"type":"string","required":true},"notification_type":{"type":"string","required":true}}}},"azurerm_api_management_notification_recipient_user":{"block":{"attributes":{"api_management_id":{"type":"string","required":true},"notification_type":{"type":"string","required":true},"user_id":{"type":"string","required":true}}}},"azurerm_api_management_openid_connect_provider":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"client_id":{"type":"string","required":true},"client_secret":{"type":"string","required":true},"description":{"type":"string","optional":true},"display_name":{"type":"string","required":true},"metadata_endpoint":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_api_management_policy":{"block":{"attributes":{"api_management_id":{"type":"string","required":true},"xml_content":{"type":"string","optional":true,"computed":true,"conflicts_with":["xml_link"],"exactly_one_of":["xml_link","xml_content"]},"xml_link":{"type":"string","optional":true,"conflicts_with":["xml_content"],"exactly_one_of":["xml_link","xml_content"]}}}},"azurerm_api_management_policy_fragment":{"block":{"attributes":{"api_management_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"format":{"type":"string","optional":true,"default":"xml"},"name":{"type":"string","required":true},"value":{"type":"string","required":true}}}},"azurerm_api_management_product":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"approval_required":{"type":"bool","optional":true},"description":{"type":"string","optional":true},"display_name":{"type":"string","required":true},"product_id":{"type":"string","required":true},"published":{"type":"bool","required":true},"resource_group_name":{"type":"string","required":true},"subscription_required":{"type":"bool","optional":true,"default":true},"subscriptions_limit":{"type":"number","optional":true},"terms":{"type":"string","optional":true}}}},"azurerm_api_management_product_api":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"api_name":{"type":"string","required":true},"product_id":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_api_management_product_group":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"group_name":{"type":"string","required":true},"product_id":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_api_management_product_policy":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"product_id":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"xml_content":{"type":"string","optional":true,"computed":true,"conflicts_with":["xml_link"]},"xml_link":{"type":"string","optional":true,"conflicts_with":["xml_content"]}}}},"azurerm_api_management_product_tag":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"api_management_product_id":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_api_management_redis_cache":{"block":{"attributes":{"api_management_id":{"type":"string","required":true},"cache_location":{"type":"string","optional":true,"default":"default"},"connection_string":{"type":"string","required":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"redis_cache_id":{"type":"string","optional":true}}}},"azurerm_api_management_subscription":{"block":{"attributes":{"allow_tracing":{"type":"bool","optional":true,"default":true},"api_id":{"type":"string","optional":true,"conflicts_with":["product_id"]},"api_management_name":{"type":"string","required":true},"display_name":{"type":"string","required":true},"primary_key":{"type":"string","optional":true,"computed":true},"product_id":{"type":"string","optional":true,"conflicts_with":["api_id"]},"resource_group_name":{"type":"string","required":true},"secondary_key":{"type":"string","optional":true,"computed":true},"state":{"type":"string","optional":true,"default":"submitted"},"subscription_id":{"type":"string","optional":true,"computed":true},"user_id":{"type":"string","optional":true}}}},"azurerm_api_management_tag":{"block":{"attributes":{"api_management_id":{"type":"string","required":true},"display_name":{"type":"string","optional":true,"computed":true},"name":{"type":"string","required":true}}}},"azurerm_api_management_user":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"confirmation":{"type":"string","optional":true},"email":{"type":"string","required":true},"first_name":{"type":"string","required":true},"last_name":{"type":"string","required":true},"note":{"type":"string","optional":true},"password":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"state":{"type":"string","optional":true,"computed":true},"user_id":{"type":"string","required":true}}}},"azurerm_app_configuration":{"block":{"attributes":{"data_plane_proxy_authentication_mode":{"type":"string","optional":true,"default":"Local"},"data_plane_proxy_private_link_delegation_enabled":{"type":"bool","optional":true,"default":false},"endpoint":{"type":"string","computed":true},"local_auth_enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"primary_read_key":{"type":["list",["object",{"connection_string":"string","id":"string","secret":"string"}]],"computed":true},"primary_write_key":{"type":["list",["object",{"connection_string":"string","id":"string","secret":"string"}]],"computed":true},"public_network_access":{"type":"string","optional":true},"purge_protection_enabled":{"type":"bool","optional":true,"default":false},"resource_group_name":{"type":"string","required":true},"secondary_read_key":{"type":["list",["object",{"connection_string":"string","id":"string","secret":"string"}]],"computed":true},"secondary_write_key":{"type":["list",["object",{"connection_string":"string","id":"string","secret":"string"}]],"computed":true},"sku":{"type":"string","optional":true,"default":"free"},"soft_delete_retention_days":{"type":"number","optional":true,"default":7},"tags":{"type":["map","string"],"optional":true}},"block_types":{"encryption":{"nesting_mode":3,"block":{"attributes":{"identity_client_id":{"type":"string","optional":true},"key_vault_key_identifier":{"type":"string","optional":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"replica":{"nesting_mode":4,"block":{"attributes":{"endpoint":{"type":"string","computed":true},"id":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true}}},"optional":true}}}},"azurerm_app_configuration_feature":{"block":{"attributes":{"configuration_store_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"enabled":{"type":"bool","optional":true},"etag":{"type":"string","optional":true,"computed":true},"key":{"type":"string","optional":true,"computed":true},"label":{"type":"string","optional":true},"locked":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"percentage_filter_value":{"type":"number","optional":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"targeting_filter":{"nesting_mode":3,"block":{"attributes":{"default_rollout_percentage":{"type":"number","required":true},"users":{"type":["list","string"],"optional":true}},"block_types":{"groups":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"rollout_percentage":{"type":"number","required":true}}},"optional":true}}},"optional":true},"timewindow_filter":{"nesting_mode":3,"block":{"attributes":{"end":{"type":"string","optional":true},"start":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_app_configuration_key":{"block":{"attributes":{"configuration_store_id":{"type":"string","required":true},"content_type":{"type":"string","optional":true,"computed":true},"etag":{"type":"string","optional":true,"computed":true},"key":{"type":"string","required":true},"label":{"type":"string","optional":true},"locked":{"type":"bool","optional":true,"default":false},"tags":{"type":["map","string"],"optional":true},"type":{"type":"string","optional":true,"default":"kv"},"value":{"type":"string","optional":true,"conflicts_with":["vault_key_reference"]},"vault_key_reference":{"type":"string","optional":true,"conflicts_with":["value"]}}}},"azurerm_app_service":{"block":{"attributes":{"app_service_plan_id":{"type":"string","required":true},"app_settings":{"type":["map","string"],"optional":true,"computed":true},"client_affinity_enabled":{"type":"bool","optional":true,"default":false},"client_cert_enabled":{"type":"bool","optional":true,"default":false},"client_cert_mode":{"type":"string","optional":true,"computed":true},"custom_domain_verification_id":{"type":"string","computed":true},"default_site_hostname":{"type":"string","computed":true},"enabled":{"type":"bool","optional":true,"default":true},"https_only":{"type":"bool","optional":true,"default":false},"key_vault_reference_identity_id":{"type":"string","optional":true,"computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"outbound_ip_address_list":{"type":["list","string"],"computed":true},"outbound_ip_addresses":{"type":"string","computed":true},"possible_outbound_ip_address_list":{"type":["list","string"],"computed":true},"possible_outbound_ip_addresses":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"site_credential":{"type":["list",["object",{"password":"string","username":"string"}]],"computed":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"auth_settings":{"nesting_mode":3,"block":{"attributes":{"additional_login_params":{"type":["map","string"],"optional":true},"allowed_external_redirect_urls":{"type":["list","string"],"optional":true},"default_provider":{"type":"string","optional":true},"enabled":{"type":"bool","required":true},"issuer":{"type":"string","optional":true},"runtime_version":{"type":"string","optional":true},"token_refresh_extension_hours":{"type":"number","optional":true,"default":72},"token_store_enabled":{"type":"bool","optional":true,"default":false},"unauthenticated_client_action":{"type":"string","optional":true}},"block_types":{"active_directory":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true}}},"optional":true},"facebook":{"nesting_mode":3,"block":{"attributes":{"app_id":{"type":"string","required":true},"app_secret":{"type":"string","required":true},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"google":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","required":true},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"microsoft":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","required":true},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"twitter":{"nesting_mode":3,"block":{"attributes":{"consumer_key":{"type":"string","required":true},"consumer_secret":{"type":"string","required":true}}},"optional":true}}},"optional":true,"computed":true},"backup":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"storage_account_url":{"type":"string","required":true}},"block_types":{"schedule":{"nesting_mode":3,"block":{"attributes":{"frequency_interval":{"type":"number","required":true},"frequency_unit":{"type":"string","required":true},"keep_at_least_one_backup":{"type":"bool","optional":true,"default":false},"retention_period_in_days":{"type":"number","optional":true,"default":30},"start_time":{"type":"string","optional":true}}},"required":true}}},"optional":true},"connection_string":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"type":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true,"computed":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"logs":{"nesting_mode":3,"block":{"attributes":{"detailed_error_messages_enabled":{"type":"bool","optional":true,"default":false},"failed_request_tracing_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"application_logs":{"nesting_mode":3,"block":{"attributes":{"file_system_level":{"type":"string","optional":true,"default":"Off"}},"block_types":{"azure_blob_storage":{"nesting_mode":3,"block":{"attributes":{"level":{"type":"string","required":true},"retention_in_days":{"type":"number","required":true},"sas_url":{"type":"string","required":true}}},"optional":true}}},"optional":true,"computed":true},"http_logs":{"nesting_mode":3,"block":{"block_types":{"azure_blob_storage":{"nesting_mode":3,"block":{"attributes":{"retention_in_days":{"type":"number","required":true},"sas_url":{"type":"string","required":true}}},"optional":true,"conflicts_with":["logs.0.http_logs.0.file_system"],"at_least_one_of":["logs.0.http_logs.0.azure_blob_storage","logs.0.http_logs.0.file_system"]},"file_system":{"nesting_mode":3,"block":{"attributes":{"retention_in_days":{"type":"number","required":true},"retention_in_mb":{"type":"number","required":true}}},"optional":true,"conflicts_with":["logs.0.http_logs.0.azure_blob_storage"],"at_least_one_of":["logs.0.http_logs.0.azure_blob_storage","logs.0.http_logs.0.file_system"]}}},"optional":true,"computed":true}}},"optional":true,"computed":true},"site_config":{"nesting_mode":3,"block":{"attributes":{"acr_use_managed_identity_credentials":{"type":"bool","optional":true,"default":false},"acr_user_managed_identity_client_id":{"type":"string","optional":true},"always_on":{"type":"bool","optional":true,"default":false},"app_command_line":{"type":"string","optional":true},"auto_swap_slot_name":{"type":"string","optional":true},"default_documents":{"type":["list","string"],"optional":true},"dotnet_framework_version":{"type":"string","optional":true,"default":"v4.0"},"ftps_state":{"type":"string","optional":true,"computed":true},"health_check_path":{"type":"string","optional":true},"http2_enabled":{"type":"bool","optional":true,"default":false},"ip_restriction":{"type":["list",["object",{"action":"string","headers":["list",["object",{"x_azure_fdid":["set","string"],"x_fd_health_probe":["set","string"],"x_forwarded_for":["set","string"],"x_forwarded_host":["set","string"]}]],"ip_address":"string","name":"string","priority":"number","service_tag":"string","virtual_network_subnet_id":"string"}]],"optional":true,"computed":true},"java_container":{"type":"string","optional":true},"java_container_version":{"type":"string","optional":true},"java_version":{"type":"string","optional":true},"linux_fx_version":{"type":"string","optional":true,"computed":true},"local_mysql_enabled":{"type":"bool","optional":true,"computed":true},"managed_pipeline_mode":{"type":"string","optional":true,"computed":true},"min_tls_version":{"type":"string","optional":true,"computed":true},"number_of_workers":{"type":"number","optional":true,"computed":true},"php_version":{"type":"string","optional":true},"python_version":{"type":"string","optional":true},"remote_debugging_enabled":{"type":"bool","optional":true,"default":false},"remote_debugging_version":{"type":"string","optional":true,"computed":true},"scm_ip_restriction":{"type":["list",["object",{"action":"string","headers":["list",["object",{"x_azure_fdid":["set","string"],"x_fd_health_probe":["set","string"],"x_forwarded_for":["set","string"],"x_forwarded_host":["set","string"]}]],"ip_address":"string","name":"string","priority":"number","service_tag":"string","virtual_network_subnet_id":"string"}]],"optional":true,"computed":true},"scm_type":{"type":"string","optional":true,"computed":true},"scm_use_main_ip_restriction":{"type":"bool","optional":true,"default":false},"use_32_bit_worker_process":{"type":"bool","optional":true},"vnet_route_all_enabled":{"type":"bool","optional":true,"computed":true},"websockets_enabled":{"type":"bool","optional":true,"computed":true},"windows_fx_version":{"type":"string","optional":true,"computed":true}},"block_types":{"cors":{"nesting_mode":3,"block":{"attributes":{"allowed_origins":{"type":["set","string"],"required":true},"support_credentials":{"type":"bool","optional":true,"default":false}}},"optional":true,"computed":true}}},"optional":true,"computed":true},"source_control":{"nesting_mode":3,"block":{"attributes":{"branch":{"type":"string","optional":true,"computed":true,"at_least_one_of":["source_control.0.repo_url","source_control.0.branch","source_control.0.manual_integration","source_control.0.use_mercurial","source_control.0.rollback_enabled"]},"manual_integration":{"type":"bool","optional":true,"computed":true,"at_least_one_of":["source_control.0.repo_url","source_control.0.branch","source_control.0.manual_integration","source_control.0.use_mercurial","source_control.0.rollback_enabled"]},"repo_url":{"type":"string","optional":true,"computed":true,"at_least_one_of":["source_control.0.repo_url","source_control.0.branch","source_control.0.manual_integration","source_control.0.use_mercurial","source_control.0.rollback_enabled"]},"rollback_enabled":{"type":"bool","optional":true,"computed":true,"at_least_one_of":["source_control.0.repo_url","source_control.0.branch","source_control.0.manual_integration","source_control.0.use_mercurial","source_control.0.rollback_enabled"]},"use_mercurial":{"type":"bool","optional":true,"computed":true,"at_least_one_of":["source_control.0.repo_url","source_control.0.branch","source_control.0.manual_integration","source_control.0.use_mercurial","source_control.0.rollback_enabled"]}}},"optional":true,"computed":true,"conflicts_with":["site_config.0.scm_type"]},"storage_account":{"nesting_mode":4,"block":{"attributes":{"access_key":{"type":"string","required":true},"account_name":{"type":"string","required":true},"mount_path":{"type":"string","optional":true},"name":{"type":"string","required":true},"share_name":{"type":"string","required":true},"type":{"type":"string","required":true}}},"optional":true,"computed":true}}}},"azurerm_app_service_active_slot":{"block":{"attributes":{"app_service_name":{"type":"string","required":true},"app_service_slot_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_app_service_certificate":{"block":{"attributes":{"app_service_plan_id":{"type":"string","optional":true},"expiration_date":{"type":"string","computed":true},"friendly_name":{"type":"string","computed":true},"host_names":{"type":["list","string"],"computed":true},"hosting_environment_profile_id":{"type":"string","computed":true},"issue_date":{"type":"string","computed":true},"issuer":{"type":"string","computed":true},"key_vault_id":{"type":"string","optional":true,"required_with":["key_vault_secret_id"]},"key_vault_secret_id":{"type":"string","optional":true,"conflicts_with":["pfx_blob","password"],"exactly_one_of":["key_vault_secret_id","pfx_blob"]},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"password":{"type":"string","optional":true},"pfx_blob":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"subject_name":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true},"thumbprint":{"type":"string","computed":true}}}},"azurerm_app_service_certificate_binding":{"block":{"attributes":{"app_service_name":{"type":"string","computed":true},"certificate_id":{"type":"string","required":true},"hostname":{"type":"string","computed":true},"hostname_binding_id":{"type":"string","required":true},"ssl_state":{"type":"string","required":true},"thumbprint":{"type":"string","computed":true}}}},"azurerm_app_service_certificate_order":{"block":{"attributes":{"app_service_certificate_not_renewable_reasons":{"type":["list","string"],"computed":true},"auto_renew":{"type":"bool","optional":true,"default":true},"certificates":{"type":["list",["object",{"certificate_name":"string","key_vault_id":"string","key_vault_secret_name":"string","provisioning_state":"string"}]],"computed":true},"csr":{"type":"string","optional":true,"computed":true,"conflicts_with":["distinguished_name"]},"distinguished_name":{"type":"string","optional":true,"computed":true,"conflicts_with":["csr"]},"domain_verification_token":{"type":"string","computed":true},"expiration_time":{"type":"string","computed":true},"intermediate_thumbprint":{"type":"string","computed":true},"is_private_key_external":{"type":"bool","computed":true},"key_size":{"type":"number","optional":true,"default":2048},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"product_type":{"type":"string","optional":true,"default":"Standard"},"resource_group_name":{"type":"string","required":true},"root_thumbprint":{"type":"string","computed":true},"signed_certificate_thumbprint":{"type":"string","computed":true},"status":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true},"validity_in_years":{"type":"number","optional":true,"default":1}}}},"azurerm_app_service_connection":{"block":{"attributes":{"app_service_id":{"type":"string","required":true},"client_type":{"type":"string","optional":true,"default":"none"},"name":{"type":"string","required":true},"target_resource_id":{"type":"string","required":true},"vnet_solution":{"type":"string","optional":true}},"block_types":{"authentication":{"nesting_mode":3,"block":{"attributes":{"certificate":{"type":"string","optional":true},"client_id":{"type":"string","optional":true},"name":{"type":"string","optional":true},"principal_id":{"type":"string","optional":true},"secret":{"type":"string","optional":true},"subscription_id":{"type":"string","optional":true},"type":{"type":"string","required":true}}},"required":true},"secret_store":{"nesting_mode":3,"block":{"attributes":{"key_vault_id":{"type":"string","required":true}}},"optional":true}}}},"azurerm_app_service_custom_hostname_binding":{"block":{"attributes":{"app_service_name":{"type":"string","required":true},"hostname":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"ssl_state":{"type":"string","optional":true,"computed":true},"thumbprint":{"type":"string","optional":true,"computed":true},"virtual_ip":{"type":"string","computed":true}}}},"azurerm_app_service_environment_v3":{"block":{"attributes":{"allow_new_private_endpoint_connections":{"type":"bool","optional":true,"default":true},"dedicated_host_count":{"type":"number","optional":true,"conflicts_with":["zone_redundant"]},"dns_suffix":{"type":"string","computed":true},"external_inbound_ip_addresses":{"type":["list","string"],"computed":true},"inbound_network_dependencies":{"type":["list",["object",{"description":"string","ip_addresses":["list","string"],"ports":["list","string"]}]],"computed":true},"internal_inbound_ip_addresses":{"type":["list","string"],"computed":true},"internal_load_balancing_mode":{"type":"string","optional":true,"default":"None"},"ip_ssl_address_count":{"type":"number","computed":true},"linux_outbound_ip_addresses":{"type":["list","string"],"computed":true},"location":{"type":"string","computed":true},"name":{"type":"string","required":true},"pricing_tier":{"type":"string","computed":true},"remote_debugging_enabled":{"type":"bool","optional":true,"default":false},"resource_group_name":{"type":"string","required":true},"subnet_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"windows_outbound_ip_addresses":{"type":["list","string"],"computed":true},"zone_redundant":{"type":"bool","optional":true,"default":false,"conflicts_with":["dedicated_host_count"]}},"block_types":{"cluster_setting":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true,"computed":true}}}},"azurerm_app_service_hybrid_connection":{"block":{"attributes":{"app_service_name":{"type":"string","required":true},"hostname":{"type":"string","required":true},"namespace_name":{"type":"string","computed":true},"port":{"type":"number","required":true},"relay_id":{"type":"string","required":true},"relay_name":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"send_key_name":{"type":"string","optional":true,"default":"RootManageSharedAccessKey"},"send_key_value":{"type":"string","computed":true},"service_bus_namespace":{"type":"string","computed":true},"service_bus_suffix":{"type":"string","computed":true}}}},"azurerm_app_service_managed_certificate":{"block":{"attributes":{"canonical_name":{"type":"string","computed":true},"custom_hostname_binding_id":{"type":"string","required":true},"expiration_date":{"type":"string","computed":true},"friendly_name":{"type":"string","computed":true},"host_names":{"type":["list","string"],"computed":true},"issue_date":{"type":"string","computed":true},"issuer":{"type":"string","computed":true},"subject_name":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true},"thumbprint":{"type":"string","computed":true}}}},"azurerm_app_service_plan":{"block":{"attributes":{"app_service_environment_id":{"type":"string","optional":true},"is_xenon":{"type":"bool","optional":true},"kind":{"type":"string","optional":true,"default":"Windows"},"location":{"type":"string","required":true},"maximum_elastic_worker_count":{"type":"number","optional":true,"computed":true},"maximum_number_of_workers":{"type":"number","computed":true},"name":{"type":"string","required":true},"per_site_scaling":{"type":"bool","optional":true},"reserved":{"type":"bool","optional":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"zone_redundant":{"type":"bool","optional":true}},"block_types":{"sku":{"nesting_mode":3,"block":{"attributes":{"capacity":{"type":"number","optional":true,"computed":true},"size":{"type":"string","required":true},"tier":{"type":"string","required":true}}},"required":true}}}},"azurerm_app_service_public_certificate":{"block":{"attributes":{"app_service_name":{"type":"string","required":true},"blob":{"type":"string","required":true},"certificate_location":{"type":"string","required":true},"certificate_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"thumbprint":{"type":"string","computed":true}}}},"azurerm_app_service_slot":{"block":{"attributes":{"app_service_name":{"type":"string","required":true},"app_service_plan_id":{"type":"string","required":true},"app_settings":{"type":["map","string"],"optional":true,"computed":true},"client_affinity_enabled":{"type":"bool","optional":true,"computed":true},"default_site_hostname":{"type":"string","computed":true},"enabled":{"type":"bool","optional":true,"default":true},"https_only":{"type":"bool","optional":true,"default":false},"key_vault_reference_identity_id":{"type":"string","optional":true,"computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"site_credential":{"type":["list",["object",{"password":"string","username":"string"}]],"computed":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"auth_settings":{"nesting_mode":3,"block":{"attributes":{"additional_login_params":{"type":["map","string"],"optional":true},"allowed_external_redirect_urls":{"type":["list","string"],"optional":true},"default_provider":{"type":"string","optional":true},"enabled":{"type":"bool","required":true},"issuer":{"type":"string","optional":true},"runtime_version":{"type":"string","optional":true},"token_refresh_extension_hours":{"type":"number","optional":true,"default":72},"token_store_enabled":{"type":"bool","optional":true,"default":false},"unauthenticated_client_action":{"type":"string","optional":true}},"block_types":{"active_directory":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true}}},"optional":true},"facebook":{"nesting_mode":3,"block":{"attributes":{"app_id":{"type":"string","required":true},"app_secret":{"type":"string","required":true},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"google":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","required":true},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"microsoft":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","required":true},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"twitter":{"nesting_mode":3,"block":{"attributes":{"consumer_key":{"type":"string","required":true},"consumer_secret":{"type":"string","required":true}}},"optional":true}}},"optional":true,"computed":true},"connection_string":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"type":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true,"computed":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"logs":{"nesting_mode":3,"block":{"attributes":{"detailed_error_messages_enabled":{"type":"bool","optional":true,"default":false},"failed_request_tracing_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"application_logs":{"nesting_mode":3,"block":{"attributes":{"file_system_level":{"type":"string","optional":true,"default":"Off"}},"block_types":{"azure_blob_storage":{"nesting_mode":3,"block":{"attributes":{"level":{"type":"string","required":true},"retention_in_days":{"type":"number","required":true},"sas_url":{"type":"string","required":true}}},"optional":true}}},"optional":true,"computed":true},"http_logs":{"nesting_mode":3,"block":{"block_types":{"azure_blob_storage":{"nesting_mode":3,"block":{"attributes":{"retention_in_days":{"type":"number","required":true},"sas_url":{"type":"string","required":true}}},"optional":true,"conflicts_with":["logs.0.http_logs.0.file_system"],"at_least_one_of":["logs.0.http_logs.0.azure_blob_storage","logs.0.http_logs.0.file_system"]},"file_system":{"nesting_mode":3,"block":{"attributes":{"retention_in_days":{"type":"number","required":true},"retention_in_mb":{"type":"number","required":true}}},"optional":true,"conflicts_with":["logs.0.http_logs.0.azure_blob_storage"],"at_least_one_of":["logs.0.http_logs.0.azure_blob_storage","logs.0.http_logs.0.file_system"]}}},"optional":true,"computed":true}}},"optional":true,"computed":true},"site_config":{"nesting_mode":3,"block":{"attributes":{"acr_use_managed_identity_credentials":{"type":"bool","optional":true,"default":false},"acr_user_managed_identity_client_id":{"type":"string","optional":true},"always_on":{"type":"bool","optional":true,"default":false},"app_command_line":{"type":"string","optional":true},"auto_swap_slot_name":{"type":"string","optional":true},"default_documents":{"type":["list","string"],"optional":true},"dotnet_framework_version":{"type":"string","optional":true,"default":"v4.0"},"ftps_state":{"type":"string","optional":true,"computed":true},"health_check_path":{"type":"string","optional":true},"http2_enabled":{"type":"bool","optional":true,"default":false},"ip_restriction":{"type":["list",["object",{"action":"string","headers":["list",["object",{"x_azure_fdid":["set","string"],"x_fd_health_probe":["set","string"],"x_forwarded_for":["set","string"],"x_forwarded_host":["set","string"]}]],"ip_address":"string","name":"string","priority":"number","service_tag":"string","virtual_network_subnet_id":"string"}]],"optional":true,"computed":true},"java_container":{"type":"string","optional":true},"java_container_version":{"type":"string","optional":true},"java_version":{"type":"string","optional":true},"linux_fx_version":{"type":"string","optional":true,"computed":true},"local_mysql_enabled":{"type":"bool","optional":true,"computed":true},"managed_pipeline_mode":{"type":"string","optional":true,"computed":true},"min_tls_version":{"type":"string","optional":true,"computed":true},"number_of_workers":{"type":"number","optional":true,"computed":true},"php_version":{"type":"string","optional":true},"python_version":{"type":"string","optional":true},"remote_debugging_enabled":{"type":"bool","optional":true,"default":false},"remote_debugging_version":{"type":"string","optional":true,"computed":true},"scm_ip_restriction":{"type":["list",["object",{"action":"string","headers":["list",["object",{"x_azure_fdid":["set","string"],"x_fd_health_probe":["set","string"],"x_forwarded_for":["set","string"],"x_forwarded_host":["set","string"]}]],"ip_address":"string","name":"string","priority":"number","service_tag":"string","virtual_network_subnet_id":"string"}]],"optional":true,"computed":true},"scm_type":{"type":"string","optional":true,"computed":true},"scm_use_main_ip_restriction":{"type":"bool","optional":true,"default":false},"use_32_bit_worker_process":{"type":"bool","optional":true},"vnet_route_all_enabled":{"type":"bool","optional":true,"computed":true},"websockets_enabled":{"type":"bool","optional":true,"computed":true},"windows_fx_version":{"type":"string","optional":true,"computed":true}},"block_types":{"cors":{"nesting_mode":3,"block":{"attributes":{"allowed_origins":{"type":["set","string"],"required":true},"support_credentials":{"type":"bool","optional":true,"default":false}}},"optional":true,"computed":true}}},"optional":true,"computed":true},"storage_account":{"nesting_mode":4,"block":{"attributes":{"access_key":{"type":"string","required":true},"account_name":{"type":"string","required":true},"mount_path":{"type":"string","optional":true},"name":{"type":"string","required":true},"share_name":{"type":"string","required":true},"type":{"type":"string","required":true}}},"optional":true,"computed":true}}}},"azurerm_app_service_slot_custom_hostname_binding":{"block":{"attributes":{"app_service_slot_id":{"type":"string","required":true},"hostname":{"type":"string","required":true},"ssl_state":{"type":"string","optional":true,"computed":true},"thumbprint":{"type":"string","optional":true,"computed":true},"virtual_ip":{"type":"string","computed":true}}}},"azurerm_app_service_slot_virtual_network_swift_connection":{"block":{"attributes":{"app_service_id":{"type":"string","required":true},"slot_name":{"type":"string","required":true},"subnet_id":{"type":"string","required":true}}}},"azurerm_app_service_source_control":{"block":{"attributes":{"app_id":{"type":"string","required":true},"branch":{"type":"string","optional":true,"computed":true,"required_with":["repo_url"]},"repo_url":{"type":"string","optional":true,"computed":true,"required_with":["branch"]},"rollback_enabled":{"type":"bool","optional":true,"default":false},"scm_type":{"type":"string","computed":true},"use_local_git":{"type":"bool","optional":true,"default":false,"conflicts_with":["repo_url","branch","use_manual_integration","uses_github_action","github_action_configuration","use_mercurial","rollback_enabled"]},"use_manual_integration":{"type":"bool","optional":true,"default":false},"use_mercurial":{"type":"bool","optional":true,"default":false},"uses_github_action":{"type":"bool","computed":true}},"block_types":{"github_action_configuration":{"nesting_mode":3,"block":{"attributes":{"generate_workflow_file":{"type":"bool","optional":true,"default":true},"linux_action":{"type":"bool","computed":true}},"block_types":{"code_configuration":{"nesting_mode":3,"block":{"attributes":{"runtime_stack":{"type":"string","required":true},"runtime_version":{"type":"string","required":true}}},"optional":true},"container_configuration":{"nesting_mode":3,"block":{"attributes":{"image_name":{"type":"string","required":true},"registry_password":{"type":"string","optional":true},"registry_url":{"type":"string","required":true},"registry_username":{"type":"string","optional":true}}},"optional":true}}},"optional":true}}}},"azurerm_app_service_source_control_slot":{"block":{"attributes":{"branch":{"type":"string","optional":true,"computed":true,"required_with":["repo_url"]},"repo_url":{"type":"string","optional":true,"computed":true,"required_with":["branch"]},"rollback_enabled":{"type":"bool","optional":true,"default":false},"scm_type":{"type":"string","computed":true},"slot_id":{"type":"string","required":true},"use_local_git":{"type":"bool","optional":true,"default":false,"conflicts_with":["repo_url","branch","use_manual_integration","uses_github_action","github_action_configuration","use_mercurial","rollback_enabled"]},"use_manual_integration":{"type":"bool","optional":true,"default":false},"use_mercurial":{"type":"bool","optional":true,"default":false},"uses_github_action":{"type":"bool","computed":true}},"block_types":{"github_action_configuration":{"nesting_mode":3,"block":{"attributes":{"generate_workflow_file":{"type":"bool","optional":true,"default":true},"linux_action":{"type":"bool","computed":true}},"block_types":{"code_configuration":{"nesting_mode":3,"block":{"attributes":{"runtime_stack":{"type":"string","required":true},"runtime_version":{"type":"string","required":true}}},"optional":true},"container_configuration":{"nesting_mode":3,"block":{"attributes":{"image_name":{"type":"string","required":true},"registry_password":{"type":"string","optional":true},"registry_url":{"type":"string","required":true},"registry_username":{"type":"string","optional":true}}},"optional":true}}},"optional":true}}}},"azurerm_app_service_source_control_token":{"block":{"attributes":{"token":{"type":"string","required":true},"token_secret":{"type":"string","optional":true},"type":{"type":"string","required":true}}}},"azurerm_app_service_virtual_network_swift_connection":{"block":{"attributes":{"app_service_id":{"type":"string","required":true},"subnet_id":{"type":"string","required":true}}}},"azurerm_application_gateway":{"block":{"attributes":{"enable_http2":{"type":"bool","optional":true},"fips_enabled":{"type":"bool","optional":true},"firewall_policy_id":{"type":"string","optional":true},"force_firewall_policy_association":{"type":"bool","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"private_endpoint_connection":{"type":["set",["object",{"id":"string","name":"string"}]],"computed":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"zones":{"type":["set","string"],"optional":true}},"block_types":{"authentication_certificate":{"nesting_mode":3,"block":{"attributes":{"data":{"type":"string","required":true},"id":{"type":"string","computed":true},"name":{"type":"string","required":true}}},"optional":true},"autoscale_configuration":{"nesting_mode":3,"block":{"attributes":{"max_capacity":{"type":"number","optional":true},"min_capacity":{"type":"number","required":true}}},"optional":true},"backend_address_pool":{"nesting_mode":4,"block":{"attributes":{"fqdns":{"type":["set","string"],"optional":true},"id":{"type":"string","computed":true},"ip_addresses":{"type":["set","string"],"optional":true},"name":{"type":"string","required":true}}},"required":true},"backend_http_settings":{"nesting_mode":4,"block":{"attributes":{"affinity_cookie_name":{"type":"string","optional":true},"cookie_based_affinity":{"type":"string","required":true},"host_name":{"type":"string","optional":true},"id":{"type":"string","computed":true},"name":{"type":"string","required":true},"path":{"type":"string","optional":true},"pick_host_name_from_backend_address":{"type":"bool","optional":true,"default":false},"port":{"type":"number","required":true},"probe_id":{"type":"string","computed":true},"probe_name":{"type":"string","optional":true},"protocol":{"type":"string","required":true},"request_timeout":{"type":"number","optional":true,"default":30},"trusted_root_certificate_names":{"type":["list","string"],"optional":true}},"block_types":{"authentication_certificate":{"nesting_mode":3,"block":{"attributes":{"id":{"type":"string","computed":true},"name":{"type":"string","required":true}}},"optional":true},"connection_draining":{"nesting_mode":3,"block":{"attributes":{"drain_timeout_sec":{"type":"number","required":true},"enabled":{"type":"bool","required":true}}},"optional":true}}},"required":true},"custom_error_configuration":{"nesting_mode":3,"block":{"attributes":{"custom_error_page_url":{"type":"string","required":true},"id":{"type":"string","computed":true},"status_code":{"type":"string","required":true}}},"optional":true},"frontend_ip_configuration":{"nesting_mode":3,"block":{"attributes":{"id":{"type":"string","computed":true},"name":{"type":"string","required":true},"private_ip_address":{"type":"string","optional":true,"computed":true},"private_ip_address_allocation":{"type":"string","optional":true,"default":"Dynamic"},"private_link_configuration_id":{"type":"string","computed":true},"private_link_configuration_name":{"type":"string","optional":true},"public_ip_address_id":{"type":"string","optional":true},"subnet_id":{"type":"string","optional":true}}},"required":true},"frontend_port":{"nesting_mode":4,"block":{"attributes":{"id":{"type":"string","computed":true},"name":{"type":"string","required":true},"port":{"type":"number","required":true}}},"required":true},"gateway_ip_configuration":{"nesting_mode":3,"block":{"attributes":{"id":{"type":"string","computed":true},"name":{"type":"string","required":true},"subnet_id":{"type":"string","required":true}}},"required":true},"global":{"nesting_mode":3,"block":{"attributes":{"request_buffering_enabled":{"type":"bool","required":true},"response_buffering_enabled":{"type":"bool","required":true}}},"optional":true},"http_listener":{"nesting_mode":4,"block":{"attributes":{"firewall_policy_id":{"type":"string","optional":true},"frontend_ip_configuration_id":{"type":"string","computed":true},"frontend_ip_configuration_name":{"type":"string","required":true},"frontend_port_id":{"type":"string","computed":true},"frontend_port_name":{"type":"string","required":true},"host_name":{"type":"string","optional":true},"host_names":{"type":["set","string"],"optional":true},"id":{"type":"string","computed":true},"name":{"type":"string","required":true},"protocol":{"type":"string","required":true},"require_sni":{"type":"bool","optional":true},"ssl_certificate_id":{"type":"string","computed":true},"ssl_certificate_name":{"type":"string","optional":true},"ssl_profile_id":{"type":"string","computed":true},"ssl_profile_name":{"type":"string","optional":true}},"block_types":{"custom_error_configuration":{"nesting_mode":3,"block":{"attributes":{"custom_error_page_url":{"type":"string","required":true},"id":{"type":"string","computed":true},"status_code":{"type":"string","required":true}}},"optional":true}}},"required":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"private_link_configuration":{"nesting_mode":4,"block":{"attributes":{"id":{"type":"string","computed":true},"name":{"type":"string","required":true}},"block_types":{"ip_configuration":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"primary":{"type":"bool","required":true},"private_ip_address":{"type":"string","optional":true,"computed":true},"private_ip_address_allocation":{"type":"string","required":true},"subnet_id":{"type":"string","required":true}}},"required":true}}},"optional":true},"probe":{"nesting_mode":4,"block":{"attributes":{"host":{"type":"string","optional":true},"id":{"type":"string","computed":true},"interval":{"type":"number","required":true},"minimum_servers":{"type":"number","optional":true,"default":0},"name":{"type":"string","required":true},"path":{"type":"string","required":true},"pick_host_name_from_backend_http_settings":{"type":"bool","optional":true,"default":false},"port":{"type":"number","optional":true},"protocol":{"type":"string","required":true},"timeout":{"type":"number","required":true},"unhealthy_threshold":{"type":"number","required":true}},"block_types":{"match":{"nesting_mode":3,"block":{"attributes":{"body":{"type":"string","optional":true},"status_code":{"type":["list","string"],"required":true}}},"optional":true}}},"optional":true},"redirect_configuration":{"nesting_mode":4,"block":{"attributes":{"id":{"type":"string","computed":true},"include_path":{"type":"bool","optional":true,"default":false},"include_query_string":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"redirect_type":{"type":"string","required":true},"target_listener_id":{"type":"string","computed":true},"target_listener_name":{"type":"string","optional":true},"target_url":{"type":"string","optional":true}}},"optional":true},"request_routing_rule":{"nesting_mode":4,"block":{"attributes":{"backend_address_pool_id":{"type":"string","computed":true},"backend_address_pool_name":{"type":"string","optional":true},"backend_http_settings_id":{"type":"string","computed":true},"backend_http_settings_name":{"type":"string","optional":true},"http_listener_id":{"type":"string","computed":true},"http_listener_name":{"type":"string","required":true},"id":{"type":"string","computed":true},"name":{"type":"string","required":true},"priority":{"type":"number","optional":true},"redirect_configuration_id":{"type":"string","computed":true},"redirect_configuration_name":{"type":"string","optional":true},"rewrite_rule_set_id":{"type":"string","computed":true},"rewrite_rule_set_name":{"type":"string","optional":true},"rule_type":{"type":"string","required":true},"url_path_map_id":{"type":"string","computed":true},"url_path_map_name":{"type":"string","optional":true}}},"required":true},"rewrite_rule_set":{"nesting_mode":3,"block":{"attributes":{"id":{"type":"string","computed":true},"name":{"type":"string","required":true}},"block_types":{"rewrite_rule":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"rule_sequence":{"type":"number","required":true}},"block_types":{"condition":{"nesting_mode":3,"block":{"attributes":{"ignore_case":{"type":"bool","optional":true,"default":false},"negate":{"type":"bool","optional":true,"default":false},"pattern":{"type":"string","required":true},"variable":{"type":"string","required":true}}},"optional":true},"request_header_configuration":{"nesting_mode":3,"block":{"attributes":{"header_name":{"type":"string","required":true},"header_value":{"type":"string","required":true}}},"optional":true},"response_header_configuration":{"nesting_mode":3,"block":{"attributes":{"header_name":{"type":"string","required":true},"header_value":{"type":"string","required":true}}},"optional":true},"url":{"nesting_mode":3,"block":{"attributes":{"components":{"type":"string","optional":true},"path":{"type":"string","optional":true},"query_string":{"type":"string","optional":true},"reroute":{"type":"bool","optional":true,"default":false}}},"optional":true}}},"optional":true}}},"optional":true},"sku":{"nesting_mode":3,"block":{"attributes":{"capacity":{"type":"number","optional":true},"name":{"type":"string","required":true},"tier":{"type":"string","required":true}}},"required":true},"ssl_certificate":{"nesting_mode":4,"block":{"attributes":{"data":{"type":"string","optional":true},"id":{"type":"string","computed":true},"key_vault_secret_id":{"type":"string","optional":true},"name":{"type":"string","required":true},"password":{"type":"string","optional":true},"public_cert_data":{"type":"string","computed":true}}},"optional":true},"ssl_policy":{"nesting_mode":3,"block":{"attributes":{"cipher_suites":{"type":["list","string"],"optional":true},"disabled_protocols":{"type":["list","string"],"optional":true},"min_protocol_version":{"type":"string","optional":true},"policy_name":{"type":"string","optional":true},"policy_type":{"type":"string","optional":true}}},"optional":true,"computed":true},"ssl_profile":{"nesting_mode":3,"block":{"attributes":{"id":{"type":"string","computed":true},"name":{"type":"string","required":true},"trusted_client_certificate_names":{"type":["list","string"],"optional":true},"verify_client_cert_issuer_dn":{"type":"bool","optional":true,"default":false},"verify_client_certificate_revocation":{"type":"string","optional":true}},"block_types":{"ssl_policy":{"nesting_mode":3,"block":{"attributes":{"cipher_suites":{"type":["list","string"],"optional":true},"disabled_protocols":{"type":["list","string"],"optional":true},"min_protocol_version":{"type":"string","optional":true},"policy_name":{"type":"string","optional":true},"policy_type":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"trusted_client_certificate":{"nesting_mode":3,"block":{"attributes":{"data":{"type":"string","required":true},"id":{"type":"string","computed":true},"name":{"type":"string","required":true}}},"optional":true},"trusted_root_certificate":{"nesting_mode":3,"block":{"attributes":{"data":{"type":"string","optional":true},"id":{"type":"string","computed":true},"key_vault_secret_id":{"type":"string","optional":true},"name":{"type":"string","required":true}}},"optional":true},"url_path_map":{"nesting_mode":3,"block":{"attributes":{"default_backend_address_pool_id":{"type":"string","computed":true},"default_backend_address_pool_name":{"type":"string","optional":true},"default_backend_http_settings_id":{"type":"string","computed":true},"default_backend_http_settings_name":{"type":"string","optional":true},"default_redirect_configuration_id":{"type":"string","computed":true},"default_redirect_configuration_name":{"type":"string","optional":true},"default_rewrite_rule_set_id":{"type":"string","computed":true},"default_rewrite_rule_set_name":{"type":"string","optional":true},"id":{"type":"string","computed":true},"name":{"type":"string","required":true}},"block_types":{"path_rule":{"nesting_mode":3,"block":{"attributes":{"backend_address_pool_id":{"type":"string","computed":true},"backend_address_pool_name":{"type":"string","optional":true},"backend_http_settings_id":{"type":"string","computed":true},"backend_http_settings_name":{"type":"string","optional":true},"firewall_policy_id":{"type":"string","optional":true},"id":{"type":"string","computed":true},"name":{"type":"string","required":true},"paths":{"type":["list","string"],"required":true},"redirect_configuration_id":{"type":"string","computed":true},"redirect_configuration_name":{"type":"string","optional":true},"rewrite_rule_set_id":{"type":"string","computed":true},"rewrite_rule_set_name":{"type":"string","optional":true}}},"required":true}}},"optional":true},"waf_configuration":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","required":true},"file_upload_limit_mb":{"type":"number","optional":true,"default":100},"firewall_mode":{"type":"string","required":true},"max_request_body_size_kb":{"type":"number","optional":true,"default":128},"request_body_check":{"type":"bool","optional":true,"default":true},"rule_set_type":{"type":"string","optional":true,"default":"OWASP"},"rule_set_version":{"type":"string","required":true}},"block_types":{"disabled_rule_group":{"nesting_mode":3,"block":{"attributes":{"rule_group_name":{"type":"string","required":true},"rules":{"type":["list","number"],"optional":true}}},"optional":true},"exclusion":{"nesting_mode":3,"block":{"attributes":{"match_variable":{"type":"string","required":true},"selector":{"type":"string","optional":true},"selector_match_operator":{"type":"string","optional":true}}},"optional":true}}},"optional":true}}}},"azurerm_application_insights":{"block":{"attributes":{"app_id":{"type":"string","computed":true},"application_type":{"type":"string","required":true},"connection_string":{"type":"string","computed":true},"daily_data_cap_in_gb":{"type":"number","optional":true,"default":100},"daily_data_cap_notifications_disabled":{"type":"bool","optional":true},"disable_ip_masking":{"type":"bool","optional":true,"default":false},"force_customer_storage_for_profiler":{"type":"bool","optional":true,"default":false},"instrumentation_key":{"type":"string","computed":true},"internet_ingestion_enabled":{"type":"bool","optional":true,"default":true},"internet_query_enabled":{"type":"bool","optional":true,"default":true},"local_authentication_disabled":{"type":"bool","optional":true,"default":false},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"retention_in_days":{"type":"number","optional":true,"default":90},"sampling_percentage":{"type":"number","optional":true,"default":100},"tags":{"type":["map","string"],"optional":true},"workspace_id":{"type":"string","optional":true}}}},"azurerm_application_insights_analytics_item":{"block":{"attributes":{"application_insights_id":{"type":"string","required":true},"content":{"type":"string","required":true},"function_alias":{"type":"string","optional":true},"name":{"type":"string","required":true},"scope":{"type":"string","required":true},"time_created":{"type":"string","computed":true},"time_modified":{"type":"string","computed":true},"type":{"type":"string","required":true},"version":{"type":"string","computed":true}}}},"azurerm_application_insights_api_key":{"block":{"attributes":{"api_key":{"type":"string","computed":true},"application_insights_id":{"type":"string","required":true},"name":{"type":"string","required":true},"read_permissions":{"type":["set","string"],"optional":true},"write_permissions":{"type":["set","string"],"optional":true}}}},"azurerm_application_insights_smart_detection_rule":{"block":{"attributes":{"additional_email_recipients":{"type":["set","string"],"optional":true},"application_insights_id":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"send_emails_to_subscription_owners":{"type":"bool","optional":true,"default":true}}}},"azurerm_application_insights_standard_web_test":{"block":{"attributes":{"application_insights_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"enabled":{"type":"bool","optional":true},"frequency":{"type":"number","optional":true,"default":300},"geo_locations":{"type":["list","string"],"required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"retry_enabled":{"type":"bool","optional":true},"synthetic_monitor_id":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true},"timeout":{"type":"number","optional":true,"default":30}},"block_types":{"request":{"nesting_mode":3,"block":{"attributes":{"body":{"type":"string","optional":true},"follow_redirects_enabled":{"type":"bool","optional":true,"default":true},"http_verb":{"type":"string","optional":true,"default":"GET"},"parse_dependent_requests_enabled":{"type":"bool","optional":true,"default":true},"url":{"type":"string","required":true}},"block_types":{"header":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"required":true},"validation_rules":{"nesting_mode":3,"block":{"attributes":{"expected_status_code":{"type":"number","optional":true,"default":200},"ssl_cert_remaining_lifetime":{"type":"number","optional":true},"ssl_check_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"content":{"nesting_mode":3,"block":{"attributes":{"content_match":{"type":"string","required":true},"ignore_case":{"type":"bool","optional":true,"default":false},"pass_if_text_found":{"type":"bool","optional":true,"default":false}}},"optional":true}}},"optional":true}}}},"azurerm_application_insights_web_test":{"block":{"attributes":{"application_insights_id":{"type":"string","required":true},"configuration":{"type":"string","required":true},"description":{"type":"string","optional":true},"enabled":{"type":"bool","optional":true},"frequency":{"type":"number","optional":true,"default":300},"geo_locations":{"type":["list","string"],"required":true},"kind":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"retry_enabled":{"type":"bool","optional":true},"synthetic_monitor_id":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true},"timeout":{"type":"number","optional":true,"default":30}}}},"azurerm_application_insights_workbook":{"block":{"attributes":{"category":{"type":"string","optional":true,"default":"workbook"},"data_json":{"type":"string","required":true},"description":{"type":"string","optional":true},"display_name":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"source_id":{"type":"string","optional":true,"default":"azure monitor"},"storage_container_id":{"type":"string","optional":true,"required_with":["identity"]},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_application_insights_workbook_template":{"block":{"attributes":{"author":{"type":"string","optional":true},"localized":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"priority":{"type":"number","optional":true,"default":0},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"template_data":{"type":"string","required":true}},"block_types":{"galleries":{"nesting_mode":3,"block":{"attributes":{"category":{"type":"string","required":true},"name":{"type":"string","required":true},"order":{"type":"number","optional":true,"default":0},"resource_type":{"type":"string","optional":true,"default":"Azure Monitor"},"type":{"type":"string","optional":true,"default":"workbook"}}},"required":true}}}},"azurerm_application_load_balancer":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"primary_configuration_endpoint":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_application_load_balancer_frontend":{"block":{"attributes":{"application_load_balancer_id":{"type":"string","required":true},"fully_qualified_domain_name":{"type":"string","computed":true},"name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_application_load_balancer_subnet_association":{"block":{"attributes":{"application_load_balancer_id":{"type":"string","required":true},"name":{"type":"string","required":true},"subnet_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_application_security_group":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_arc_kubernetes_cluster":{"block":{"attributes":{"agent_public_key_certificate":{"type":"string","required":true},"agent_version":{"type":"string","computed":true},"distribution":{"type":"string","computed":true},"infrastructure":{"type":"string","computed":true},"kubernetes_version":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"offering":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"total_core_count":{"type":"number","computed":true},"total_node_count":{"type":"number","computed":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"required":true}}}},"azurerm_arc_kubernetes_cluster_extension":{"block":{"attributes":{"cluster_id":{"type":"string","required":true},"configuration_protected_settings":{"type":["map","string"],"optional":true},"configuration_settings":{"type":["map","string"],"optional":true},"current_version":{"type":"string","computed":true},"extension_type":{"type":"string","required":true},"name":{"type":"string","required":true},"release_namespace":{"type":"string","optional":true,"computed":true,"conflicts_with":["target_namespace"]},"release_train":{"type":"string","optional":true,"computed":true},"target_namespace":{"type":"string","optional":true,"computed":true,"conflicts_with":["release_namespace"]},"version":{"type":"string","optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"required":true}}}},"azurerm_arc_kubernetes_flux_configuration":{"block":{"attributes":{"cluster_id":{"type":"string","required":true},"continuous_reconciliation_enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"namespace":{"type":"string","required":true},"scope":{"type":"string","optional":true,"default":"namespace"}},"block_types":{"blob_storage":{"nesting_mode":3,"block":{"attributes":{"account_key":{"type":"string","optional":true,"exactly_one_of":["blob_storage.0.account_key","blob_storage.0.local_auth_reference","blob_storage.0.sas_token","blob_storage.0.service_principal"]},"container_id":{"type":"string","required":true},"local_auth_reference":{"type":"string","optional":true,"exactly_one_of":["blob_storage.0.account_key","blob_storage.0.local_auth_reference","blob_storage.0.sas_token","blob_storage.0.service_principal"]},"sas_token":{"type":"string","optional":true,"exactly_one_of":["blob_storage.0.account_key","blob_storage.0.local_auth_reference","blob_storage.0.sas_token","blob_storage.0.service_principal"]},"sync_interval_in_seconds":{"type":"number","optional":true,"default":600},"timeout_in_seconds":{"type":"number","optional":true,"default":600}},"block_types":{"service_principal":{"nesting_mode":3,"block":{"attributes":{"client_certificate_base64":{"type":"string","optional":true,"exactly_one_of":["blob_storage.0.service_principal.0.client_certificate_base64","blob_storage.0.service_principal.0.client_secret"]},"client_certificate_password":{"type":"string","optional":true,"required_with":["blob_storage.0.service_principal.0.client_certificate_base64"]},"client_certificate_send_chain":{"type":"bool","optional":true,"default":false},"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["blob_storage.0.service_principal.0.client_certificate_base64","blob_storage.0.service_principal.0.client_secret"]},"tenant_id":{"type":"string","required":true}}},"optional":true,"exactly_one_of":["blob_storage.0.account_key","blob_storage.0.local_auth_reference","blob_storage.0.sas_token","blob_storage.0.service_principal"]}}},"optional":true,"exactly_one_of":["blob_storage","bucket","git_repository"]},"bucket":{"nesting_mode":3,"block":{"attributes":{"access_key":{"type":"string","optional":true,"exactly_one_of":["bucket.0.access_key","bucket.0.local_auth_reference"],"required_with":["bucket.0.secret_key_base64"]},"bucket_name":{"type":"string","required":true},"local_auth_reference":{"type":"string","optional":true,"exactly_one_of":["bucket.0.access_key","bucket.0.local_auth_reference"]},"secret_key_base64":{"type":"string","optional":true,"required_with":["bucket.0.access_key"]},"sync_interval_in_seconds":{"type":"number","optional":true,"default":600},"timeout_in_seconds":{"type":"number","optional":true,"default":600},"tls_enabled":{"type":"bool","optional":true,"default":true},"url":{"type":"string","required":true}}},"optional":true,"exactly_one_of":["blob_storage","bucket","git_repository"]},"git_repository":{"nesting_mode":3,"block":{"attributes":{"https_ca_cert_base64":{"type":"string","optional":true,"required_with":["git_repository.0.https_user"]},"https_key_base64":{"type":"string","optional":true,"required_with":["git_repository.0.https_user"]},"https_user":{"type":"string","optional":true,"conflicts_with":["git_repository.0.local_auth_reference","git_repository.0.ssh_private_key_base64","git_repository.0.ssh_known_hosts_base64"],"required_with":["git_repository.0.https_key_base64"]},"local_auth_reference":{"type":"string","optional":true,"conflicts_with":["git_repository.0.https_user","git_repository.0.ssh_private_key_base64","git_repository.0.ssh_known_hosts_base64"]},"reference_type":{"type":"string","required":true},"reference_value":{"type":"string","required":true},"ssh_known_hosts_base64":{"type":"string","optional":true,"conflicts_with":["git_repository.0.https_user","git_repository.0.local_auth_reference"]},"ssh_private_key_base64":{"type":"string","optional":true,"conflicts_with":["git_repository.0.https_user","git_repository.0.local_auth_reference"]},"sync_interval_in_seconds":{"type":"number","optional":true,"default":600},"timeout_in_seconds":{"type":"number","optional":true,"default":600},"url":{"type":"string","required":true}}},"optional":true,"exactly_one_of":["blob_storage","bucket","git_repository"]},"kustomizations":{"nesting_mode":4,"block":{"attributes":{"depends_on":{"type":["list","string"],"optional":true},"garbage_collection_enabled":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"path":{"type":"string","optional":true},"recreating_enabled":{"type":"bool","optional":true,"default":false},"retry_interval_in_seconds":{"type":"number","optional":true,"default":600},"sync_interval_in_seconds":{"type":"number","optional":true,"default":600},"timeout_in_seconds":{"type":"number","optional":true,"default":600}}},"required":true}}}},"azurerm_arc_kubernetes_provisioned_cluster":{"block":{"attributes":{"agent_version":{"type":"string","computed":true},"arc_agent_auto_upgrade_enabled":{"type":"bool","optional":true,"default":true},"arc_agent_desired_version":{"type":"string","optional":true},"distribution":{"type":"string","computed":true},"infrastructure":{"type":"string","computed":true},"kubernetes_version":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"offering":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"total_core_count":{"type":"number","computed":true},"total_node_count":{"type":"number","computed":true}},"block_types":{"azure_active_directory":{"nesting_mode":3,"block":{"attributes":{"admin_group_object_ids":{"type":["list","string"],"optional":true},"azure_rbac_enabled":{"type":"bool","optional":true,"default":false},"tenant_id":{"type":"string","optional":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"required":true}}}},"azurerm_arc_machine":{"block":{"attributes":{"kind":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_arc_machine_automanage_configuration_assignment":{"block":{"attributes":{"arc_machine_id":{"type":"string","required":true},"configuration_id":{"type":"string","required":true}}}},"azurerm_arc_machine_extension":{"block":{"attributes":{"arc_machine_id":{"type":"string","required":true},"automatic_upgrade_enabled":{"type":"bool","optional":true,"default":true},"force_update_tag":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"protected_settings":{"type":"string","optional":true},"publisher":{"type":"string","required":true},"settings":{"type":"string","optional":true},"tags":{"type":["map","string"],"optional":true},"type":{"type":"string","required":true},"type_handler_version":{"type":"string","optional":true}}}},"azurerm_arc_private_link_scope":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":false},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_arc_resource_bridge_appliance":{"block":{"attributes":{"distro":{"type":"string","required":true},"infrastructure_provider":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"public_key_base64":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"required":true}}}},"azurerm_attestation_provider":{"block":{"attributes":{"attestation_uri":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"open_enclave_policy_base64":{"type":"string","optional":true},"policy_signing_certificate_data":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"sev_snp_policy_base64":{"type":"string","optional":true},"sgx_enclave_policy_base64":{"type":"string","optional":true},"tags":{"type":["map","string"],"optional":true},"tpm_policy_base64":{"type":"string","optional":true},"trust_model":{"type":"string","computed":true}}}},"azurerm_automanage_configuration":{"block":{"attributes":{"automation_account_enabled":{"type":"bool","optional":true,"default":false},"boot_diagnostics_enabled":{"type":"bool","optional":true,"default":false},"defender_for_cloud_enabled":{"type":"bool","optional":true,"default":false},"guest_configuration_enabled":{"type":"bool","optional":true,"default":false},"location":{"type":"string","required":true},"log_analytics_enabled":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"status_change_alert_enabled":{"type":"bool","optional":true,"default":false},"tags":{"type":["map","string"],"optional":true}},"block_types":{"antimalware":{"nesting_mode":3,"block":{"attributes":{"real_time_protection_enabled":{"type":"bool","optional":true,"default":false},"scheduled_scan_day":{"type":"number","optional":true,"default":8},"scheduled_scan_enabled":{"type":"bool","optional":true,"default":false},"scheduled_scan_time_in_minutes":{"type":"number","optional":true,"default":0},"scheduled_scan_type":{"type":"string","optional":true,"default":"Quick"}},"block_types":{"exclusions":{"nesting_mode":3,"block":{"attributes":{"extensions":{"type":"string","optional":true},"paths":{"type":"string","optional":true},"processes":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"azure_security_baseline":{"nesting_mode":3,"block":{"attributes":{"assignment_type":{"type":"string","optional":true,"default":"ApplyAndAutoCorrect"}}},"optional":true},"backup":{"nesting_mode":3,"block":{"attributes":{"instant_rp_retention_range_in_days":{"type":"number","optional":true,"default":5},"policy_name":{"type":"string","optional":true},"time_zone":{"type":"string","optional":true,"default":"UTC"}},"block_types":{"retention_policy":{"nesting_mode":3,"block":{"attributes":{"retention_policy_type":{"type":"string","optional":true,"default":"LongTermRetentionPolicy"}},"block_types":{"daily_schedule":{"nesting_mode":3,"block":{"attributes":{"retention_times":{"type":["list","string"],"optional":true}},"block_types":{"retention_duration":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","optional":true},"duration_type":{"type":"string","optional":true,"default":"Days"}}},"optional":true}}},"optional":true},"weekly_schedule":{"nesting_mode":3,"block":{"attributes":{"retention_times":{"type":["list","string"],"optional":true}},"block_types":{"retention_duration":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","optional":true},"duration_type":{"type":"string","optional":true,"default":"Weeks"}}},"optional":true}}},"optional":true}}},"optional":true},"schedule_policy":{"nesting_mode":3,"block":{"attributes":{"schedule_policy_type":{"type":"string","optional":true,"default":"SimpleSchedulePolicy"},"schedule_run_days":{"type":["list","string"],"optional":true},"schedule_run_frequency":{"type":"string","optional":true,"default":"Daily"},"schedule_run_times":{"type":["list","string"],"optional":true}}},"optional":true}}},"optional":true}}}},"azurerm_automation_account":{"block":{"attributes":{"dsc_primary_access_key":{"type":"string","computed":true},"dsc_secondary_access_key":{"type":"string","computed":true},"dsc_server_endpoint":{"type":"string","computed":true},"hybrid_service_url":{"type":"string","computed":true},"local_authentication_enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"private_endpoint_connection":{"type":["list",["object",{"id":"string","name":"string"}]],"computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"encryption":{"nesting_mode":3,"block":{"attributes":{"key_source":{"type":"string","optional":true},"key_vault_key_id":{"type":"string","required":true},"user_assigned_identity_id":{"type":"string","optional":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_automation_certificate":{"block":{"attributes":{"automation_account_name":{"type":"string","required":true},"base64":{"type":"string","required":true},"description":{"type":"string","optional":true},"exportable":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"thumbprint":{"type":"string","computed":true}}}},"azurerm_automation_connection":{"block":{"attributes":{"automation_account_name":{"type":"string","required":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"type":{"type":"string","required":true},"values":{"type":["map","string"],"required":true}}}},"azurerm_automation_connection_certificate":{"block":{"attributes":{"automation_account_name":{"type":"string","required":true},"automation_certificate_name":{"type":"string","required":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"subscription_id":{"type":"string","required":true}}}},"azurerm_automation_connection_classic_certificate":{"block":{"attributes":{"automation_account_name":{"type":"string","required":true},"certificate_asset_name":{"type":"string","required":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"subscription_id":{"type":"string","required":true},"subscription_name":{"type":"string","required":true}}}},"azurerm_automation_connection_service_principal":{"block":{"attributes":{"application_id":{"type":"string","required":true},"automation_account_name":{"type":"string","required":true},"certificate_thumbprint":{"type":"string","required":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"subscription_id":{"type":"string","required":true},"tenant_id":{"type":"string","required":true}}}},"azurerm_automation_connection_type":{"block":{"attributes":{"automation_account_name":{"type":"string","required":true},"is_global":{"type":"bool","optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}},"block_types":{"field":{"nesting_mode":3,"block":{"attributes":{"is_encrypted":{"type":"bool","optional":true},"is_optional":{"type":"bool","optional":true},"name":{"type":"string","required":true},"type":{"type":"string","required":true}}},"required":true}}}},"azurerm_automation_credential":{"block":{"attributes":{"automation_account_name":{"type":"string","required":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"password":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"username":{"type":"string","required":true}}}},"azurerm_automation_dsc_configuration":{"block":{"attributes":{"automation_account_name":{"type":"string","required":true},"content_embedded":{"type":"string","required":true},"description":{"type":"string","optional":true},"location":{"type":"string","required":true},"log_verbose":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"state":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_automation_dsc_nodeconfiguration":{"block":{"attributes":{"automation_account_name":{"type":"string","required":true},"configuration_name":{"type":"string","computed":true},"content_embedded":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_automation_hybrid_runbook_worker":{"block":{"attributes":{"automation_account_name":{"type":"string","required":true},"ip":{"type":"string","computed":true},"last_seen_date_time":{"type":"string","computed":true},"registration_date_time":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"vm_resource_id":{"type":"string","required":true},"worker_group_name":{"type":"string","required":true},"worker_id":{"type":"string","required":true},"worker_name":{"type":"string","computed":true},"worker_type":{"type":"string","computed":true}}}},"azurerm_automation_hybrid_runbook_worker_group":{"block":{"attributes":{"automation_account_name":{"type":"string","required":true},"credential_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_automation_job_schedule":{"block":{"attributes":{"automation_account_name":{"type":"string","required":true},"job_schedule_id":{"type":"string","optional":true,"computed":true},"parameters":{"type":["map","string"],"optional":true},"resource_group_name":{"type":"string","required":true},"resource_manager_id":{"type":"string","computed":true},"run_on":{"type":"string","optional":true},"runbook_name":{"type":"string","required":true},"schedule_name":{"type":"string","required":true}}}},"azurerm_automation_module":{"block":{"attributes":{"automation_account_name":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}},"block_types":{"module_link":{"nesting_mode":3,"block":{"attributes":{"uri":{"type":"string","required":true}},"block_types":{"hash":{"nesting_mode":3,"block":{"attributes":{"algorithm":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"required":true}}}},"azurerm_automation_powershell72_module":{"block":{"attributes":{"automation_account_id":{"type":"string","required":true},"name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"module_link":{"nesting_mode":3,"block":{"attributes":{"uri":{"type":"string","required":true}},"block_types":{"hash":{"nesting_mode":3,"block":{"attributes":{"algorithm":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"required":true}}}},"azurerm_automation_python3_package":{"block":{"attributes":{"automation_account_name":{"type":"string","required":true},"content_uri":{"type":"string","required":true},"content_version":{"type":"string","optional":true},"hash_algorithm":{"type":"string","optional":true,"required_with":["hash_value"]},"hash_value":{"type":"string","optional":true,"required_with":["hash_algorithm"]},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_automation_runbook":{"block":{"attributes":{"automation_account_name":{"type":"string","required":true},"content":{"type":"string","optional":true,"computed":true,"at_least_one_of":["content","publish_content_link","draft"]},"description":{"type":"string","optional":true},"job_schedule":{"type":["set",["object",{"job_schedule_id":"string","parameters":["map","string"],"run_on":"string","schedule_name":"string"}]],"optional":true,"computed":true},"location":{"type":"string","required":true},"log_activity_trace_level":{"type":"number","optional":true},"log_progress":{"type":"bool","required":true},"log_verbose":{"type":"bool","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"runbook_type":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"draft":{"nesting_mode":3,"block":{"attributes":{"creation_time":{"type":"string","computed":true},"edit_mode_enabled":{"type":"bool","optional":true},"last_modified_time":{"type":"string","computed":true},"output_types":{"type":["list","string"],"optional":true}},"block_types":{"content_link":{"nesting_mode":3,"block":{"attributes":{"uri":{"type":"string","required":true},"version":{"type":"string","optional":true}},"block_types":{"hash":{"nesting_mode":3,"block":{"attributes":{"algorithm":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true},"parameters":{"nesting_mode":3,"block":{"attributes":{"default_value":{"type":"string","optional":true},"key":{"type":"string","required":true},"mandatory":{"type":"bool","optional":true,"default":false},"position":{"type":"number","optional":true},"type":{"type":"string","required":true}}},"optional":true}}},"optional":true},"publish_content_link":{"nesting_mode":3,"block":{"attributes":{"uri":{"type":"string","required":true},"version":{"type":"string","optional":true}},"block_types":{"hash":{"nesting_mode":3,"block":{"attributes":{"algorithm":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true,"at_least_one_of":["content","publish_content_link","draft"]}}}},"azurerm_automation_schedule":{"block":{"attributes":{"automation_account_name":{"type":"string","required":true},"description":{"type":"string","optional":true},"expiry_time":{"type":"string","optional":true,"computed":true},"frequency":{"type":"string","required":true},"interval":{"type":"number","optional":true,"computed":true},"month_days":{"type":["set","number"],"optional":true,"conflicts_with":["week_days","monthly_occurrence"]},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"start_time":{"type":"string","optional":true,"computed":true},"timezone":{"type":"string","optional":true,"default":"Etc/UTC"},"week_days":{"type":["set","string"],"optional":true,"conflicts_with":["month_days","monthly_occurrence"]}},"block_types":{"monthly_occurrence":{"nesting_mode":3,"block":{"attributes":{"day":{"type":"string","required":true},"occurrence":{"type":"number","required":true}}},"optional":true,"conflicts_with":["week_days","month_days"]}}}},"azurerm_automation_software_update_configuration":{"block":{"attributes":{"automation_account_id":{"type":"string","required":true},"duration":{"type":"string","optional":true,"default":"PT2H"},"error_code":{"type":"string","computed":true},"error_message":{"type":"string","computed":true},"name":{"type":"string","required":true},"non_azure_computer_names":{"type":["list","string"],"optional":true},"virtual_machine_ids":{"type":["list","string"],"optional":true}},"block_types":{"linux":{"nesting_mode":3,"block":{"attributes":{"classifications_included":{"type":["list","string"],"required":true},"excluded_packages":{"type":["list","string"],"optional":true},"included_packages":{"type":["list","string"],"optional":true},"reboot":{"type":"string","optional":true,"default":"IfRequired"}}},"optional":true,"exactly_one_of":["windows","linux"]},"post_task":{"nesting_mode":3,"block":{"attributes":{"parameters":{"type":["map","string"],"optional":true},"source":{"type":"string","optional":true}}},"optional":true},"pre_task":{"nesting_mode":3,"block":{"attributes":{"parameters":{"type":["map","string"],"optional":true},"source":{"type":"string","optional":true}}},"optional":true},"schedule":{"nesting_mode":3,"block":{"attributes":{"advanced_month_days":{"type":["list","number"],"optional":true},"advanced_week_days":{"type":["list","string"],"optional":true},"creation_time":{"type":"string","computed":true},"description":{"type":"string","optional":true},"expiry_time":{"type":"string","optional":true,"computed":true},"expiry_time_offset_minutes":{"type":"number","optional":true},"frequency":{"type":"string","required":true},"interval":{"type":"number","optional":true},"is_enabled":{"type":"bool","optional":true,"default":true},"last_modified_time":{"type":"string","computed":true},"next_run":{"type":"string","optional":true,"computed":true},"next_run_offset_minutes":{"type":"number","optional":true},"start_time":{"type":"string","optional":true,"computed":true},"start_time_offset_minutes":{"type":"number","optional":true},"time_zone":{"type":"string","optional":true,"default":"Etc/UTC"}},"block_types":{"monthly_occurrence":{"nesting_mode":3,"block":{"attributes":{"day":{"type":"string","required":true},"occurrence":{"type":"number","required":true}}},"optional":true}}},"required":true},"target":{"nesting_mode":3,"block":{"block_types":{"azure_query":{"nesting_mode":3,"block":{"attributes":{"locations":{"type":["list","string"],"optional":true},"scope":{"type":["list","string"],"optional":true},"tag_filter":{"type":"string","optional":true}},"block_types":{"tags":{"nesting_mode":3,"block":{"attributes":{"tag":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true}}},"optional":true},"non_azure_query":{"nesting_mode":3,"block":{"attributes":{"function_alias":{"type":"string","optional":true},"workspace_id":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"windows":{"nesting_mode":3,"block":{"attributes":{"classifications_included":{"type":["list","string"],"required":true},"excluded_knowledge_base_numbers":{"type":["list","string"],"optional":true},"included_knowledge_base_numbers":{"type":["list","string"],"optional":true},"reboot":{"type":"string","optional":true,"default":"IfRequired"}}},"optional":true,"exactly_one_of":["windows","linux"]}}}},"azurerm_automation_source_control":{"block":{"attributes":{"automatic_sync":{"type":"bool","optional":true,"default":false},"automation_account_id":{"type":"string","required":true},"branch":{"type":"string","optional":true},"description":{"type":"string","optional":true},"folder_path":{"type":"string","required":true},"name":{"type":"string","required":true},"publish_runbook_enabled":{"type":"bool","optional":true,"default":true},"repository_url":{"type":"string","required":true},"source_control_type":{"type":"string","required":true}},"block_types":{"security":{"nesting_mode":3,"block":{"attributes":{"refresh_token":{"type":"string","optional":true},"token":{"type":"string","required":true},"token_type":{"type":"string","required":true}}},"required":true}}}},"azurerm_automation_variable_bool":{"block":{"attributes":{"automation_account_name":{"type":"string","required":true},"description":{"type":"string","optional":true},"encrypted":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"value":{"type":"bool","optional":true}}}},"azurerm_automation_variable_datetime":{"block":{"attributes":{"automation_account_name":{"type":"string","required":true},"description":{"type":"string","optional":true},"encrypted":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"value":{"type":"string","optional":true}}}},"azurerm_automation_variable_int":{"block":{"attributes":{"automation_account_name":{"type":"string","required":true},"description":{"type":"string","optional":true},"encrypted":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"value":{"type":"number","optional":true}}}},"azurerm_automation_variable_object":{"block":{"attributes":{"automation_account_name":{"type":"string","required":true},"description":{"type":"string","optional":true},"encrypted":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"value":{"type":"string","optional":true}}}},"azurerm_automation_variable_string":{"block":{"attributes":{"automation_account_name":{"type":"string","required":true},"description":{"type":"string","optional":true},"encrypted":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"value":{"type":"string","optional":true}}}},"azurerm_automation_watcher":{"block":{"attributes":{"automation_account_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"etag":{"type":"string","optional":true},"execution_frequency_in_seconds":{"type":"number","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"script_name":{"type":"string","required":true},"script_parameters":{"type":["map","string"],"optional":true},"script_run_on":{"type":"string","required":true},"status":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_automation_webhook":{"block":{"attributes":{"automation_account_name":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":true},"expiry_time":{"type":"string","required":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"resource_group_name":{"type":"string","required":true},"run_on_worker_group":{"type":"string","optional":true},"runbook_name":{"type":"string","required":true},"uri":{"type":"string","optional":true,"computed":true}}}},"azurerm_availability_set":{"block":{"attributes":{"location":{"type":"string","required":true},"managed":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"platform_fault_domain_count":{"type":"number","optional":true,"default":3},"platform_update_domain_count":{"type":"number","optional":true,"default":5},"proximity_placement_group_id":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_backup_container_storage_account":{"block":{"attributes":{"recovery_vault_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"storage_account_id":{"type":"string","required":true}}}},"azurerm_backup_policy_file_share":{"block":{"attributes":{"name":{"type":"string","required":true},"recovery_vault_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"timezone":{"type":"string","optional":true,"default":"UTC"}},"block_types":{"backup":{"nesting_mode":3,"block":{"attributes":{"frequency":{"type":"string","required":true},"time":{"type":"string","optional":true,"conflicts_with":["backup.0.hourly"],"at_least_one_of":["backup.0.time","backup.0.hourly"]}},"block_types":{"hourly":{"nesting_mode":3,"block":{"attributes":{"interval":{"type":"number","required":true},"start_time":{"type":"string","required":true},"window_duration":{"type":"number","required":true}}},"optional":true,"conflicts_with":["backup.0.time"],"at_least_one_of":["backup.0.time","backup.0.hourly"]}}},"required":true},"retention_daily":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true}}},"required":true},"retention_monthly":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true},"days":{"type":["set","number"],"optional":true,"conflicts_with":["retention_monthly.0.weeks","retention_monthly.0.weekdays"],"at_least_one_of":["retention_monthly.0.weekdays","retention_monthly.0.weeks","retention_monthly.0.days","retention_monthly.0.include_last_days"]},"include_last_days":{"type":"bool","optional":true,"default":false,"conflicts_with":["retention_monthly.0.weeks","retention_monthly.0.weekdays"],"at_least_one_of":["retention_monthly.0.weekdays","retention_monthly.0.weeks","retention_monthly.0.days","retention_monthly.0.include_last_days"]},"weekdays":{"type":["set","string"],"optional":true,"conflicts_with":["retention_monthly.0.days","retention_monthly.0.include_last_days"],"at_least_one_of":["retention_monthly.0.weekdays","retention_monthly.0.weeks","retention_monthly.0.days","retention_monthly.0.include_last_days"],"required_with":["retention_monthly.0.weeks"]},"weeks":{"type":["set","string"],"optional":true,"conflicts_with":["retention_monthly.0.days","retention_monthly.0.include_last_days"],"at_least_one_of":["retention_monthly.0.weekdays","retention_monthly.0.weeks","retention_monthly.0.days","retention_monthly.0.include_last_days"],"required_with":["retention_monthly.0.weekdays"]}}},"optional":true},"retention_weekly":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true},"weekdays":{"type":["set","string"],"required":true}}},"optional":true},"retention_yearly":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true},"days":{"type":["set","number"],"optional":true,"conflicts_with":["retention_yearly.0.weeks","retention_yearly.0.weekdays"],"at_least_one_of":["retention_yearly.0.weeks","retention_yearly.0.weekdays","retention_yearly.0.days","retention_yearly.0.include_last_days"]},"include_last_days":{"type":"bool","optional":true,"default":false,"conflicts_with":["retention_yearly.0.weeks","retention_yearly.0.weekdays"],"at_least_one_of":["retention_yearly.0.weeks","retention_yearly.0.weekdays","retention_yearly.0.days","retention_yearly.0.include_last_days"]},"months":{"type":["set","string"],"required":true},"weekdays":{"type":["set","string"],"optional":true,"conflicts_with":["retention_yearly.0.days","retention_yearly.0.include_last_days"],"at_least_one_of":["retention_yearly.0.weeks","retention_yearly.0.weekdays","retention_yearly.0.days","retention_yearly.0.include_last_days"],"required_with":["retention_yearly.0.weeks"]},"weeks":{"type":["set","string"],"optional":true,"conflicts_with":["retention_yearly.0.days","retention_yearly.0.include_last_days"],"at_least_one_of":["retention_yearly.0.weeks","retention_yearly.0.weekdays","retention_yearly.0.days","retention_yearly.0.include_last_days"],"required_with":["retention_yearly.0.weekdays"]}}},"optional":true}}}},"azurerm_backup_policy_vm":{"block":{"attributes":{"instant_restore_retention_days":{"type":"number","optional":true,"computed":true},"name":{"type":"string","required":true},"policy_type":{"type":"string","optional":true,"default":"V1"},"recovery_vault_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"timezone":{"type":"string","optional":true,"default":"UTC"}},"block_types":{"backup":{"nesting_mode":3,"block":{"attributes":{"frequency":{"type":"string","required":true},"hour_duration":{"type":"number","optional":true},"hour_interval":{"type":"number","optional":true},"time":{"type":"string","required":true},"weekdays":{"type":["set","string"],"optional":true}}},"required":true},"instant_restore_resource_group":{"nesting_mode":3,"block":{"attributes":{"prefix":{"type":"string","required":true},"suffix":{"type":"string","optional":true}}},"optional":true},"retention_daily":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true}}},"optional":true},"retention_monthly":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true},"days":{"type":["set","number"],"optional":true,"conflicts_with":["retention_monthly.0.weeks","retention_monthly.0.weekdays"],"at_least_one_of":["retention_monthly.0.weekdays","retention_monthly.0.weeks","retention_monthly.0.days","retention_monthly.0.include_last_days"]},"include_last_days":{"type":"bool","optional":true,"default":false,"conflicts_with":["retention_monthly.0.weeks","retention_monthly.0.weekdays"],"at_least_one_of":["retention_monthly.0.weekdays","retention_monthly.0.weeks","retention_monthly.0.days","retention_monthly.0.include_last_days"]},"weekdays":{"type":["set","string"],"optional":true,"conflicts_with":["retention_monthly.0.days","retention_monthly.0.include_last_days"],"at_least_one_of":["retention_monthly.0.weekdays","retention_monthly.0.weeks","retention_monthly.0.days","retention_monthly.0.include_last_days"],"required_with":["retention_monthly.0.weeks"]},"weeks":{"type":["set","string"],"optional":true,"conflicts_with":["retention_monthly.0.days","retention_monthly.0.include_last_days"],"at_least_one_of":["retention_monthly.0.weekdays","retention_monthly.0.weeks","retention_monthly.0.days","retention_monthly.0.include_last_days"],"required_with":["retention_monthly.0.weekdays"]}}},"optional":true},"retention_weekly":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true},"weekdays":{"type":["set","string"],"required":true}}},"optional":true},"retention_yearly":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true},"days":{"type":["set","number"],"optional":true,"conflicts_with":["retention_yearly.0.weeks","retention_yearly.0.weekdays"],"at_least_one_of":["retention_yearly.0.weeks","retention_yearly.0.weekdays","retention_yearly.0.days","retention_yearly.0.include_last_days"]},"include_last_days":{"type":"bool","optional":true,"default":false,"conflicts_with":["retention_yearly.0.weeks","retention_yearly.0.weekdays"],"at_least_one_of":["retention_yearly.0.weeks","retention_yearly.0.weekdays","retention_yearly.0.days","retention_yearly.0.include_last_days"]},"months":{"type":["set","string"],"required":true},"weekdays":{"type":["set","string"],"optional":true,"conflicts_with":["retention_yearly.0.days","retention_yearly.0.include_last_days"],"at_least_one_of":["retention_yearly.0.weeks","retention_yearly.0.weekdays","retention_yearly.0.days","retention_yearly.0.include_last_days"],"required_with":["retention_yearly.0.weeks"]},"weeks":{"type":["set","string"],"optional":true,"conflicts_with":["retention_yearly.0.days","retention_yearly.0.include_last_days"],"at_least_one_of":["retention_yearly.0.weeks","retention_yearly.0.weekdays","retention_yearly.0.days","retention_yearly.0.include_last_days"],"required_with":["retention_yearly.0.weekdays"]}}},"optional":true},"tiering_policy":{"nesting_mode":3,"block":{"block_types":{"archived_restore_point":{"nesting_mode":3,"block":{"attributes":{"duration":{"type":"number","optional":true},"duration_type":{"type":"string","optional":true},"mode":{"type":"string","required":true}}},"required":true}}},"optional":true}}}},"azurerm_backup_policy_vm_workload":{"block":{"attributes":{"name":{"type":"string","required":true},"recovery_vault_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"workload_type":{"type":"string","required":true}},"block_types":{"protection_policy":{"nesting_mode":4,"block":{"attributes":{"policy_type":{"type":"string","required":true}},"block_types":{"backup":{"nesting_mode":3,"block":{"attributes":{"frequency":{"type":"string","optional":true},"frequency_in_minutes":{"type":"number","optional":true},"time":{"type":"string","optional":true},"weekdays":{"type":["set","string"],"optional":true}}},"required":true},"retention_daily":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true}}},"optional":true},"retention_monthly":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true},"format_type":{"type":"string","required":true},"monthdays":{"type":["set","number"],"optional":true},"weekdays":{"type":["set","string"],"optional":true},"weeks":{"type":["set","string"],"optional":true}}},"optional":true},"retention_weekly":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true},"weekdays":{"type":["set","string"],"required":true}}},"optional":true},"retention_yearly":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true},"format_type":{"type":"string","required":true},"monthdays":{"type":["set","number"],"optional":true},"months":{"type":["set","string"],"required":true},"weekdays":{"type":["set","string"],"optional":true},"weeks":{"type":["set","string"],"optional":true}}},"optional":true},"simple_retention":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true}}},"optional":true}}},"required":true},"settings":{"nesting_mode":3,"block":{"attributes":{"compression_enabled":{"type":"bool","optional":true,"default":false},"time_zone":{"type":"string","required":true}}},"required":true}}}},"azurerm_backup_protected_file_share":{"block":{"attributes":{"backup_policy_id":{"type":"string","required":true},"recovery_vault_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"source_file_share_name":{"type":"string","required":true},"source_storage_account_id":{"type":"string","required":true}}}},"azurerm_backup_protected_vm":{"block":{"attributes":{"backup_policy_id":{"type":"string","optional":true},"exclude_disk_luns":{"type":["set","number"],"optional":true,"conflicts_with":["include_disk_luns"]},"include_disk_luns":{"type":["set","number"],"optional":true,"conflicts_with":["exclude_disk_luns"]},"protection_state":{"type":"string","optional":true,"computed":true},"recovery_vault_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"source_vm_id":{"type":"string","optional":true,"computed":true}}}},"azurerm_bastion_host":{"block":{"attributes":{"copy_paste_enabled":{"type":"bool","optional":true,"default":true},"dns_name":{"type":"string","computed":true},"file_copy_enabled":{"type":"bool","optional":true,"default":false},"ip_connect_enabled":{"type":"bool","optional":true,"default":false},"kerberos_enabled":{"type":"bool","optional":true,"default":false},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"scale_units":{"type":"number","optional":true,"default":2},"session_recording_enabled":{"type":"bool","optional":true,"default":false},"shareable_link_enabled":{"type":"bool","optional":true,"default":false},"sku":{"type":"string","optional":true,"default":"Basic"},"tags":{"type":["map","string"],"optional":true},"tunneling_enabled":{"type":"bool","optional":true,"default":false},"virtual_network_id":{"type":"string","optional":true},"zones":{"type":["set","string"],"optional":true}},"block_types":{"ip_configuration":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"public_ip_address_id":{"type":"string","required":true},"subnet_id":{"type":"string","required":true}}},"optional":true}}}},"azurerm_batch_account":{"block":{"attributes":{"account_endpoint":{"type":"string","computed":true},"allowed_authentication_modes":{"type":["set","string"],"optional":true,"computed":true},"encryption":{"type":["list",["object",{"key_vault_key_id":"string"}]],"optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"pool_allocation_mode":{"type":"string","optional":true,"default":"BatchService"},"primary_access_key":{"type":"string","computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"secondary_access_key":{"type":"string","computed":true},"storage_account_authentication_mode":{"type":"string","optional":true,"required_with":["storage_account_id"]},"storage_account_id":{"type":"string","optional":true,"required_with":["storage_account_authentication_mode"]},"storage_account_node_identity":{"type":"string","optional":true,"required_with":["storage_account_id"]},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"key_vault_reference":{"nesting_mode":3,"block":{"attributes":{"id":{"type":"string","required":true},"url":{"type":"string","required":true}}},"optional":true},"network_profile":{"nesting_mode":3,"block":{"block_types":{"account_access":{"nesting_mode":3,"block":{"attributes":{"default_action":{"type":"string","optional":true,"default":"Deny"}},"block_types":{"ip_rule":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"default":"Allow"},"ip_range":{"type":"string","required":true}}},"optional":true}}},"optional":true,"at_least_one_of":["network_profile.0.account_access","network_profile.0.node_management_access"]},"node_management_access":{"nesting_mode":3,"block":{"attributes":{"default_action":{"type":"string","optional":true,"default":"Deny"}},"block_types":{"ip_rule":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"default":"Allow"},"ip_range":{"type":"string","required":true}}},"optional":true}}},"optional":true,"at_least_one_of":["network_profile.0.account_access","network_profile.0.node_management_access"]}}},"optional":true}}}},"azurerm_batch_application":{"block":{"attributes":{"account_name":{"type":"string","required":true},"allow_updates":{"type":"bool","optional":true,"default":true},"default_version":{"type":"string","optional":true},"display_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_batch_certificate":{"block":{"attributes":{"account_name":{"type":"string","required":true},"certificate":{"type":"string","required":true},"format":{"type":"string","required":true},"name":{"type":"string","computed":true},"password":{"type":"string","optional":true},"public_data":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"thumbprint":{"type":"string","required":true},"thumbprint_algorithm":{"type":"string","required":true}}}},"azurerm_batch_job":{"block":{"attributes":{"batch_pool_id":{"type":"string","required":true},"common_environment_properties":{"type":["map","string"],"optional":true},"display_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"priority":{"type":"number","optional":true,"default":0},"task_retry_maximum":{"type":"number","optional":true}}}},"azurerm_batch_pool":{"block":{"attributes":{"account_name":{"type":"string","required":true},"display_name":{"type":"string","optional":true},"inter_node_communication":{"type":"string","optional":true,"default":"Enabled"},"license_type":{"type":"string","optional":true},"max_tasks_per_node":{"type":"number","optional":true,"default":1},"metadata":{"type":["map","string"],"optional":true},"name":{"type":"string","required":true},"node_agent_sku_id":{"type":"string","required":true},"os_disk_placement":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"stop_pending_resize_operation":{"type":"bool","optional":true,"default":false},"target_node_communication_mode":{"type":"string","optional":true},"vm_size":{"type":"string","required":true}},"block_types":{"auto_scale":{"nesting_mode":3,"block":{"attributes":{"evaluation_interval":{"type":"string","optional":true,"default":"PT15M"},"formula":{"type":"string","required":true}}},"optional":true},"certificate":{"nesting_mode":3,"block":{"attributes":{"id":{"type":"string","required":true},"store_location":{"type":"string","required":true},"store_name":{"type":"string","optional":true},"visibility":{"type":["set","string"],"optional":true}}},"optional":true},"container_configuration":{"nesting_mode":3,"block":{"attributes":{"container_image_names":{"type":["set","string"],"optional":true,"at_least_one_of":["container_configuration.0.type","container_configuration.0.container_image_names","container_configuration.0.container_registries"]},"container_registries":{"type":["list",["object",{"password":"string","registry_server":"string","user_assigned_identity_id":"string","user_name":"string"}]],"optional":true,"at_least_one_of":["container_configuration.0.type","container_configuration.0.container_image_names","container_configuration.0.container_registries"]},"type":{"type":"string","optional":true,"at_least_one_of":["container_configuration.0.type","container_configuration.0.container_image_names","container_configuration.0.container_registries"]}}},"optional":true},"data_disks":{"nesting_mode":3,"block":{"attributes":{"caching":{"type":"string","optional":true,"default":"ReadOnly"},"disk_size_gb":{"type":"number","required":true},"lun":{"type":"number","required":true},"storage_account_type":{"type":"string","optional":true,"default":"Standard_LRS"}}},"optional":true},"disk_encryption":{"nesting_mode":3,"block":{"attributes":{"disk_encryption_target":{"type":"string","required":true}}},"optional":true},"extensions":{"nesting_mode":3,"block":{"attributes":{"auto_upgrade_minor_version":{"type":"bool","optional":true},"automatic_upgrade_enabled":{"type":"bool","optional":true},"name":{"type":"string","required":true},"protected_settings":{"type":"string","optional":true},"provision_after_extensions":{"type":["set","string"],"optional":true},"publisher":{"type":"string","required":true},"settings_json":{"type":"string","optional":true},"type":{"type":"string","required":true},"type_handler_version":{"type":"string","optional":true}}},"optional":true},"fixed_scale":{"nesting_mode":3,"block":{"attributes":{"node_deallocation_method":{"type":"string","optional":true},"resize_timeout":{"type":"string","optional":true,"default":"PT15M"},"target_dedicated_nodes":{"type":"number","optional":true,"default":1},"target_low_priority_nodes":{"type":"number","optional":true,"default":0}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"required":true},"type":{"type":"string","required":true}}},"optional":true},"mount":{"nesting_mode":3,"block":{"block_types":{"azure_blob_file_system":{"nesting_mode":3,"block":{"attributes":{"account_key":{"type":"string","optional":true},"account_name":{"type":"string","required":true},"blobfuse_options":{"type":"string","optional":true},"container_name":{"type":"string","required":true},"identity_id":{"type":"string","optional":true},"relative_mount_path":{"type":"string","required":true},"sas_key":{"type":"string","optional":true}}},"optional":true},"azure_file_share":{"nesting_mode":3,"block":{"attributes":{"account_key":{"type":"string","required":true},"account_name":{"type":"string","required":true},"azure_file_url":{"type":"string","required":true},"mount_options":{"type":"string","optional":true},"relative_mount_path":{"type":"string","required":true}}},"optional":true},"cifs_mount":{"nesting_mode":3,"block":{"attributes":{"mount_options":{"type":"string","optional":true},"password":{"type":"string","required":true},"relative_mount_path":{"type":"string","required":true},"source":{"type":"string","required":true},"user_name":{"type":"string","required":true}}},"optional":true},"nfs_mount":{"nesting_mode":3,"block":{"attributes":{"mount_options":{"type":"string","optional":true},"relative_mount_path":{"type":"string","required":true},"source":{"type":"string","required":true}}},"optional":true}}},"optional":true},"network_configuration":{"nesting_mode":3,"block":{"attributes":{"accelerated_networking_enabled":{"type":"bool","optional":true,"default":false},"dynamic_vnet_assignment_scope":{"type":"string","optional":true,"default":"none"},"public_address_provisioning_type":{"type":"string","optional":true},"public_ips":{"type":["set","string"],"optional":true},"subnet_id":{"type":"string","optional":true}},"block_types":{"endpoint_configuration":{"nesting_mode":3,"block":{"attributes":{"backend_port":{"type":"number","required":true},"frontend_port_range":{"type":"string","required":true},"name":{"type":"string","required":true},"protocol":{"type":"string","required":true}},"block_types":{"network_security_group_rules":{"nesting_mode":3,"block":{"attributes":{"access":{"type":"string","required":true},"priority":{"type":"number","required":true},"source_address_prefix":{"type":"string","required":true},"source_port_ranges":{"type":["list","string"],"optional":true,"computed":true}}},"optional":true}}},"optional":true}}},"optional":true},"node_placement":{"nesting_mode":3,"block":{"attributes":{"policy":{"type":"string","optional":true,"default":"Regional"}}},"optional":true},"security_profile":{"nesting_mode":3,"block":{"attributes":{"host_encryption_enabled":{"type":"bool","optional":true},"secure_boot_enabled":{"type":"bool","optional":true,"required_with":["security_profile.0.security_type"]},"security_type":{"type":"string","optional":true},"vtpm_enabled":{"type":"bool","optional":true,"required_with":["security_profile.0.security_type"]}}},"optional":true},"start_task":{"nesting_mode":3,"block":{"attributes":{"command_line":{"type":"string","required":true},"common_environment_properties":{"type":["map","string"],"optional":true},"task_retry_maximum":{"type":"number","optional":true},"wait_for_success":{"type":"bool","optional":true,"default":false}},"block_types":{"container":{"nesting_mode":3,"block":{"attributes":{"image_name":{"type":"string","required":true},"run_options":{"type":"string","optional":true},"working_directory":{"type":"string","optional":true}},"block_types":{"registry":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","optional":true},"registry_server":{"type":"string","required":true},"user_assigned_identity_id":{"type":"string","optional":true},"user_name":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"resource_file":{"nesting_mode":3,"block":{"attributes":{"auto_storage_container_name":{"type":"string","optional":true},"blob_prefix":{"type":"string","optional":true},"file_mode":{"type":"string","optional":true},"file_path":{"type":"string","optional":true},"http_url":{"type":"string","optional":true},"storage_container_url":{"type":"string","optional":true},"user_assigned_identity_id":{"type":"string","optional":true}}},"optional":true},"user_identity":{"nesting_mode":3,"block":{"attributes":{"user_name":{"type":"string","optional":true,"at_least_one_of":["start_task.0.user_identity.0.user_name","start_task.0.user_identity.0.auto_user"]}},"block_types":{"auto_user":{"nesting_mode":3,"block":{"attributes":{"elevation_level":{"type":"string","optional":true,"default":"NonAdmin"},"scope":{"type":"string","optional":true,"default":"Task"}}},"optional":true,"at_least_one_of":["start_task.0.user_identity.0.user_name","start_task.0.user_identity.0.auto_user"]}}},"required":true}}},"optional":true},"storage_image_reference":{"nesting_mode":3,"block":{"attributes":{"id":{"type":"string","optional":true,"at_least_one_of":["storage_image_reference.0.id","storage_image_reference.0.publisher","storage_image_reference.0.offer","storage_image_reference.0.sku","storage_image_reference.0.version"]},"offer":{"type":"string","optional":true,"at_least_one_of":["storage_image_reference.0.id","storage_image_reference.0.publisher","storage_image_reference.0.offer","storage_image_reference.0.sku","storage_image_reference.0.version"]},"publisher":{"type":"string","optional":true,"at_least_one_of":["storage_image_reference.0.id","storage_image_reference.0.publisher","storage_image_reference.0.offer","storage_image_reference.0.sku","storage_image_reference.0.version"]},"sku":{"type":"string","optional":true,"at_least_one_of":["storage_image_reference.0.id","storage_image_reference.0.publisher","storage_image_reference.0.offer","storage_image_reference.0.sku","storage_image_reference.0.version"]},"version":{"type":"string","optional":true,"at_least_one_of":["storage_image_reference.0.id","storage_image_reference.0.publisher","storage_image_reference.0.offer","storage_image_reference.0.sku","storage_image_reference.0.version"]}}},"required":true},"task_scheduling_policy":{"nesting_mode":3,"block":{"attributes":{"node_fill_type":{"type":"string","optional":true,"computed":true}}},"optional":true,"computed":true},"user_accounts":{"nesting_mode":3,"block":{"attributes":{"elevation_level":{"type":"string","required":true},"name":{"type":"string","required":true},"password":{"type":"string","required":true}},"block_types":{"linux_user_configuration":{"nesting_mode":3,"block":{"attributes":{"gid":{"type":"number","optional":true},"ssh_private_key":{"type":"string","optional":true},"uid":{"type":"number","optional":true}}},"optional":true},"windows_user_configuration":{"nesting_mode":3,"block":{"attributes":{"login_mode":{"type":"string","required":true}}},"optional":true}}},"optional":true},"windows":{"nesting_mode":3,"block":{"attributes":{"enable_automatic_updates":{"type":"bool","optional":true,"default":true}}},"optional":true}}}},"azurerm_billing_account_cost_management_export":{"block":{"attributes":{"active":{"type":"bool","optional":true,"default":true},"billing_account_id":{"type":"string","required":true},"file_format":{"type":"string","optional":true,"default":"Csv"},"name":{"type":"string","required":true},"recurrence_period_end_date":{"type":"string","required":true},"recurrence_period_start_date":{"type":"string","required":true},"recurrence_type":{"type":"string","required":true}},"block_types":{"export_data_options":{"nesting_mode":3,"block":{"attributes":{"time_frame":{"type":"string","required":true},"type":{"type":"string","required":true}}},"required":true},"export_data_storage_location":{"nesting_mode":3,"block":{"attributes":{"container_id":{"type":"string","required":true},"root_folder_path":{"type":"string","required":true}}},"required":true}}}},"azurerm_blueprint_assignment":{"block":{"attributes":{"blueprint_name":{"type":"string","computed":true},"description":{"type":"string","computed":true},"display_name":{"type":"string","computed":true},"location":{"type":"string","required":true},"lock_exclude_actions":{"type":["list","string"],"optional":true},"lock_exclude_principals":{"type":["list","string"],"optional":true},"lock_mode":{"type":"string","optional":true,"default":"None"},"name":{"type":"string","required":true},"parameter_values":{"type":"string","optional":true},"resource_groups":{"type":"string","optional":true},"target_subscription_id":{"type":"string","required":true},"type":{"type":"string","computed":true},"version_id":{"type":"string","required":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"required":true}}}},"azurerm_bot_channel_alexa":{"block":{"attributes":{"bot_name":{"type":"string","required":true},"location":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"skill_id":{"type":"string","required":true}}}},"azurerm_bot_channel_direct_line_speech":{"block":{"attributes":{"bot_name":{"type":"string","required":true},"cognitive_account_id":{"type":"string","optional":true},"cognitive_service_access_key":{"type":"string","required":true},"cognitive_service_location":{"type":"string","required":true},"custom_speech_model_id":{"type":"string","optional":true},"custom_voice_deployment_id":{"type":"string","optional":true},"location":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_bot_channel_directline":{"block":{"attributes":{"bot_name":{"type":"string","required":true},"location":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}},"block_types":{"site":{"nesting_mode":4,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"endpoint_parameters_enabled":{"type":"bool","optional":true},"enhanced_authentication_enabled":{"type":"bool","optional":true,"default":false},"id":{"type":"string","computed":true},"key":{"type":"string","computed":true},"key2":{"type":"string","computed":true},"name":{"type":"string","required":true},"storage_enabled":{"type":"bool","optional":true,"default":true},"trusted_origins":{"type":["set","string"],"optional":true},"user_upload_enabled":{"type":"bool","optional":true,"default":true},"v1_allowed":{"type":"bool","optional":true,"default":true},"v3_allowed":{"type":"bool","optional":true,"default":true}}},"required":true}}}},"azurerm_bot_channel_email":{"block":{"attributes":{"bot_name":{"type":"string","required":true},"email_address":{"type":"string","required":true},"email_password":{"type":"string","optional":true,"exactly_one_of":["email_password","magic_code"]},"location":{"type":"string","required":true},"magic_code":{"type":"string","optional":true,"exactly_one_of":["email_password","magic_code"]},"resource_group_name":{"type":"string","required":true}}}},"azurerm_bot_channel_facebook":{"block":{"attributes":{"bot_name":{"type":"string","required":true},"facebook_application_id":{"type":"string","required":true},"facebook_application_secret":{"type":"string","required":true},"location":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}},"block_types":{"page":{"nesting_mode":4,"block":{"attributes":{"access_token":{"type":"string","required":true},"id":{"type":"string","required":true}}},"required":true}}}},"azurerm_bot_channel_line":{"block":{"attributes":{"bot_name":{"type":"string","required":true},"location":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}},"block_types":{"line_channel":{"nesting_mode":4,"block":{"attributes":{"access_token":{"type":"string","required":true},"secret":{"type":"string","required":true}}},"required":true}}}},"azurerm_bot_channel_ms_teams":{"block":{"attributes":{"bot_name":{"type":"string","required":true},"calling_web_hook":{"type":"string","optional":true,"computed":true},"deployment_environment":{"type":"string","optional":true,"default":"CommercialDeployment"},"enable_calling":{"type":"bool","optional":true,"default":false},"location":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_bot_channel_slack":{"block":{"attributes":{"bot_name":{"type":"string","required":true},"client_id":{"type":"string","required":true},"client_secret":{"type":"string","required":true},"landing_page_url":{"type":"string","optional":true},"location":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"signing_secret":{"type":"string","optional":true},"verification_token":{"type":"string","required":true}}}},"azurerm_bot_channel_sms":{"block":{"attributes":{"bot_name":{"type":"string","required":true},"location":{"type":"string","required":true},"phone_number":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"sms_channel_account_security_id":{"type":"string","required":true},"sms_channel_auth_token":{"type":"string","required":true}}}},"azurerm_bot_channel_web_chat":{"block":{"attributes":{"bot_name":{"type":"string","required":true},"location":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}},"block_types":{"site":{"nesting_mode":4,"block":{"attributes":{"endpoint_parameters_enabled":{"type":"bool","optional":true},"name":{"type":"string","required":true},"storage_enabled":{"type":"bool","optional":true,"default":true},"user_upload_enabled":{"type":"bool","optional":true,"default":true}}},"optional":true}}}},"azurerm_bot_channels_registration":{"block":{"attributes":{"cmk_key_vault_url":{"type":"string","optional":true},"description":{"type":"string","optional":true},"developer_app_insights_api_key":{"type":"string","optional":true},"developer_app_insights_application_id":{"type":"string","optional":true},"developer_app_insights_key":{"type":"string","optional":true},"display_name":{"type":"string","optional":true,"computed":true},"endpoint":{"type":"string","optional":true},"icon_url":{"type":"string","optional":true,"default":"https://docs.botframework.com/static/devportal/client/images/bot-framework-default.png"},"location":{"type":"string","required":true},"microsoft_app_id":{"type":"string","required":true},"name":{"type":"string","required":true},"public_network_access_enabled":{"type":"bool","optional":true},"resource_group_name":{"type":"string","required":true},"sku":{"type":"string","required":true},"streaming_endpoint_enabled":{"type":"bool","optional":true,"default":false},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_bot_connection":{"block":{"attributes":{"bot_name":{"type":"string","required":true},"client_id":{"type":"string","required":true},"client_secret":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"resource_group_name":{"type":"string","required":true},"scopes":{"type":"string","optional":true},"service_provider_name":{"type":"string","required":true}}}},"azurerm_bot_service_azure_bot":{"block":{"attributes":{"cmk_key_vault_key_url":{"type":"string","optional":true},"developer_app_insights_api_key":{"type":"string","optional":true},"developer_app_insights_application_id":{"type":"string","optional":true},"developer_app_insights_key":{"type":"string","optional":true},"display_name":{"type":"string","optional":true,"computed":true},"endpoint":{"type":"string","optional":true},"icon_url":{"type":"string","optional":true,"default":"https://docs.botframework.com/static/devportal/client/images/bot-framework-default.png"},"local_authentication_enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"luis_app_ids":{"type":["list","string"],"optional":true},"luis_key":{"type":"string","optional":true},"microsoft_app_id":{"type":"string","required":true},"microsoft_app_msi_id":{"type":"string","optional":true},"microsoft_app_tenant_id":{"type":"string","optional":true},"microsoft_app_type":{"type":"string","optional":true},"name":{"type":"string","required":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"sku":{"type":"string","required":true},"streaming_endpoint_enabled":{"type":"bool","optional":true,"default":false},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_bot_web_app":{"block":{"attributes":{"developer_app_insights_api_key":{"type":"string","optional":true},"developer_app_insights_application_id":{"type":"string","optional":true},"developer_app_insights_key":{"type":"string","optional":true},"display_name":{"type":"string","optional":true,"computed":true},"endpoint":{"type":"string","optional":true},"location":{"type":"string","required":true},"luis_app_ids":{"type":["list","string"],"optional":true},"luis_key":{"type":"string","optional":true},"microsoft_app_id":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"sku":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_capacity_reservation":{"block":{"attributes":{"capacity_reservation_group_id":{"type":"string","required":true},"name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"zone":{"type":"string","optional":true}},"block_types":{"sku":{"nesting_mode":3,"block":{"attributes":{"capacity":{"type":"number","required":true},"name":{"type":"string","required":true}}},"required":true}}}},"azurerm_capacity_reservation_group":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"zones":{"type":["set","string"],"optional":true}}}},"azurerm_cdn_endpoint":{"block":{"attributes":{"content_types_to_compress":{"type":["set","string"],"optional":true},"fqdn":{"type":"string","computed":true},"is_compression_enabled":{"type":"bool","optional":true},"is_http_allowed":{"type":"bool","optional":true,"default":true},"is_https_allowed":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"optimization_type":{"type":"string","optional":true},"origin_host_header":{"type":"string","optional":true},"origin_path":{"type":"string","optional":true},"probe_path":{"type":"string","optional":true},"profile_name":{"type":"string","required":true},"querystring_caching_behaviour":{"type":"string","optional":true,"default":"IgnoreQueryString"},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"delivery_rule":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"order":{"type":"number","required":true}},"block_types":{"cache_expiration_action":{"nesting_mode":3,"block":{"attributes":{"behavior":{"type":"string","required":true},"duration":{"type":"string","optional":true}}},"optional":true},"cache_key_query_string_action":{"nesting_mode":3,"block":{"attributes":{"behavior":{"type":"string","required":true},"parameters":{"type":"string","optional":true}}},"optional":true},"cookies_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["set","string"],"optional":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true},"selector":{"type":"string","required":true},"transforms":{"type":["list","string"],"optional":true}}},"optional":true},"device_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["set","string"],"required":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","optional":true,"default":"Equal"}}},"optional":true},"http_version_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["set","string"],"required":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","optional":true,"default":"Equal"}}},"optional":true},"modify_request_header_action":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"name":{"type":"string","required":true},"value":{"type":"string","optional":true}}},"optional":true},"modify_response_header_action":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"name":{"type":"string","required":true},"value":{"type":"string","optional":true}}},"optional":true},"post_arg_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["set","string"],"optional":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true},"selector":{"type":"string","required":true},"transforms":{"type":["list","string"],"optional":true}}},"optional":true},"query_string_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["set","string"],"optional":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true},"transforms":{"type":["list","string"],"optional":true}}},"optional":true},"remote_address_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["set","string"],"optional":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true}}},"optional":true},"request_body_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["set","string"],"optional":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true},"transforms":{"type":["list","string"],"optional":true}}},"optional":true},"request_header_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["set","string"],"optional":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true},"selector":{"type":"string","required":true},"transforms":{"type":["list","string"],"optional":true}}},"optional":true},"request_method_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["set","string"],"required":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","optional":true,"default":"Equal"}}},"optional":true},"request_scheme_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["set","string"],"required":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","optional":true,"default":"Equal"}}},"optional":true},"request_uri_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["set","string"],"optional":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true},"transforms":{"type":["list","string"],"optional":true}}},"optional":true},"url_file_extension_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["set","string"],"optional":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true},"transforms":{"type":["list","string"],"optional":true}}},"optional":true},"url_file_name_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["set","string"],"optional":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true},"transforms":{"type":["list","string"],"optional":true}}},"optional":true},"url_path_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["set","string"],"optional":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true},"transforms":{"type":["list","string"],"optional":true}}},"optional":true},"url_redirect_action":{"nesting_mode":3,"block":{"attributes":{"fragment":{"type":"string","optional":true},"hostname":{"type":"string","optional":true},"path":{"type":"string","optional":true},"protocol":{"type":"string","optional":true,"default":"MatchRequest"},"query_string":{"type":"string","optional":true},"redirect_type":{"type":"string","required":true}}},"optional":true},"url_rewrite_action":{"nesting_mode":3,"block":{"attributes":{"destination":{"type":"string","required":true},"preserve_unmatched_path":{"type":"bool","optional":true,"default":true},"source_pattern":{"type":"string","required":true}}},"optional":true}}},"optional":true},"geo_filter":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"country_codes":{"type":["list","string"],"required":true},"relative_path":{"type":"string","required":true}}},"optional":true},"global_delivery_rule":{"nesting_mode":3,"block":{"block_types":{"cache_expiration_action":{"nesting_mode":3,"block":{"attributes":{"behavior":{"type":"string","required":true},"duration":{"type":"string","optional":true}}},"optional":true,"at_least_one_of":["global_delivery_rule.0.cache_expiration_action","global_delivery_rule.0.cache_key_query_string_action","global_delivery_rule.0.modify_request_header_action","global_delivery_rule.0.modify_response_header_action","global_delivery_rule.0.url_redirect_action","global_delivery_rule.0.url_rewrite_action"]},"cache_key_query_string_action":{"nesting_mode":3,"block":{"attributes":{"behavior":{"type":"string","required":true},"parameters":{"type":"string","optional":true}}},"optional":true,"at_least_one_of":["global_delivery_rule.0.cache_expiration_action","global_delivery_rule.0.cache_key_query_string_action","global_delivery_rule.0.modify_request_header_action","global_delivery_rule.0.modify_response_header_action","global_delivery_rule.0.url_redirect_action","global_delivery_rule.0.url_rewrite_action"]},"modify_request_header_action":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"name":{"type":"string","required":true},"value":{"type":"string","optional":true}}},"optional":true,"at_least_one_of":["global_delivery_rule.0.cache_expiration_action","global_delivery_rule.0.cache_key_query_string_action","global_delivery_rule.0.modify_request_header_action","global_delivery_rule.0.modify_response_header_action","global_delivery_rule.0.url_redirect_action","global_delivery_rule.0.url_rewrite_action"]},"modify_response_header_action":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"name":{"type":"string","required":true},"value":{"type":"string","optional":true}}},"optional":true,"at_least_one_of":["global_delivery_rule.0.cache_expiration_action","global_delivery_rule.0.cache_key_query_string_action","global_delivery_rule.0.modify_request_header_action","global_delivery_rule.0.modify_response_header_action","global_delivery_rule.0.url_redirect_action","global_delivery_rule.0.url_rewrite_action"]},"url_redirect_action":{"nesting_mode":3,"block":{"attributes":{"fragment":{"type":"string","optional":true},"hostname":{"type":"string","optional":true},"path":{"type":"string","optional":true},"protocol":{"type":"string","optional":true,"default":"MatchRequest"},"query_string":{"type":"string","optional":true},"redirect_type":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["global_delivery_rule.0.cache_expiration_action","global_delivery_rule.0.cache_key_query_string_action","global_delivery_rule.0.modify_request_header_action","global_delivery_rule.0.modify_response_header_action","global_delivery_rule.0.url_redirect_action","global_delivery_rule.0.url_rewrite_action"]},"url_rewrite_action":{"nesting_mode":3,"block":{"attributes":{"destination":{"type":"string","required":true},"preserve_unmatched_path":{"type":"bool","optional":true,"default":true},"source_pattern":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["global_delivery_rule.0.cache_expiration_action","global_delivery_rule.0.cache_key_query_string_action","global_delivery_rule.0.modify_request_header_action","global_delivery_rule.0.modify_response_header_action","global_delivery_rule.0.url_redirect_action","global_delivery_rule.0.url_rewrite_action"]}}},"optional":true},"origin":{"nesting_mode":4,"block":{"attributes":{"host_name":{"type":"string","required":true},"http_port":{"type":"number","optional":true,"default":80},"https_port":{"type":"number","optional":true,"default":443},"name":{"type":"string","required":true}}},"required":true}}}},"azurerm_cdn_endpoint_custom_domain":{"block":{"attributes":{"cdn_endpoint_id":{"type":"string","required":true},"host_name":{"type":"string","required":true},"name":{"type":"string","required":true}},"block_types":{"cdn_managed_https":{"nesting_mode":3,"block":{"attributes":{"certificate_type":{"type":"string","required":true},"protocol_type":{"type":"string","required":true},"tls_version":{"type":"string","optional":true,"default":"TLS12"}}},"optional":true,"conflicts_with":["user_managed_https"]},"user_managed_https":{"nesting_mode":3,"block":{"attributes":{"key_vault_secret_id":{"type":"string","required":true},"tls_version":{"type":"string","optional":true,"default":"TLS12"}}},"optional":true,"conflicts_with":["cdn_managed_https"]}}}},"azurerm_cdn_frontdoor_custom_domain":{"block":{"attributes":{"cdn_frontdoor_profile_id":{"type":"string","required":true},"dns_zone_id":{"type":"string","optional":true},"expiration_date":{"type":"string","computed":true},"host_name":{"type":"string","required":true},"name":{"type":"string","required":true},"validation_token":{"type":"string","computed":true}},"block_types":{"tls":{"nesting_mode":3,"block":{"attributes":{"cdn_frontdoor_secret_id":{"type":"string","optional":true,"computed":true},"certificate_type":{"type":"string","optional":true,"default":"ManagedCertificate"},"minimum_tls_version":{"type":"string","optional":true,"default":"TLS12"}}},"required":true}}}},"azurerm_cdn_frontdoor_custom_domain_association":{"block":{"attributes":{"cdn_frontdoor_custom_domain_id":{"type":"string","required":true},"cdn_frontdoor_route_ids":{"type":["list","string"],"required":true}}}},"azurerm_cdn_frontdoor_endpoint":{"block":{"attributes":{"cdn_frontdoor_profile_id":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":true},"host_name":{"type":"string","computed":true},"name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_cdn_frontdoor_firewall_policy":{"block":{"attributes":{"custom_block_response_body":{"type":"string","optional":true},"custom_block_response_status_code":{"type":"number","optional":true},"enabled":{"type":"bool","optional":true,"default":true},"frontend_endpoint_ids":{"type":["list","string"],"computed":true},"js_challenge_cookie_expiration_in_minutes":{"type":"number","optional":true,"computed":true},"mode":{"type":"string","required":true},"name":{"type":"string","required":true},"redirect_url":{"type":"string","optional":true},"request_body_check_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"custom_rule":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"priority":{"type":"number","optional":true,"default":1},"rate_limit_duration_in_minutes":{"type":"number","optional":true,"default":1},"rate_limit_threshold":{"type":"number","optional":true,"default":10},"type":{"type":"string","required":true}},"block_types":{"match_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["list","string"],"required":true},"match_variable":{"type":"string","required":true},"negation_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true},"selector":{"type":"string","optional":true},"transforms":{"type":["list","string"],"optional":true}}},"optional":true}}},"optional":true},"managed_rule":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"type":{"type":"string","required":true},"version":{"type":"string","required":true}},"block_types":{"exclusion":{"nesting_mode":3,"block":{"attributes":{"match_variable":{"type":"string","required":true},"operator":{"type":"string","required":true},"selector":{"type":"string","required":true}}},"optional":true},"override":{"nesting_mode":3,"block":{"attributes":{"rule_group_name":{"type":"string","required":true}},"block_types":{"exclusion":{"nesting_mode":3,"block":{"attributes":{"match_variable":{"type":"string","required":true},"operator":{"type":"string","required":true},"selector":{"type":"string","required":true}}},"optional":true},"rule":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":false},"rule_id":{"type":"string","required":true}},"block_types":{"exclusion":{"nesting_mode":3,"block":{"attributes":{"match_variable":{"type":"string","required":true},"operator":{"type":"string","required":true},"selector":{"type":"string","required":true}}},"optional":true}}},"optional":true}}},"optional":true}}},"optional":true}}}},"azurerm_cdn_frontdoor_origin":{"block":{"attributes":{"cdn_frontdoor_origin_group_id":{"type":"string","required":true},"certificate_name_check_enabled":{"type":"bool","required":true},"enabled":{"type":"bool","optional":true,"default":true},"host_name":{"type":"string","required":true},"http_port":{"type":"number","optional":true,"default":80},"https_port":{"type":"number","optional":true,"default":443},"name":{"type":"string","required":true},"origin_host_header":{"type":"string","optional":true},"priority":{"type":"number","optional":true,"default":1},"weight":{"type":"number","optional":true,"default":500}},"block_types":{"private_link":{"nesting_mode":3,"block":{"attributes":{"location":{"type":"string","required":true},"private_link_target_id":{"type":"string","required":true},"request_message":{"type":"string","optional":true,"default":"Access request for CDN FrontDoor Private Link Origin"},"target_type":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_cdn_frontdoor_origin_group":{"block":{"attributes":{"cdn_frontdoor_profile_id":{"type":"string","required":true},"name":{"type":"string","required":true},"restore_traffic_time_to_healed_or_new_endpoint_in_minutes":{"type":"number","optional":true,"default":10},"session_affinity_enabled":{"type":"bool","optional":true,"default":true}},"block_types":{"health_probe":{"nesting_mode":3,"block":{"attributes":{"interval_in_seconds":{"type":"number","required":true},"path":{"type":"string","optional":true,"default":"/"},"protocol":{"type":"string","required":true},"request_type":{"type":"string","optional":true,"default":"HEAD"}}},"optional":true},"load_balancing":{"nesting_mode":3,"block":{"attributes":{"additional_latency_in_milliseconds":{"type":"number","optional":true,"default":50},"sample_size":{"type":"number","optional":true,"default":4},"successful_samples_required":{"type":"number","optional":true,"default":3}}},"required":true}}}},"azurerm_cdn_frontdoor_profile":{"block":{"attributes":{"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"resource_guid":{"type":"string","computed":true},"response_timeout_seconds":{"type":"number","optional":true,"default":120},"sku_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_cdn_frontdoor_route":{"block":{"attributes":{"cdn_frontdoor_custom_domain_ids":{"type":["set","string"],"optional":true},"cdn_frontdoor_endpoint_id":{"type":"string","required":true},"cdn_frontdoor_origin_group_id":{"type":"string","required":true},"cdn_frontdoor_origin_ids":{"type":["list","string"],"required":true},"cdn_frontdoor_origin_path":{"type":"string","optional":true},"cdn_frontdoor_rule_set_ids":{"type":["set","string"],"optional":true},"enabled":{"type":"bool","optional":true,"default":true},"forwarding_protocol":{"type":"string","optional":true,"default":"MatchRequest"},"https_redirect_enabled":{"type":"bool","optional":true,"default":true},"link_to_default_domain":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"patterns_to_match":{"type":["list","string"],"required":true},"supported_protocols":{"type":["set","string"],"required":true}},"block_types":{"cache":{"nesting_mode":3,"block":{"attributes":{"compression_enabled":{"type":"bool","optional":true,"default":false},"content_types_to_compress":{"type":["list","string"],"optional":true},"query_string_caching_behavior":{"type":"string","optional":true,"default":"IgnoreQueryString"},"query_strings":{"type":["list","string"],"optional":true}}},"optional":true}}}},"azurerm_cdn_frontdoor_rule":{"block":{"attributes":{"behavior_on_match":{"type":"string","optional":true,"default":"Continue"},"cdn_frontdoor_rule_set_id":{"type":"string","required":true},"cdn_frontdoor_rule_set_name":{"type":"string","computed":true},"name":{"type":"string","required":true},"order":{"type":"number","required":true}},"block_types":{"actions":{"nesting_mode":3,"block":{"block_types":{"request_header_action":{"nesting_mode":3,"block":{"attributes":{"header_action":{"type":"string","required":true},"header_name":{"type":"string","required":true},"value":{"type":"string","optional":true}}},"optional":true},"response_header_action":{"nesting_mode":3,"block":{"attributes":{"header_action":{"type":"string","required":true},"header_name":{"type":"string","required":true},"value":{"type":"string","optional":true}}},"optional":true},"route_configuration_override_action":{"nesting_mode":3,"block":{"attributes":{"cache_behavior":{"type":"string","optional":true},"cache_duration":{"type":"string","optional":true},"cdn_frontdoor_origin_group_id":{"type":"string","optional":true},"compression_enabled":{"type":"bool","optional":true},"forwarding_protocol":{"type":"string","optional":true},"query_string_caching_behavior":{"type":"string","optional":true},"query_string_parameters":{"type":["list","string"],"optional":true}}},"optional":true},"url_redirect_action":{"nesting_mode":3,"block":{"attributes":{"destination_fragment":{"type":"string","optional":true,"default":""},"destination_hostname":{"type":"string","required":true},"destination_path":{"type":"string","optional":true,"default":""},"query_string":{"type":"string","optional":true,"default":""},"redirect_protocol":{"type":"string","optional":true,"default":"MatchRequest"},"redirect_type":{"type":"string","required":true}}},"optional":true},"url_rewrite_action":{"nesting_mode":3,"block":{"attributes":{"destination":{"type":"string","required":true},"preserve_unmatched_path":{"type":"bool","optional":true,"default":false},"source_pattern":{"type":"string","required":true}}},"optional":true}}},"required":true},"conditions":{"nesting_mode":3,"block":{"block_types":{"client_port_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["list","string"],"optional":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true}}},"optional":true},"cookies_condition":{"nesting_mode":3,"block":{"attributes":{"cookie_name":{"type":"string","required":true},"match_values":{"type":["list","string"],"optional":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true},"transforms":{"type":["set","string"],"optional":true}}},"optional":true},"host_name_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["list","string"],"optional":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true},"transforms":{"type":["set","string"],"optional":true}}},"optional":true},"http_version_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["set","string"],"required":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","optional":true,"default":"Equal"}}},"optional":true},"is_device_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["list","string"],"optional":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","optional":true,"default":"Equal"}}},"optional":true},"post_args_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["list","string"],"optional":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true},"post_args_name":{"type":"string","required":true},"transforms":{"type":["set","string"],"optional":true}}},"optional":true},"query_string_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["list","string"],"optional":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true},"transforms":{"type":["set","string"],"optional":true}}},"optional":true},"remote_address_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["list","string"],"optional":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","optional":true,"default":"IPMatch"}}},"optional":true},"request_body_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["list","string"],"required":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true},"transforms":{"type":["set","string"],"optional":true}}},"optional":true},"request_header_condition":{"nesting_mode":3,"block":{"attributes":{"header_name":{"type":"string","required":true},"match_values":{"type":["list","string"],"optional":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true},"transforms":{"type":["set","string"],"optional":true}}},"optional":true},"request_method_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["set","string"],"required":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","optional":true,"default":"Equal"}}},"optional":true},"request_scheme_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["list","string"],"optional":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","optional":true,"default":"Equal"}}},"optional":true},"request_uri_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["list","string"],"optional":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true},"transforms":{"type":["set","string"],"optional":true}}},"optional":true},"server_port_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["set","string"],"required":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true}}},"optional":true},"socket_address_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["list","string"],"optional":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","optional":true,"default":"IPMatch"}}},"optional":true},"ssl_protocol_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["set","string"],"required":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","optional":true,"default":"Equal"}}},"optional":true},"url_file_extension_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["list","string"],"required":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true},"transforms":{"type":["set","string"],"optional":true}}},"optional":true},"url_filename_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["list","string"],"optional":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true},"transforms":{"type":["set","string"],"optional":true}}},"optional":true},"url_path_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["list","string"],"optional":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true},"transforms":{"type":["set","string"],"optional":true}}},"optional":true}}},"optional":true}}}},"azurerm_cdn_frontdoor_rule_set":{"block":{"attributes":{"cdn_frontdoor_profile_id":{"type":"string","required":true},"name":{"type":"string","required":true}}}},"azurerm_cdn_frontdoor_secret":{"block":{"attributes":{"cdn_frontdoor_profile_id":{"type":"string","required":true},"cdn_frontdoor_profile_name":{"type":"string","computed":true},"name":{"type":"string","required":true}},"block_types":{"secret":{"nesting_mode":3,"block":{"block_types":{"customer_certificate":{"nesting_mode":3,"block":{"attributes":{"key_vault_certificate_id":{"type":"string","required":true},"subject_alternative_names":{"type":["list","string"],"computed":true}}},"required":true}}},"required":true}}}},"azurerm_cdn_frontdoor_security_policy":{"block":{"attributes":{"cdn_frontdoor_profile_id":{"type":"string","required":true},"name":{"type":"string","required":true}},"block_types":{"security_policies":{"nesting_mode":3,"block":{"block_types":{"firewall":{"nesting_mode":3,"block":{"attributes":{"cdn_frontdoor_firewall_policy_id":{"type":"string","required":true}},"block_types":{"association":{"nesting_mode":3,"block":{"attributes":{"patterns_to_match":{"type":["list","string"],"required":true}},"block_types":{"domain":{"nesting_mode":3,"block":{"attributes":{"active":{"type":"bool","computed":true},"cdn_frontdoor_domain_id":{"type":"string","required":true}}},"required":true}}},"required":true}}},"required":true}}},"required":true}}}},"azurerm_cdn_profile":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"sku":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_chaos_studio_capability":{"block":{"attributes":{"capability_type":{"type":"string","required":true},"chaos_studio_target_id":{"type":"string","required":true},"urn":{"type":"string","computed":true}}}},"azurerm_chaos_studio_experiment":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"selectors":{"nesting_mode":3,"block":{"attributes":{"chaos_studio_target_ids":{"type":["list","string"],"required":true},"name":{"type":"string","required":true}}},"required":true},"steps":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true}},"block_types":{"branch":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true}},"block_types":{"actions":{"nesting_mode":3,"block":{"attributes":{"action_type":{"type":"string","required":true},"duration":{"type":"string","optional":true},"parameters":{"type":["map","string"],"optional":true},"selector_name":{"type":"string","optional":true},"urn":{"type":"string","optional":true}}},"required":true}}},"required":true}}},"required":true}}}},"azurerm_chaos_studio_target":{"block":{"attributes":{"location":{"type":"string","required":true},"target_resource_id":{"type":"string","required":true},"target_type":{"type":"string","required":true}}}},"azurerm_cognitive_account":{"block":{"attributes":{"custom_question_answering_search_service_id":{"type":"string","optional":true},"custom_question_answering_search_service_key":{"type":"string","optional":true},"custom_subdomain_name":{"type":"string","optional":true},"dynamic_throttling_enabled":{"type":"bool","optional":true},"endpoint":{"type":"string","computed":true},"fqdns":{"type":["list","string"],"optional":true},"kind":{"type":"string","required":true},"local_auth_enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"metrics_advisor_aad_client_id":{"type":"string","optional":true},"metrics_advisor_aad_tenant_id":{"type":"string","optional":true},"metrics_advisor_super_user_name":{"type":"string","optional":true},"metrics_advisor_website_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"outbound_network_access_restricted":{"type":"bool","optional":true,"default":false},"primary_access_key":{"type":"string","computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"qna_runtime_endpoint":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"secondary_access_key":{"type":"string","computed":true},"sku_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"customer_managed_key":{"nesting_mode":3,"block":{"attributes":{"identity_client_id":{"type":"string","optional":true},"key_vault_key_id":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"network_acls":{"nesting_mode":3,"block":{"attributes":{"bypass":{"type":"string","optional":true},"default_action":{"type":"string","required":true},"ip_rules":{"type":["set","string"],"optional":true}},"block_types":{"virtual_network_rules":{"nesting_mode":4,"block":{"attributes":{"ignore_missing_vnet_service_endpoint":{"type":"bool","optional":true,"default":false},"subnet_id":{"type":"string","required":true}}},"optional":true}}},"optional":true,"required_with":["custom_subdomain_name"]},"storage":{"nesting_mode":3,"block":{"attributes":{"identity_client_id":{"type":"string","optional":true},"storage_account_id":{"type":"string","required":true}}},"optional":true}}}},"azurerm_cognitive_account_customer_managed_key":{"block":{"attributes":{"cognitive_account_id":{"type":"string","required":true},"identity_client_id":{"type":"string","optional":true},"key_vault_key_id":{"type":"string","required":true}}}},"azurerm_cognitive_account_rai_blocklist":{"block":{"attributes":{"cognitive_account_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true}}}},"azurerm_cognitive_account_rai_policy":{"block":{"attributes":{"base_policy_name":{"type":"string","required":true},"cognitive_account_id":{"type":"string","required":true},"mode":{"type":"string","optional":true},"name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"content_filter":{"nesting_mode":3,"block":{"attributes":{"block_enabled":{"type":"bool","required":true},"filter_enabled":{"type":"bool","required":true},"name":{"type":"string","required":true},"severity_threshold":{"type":"string","required":true},"source":{"type":"string","required":true}}},"required":true}}}},"azurerm_cognitive_deployment":{"block":{"attributes":{"cognitive_account_id":{"type":"string","required":true},"dynamic_throttling_enabled":{"type":"bool","optional":true},"name":{"type":"string","required":true},"rai_policy_name":{"type":"string","optional":true},"version_upgrade_option":{"type":"string","optional":true,"default":"OnceNewDefaultVersionAvailable"}},"block_types":{"model":{"nesting_mode":3,"block":{"attributes":{"format":{"type":"string","required":true},"name":{"type":"string","required":true},"version":{"type":"string","optional":true}}},"required":true},"sku":{"nesting_mode":3,"block":{"attributes":{"capacity":{"type":"number","optional":true,"default":1},"family":{"type":"string","optional":true},"name":{"type":"string","required":true},"size":{"type":"string","optional":true},"tier":{"type":"string","optional":true}}},"required":true}}}},"azurerm_communication_service":{"block":{"attributes":{"data_location":{"type":"string","optional":true,"default":"United States"},"hostname":{"type":"string","computed":true},"name":{"type":"string","required":true},"primary_connection_string":{"type":"string","computed":true},"primary_key":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"secondary_connection_string":{"type":"string","computed":true},"secondary_key":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_communication_service_email_domain_association":{"block":{"attributes":{"communication_service_id":{"type":"string","required":true},"email_service_domain_id":{"type":"string","required":true}}}},"azurerm_confidential_ledger":{"block":{"attributes":{"identity_service_endpoint":{"type":"string","computed":true},"ledger_endpoint":{"type":"string","computed":true},"ledger_type":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"azuread_based_service_principal":{"nesting_mode":3,"block":{"attributes":{"ledger_role_name":{"type":"string","required":true},"principal_id":{"type":"string","required":true},"tenant_id":{"type":"string","required":true}}},"required":true},"certificate_based_security_principal":{"nesting_mode":3,"block":{"attributes":{"ledger_role_name":{"type":"string","required":true},"pem_public_key":{"type":"string","required":true}}},"optional":true}}}},"azurerm_consumption_budget_management_group":{"block":{"attributes":{"amount":{"type":"number","required":true},"etag":{"type":"string","optional":true,"computed":true},"management_group_id":{"type":"string","required":true},"name":{"type":"string","required":true},"time_grain":{"type":"string","optional":true,"default":"Monthly"}},"block_types":{"filter":{"nesting_mode":3,"block":{"block_types":{"dimension":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"operator":{"type":"string","optional":true,"default":"In"},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["filter.0.dimension","filter.0.tag"]},"tag":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"operator":{"type":"string","optional":true,"default":"In"},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["filter.0.dimension","filter.0.tag"]}}},"optional":true},"notification":{"nesting_mode":4,"block":{"attributes":{"contact_emails":{"type":["list","string"],"required":true},"enabled":{"type":"bool","optional":true,"default":true},"operator":{"type":"string","required":true},"threshold":{"type":"number","required":true},"threshold_type":{"type":"string","optional":true,"default":"Actual"}}},"required":true},"time_period":{"nesting_mode":3,"block":{"attributes":{"end_date":{"type":"string","optional":true,"computed":true},"start_date":{"type":"string","required":true}}},"required":true}}}},"azurerm_consumption_budget_resource_group":{"block":{"attributes":{"amount":{"type":"number","required":true},"etag":{"type":"string","optional":true,"computed":true},"name":{"type":"string","required":true},"resource_group_id":{"type":"string","required":true},"time_grain":{"type":"string","optional":true,"default":"Monthly"}},"block_types":{"filter":{"nesting_mode":3,"block":{"block_types":{"dimension":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"operator":{"type":"string","optional":true,"default":"In"},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["filter.0.dimension","filter.0.tag"]},"tag":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"operator":{"type":"string","optional":true,"default":"In"},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["filter.0.dimension","filter.0.tag"]}}},"optional":true},"notification":{"nesting_mode":4,"block":{"attributes":{"contact_emails":{"type":["list","string"],"optional":true},"contact_groups":{"type":["list","string"],"optional":true},"contact_roles":{"type":["list","string"],"optional":true},"enabled":{"type":"bool","optional":true,"default":true},"operator":{"type":"string","required":true},"threshold":{"type":"number","required":true},"threshold_type":{"type":"string","optional":true,"default":"Actual"}}},"required":true},"time_period":{"nesting_mode":3,"block":{"attributes":{"end_date":{"type":"string","optional":true,"computed":true},"start_date":{"type":"string","required":true}}},"required":true}}}},"azurerm_consumption_budget_subscription":{"block":{"attributes":{"amount":{"type":"number","required":true},"etag":{"type":"string","optional":true,"computed":true},"name":{"type":"string","required":true},"subscription_id":{"type":"string","required":true},"time_grain":{"type":"string","optional":true,"default":"Monthly"}},"block_types":{"filter":{"nesting_mode":3,"block":{"block_types":{"dimension":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"operator":{"type":"string","optional":true,"default":"In"},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["filter.0.dimension","filter.0.tag"]},"tag":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"operator":{"type":"string","optional":true,"default":"In"},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["filter.0.dimension","filter.0.tag"]}}},"optional":true},"notification":{"nesting_mode":4,"block":{"attributes":{"contact_emails":{"type":["list","string"],"optional":true},"contact_groups":{"type":["list","string"],"optional":true},"contact_roles":{"type":["list","string"],"optional":true},"enabled":{"type":"bool","optional":true,"default":true},"operator":{"type":"string","required":true},"threshold":{"type":"number","required":true},"threshold_type":{"type":"string","optional":true,"default":"Actual"}}},"required":true},"time_period":{"nesting_mode":3,"block":{"attributes":{"end_date":{"type":"string","optional":true,"computed":true},"start_date":{"type":"string","required":true}}},"required":true}}}},"azurerm_container_app":{"block":{"attributes":{"container_app_environment_id":{"type":"string","required":true},"custom_domain_verification_id":{"type":"string","computed":true},"latest_revision_fqdn":{"type":"string","computed":true},"latest_revision_name":{"type":"string","computed":true},"location":{"type":"string","computed":true},"max_inactive_revisions":{"type":"number","optional":true},"name":{"type":"string","required":true},"outbound_ip_addresses":{"type":["list","string"],"computed":true},"resource_group_name":{"type":"string","required":true},"revision_mode":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"workload_profile_name":{"type":"string","optional":true}},"block_types":{"dapr":{"nesting_mode":3,"block":{"attributes":{"app_id":{"type":"string","required":true},"app_port":{"type":"number","optional":true},"app_protocol":{"type":"string","optional":true,"default":"http"}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"ingress":{"nesting_mode":3,"block":{"attributes":{"allow_insecure_connections":{"type":"bool","optional":true,"default":false},"client_certificate_mode":{"type":"string","optional":true},"custom_domain":{"type":["list",["object",{"certificate_binding_type":"string","certificate_id":"string","name":"string"}]],"computed":true},"exposed_port":{"type":"number","optional":true},"external_enabled":{"type":"bool","optional":true,"default":false},"fqdn":{"type":"string","computed":true},"target_port":{"type":"number","required":true},"transport":{"type":"string","optional":true,"default":"auto"}},"block_types":{"ip_security_restriction":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"description":{"type":"string","optional":true},"ip_address_range":{"type":"string","required":true},"name":{"type":"string","required":true}}},"optional":true},"traffic_weight":{"nesting_mode":3,"block":{"attributes":{"label":{"type":"string","optional":true},"latest_revision":{"type":"bool","optional":true,"default":false},"percentage":{"type":"number","required":true},"revision_suffix":{"type":"string","optional":true}}},"required":true}}},"optional":true},"registry":{"nesting_mode":3,"block":{"attributes":{"identity":{"type":"string","optional":true},"password_secret_name":{"type":"string","optional":true},"server":{"type":"string","required":true},"username":{"type":"string","optional":true}}},"optional":true},"secret":{"nesting_mode":4,"block":{"attributes":{"identity":{"type":"string","optional":true},"key_vault_secret_id":{"type":"string","optional":true},"name":{"type":"string","required":true},"value":{"type":"string","optional":true}}},"optional":true},"template":{"nesting_mode":3,"block":{"attributes":{"max_replicas":{"type":"number","optional":true,"default":10},"min_replicas":{"type":"number","optional":true,"default":0},"revision_suffix":{"type":"string","optional":true,"computed":true},"termination_grace_period_seconds":{"type":"number","optional":true,"default":0}},"block_types":{"azure_queue_scale_rule":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"queue_length":{"type":"number","required":true},"queue_name":{"type":"string","required":true}},"block_types":{"authentication":{"nesting_mode":3,"block":{"attributes":{"secret_name":{"type":"string","required":true},"trigger_parameter":{"type":"string","required":true}}},"required":true}}},"optional":true},"container":{"nesting_mode":3,"block":{"attributes":{"args":{"type":["list","string"],"optional":true},"command":{"type":["list","string"],"optional":true},"cpu":{"type":"number","required":true},"ephemeral_storage":{"type":"string","computed":true},"image":{"type":"string","required":true},"memory":{"type":"string","required":true},"name":{"type":"string","required":true}},"block_types":{"env":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"secret_name":{"type":"string","optional":true},"value":{"type":"string","optional":true}}},"optional":true},"liveness_probe":{"nesting_mode":3,"block":{"attributes":{"failure_count_threshold":{"type":"number","optional":true,"default":3},"host":{"type":"string","optional":true},"initial_delay":{"type":"number","optional":true,"default":1},"interval_seconds":{"type":"number","optional":true,"default":10},"path":{"type":"string","optional":true,"computed":true},"port":{"type":"number","required":true},"termination_grace_period_seconds":{"type":"number","computed":true},"timeout":{"type":"number","optional":true,"default":1},"transport":{"type":"string","required":true}},"block_types":{"header":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true},"readiness_probe":{"nesting_mode":3,"block":{"attributes":{"failure_count_threshold":{"type":"number","optional":true,"default":3},"host":{"type":"string","optional":true},"initial_delay":{"type":"number","optional":true,"default":0},"interval_seconds":{"type":"number","optional":true,"default":10},"path":{"type":"string","optional":true,"computed":true},"port":{"type":"number","required":true},"success_count_threshold":{"type":"number","optional":true,"default":3},"timeout":{"type":"number","optional":true,"default":1},"transport":{"type":"string","required":true}},"block_types":{"header":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true},"startup_probe":{"nesting_mode":3,"block":{"attributes":{"failure_count_threshold":{"type":"number","optional":true,"default":3},"host":{"type":"string","optional":true},"initial_delay":{"type":"number","optional":true,"default":0},"interval_seconds":{"type":"number","optional":true,"default":10},"path":{"type":"string","optional":true,"computed":true},"port":{"type":"number","required":true},"termination_grace_period_seconds":{"type":"number","computed":true},"timeout":{"type":"number","optional":true,"default":1},"transport":{"type":"string","required":true}},"block_types":{"header":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true},"volume_mounts":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"path":{"type":"string","required":true},"sub_path":{"type":"string","optional":true}}},"optional":true}}},"required":true},"custom_scale_rule":{"nesting_mode":3,"block":{"attributes":{"custom_rule_type":{"type":"string","required":true},"metadata":{"type":["map","string"],"required":true},"name":{"type":"string","required":true}},"block_types":{"authentication":{"nesting_mode":3,"block":{"attributes":{"secret_name":{"type":"string","required":true},"trigger_parameter":{"type":"string","required":true}}},"optional":true}}},"optional":true},"http_scale_rule":{"nesting_mode":3,"block":{"attributes":{"concurrent_requests":{"type":"string","required":true},"name":{"type":"string","required":true}},"block_types":{"authentication":{"nesting_mode":3,"block":{"attributes":{"secret_name":{"type":"string","required":true},"trigger_parameter":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"init_container":{"nesting_mode":3,"block":{"attributes":{"args":{"type":["list","string"],"optional":true},"command":{"type":["list","string"],"optional":true},"cpu":{"type":"number","optional":true},"ephemeral_storage":{"type":"string","computed":true},"image":{"type":"string","required":true},"memory":{"type":"string","optional":true},"name":{"type":"string","required":true}},"block_types":{"env":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"secret_name":{"type":"string","optional":true},"value":{"type":"string","optional":true}}},"optional":true},"volume_mounts":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"path":{"type":"string","required":true},"sub_path":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"tcp_scale_rule":{"nesting_mode":3,"block":{"attributes":{"concurrent_requests":{"type":"string","required":true},"name":{"type":"string","required":true}},"block_types":{"authentication":{"nesting_mode":3,"block":{"attributes":{"secret_name":{"type":"string","required":true},"trigger_parameter":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"volume":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"storage_name":{"type":"string","optional":true},"storage_type":{"type":"string","optional":true,"default":"EmptyDir"}}},"optional":true}}},"required":true}}}},"azurerm_container_app_custom_domain":{"block":{"attributes":{"certificate_binding_type":{"type":"string","optional":true},"container_app_environment_certificate_id":{"type":"string","optional":true,"required_with":["certificate_binding_type"]},"container_app_environment_managed_certificate_id":{"type":"string","computed":true},"container_app_id":{"type":"string","required":true},"name":{"type":"string","required":true}}}},"azurerm_container_app_environment":{"block":{"attributes":{"custom_domain_verification_id":{"type":"string","computed":true},"dapr_application_insights_connection_string":{"type":"string","optional":true},"default_domain":{"type":"string","computed":true},"docker_bridge_cidr":{"type":"string","computed":true},"infrastructure_resource_group_name":{"type":"string","optional":true,"required_with":["workload_profile"]},"infrastructure_subnet_id":{"type":"string","optional":true},"internal_load_balancer_enabled":{"type":"bool","optional":true,"default":false,"required_with":["infrastructure_subnet_id"]},"location":{"type":"string","required":true},"log_analytics_workspace_id":{"type":"string","optional":true},"logs_destination":{"type":"string","optional":true,"computed":true},"mutual_tls_enabled":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"platform_reserved_cidr":{"type":"string","computed":true},"platform_reserved_dns_ip_address":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"static_ip_address":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true},"zone_redundancy_enabled":{"type":"bool","optional":true,"default":false,"required_with":["infrastructure_subnet_id"]}},"block_types":{"workload_profile":{"nesting_mode":4,"block":{"attributes":{"maximum_count":{"type":"number","optional":true},"minimum_count":{"type":"number","optional":true},"name":{"type":"string","required":true},"workload_profile_type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_container_app_environment_certificate":{"block":{"attributes":{"certificate_blob_base64":{"type":"string","required":true},"certificate_password":{"type":"string","required":true},"container_app_environment_id":{"type":"string","required":true},"expiration_date":{"type":"string","computed":true},"issue_date":{"type":"string","computed":true},"issuer":{"type":"string","computed":true},"name":{"type":"string","required":true},"subject_name":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true},"thumbprint":{"type":"string","computed":true}}}},"azurerm_container_app_environment_custom_domain":{"block":{"attributes":{"certificate_blob_base64":{"type":"string","required":true},"certificate_password":{"type":"string","required":true},"container_app_environment_id":{"type":"string","required":true},"dns_suffix":{"type":"string","required":true}}}},"azurerm_container_app_environment_dapr_component":{"block":{"attributes":{"component_type":{"type":"string","required":true},"container_app_environment_id":{"type":"string","required":true},"ignore_errors":{"type":"bool","optional":true,"default":false},"init_timeout":{"type":"string","optional":true,"default":"5s"},"name":{"type":"string","required":true},"scopes":{"type":["list","string"],"optional":true},"version":{"type":"string","required":true}},"block_types":{"metadata":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"secret_name":{"type":"string","optional":true},"value":{"type":"string","optional":true}}},"optional":true},"secret":{"nesting_mode":4,"block":{"attributes":{"identity":{"type":"string","optional":true},"key_vault_secret_id":{"type":"string","optional":true},"name":{"type":"string","required":true},"value":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_container_app_environment_storage":{"block":{"attributes":{"access_key":{"type":"string","required":true},"access_mode":{"type":"string","required":true},"account_name":{"type":"string","required":true},"container_app_environment_id":{"type":"string","required":true},"name":{"type":"string","required":true},"share_name":{"type":"string","required":true}}}},"azurerm_container_app_job":{"block":{"attributes":{"container_app_environment_id":{"type":"string","required":true},"event_stream_endpoint":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"outbound_ip_addresses":{"type":["list","string"],"computed":true},"replica_retry_limit":{"type":"number","optional":true},"replica_timeout_in_seconds":{"type":"number","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"workload_profile_name":{"type":"string","optional":true}},"block_types":{"event_trigger_config":{"nesting_mode":3,"block":{"attributes":{"parallelism":{"type":"number","optional":true,"default":1},"replica_completion_count":{"type":"number","optional":true,"default":1}},"block_types":{"scale":{"nesting_mode":3,"block":{"attributes":{"max_executions":{"type":"number","optional":true,"default":100},"min_executions":{"type":"number","optional":true,"default":0},"polling_interval_in_seconds":{"type":"number","optional":true,"default":30}},"block_types":{"rules":{"nesting_mode":3,"block":{"attributes":{"custom_rule_type":{"type":"string","required":true},"metadata":{"type":["map","string"],"required":true},"name":{"type":"string","required":true}},"block_types":{"authentication":{"nesting_mode":3,"block":{"attributes":{"secret_name":{"type":"string","required":true},"trigger_parameter":{"type":"string","required":true}}},"optional":true}}},"optional":true}}},"optional":true}}},"optional":true,"exactly_one_of":["event_trigger_config","manual_trigger_config","schedule_trigger_config"]},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"manual_trigger_config":{"nesting_mode":3,"block":{"attributes":{"parallelism":{"type":"number","optional":true,"default":1},"replica_completion_count":{"type":"number","optional":true,"default":1}}},"optional":true,"exactly_one_of":["event_trigger_config","manual_trigger_config","schedule_trigger_config"]},"registry":{"nesting_mode":3,"block":{"attributes":{"identity":{"type":"string","optional":true},"password_secret_name":{"type":"string","optional":true},"server":{"type":"string","required":true},"username":{"type":"string","optional":true}}},"optional":true},"schedule_trigger_config":{"nesting_mode":3,"block":{"attributes":{"cron_expression":{"type":"string","required":true},"parallelism":{"type":"number","optional":true,"default":1},"replica_completion_count":{"type":"number","optional":true,"default":1}}},"optional":true,"exactly_one_of":["event_trigger_config","manual_trigger_config","schedule_trigger_config"]},"secret":{"nesting_mode":4,"block":{"attributes":{"identity":{"type":"string","optional":true},"key_vault_secret_id":{"type":"string","optional":true},"name":{"type":"string","required":true},"value":{"type":"string","optional":true}}},"optional":true},"template":{"nesting_mode":3,"block":{"block_types":{"container":{"nesting_mode":3,"block":{"attributes":{"args":{"type":["list","string"],"optional":true},"command":{"type":["list","string"],"optional":true},"cpu":{"type":"number","required":true},"ephemeral_storage":{"type":"string","computed":true},"image":{"type":"string","required":true},"memory":{"type":"string","required":true},"name":{"type":"string","required":true}},"block_types":{"env":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"secret_name":{"type":"string","optional":true},"value":{"type":"string","optional":true}}},"optional":true},"liveness_probe":{"nesting_mode":3,"block":{"attributes":{"failure_count_threshold":{"type":"number","optional":true,"default":3},"host":{"type":"string","optional":true},"initial_delay":{"type":"number","optional":true,"default":1},"interval_seconds":{"type":"number","optional":true,"default":10},"path":{"type":"string","optional":true,"computed":true},"port":{"type":"number","required":true},"termination_grace_period_seconds":{"type":"number","computed":true},"timeout":{"type":"number","optional":true,"default":1},"transport":{"type":"string","required":true}},"block_types":{"header":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true},"readiness_probe":{"nesting_mode":3,"block":{"attributes":{"failure_count_threshold":{"type":"number","optional":true,"default":3},"host":{"type":"string","optional":true},"initial_delay":{"type":"number","optional":true,"default":0},"interval_seconds":{"type":"number","optional":true,"default":10},"path":{"type":"string","optional":true,"computed":true},"port":{"type":"number","required":true},"success_count_threshold":{"type":"number","optional":true,"default":3},"timeout":{"type":"number","optional":true,"default":1},"transport":{"type":"string","required":true}},"block_types":{"header":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true},"startup_probe":{"nesting_mode":3,"block":{"attributes":{"failure_count_threshold":{"type":"number","optional":true,"default":3},"host":{"type":"string","optional":true},"initial_delay":{"type":"number","optional":true,"default":0},"interval_seconds":{"type":"number","optional":true,"default":10},"path":{"type":"string","optional":true,"computed":true},"port":{"type":"number","required":true},"termination_grace_period_seconds":{"type":"number","computed":true},"timeout":{"type":"number","optional":true,"default":1},"transport":{"type":"string","required":true}},"block_types":{"header":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true},"volume_mounts":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"path":{"type":"string","required":true},"sub_path":{"type":"string","optional":true}}},"optional":true}}},"required":true},"init_container":{"nesting_mode":3,"block":{"attributes":{"args":{"type":["list","string"],"optional":true},"command":{"type":["list","string"],"optional":true},"cpu":{"type":"number","optional":true},"ephemeral_storage":{"type":"string","computed":true},"image":{"type":"string","required":true},"memory":{"type":"string","optional":true},"name":{"type":"string","required":true}},"block_types":{"env":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"secret_name":{"type":"string","optional":true},"value":{"type":"string","optional":true}}},"optional":true},"volume_mounts":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"path":{"type":"string","required":true},"sub_path":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"volume":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"storage_name":{"type":"string","optional":true},"storage_type":{"type":"string","optional":true,"default":"EmptyDir"}}},"optional":true}}},"required":true}}}},"azurerm_container_connected_registry":{"block":{"attributes":{"audit_log_enabled":{"type":"bool","optional":true,"default":false},"client_token_ids":{"type":["list","string"],"optional":true},"container_registry_id":{"type":"string","required":true},"log_level":{"type":"string","optional":true,"default":"None"},"mode":{"type":"string","optional":true,"default":"ReadWrite"},"name":{"type":"string","required":true},"parent_registry_id":{"type":"string","optional":true},"sync_message_ttl":{"type":"string","optional":true,"default":"P1D"},"sync_schedule":{"type":"string","optional":true,"default":"* * * * *"},"sync_token_id":{"type":"string","required":true},"sync_window":{"type":"string","optional":true}},"block_types":{"notification":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"digest":{"type":"string","optional":true},"name":{"type":"string","required":true},"tag":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_container_group":{"block":{"attributes":{"dns_name_label":{"type":"string","optional":true},"dns_name_label_reuse_policy":{"type":"string","optional":true,"default":"Unsecure"},"exposed_port":{"type":["set",["object",{"port":"number","protocol":"string"}]],"optional":true,"computed":true},"fqdn":{"type":"string","computed":true},"ip_address":{"type":"string","computed":true},"ip_address_type":{"type":"string","optional":true,"default":"Public"},"key_vault_key_id":{"type":"string","optional":true},"key_vault_user_assigned_identity_id":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"network_profile_id":{"type":"string","optional":true,"computed":true},"os_type":{"type":"string","required":true},"priority":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"restart_policy":{"type":"string","optional":true,"default":"Always"},"sku":{"type":"string","optional":true,"default":"Standard"},"subnet_ids":{"type":["set","string"],"optional":true,"conflicts_with":["dns_name_label"]},"tags":{"type":["map","string"],"optional":true},"zones":{"type":["set","string"],"optional":true}},"block_types":{"container":{"nesting_mode":3,"block":{"attributes":{"commands":{"type":["list","string"],"optional":true,"computed":true},"cpu":{"type":"number","required":true},"cpu_limit":{"type":"number","optional":true},"environment_variables":{"type":["map","string"],"optional":true},"image":{"type":"string","required":true},"memory":{"type":"number","required":true},"memory_limit":{"type":"number","optional":true},"name":{"type":"string","required":true},"secure_environment_variables":{"type":["map","string"],"optional":true}},"block_types":{"liveness_probe":{"nesting_mode":3,"block":{"attributes":{"exec":{"type":["list","string"],"optional":true},"failure_threshold":{"type":"number","optional":true},"initial_delay_seconds":{"type":"number","optional":true},"period_seconds":{"type":"number","optional":true},"success_threshold":{"type":"number","optional":true},"timeout_seconds":{"type":"number","optional":true}},"block_types":{"http_get":{"nesting_mode":3,"block":{"attributes":{"http_headers":{"type":["map","string"],"optional":true},"path":{"type":"string","optional":true},"port":{"type":"number","optional":true},"scheme":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"ports":{"nesting_mode":4,"block":{"attributes":{"port":{"type":"number","optional":true},"protocol":{"type":"string","optional":true,"default":"TCP"}}},"optional":true},"readiness_probe":{"nesting_mode":3,"block":{"attributes":{"exec":{"type":["list","string"],"optional":true},"failure_threshold":{"type":"number","optional":true},"initial_delay_seconds":{"type":"number","optional":true},"period_seconds":{"type":"number","optional":true},"success_threshold":{"type":"number","optional":true},"timeout_seconds":{"type":"number","optional":true}},"block_types":{"http_get":{"nesting_mode":3,"block":{"attributes":{"http_headers":{"type":["map","string"],"optional":true},"path":{"type":"string","optional":true},"port":{"type":"number","optional":true},"scheme":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"security":{"nesting_mode":3,"block":{"attributes":{"privilege_enabled":{"type":"bool","required":true}}},"optional":true},"volume":{"nesting_mode":3,"block":{"attributes":{"empty_dir":{"type":"bool","optional":true,"default":false},"mount_path":{"type":"string","required":true},"name":{"type":"string","required":true},"read_only":{"type":"bool","optional":true,"default":false},"secret":{"type":["map","string"],"optional":true},"share_name":{"type":"string","optional":true},"storage_account_key":{"type":"string","optional":true},"storage_account_name":{"type":"string","optional":true}},"block_types":{"git_repo":{"nesting_mode":3,"block":{"attributes":{"directory":{"type":"string","optional":true},"revision":{"type":"string","optional":true},"url":{"type":"string","required":true}}},"optional":true}}},"optional":true}}},"required":true},"diagnostics":{"nesting_mode":3,"block":{"block_types":{"log_analytics":{"nesting_mode":3,"block":{"attributes":{"log_type":{"type":"string","optional":true},"metadata":{"type":["map","string"],"optional":true},"workspace_id":{"type":"string","required":true},"workspace_key":{"type":"string","required":true}}},"required":true}}},"optional":true},"dns_config":{"nesting_mode":3,"block":{"attributes":{"nameservers":{"type":["list","string"],"required":true},"options":{"type":["set","string"],"optional":true},"search_domains":{"type":["set","string"],"optional":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"image_registry_credential":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","optional":true},"server":{"type":"string","required":true},"user_assigned_identity_id":{"type":"string","optional":true},"username":{"type":"string","optional":true}}},"optional":true},"init_container":{"nesting_mode":3,"block":{"attributes":{"commands":{"type":["list","string"],"optional":true,"computed":true},"environment_variables":{"type":["map","string"],"optional":true},"image":{"type":"string","required":true},"name":{"type":"string","required":true},"secure_environment_variables":{"type":["map","string"],"optional":true}},"block_types":{"security":{"nesting_mode":3,"block":{"attributes":{"privilege_enabled":{"type":"bool","required":true}}},"optional":true},"volume":{"nesting_mode":3,"block":{"attributes":{"empty_dir":{"type":"bool","optional":true,"default":false},"mount_path":{"type":"string","required":true},"name":{"type":"string","required":true},"read_only":{"type":"bool","optional":true,"default":false},"secret":{"type":["map","string"],"optional":true},"share_name":{"type":"string","optional":true},"storage_account_key":{"type":"string","optional":true},"storage_account_name":{"type":"string","optional":true}},"block_types":{"git_repo":{"nesting_mode":3,"block":{"attributes":{"directory":{"type":"string","optional":true},"revision":{"type":"string","optional":true},"url":{"type":"string","required":true}}},"optional":true}}},"optional":true}}},"optional":true}}}},"azurerm_container_registry":{"block":{"attributes":{"admin_enabled":{"type":"bool","optional":true,"default":false},"admin_password":{"type":"string","computed":true},"admin_username":{"type":"string","computed":true},"anonymous_pull_enabled":{"type":"bool","optional":true},"data_endpoint_enabled":{"type":"bool","optional":true},"encryption":{"type":["list",["object",{"identity_client_id":"string","key_vault_key_id":"string"}]],"optional":true,"computed":true},"export_policy_enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"login_server":{"type":"string","computed":true},"name":{"type":"string","required":true},"network_rule_bypass_option":{"type":"string","optional":true,"default":"AzureServices"},"network_rule_set":{"type":["list",["object",{"default_action":"string","ip_rule":["set",["object",{"action":"string","ip_range":"string"}]]}]],"optional":true,"computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"quarantine_policy_enabled":{"type":"bool","optional":true},"resource_group_name":{"type":"string","required":true},"retention_policy_in_days":{"type":"number","optional":true},"sku":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"trust_policy_enabled":{"type":"bool","optional":true,"default":false},"zone_redundancy_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"georeplications":{"nesting_mode":3,"block":{"attributes":{"location":{"type":"string","required":true},"regional_endpoint_enabled":{"type":"bool","optional":true},"tags":{"type":["map","string"],"optional":true},"zone_redundancy_enabled":{"type":"bool","optional":true,"default":false}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_container_registry_agent_pool":{"block":{"attributes":{"container_registry_name":{"type":"string","required":true},"instance_count":{"type":"number","optional":true,"default":1},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"tier":{"type":"string","optional":true,"default":"S1"},"virtual_network_subnet_id":{"type":"string","optional":true}}}},"azurerm_container_registry_cache_rule":{"block":{"attributes":{"container_registry_id":{"type":"string","required":true},"credential_set_id":{"type":"string","optional":true},"name":{"type":"string","required":true},"source_repo":{"type":"string","required":true},"target_repo":{"type":"string","required":true}}}},"azurerm_container_registry_credential_set":{"block":{"attributes":{"container_registry_id":{"type":"string","required":true},"login_server":{"type":"string","required":true},"name":{"type":"string","required":true}},"block_types":{"authentication_credentials":{"nesting_mode":3,"block":{"attributes":{"password_secret_id":{"type":"string","required":true},"username_secret_id":{"type":"string","required":true}}},"required":true},"identity":{"nesting_mode":3,"block":{"attributes":{"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"required":true}}}},"azurerm_container_registry_scope_map":{"block":{"attributes":{"actions":{"type":["list","string"],"required":true},"container_registry_name":{"type":"string","required":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_container_registry_task":{"block":{"attributes":{"agent_pool_name":{"type":"string","optional":true,"conflicts_with":["agent_setting"]},"container_registry_id":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":true},"is_system_task":{"type":"bool","optional":true,"default":false},"log_template":{"type":"string","optional":true},"name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"timeout_in_seconds":{"type":"number","optional":true,"default":3600}},"block_types":{"agent_setting":{"nesting_mode":3,"block":{"attributes":{"cpu":{"type":"number","required":true}}},"optional":true,"conflicts_with":["agent_pool_name"]},"base_image_trigger":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"type":{"type":"string","required":true},"update_trigger_endpoint":{"type":"string","optional":true},"update_trigger_payload_type":{"type":"string","optional":true}}},"optional":true},"docker_step":{"nesting_mode":3,"block":{"attributes":{"arguments":{"type":["map","string"],"optional":true},"cache_enabled":{"type":"bool","optional":true,"default":true},"context_access_token":{"type":"string","required":true},"context_path":{"type":"string","required":true},"dockerfile_path":{"type":"string","required":true},"image_names":{"type":["list","string"],"optional":true},"push_enabled":{"type":"bool","optional":true,"default":true},"secret_arguments":{"type":["map","string"],"optional":true},"target":{"type":"string","optional":true}}},"optional":true,"conflicts_with":["file_step","encoded_step"]},"encoded_step":{"nesting_mode":3,"block":{"attributes":{"context_access_token":{"type":"string","optional":true},"context_path":{"type":"string","optional":true},"secret_values":{"type":["map","string"],"optional":true},"task_content":{"type":"string","required":true},"value_content":{"type":"string","optional":true},"values":{"type":["map","string"],"optional":true}}},"optional":true,"conflicts_with":["docker_step","file_step"]},"file_step":{"nesting_mode":3,"block":{"attributes":{"context_access_token":{"type":"string","optional":true},"context_path":{"type":"string","optional":true},"secret_values":{"type":["map","string"],"optional":true},"task_file_path":{"type":"string","required":true},"value_file_path":{"type":"string","optional":true},"values":{"type":["map","string"],"optional":true}}},"optional":true,"conflicts_with":["docker_step","encoded_step"]},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"platform":{"nesting_mode":3,"block":{"attributes":{"architecture":{"type":"string","optional":true},"os":{"type":"string","required":true},"variant":{"type":"string","optional":true}}},"optional":true},"registry_credential":{"nesting_mode":3,"block":{"block_types":{"custom":{"nesting_mode":4,"block":{"attributes":{"identity":{"type":"string","optional":true},"login_server":{"type":"string","required":true},"password":{"type":"string","optional":true},"username":{"type":"string","optional":true}}},"optional":true,"at_least_one_of":["registry_credential.0.source","registry_credential.0.custom"]},"source":{"nesting_mode":3,"block":{"attributes":{"login_mode":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["registry_credential.0.source","registry_credential.0.custom"]}}},"optional":true},"source_trigger":{"nesting_mode":3,"block":{"attributes":{"branch":{"type":"string","optional":true},"enabled":{"type":"bool","optional":true,"default":true},"events":{"type":["list","string"],"required":true},"name":{"type":"string","required":true},"repository_url":{"type":"string","required":true},"source_type":{"type":"string","required":true}},"block_types":{"authentication":{"nesting_mode":3,"block":{"attributes":{"expire_in_seconds":{"type":"number","optional":true},"refresh_token":{"type":"string","optional":true},"scope":{"type":"string","optional":true},"token":{"type":"string","required":true},"token_type":{"type":"string","required":true}}},"optional":true}}},"optional":true},"timer_trigger":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"schedule":{"type":"string","required":true}}},"optional":true}}}},"azurerm_container_registry_task_schedule_run_now":{"block":{"attributes":{"container_registry_task_id":{"type":"string","required":true}}}},"azurerm_container_registry_token":{"block":{"attributes":{"container_registry_name":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"scope_map_id":{"type":"string","required":true}}}},"azurerm_container_registry_token_password":{"block":{"attributes":{"container_registry_token_id":{"type":"string","required":true}},"block_types":{"password1":{"nesting_mode":3,"block":{"attributes":{"expiry":{"type":"string","optional":true},"value":{"type":"string","computed":true}}},"required":true},"password2":{"nesting_mode":3,"block":{"attributes":{"expiry":{"type":"string","optional":true},"value":{"type":"string","computed":true}}},"optional":true}}}},"azurerm_container_registry_webhook":{"block":{"attributes":{"actions":{"type":["set","string"],"required":true},"custom_headers":{"type":["map","string"],"optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"registry_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"scope":{"type":"string","optional":true,"default":""},"service_uri":{"type":"string","required":true},"status":{"type":"string","optional":true,"default":"enabled"},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_cosmosdb_account":{"block":{"attributes":{"access_key_metadata_writes_enabled":{"type":"bool","optional":true,"default":true},"analytical_storage_enabled":{"type":"bool","optional":true,"default":false},"automatic_failover_enabled":{"type":"bool","optional":true,"default":false},"burst_capacity_enabled":{"type":"bool","optional":true,"default":false},"create_mode":{"type":"string","optional":true,"computed":true},"default_identity_type":{"type":"string","optional":true,"default":"FirstPartyIdentity"},"endpoint":{"type":"string","computed":true},"free_tier_enabled":{"type":"bool","optional":true,"default":false},"ip_range_filter":{"type":["set","string"],"optional":true},"is_virtual_network_filter_enabled":{"type":"bool","optional":true,"default":false},"key_vault_key_id":{"type":"string","optional":true,"conflicts_with":["managed_hsm_key_id"]},"kind":{"type":"string","optional":true,"default":"GlobalDocumentDB"},"local_authentication_disabled":{"type":"bool","optional":true,"default":false},"location":{"type":"string","required":true},"managed_hsm_key_id":{"type":"string","optional":true,"conflicts_with":["key_vault_key_id"]},"minimal_tls_version":{"type":"string","optional":true,"default":"Tls12"},"mongo_server_version":{"type":"string","optional":true,"computed":true},"multiple_write_locations_enabled":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"network_acl_bypass_for_azure_services":{"type":"bool","optional":true,"default":false},"network_acl_bypass_ids":{"type":["list","string"],"optional":true},"offer_type":{"type":"string","required":true},"partition_merge_enabled":{"type":"bool","optional":true,"default":false},"primary_key":{"type":"string","computed":true},"primary_mongodb_connection_string":{"type":"string","computed":true},"primary_readonly_key":{"type":"string","computed":true},"primary_readonly_mongodb_connection_string":{"type":"string","computed":true},"primary_readonly_sql_connection_string":{"type":"string","computed":true},"primary_sql_connection_string":{"type":"string","computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"read_endpoints":{"type":["list","string"],"computed":true},"resource_group_name":{"type":"string","required":true},"secondary_key":{"type":"string","computed":true},"secondary_mongodb_connection_string":{"type":"string","computed":true},"secondary_readonly_key":{"type":"string","computed":true},"secondary_readonly_mongodb_connection_string":{"type":"string","computed":true},"secondary_readonly_sql_connection_string":{"type":"string","computed":true},"secondary_sql_connection_string":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true},"write_endpoints":{"type":["list","string"],"computed":true}},"block_types":{"analytical_storage":{"nesting_mode":3,"block":{"attributes":{"schema_type":{"type":"string","required":true}}},"optional":true,"computed":true},"backup":{"nesting_mode":3,"block":{"attributes":{"interval_in_minutes":{"type":"number","optional":true,"computed":true},"retention_in_hours":{"type":"number","optional":true,"computed":true},"storage_redundancy":{"type":"string","optional":true,"computed":true},"tier":{"type":"string","optional":true,"computed":true},"type":{"type":"string","required":true}}},"optional":true,"computed":true},"capabilities":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true}}},"optional":true,"computed":true},"capacity":{"nesting_mode":3,"block":{"attributes":{"total_throughput_limit":{"type":"number","required":true}}},"optional":true,"computed":true},"consistency_policy":{"nesting_mode":3,"block":{"attributes":{"consistency_level":{"type":"string","required":true},"max_interval_in_seconds":{"type":"number","optional":true,"default":5},"max_staleness_prefix":{"type":"number","optional":true,"default":100}}},"required":true},"cors_rule":{"nesting_mode":3,"block":{"attributes":{"allowed_headers":{"type":["list","string"],"required":true},"allowed_methods":{"type":["list","string"],"required":true},"allowed_origins":{"type":["list","string"],"required":true},"exposed_headers":{"type":["list","string"],"required":true},"max_age_in_seconds":{"type":"number","optional":true}}},"optional":true},"geo_location":{"nesting_mode":4,"block":{"attributes":{"failover_priority":{"type":"number","required":true},"id":{"type":"string","computed":true},"location":{"type":"string","required":true},"zone_redundant":{"type":"bool","optional":true,"default":false}}},"required":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"restore":{"nesting_mode":3,"block":{"attributes":{"restore_timestamp_in_utc":{"type":"string","required":true},"source_cosmosdb_account_id":{"type":"string","required":true},"tables_to_restore":{"type":["list","string"],"optional":true}},"block_types":{"database":{"nesting_mode":4,"block":{"attributes":{"collection_names":{"type":["set","string"],"optional":true},"name":{"type":"string","required":true}}},"optional":true},"gremlin_database":{"nesting_mode":3,"block":{"attributes":{"graph_names":{"type":["list","string"],"optional":true},"name":{"type":"string","required":true}}},"optional":true}}},"optional":true},"virtual_network_rule":{"nesting_mode":4,"block":{"attributes":{"id":{"type":"string","required":true},"ignore_missing_vnet_service_endpoint":{"type":"bool","optional":true,"default":false}}},"optional":true}}}},"azurerm_cosmosdb_cassandra_cluster":{"block":{"attributes":{"authentication_method":{"type":"string","optional":true,"default":"Cassandra"},"client_certificate_pems":{"type":["list","string"],"optional":true},"default_admin_password":{"type":"string","required":true},"delegated_management_subnet_id":{"type":"string","required":true},"external_gossip_certificate_pems":{"type":["list","string"],"optional":true},"external_seed_node_ip_addresses":{"type":["list","string"],"optional":true},"hours_between_backups":{"type":"number","optional":true,"default":24},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"repair_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"version":{"type":"string","optional":true,"default":"3.11"}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_cosmosdb_cassandra_datacenter":{"block":{"attributes":{"availability_zones_enabled":{"type":"bool","optional":true,"default":true},"backup_storage_customer_key_uri":{"type":"string","optional":true},"base64_encoded_yaml_fragment":{"type":"string","optional":true},"cassandra_cluster_id":{"type":"string","required":true},"delegated_management_subnet_id":{"type":"string","required":true},"disk_count":{"type":"number","optional":true},"disk_sku":{"type":"string","optional":true,"default":"P30"},"location":{"type":"string","required":true},"managed_disk_customer_key_uri":{"type":"string","optional":true},"name":{"type":"string","required":true},"node_count":{"type":"number","optional":true,"default":3},"seed_node_ip_addresses":{"type":["list","string"],"computed":true},"sku_name":{"type":"string","optional":true,"default":"Standard_E16s_v5"}}}},"azurerm_cosmosdb_cassandra_keyspace":{"block":{"attributes":{"account_name":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"throughput":{"type":"number","optional":true,"computed":true}},"block_types":{"autoscale_settings":{"nesting_mode":3,"block":{"attributes":{"max_throughput":{"type":"number","optional":true,"computed":true,"conflicts_with":["throughput"]}}},"optional":true}}}},"azurerm_cosmosdb_cassandra_table":{"block":{"attributes":{"analytical_storage_ttl":{"type":"number","optional":true},"cassandra_keyspace_id":{"type":"string","required":true},"default_ttl":{"type":"number","optional":true},"name":{"type":"string","required":true},"throughput":{"type":"number","optional":true,"computed":true}},"block_types":{"autoscale_settings":{"nesting_mode":3,"block":{"attributes":{"max_throughput":{"type":"number","optional":true,"computed":true,"conflicts_with":["throughput"]}}},"optional":true},"schema":{"nesting_mode":3,"block":{"block_types":{"cluster_key":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"order_by":{"type":"string","required":true}}},"optional":true},"column":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"type":{"type":"string","required":true}}},"required":true},"partition_key":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true}}},"required":true}}},"required":true}}}},"azurerm_cosmosdb_gremlin_database":{"block":{"attributes":{"account_name":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"throughput":{"type":"number","optional":true,"computed":true}},"block_types":{"autoscale_settings":{"nesting_mode":3,"block":{"attributes":{"max_throughput":{"type":"number","optional":true,"computed":true,"conflicts_with":["throughput"]}}},"optional":true}}}},"azurerm_cosmosdb_gremlin_graph":{"block":{"attributes":{"account_name":{"type":"string","required":true},"analytical_storage_ttl":{"type":"number","optional":true},"database_name":{"type":"string","required":true},"default_ttl":{"type":"number","optional":true},"name":{"type":"string","required":true},"partition_key_path":{"type":"string","required":true},"partition_key_version":{"type":"number","optional":true},"resource_group_name":{"type":"string","required":true},"throughput":{"type":"number","optional":true,"computed":true}},"block_types":{"autoscale_settings":{"nesting_mode":3,"block":{"attributes":{"max_throughput":{"type":"number","optional":true,"computed":true,"conflicts_with":["throughput"]}}},"optional":true},"conflict_resolution_policy":{"nesting_mode":3,"block":{"attributes":{"conflict_resolution_path":{"type":"string","optional":true},"conflict_resolution_procedure":{"type":"string","optional":true},"mode":{"type":"string","required":true}}},"optional":true,"computed":true},"index_policy":{"nesting_mode":3,"block":{"attributes":{"automatic":{"type":"bool","optional":true,"default":true},"excluded_paths":{"type":["set","string"],"optional":true,"computed":true},"included_paths":{"type":["set","string"],"optional":true,"computed":true},"indexing_mode":{"type":"string","required":true}},"block_types":{"composite_index":{"nesting_mode":3,"block":{"block_types":{"index":{"nesting_mode":3,"block":{"attributes":{"order":{"type":"string","required":true},"path":{"type":"string","required":true}}},"required":true}}},"optional":true},"spatial_index":{"nesting_mode":3,"block":{"attributes":{"path":{"type":"string","required":true},"types":{"type":["set","string"],"computed":true}}},"optional":true}}},"optional":true,"computed":true},"unique_key":{"nesting_mode":4,"block":{"attributes":{"paths":{"type":["set","string"],"required":true}}},"optional":true}}}},"azurerm_cosmosdb_mongo_collection":{"block":{"attributes":{"account_name":{"type":"string","required":true},"analytical_storage_ttl":{"type":"number","optional":true},"database_name":{"type":"string","required":true},"default_ttl_seconds":{"type":"number","optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"shard_key":{"type":"string","optional":true},"system_indexes":{"type":["list",["object",{"keys":["list","string"],"unique":"bool"}]],"computed":true},"throughput":{"type":"number","optional":true,"computed":true}},"block_types":{"autoscale_settings":{"nesting_mode":3,"block":{"attributes":{"max_throughput":{"type":"number","optional":true,"computed":true,"conflicts_with":["throughput"]}}},"optional":true},"index":{"nesting_mode":4,"block":{"attributes":{"keys":{"type":["list","string"],"required":true},"unique":{"type":"bool","optional":true,"default":false}}},"optional":true}}}},"azurerm_cosmosdb_mongo_database":{"block":{"attributes":{"account_name":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"throughput":{"type":"number","optional":true,"computed":true}},"block_types":{"autoscale_settings":{"nesting_mode":3,"block":{"attributes":{"max_throughput":{"type":"number","optional":true,"computed":true,"conflicts_with":["throughput"]}}},"optional":true}}}},"azurerm_cosmosdb_mongo_role_definition":{"block":{"attributes":{"cosmos_mongo_database_id":{"type":"string","required":true},"inherited_role_names":{"type":["list","string"],"optional":true},"role_name":{"type":"string","required":true}},"block_types":{"privilege":{"nesting_mode":3,"block":{"attributes":{"actions":{"type":["list","string"],"required":true}},"block_types":{"resource":{"nesting_mode":3,"block":{"attributes":{"collection_name":{"type":"string","optional":true},"db_name":{"type":"string","optional":true}}},"required":true}}},"optional":true}}}},"azurerm_cosmosdb_mongo_user_definition":{"block":{"attributes":{"cosmos_mongo_database_id":{"type":"string","required":true},"inherited_role_names":{"type":["list","string"],"optional":true},"password":{"type":"string","required":true},"username":{"type":"string","required":true}}}},"azurerm_cosmosdb_postgresql_cluster":{"block":{"attributes":{"administrator_login_password":{"type":"string","optional":true},"citus_version":{"type":"string","optional":true,"computed":true},"coordinator_public_ip_access_enabled":{"type":"bool","optional":true,"default":true},"coordinator_server_edition":{"type":"string","optional":true,"default":"GeneralPurpose"},"coordinator_storage_quota_in_mb":{"type":"number","optional":true},"coordinator_vcore_count":{"type":"number","optional":true},"earliest_restore_time":{"type":"string","computed":true},"ha_enabled":{"type":"bool","optional":true,"default":false},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"node_count":{"type":"number","required":true},"node_public_ip_access_enabled":{"type":"bool","optional":true,"default":false},"node_server_edition":{"type":"string","optional":true,"default":"MemoryOptimized"},"node_storage_quota_in_mb":{"type":"number","optional":true,"computed":true},"node_vcores":{"type":"number","optional":true,"computed":true},"point_in_time_in_utc":{"type":"string","optional":true,"required_with":["source_location","source_resource_id"]},"preferred_primary_zone":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"servers":{"type":["list",["object",{"fqdn":"string","name":"string"}]],"computed":true},"shards_on_coordinator_enabled":{"type":"bool","optional":true,"computed":true},"source_location":{"type":"string","optional":true,"required_with":["source_resource_id"]},"source_resource_id":{"type":"string","optional":true,"required_with":["source_location"]},"sql_version":{"type":"string","optional":true,"computed":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"maintenance_window":{"nesting_mode":3,"block":{"attributes":{"day_of_week":{"type":"number","optional":true,"default":0},"start_hour":{"type":"number","optional":true,"default":0},"start_minute":{"type":"number","optional":true,"default":0}}},"optional":true}}}},"azurerm_cosmosdb_postgresql_coordinator_configuration":{"block":{"attributes":{"cluster_id":{"type":"string","required":true},"name":{"type":"string","required":true},"value":{"type":"string","required":true}}}},"azurerm_cosmosdb_postgresql_firewall_rule":{"block":{"attributes":{"cluster_id":{"type":"string","required":true},"end_ip_address":{"type":"string","required":true},"name":{"type":"string","required":true},"start_ip_address":{"type":"string","required":true}}}},"azurerm_cosmosdb_postgresql_node_configuration":{"block":{"attributes":{"cluster_id":{"type":"string","required":true},"name":{"type":"string","required":true},"value":{"type":"string","required":true}}}},"azurerm_cosmosdb_postgresql_role":{"block":{"attributes":{"cluster_id":{"type":"string","required":true},"name":{"type":"string","required":true},"password":{"type":"string","required":true}}}},"azurerm_cosmosdb_sql_container":{"block":{"attributes":{"account_name":{"type":"string","required":true},"analytical_storage_ttl":{"type":"number","optional":true},"database_name":{"type":"string","required":true},"default_ttl":{"type":"number","optional":true},"name":{"type":"string","required":true},"partition_key_kind":{"type":"string","optional":true,"default":"Hash"},"partition_key_paths":{"type":["list","string"],"required":true},"partition_key_version":{"type":"number","optional":true},"resource_group_name":{"type":"string","required":true},"throughput":{"type":"number","optional":true,"computed":true}},"block_types":{"autoscale_settings":{"nesting_mode":3,"block":{"attributes":{"max_throughput":{"type":"number","optional":true,"computed":true,"conflicts_with":["throughput"]}}},"optional":true},"conflict_resolution_policy":{"nesting_mode":3,"block":{"attributes":{"conflict_resolution_path":{"type":"string","optional":true},"conflict_resolution_procedure":{"type":"string","optional":true},"mode":{"type":"string","required":true}}},"optional":true,"computed":true},"indexing_policy":{"nesting_mode":3,"block":{"attributes":{"indexing_mode":{"type":"string","optional":true,"default":"consistent"}},"block_types":{"composite_index":{"nesting_mode":3,"block":{"block_types":{"index":{"nesting_mode":3,"block":{"attributes":{"order":{"type":"string","required":true},"path":{"type":"string","required":true}}},"required":true}}},"optional":true},"excluded_path":{"nesting_mode":3,"block":{"attributes":{"path":{"type":"string","required":true}}},"optional":true},"included_path":{"nesting_mode":3,"block":{"attributes":{"path":{"type":"string","required":true}}},"optional":true},"spatial_index":{"nesting_mode":3,"block":{"attributes":{"path":{"type":"string","required":true},"types":{"type":["set","string"],"computed":true}}},"optional":true}}},"optional":true,"computed":true},"unique_key":{"nesting_mode":4,"block":{"attributes":{"paths":{"type":["set","string"],"required":true}}},"optional":true}}}},"azurerm_cosmosdb_sql_database":{"block":{"attributes":{"account_name":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"throughput":{"type":"number","optional":true,"computed":true}},"block_types":{"autoscale_settings":{"nesting_mode":3,"block":{"attributes":{"max_throughput":{"type":"number","optional":true,"computed":true,"conflicts_with":["throughput"]}}},"optional":true}}}},"azurerm_cosmosdb_sql_dedicated_gateway":{"block":{"attributes":{"cosmosdb_account_id":{"type":"string","required":true},"instance_count":{"type":"number","required":true},"instance_size":{"type":"string","required":true}}}},"azurerm_cosmosdb_sql_function":{"block":{"attributes":{"body":{"type":"string","required":true},"container_id":{"type":"string","required":true},"name":{"type":"string","required":true}}}},"azurerm_cosmosdb_sql_role_assignment":{"block":{"attributes":{"account_name":{"type":"string","required":true},"name":{"type":"string","optional":true,"computed":true},"principal_id":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"role_definition_id":{"type":"string","required":true},"scope":{"type":"string","required":true}}}},"azurerm_cosmosdb_sql_role_definition":{"block":{"attributes":{"account_name":{"type":"string","required":true},"assignable_scopes":{"type":["set","string"],"required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"role_definition_id":{"type":"string","optional":true,"computed":true},"type":{"type":"string","optional":true,"default":"CustomRole"}},"block_types":{"permissions":{"nesting_mode":4,"block":{"attributes":{"data_actions":{"type":["set","string"],"required":true}}},"required":true}}}},"azurerm_cosmosdb_sql_stored_procedure":{"block":{"attributes":{"account_name":{"type":"string","required":true},"body":{"type":"string","required":true},"container_name":{"type":"string","required":true},"database_name":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_cosmosdb_sql_trigger":{"block":{"attributes":{"body":{"type":"string","required":true},"container_id":{"type":"string","required":true},"name":{"type":"string","required":true},"operation":{"type":"string","required":true},"type":{"type":"string","required":true}}}},"azurerm_cosmosdb_table":{"block":{"attributes":{"account_name":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"throughput":{"type":"number","optional":true,"computed":true}},"block_types":{"autoscale_settings":{"nesting_mode":3,"block":{"attributes":{"max_throughput":{"type":"number","optional":true,"computed":true,"conflicts_with":["throughput"]}}},"optional":true}}}},"azurerm_cost_anomaly_alert":{"block":{"attributes":{"display_name":{"type":"string","required":true},"email_addresses":{"type":["set","string"],"required":true},"email_subject":{"type":"string","required":true},"message":{"type":"string","optional":true},"name":{"type":"string","required":true},"notification_email":{"type":"string","optional":true,"computed":true},"subscription_id":{"type":"string","optional":true,"computed":true}}}},"azurerm_cost_management_scheduled_action":{"block":{"attributes":{"day_of_month":{"type":"number","optional":true},"days_of_week":{"type":["list","string"],"optional":true},"display_name":{"type":"string","required":true},"email_address_sender":{"type":"string","required":true},"email_addresses":{"type":["list","string"],"required":true},"email_subject":{"type":"string","required":true},"end_date":{"type":"string","required":true},"frequency":{"type":"string","required":true},"hour_of_day":{"type":"number","optional":true},"message":{"type":"string","optional":true},"name":{"type":"string","required":true},"start_date":{"type":"string","required":true},"view_id":{"type":"string","required":true},"weeks_of_month":{"type":["list","string"],"optional":true}}}},"azurerm_custom_ip_prefix":{"block":{"attributes":{"cidr":{"type":"string","required":true},"commissioning_enabled":{"type":"bool","optional":true,"default":false},"internet_advertising_disabled":{"type":"bool","optional":true,"default":false},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"parent_custom_ip_prefix_id":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"roa_validity_end_date":{"type":"string","optional":true},"tags":{"type":["map","string"],"optional":true},"wan_validation_signed_message":{"type":"string","optional":true},"zones":{"type":["set","string"],"optional":true}}}},"azurerm_custom_provider":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"action":{"nesting_mode":4,"block":{"attributes":{"endpoint":{"type":"string","required":true},"name":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["resource_type","action"]},"resource_type":{"nesting_mode":4,"block":{"attributes":{"endpoint":{"type":"string","required":true},"name":{"type":"string","required":true},"routing_type":{"type":"string","optional":true,"default":"Proxy"}}},"optional":true,"at_least_one_of":["resource_type","action"]},"validation":{"nesting_mode":4,"block":{"attributes":{"specification":{"type":"string","required":true}}},"optional":true}}}},"azurerm_dashboard_grafana":{"block":{"attributes":{"api_key_enabled":{"type":"bool","optional":true,"default":false},"auto_generated_domain_name_label_scope":{"type":"string","optional":true,"default":"TenantReuse"},"deterministic_outbound_ip_enabled":{"type":"bool","optional":true,"default":false},"endpoint":{"type":"string","computed":true},"grafana_major_version":{"type":"string","required":true},"grafana_version":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"outbound_ip":{"type":["list","string"],"computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"sku":{"type":"string","optional":true,"default":"Standard"},"tags":{"type":["map","string"],"optional":true},"zone_redundancy_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"azure_monitor_workspace_integrations":{"nesting_mode":3,"block":{"attributes":{"resource_id":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"smtp":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":false},"from_address":{"type":"string","required":true},"from_name":{"type":"string","optional":true,"default":"Azure Managed Grafana Notification"},"host":{"type":"string","required":true},"password":{"type":"string","required":true},"start_tls_policy":{"type":"string","required":true},"user":{"type":"string","required":true},"verification_skip_enabled":{"type":"bool","optional":true,"default":false}}},"optional":true}}}},"azurerm_dashboard_grafana_managed_private_endpoint":{"block":{"attributes":{"grafana_id":{"type":"string","required":true},"group_ids":{"type":["list","string"],"optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"private_link_resource_id":{"type":"string","required":true},"private_link_resource_region":{"type":"string","optional":true},"request_message":{"type":"string","optional":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_data_factory":{"block":{"attributes":{"customer_managed_key_id":{"type":"string","optional":true},"customer_managed_key_identity_id":{"type":"string","optional":true,"required_with":["customer_managed_key_id"]},"location":{"type":"string","required":true},"managed_virtual_network_enabled":{"type":"bool","optional":true},"name":{"type":"string","required":true},"public_network_enabled":{"type":"bool","optional":true,"default":true},"purview_id":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"github_configuration":{"nesting_mode":3,"block":{"attributes":{"account_name":{"type":"string","required":true},"branch_name":{"type":"string","required":true},"git_url":{"type":"string","optional":true},"publishing_enabled":{"type":"bool","optional":true,"default":true},"repository_name":{"type":"string","required":true},"root_folder":{"type":"string","required":true}}},"optional":true,"conflicts_with":["vsts_configuration"]},"global_parameter":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"type":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"vsts_configuration":{"nesting_mode":3,"block":{"attributes":{"account_name":{"type":"string","required":true},"branch_name":{"type":"string","required":true},"project_name":{"type":"string","required":true},"publishing_enabled":{"type":"bool","optional":true,"default":true},"repository_name":{"type":"string","required":true},"root_folder":{"type":"string","required":true},"tenant_id":{"type":"string","required":true}}},"optional":true,"conflicts_with":["github_configuration"]}}}},"azurerm_data_factory_credential_service_principal":{"block":{"attributes":{"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"service_principal_id":{"type":"string","required":true},"tenant_id":{"type":"string","required":true}},"block_types":{"service_principal_key":{"nesting_mode":3,"block":{"attributes":{"linked_service_name":{"type":"string","required":true},"secret_name":{"type":"string","required":true},"secret_version":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_data_factory_credential_user_managed_identity":{"block":{"attributes":{"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"identity_id":{"type":"string","required":true},"name":{"type":"string","required":true}}}},"azurerm_data_factory_custom_dataset":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"folder":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"schema_json":{"type":"string","optional":true},"type":{"type":"string","required":true},"type_properties_json":{"type":"string","required":true}},"block_types":{"linked_service":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"required":true}}}},"azurerm_data_factory_data_flow":{"block":{"attributes":{"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"folder":{"type":"string","optional":true},"name":{"type":"string","required":true},"script":{"type":"string","optional":true,"at_least_one_of":["script","script_lines"]},"script_lines":{"type":["list","string"],"optional":true,"at_least_one_of":["script","script_lines"]}},"block_types":{"sink":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"name":{"type":"string","required":true}},"block_types":{"dataset":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true},"flowlet":{"nesting_mode":3,"block":{"attributes":{"dataset_parameters":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true},"linked_service":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true},"rejected_linked_service":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true},"schema_linked_service":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true}}},"required":true},"source":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"name":{"type":"string","required":true}},"block_types":{"dataset":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true},"flowlet":{"nesting_mode":3,"block":{"attributes":{"dataset_parameters":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true},"linked_service":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true},"rejected_linked_service":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true},"schema_linked_service":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true}}},"required":true},"transformation":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"name":{"type":"string","required":true}},"block_types":{"dataset":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true},"flowlet":{"nesting_mode":3,"block":{"attributes":{"dataset_parameters":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true},"linked_service":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true}}},"optional":true}}}},"azurerm_data_factory_dataset_azure_blob":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"dynamic_filename_enabled":{"type":"bool","optional":true,"default":false},"dynamic_path_enabled":{"type":"bool","optional":true,"default":false},"filename":{"type":"string","optional":true},"folder":{"type":"string","optional":true},"linked_service_name":{"type":"string","required":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"path":{"type":"string","optional":true}},"block_types":{"schema_column":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"type":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_data_factory_dataset_azure_sql_table":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"folder":{"type":"string","optional":true},"linked_service_id":{"type":"string","required":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"schema":{"type":"string","optional":true},"table":{"type":"string","optional":true}},"block_types":{"schema_column":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"type":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_data_factory_dataset_binary":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"folder":{"type":"string","optional":true},"linked_service_name":{"type":"string","required":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}},"block_types":{"azure_blob_storage_location":{"nesting_mode":3,"block":{"attributes":{"container":{"type":"string","required":true},"dynamic_container_enabled":{"type":"bool","optional":true,"default":false},"dynamic_filename_enabled":{"type":"bool","optional":true,"default":false},"dynamic_path_enabled":{"type":"bool","optional":true,"default":false},"filename":{"type":"string","optional":true},"path":{"type":"string","optional":true}}},"optional":true,"conflicts_with":["http_server_location","sftp_server_location"]},"compression":{"nesting_mode":3,"block":{"attributes":{"level":{"type":"string","optional":true},"type":{"type":"string","required":true}}},"optional":true},"http_server_location":{"nesting_mode":3,"block":{"attributes":{"dynamic_filename_enabled":{"type":"bool","optional":true,"default":false},"dynamic_path_enabled":{"type":"bool","optional":true,"default":false},"filename":{"type":"string","required":true},"path":{"type":"string","required":true},"relative_url":{"type":"string","required":true}}},"optional":true,"conflicts_with":["azure_blob_storage_location","sftp_server_location"]},"sftp_server_location":{"nesting_mode":3,"block":{"attributes":{"dynamic_filename_enabled":{"type":"bool","optional":true,"default":false},"dynamic_path_enabled":{"type":"bool","optional":true,"default":false},"filename":{"type":"string","required":true},"path":{"type":"string","required":true}}},"optional":true,"conflicts_with":["azure_blob_storage_location","http_server_location"]}}}},"azurerm_data_factory_dataset_cosmosdb_sqlapi":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"collection_name":{"type":"string","optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"folder":{"type":"string","optional":true},"linked_service_name":{"type":"string","required":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}},"block_types":{"schema_column":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"type":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_data_factory_dataset_delimited_text":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"column_delimiter":{"type":"string","optional":true,"default":","},"compression_codec":{"type":"string","optional":true},"compression_level":{"type":"string","optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"encoding":{"type":"string","optional":true},"escape_character":{"type":"string","optional":true,"default":"\\"},"first_row_as_header":{"type":"bool","optional":true,"default":false},"folder":{"type":"string","optional":true},"linked_service_name":{"type":"string","required":true},"name":{"type":"string","required":true},"null_value":{"type":"string","optional":true,"default":""},"parameters":{"type":["map","string"],"optional":true},"quote_character":{"type":"string","optional":true,"default":"\""},"row_delimiter":{"type":"string","optional":true}},"block_types":{"azure_blob_fs_location":{"nesting_mode":3,"block":{"attributes":{"dynamic_file_system_enabled":{"type":"bool","optional":true,"default":false},"dynamic_filename_enabled":{"type":"bool","optional":true,"default":false},"dynamic_path_enabled":{"type":"bool","optional":true,"default":false},"file_system":{"type":"string","optional":true},"filename":{"type":"string","optional":true},"path":{"type":"string","optional":true}}},"optional":true,"exactly_one_of":["http_server_location","azure_blob_storage_location","azure_blob_fs_location"]},"azure_blob_storage_location":{"nesting_mode":3,"block":{"attributes":{"container":{"type":"string","required":true},"dynamic_container_enabled":{"type":"bool","optional":true,"default":false},"dynamic_filename_enabled":{"type":"bool","optional":true,"default":false},"dynamic_path_enabled":{"type":"bool","optional":true,"default":false},"filename":{"type":"string","optional":true},"path":{"type":"string","optional":true}}},"optional":true,"exactly_one_of":["http_server_location","azure_blob_storage_location","azure_blob_fs_location"]},"http_server_location":{"nesting_mode":3,"block":{"attributes":{"dynamic_filename_enabled":{"type":"bool","optional":true,"default":false},"dynamic_path_enabled":{"type":"bool","optional":true,"default":false},"filename":{"type":"string","required":true},"path":{"type":"string","required":true},"relative_url":{"type":"string","required":true}}},"optional":true,"exactly_one_of":["http_server_location","azure_blob_storage_location","azure_blob_fs_location"]},"schema_column":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"type":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_data_factory_dataset_http":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"folder":{"type":"string","optional":true},"linked_service_name":{"type":"string","required":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"relative_url":{"type":"string","optional":true},"request_body":{"type":"string","optional":true},"request_method":{"type":"string","optional":true}},"block_types":{"schema_column":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"type":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_data_factory_dataset_json":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"encoding":{"type":"string","optional":true},"folder":{"type":"string","optional":true},"linked_service_name":{"type":"string","required":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}},"block_types":{"azure_blob_storage_location":{"nesting_mode":3,"block":{"attributes":{"container":{"type":"string","required":true},"dynamic_container_enabled":{"type":"bool","optional":true,"default":false},"dynamic_filename_enabled":{"type":"bool","optional":true,"default":false},"dynamic_path_enabled":{"type":"bool","optional":true,"default":false},"filename":{"type":"string","required":true},"path":{"type":"string","required":true}}},"optional":true,"conflicts_with":["http_server_location"]},"http_server_location":{"nesting_mode":3,"block":{"attributes":{"dynamic_filename_enabled":{"type":"bool","optional":true,"default":false},"dynamic_path_enabled":{"type":"bool","optional":true,"default":false},"filename":{"type":"string","required":true},"path":{"type":"string","required":true},"relative_url":{"type":"string","required":true}}},"optional":true,"conflicts_with":["azure_blob_storage_location"]},"schema_column":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"type":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_data_factory_dataset_mysql":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"folder":{"type":"string","optional":true},"linked_service_name":{"type":"string","required":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"table_name":{"type":"string","optional":true}},"block_types":{"schema_column":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"type":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_data_factory_dataset_parquet":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"compression_codec":{"type":"string","optional":true},"compression_level":{"type":"string","optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"folder":{"type":"string","optional":true},"linked_service_name":{"type":"string","required":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}},"block_types":{"azure_blob_fs_location":{"nesting_mode":3,"block":{"attributes":{"dynamic_file_system_enabled":{"type":"bool","optional":true,"default":false},"dynamic_filename_enabled":{"type":"bool","optional":true,"default":false},"dynamic_path_enabled":{"type":"bool","optional":true,"default":false},"file_system":{"type":"string","optional":true},"filename":{"type":"string","optional":true},"path":{"type":"string","optional":true}}},"optional":true,"exactly_one_of":["azure_blob_fs_location","azure_blob_storage_location","http_server_location"]},"azure_blob_storage_location":{"nesting_mode":3,"block":{"attributes":{"container":{"type":"string","required":true},"dynamic_container_enabled":{"type":"bool","optional":true,"default":false},"dynamic_filename_enabled":{"type":"bool","optional":true,"default":false},"dynamic_path_enabled":{"type":"bool","optional":true,"default":false},"filename":{"type":"string","optional":true},"path":{"type":"string","optional":true}}},"optional":true,"exactly_one_of":["azure_blob_fs_location","azure_blob_storage_location","http_server_location"]},"http_server_location":{"nesting_mode":3,"block":{"attributes":{"dynamic_filename_enabled":{"type":"bool","optional":true,"default":false},"dynamic_path_enabled":{"type":"bool","optional":true,"default":false},"filename":{"type":"string","required":true},"path":{"type":"string","optional":true},"relative_url":{"type":"string","required":true}}},"optional":true,"exactly_one_of":["azure_blob_fs_location","azure_blob_storage_location","http_server_location"]},"schema_column":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"type":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_data_factory_dataset_postgresql":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"folder":{"type":"string","optional":true},"linked_service_name":{"type":"string","required":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"table_name":{"type":"string","optional":true}},"block_types":{"schema_column":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"type":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_data_factory_dataset_snowflake":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"folder":{"type":"string","optional":true},"linked_service_name":{"type":"string","required":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"schema_name":{"type":"string","optional":true},"table_name":{"type":"string","optional":true}},"block_types":{"schema_column":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"precision":{"type":"number","optional":true},"scale":{"type":"number","optional":true},"type":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_data_factory_dataset_sql_server_table":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"folder":{"type":"string","optional":true},"linked_service_name":{"type":"string","required":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"table_name":{"type":"string","optional":true}},"block_types":{"schema_column":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"type":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_data_factory_flowlet_data_flow":{"block":{"attributes":{"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"folder":{"type":"string","optional":true},"name":{"type":"string","required":true},"script":{"type":"string","optional":true,"at_least_one_of":["script","script_lines"]},"script_lines":{"type":["list","string"],"optional":true,"at_least_one_of":["script","script_lines"]}},"block_types":{"sink":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"name":{"type":"string","required":true}},"block_types":{"dataset":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true},"flowlet":{"nesting_mode":3,"block":{"attributes":{"dataset_parameters":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true},"linked_service":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true},"rejected_linked_service":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true},"schema_linked_service":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true}}},"optional":true},"source":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"name":{"type":"string","required":true}},"block_types":{"dataset":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true},"flowlet":{"nesting_mode":3,"block":{"attributes":{"dataset_parameters":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true},"linked_service":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true},"rejected_linked_service":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true},"schema_linked_service":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true}}},"optional":true},"transformation":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"name":{"type":"string","required":true}},"block_types":{"dataset":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true},"flowlet":{"nesting_mode":3,"block":{"attributes":{"dataset_parameters":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true},"linked_service":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true}}},"optional":true}}}},"azurerm_data_factory_integration_runtime_azure":{"block":{"attributes":{"cleanup_enabled":{"type":"bool","optional":true,"default":true},"compute_type":{"type":"string","optional":true,"default":"General"},"core_count":{"type":"number","optional":true,"default":8},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"time_to_live_min":{"type":"number","optional":true,"default":0},"virtual_network_enabled":{"type":"bool","optional":true}}}},"azurerm_data_factory_integration_runtime_azure_ssis":{"block":{"attributes":{"credential_name":{"type":"string","optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"edition":{"type":"string","optional":true,"default":"Standard"},"license_type":{"type":"string","optional":true,"default":"LicenseIncluded"},"location":{"type":"string","required":true},"max_parallel_executions_per_node":{"type":"number","optional":true,"default":1},"name":{"type":"string","required":true},"node_size":{"type":"string","required":true},"number_of_nodes":{"type":"number","optional":true,"default":1}},"block_types":{"catalog_info":{"nesting_mode":3,"block":{"attributes":{"administrator_login":{"type":"string","optional":true},"administrator_password":{"type":"string","optional":true},"dual_standby_pair_name":{"type":"string","optional":true},"elastic_pool_name":{"type":"string","optional":true,"conflicts_with":["catalog_info.0.pricing_tier"]},"pricing_tier":{"type":"string","optional":true,"conflicts_with":["catalog_info.0.elastic_pool_name"]},"server_endpoint":{"type":"string","required":true}}},"optional":true},"copy_compute_scale":{"nesting_mode":3,"block":{"attributes":{"data_integration_unit":{"type":"number","optional":true},"time_to_live":{"type":"number","optional":true}}},"optional":true},"custom_setup_script":{"nesting_mode":3,"block":{"attributes":{"blob_container_uri":{"type":"string","required":true},"sas_token":{"type":"string","required":true}}},"optional":true},"express_custom_setup":{"nesting_mode":3,"block":{"attributes":{"environment":{"type":["map","string"],"optional":true,"at_least_one_of":["express_custom_setup.0.environment","express_custom_setup.0.powershell_version","express_custom_setup.0.component","express_custom_setup.0.command_key"]},"powershell_version":{"type":"string","optional":true,"at_least_one_of":["express_custom_setup.0.environment","express_custom_setup.0.powershell_version","express_custom_setup.0.component","express_custom_setup.0.command_key"]}},"block_types":{"command_key":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","optional":true},"target_name":{"type":"string","required":true},"user_name":{"type":"string","required":true}},"block_types":{"key_vault_password":{"nesting_mode":3,"block":{"attributes":{"linked_service_name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"secret_name":{"type":"string","required":true},"secret_version":{"type":"string","optional":true}}},"optional":true}}},"optional":true,"at_least_one_of":["express_custom_setup.0.environment","express_custom_setup.0.powershell_version","express_custom_setup.0.component","express_custom_setup.0.command_key"]},"component":{"nesting_mode":3,"block":{"attributes":{"license":{"type":"string","optional":true},"name":{"type":"string","required":true}},"block_types":{"key_vault_license":{"nesting_mode":3,"block":{"attributes":{"linked_service_name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"secret_name":{"type":"string","required":true},"secret_version":{"type":"string","optional":true}}},"optional":true}}},"optional":true,"at_least_one_of":["express_custom_setup.0.environment","express_custom_setup.0.powershell_version","express_custom_setup.0.component","express_custom_setup.0.command_key"]}}},"optional":true},"express_vnet_integration":{"nesting_mode":3,"block":{"attributes":{"subnet_id":{"type":"string","required":true}}},"optional":true},"package_store":{"nesting_mode":3,"block":{"attributes":{"linked_service_name":{"type":"string","required":true},"name":{"type":"string","required":true}}},"optional":true},"pipeline_external_compute_scale":{"nesting_mode":3,"block":{"attributes":{"number_of_external_nodes":{"type":"number","optional":true},"number_of_pipeline_nodes":{"type":"number","optional":true},"time_to_live":{"type":"number","optional":true}}},"optional":true},"proxy":{"nesting_mode":3,"block":{"attributes":{"path":{"type":"string","optional":true},"self_hosted_integration_runtime_name":{"type":"string","required":true},"staging_storage_linked_service_name":{"type":"string","required":true}}},"optional":true},"vnet_integration":{"nesting_mode":3,"block":{"attributes":{"public_ips":{"type":["list","string"],"optional":true},"subnet_id":{"type":"string","optional":true,"exactly_one_of":["vnet_integration.0.vnet_id","vnet_integration.0.subnet_id"]},"subnet_name":{"type":"string","optional":true,"required_with":["vnet_integration.0.vnet_id"]},"vnet_id":{"type":"string","optional":true,"exactly_one_of":["vnet_integration.0.vnet_id","vnet_integration.0.subnet_id"]}}},"optional":true}}}},"azurerm_data_factory_integration_runtime_self_hosted":{"block":{"attributes":{"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"primary_authorization_key":{"type":"string","computed":true},"secondary_authorization_key":{"type":"string","computed":true},"self_contained_interactive_authoring_enabled":{"type":"bool","optional":true}},"block_types":{"rbac_authorization":{"nesting_mode":4,"block":{"attributes":{"resource_id":{"type":"string","required":true}}},"optional":true}}}},"azurerm_data_factory_linked_custom_service":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"type":{"type":"string","required":true},"type_properties_json":{"type":"string","required":true}},"block_types":{"integration_runtime":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true}}}},"azurerm_data_factory_linked_service_azure_blob_storage":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"connection_string":{"type":"string","optional":true,"exactly_one_of":["connection_string","connection_string_insecure","sas_uri","service_endpoint"]},"connection_string_insecure":{"type":"string","optional":true,"exactly_one_of":["connection_string","connection_string_insecure","sas_uri","service_endpoint"]},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"integration_runtime_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"sas_uri":{"type":"string","optional":true,"exactly_one_of":["connection_string","connection_string_insecure","sas_uri","service_endpoint"]},"service_endpoint":{"type":"string","optional":true,"exactly_one_of":["connection_string","connection_string_insecure","sas_uri","service_endpoint"]},"service_principal_id":{"type":"string","optional":true,"conflicts_with":["use_managed_identity"]},"service_principal_key":{"type":"string","optional":true},"storage_kind":{"type":"string","optional":true},"tenant_id":{"type":"string","optional":true},"use_managed_identity":{"type":"bool","optional":true,"default":false,"conflicts_with":["service_principal_id"]}},"block_types":{"key_vault_sas_token":{"nesting_mode":3,"block":{"attributes":{"linked_service_name":{"type":"string","required":true},"secret_name":{"type":"string","required":true}}},"optional":true},"service_principal_linked_key_vault_key":{"nesting_mode":3,"block":{"attributes":{"linked_service_name":{"type":"string","required":true},"secret_name":{"type":"string","required":true}}},"optional":true}}}},"azurerm_data_factory_linked_service_azure_databricks":{"block":{"attributes":{"access_token":{"type":"string","optional":true,"exactly_one_of":["access_token","msi_work_space_resource_id","key_vault_password"]},"adb_domain":{"type":"string","required":true},"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"existing_cluster_id":{"type":"string","optional":true,"exactly_one_of":["existing_cluster_id","new_cluster_config","instance_pool"]},"integration_runtime_name":{"type":"string","optional":true},"msi_work_space_resource_id":{"type":"string","optional":true,"exactly_one_of":["access_token","msi_work_space_resource_id","key_vault_password"]},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}},"block_types":{"instance_pool":{"nesting_mode":3,"block":{"attributes":{"cluster_version":{"type":"string","required":true},"instance_pool_id":{"type":"string","required":true},"max_number_of_workers":{"type":"number","optional":true},"min_number_of_workers":{"type":"number","optional":true,"default":1}}},"optional":true,"exactly_one_of":["existing_cluster_id","new_cluster_config","instance_pool"]},"key_vault_password":{"nesting_mode":3,"block":{"attributes":{"linked_service_name":{"type":"string","required":true},"secret_name":{"type":"string","required":true}}},"optional":true,"exactly_one_of":["access_token","msi_work_space_resource_id","key_vault_password"]},"new_cluster_config":{"nesting_mode":3,"block":{"attributes":{"cluster_version":{"type":"string","required":true},"custom_tags":{"type":["map","string"],"optional":true},"driver_node_type":{"type":"string","optional":true},"init_scripts":{"type":["list","string"],"optional":true},"log_destination":{"type":"string","optional":true},"max_number_of_workers":{"type":"number","optional":true},"min_number_of_workers":{"type":"number","optional":true,"default":"1"},"node_type":{"type":"string","required":true},"spark_config":{"type":["map","string"],"optional":true},"spark_environment_variables":{"type":["map","string"],"optional":true}}},"optional":true,"exactly_one_of":["existing_cluster_id","new_cluster_config","instance_pool"]}}}},"azurerm_data_factory_linked_service_azure_file_storage":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"connection_string":{"type":"string","required":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"file_share":{"type":"string","optional":true},"host":{"type":"string","optional":true},"integration_runtime_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"password":{"type":"string","optional":true},"user_id":{"type":"string","optional":true}},"block_types":{"key_vault_password":{"nesting_mode":3,"block":{"attributes":{"linked_service_name":{"type":"string","required":true},"secret_name":{"type":"string","required":true}}},"optional":true}}}},"azurerm_data_factory_linked_service_azure_function":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"integration_runtime_name":{"type":"string","optional":true},"key":{"type":"string","optional":true,"exactly_one_of":["key","key_vault_key"]},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"url":{"type":"string","required":true}},"block_types":{"key_vault_key":{"nesting_mode":3,"block":{"attributes":{"linked_service_name":{"type":"string","required":true},"secret_name":{"type":"string","required":true}}},"optional":true,"exactly_one_of":["key","key_vault_key"]}}}},"azurerm_data_factory_linked_service_azure_search":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"encrypted_credential":{"type":"string","computed":true},"integration_runtime_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"search_service_key":{"type":"string","required":true},"url":{"type":"string","required":true}}}},"azurerm_data_factory_linked_service_azure_sql_database":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"connection_string":{"type":"string","optional":true,"exactly_one_of":["connection_string","key_vault_connection_string"]},"credential_name":{"type":"string","optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"integration_runtime_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"service_principal_id":{"type":"string","optional":true,"conflicts_with":["use_managed_identity"],"required_with":["service_principal_key"]},"service_principal_key":{"type":"string","optional":true,"required_with":["service_principal_id"]},"tenant_id":{"type":"string","optional":true},"use_managed_identity":{"type":"bool","optional":true,"default":false,"conflicts_with":["service_principal_id"]}},"block_types":{"key_vault_connection_string":{"nesting_mode":3,"block":{"attributes":{"linked_service_name":{"type":"string","required":true},"secret_name":{"type":"string","required":true}}},"optional":true,"exactly_one_of":["connection_string","key_vault_connection_string"]},"key_vault_password":{"nesting_mode":3,"block":{"attributes":{"linked_service_name":{"type":"string","required":true},"secret_name":{"type":"string","required":true}}},"optional":true}}}},"azurerm_data_factory_linked_service_azure_table_storage":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"connection_string":{"type":"string","required":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"integration_runtime_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}}},"azurerm_data_factory_linked_service_cosmosdb":{"block":{"attributes":{"account_endpoint":{"type":"string","optional":true,"conflicts_with":["connection_string"]},"account_key":{"type":"string","optional":true,"conflicts_with":["connection_string"]},"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"connection_string":{"type":"string","optional":true,"conflicts_with":["account_endpoint","account_key"]},"data_factory_id":{"type":"string","required":true},"database":{"type":"string","optional":true},"description":{"type":"string","optional":true},"integration_runtime_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}}},"azurerm_data_factory_linked_service_cosmosdb_mongoapi":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"connection_string":{"type":"string","optional":true},"data_factory_id":{"type":"string","required":true},"database":{"type":"string","optional":true},"description":{"type":"string","optional":true},"integration_runtime_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"server_version_is_32_or_higher":{"type":"bool","optional":true,"default":false}}}},"azurerm_data_factory_linked_service_data_lake_storage_gen2":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"integration_runtime_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"service_principal_id":{"type":"string","optional":true,"conflicts_with":["storage_account_key","use_managed_identity"],"at_least_one_of":["service_principal_key","service_principal_id","tenant","storage_account_key","use_managed_identity"],"required_with":["service_principal_key","tenant"]},"service_principal_key":{"type":"string","optional":true,"conflicts_with":["storage_account_key","use_managed_identity"],"at_least_one_of":["service_principal_key","service_principal_id","tenant","storage_account_key","use_managed_identity"],"required_with":["service_principal_id","tenant"]},"storage_account_key":{"type":"string","optional":true,"conflicts_with":["service_principal_id","service_principal_key","use_managed_identity","tenant"],"at_least_one_of":["service_principal_key","service_principal_id","tenant","storage_account_key","use_managed_identity"]},"tenant":{"type":"string","optional":true,"conflicts_with":["storage_account_key","use_managed_identity"],"at_least_one_of":["service_principal_key","service_principal_id","tenant","storage_account_key","use_managed_identity"],"required_with":["service_principal_id","service_principal_key"]},"url":{"type":"string","required":true},"use_managed_identity":{"type":"bool","optional":true,"default":false,"conflicts_with":["service_principal_key","service_principal_id","storage_account_key","tenant"],"at_least_one_of":["service_principal_key","service_principal_id","tenant","storage_account_key","use_managed_identity"]}}}},"azurerm_data_factory_linked_service_key_vault":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"integration_runtime_name":{"type":"string","optional":true},"key_vault_id":{"type":"string","required":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}}},"azurerm_data_factory_linked_service_kusto":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"integration_runtime_name":{"type":"string","optional":true},"kusto_database_name":{"type":"string","required":true},"kusto_endpoint":{"type":"string","required":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"service_principal_id":{"type":"string","optional":true,"exactly_one_of":["service_principal_id","use_managed_identity"],"required_with":["service_principal_key"]},"service_principal_key":{"type":"string","optional":true,"required_with":["service_principal_id"]},"tenant":{"type":"string","optional":true,"required_with":["service_principal_id"]},"use_managed_identity":{"type":"bool","optional":true,"default":false,"exactly_one_of":["service_principal_id","use_managed_identity"]}}}},"azurerm_data_factory_linked_service_mysql":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"connection_string":{"type":"string","required":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"integration_runtime_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}}},"azurerm_data_factory_linked_service_odata":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"integration_runtime_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"url":{"type":"string","required":true}},"block_types":{"basic_authentication":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true}}}},"azurerm_data_factory_linked_service_odbc":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"connection_string":{"type":"string","required":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"integration_runtime_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}},"block_types":{"basic_authentication":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true}}}},"azurerm_data_factory_linked_service_postgresql":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"connection_string":{"type":"string","required":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"integration_runtime_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}}},"azurerm_data_factory_linked_service_sftp":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"authentication_type":{"type":"string","required":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"host":{"type":"string","required":true},"host_key_fingerprint":{"type":"string","optional":true},"integration_runtime_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"password":{"type":"string","required":true},"port":{"type":"number","required":true},"skip_host_key_validation":{"type":"bool","optional":true},"username":{"type":"string","required":true}}}},"azurerm_data_factory_linked_service_snowflake":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"connection_string":{"type":"string","required":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"integration_runtime_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}},"block_types":{"key_vault_password":{"nesting_mode":3,"block":{"attributes":{"linked_service_name":{"type":"string","required":true},"secret_name":{"type":"string","required":true}}},"optional":true}}}},"azurerm_data_factory_linked_service_sql_server":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"connection_string":{"type":"string","optional":true,"exactly_one_of":["connection_string","key_vault_connection_string"]},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"integration_runtime_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"user_name":{"type":"string","optional":true}},"block_types":{"key_vault_connection_string":{"nesting_mode":3,"block":{"attributes":{"linked_service_name":{"type":"string","required":true},"secret_name":{"type":"string","required":true}}},"optional":true,"exactly_one_of":["connection_string","key_vault_connection_string"]},"key_vault_password":{"nesting_mode":3,"block":{"attributes":{"linked_service_name":{"type":"string","required":true},"secret_name":{"type":"string","required":true}}},"optional":true}}}},"azurerm_data_factory_linked_service_synapse":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"connection_string":{"type":"string","required":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"integration_runtime_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}},"block_types":{"key_vault_password":{"nesting_mode":3,"block":{"attributes":{"linked_service_name":{"type":"string","required":true},"secret_name":{"type":"string","required":true}}},"optional":true}}}},"azurerm_data_factory_linked_service_web":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"authentication_type":{"type":"string","required":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"integration_runtime_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"password":{"type":"string","optional":true},"url":{"type":"string","required":true},"username":{"type":"string","optional":true}}}},"azurerm_data_factory_managed_private_endpoint":{"block":{"attributes":{"data_factory_id":{"type":"string","required":true},"fqdns":{"type":["list","string"],"optional":true,"computed":true},"name":{"type":"string","required":true},"subresource_name":{"type":"string","optional":true},"target_resource_id":{"type":"string","required":true}}}},"azurerm_data_factory_pipeline":{"block":{"attributes":{"activities_json":{"type":"string","optional":true},"annotations":{"type":["list","string"],"optional":true},"concurrency":{"type":"number","optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"folder":{"type":"string","optional":true},"moniter_metrics_after_duration":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"variables":{"type":["map","string"],"optional":true}}}},"azurerm_data_factory_trigger_blob_event":{"block":{"attributes":{"activated":{"type":"bool","optional":true,"default":true},"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"blob_path_begins_with":{"type":"string","optional":true,"at_least_one_of":["blob_path_begins_with","blob_path_ends_with"]},"blob_path_ends_with":{"type":"string","optional":true,"at_least_one_of":["blob_path_begins_with","blob_path_ends_with"]},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"events":{"type":["set","string"],"required":true},"ignore_empty_blobs":{"type":"bool","optional":true},"name":{"type":"string","required":true},"storage_account_id":{"type":"string","required":true}},"block_types":{"pipeline":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"required":true}}}},"azurerm_data_factory_trigger_custom_event":{"block":{"attributes":{"activated":{"type":"bool","optional":true,"default":true},"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"eventgrid_topic_id":{"type":"string","required":true},"events":{"type":["set","string"],"required":true},"name":{"type":"string","required":true},"subject_begins_with":{"type":"string","optional":true},"subject_ends_with":{"type":"string","optional":true}},"block_types":{"pipeline":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"required":true}}}},"azurerm_data_factory_trigger_schedule":{"block":{"attributes":{"activated":{"type":"bool","optional":true,"default":true},"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"end_time":{"type":"string","optional":true},"frequency":{"type":"string","optional":true,"default":"Minute"},"interval":{"type":"number","optional":true,"default":1},"name":{"type":"string","required":true},"pipeline_name":{"type":"string","optional":true,"computed":true,"exactly_one_of":["pipeline","pipeline_name"]},"pipeline_parameters":{"type":["map","string"],"optional":true,"computed":true,"conflicts_with":["pipeline"]},"start_time":{"type":"string","optional":true,"computed":true},"time_zone":{"type":"string","optional":true}},"block_types":{"pipeline":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true,"computed":true,"conflicts_with":["pipeline_parameters"],"exactly_one_of":["pipeline","pipeline_name"]},"schedule":{"nesting_mode":3,"block":{"attributes":{"days_of_month":{"type":["list","number"],"optional":true},"days_of_week":{"type":["list","string"],"optional":true},"hours":{"type":["list","number"],"optional":true},"minutes":{"type":["list","number"],"optional":true}},"block_types":{"monthly":{"nesting_mode":3,"block":{"attributes":{"week":{"type":"number","optional":true},"weekday":{"type":"string","required":true}}},"optional":true}}},"optional":true}}}},"azurerm_data_factory_trigger_tumbling_window":{"block":{"attributes":{"activated":{"type":"bool","optional":true,"default":true},"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"delay":{"type":"string","optional":true},"description":{"type":"string","optional":true},"end_time":{"type":"string","optional":true},"frequency":{"type":"string","required":true},"interval":{"type":"number","required":true},"max_concurrency":{"type":"number","optional":true,"default":50},"name":{"type":"string","required":true},"start_time":{"type":"string","required":true}},"block_types":{"pipeline":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"required":true},"retry":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true},"interval":{"type":"number","optional":true,"default":30}}},"optional":true},"trigger_dependency":{"nesting_mode":4,"block":{"attributes":{"offset":{"type":"string","optional":true},"size":{"type":"string","optional":true},"trigger_name":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_data_protection_backup_instance_blob_storage":{"block":{"attributes":{"backup_policy_id":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"storage_account_container_names":{"type":["list","string"],"optional":true},"storage_account_id":{"type":"string","required":true},"vault_id":{"type":"string","required":true}}}},"azurerm_data_protection_backup_instance_disk":{"block":{"attributes":{"backup_policy_id":{"type":"string","required":true},"disk_id":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"snapshot_resource_group_name":{"type":"string","required":true},"vault_id":{"type":"string","required":true}}}},"azurerm_data_protection_backup_instance_kubernetes_cluster":{"block":{"attributes":{"backup_policy_id":{"type":"string","required":true},"kubernetes_cluster_id":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"snapshot_resource_group_name":{"type":"string","required":true},"vault_id":{"type":"string","required":true}},"block_types":{"backup_datasource_parameters":{"nesting_mode":3,"block":{"attributes":{"cluster_scoped_resources_enabled":{"type":"bool","optional":true,"default":false},"excluded_namespaces":{"type":["list","string"],"optional":true},"excluded_resource_types":{"type":["list","string"],"optional":true},"included_namespaces":{"type":["list","string"],"optional":true},"included_resource_types":{"type":["list","string"],"optional":true},"label_selectors":{"type":["list","string"],"optional":true},"volume_snapshot_enabled":{"type":"bool","optional":true,"default":false}}},"optional":true}}}},"azurerm_data_protection_backup_instance_mysql_flexible_server":{"block":{"attributes":{"backup_policy_id":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"server_id":{"type":"string","required":true},"vault_id":{"type":"string","required":true}}}},"azurerm_data_protection_backup_instance_postgresql":{"block":{"attributes":{"backup_policy_id":{"type":"string","required":true},"database_credential_key_vault_secret_id":{"type":"string","optional":true},"database_id":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"vault_id":{"type":"string","required":true}}}},"azurerm_data_protection_backup_instance_postgresql_flexible_server":{"block":{"attributes":{"backup_policy_id":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"server_id":{"type":"string","required":true},"vault_id":{"type":"string","required":true}}}},"azurerm_data_protection_backup_policy_blob_storage":{"block":{"attributes":{"backup_repeating_time_intervals":{"type":["list","string"],"optional":true},"name":{"type":"string","required":true},"operational_default_retention_duration":{"type":"string","optional":true,"at_least_one_of":["operational_default_retention_duration","vault_default_retention_duration"]},"time_zone":{"type":"string","optional":true},"vault_default_retention_duration":{"type":"string","optional":true,"at_least_one_of":["operational_default_retention_duration","vault_default_retention_duration"],"required_with":["backup_repeating_time_intervals"]},"vault_id":{"type":"string","required":true}},"block_types":{"retention_rule":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"priority":{"type":"number","required":true}},"block_types":{"criteria":{"nesting_mode":3,"block":{"attributes":{"absolute_criteria":{"type":"string","optional":true},"days_of_month":{"type":["set","number"],"optional":true},"days_of_week":{"type":["set","string"],"optional":true},"months_of_year":{"type":["set","string"],"optional":true},"scheduled_backup_times":{"type":["set","string"],"optional":true},"weeks_of_month":{"type":["set","string"],"optional":true}}},"required":true},"life_cycle":{"nesting_mode":3,"block":{"attributes":{"data_store_type":{"type":"string","required":true},"duration":{"type":"string","required":true}}},"required":true}}},"optional":true,"required_with":["vault_default_retention_duration"]}}}},"azurerm_data_protection_backup_policy_disk":{"block":{"attributes":{"backup_repeating_time_intervals":{"type":["list","string"],"required":true},"default_retention_duration":{"type":"string","required":true},"name":{"type":"string","required":true},"time_zone":{"type":"string","optional":true},"vault_id":{"type":"string","required":true}},"block_types":{"retention_rule":{"nesting_mode":3,"block":{"attributes":{"duration":{"type":"string","required":true},"name":{"type":"string","required":true},"priority":{"type":"number","required":true}},"block_types":{"criteria":{"nesting_mode":3,"block":{"attributes":{"absolute_criteria":{"type":"string","optional":true}}},"required":true}}},"optional":true}}}},"azurerm_data_protection_backup_policy_kubernetes_cluster":{"block":{"attributes":{"backup_repeating_time_intervals":{"type":["list","string"],"required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"time_zone":{"type":"string","optional":true},"vault_name":{"type":"string","required":true}},"block_types":{"default_retention_rule":{"nesting_mode":3,"block":{"block_types":{"life_cycle":{"nesting_mode":3,"block":{"attributes":{"data_store_type":{"type":"string","required":true},"duration":{"type":"string","required":true}}},"required":true}}},"required":true},"retention_rule":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"priority":{"type":"number","required":true}},"block_types":{"criteria":{"nesting_mode":3,"block":{"attributes":{"absolute_criteria":{"type":"string","optional":true},"days_of_week":{"type":["set","string"],"optional":true},"months_of_year":{"type":["set","string"],"optional":true},"scheduled_backup_times":{"type":["set","string"],"optional":true},"weeks_of_month":{"type":["set","string"],"optional":true}}},"required":true},"life_cycle":{"nesting_mode":3,"block":{"attributes":{"data_store_type":{"type":"string","required":true},"duration":{"type":"string","required":true}}},"required":true}}},"optional":true}}}},"azurerm_data_protection_backup_policy_mysql_flexible_server":{"block":{"attributes":{"backup_repeating_time_intervals":{"type":["list","string"],"required":true},"name":{"type":"string","required":true},"time_zone":{"type":"string","optional":true},"vault_id":{"type":"string","required":true}},"block_types":{"default_retention_rule":{"nesting_mode":3,"block":{"block_types":{"life_cycle":{"nesting_mode":3,"block":{"attributes":{"data_store_type":{"type":"string","required":true},"duration":{"type":"string","required":true}}},"required":true}}},"required":true},"retention_rule":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"priority":{"type":"number","required":true}},"block_types":{"criteria":{"nesting_mode":3,"block":{"attributes":{"absolute_criteria":{"type":"string","optional":true},"days_of_week":{"type":["set","string"],"optional":true},"months_of_year":{"type":["set","string"],"optional":true},"scheduled_backup_times":{"type":["set","string"],"optional":true},"weeks_of_month":{"type":["set","string"],"optional":true}}},"required":true},"life_cycle":{"nesting_mode":3,"block":{"attributes":{"data_store_type":{"type":"string","required":true},"duration":{"type":"string","required":true}}},"required":true}}},"optional":true}}}},"azurerm_data_protection_backup_policy_postgresql":{"block":{"attributes":{"backup_repeating_time_intervals":{"type":["list","string"],"required":true},"default_retention_duration":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"time_zone":{"type":"string","optional":true},"vault_name":{"type":"string","required":true}},"block_types":{"retention_rule":{"nesting_mode":3,"block":{"attributes":{"duration":{"type":"string","required":true},"name":{"type":"string","required":true},"priority":{"type":"number","required":true}},"block_types":{"criteria":{"nesting_mode":3,"block":{"attributes":{"absolute_criteria":{"type":"string","optional":true},"days_of_week":{"type":["set","string"],"optional":true},"months_of_year":{"type":["set","string"],"optional":true},"scheduled_backup_times":{"type":["set","string"],"optional":true},"weeks_of_month":{"type":["set","string"],"optional":true}}},"required":true}}},"optional":true}}}},"azurerm_data_protection_backup_policy_postgresql_flexible_server":{"block":{"attributes":{"backup_repeating_time_intervals":{"type":["list","string"],"required":true},"name":{"type":"string","required":true},"time_zone":{"type":"string","optional":true},"vault_id":{"type":"string","required":true}},"block_types":{"default_retention_rule":{"nesting_mode":3,"block":{"block_types":{"life_cycle":{"nesting_mode":3,"block":{"attributes":{"data_store_type":{"type":"string","required":true},"duration":{"type":"string","required":true}}},"required":true}}},"required":true},"retention_rule":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"priority":{"type":"number","required":true}},"block_types":{"criteria":{"nesting_mode":3,"block":{"attributes":{"absolute_criteria":{"type":"string","optional":true},"days_of_week":{"type":["set","string"],"optional":true},"months_of_year":{"type":["set","string"],"optional":true},"scheduled_backup_times":{"type":["set","string"],"optional":true},"weeks_of_month":{"type":["set","string"],"optional":true}}},"required":true},"life_cycle":{"nesting_mode":3,"block":{"attributes":{"data_store_type":{"type":"string","required":true},"duration":{"type":"string","required":true}}},"required":true}}},"optional":true}}}},"azurerm_data_protection_backup_vault":{"block":{"attributes":{"cross_region_restore_enabled":{"type":"bool","optional":true},"datastore_type":{"type":"string","required":true},"immutability":{"type":"string","optional":true,"default":"Disabled"},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"redundancy":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"retention_duration_in_days":{"type":"number","optional":true,"default":14},"soft_delete":{"type":"string","optional":true,"default":"On"},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_data_protection_backup_vault_customer_managed_key":{"block":{"attributes":{"data_protection_backup_vault_id":{"type":"string","required":true},"key_vault_key_id":{"type":"string","required":true}}}},"azurerm_data_protection_resource_guard":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"vault_critical_operation_exclusion_list":{"type":["list","string"],"optional":true}}}},"azurerm_data_share":{"block":{"attributes":{"account_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"kind":{"type":"string","required":true},"name":{"type":"string","required":true},"terms":{"type":"string","optional":true}},"block_types":{"snapshot_schedule":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"recurrence":{"type":"string","required":true},"start_time":{"type":"string","required":true}}},"optional":true}}}},"azurerm_data_share_account":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"required":true}}}},"azurerm_data_share_dataset_blob_storage":{"block":{"attributes":{"container_name":{"type":"string","required":true},"data_share_id":{"type":"string","required":true},"display_name":{"type":"string","computed":true},"file_path":{"type":"string","optional":true,"conflicts_with":["folder_path"]},"folder_path":{"type":"string","optional":true,"conflicts_with":["file_path"]},"name":{"type":"string","required":true}},"block_types":{"storage_account":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"subscription_id":{"type":"string","required":true}}},"required":true}}}},"azurerm_data_share_dataset_data_lake_gen2":{"block":{"attributes":{"display_name":{"type":"string","computed":true},"file_path":{"type":"string","optional":true,"conflicts_with":["folder_path"]},"file_system_name":{"type":"string","required":true},"folder_path":{"type":"string","optional":true,"conflicts_with":["file_path"]},"name":{"type":"string","required":true},"share_id":{"type":"string","required":true},"storage_account_id":{"type":"string","required":true}}}},"azurerm_data_share_dataset_kusto_cluster":{"block":{"attributes":{"display_name":{"type":"string","computed":true},"kusto_cluster_id":{"type":"string","required":true},"kusto_cluster_location":{"type":"string","computed":true},"name":{"type":"string","required":true},"share_id":{"type":"string","required":true}}}},"azurerm_data_share_dataset_kusto_database":{"block":{"attributes":{"display_name":{"type":"string","computed":true},"kusto_cluster_location":{"type":"string","computed":true},"kusto_database_id":{"type":"string","required":true},"name":{"type":"string","required":true},"share_id":{"type":"string","required":true}}}},"azurerm_database_migration_project":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"service_name":{"type":"string","required":true},"source_platform":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"target_platform":{"type":"string","required":true}}}},"azurerm_database_migration_service":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","required":true},"subnet_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_databox_edge_device":{"block":{"attributes":{"device_properties":{"type":["list",["object",{"capacity":"number","configured_role_types":["list","string"],"culture":"string","hcs_version":"string","model":"string","node_count":"number","serial_number":"string","software_version":"string","status":"string","time_zone":"string","type":"string"}]],"computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_databricks_access_connector":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_databricks_virtual_network_peering":{"block":{"attributes":{"address_space_prefixes":{"type":["list","string"],"computed":true},"allow_forwarded_traffic":{"type":"bool","optional":true,"default":false},"allow_gateway_transit":{"type":"bool","optional":true,"default":false},"allow_virtual_network_access":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"remote_address_space_prefixes":{"type":["list","string"],"required":true},"remote_virtual_network_id":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"use_remote_gateways":{"type":"bool","optional":true,"default":false},"virtual_network_id":{"type":"string","computed":true},"workspace_id":{"type":"string","required":true}}}},"azurerm_databricks_workspace":{"block":{"attributes":{"access_connector_id":{"type":"string","optional":true,"required_with":["default_storage_firewall_enabled"]},"customer_managed_key_enabled":{"type":"bool","optional":true,"default":false},"default_storage_firewall_enabled":{"type":"bool","optional":true,"required_with":["access_connector_id"]},"disk_encryption_set_id":{"type":"string","computed":true},"infrastructure_encryption_enabled":{"type":"bool","optional":true,"default":false},"load_balancer_backend_address_pool_id":{"type":"string","optional":true},"location":{"type":"string","required":true},"managed_disk_cmk_key_vault_id":{"type":"string","optional":true},"managed_disk_cmk_key_vault_key_id":{"type":"string","optional":true},"managed_disk_cmk_rotation_to_latest_version_enabled":{"type":"bool","optional":true,"required_with":["managed_disk_cmk_key_vault_key_id"]},"managed_disk_identity":{"type":["list",["object",{"principal_id":"string","tenant_id":"string","type":"string"}]],"computed":true},"managed_resource_group_id":{"type":"string","computed":true},"managed_resource_group_name":{"type":"string","optional":true,"computed":true},"managed_services_cmk_key_vault_id":{"type":"string","optional":true},"managed_services_cmk_key_vault_key_id":{"type":"string","optional":true},"name":{"type":"string","required":true},"network_security_group_rules_required":{"type":"string","optional":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"sku":{"type":"string","required":true},"storage_account_identity":{"type":["list",["object",{"principal_id":"string","tenant_id":"string","type":"string"}]],"computed":true},"tags":{"type":["map","string"],"optional":true},"workspace_id":{"type":"string","computed":true},"workspace_url":{"type":"string","computed":true}},"block_types":{"custom_parameters":{"nesting_mode":3,"block":{"attributes":{"machine_learning_workspace_id":{"type":"string","optional":true,"at_least_one_of":["custom_parameters.0.machine_learning_workspace_id","custom_parameters.0.no_public_ip","custom_parameters.0.public_subnet_name","custom_parameters.0.private_subnet_name","custom_parameters.0.virtual_network_id","custom_parameters.0.public_subnet_network_security_group_association_id","custom_parameters.0.private_subnet_network_security_group_association_id","custom_parameters.0.nat_gateway_name","custom_parameters.0.public_ip_name","custom_parameters.0.storage_account_name","custom_parameters.0.storage_account_sku_name","custom_parameters.0.vnet_address_prefix"]},"nat_gateway_name":{"type":"string","optional":true,"computed":true,"at_least_one_of":["custom_parameters.0.machine_learning_workspace_id","custom_parameters.0.no_public_ip","custom_parameters.0.public_subnet_name","custom_parameters.0.private_subnet_name","custom_parameters.0.virtual_network_id","custom_parameters.0.public_subnet_network_security_group_association_id","custom_parameters.0.private_subnet_network_security_group_association_id","custom_parameters.0.nat_gateway_name","custom_parameters.0.public_ip_name","custom_parameters.0.storage_account_name","custom_parameters.0.storage_account_sku_name","custom_parameters.0.vnet_address_prefix"]},"no_public_ip":{"type":"bool","optional":true,"default":true,"at_least_one_of":["custom_parameters.0.machine_learning_workspace_id","custom_parameters.0.no_public_ip","custom_parameters.0.public_subnet_name","custom_parameters.0.private_subnet_name","custom_parameters.0.virtual_network_id","custom_parameters.0.public_subnet_network_security_group_association_id","custom_parameters.0.private_subnet_network_security_group_association_id","custom_parameters.0.nat_gateway_name","custom_parameters.0.public_ip_name","custom_parameters.0.storage_account_name","custom_parameters.0.storage_account_sku_name","custom_parameters.0.vnet_address_prefix"]},"private_subnet_name":{"type":"string","optional":true,"at_least_one_of":["custom_parameters.0.machine_learning_workspace_id","custom_parameters.0.no_public_ip","custom_parameters.0.public_subnet_name","custom_parameters.0.private_subnet_name","custom_parameters.0.virtual_network_id","custom_parameters.0.public_subnet_network_security_group_association_id","custom_parameters.0.private_subnet_network_security_group_association_id","custom_parameters.0.nat_gateway_name","custom_parameters.0.public_ip_name","custom_parameters.0.storage_account_name","custom_parameters.0.storage_account_sku_name","custom_parameters.0.vnet_address_prefix"]},"private_subnet_network_security_group_association_id":{"type":"string","optional":true,"at_least_one_of":["custom_parameters.0.machine_learning_workspace_id","custom_parameters.0.no_public_ip","custom_parameters.0.public_subnet_name","custom_parameters.0.private_subnet_name","custom_parameters.0.virtual_network_id","custom_parameters.0.public_subnet_network_security_group_association_id","custom_parameters.0.private_subnet_network_security_group_association_id","custom_parameters.0.nat_gateway_name","custom_parameters.0.public_ip_name","custom_parameters.0.storage_account_name","custom_parameters.0.storage_account_sku_name","custom_parameters.0.vnet_address_prefix"]},"public_ip_name":{"type":"string","optional":true,"computed":true,"at_least_one_of":["custom_parameters.0.machine_learning_workspace_id","custom_parameters.0.no_public_ip","custom_parameters.0.public_subnet_name","custom_parameters.0.private_subnet_name","custom_parameters.0.virtual_network_id","custom_parameters.0.public_subnet_network_security_group_association_id","custom_parameters.0.private_subnet_network_security_group_association_id","custom_parameters.0.nat_gateway_name","custom_parameters.0.public_ip_name","custom_parameters.0.storage_account_name","custom_parameters.0.storage_account_sku_name","custom_parameters.0.vnet_address_prefix"]},"public_subnet_name":{"type":"string","optional":true,"at_least_one_of":["custom_parameters.0.machine_learning_workspace_id","custom_parameters.0.no_public_ip","custom_parameters.0.public_subnet_name","custom_parameters.0.private_subnet_name","custom_parameters.0.virtual_network_id","custom_parameters.0.public_subnet_network_security_group_association_id","custom_parameters.0.private_subnet_network_security_group_association_id","custom_parameters.0.nat_gateway_name","custom_parameters.0.public_ip_name","custom_parameters.0.storage_account_name","custom_parameters.0.storage_account_sku_name","custom_parameters.0.vnet_address_prefix"]},"public_subnet_network_security_group_association_id":{"type":"string","optional":true,"at_least_one_of":["custom_parameters.0.machine_learning_workspace_id","custom_parameters.0.no_public_ip","custom_parameters.0.public_subnet_name","custom_parameters.0.private_subnet_name","custom_parameters.0.virtual_network_id","custom_parameters.0.public_subnet_network_security_group_association_id","custom_parameters.0.private_subnet_network_security_group_association_id","custom_parameters.0.nat_gateway_name","custom_parameters.0.public_ip_name","custom_parameters.0.storage_account_name","custom_parameters.0.storage_account_sku_name","custom_parameters.0.vnet_address_prefix"]},"storage_account_name":{"type":"string","optional":true,"computed":true,"at_least_one_of":["custom_parameters.0.machine_learning_workspace_id","custom_parameters.0.no_public_ip","custom_parameters.0.public_subnet_name","custom_parameters.0.private_subnet_name","custom_parameters.0.virtual_network_id","custom_parameters.0.public_subnet_network_security_group_association_id","custom_parameters.0.private_subnet_network_security_group_association_id","custom_parameters.0.nat_gateway_name","custom_parameters.0.public_ip_name","custom_parameters.0.storage_account_name","custom_parameters.0.storage_account_sku_name","custom_parameters.0.vnet_address_prefix"]},"storage_account_sku_name":{"type":"string","optional":true,"computed":true,"at_least_one_of":["custom_parameters.0.machine_learning_workspace_id","custom_parameters.0.no_public_ip","custom_parameters.0.public_subnet_name","custom_parameters.0.private_subnet_name","custom_parameters.0.virtual_network_id","custom_parameters.0.public_subnet_network_security_group_association_id","custom_parameters.0.private_subnet_network_security_group_association_id","custom_parameters.0.nat_gateway_name","custom_parameters.0.public_ip_name","custom_parameters.0.storage_account_name","custom_parameters.0.storage_account_sku_name","custom_parameters.0.vnet_address_prefix"]},"virtual_network_id":{"type":"string","optional":true,"at_least_one_of":["custom_parameters.0.machine_learning_workspace_id","custom_parameters.0.no_public_ip","custom_parameters.0.public_subnet_name","custom_parameters.0.private_subnet_name","custom_parameters.0.virtual_network_id","custom_parameters.0.public_subnet_network_security_group_association_id","custom_parameters.0.private_subnet_network_security_group_association_id","custom_parameters.0.nat_gateway_name","custom_parameters.0.public_ip_name","custom_parameters.0.storage_account_name","custom_parameters.0.storage_account_sku_name","custom_parameters.0.vnet_address_prefix"]},"vnet_address_prefix":{"type":"string","optional":true,"computed":true,"at_least_one_of":["custom_parameters.0.machine_learning_workspace_id","custom_parameters.0.no_public_ip","custom_parameters.0.public_subnet_name","custom_parameters.0.private_subnet_name","custom_parameters.0.virtual_network_id","custom_parameters.0.public_subnet_network_security_group_association_id","custom_parameters.0.private_subnet_network_security_group_association_id","custom_parameters.0.nat_gateway_name","custom_parameters.0.public_ip_name","custom_parameters.0.storage_account_name","custom_parameters.0.storage_account_sku_name","custom_parameters.0.vnet_address_prefix"]}}},"optional":true,"computed":true},"enhanced_security_compliance":{"nesting_mode":3,"block":{"attributes":{"automatic_cluster_update_enabled":{"type":"bool","optional":true,"default":false},"compliance_security_profile_enabled":{"type":"bool","optional":true,"default":false},"compliance_security_profile_standards":{"type":["set","string"],"optional":true},"enhanced_security_monitoring_enabled":{"type":"bool","optional":true,"default":false}}},"optional":true}}}},"azurerm_databricks_workspace_customer_managed_key":{"block":{"attributes":{"key_vault_key_id":{"type":"string","required":true},"workspace_id":{"type":"string","required":true}}}},"azurerm_databricks_workspace_root_dbfs_customer_managed_key":{"block":{"attributes":{"key_vault_id":{"type":"string","optional":true},"key_vault_key_id":{"type":"string","required":true},"workspace_id":{"type":"string","required":true}}}},"azurerm_datadog_monitor":{"block":{"attributes":{"location":{"type":"string","required":true},"marketplace_subscription_status":{"type":"string","computed":true},"monitoring_enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"datadog_organization":{"nesting_mode":3,"block":{"attributes":{"api_key":{"type":"string","required":true},"application_key":{"type":"string","required":true},"enterprise_app_id":{"type":"string","optional":true},"id":{"type":"string","computed":true},"linking_auth_code":{"type":"string","optional":true},"linking_client_id":{"type":"string","optional":true},"name":{"type":"string","computed":true},"redirect_uri":{"type":"string","optional":true}}},"required":true},"identity":{"nesting_mode":3,"block":{"attributes":{"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"user":{"nesting_mode":3,"block":{"attributes":{"email":{"type":"string","required":true},"name":{"type":"string","required":true},"phone_number":{"type":"string","optional":true}}},"required":true}}}},"azurerm_datadog_monitor_sso_configuration":{"block":{"attributes":{"datadog_monitor_id":{"type":"string","required":true},"enterprise_application_id":{"type":"string","required":true},"login_url":{"type":"string","computed":true},"name":{"type":"string","optional":true,"default":"default"},"single_sign_on_enabled":{"type":"string","required":true}}}},"azurerm_datadog_monitor_tag_rule":{"block":{"attributes":{"datadog_monitor_id":{"type":"string","required":true},"name":{"type":"string","optional":true,"default":"default"}},"block_types":{"log":{"nesting_mode":3,"block":{"attributes":{"aad_log_enabled":{"type":"bool","optional":true},"resource_log_enabled":{"type":"bool","optional":true},"subscription_log_enabled":{"type":"bool","optional":true}},"block_types":{"filter":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true},"metric":{"nesting_mode":3,"block":{"block_types":{"filter":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true}}}},"azurerm_dedicated_hardware_security_module":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","required":true},"stamp_id":{"type":"string","optional":true},"tags":{"type":["map","string"],"optional":true},"zones":{"type":["set","string"],"optional":true}},"block_types":{"management_network_profile":{"nesting_mode":3,"block":{"attributes":{"network_interface_private_ip_addresses":{"type":["set","string"],"required":true},"subnet_id":{"type":"string","required":true}}},"optional":true},"network_profile":{"nesting_mode":3,"block":{"attributes":{"network_interface_private_ip_addresses":{"type":["set","string"],"required":true},"subnet_id":{"type":"string","required":true}}},"required":true}}}},"azurerm_dedicated_host":{"block":{"attributes":{"auto_replace_on_failure":{"type":"bool","optional":true,"default":true},"dedicated_host_group_id":{"type":"string","required":true},"license_type":{"type":"string","optional":true,"default":"None"},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"platform_fault_domain":{"type":"number","required":true},"sku_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_dedicated_host_group":{"block":{"attributes":{"automatic_placement_enabled":{"type":"bool","optional":true,"default":false},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"platform_fault_domain_count":{"type":"number","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"zone":{"type":"string","optional":true}}}},"azurerm_dev_center":{"block":{"attributes":{"dev_center_uri":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_dev_center_attached_network":{"block":{"attributes":{"dev_center_id":{"type":"string","required":true},"name":{"type":"string","required":true},"network_connection_id":{"type":"string","required":true}}}},"azurerm_dev_center_catalog":{"block":{"attributes":{"dev_center_id":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}},"block_types":{"catalog_adogit":{"nesting_mode":3,"block":{"attributes":{"branch":{"type":"string","required":true},"key_vault_key_url":{"type":"string","required":true},"path":{"type":"string","required":true},"uri":{"type":"string","required":true}}},"optional":true},"catalog_github":{"nesting_mode":3,"block":{"attributes":{"branch":{"type":"string","required":true},"key_vault_key_url":{"type":"string","required":true},"path":{"type":"string","required":true},"uri":{"type":"string","required":true}}},"optional":true}}}},"azurerm_dev_center_dev_box_definition":{"block":{"attributes":{"dev_center_id":{"type":"string","required":true},"image_reference_id":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"sku_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_dev_center_environment_type":{"block":{"attributes":{"dev_center_id":{"type":"string","required":true},"name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_dev_center_gallery":{"block":{"attributes":{"dev_center_id":{"type":"string","required":true},"name":{"type":"string","required":true},"shared_gallery_id":{"type":"string","required":true}}}},"azurerm_dev_center_network_connection":{"block":{"attributes":{"domain_join_type":{"type":"string","required":true},"domain_name":{"type":"string","optional":true},"domain_password":{"type":"string","optional":true},"domain_username":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"organization_unit":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"subnet_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_dev_center_project":{"block":{"attributes":{"description":{"type":"string","optional":true},"dev_center_id":{"type":"string","required":true},"dev_center_uri":{"type":"string","computed":true},"location":{"type":"string","required":true},"maximum_dev_boxes_per_user":{"type":"number","optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_dev_center_project_environment_type":{"block":{"attributes":{"creator_role_assignment_roles":{"type":["set","string"],"optional":true},"deployment_target_id":{"type":"string","required":true},"dev_center_project_id":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"required":true},"user_role_assignment":{"nesting_mode":4,"block":{"attributes":{"roles":{"type":["set","string"],"required":true},"user_id":{"type":"string","required":true}}},"optional":true}}}},"azurerm_dev_center_project_pool":{"block":{"attributes":{"dev_box_definition_name":{"type":"string","required":true},"dev_center_attached_network_name":{"type":"string","required":true},"dev_center_project_id":{"type":"string","required":true},"local_administrator_enabled":{"type":"bool","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"stop_on_disconnect_grace_period_minutes":{"type":"number","optional":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_dev_test_global_vm_shutdown_schedule":{"block":{"attributes":{"daily_recurrence_time":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"timezone":{"type":"string","required":true},"virtual_machine_id":{"type":"string","required":true}},"block_types":{"notification_settings":{"nesting_mode":3,"block":{"attributes":{"email":{"type":"string","optional":true},"enabled":{"type":"bool","required":true},"time_in_minutes":{"type":"number","optional":true,"default":30},"webhook_url":{"type":"string","optional":true}}},"required":true}}}},"azurerm_dev_test_lab":{"block":{"attributes":{"artifacts_storage_account_id":{"type":"string","computed":true},"default_premium_storage_account_id":{"type":"string","computed":true},"default_storage_account_id":{"type":"string","computed":true},"key_vault_id":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"premium_data_disk_storage_account_id":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"unique_identifier":{"type":"string","computed":true}}}},"azurerm_dev_test_linux_virtual_machine":{"block":{"attributes":{"allow_claim":{"type":"bool","optional":true,"default":true},"disallow_public_ip_address":{"type":"bool","optional":true},"fqdn":{"type":"string","computed":true},"lab_name":{"type":"string","required":true},"lab_subnet_name":{"type":"string","required":true},"lab_virtual_network_id":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"notes":{"type":"string","optional":true},"password":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"size":{"type":"string","required":true},"ssh_key":{"type":"string","optional":true},"storage_type":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"unique_identifier":{"type":"string","computed":true},"username":{"type":"string","required":true}},"block_types":{"gallery_image_reference":{"nesting_mode":3,"block":{"attributes":{"offer":{"type":"string","required":true},"publisher":{"type":"string","required":true},"sku":{"type":"string","required":true},"version":{"type":"string","required":true}}},"required":true},"inbound_nat_rule":{"nesting_mode":4,"block":{"attributes":{"backend_port":{"type":"number","required":true},"frontend_port":{"type":"number","computed":true},"protocol":{"type":"string","required":true}}},"optional":true}}}},"azurerm_dev_test_policy":{"block":{"attributes":{"description":{"type":"string","optional":true},"evaluator_type":{"type":"string","required":true},"fact_data":{"type":"string","optional":true},"lab_name":{"type":"string","required":true},"name":{"type":"string","required":true},"policy_set_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"threshold":{"type":"string","required":true}}}},"azurerm_dev_test_schedule":{"block":{"attributes":{"lab_name":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"status":{"type":"string","optional":true,"default":"Disabled"},"tags":{"type":["map","string"],"optional":true},"task_type":{"type":"string","required":true},"time_zone_id":{"type":"string","required":true}},"block_types":{"daily_recurrence":{"nesting_mode":3,"block":{"attributes":{"time":{"type":"string","required":true}}},"optional":true},"hourly_recurrence":{"nesting_mode":3,"block":{"attributes":{"minute":{"type":"number","required":true}}},"optional":true},"notification_settings":{"nesting_mode":3,"block":{"attributes":{"status":{"type":"string","optional":true,"default":"Disabled"},"time_in_minutes":{"type":"number","optional":true},"webhook_url":{"type":"string","optional":true}}},"required":true},"weekly_recurrence":{"nesting_mode":3,"block":{"attributes":{"time":{"type":"string","required":true},"week_days":{"type":["list","string"],"optional":true}}},"optional":true}}}},"azurerm_dev_test_virtual_network":{"block":{"attributes":{"description":{"type":"string","optional":true},"lab_name":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"unique_identifier":{"type":"string","computed":true}},"block_types":{"subnet":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","computed":true},"use_in_virtual_machine_creation":{"type":"string","optional":true,"default":"Allow"},"use_public_ip_address":{"type":"string","optional":true,"default":"Allow"}},"block_types":{"shared_public_ip_address":{"nesting_mode":3,"block":{"block_types":{"allowed_ports":{"nesting_mode":3,"block":{"attributes":{"backend_port":{"type":"number","optional":true},"transport_protocol":{"type":"string","optional":true}}},"optional":true}}},"optional":true}}},"optional":true,"computed":true}}}},"azurerm_dev_test_windows_virtual_machine":{"block":{"attributes":{"allow_claim":{"type":"bool","optional":true,"default":true},"disallow_public_ip_address":{"type":"bool","optional":true},"fqdn":{"type":"string","computed":true},"lab_name":{"type":"string","required":true},"lab_subnet_name":{"type":"string","required":true},"lab_virtual_network_id":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"notes":{"type":"string","optional":true},"password":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"size":{"type":"string","required":true},"storage_type":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"unique_identifier":{"type":"string","computed":true},"username":{"type":"string","required":true}},"block_types":{"gallery_image_reference":{"nesting_mode":3,"block":{"attributes":{"offer":{"type":"string","required":true},"publisher":{"type":"string","required":true},"sku":{"type":"string","required":true},"version":{"type":"string","required":true}}},"required":true},"inbound_nat_rule":{"nesting_mode":4,"block":{"attributes":{"backend_port":{"type":"number","required":true},"frontend_port":{"type":"number","computed":true},"protocol":{"type":"string","required":true}}},"optional":true}}}},"azurerm_digital_twins_endpoint_eventgrid":{"block":{"attributes":{"dead_letter_storage_secret":{"type":"string","optional":true},"digital_twins_id":{"type":"string","required":true},"eventgrid_topic_endpoint":{"type":"string","required":true},"eventgrid_topic_primary_access_key":{"type":"string","required":true},"eventgrid_topic_secondary_access_key":{"type":"string","required":true},"name":{"type":"string","required":true}}}},"azurerm_digital_twins_endpoint_eventhub":{"block":{"attributes":{"dead_letter_storage_secret":{"type":"string","optional":true},"digital_twins_id":{"type":"string","required":true},"eventhub_primary_connection_string":{"type":"string","required":true},"eventhub_secondary_connection_string":{"type":"string","required":true},"name":{"type":"string","required":true}}}},"azurerm_digital_twins_endpoint_servicebus":{"block":{"attributes":{"dead_letter_storage_secret":{"type":"string","optional":true},"digital_twins_id":{"type":"string","required":true},"name":{"type":"string","required":true},"servicebus_primary_connection_string":{"type":"string","required":true},"servicebus_secondary_connection_string":{"type":"string","required":true}}}},"azurerm_digital_twins_instance":{"block":{"attributes":{"host_name":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_digital_twins_time_series_database_connection":{"block":{"attributes":{"digital_twins_id":{"type":"string","required":true},"eventhub_consumer_group_name":{"type":"string","optional":true,"default":"$Default"},"eventhub_name":{"type":"string","required":true},"eventhub_namespace_endpoint_uri":{"type":"string","required":true},"eventhub_namespace_id":{"type":"string","required":true},"kusto_cluster_id":{"type":"string","required":true},"kusto_cluster_uri":{"type":"string","required":true},"kusto_database_name":{"type":"string","required":true},"kusto_table_name":{"type":"string","optional":true,"default":"AdtPropertyEvents"},"name":{"type":"string","required":true}}}},"azurerm_disk_access":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_disk_encryption_set":{"block":{"attributes":{"auto_key_rotation_enabled":{"type":"bool","optional":true,"default":false},"encryption_type":{"type":"string","optional":true,"default":"EncryptionAtRestWithCustomerKey"},"federated_client_id":{"type":"string","optional":true},"key_vault_key_id":{"type":"string","optional":true,"exactly_one_of":["managed_hsm_key_id","key_vault_key_id"]},"key_vault_key_url":{"type":"string","computed":true},"location":{"type":"string","required":true},"managed_hsm_key_id":{"type":"string","optional":true,"exactly_one_of":["managed_hsm_key_id","key_vault_key_id"]},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"required":true}}}},"azurerm_dns_a_record":{"block":{"attributes":{"fqdn":{"type":"string","computed":true},"name":{"type":"string","required":true},"records":{"type":["set","string"],"optional":true,"conflicts_with":["target_resource_id"]},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"target_resource_id":{"type":"string","optional":true,"conflicts_with":["records"]},"ttl":{"type":"number","required":true},"zone_name":{"type":"string","required":true}}}},"azurerm_dns_aaaa_record":{"block":{"attributes":{"fqdn":{"type":"string","computed":true},"name":{"type":"string","required":true},"records":{"type":["set","string"],"optional":true,"conflicts_with":["target_resource_id"]},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"target_resource_id":{"type":"string","optional":true,"conflicts_with":["records"]},"ttl":{"type":"number","required":true},"zone_name":{"type":"string","required":true}}}},"azurerm_dns_caa_record":{"block":{"attributes":{"fqdn":{"type":"string","computed":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"ttl":{"type":"number","required":true},"zone_name":{"type":"string","required":true}},"block_types":{"record":{"nesting_mode":4,"block":{"attributes":{"flags":{"type":"number","required":true},"tag":{"type":"string","required":true},"value":{"type":"string","required":true}}},"required":true}}}},"azurerm_dns_cname_record":{"block":{"attributes":{"fqdn":{"type":"string","computed":true},"name":{"type":"string","required":true},"record":{"type":"string","optional":true,"exactly_one_of":["record","target_resource_id"]},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"target_resource_id":{"type":"string","optional":true,"exactly_one_of":["record","target_resource_id"]},"ttl":{"type":"number","required":true},"zone_name":{"type":"string","required":true}}}},"azurerm_dns_mx_record":{"block":{"attributes":{"fqdn":{"type":"string","computed":true},"name":{"type":"string","optional":true,"default":"@"},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"ttl":{"type":"number","required":true},"zone_name":{"type":"string","required":true}},"block_types":{"record":{"nesting_mode":4,"block":{"attributes":{"exchange":{"type":"string","required":true},"preference":{"type":"string","required":true}}},"required":true}}}},"azurerm_dns_ns_record":{"block":{"attributes":{"fqdn":{"type":"string","computed":true},"name":{"type":"string","required":true},"records":{"type":["list","string"],"required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"ttl":{"type":"number","required":true},"zone_name":{"type":"string","required":true}}}},"azurerm_dns_ptr_record":{"block":{"attributes":{"fqdn":{"type":"string","computed":true},"name":{"type":"string","required":true},"records":{"type":["set","string"],"required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"ttl":{"type":"number","required":true},"zone_name":{"type":"string","required":true}}}},"azurerm_dns_srv_record":{"block":{"attributes":{"fqdn":{"type":"string","computed":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"ttl":{"type":"number","required":true},"zone_name":{"type":"string","required":true}},"block_types":{"record":{"nesting_mode":4,"block":{"attributes":{"port":{"type":"number","required":true},"priority":{"type":"number","required":true},"target":{"type":"string","required":true},"weight":{"type":"number","required":true}}},"required":true}}}},"azurerm_dns_txt_record":{"block":{"attributes":{"fqdn":{"type":"string","computed":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"ttl":{"type":"number","required":true},"zone_name":{"type":"string","required":true}},"block_types":{"record":{"nesting_mode":4,"block":{"attributes":{"value":{"type":"string","required":true}}},"required":true}}}},"azurerm_dns_zone":{"block":{"attributes":{"max_number_of_record_sets":{"type":"number","computed":true},"name":{"type":"string","required":true},"name_servers":{"type":["set","string"],"computed":true},"number_of_record_sets":{"type":"number","computed":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"soa_record":{"nesting_mode":3,"block":{"attributes":{"email":{"type":"string","required":true},"expire_time":{"type":"number","optional":true,"default":2419200},"fqdn":{"type":"string","computed":true},"host_name":{"type":"string","computed":true},"minimum_ttl":{"type":"number","optional":true,"default":300},"refresh_time":{"type":"number","optional":true,"default":3600},"retry_time":{"type":"number","optional":true,"default":300},"serial_number":{"type":"number","optional":true,"default":1},"tags":{"type":["map","string"],"optional":true},"ttl":{"type":"number","optional":true,"default":3600}}},"optional":true,"computed":true}}}},"azurerm_dynatrace_monitor":{"block":{"attributes":{"location":{"type":"string","required":true},"marketplace_subscription":{"type":"string","required":true},"monitoring_enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"required":true},"plan":{"nesting_mode":3,"block":{"attributes":{"billing_cycle":{"type":"string","optional":true},"effective_date":{"type":"string","computed":true},"plan":{"type":"string","required":true},"usage_type":{"type":"string","optional":true}}},"required":true},"user":{"nesting_mode":3,"block":{"attributes":{"country":{"type":"string","required":true},"email":{"type":"string","required":true},"first_name":{"type":"string","required":true},"last_name":{"type":"string","required":true},"phone_number":{"type":"string","required":true}}},"required":true}}}},"azurerm_dynatrace_tag_rules":{"block":{"attributes":{"monitor_id":{"type":"string","required":true},"name":{"type":"string","required":true}},"block_types":{"log_rule":{"nesting_mode":3,"block":{"attributes":{"send_activity_logs_enabled":{"type":"bool","optional":true,"default":false},"send_azure_active_directory_logs_enabled":{"type":"bool","optional":true,"default":false},"send_subscription_logs_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"filtering_tag":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"required":true}}},"optional":true},"metric_rule":{"nesting_mode":3,"block":{"block_types":{"filtering_tag":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"required":true}}},"optional":true}}}},"azurerm_elastic_cloud_elasticsearch":{"block":{"attributes":{"elastic_cloud_deployment_id":{"type":"string","computed":true},"elastic_cloud_email_address":{"type":"string","required":true},"elastic_cloud_sso_default_url":{"type":"string","computed":true},"elastic_cloud_user_id":{"type":"string","computed":true},"elasticsearch_service_url":{"type":"string","computed":true},"kibana_service_url":{"type":"string","computed":true},"kibana_sso_uri":{"type":"string","computed":true},"location":{"type":"string","required":true},"monitoring_enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"logs":{"nesting_mode":3,"block":{"attributes":{"send_activity_logs":{"type":"bool","optional":true,"default":false},"send_azuread_logs":{"type":"bool","optional":true,"default":false},"send_subscription_logs":{"type":"bool","optional":true,"default":false}},"block_types":{"filtering_tag":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true}}}},"azurerm_elastic_san":{"block":{"attributes":{"base_size_in_tib":{"type":"number","required":true},"extended_size_in_tib":{"type":"number","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"total_iops":{"type":"number","computed":true},"total_mbps":{"type":"number","computed":true},"total_size_in_tib":{"type":"number","computed":true},"total_volume_size_in_gib":{"type":"number","computed":true},"volume_group_count":{"type":"number","computed":true},"zones":{"type":["set","string"],"optional":true}},"block_types":{"sku":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"tier":{"type":"string","optional":true,"default":"Premium"}}},"required":true}}}},"azurerm_elastic_san_volume":{"block":{"attributes":{"name":{"type":"string","required":true},"size_in_gib":{"type":"number","required":true},"target_iqn":{"type":"string","computed":true},"target_portal_hostname":{"type":"string","computed":true},"target_portal_port":{"type":"number","computed":true},"volume_group_id":{"type":"string","required":true},"volume_id":{"type":"string","computed":true}},"block_types":{"create_source":{"nesting_mode":3,"block":{"attributes":{"source_id":{"type":"string","required":true},"source_type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_elastic_san_volume_group":{"block":{"attributes":{"elastic_san_id":{"type":"string","required":true},"encryption_type":{"type":"string","optional":true,"default":"EncryptionAtRestWithPlatformKey"},"name":{"type":"string","required":true},"protocol_type":{"type":"string","optional":true,"default":"Iscsi"}},"block_types":{"encryption":{"nesting_mode":3,"block":{"attributes":{"current_versioned_key_expiration_timestamp":{"type":"string","computed":true},"current_versioned_key_id":{"type":"string","computed":true},"key_vault_key_id":{"type":"string","required":true},"last_key_rotation_timestamp":{"type":"string","computed":true},"user_assigned_identity_id":{"type":"string","optional":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"network_rule":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"default":"Allow"},"subnet_id":{"type":"string","required":true}}},"optional":true}}}},"azurerm_email_communication_service":{"block":{"attributes":{"data_location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_email_communication_service_domain":{"block":{"attributes":{"domain_management":{"type":"string","required":true},"email_service_id":{"type":"string","required":true},"from_sender_domain":{"type":"string","computed":true},"mail_from_sender_domain":{"type":"string","computed":true},"name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"user_engagement_tracking_enabled":{"type":"bool","optional":true},"verification_records":{"type":["list",["object",{"dkim":["list",["object",{"name":"string","ttl":"number","type":"string","value":"string"}]],"dkim2":["list",["object",{"name":"string","ttl":"number","type":"string","value":"string"}]],"dmarc":["list",["object",{"name":"string","ttl":"number","type":"string","value":"string"}]],"domain":["list",["object",{"name":"string","ttl":"number","type":"string","value":"string"}]],"spf":["list",["object",{"name":"string","ttl":"number","type":"string","value":"string"}]]}]],"computed":true}}}},"azurerm_eventgrid_domain":{"block":{"attributes":{"auto_create_topic_with_first_subscription":{"type":"bool","optional":true,"default":true},"auto_delete_topic_with_last_subscription":{"type":"bool","optional":true,"default":true},"endpoint":{"type":"string","computed":true},"inbound_ip_rule":{"type":["list",["object",{"action":"string","ip_mask":"string"}]],"optional":true},"input_schema":{"type":"string","optional":true,"default":"EventGridSchema"},"local_auth_enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"primary_access_key":{"type":"string","computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"secondary_access_key":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"input_mapping_default_values":{"nesting_mode":3,"block":{"attributes":{"data_version":{"type":"string","optional":true},"event_type":{"type":"string","optional":true},"subject":{"type":"string","optional":true}}},"optional":true},"input_mapping_fields":{"nesting_mode":3,"block":{"attributes":{"data_version":{"type":"string","optional":true},"event_time":{"type":"string","optional":true},"event_type":{"type":"string","optional":true},"id":{"type":"string","optional":true},"subject":{"type":"string","optional":true},"topic":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_eventgrid_domain_topic":{"block":{"attributes":{"domain_name":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_eventgrid_event_subscription":{"block":{"attributes":{"advanced_filtering_on_arrays_enabled":{"type":"bool","optional":true,"default":false},"event_delivery_schema":{"type":"string","optional":true,"default":"EventGridSchema"},"eventhub_endpoint_id":{"type":"string","optional":true,"computed":true,"conflicts_with":["azure_function_endpoint","hybrid_connection_endpoint_id","service_bus_queue_endpoint_id","service_bus_topic_endpoint_id","storage_queue_endpoint","webhook_endpoint"]},"expiration_time_utc":{"type":"string","optional":true},"hybrid_connection_endpoint_id":{"type":"string","optional":true,"computed":true,"conflicts_with":["azure_function_endpoint","eventhub_endpoint_id","service_bus_queue_endpoint_id","service_bus_topic_endpoint_id","storage_queue_endpoint","webhook_endpoint"]},"included_event_types":{"type":["list","string"],"optional":true,"computed":true},"labels":{"type":["list","string"],"optional":true},"name":{"type":"string","required":true},"scope":{"type":"string","required":true},"service_bus_queue_endpoint_id":{"type":"string","optional":true,"conflicts_with":["azure_function_endpoint","eventhub_endpoint_id","hybrid_connection_endpoint_id","service_bus_topic_endpoint_id","storage_queue_endpoint","webhook_endpoint"]},"service_bus_topic_endpoint_id":{"type":"string","optional":true,"conflicts_with":["azure_function_endpoint","eventhub_endpoint_id","hybrid_connection_endpoint_id","service_bus_queue_endpoint_id","storage_queue_endpoint","webhook_endpoint"]}},"block_types":{"advanced_filter":{"nesting_mode":3,"block":{"block_types":{"bool_equals":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"value":{"type":"bool","required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"is_not_null":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"is_null_or_undefined":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"number_greater_than":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"value":{"type":"number","required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"number_greater_than_or_equals":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"value":{"type":"number","required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"number_in":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list","number"],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"number_in_range":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list",["list","number"]],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"number_less_than":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"value":{"type":"number","required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"number_less_than_or_equals":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"value":{"type":"number","required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"number_not_in":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list","number"],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"number_not_in_range":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list",["list","number"]],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"string_begins_with":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"string_contains":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"string_ends_with":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"string_in":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"string_not_begins_with":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"string_not_contains":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"string_not_ends_with":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"string_not_in":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]}}},"optional":true},"azure_function_endpoint":{"nesting_mode":3,"block":{"attributes":{"function_id":{"type":"string","required":true},"max_events_per_batch":{"type":"number","optional":true},"preferred_batch_size_in_kilobytes":{"type":"number","optional":true}}},"optional":true,"conflicts_with":["eventhub_endpoint_id","hybrid_connection_endpoint_id","service_bus_queue_endpoint_id","service_bus_topic_endpoint_id","storage_queue_endpoint","webhook_endpoint"]},"dead_letter_identity":{"nesting_mode":3,"block":{"attributes":{"type":{"type":"string","required":true},"user_assigned_identity":{"type":"string","optional":true}}},"optional":true},"delivery_identity":{"nesting_mode":3,"block":{"attributes":{"type":{"type":"string","required":true},"user_assigned_identity":{"type":"string","optional":true}}},"optional":true},"delivery_property":{"nesting_mode":3,"block":{"attributes":{"header_name":{"type":"string","required":true},"secret":{"type":"bool","optional":true},"source_field":{"type":"string","optional":true},"type":{"type":"string","required":true},"value":{"type":"string","optional":true}}},"optional":true},"retry_policy":{"nesting_mode":3,"block":{"attributes":{"event_time_to_live":{"type":"number","required":true},"max_delivery_attempts":{"type":"number","required":true}}},"optional":true,"computed":true},"storage_blob_dead_letter_destination":{"nesting_mode":3,"block":{"attributes":{"storage_account_id":{"type":"string","required":true},"storage_blob_container_name":{"type":"string","required":true}}},"optional":true},"storage_queue_endpoint":{"nesting_mode":3,"block":{"attributes":{"queue_message_time_to_live_in_seconds":{"type":"number","optional":true},"queue_name":{"type":"string","required":true},"storage_account_id":{"type":"string","required":true}}},"optional":true,"conflicts_with":["azure_function_endpoint","eventhub_endpoint_id","hybrid_connection_endpoint_id","service_bus_queue_endpoint_id","service_bus_topic_endpoint_id","webhook_endpoint"]},"subject_filter":{"nesting_mode":3,"block":{"attributes":{"case_sensitive":{"type":"bool","optional":true,"at_least_one_of":["subject_filter.0.subject_begins_with","subject_filter.0.subject_ends_with","subject_filter.0.case_sensitive"]},"subject_begins_with":{"type":"string","optional":true,"at_least_one_of":["subject_filter.0.subject_begins_with","subject_filter.0.subject_ends_with","subject_filter.0.case_sensitive"]},"subject_ends_with":{"type":"string","optional":true,"at_least_one_of":["subject_filter.0.subject_begins_with","subject_filter.0.subject_ends_with","subject_filter.0.case_sensitive"]}}},"optional":true},"webhook_endpoint":{"nesting_mode":3,"block":{"attributes":{"active_directory_app_id_or_uri":{"type":"string","optional":true},"active_directory_tenant_id":{"type":"string","optional":true},"base_url":{"type":"string","computed":true},"max_events_per_batch":{"type":"number","optional":true},"preferred_batch_size_in_kilobytes":{"type":"number","optional":true},"url":{"type":"string","required":true}}},"optional":true,"conflicts_with":["azure_function_endpoint","eventhub_endpoint_id","hybrid_connection_endpoint_id","service_bus_queue_endpoint_id","service_bus_topic_endpoint_id","storage_queue_endpoint"]}}}},"azurerm_eventgrid_namespace":{"block":{"attributes":{"capacity":{"type":"number","optional":true,"default":1},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"public_network_access":{"type":"string","optional":true,"default":"Enabled"},"resource_group_name":{"type":"string","required":true},"sku":{"type":"string","optional":true,"default":"Standard"},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"inbound_ip_rule":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"default":"Allow"},"ip_mask":{"type":"string","required":true}}},"optional":true},"topic_spaces_configuration":{"nesting_mode":3,"block":{"attributes":{"alternative_authentication_name_source":{"type":["list","string"],"optional":true},"maximum_client_sessions_per_authentication_name":{"type":"number","optional":true,"default":1},"maximum_session_expiry_in_hours":{"type":"number","optional":true,"default":1},"route_topic_id":{"type":"string","optional":true}},"block_types":{"dynamic_routing_enrichment":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"static_routing_enrichment":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true}}}},"azurerm_eventgrid_system_topic":{"block":{"attributes":{"location":{"type":"string","required":true},"metric_arm_resource_id":{"type":"string","computed":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"source_arm_resource_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"topic_type":{"type":"string","required":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_eventgrid_system_topic_event_subscription":{"block":{"attributes":{"advanced_filtering_on_arrays_enabled":{"type":"bool","optional":true,"default":false},"event_delivery_schema":{"type":"string","optional":true,"default":"EventGridSchema"},"eventhub_endpoint_id":{"type":"string","optional":true,"computed":true,"conflicts_with":["azure_function_endpoint","hybrid_connection_endpoint_id","service_bus_queue_endpoint_id","service_bus_topic_endpoint_id","storage_queue_endpoint","webhook_endpoint"]},"expiration_time_utc":{"type":"string","optional":true},"hybrid_connection_endpoint_id":{"type":"string","optional":true,"computed":true,"conflicts_with":["azure_function_endpoint","eventhub_endpoint_id","service_bus_queue_endpoint_id","service_bus_topic_endpoint_id","storage_queue_endpoint","webhook_endpoint"]},"included_event_types":{"type":["list","string"],"optional":true,"computed":true},"labels":{"type":["list","string"],"optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"service_bus_queue_endpoint_id":{"type":"string","optional":true,"conflicts_with":["azure_function_endpoint","eventhub_endpoint_id","hybrid_connection_endpoint_id","service_bus_topic_endpoint_id","storage_queue_endpoint","webhook_endpoint"]},"service_bus_topic_endpoint_id":{"type":"string","optional":true,"conflicts_with":["azure_function_endpoint","eventhub_endpoint_id","hybrid_connection_endpoint_id","service_bus_queue_endpoint_id","storage_queue_endpoint","webhook_endpoint"]},"system_topic":{"type":"string","required":true}},"block_types":{"advanced_filter":{"nesting_mode":3,"block":{"block_types":{"bool_equals":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"value":{"type":"bool","required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"is_not_null":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"is_null_or_undefined":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"number_greater_than":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"value":{"type":"number","required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"number_greater_than_or_equals":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"value":{"type":"number","required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"number_in":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list","number"],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"number_in_range":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list",["list","number"]],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"number_less_than":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"value":{"type":"number","required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"number_less_than_or_equals":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"value":{"type":"number","required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"number_not_in":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list","number"],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"number_not_in_range":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list",["list","number"]],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"string_begins_with":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"string_contains":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"string_ends_with":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"string_in":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"string_not_begins_with":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"string_not_contains":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"string_not_ends_with":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"string_not_in":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]}}},"optional":true},"azure_function_endpoint":{"nesting_mode":3,"block":{"attributes":{"function_id":{"type":"string","required":true},"max_events_per_batch":{"type":"number","optional":true},"preferred_batch_size_in_kilobytes":{"type":"number","optional":true}}},"optional":true,"conflicts_with":["eventhub_endpoint_id","hybrid_connection_endpoint_id","service_bus_queue_endpoint_id","service_bus_topic_endpoint_id","storage_queue_endpoint","webhook_endpoint"]},"dead_letter_identity":{"nesting_mode":3,"block":{"attributes":{"type":{"type":"string","required":true},"user_assigned_identity":{"type":"string","optional":true}}},"optional":true},"delivery_identity":{"nesting_mode":3,"block":{"attributes":{"type":{"type":"string","required":true},"user_assigned_identity":{"type":"string","optional":true}}},"optional":true},"delivery_property":{"nesting_mode":3,"block":{"attributes":{"header_name":{"type":"string","required":true},"secret":{"type":"bool","optional":true},"source_field":{"type":"string","optional":true},"type":{"type":"string","required":true},"value":{"type":"string","optional":true}}},"optional":true},"retry_policy":{"nesting_mode":3,"block":{"attributes":{"event_time_to_live":{"type":"number","required":true},"max_delivery_attempts":{"type":"number","required":true}}},"optional":true,"computed":true},"storage_blob_dead_letter_destination":{"nesting_mode":3,"block":{"attributes":{"storage_account_id":{"type":"string","required":true},"storage_blob_container_name":{"type":"string","required":true}}},"optional":true},"storage_queue_endpoint":{"nesting_mode":3,"block":{"attributes":{"queue_message_time_to_live_in_seconds":{"type":"number","optional":true},"queue_name":{"type":"string","required":true},"storage_account_id":{"type":"string","required":true}}},"optional":true,"conflicts_with":["azure_function_endpoint","eventhub_endpoint_id","hybrid_connection_endpoint_id","service_bus_queue_endpoint_id","service_bus_topic_endpoint_id","webhook_endpoint"]},"subject_filter":{"nesting_mode":3,"block":{"attributes":{"case_sensitive":{"type":"bool","optional":true,"at_least_one_of":["subject_filter.0.subject_begins_with","subject_filter.0.subject_ends_with","subject_filter.0.case_sensitive"]},"subject_begins_with":{"type":"string","optional":true,"at_least_one_of":["subject_filter.0.subject_begins_with","subject_filter.0.subject_ends_with","subject_filter.0.case_sensitive"]},"subject_ends_with":{"type":"string","optional":true,"at_least_one_of":["subject_filter.0.subject_begins_with","subject_filter.0.subject_ends_with","subject_filter.0.case_sensitive"]}}},"optional":true},"webhook_endpoint":{"nesting_mode":3,"block":{"attributes":{"active_directory_app_id_or_uri":{"type":"string","optional":true},"active_directory_tenant_id":{"type":"string","optional":true},"base_url":{"type":"string","computed":true},"max_events_per_batch":{"type":"number","optional":true},"preferred_batch_size_in_kilobytes":{"type":"number","optional":true},"url":{"type":"string","required":true}}},"optional":true,"conflicts_with":["azure_function_endpoint","eventhub_endpoint_id","hybrid_connection_endpoint_id","service_bus_queue_endpoint_id","service_bus_topic_endpoint_id","storage_queue_endpoint"]}}}},"azurerm_eventgrid_topic":{"block":{"attributes":{"endpoint":{"type":"string","computed":true},"inbound_ip_rule":{"type":["list",["object",{"action":"string","ip_mask":"string"}]],"optional":true},"input_schema":{"type":"string","optional":true,"default":"EventGridSchema"},"local_auth_enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"primary_access_key":{"type":"string","computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"secondary_access_key":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"input_mapping_default_values":{"nesting_mode":3,"block":{"attributes":{"data_version":{"type":"string","optional":true},"event_type":{"type":"string","optional":true},"subject":{"type":"string","optional":true}}},"optional":true},"input_mapping_fields":{"nesting_mode":3,"block":{"attributes":{"data_version":{"type":"string","optional":true},"event_time":{"type":"string","optional":true},"event_type":{"type":"string","optional":true},"id":{"type":"string","optional":true},"subject":{"type":"string","optional":true},"topic":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_eventhub":{"block":{"attributes":{"message_retention":{"type":"number","required":true},"name":{"type":"string","required":true},"namespace_id":{"type":"string","optional":true,"computed":true,"exactly_one_of":["namespace_id","namespace_name"]},"namespace_name":{"type":"string","optional":true,"computed":true,"exactly_one_of":["namespace_id","namespace_name"]},"partition_count":{"type":"number","required":true},"partition_ids":{"type":["set","string"],"computed":true},"resource_group_name":{"type":"string","optional":true,"computed":true,"exactly_one_of":["namespace_id","resource_group_name"]},"status":{"type":"string","optional":true,"default":"Active"}},"block_types":{"capture_description":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","required":true},"encoding":{"type":"string","required":true},"interval_in_seconds":{"type":"number","optional":true,"default":300},"size_limit_in_bytes":{"type":"number","optional":true,"default":314572800},"skip_empty_archives":{"type":"bool","optional":true,"default":false}},"block_types":{"destination":{"nesting_mode":3,"block":{"attributes":{"archive_name_format":{"type":"string","required":true},"blob_container_name":{"type":"string","required":true},"name":{"type":"string","required":true},"storage_account_id":{"type":"string","required":true}}},"required":true}}},"optional":true}}}},"azurerm_eventhub_authorization_rule":{"block":{"attributes":{"eventhub_name":{"type":"string","required":true},"listen":{"type":"bool","optional":true,"default":false},"manage":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"namespace_name":{"type":"string","required":true},"primary_connection_string":{"type":"string","computed":true},"primary_connection_string_alias":{"type":"string","computed":true},"primary_key":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"secondary_connection_string":{"type":"string","computed":true},"secondary_connection_string_alias":{"type":"string","computed":true},"secondary_key":{"type":"string","computed":true},"send":{"type":"bool","optional":true,"default":false}}}},"azurerm_eventhub_cluster":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_eventhub_consumer_group":{"block":{"attributes":{"eventhub_name":{"type":"string","required":true},"name":{"type":"string","required":true},"namespace_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"user_metadata":{"type":"string","optional":true}}}},"azurerm_eventhub_namespace":{"block":{"attributes":{"auto_inflate_enabled":{"type":"bool","optional":true,"default":false},"capacity":{"type":"number","optional":true,"default":1},"dedicated_cluster_id":{"type":"string","optional":true},"default_primary_connection_string":{"type":"string","computed":true},"default_primary_connection_string_alias":{"type":"string","computed":true},"default_primary_key":{"type":"string","computed":true},"default_secondary_connection_string":{"type":"string","computed":true},"default_secondary_connection_string_alias":{"type":"string","computed":true},"default_secondary_key":{"type":"string","computed":true},"local_authentication_enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"maximum_throughput_units":{"type":"number","optional":true},"minimum_tls_version":{"type":"string","optional":true,"default":"1.2"},"name":{"type":"string","required":true},"network_rulesets":{"type":["list",["object",{"default_action":"string","ip_rule":["list",["object",{"action":"string","ip_mask":"string"}]],"public_network_access_enabled":"bool","trusted_service_access_enabled":"bool","virtual_network_rule":["set",["object",{"ignore_missing_virtual_network_service_endpoint":"bool","subnet_id":"string"}]]}]],"optional":true,"computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"sku":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_eventhub_namespace_authorization_rule":{"block":{"attributes":{"listen":{"type":"bool","optional":true,"default":false},"manage":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"namespace_name":{"type":"string","required":true},"primary_connection_string":{"type":"string","computed":true},"primary_connection_string_alias":{"type":"string","computed":true},"primary_key":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"secondary_connection_string":{"type":"string","computed":true},"secondary_connection_string_alias":{"type":"string","computed":true},"secondary_key":{"type":"string","computed":true},"send":{"type":"bool","optional":true,"default":false}}}},"azurerm_eventhub_namespace_customer_managed_key":{"block":{"attributes":{"eventhub_namespace_id":{"type":"string","required":true},"infrastructure_encryption_enabled":{"type":"bool","optional":true,"default":false},"key_vault_key_ids":{"type":["set","string"],"required":true},"user_assigned_identity_id":{"type":"string","optional":true}}}},"azurerm_eventhub_namespace_disaster_recovery_config":{"block":{"attributes":{"name":{"type":"string","required":true},"namespace_name":{"type":"string","required":true},"partner_namespace_id":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_eventhub_namespace_schema_group":{"block":{"attributes":{"name":{"type":"string","required":true},"namespace_id":{"type":"string","required":true},"schema_compatibility":{"type":"string","required":true},"schema_type":{"type":"string","required":true}}}},"azurerm_express_route_circuit":{"block":{"attributes":{"allow_classic_operations":{"type":"bool","optional":true,"default":false},"authorization_key":{"type":"string","optional":true},"bandwidth_in_gbps":{"type":"number","optional":true,"conflicts_with":["bandwidth_in_mbps","peering_location","service_provider_name"],"required_with":["express_route_port_id"]},"bandwidth_in_mbps":{"type":"number","optional":true,"conflicts_with":["bandwidth_in_gbps","express_route_port_id"],"required_with":["peering_location","service_provider_name"]},"express_route_port_id":{"type":"string","optional":true,"conflicts_with":["bandwidth_in_mbps","peering_location","service_provider_name"],"required_with":["bandwidth_in_gbps"]},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"peering_location":{"type":"string","optional":true,"conflicts_with":["bandwidth_in_gbps","express_route_port_id"],"required_with":["bandwidth_in_mbps","service_provider_name"]},"rate_limiting_enabled":{"type":"bool","optional":true,"default":false},"resource_group_name":{"type":"string","required":true},"service_key":{"type":"string","computed":true},"service_provider_name":{"type":"string","optional":true,"conflicts_with":["bandwidth_in_gbps","express_route_port_id"],"required_with":["bandwidth_in_mbps","peering_location"]},"service_provider_provisioning_state":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"sku":{"nesting_mode":3,"block":{"attributes":{"family":{"type":"string","required":true},"tier":{"type":"string","required":true}}},"required":true}}}},"azurerm_express_route_circuit_authorization":{"block":{"attributes":{"authorization_key":{"type":"string","computed":true},"authorization_use_status":{"type":"string","computed":true},"express_route_circuit_name":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_express_route_circuit_connection":{"block":{"attributes":{"address_prefix_ipv4":{"type":"string","required":true},"address_prefix_ipv6":{"type":"string","optional":true},"authorization_key":{"type":"string","optional":true},"name":{"type":"string","required":true},"peer_peering_id":{"type":"string","required":true},"peering_id":{"type":"string","required":true}}}},"azurerm_express_route_circuit_peering":{"block":{"attributes":{"azure_asn":{"type":"number","computed":true},"express_route_circuit_name":{"type":"string","required":true},"gateway_manager_etag":{"type":"string","computed":true},"ipv4_enabled":{"type":"bool","optional":true,"default":true},"peer_asn":{"type":"number","optional":true,"computed":true},"peering_type":{"type":"string","required":true},"primary_azure_port":{"type":"string","computed":true},"primary_peer_address_prefix":{"type":"string","optional":true,"required_with":["secondary_peer_address_prefix"]},"resource_group_name":{"type":"string","required":true},"route_filter_id":{"type":"string","optional":true},"secondary_azure_port":{"type":"string","computed":true},"secondary_peer_address_prefix":{"type":"string","optional":true,"required_with":["primary_peer_address_prefix"]},"shared_key":{"type":"string","optional":true},"vlan_id":{"type":"number","required":true}},"block_types":{"ipv6":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"primary_peer_address_prefix":{"type":"string","required":true},"route_filter_id":{"type":"string","optional":true},"secondary_peer_address_prefix":{"type":"string","required":true}},"block_types":{"microsoft_peering":{"nesting_mode":3,"block":{"attributes":{"advertised_communities":{"type":["list","string"],"optional":true},"advertised_public_prefixes":{"type":["list","string"],"optional":true},"customer_asn":{"type":"number","optional":true,"default":0},"routing_registry_name":{"type":"string","optional":true,"default":"NONE"}}},"optional":true}}},"optional":true},"microsoft_peering_config":{"nesting_mode":3,"block":{"attributes":{"advertised_communities":{"type":["list","string"],"optional":true},"advertised_public_prefixes":{"type":["list","string"],"required":true},"customer_asn":{"type":"number","optional":true,"default":0},"routing_registry_name":{"type":"string","optional":true,"default":"NONE"}}},"optional":true}}}},"azurerm_express_route_connection":{"block":{"attributes":{"authorization_key":{"type":"string","optional":true},"enable_internet_security":{"type":"bool","optional":true},"express_route_circuit_peering_id":{"type":"string","required":true},"express_route_gateway_bypass_enabled":{"type":"bool","optional":true,"default":false},"express_route_gateway_id":{"type":"string","required":true},"name":{"type":"string","required":true},"private_link_fast_path_enabled":{"type":"bool","optional":true},"routing_weight":{"type":"number","optional":true,"default":0}},"block_types":{"routing":{"nesting_mode":3,"block":{"attributes":{"associated_route_table_id":{"type":"string","optional":true,"computed":true,"at_least_one_of":["routing.0.associated_route_table_id","routing.0.propagated_route_table"]},"inbound_route_map_id":{"type":"string","optional":true},"outbound_route_map_id":{"type":"string","optional":true}},"block_types":{"propagated_route_table":{"nesting_mode":3,"block":{"attributes":{"labels":{"type":["set","string"],"optional":true,"computed":true,"at_least_one_of":["routing.0.propagated_route_table.0.labels","routing.0.propagated_route_table.0.route_table_ids"]},"route_table_ids":{"type":["list","string"],"optional":true,"computed":true,"at_least_one_of":["routing.0.propagated_route_table.0.labels","routing.0.propagated_route_table.0.route_table_ids"]}}},"optional":true,"computed":true,"at_least_one_of":["routing.0.associated_route_table_id","routing.0.propagated_route_table"]}}},"optional":true,"computed":true}}}},"azurerm_express_route_gateway":{"block":{"attributes":{"allow_non_virtual_wan_traffic":{"type":"bool","optional":true,"default":false},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"scale_units":{"type":"number","required":true},"tags":{"type":["map","string"],"optional":true},"virtual_hub_id":{"type":"string","required":true}}}},"azurerm_express_route_port":{"block":{"attributes":{"bandwidth_in_gbps":{"type":"number","required":true},"billing_type":{"type":"string","optional":true,"default":"MeteredData"},"encapsulation":{"type":"string","required":true},"ethertype":{"type":"string","computed":true},"guid":{"type":"string","computed":true},"location":{"type":"string","required":true},"mtu":{"type":"string","computed":true},"name":{"type":"string","required":true},"peering_location":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"link1":{"nesting_mode":3,"block":{"attributes":{"admin_enabled":{"type":"bool","optional":true,"default":false},"connector_type":{"type":"string","computed":true},"id":{"type":"string","computed":true},"interface_name":{"type":"string","computed":true},"macsec_cak_keyvault_secret_id":{"type":"string","optional":true},"macsec_cipher":{"type":"string","optional":true,"default":"GcmAes128"},"macsec_ckn_keyvault_secret_id":{"type":"string","optional":true},"macsec_sci_enabled":{"type":"bool","optional":true,"default":false},"patch_panel_id":{"type":"string","computed":true},"rack_id":{"type":"string","computed":true},"router_name":{"type":"string","computed":true}}},"optional":true,"computed":true},"link2":{"nesting_mode":3,"block":{"attributes":{"admin_enabled":{"type":"bool","optional":true,"default":false},"connector_type":{"type":"string","computed":true},"id":{"type":"string","computed":true},"interface_name":{"type":"string","computed":true},"macsec_cak_keyvault_secret_id":{"type":"string","optional":true},"macsec_cipher":{"type":"string","optional":true,"default":"GcmAes128"},"macsec_ckn_keyvault_secret_id":{"type":"string","optional":true},"macsec_sci_enabled":{"type":"bool","optional":true,"default":false},"patch_panel_id":{"type":"string","computed":true},"rack_id":{"type":"string","computed":true},"router_name":{"type":"string","computed":true}}},"optional":true,"computed":true}}}},"azurerm_express_route_port_authorization":{"block":{"attributes":{"authorization_key":{"type":"string","computed":true},"authorization_use_status":{"type":"string","computed":true},"express_route_port_name":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_extended_custom_location":{"block":{"attributes":{"cluster_extension_ids":{"type":["list","string"],"required":true},"display_name":{"type":"string","optional":true},"host_resource_id":{"type":"string","required":true},"host_type":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"namespace":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}},"block_types":{"authentication":{"nesting_mode":3,"block":{"attributes":{"type":{"type":"string","optional":true},"value":{"type":"string","required":true}}},"optional":true}}}},"azurerm_fabric_capacity":{"block":{"attributes":{"administration_members":{"type":["set","string"],"optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"sku":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"tier":{"type":"string","required":true}}},"required":true}}}},"azurerm_federated_identity_credential":{"block":{"attributes":{"audience":{"type":["list","string"],"required":true},"issuer":{"type":"string","required":true},"name":{"type":"string","required":true},"parent_id":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"subject":{"type":"string","required":true}}}},"azurerm_firewall":{"block":{"attributes":{"dns_proxy_enabled":{"type":"bool","optional":true,"computed":true},"dns_servers":{"type":["list","string"],"optional":true},"firewall_policy_id":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"private_ip_ranges":{"type":["set","string"],"optional":true},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","required":true},"sku_tier":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"threat_intel_mode":{"type":"string","optional":true,"computed":true},"zones":{"type":["set","string"],"optional":true}},"block_types":{"ip_configuration":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"private_ip_address":{"type":"string","computed":true},"public_ip_address_id":{"type":"string","optional":true},"subnet_id":{"type":"string","optional":true}}},"optional":true},"management_ip_configuration":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"private_ip_address":{"type":"string","computed":true},"public_ip_address_id":{"type":"string","required":true},"subnet_id":{"type":"string","required":true}}},"optional":true},"virtual_hub":{"nesting_mode":3,"block":{"attributes":{"private_ip_address":{"type":"string","computed":true},"public_ip_addresses":{"type":["list","string"],"computed":true},"public_ip_count":{"type":"number","optional":true,"default":1},"virtual_hub_id":{"type":"string","required":true}}},"optional":true}}}},"azurerm_firewall_application_rule_collection":{"block":{"attributes":{"action":{"type":"string","required":true},"azure_firewall_name":{"type":"string","required":true},"name":{"type":"string","required":true},"priority":{"type":"number","required":true},"resource_group_name":{"type":"string","required":true}},"block_types":{"rule":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"fqdn_tags":{"type":["list","string"],"optional":true},"name":{"type":"string","required":true},"source_addresses":{"type":["list","string"],"optional":true},"source_ip_groups":{"type":["list","string"],"optional":true},"target_fqdns":{"type":["list","string"],"optional":true}},"block_types":{"protocol":{"nesting_mode":3,"block":{"attributes":{"port":{"type":"number","required":true},"type":{"type":"string","required":true}}},"optional":true}}},"required":true}}}},"azurerm_firewall_nat_rule_collection":{"block":{"attributes":{"action":{"type":"string","required":true},"azure_firewall_name":{"type":"string","required":true},"name":{"type":"string","required":true},"priority":{"type":"number","required":true},"resource_group_name":{"type":"string","required":true}},"block_types":{"rule":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"destination_addresses":{"type":["list","string"],"required":true},"destination_ports":{"type":["list","string"],"required":true},"name":{"type":"string","required":true},"protocols":{"type":["list","string"],"required":true},"source_addresses":{"type":["list","string"],"optional":true},"source_ip_groups":{"type":["list","string"],"optional":true},"translated_address":{"type":"string","required":true},"translated_port":{"type":"string","required":true}}},"required":true}}}},"azurerm_firewall_network_rule_collection":{"block":{"attributes":{"action":{"type":"string","required":true},"azure_firewall_name":{"type":"string","required":true},"name":{"type":"string","required":true},"priority":{"type":"number","required":true},"resource_group_name":{"type":"string","required":true}},"block_types":{"rule":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"destination_addresses":{"type":["list","string"],"optional":true},"destination_fqdns":{"type":["list","string"],"optional":true},"destination_ip_groups":{"type":["list","string"],"optional":true},"destination_ports":{"type":["list","string"],"required":true},"name":{"type":"string","required":true},"protocols":{"type":["list","string"],"required":true},"source_addresses":{"type":["list","string"],"optional":true},"source_ip_groups":{"type":["list","string"],"optional":true}}},"required":true}}}},"azurerm_firewall_policy":{"block":{"attributes":{"auto_learn_private_ranges_enabled":{"type":"bool","optional":true},"base_policy_id":{"type":"string","optional":true},"child_policies":{"type":["list","string"],"computed":true},"firewalls":{"type":["list","string"],"computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"private_ip_ranges":{"type":["list","string"],"optional":true},"resource_group_name":{"type":"string","required":true},"rule_collection_groups":{"type":["list","string"],"computed":true},"sku":{"type":"string","optional":true,"default":"Standard"},"sql_redirect_allowed":{"type":"bool","optional":true},"tags":{"type":["map","string"],"optional":true},"threat_intelligence_mode":{"type":"string","optional":true,"default":"Alert"}},"block_types":{"dns":{"nesting_mode":3,"block":{"attributes":{"proxy_enabled":{"type":"bool","optional":true,"default":false},"servers":{"type":["list","string"],"optional":true}}},"optional":true},"explicit_proxy":{"nesting_mode":3,"block":{"attributes":{"enable_pac_file":{"type":"bool","optional":true},"enabled":{"type":"bool","optional":true},"http_port":{"type":"number","optional":true},"https_port":{"type":"number","optional":true},"pac_file":{"type":"string","optional":true},"pac_file_port":{"type":"number","optional":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"insights":{"nesting_mode":3,"block":{"attributes":{"default_log_analytics_workspace_id":{"type":"string","required":true},"enabled":{"type":"bool","required":true},"retention_in_days":{"type":"number","optional":true}},"block_types":{"log_analytics_workspace":{"nesting_mode":3,"block":{"attributes":{"firewall_location":{"type":"string","required":true},"id":{"type":"string","required":true}}},"optional":true}}},"optional":true},"intrusion_detection":{"nesting_mode":3,"block":{"attributes":{"mode":{"type":"string","optional":true},"private_ranges":{"type":["list","string"],"optional":true}},"block_types":{"signature_overrides":{"nesting_mode":3,"block":{"attributes":{"id":{"type":"string","optional":true},"state":{"type":"string","optional":true}}},"optional":true},"traffic_bypass":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"destination_addresses":{"type":["set","string"],"optional":true},"destination_ip_groups":{"type":["set","string"],"optional":true},"destination_ports":{"type":["set","string"],"optional":true},"name":{"type":"string","required":true},"protocol":{"type":"string","required":true},"source_addresses":{"type":["set","string"],"optional":true},"source_ip_groups":{"type":["set","string"],"optional":true}}},"optional":true}}},"optional":true},"threat_intelligence_allowlist":{"nesting_mode":3,"block":{"attributes":{"fqdns":{"type":["set","string"],"optional":true,"at_least_one_of":["threat_intelligence_allowlist.0.ip_addresses","threat_intelligence_allowlist.0.fqdns"]},"ip_addresses":{"type":["set","string"],"optional":true,"at_least_one_of":["threat_intelligence_allowlist.0.ip_addresses","threat_intelligence_allowlist.0.fqdns"]}}},"optional":true},"tls_certificate":{"nesting_mode":3,"block":{"attributes":{"key_vault_secret_id":{"type":"string","required":true},"name":{"type":"string","required":true}}},"optional":true}}}},"azurerm_firewall_policy_rule_collection_group":{"block":{"attributes":{"firewall_policy_id":{"type":"string","required":true},"name":{"type":"string","required":true},"priority":{"type":"number","required":true}},"block_types":{"application_rule_collection":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"name":{"type":"string","required":true},"priority":{"type":"number","required":true}},"block_types":{"rule":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"destination_addresses":{"type":["list","string"],"optional":true},"destination_fqdn_tags":{"type":["list","string"],"optional":true},"destination_fqdns":{"type":["list","string"],"optional":true},"destination_urls":{"type":["list","string"],"optional":true},"name":{"type":"string","required":true},"source_addresses":{"type":["list","string"],"optional":true},"source_ip_groups":{"type":["list","string"],"optional":true},"terminate_tls":{"type":"bool","optional":true},"web_categories":{"type":["list","string"],"optional":true}},"block_types":{"http_headers":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"protocols":{"nesting_mode":3,"block":{"attributes":{"port":{"type":"number","required":true},"type":{"type":"string","required":true}}},"optional":true}}},"required":true}}},"optional":true},"nat_rule_collection":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"name":{"type":"string","required":true},"priority":{"type":"number","required":true}},"block_types":{"rule":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"destination_address":{"type":"string","optional":true},"destination_ports":{"type":["list","string"],"optional":true},"name":{"type":"string","required":true},"protocols":{"type":["list","string"],"required":true},"source_addresses":{"type":["list","string"],"optional":true},"source_ip_groups":{"type":["list","string"],"optional":true},"translated_address":{"type":"string","optional":true},"translated_fqdn":{"type":"string","optional":true},"translated_port":{"type":"number","required":true}}},"required":true}}},"optional":true},"network_rule_collection":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"name":{"type":"string","required":true},"priority":{"type":"number","required":true}},"block_types":{"rule":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"destination_addresses":{"type":["list","string"],"optional":true},"destination_fqdns":{"type":["list","string"],"optional":true},"destination_ip_groups":{"type":["list","string"],"optional":true},"destination_ports":{"type":["list","string"],"required":true},"name":{"type":"string","required":true},"protocols":{"type":["list","string"],"required":true},"source_addresses":{"type":["list","string"],"optional":true},"source_ip_groups":{"type":["list","string"],"optional":true}}},"required":true}}},"optional":true}}}},"azurerm_fluid_relay_server":{"block":{"attributes":{"frs_tenant_id":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"orderer_endpoints":{"type":["list","string"],"computed":true},"primary_key":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"secondary_key":{"type":"string","computed":true},"service_endpoints":{"type":["list","string"],"computed":true},"storage_endpoints":{"type":["list","string"],"computed":true},"storage_sku":{"type":"string","optional":true,"computed":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"customer_managed_key":{"nesting_mode":3,"block":{"attributes":{"key_vault_key_id":{"type":"string","required":true},"user_assigned_identity_id":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_frontdoor":{"block":{"attributes":{"backend_pool_health_probes":{"type":["map","string"],"computed":true},"backend_pool_load_balancing_settings":{"type":["map","string"],"computed":true},"backend_pools":{"type":["map","string"],"computed":true},"cname":{"type":"string","computed":true},"explicit_resource_order":{"type":["list",["object",{"backend_pool_health_probe_ids":["list","string"],"backend_pool_ids":["list","string"],"backend_pool_load_balancing_ids":["list","string"],"frontend_endpoint_ids":["list","string"],"routing_rule_ids":["list","string"]}]],"computed":true},"friendly_name":{"type":"string","optional":true},"frontend_endpoints":{"type":["map","string"],"computed":true},"header_frontdoor_id":{"type":"string","computed":true},"load_balancer_enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"routing_rules":{"type":["map","string"],"computed":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"backend_pool":{"nesting_mode":3,"block":{"attributes":{"health_probe_name":{"type":"string","required":true},"id":{"type":"string","computed":true},"load_balancing_name":{"type":"string","required":true},"name":{"type":"string","required":true}},"block_types":{"backend":{"nesting_mode":3,"block":{"attributes":{"address":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":true},"host_header":{"type":"string","required":true},"http_port":{"type":"number","required":true},"https_port":{"type":"number","required":true},"priority":{"type":"number","optional":true,"default":1},"weight":{"type":"number","optional":true,"default":50}}},"required":true}}},"required":true},"backend_pool_health_probe":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"id":{"type":"string","computed":true},"interval_in_seconds":{"type":"number","optional":true,"default":120},"name":{"type":"string","required":true},"path":{"type":"string","optional":true,"default":"/"},"probe_method":{"type":"string","optional":true,"default":"GET"},"protocol":{"type":"string","optional":true,"default":"Http"}}},"required":true},"backend_pool_load_balancing":{"nesting_mode":3,"block":{"attributes":{"additional_latency_milliseconds":{"type":"number","optional":true,"default":0},"id":{"type":"string","computed":true},"name":{"type":"string","required":true},"sample_size":{"type":"number","optional":true,"default":4},"successful_samples_required":{"type":"number","optional":true,"default":2}}},"required":true},"backend_pool_settings":{"nesting_mode":3,"block":{"attributes":{"backend_pools_send_receive_timeout_seconds":{"type":"number","optional":true,"default":60},"enforce_backend_pools_certificate_name_check":{"type":"bool","required":true}}},"optional":true},"frontend_endpoint":{"nesting_mode":3,"block":{"attributes":{"host_name":{"type":"string","required":true},"id":{"type":"string","computed":true},"name":{"type":"string","required":true},"session_affinity_enabled":{"type":"bool","optional":true,"default":false},"session_affinity_ttl_seconds":{"type":"number","optional":true,"default":0},"web_application_firewall_policy_link_id":{"type":"string","optional":true}}},"required":true},"routing_rule":{"nesting_mode":3,"block":{"attributes":{"accepted_protocols":{"type":["list","string"],"required":true},"enabled":{"type":"bool","optional":true,"default":true},"frontend_endpoints":{"type":["list","string"],"required":true},"id":{"type":"string","computed":true},"name":{"type":"string","required":true},"patterns_to_match":{"type":["list","string"],"required":true}},"block_types":{"forwarding_configuration":{"nesting_mode":3,"block":{"attributes":{"backend_pool_name":{"type":"string","required":true},"cache_duration":{"type":"string","optional":true},"cache_enabled":{"type":"bool","optional":true,"default":false},"cache_query_parameter_strip_directive":{"type":"string","optional":true,"default":"StripAll"},"cache_query_parameters":{"type":["list","string"],"optional":true},"cache_use_dynamic_compression":{"type":"bool","optional":true,"default":false},"custom_forwarding_path":{"type":"string","optional":true},"forwarding_protocol":{"type":"string","optional":true,"default":"HttpsOnly"}}},"optional":true},"redirect_configuration":{"nesting_mode":3,"block":{"attributes":{"custom_fragment":{"type":"string","optional":true},"custom_host":{"type":"string","optional":true},"custom_path":{"type":"string","optional":true},"custom_query_string":{"type":"string","optional":true},"redirect_protocol":{"type":"string","required":true},"redirect_type":{"type":"string","required":true}}},"optional":true}}},"required":true}}}},"azurerm_frontdoor_custom_https_configuration":{"block":{"attributes":{"custom_https_provisioning_enabled":{"type":"bool","required":true},"frontend_endpoint_id":{"type":"string","required":true}},"block_types":{"custom_https_configuration":{"nesting_mode":3,"block":{"attributes":{"azure_key_vault_certificate_secret_name":{"type":"string","optional":true},"azure_key_vault_certificate_secret_version":{"type":"string","optional":true},"azure_key_vault_certificate_vault_id":{"type":"string","optional":true},"certificate_source":{"type":"string","optional":true,"default":"FrontDoor"},"minimum_tls_version":{"type":"string","computed":true},"provisioning_state":{"type":"string","computed":true},"provisioning_substate":{"type":"string","computed":true}}},"optional":true}}}},"azurerm_frontdoor_firewall_policy":{"block":{"attributes":{"custom_block_response_body":{"type":"string","optional":true},"custom_block_response_status_code":{"type":"number","optional":true},"enabled":{"type":"bool","optional":true,"default":true},"frontend_endpoint_ids":{"type":["list","string"],"computed":true},"location":{"type":"string","computed":true},"mode":{"type":"string","optional":true,"default":"Prevention"},"name":{"type":"string","required":true},"redirect_url":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"custom_rule":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"priority":{"type":"number","optional":true,"default":1},"rate_limit_duration_in_minutes":{"type":"number","optional":true,"default":1},"rate_limit_threshold":{"type":"number","optional":true,"default":10},"type":{"type":"string","required":true}},"block_types":{"match_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["list","string"],"required":true},"match_variable":{"type":"string","required":true},"negation_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true},"selector":{"type":"string","optional":true},"transforms":{"type":["list","string"],"optional":true}}},"optional":true}}},"optional":true},"managed_rule":{"nesting_mode":3,"block":{"attributes":{"type":{"type":"string","required":true},"version":{"type":"string","required":true}},"block_types":{"exclusion":{"nesting_mode":3,"block":{"attributes":{"match_variable":{"type":"string","required":true},"operator":{"type":"string","required":true},"selector":{"type":"string","required":true}}},"optional":true},"override":{"nesting_mode":3,"block":{"attributes":{"rule_group_name":{"type":"string","required":true}},"block_types":{"exclusion":{"nesting_mode":3,"block":{"attributes":{"match_variable":{"type":"string","required":true},"operator":{"type":"string","required":true},"selector":{"type":"string","required":true}}},"optional":true},"rule":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":false},"rule_id":{"type":"string","required":true}},"block_types":{"exclusion":{"nesting_mode":3,"block":{"attributes":{"match_variable":{"type":"string","required":true},"operator":{"type":"string","required":true},"selector":{"type":"string","required":true}}},"optional":true}}},"optional":true}}},"optional":true}}},"optional":true}}}},"azurerm_frontdoor_rules_engine":{"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"frontdoor_name":{"type":"string","required":true},"location":{"type":"string","computed":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}},"block_types":{"rule":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"priority":{"type":"number","required":true}},"block_types":{"action":{"nesting_mode":3,"block":{"block_types":{"request_header":{"nesting_mode":3,"block":{"attributes":{"header_action_type":{"type":"string","optional":true},"header_name":{"type":"string","optional":true},"value":{"type":"string","optional":true}}},"optional":true},"response_header":{"nesting_mode":3,"block":{"attributes":{"header_action_type":{"type":"string","optional":true},"header_name":{"type":"string","optional":true},"value":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"match_condition":{"nesting_mode":3,"block":{"attributes":{"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true},"selector":{"type":"string","optional":true},"transform":{"type":["list","string"],"optional":true},"value":{"type":["list","string"],"optional":true},"variable":{"type":"string","optional":true}}},"optional":true}}},"optional":true}}}},"azurerm_function_app":{"block":{"attributes":{"app_service_plan_id":{"type":"string","required":true},"app_settings":{"type":["map","string"],"optional":true,"computed":true},"client_cert_mode":{"type":"string","optional":true},"custom_domain_verification_id":{"type":"string","computed":true},"daily_memory_time_quota":{"type":"number","optional":true},"default_hostname":{"type":"string","computed":true},"enable_builtin_logging":{"type":"bool","optional":true,"default":true},"enabled":{"type":"bool","optional":true,"default":true},"https_only":{"type":"bool","optional":true,"default":false},"key_vault_reference_identity_id":{"type":"string","optional":true,"computed":true},"kind":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"os_type":{"type":"string","optional":true,"default":""},"outbound_ip_addresses":{"type":"string","computed":true},"possible_outbound_ip_addresses":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"site_credential":{"type":["list",["object",{"password":"string","username":"string"}]],"computed":true},"storage_account_access_key":{"type":"string","required":true},"storage_account_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"version":{"type":"string","optional":true,"default":"~1"}},"block_types":{"auth_settings":{"nesting_mode":3,"block":{"attributes":{"additional_login_params":{"type":["map","string"],"optional":true},"allowed_external_redirect_urls":{"type":["list","string"],"optional":true},"default_provider":{"type":"string","optional":true},"enabled":{"type":"bool","required":true},"issuer":{"type":"string","optional":true},"runtime_version":{"type":"string","optional":true},"token_refresh_extension_hours":{"type":"number","optional":true,"default":72},"token_store_enabled":{"type":"bool","optional":true,"default":false},"unauthenticated_client_action":{"type":"string","optional":true}},"block_types":{"active_directory":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true}}},"optional":true},"facebook":{"nesting_mode":3,"block":{"attributes":{"app_id":{"type":"string","required":true},"app_secret":{"type":"string","required":true},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"google":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","required":true},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"microsoft":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","required":true},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"twitter":{"nesting_mode":3,"block":{"attributes":{"consumer_key":{"type":"string","required":true},"consumer_secret":{"type":"string","required":true}}},"optional":true}}},"optional":true,"computed":true},"connection_string":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"type":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true,"computed":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"site_config":{"nesting_mode":3,"block":{"attributes":{"always_on":{"type":"bool","optional":true,"default":false},"app_scale_limit":{"type":"number","optional":true,"computed":true},"auto_swap_slot_name":{"type":"string","optional":true},"dotnet_framework_version":{"type":"string","optional":true,"default":"v4.0"},"elastic_instance_minimum":{"type":"number","optional":true,"computed":true},"ftps_state":{"type":"string","optional":true,"computed":true},"health_check_path":{"type":"string","optional":true},"http2_enabled":{"type":"bool","optional":true,"default":false},"ip_restriction":{"type":["list",["object",{"action":"string","headers":["list",["object",{"x_azure_fdid":["set","string"],"x_fd_health_probe":["set","string"],"x_forwarded_for":["set","string"],"x_forwarded_host":["set","string"]}]],"ip_address":"string","name":"string","priority":"number","service_tag":"string","virtual_network_subnet_id":"string"}]],"optional":true,"computed":true},"java_version":{"type":"string","optional":true},"linux_fx_version":{"type":"string","optional":true,"computed":true},"min_tls_version":{"type":"string","optional":true,"computed":true},"pre_warmed_instance_count":{"type":"number","optional":true,"computed":true},"runtime_scale_monitoring_enabled":{"type":"bool","optional":true,"default":false},"scm_ip_restriction":{"type":["list",["object",{"action":"string","headers":["list",["object",{"x_azure_fdid":["set","string"],"x_fd_health_probe":["set","string"],"x_forwarded_for":["set","string"],"x_forwarded_host":["set","string"]}]],"ip_address":"string","name":"string","priority":"number","service_tag":"string","virtual_network_subnet_id":"string"}]],"optional":true,"computed":true},"scm_type":{"type":"string","optional":true,"computed":true},"scm_use_main_ip_restriction":{"type":"bool","optional":true,"default":false},"use_32_bit_worker_process":{"type":"bool","optional":true,"default":true},"vnet_route_all_enabled":{"type":"bool","optional":true,"computed":true},"websockets_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"cors":{"nesting_mode":3,"block":{"attributes":{"allowed_origins":{"type":["set","string"],"required":true},"support_credentials":{"type":"bool","optional":true,"default":false}}},"optional":true,"computed":true}}},"optional":true,"computed":true},"source_control":{"nesting_mode":3,"block":{"attributes":{"branch":{"type":"string","optional":true,"computed":true,"at_least_one_of":["source_control.0.repo_url","source_control.0.branch","source_control.0.manual_integration","source_control.0.use_mercurial","source_control.0.rollback_enabled"]},"manual_integration":{"type":"bool","optional":true,"computed":true,"at_least_one_of":["source_control.0.repo_url","source_control.0.branch","source_control.0.manual_integration","source_control.0.use_mercurial","source_control.0.rollback_enabled"]},"repo_url":{"type":"string","optional":true,"computed":true,"at_least_one_of":["source_control.0.repo_url","source_control.0.branch","source_control.0.manual_integration","source_control.0.use_mercurial","source_control.0.rollback_enabled"]},"rollback_enabled":{"type":"bool","optional":true,"computed":true,"at_least_one_of":["source_control.0.repo_url","source_control.0.branch","source_control.0.manual_integration","source_control.0.use_mercurial","source_control.0.rollback_enabled"]},"use_mercurial":{"type":"bool","optional":true,"computed":true,"at_least_one_of":["source_control.0.repo_url","source_control.0.branch","source_control.0.manual_integration","source_control.0.use_mercurial","source_control.0.rollback_enabled"]}}},"optional":true,"computed":true,"conflicts_with":["site_config.0.scm_type"]}}}},"azurerm_function_app_active_slot":{"block":{"attributes":{"last_successful_swap":{"type":"string","computed":true},"overwrite_network_config":{"type":"bool","optional":true,"default":true},"slot_id":{"type":"string","required":true}}}},"azurerm_function_app_connection":{"block":{"attributes":{"client_type":{"type":"string","optional":true,"default":"none"},"function_app_id":{"type":"string","required":true},"name":{"type":"string","required":true},"target_resource_id":{"type":"string","required":true},"vnet_solution":{"type":"string","optional":true}},"block_types":{"authentication":{"nesting_mode":3,"block":{"attributes":{"certificate":{"type":"string","optional":true},"client_id":{"type":"string","optional":true},"name":{"type":"string","optional":true},"principal_id":{"type":"string","optional":true},"secret":{"type":"string","optional":true},"subscription_id":{"type":"string","optional":true},"type":{"type":"string","required":true}}},"required":true},"secret_store":{"nesting_mode":3,"block":{"attributes":{"key_vault_id":{"type":"string","required":true}}},"optional":true}}}},"azurerm_function_app_function":{"block":{"attributes":{"config_json":{"type":"string","required":true},"config_url":{"type":"string","computed":true},"enabled":{"type":"bool","optional":true,"default":true},"function_app_id":{"type":"string","required":true},"invocation_url":{"type":"string","computed":true},"language":{"type":"string","optional":true},"name":{"type":"string","required":true},"script_root_path_url":{"type":"string","computed":true},"script_url":{"type":"string","computed":true},"secrets_file_url":{"type":"string","computed":true},"test_data":{"type":"string","optional":true},"test_data_url":{"type":"string","computed":true},"url":{"type":"string","computed":true}},"block_types":{"file":{"nesting_mode":3,"block":{"attributes":{"content":{"type":"string","required":true},"name":{"type":"string","required":true}}},"optional":true}}}},"azurerm_function_app_hybrid_connection":{"block":{"attributes":{"function_app_id":{"type":"string","required":true},"hostname":{"type":"string","required":true},"namespace_name":{"type":"string","computed":true},"port":{"type":"number","required":true},"relay_id":{"type":"string","required":true},"relay_name":{"type":"string","computed":true},"send_key_name":{"type":"string","optional":true,"default":"RootManageSharedAccessKey"},"send_key_value":{"type":"string","computed":true},"service_bus_namespace":{"type":"string","computed":true},"service_bus_suffix":{"type":"string","computed":true}}}},"azurerm_function_app_slot":{"block":{"attributes":{"app_service_plan_id":{"type":"string","required":true},"app_settings":{"type":["map","string"],"optional":true,"computed":true},"daily_memory_time_quota":{"type":"number","optional":true},"default_hostname":{"type":"string","computed":true},"enable_builtin_logging":{"type":"bool","optional":true,"default":true},"enabled":{"type":"bool","optional":true,"default":true},"function_app_name":{"type":"string","required":true},"https_only":{"type":"bool","optional":true,"default":false},"kind":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"os_type":{"type":"string","optional":true},"outbound_ip_addresses":{"type":"string","computed":true},"possible_outbound_ip_addresses":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"site_credential":{"type":["list",["object",{"password":"string","username":"string"}]],"computed":true},"storage_account_access_key":{"type":"string","required":true},"storage_account_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"version":{"type":"string","optional":true,"default":"~1"}},"block_types":{"auth_settings":{"nesting_mode":3,"block":{"attributes":{"additional_login_params":{"type":["map","string"],"optional":true},"allowed_external_redirect_urls":{"type":["list","string"],"optional":true},"default_provider":{"type":"string","optional":true},"enabled":{"type":"bool","required":true},"issuer":{"type":"string","optional":true},"runtime_version":{"type":"string","optional":true},"token_refresh_extension_hours":{"type":"number","optional":true,"default":72},"token_store_enabled":{"type":"bool","optional":true,"default":false},"unauthenticated_client_action":{"type":"string","optional":true}},"block_types":{"active_directory":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true}}},"optional":true},"facebook":{"nesting_mode":3,"block":{"attributes":{"app_id":{"type":"string","required":true},"app_secret":{"type":"string","required":true},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"google":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","required":true},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"microsoft":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","required":true},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"twitter":{"nesting_mode":3,"block":{"attributes":{"consumer_key":{"type":"string","required":true},"consumer_secret":{"type":"string","required":true}}},"optional":true}}},"optional":true,"computed":true},"connection_string":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"type":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true,"computed":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"site_config":{"nesting_mode":3,"block":{"attributes":{"always_on":{"type":"bool","optional":true,"default":false},"app_scale_limit":{"type":"number","optional":true,"computed":true},"auto_swap_slot_name":{"type":"string","optional":true},"dotnet_framework_version":{"type":"string","optional":true,"default":"v4.0"},"elastic_instance_minimum":{"type":"number","optional":true,"computed":true},"ftps_state":{"type":"string","optional":true,"computed":true},"health_check_path":{"type":"string","optional":true},"http2_enabled":{"type":"bool","optional":true,"default":false},"ip_restriction":{"type":["list",["object",{"action":"string","headers":["list",["object",{"x_azure_fdid":["set","string"],"x_fd_health_probe":["set","string"],"x_forwarded_for":["set","string"],"x_forwarded_host":["set","string"]}]],"ip_address":"string","name":"string","priority":"number","service_tag":"string","virtual_network_subnet_id":"string"}]],"optional":true,"computed":true},"java_version":{"type":"string","optional":true},"linux_fx_version":{"type":"string","optional":true,"computed":true},"min_tls_version":{"type":"string","optional":true,"computed":true},"pre_warmed_instance_count":{"type":"number","optional":true,"computed":true},"runtime_scale_monitoring_enabled":{"type":"bool","optional":true,"default":false},"scm_ip_restriction":{"type":["list",["object",{"action":"string","headers":["list",["object",{"x_azure_fdid":["set","string"],"x_fd_health_probe":["set","string"],"x_forwarded_for":["set","string"],"x_forwarded_host":["set","string"]}]],"ip_address":"string","name":"string","priority":"number","service_tag":"string","virtual_network_subnet_id":"string"}]],"optional":true,"computed":true},"scm_type":{"type":"string","optional":true,"computed":true},"scm_use_main_ip_restriction":{"type":"bool","optional":true,"default":false},"use_32_bit_worker_process":{"type":"bool","optional":true,"default":true},"vnet_route_all_enabled":{"type":"bool","optional":true,"computed":true},"websockets_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"cors":{"nesting_mode":3,"block":{"attributes":{"allowed_origins":{"type":["set","string"],"required":true},"support_credentials":{"type":"bool","optional":true,"default":false}}},"optional":true,"computed":true}}},"optional":true,"computed":true}}}},"azurerm_gallery_application":{"block":{"attributes":{"description":{"type":"string","optional":true},"end_of_life_date":{"type":"string","optional":true},"eula":{"type":"string","optional":true},"gallery_id":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"privacy_statement_uri":{"type":"string","optional":true},"release_note_uri":{"type":"string","optional":true},"supported_os_type":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_gallery_application_version":{"block":{"attributes":{"config_file":{"type":"string","optional":true},"enable_health_check":{"type":"bool","optional":true,"default":false},"end_of_life_date":{"type":"string","optional":true},"exclude_from_latest":{"type":"bool","optional":true,"default":false},"gallery_application_id":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"package_file":{"type":"string","optional":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"manage_action":{"nesting_mode":3,"block":{"attributes":{"install":{"type":"string","required":true},"remove":{"type":"string","required":true},"update":{"type":"string","optional":true}}},"required":true},"source":{"nesting_mode":3,"block":{"attributes":{"default_configuration_link":{"type":"string","optional":true},"media_link":{"type":"string","required":true}}},"required":true},"target_region":{"nesting_mode":3,"block":{"attributes":{"exclude_from_latest":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"regional_replica_count":{"type":"number","required":true},"storage_account_type":{"type":"string","optional":true,"default":"Standard_LRS"}}},"required":true}}}},"azurerm_graph_services_account":{"block":{"attributes":{"application_id":{"type":"string","required":true},"billing_plan_id":{"type":"string","computed":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_hdinsight_hadoop_cluster":{"block":{"attributes":{"cluster_version":{"type":"string","required":true},"https_endpoint":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"ssh_endpoint":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true},"tier":{"type":"string","required":true},"tls_min_version":{"type":"string","optional":true}},"block_types":{"component_version":{"nesting_mode":3,"block":{"attributes":{"hadoop":{"type":"string","required":true}}},"required":true},"compute_isolation":{"nesting_mode":3,"block":{"attributes":{"compute_isolation_enabled":{"type":"bool","optional":true,"default":false},"host_sku":{"type":"string","optional":true}}},"optional":true},"disk_encryption":{"nesting_mode":3,"block":{"attributes":{"encryption_algorithm":{"type":"string","optional":true},"encryption_at_host_enabled":{"type":"bool","optional":true},"key_vault_key_id":{"type":"string","optional":true},"key_vault_managed_identity_id":{"type":"string","optional":true}}},"optional":true},"extension":{"nesting_mode":3,"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"primary_key":{"type":"string","required":true}}},"optional":true},"gateway":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","required":true},"username":{"type":"string","required":true}}},"required":true},"metastores":{"nesting_mode":3,"block":{"block_types":{"ambari":{"nesting_mode":3,"block":{"attributes":{"database_name":{"type":"string","required":true},"password":{"type":"string","required":true},"server":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true},"hive":{"nesting_mode":3,"block":{"attributes":{"database_name":{"type":"string","required":true},"password":{"type":"string","required":true},"server":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true},"oozie":{"nesting_mode":3,"block":{"attributes":{"database_name":{"type":"string","required":true},"password":{"type":"string","required":true},"server":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true}}},"optional":true},"monitor":{"nesting_mode":3,"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"primary_key":{"type":"string","required":true}}},"optional":true},"network":{"nesting_mode":3,"block":{"attributes":{"connection_direction":{"type":"string","optional":true,"default":"Inbound"},"private_link_enabled":{"type":"bool","optional":true,"default":false}}},"optional":true},"private_link_configuration":{"nesting_mode":3,"block":{"attributes":{"group_id":{"type":"string","required":true},"name":{"type":"string","required":true}},"block_types":{"ip_configuration":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"primary":{"type":"bool","optional":true},"private_ip_address":{"type":"string","optional":true},"private_ip_allocation_method":{"type":"string","optional":true},"subnet_id":{"type":"string","optional":true}}},"required":true}}},"optional":true},"roles":{"nesting_mode":3,"block":{"block_types":{"edge_node":{"nesting_mode":3,"block":{"attributes":{"target_instance_count":{"type":"number","required":true},"vm_size":{"type":"string","required":true}},"block_types":{"https_endpoints":{"nesting_mode":3,"block":{"attributes":{"access_modes":{"type":["list","string"],"optional":true},"destination_port":{"type":"number","optional":true},"disable_gateway_auth":{"type":"bool","optional":true},"private_ip_address":{"type":"string","optional":true},"sub_domain_suffix":{"type":"string","optional":true}}},"optional":true},"install_script_action":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":"string","optional":true},"uri":{"type":"string","required":true}}},"required":true},"uninstall_script_actions":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":"string","optional":true},"uri":{"type":"string","required":true}}},"optional":true}}},"optional":true},"head_node":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","optional":true},"ssh_keys":{"type":["set","string"],"optional":true,"conflicts_with":["roles.0.head_node.0.password"]},"subnet_id":{"type":"string","optional":true},"username":{"type":"string","required":true},"virtual_network_id":{"type":"string","optional":true},"vm_size":{"type":"string","required":true}},"block_types":{"script_actions":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":"string","optional":true},"uri":{"type":"string","required":true}}},"optional":true}}},"required":true},"worker_node":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","optional":true},"ssh_keys":{"type":["set","string"],"optional":true,"conflicts_with":["roles.0.worker_node.0.password"]},"subnet_id":{"type":"string","optional":true},"target_instance_count":{"type":"number","required":true},"username":{"type":"string","required":true},"virtual_network_id":{"type":"string","optional":true},"vm_size":{"type":"string","required":true}},"block_types":{"autoscale":{"nesting_mode":3,"block":{"block_types":{"capacity":{"nesting_mode":3,"block":{"attributes":{"max_instance_count":{"type":"number","required":true},"min_instance_count":{"type":"number","required":true}}},"optional":true,"conflicts_with":["roles.0.worker_node.0.autoscale.0.recurrence"]},"recurrence":{"nesting_mode":3,"block":{"attributes":{"timezone":{"type":"string","required":true}},"block_types":{"schedule":{"nesting_mode":3,"block":{"attributes":{"days":{"type":["list","string"],"required":true},"target_instance_count":{"type":"number","required":true},"time":{"type":"string","required":true}}},"required":true}}},"optional":true,"conflicts_with":["roles.0.worker_node.0.autoscale.0.capacity"]}}},"optional":true},"script_actions":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":"string","optional":true},"uri":{"type":"string","required":true}}},"optional":true}}},"required":true},"zookeeper_node":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","optional":true},"ssh_keys":{"type":["set","string"],"optional":true,"conflicts_with":["roles.0.zookeeper_node.0.password"]},"subnet_id":{"type":"string","optional":true},"username":{"type":"string","required":true},"virtual_network_id":{"type":"string","optional":true},"vm_size":{"type":"string","required":true}},"block_types":{"script_actions":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":"string","optional":true},"uri":{"type":"string","required":true}}},"optional":true}}},"required":true}}},"required":true},"security_profile":{"nesting_mode":3,"block":{"attributes":{"aadds_resource_id":{"type":"string","required":true},"cluster_users_group_dns":{"type":["set","string"],"optional":true},"domain_name":{"type":"string","required":true},"domain_user_password":{"type":"string","required":true},"domain_username":{"type":"string","required":true},"ldaps_urls":{"type":["set","string"],"required":true},"msi_resource_id":{"type":"string","required":true}}},"optional":true},"storage_account":{"nesting_mode":3,"block":{"attributes":{"is_default":{"type":"bool","required":true},"storage_account_key":{"type":"string","required":true},"storage_container_id":{"type":"string","required":true},"storage_resource_id":{"type":"string","optional":true}}},"optional":true},"storage_account_gen2":{"nesting_mode":3,"block":{"attributes":{"filesystem_id":{"type":"string","required":true},"is_default":{"type":"bool","required":true},"managed_identity_resource_id":{"type":"string","required":true},"storage_resource_id":{"type":"string","required":true}}},"optional":true}}}},"azurerm_hdinsight_hbase_cluster":{"block":{"attributes":{"cluster_version":{"type":"string","required":true},"https_endpoint":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"ssh_endpoint":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true},"tier":{"type":"string","required":true},"tls_min_version":{"type":"string","optional":true}},"block_types":{"component_version":{"nesting_mode":3,"block":{"attributes":{"hbase":{"type":"string","required":true}}},"required":true},"compute_isolation":{"nesting_mode":3,"block":{"attributes":{"compute_isolation_enabled":{"type":"bool","optional":true,"default":false},"host_sku":{"type":"string","optional":true}}},"optional":true},"disk_encryption":{"nesting_mode":3,"block":{"attributes":{"encryption_algorithm":{"type":"string","optional":true},"encryption_at_host_enabled":{"type":"bool","optional":true},"key_vault_key_id":{"type":"string","optional":true},"key_vault_managed_identity_id":{"type":"string","optional":true}}},"optional":true},"extension":{"nesting_mode":3,"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"primary_key":{"type":"string","required":true}}},"optional":true},"gateway":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","required":true},"username":{"type":"string","required":true}}},"required":true},"metastores":{"nesting_mode":3,"block":{"block_types":{"ambari":{"nesting_mode":3,"block":{"attributes":{"database_name":{"type":"string","required":true},"password":{"type":"string","required":true},"server":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true},"hive":{"nesting_mode":3,"block":{"attributes":{"database_name":{"type":"string","required":true},"password":{"type":"string","required":true},"server":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true},"oozie":{"nesting_mode":3,"block":{"attributes":{"database_name":{"type":"string","required":true},"password":{"type":"string","required":true},"server":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true}}},"optional":true},"monitor":{"nesting_mode":3,"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"primary_key":{"type":"string","required":true}}},"optional":true},"network":{"nesting_mode":3,"block":{"attributes":{"connection_direction":{"type":"string","optional":true,"default":"Inbound"},"private_link_enabled":{"type":"bool","optional":true,"default":false}}},"optional":true},"private_link_configuration":{"nesting_mode":3,"block":{"attributes":{"group_id":{"type":"string","required":true},"name":{"type":"string","required":true}},"block_types":{"ip_configuration":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"primary":{"type":"bool","optional":true},"private_ip_address":{"type":"string","optional":true},"private_ip_allocation_method":{"type":"string","optional":true},"subnet_id":{"type":"string","optional":true}}},"required":true}}},"optional":true},"roles":{"nesting_mode":3,"block":{"block_types":{"head_node":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","optional":true},"ssh_keys":{"type":["set","string"],"optional":true,"conflicts_with":["roles.0.head_node.0.password"]},"subnet_id":{"type":"string","optional":true},"username":{"type":"string","required":true},"virtual_network_id":{"type":"string","optional":true},"vm_size":{"type":"string","required":true}},"block_types":{"script_actions":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":"string","optional":true},"uri":{"type":"string","required":true}}},"optional":true}}},"required":true},"worker_node":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","optional":true},"ssh_keys":{"type":["set","string"],"optional":true,"conflicts_with":["roles.0.worker_node.0.password"]},"subnet_id":{"type":"string","optional":true},"target_instance_count":{"type":"number","required":true},"username":{"type":"string","required":true},"virtual_network_id":{"type":"string","optional":true},"vm_size":{"type":"string","required":true}},"block_types":{"autoscale":{"nesting_mode":3,"block":{"block_types":{"recurrence":{"nesting_mode":3,"block":{"attributes":{"timezone":{"type":"string","required":true}},"block_types":{"schedule":{"nesting_mode":3,"block":{"attributes":{"days":{"type":["list","string"],"required":true},"target_instance_count":{"type":"number","required":true},"time":{"type":"string","required":true}}},"required":true}}},"optional":true}}},"optional":true},"script_actions":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":"string","optional":true},"uri":{"type":"string","required":true}}},"optional":true}}},"required":true},"zookeeper_node":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","optional":true},"ssh_keys":{"type":["set","string"],"optional":true,"conflicts_with":["roles.0.zookeeper_node.0.password"]},"subnet_id":{"type":"string","optional":true},"username":{"type":"string","required":true},"virtual_network_id":{"type":"string","optional":true},"vm_size":{"type":"string","required":true}},"block_types":{"script_actions":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":"string","optional":true},"uri":{"type":"string","required":true}}},"optional":true}}},"required":true}}},"required":true},"security_profile":{"nesting_mode":3,"block":{"attributes":{"aadds_resource_id":{"type":"string","required":true},"cluster_users_group_dns":{"type":["set","string"],"optional":true},"domain_name":{"type":"string","required":true},"domain_user_password":{"type":"string","required":true},"domain_username":{"type":"string","required":true},"ldaps_urls":{"type":["set","string"],"required":true},"msi_resource_id":{"type":"string","required":true}}},"optional":true},"storage_account":{"nesting_mode":3,"block":{"attributes":{"is_default":{"type":"bool","required":true},"storage_account_key":{"type":"string","required":true},"storage_container_id":{"type":"string","required":true},"storage_resource_id":{"type":"string","optional":true}}},"optional":true},"storage_account_gen2":{"nesting_mode":3,"block":{"attributes":{"filesystem_id":{"type":"string","required":true},"is_default":{"type":"bool","required":true},"managed_identity_resource_id":{"type":"string","required":true},"storage_resource_id":{"type":"string","required":true}}},"optional":true}}}},"azurerm_hdinsight_interactive_query_cluster":{"block":{"attributes":{"cluster_version":{"type":"string","required":true},"encryption_in_transit_enabled":{"type":"bool","optional":true},"https_endpoint":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"ssh_endpoint":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true},"tier":{"type":"string","required":true},"tls_min_version":{"type":"string","optional":true}},"block_types":{"component_version":{"nesting_mode":3,"block":{"attributes":{"interactive_hive":{"type":"string","required":true}}},"required":true},"compute_isolation":{"nesting_mode":3,"block":{"attributes":{"compute_isolation_enabled":{"type":"bool","optional":true,"default":false},"host_sku":{"type":"string","optional":true}}},"optional":true},"disk_encryption":{"nesting_mode":3,"block":{"attributes":{"encryption_algorithm":{"type":"string","optional":true},"encryption_at_host_enabled":{"type":"bool","optional":true},"key_vault_key_id":{"type":"string","optional":true},"key_vault_managed_identity_id":{"type":"string","optional":true}}},"optional":true},"extension":{"nesting_mode":3,"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"primary_key":{"type":"string","required":true}}},"optional":true},"gateway":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","required":true},"username":{"type":"string","required":true}}},"required":true},"metastores":{"nesting_mode":3,"block":{"block_types":{"ambari":{"nesting_mode":3,"block":{"attributes":{"database_name":{"type":"string","required":true},"password":{"type":"string","required":true},"server":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true},"hive":{"nesting_mode":3,"block":{"attributes":{"database_name":{"type":"string","required":true},"password":{"type":"string","required":true},"server":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true},"oozie":{"nesting_mode":3,"block":{"attributes":{"database_name":{"type":"string","required":true},"password":{"type":"string","required":true},"server":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true}}},"optional":true},"monitor":{"nesting_mode":3,"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"primary_key":{"type":"string","required":true}}},"optional":true},"network":{"nesting_mode":3,"block":{"attributes":{"connection_direction":{"type":"string","optional":true,"default":"Inbound"},"private_link_enabled":{"type":"bool","optional":true,"default":false}}},"optional":true},"private_link_configuration":{"nesting_mode":3,"block":{"attributes":{"group_id":{"type":"string","required":true},"name":{"type":"string","required":true}},"block_types":{"ip_configuration":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"primary":{"type":"bool","optional":true},"private_ip_address":{"type":"string","optional":true},"private_ip_allocation_method":{"type":"string","optional":true},"subnet_id":{"type":"string","optional":true}}},"required":true}}},"optional":true},"roles":{"nesting_mode":3,"block":{"block_types":{"head_node":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","optional":true},"ssh_keys":{"type":["set","string"],"optional":true,"conflicts_with":["roles.0.head_node.0.password"]},"subnet_id":{"type":"string","optional":true},"username":{"type":"string","required":true},"virtual_network_id":{"type":"string","optional":true},"vm_size":{"type":"string","required":true}},"block_types":{"script_actions":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":"string","optional":true},"uri":{"type":"string","required":true}}},"optional":true}}},"required":true},"worker_node":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","optional":true},"ssh_keys":{"type":["set","string"],"optional":true,"conflicts_with":["roles.0.worker_node.0.password"]},"subnet_id":{"type":"string","optional":true},"target_instance_count":{"type":"number","required":true},"username":{"type":"string","required":true},"virtual_network_id":{"type":"string","optional":true},"vm_size":{"type":"string","required":true}},"block_types":{"autoscale":{"nesting_mode":3,"block":{"block_types":{"recurrence":{"nesting_mode":3,"block":{"attributes":{"timezone":{"type":"string","required":true}},"block_types":{"schedule":{"nesting_mode":3,"block":{"attributes":{"days":{"type":["list","string"],"required":true},"target_instance_count":{"type":"number","required":true},"time":{"type":"string","required":true}}},"required":true}}},"optional":true}}},"optional":true},"script_actions":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":"string","optional":true},"uri":{"type":"string","required":true}}},"optional":true}}},"required":true},"zookeeper_node":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","optional":true},"ssh_keys":{"type":["set","string"],"optional":true,"conflicts_with":["roles.0.zookeeper_node.0.password"]},"subnet_id":{"type":"string","optional":true},"username":{"type":"string","required":true},"virtual_network_id":{"type":"string","optional":true},"vm_size":{"type":"string","required":true}},"block_types":{"script_actions":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":"string","optional":true},"uri":{"type":"string","required":true}}},"optional":true}}},"required":true}}},"required":true},"security_profile":{"nesting_mode":3,"block":{"attributes":{"aadds_resource_id":{"type":"string","required":true},"cluster_users_group_dns":{"type":["set","string"],"optional":true},"domain_name":{"type":"string","required":true},"domain_user_password":{"type":"string","required":true},"domain_username":{"type":"string","required":true},"ldaps_urls":{"type":["set","string"],"required":true},"msi_resource_id":{"type":"string","required":true}}},"optional":true},"storage_account":{"nesting_mode":3,"block":{"attributes":{"is_default":{"type":"bool","required":true},"storage_account_key":{"type":"string","required":true},"storage_container_id":{"type":"string","required":true},"storage_resource_id":{"type":"string","optional":true}}},"optional":true},"storage_account_gen2":{"nesting_mode":3,"block":{"attributes":{"filesystem_id":{"type":"string","required":true},"is_default":{"type":"bool","required":true},"managed_identity_resource_id":{"type":"string","required":true},"storage_resource_id":{"type":"string","required":true}}},"optional":true}}}},"azurerm_hdinsight_kafka_cluster":{"block":{"attributes":{"cluster_version":{"type":"string","required":true},"encryption_in_transit_enabled":{"type":"bool","optional":true},"https_endpoint":{"type":"string","computed":true},"kafka_rest_proxy_endpoint":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"ssh_endpoint":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true},"tier":{"type":"string","required":true},"tls_min_version":{"type":"string","optional":true}},"block_types":{"component_version":{"nesting_mode":3,"block":{"attributes":{"kafka":{"type":"string","required":true}}},"required":true},"compute_isolation":{"nesting_mode":3,"block":{"attributes":{"compute_isolation_enabled":{"type":"bool","optional":true,"default":false},"host_sku":{"type":"string","optional":true}}},"optional":true},"disk_encryption":{"nesting_mode":3,"block":{"attributes":{"encryption_algorithm":{"type":"string","optional":true},"encryption_at_host_enabled":{"type":"bool","optional":true},"key_vault_key_id":{"type":"string","optional":true},"key_vault_managed_identity_id":{"type":"string","optional":true}}},"optional":true},"extension":{"nesting_mode":3,"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"primary_key":{"type":"string","required":true}}},"optional":true},"gateway":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","required":true},"username":{"type":"string","required":true}}},"required":true},"metastores":{"nesting_mode":3,"block":{"block_types":{"ambari":{"nesting_mode":3,"block":{"attributes":{"database_name":{"type":"string","required":true},"password":{"type":"string","required":true},"server":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true},"hive":{"nesting_mode":3,"block":{"attributes":{"database_name":{"type":"string","required":true},"password":{"type":"string","required":true},"server":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true},"oozie":{"nesting_mode":3,"block":{"attributes":{"database_name":{"type":"string","required":true},"password":{"type":"string","required":true},"server":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true}}},"optional":true},"monitor":{"nesting_mode":3,"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"primary_key":{"type":"string","required":true}}},"optional":true},"network":{"nesting_mode":3,"block":{"attributes":{"connection_direction":{"type":"string","optional":true,"default":"Inbound"},"private_link_enabled":{"type":"bool","optional":true,"default":false}}},"optional":true},"private_link_configuration":{"nesting_mode":3,"block":{"attributes":{"group_id":{"type":"string","required":true},"name":{"type":"string","required":true}},"block_types":{"ip_configuration":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"primary":{"type":"bool","optional":true},"private_ip_address":{"type":"string","optional":true},"private_ip_allocation_method":{"type":"string","optional":true},"subnet_id":{"type":"string","optional":true}}},"required":true}}},"optional":true},"rest_proxy":{"nesting_mode":3,"block":{"attributes":{"security_group_id":{"type":"string","required":true},"security_group_name":{"type":"string","required":true}}},"optional":true,"required_with":["roles.0.kafka_management_node"]},"roles":{"nesting_mode":3,"block":{"block_types":{"head_node":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","optional":true},"ssh_keys":{"type":["set","string"],"optional":true,"conflicts_with":["roles.0.head_node.0.password"]},"subnet_id":{"type":"string","optional":true},"username":{"type":"string","required":true},"virtual_network_id":{"type":"string","optional":true},"vm_size":{"type":"string","required":true}},"block_types":{"script_actions":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":"string","optional":true},"uri":{"type":"string","required":true}}},"optional":true}}},"required":true},"kafka_management_node":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","optional":true},"ssh_keys":{"type":["set","string"],"optional":true,"conflicts_with":["roles.0.kafka_management_node.0.password"]},"subnet_id":{"type":"string","optional":true},"username":{"type":"string","computed":true},"virtual_network_id":{"type":"string","optional":true},"vm_size":{"type":"string","required":true}},"block_types":{"script_actions":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":"string","optional":true},"uri":{"type":"string","required":true}}},"optional":true}}},"optional":true},"worker_node":{"nesting_mode":3,"block":{"attributes":{"number_of_disks_per_node":{"type":"number","required":true},"password":{"type":"string","optional":true},"ssh_keys":{"type":["set","string"],"optional":true,"conflicts_with":["roles.0.worker_node.0.password"]},"subnet_id":{"type":"string","optional":true},"target_instance_count":{"type":"number","required":true},"username":{"type":"string","required":true},"virtual_network_id":{"type":"string","optional":true},"vm_size":{"type":"string","required":true}},"block_types":{"script_actions":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":"string","optional":true},"uri":{"type":"string","required":true}}},"optional":true}}},"required":true},"zookeeper_node":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","optional":true},"ssh_keys":{"type":["set","string"],"optional":true,"conflicts_with":["roles.0.zookeeper_node.0.password"]},"subnet_id":{"type":"string","optional":true},"username":{"type":"string","required":true},"virtual_network_id":{"type":"string","optional":true},"vm_size":{"type":"string","required":true}},"block_types":{"script_actions":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":"string","optional":true},"uri":{"type":"string","required":true}}},"optional":true}}},"required":true}}},"required":true},"security_profile":{"nesting_mode":3,"block":{"attributes":{"aadds_resource_id":{"type":"string","required":true},"cluster_users_group_dns":{"type":["set","string"],"optional":true},"domain_name":{"type":"string","required":true},"domain_user_password":{"type":"string","required":true},"domain_username":{"type":"string","required":true},"ldaps_urls":{"type":["set","string"],"required":true},"msi_resource_id":{"type":"string","required":true}}},"optional":true},"storage_account":{"nesting_mode":3,"block":{"attributes":{"is_default":{"type":"bool","required":true},"storage_account_key":{"type":"string","required":true},"storage_container_id":{"type":"string","required":true},"storage_resource_id":{"type":"string","optional":true}}},"optional":true},"storage_account_gen2":{"nesting_mode":3,"block":{"attributes":{"filesystem_id":{"type":"string","required":true},"is_default":{"type":"bool","required":true},"managed_identity_resource_id":{"type":"string","required":true},"storage_resource_id":{"type":"string","required":true}}},"optional":true}}}},"azurerm_hdinsight_spark_cluster":{"block":{"attributes":{"cluster_version":{"type":"string","required":true},"encryption_in_transit_enabled":{"type":"bool","optional":true},"https_endpoint":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"ssh_endpoint":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true},"tier":{"type":"string","required":true},"tls_min_version":{"type":"string","optional":true}},"block_types":{"component_version":{"nesting_mode":3,"block":{"attributes":{"spark":{"type":"string","required":true}}},"required":true},"compute_isolation":{"nesting_mode":3,"block":{"attributes":{"compute_isolation_enabled":{"type":"bool","optional":true,"default":false},"host_sku":{"type":"string","optional":true}}},"optional":true},"disk_encryption":{"nesting_mode":3,"block":{"attributes":{"encryption_algorithm":{"type":"string","optional":true},"encryption_at_host_enabled":{"type":"bool","optional":true},"key_vault_key_id":{"type":"string","optional":true},"key_vault_managed_identity_id":{"type":"string","optional":true}}},"optional":true},"extension":{"nesting_mode":3,"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"primary_key":{"type":"string","required":true}}},"optional":true},"gateway":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","required":true},"username":{"type":"string","required":true}}},"required":true},"metastores":{"nesting_mode":3,"block":{"block_types":{"ambari":{"nesting_mode":3,"block":{"attributes":{"database_name":{"type":"string","required":true},"password":{"type":"string","required":true},"server":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true},"hive":{"nesting_mode":3,"block":{"attributes":{"database_name":{"type":"string","required":true},"password":{"type":"string","required":true},"server":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true},"oozie":{"nesting_mode":3,"block":{"attributes":{"database_name":{"type":"string","required":true},"password":{"type":"string","required":true},"server":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true}}},"optional":true},"monitor":{"nesting_mode":3,"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"primary_key":{"type":"string","required":true}}},"optional":true},"network":{"nesting_mode":3,"block":{"attributes":{"connection_direction":{"type":"string","optional":true,"default":"Inbound"},"private_link_enabled":{"type":"bool","optional":true,"default":false}}},"optional":true},"private_link_configuration":{"nesting_mode":3,"block":{"attributes":{"group_id":{"type":"string","required":true},"name":{"type":"string","required":true}},"block_types":{"ip_configuration":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"primary":{"type":"bool","optional":true},"private_ip_address":{"type":"string","optional":true},"private_ip_allocation_method":{"type":"string","optional":true},"subnet_id":{"type":"string","optional":true}}},"required":true}}},"optional":true},"roles":{"nesting_mode":3,"block":{"block_types":{"head_node":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","optional":true},"ssh_keys":{"type":["set","string"],"optional":true,"conflicts_with":["roles.0.head_node.0.password"]},"subnet_id":{"type":"string","optional":true},"username":{"type":"string","required":true},"virtual_network_id":{"type":"string","optional":true},"vm_size":{"type":"string","required":true}},"block_types":{"script_actions":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":"string","optional":true},"uri":{"type":"string","required":true}}},"optional":true}}},"required":true},"worker_node":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","optional":true},"ssh_keys":{"type":["set","string"],"optional":true,"conflicts_with":["roles.0.worker_node.0.password"]},"subnet_id":{"type":"string","optional":true},"target_instance_count":{"type":"number","required":true},"username":{"type":"string","required":true},"virtual_network_id":{"type":"string","optional":true},"vm_size":{"type":"string","required":true}},"block_types":{"autoscale":{"nesting_mode":3,"block":{"block_types":{"capacity":{"nesting_mode":3,"block":{"attributes":{"max_instance_count":{"type":"number","required":true},"min_instance_count":{"type":"number","required":true}}},"optional":true,"conflicts_with":["roles.0.worker_node.0.autoscale.0.recurrence"]},"recurrence":{"nesting_mode":3,"block":{"attributes":{"timezone":{"type":"string","required":true}},"block_types":{"schedule":{"nesting_mode":3,"block":{"attributes":{"days":{"type":["list","string"],"required":true},"target_instance_count":{"type":"number","required":true},"time":{"type":"string","required":true}}},"required":true}}},"optional":true,"conflicts_with":["roles.0.worker_node.0.autoscale.0.capacity"]}}},"optional":true},"script_actions":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":"string","optional":true},"uri":{"type":"string","required":true}}},"optional":true}}},"required":true},"zookeeper_node":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","optional":true},"ssh_keys":{"type":["set","string"],"optional":true,"conflicts_with":["roles.0.zookeeper_node.0.password"]},"subnet_id":{"type":"string","optional":true},"username":{"type":"string","required":true},"virtual_network_id":{"type":"string","optional":true},"vm_size":{"type":"string","required":true}},"block_types":{"script_actions":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":"string","optional":true},"uri":{"type":"string","required":true}}},"optional":true}}},"required":true}}},"required":true},"security_profile":{"nesting_mode":3,"block":{"attributes":{"aadds_resource_id":{"type":"string","required":true},"cluster_users_group_dns":{"type":["set","string"],"optional":true},"domain_name":{"type":"string","required":true},"domain_user_password":{"type":"string","required":true},"domain_username":{"type":"string","required":true},"ldaps_urls":{"type":["set","string"],"required":true},"msi_resource_id":{"type":"string","required":true}}},"optional":true},"storage_account":{"nesting_mode":3,"block":{"attributes":{"is_default":{"type":"bool","required":true},"storage_account_key":{"type":"string","required":true},"storage_container_id":{"type":"string","required":true},"storage_resource_id":{"type":"string","optional":true}}},"optional":true},"storage_account_gen2":{"nesting_mode":3,"block":{"attributes":{"filesystem_id":{"type":"string","required":true},"is_default":{"type":"bool","required":true},"managed_identity_resource_id":{"type":"string","required":true},"storage_resource_id":{"type":"string","required":true}}},"optional":true}}}},"azurerm_healthbot":{"block":{"attributes":{"bot_management_portal_url":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_healthcare_dicom_service":{"block":{"attributes":{"authentication":{"type":["list",["object",{"audience":["list","string"],"authority":"string"}]],"computed":true},"data_partitions_enabled":{"type":"bool","optional":true,"default":false},"encryption_key_url":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"private_endpoint":{"type":["set",["object",{"id":"string","name":"string"}]],"computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"service_url":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true},"workspace_id":{"type":"string","required":true}},"block_types":{"cors":{"nesting_mode":3,"block":{"attributes":{"allow_credentials":{"type":"bool","optional":true,"default":false},"allowed_headers":{"type":["list","string"],"optional":true},"allowed_methods":{"type":["list","string"],"optional":true},"allowed_origins":{"type":["list","string"],"optional":true},"max_age_in_seconds":{"type":"number","optional":true}}},"optional":true,"computed":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"storage":{"nesting_mode":3,"block":{"attributes":{"file_system_name":{"type":"string","required":true},"storage_account_id":{"type":"string","required":true}}},"optional":true,"computed":true}}}},"azurerm_healthcare_fhir_service":{"block":{"attributes":{"access_policy_object_ids":{"type":["set","string"],"optional":true},"configuration_export_storage_account_name":{"type":"string","optional":true},"container_registry_login_server_url":{"type":["set","string"],"optional":true},"kind":{"type":"string","optional":true,"default":"fhir-R4"},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"public_network_access_enabled":{"type":"bool","computed":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"workspace_id":{"type":"string","required":true}},"block_types":{"authentication":{"nesting_mode":3,"block":{"attributes":{"audience":{"type":"string","required":true},"authority":{"type":"string","required":true},"smart_proxy_enabled":{"type":"bool","optional":true}}},"required":true},"cors":{"nesting_mode":3,"block":{"attributes":{"allowed_headers":{"type":["set","string"],"required":true},"allowed_methods":{"type":["set","string"],"required":true},"allowed_origins":{"type":["set","string"],"required":true},"credentials_allowed":{"type":"bool","optional":true,"default":false},"max_age_in_seconds":{"type":"number","optional":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"oci_artifact":{"nesting_mode":3,"block":{"attributes":{"digest":{"type":"string","optional":true},"image_name":{"type":"string","optional":true},"login_server":{"type":"string","required":true}}},"optional":true}}}},"azurerm_healthcare_medtech_service":{"block":{"attributes":{"device_mapping_json":{"type":"string","required":true},"eventhub_consumer_group_name":{"type":"string","required":true},"eventhub_name":{"type":"string","required":true},"eventhub_namespace_name":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"workspace_id":{"type":"string","required":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_healthcare_medtech_service_fhir_destination":{"block":{"attributes":{"destination_fhir_mapping_json":{"type":"string","required":true},"destination_fhir_service_id":{"type":"string","required":true},"destination_identity_resolution_type":{"type":"string","required":true},"location":{"type":"string","required":true},"medtech_service_id":{"type":"string","required":true},"name":{"type":"string","required":true}}}},"azurerm_healthcare_service":{"block":{"attributes":{"access_policy_object_ids":{"type":["set","string"],"optional":true},"configuration_export_storage_account_name":{"type":"string","optional":true},"cosmosdb_key_vault_key_versionless_id":{"type":"string","optional":true},"cosmosdb_throughput":{"type":"number","optional":true,"default":1000},"kind":{"type":"string","optional":true,"default":"fhir"},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"authentication_configuration":{"nesting_mode":3,"block":{"attributes":{"audience":{"type":"string","optional":true,"at_least_one_of":["authentication_configuration.0.authority","authentication_configuration.0.audience","authentication_configuration.0.smart_proxy_enabled"]},"authority":{"type":"string","optional":true,"at_least_one_of":["authentication_configuration.0.authority","authentication_configuration.0.audience","authentication_configuration.0.smart_proxy_enabled"]},"smart_proxy_enabled":{"type":"bool","optional":true,"at_least_one_of":["authentication_configuration.0.authority","authentication_configuration.0.audience","authentication_configuration.0.smart_proxy_enabled"]}}},"optional":true,"computed":true},"cors_configuration":{"nesting_mode":3,"block":{"attributes":{"allow_credentials":{"type":"bool","optional":true,"at_least_one_of":["cors_configuration.0.allowed_origins","cors_configuration.0.allowed_headers","cors_configuration.0.allowed_methods","cors_configuration.0.max_age_in_seconds","cors_configuration.0.allow_credentials"]},"allowed_headers":{"type":["set","string"],"optional":true,"at_least_one_of":["cors_configuration.0.allowed_origins","cors_configuration.0.allowed_headers","cors_configuration.0.allowed_methods","cors_configuration.0.max_age_in_seconds","cors_configuration.0.allow_credentials"]},"allowed_methods":{"type":["list","string"],"optional":true,"at_least_one_of":["cors_configuration.0.allowed_origins","cors_configuration.0.allowed_headers","cors_configuration.0.allowed_methods","cors_configuration.0.max_age_in_seconds","cors_configuration.0.allow_credentials"]},"allowed_origins":{"type":["set","string"],"optional":true,"at_least_one_of":["cors_configuration.0.allowed_origins","cors_configuration.0.allowed_headers","cors_configuration.0.allowed_methods","cors_configuration.0.max_age_in_seconds","cors_configuration.0.allow_credentials"]},"max_age_in_seconds":{"type":"number","optional":true,"at_least_one_of":["cors_configuration.0.allowed_origins","cors_configuration.0.allowed_headers","cors_configuration.0.allowed_methods","cors_configuration.0.max_age_in_seconds","cors_configuration.0.allow_credentials"]}}},"optional":true,"computed":true},"identity":{"nesting_mode":3,"block":{"attributes":{"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_healthcare_workspace":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"private_endpoint_connection":{"type":["set",["object",{"id":"string","name":"string"}]],"computed":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_hpc_cache":{"block":{"attributes":{"automatically_rotate_key_to_latest_enabled":{"type":"bool","optional":true,"required_with":["key_vault_key_id"]},"cache_size_in_gb":{"type":"number","required":true},"key_vault_key_id":{"type":"string","optional":true,"required_with":["identity"]},"location":{"type":"string","required":true},"mount_addresses":{"type":["list","string"],"computed":true},"mtu":{"type":"number","optional":true,"default":1500},"name":{"type":"string","required":true},"ntp_server":{"type":"string","optional":true,"default":"time.windows.com"},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","required":true},"subnet_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"default_access_policy":{"nesting_mode":3,"block":{"block_types":{"access_rule":{"nesting_mode":4,"block":{"attributes":{"access":{"type":"string","required":true},"anonymous_gid":{"type":"number","optional":true},"anonymous_uid":{"type":"number","optional":true},"filter":{"type":"string","optional":true},"root_squash_enabled":{"type":"bool","optional":true},"scope":{"type":"string","required":true},"submount_access_enabled":{"type":"bool","optional":true},"suid_enabled":{"type":"bool","optional":true}}},"required":true}}},"optional":true,"computed":true},"directory_active_directory":{"nesting_mode":3,"block":{"attributes":{"cache_netbios_name":{"type":"string","required":true},"dns_primary_ip":{"type":"string","required":true},"dns_secondary_ip":{"type":"string","optional":true},"domain_name":{"type":"string","required":true},"domain_netbios_name":{"type":"string","required":true},"password":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true,"conflicts_with":["directory_flat_file","directory_ldap"]},"directory_flat_file":{"nesting_mode":3,"block":{"attributes":{"group_file_uri":{"type":"string","required":true},"password_file_uri":{"type":"string","required":true}}},"optional":true,"conflicts_with":["directory_active_directory","directory_ldap"]},"directory_ldap":{"nesting_mode":3,"block":{"attributes":{"base_dn":{"type":"string","required":true},"certificate_validation_uri":{"type":"string","optional":true},"download_certificate_automatically":{"type":"bool","optional":true,"required_with":["directory_ldap.0.certificate_validation_uri"]},"encrypted":{"type":"bool","optional":true},"server":{"type":"string","required":true}},"block_types":{"bind":{"nesting_mode":3,"block":{"attributes":{"dn":{"type":"string","required":true},"password":{"type":"string","required":true}}},"optional":true,"computed":true}}},"optional":true,"conflicts_with":["directory_active_directory","directory_flat_file"]},"dns":{"nesting_mode":3,"block":{"attributes":{"search_domain":{"type":"string","optional":true},"servers":{"type":["list","string"],"required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_hpc_cache_access_policy":{"block":{"attributes":{"hpc_cache_id":{"type":"string","required":true},"name":{"type":"string","required":true}},"block_types":{"access_rule":{"nesting_mode":4,"block":{"attributes":{"access":{"type":"string","required":true},"anonymous_gid":{"type":"number","optional":true},"anonymous_uid":{"type":"number","optional":true},"filter":{"type":"string","optional":true},"root_squash_enabled":{"type":"bool","optional":true},"scope":{"type":"string","required":true},"submount_access_enabled":{"type":"bool","optional":true},"suid_enabled":{"type":"bool","optional":true}}},"required":true}}}},"azurerm_hpc_cache_blob_nfs_target":{"block":{"attributes":{"access_policy_name":{"type":"string","optional":true,"default":"default"},"cache_name":{"type":"string","required":true},"name":{"type":"string","required":true},"namespace_path":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"storage_container_id":{"type":"string","required":true},"usage_model":{"type":"string","required":true},"verification_timer_in_seconds":{"type":"number","optional":true},"write_back_timer_in_seconds":{"type":"number","optional":true}}}},"azurerm_hpc_cache_blob_target":{"block":{"attributes":{"access_policy_name":{"type":"string","optional":true,"default":"default"},"cache_name":{"type":"string","required":true},"name":{"type":"string","required":true},"namespace_path":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"storage_container_id":{"type":"string","required":true}}}},"azurerm_hpc_cache_nfs_target":{"block":{"attributes":{"cache_name":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"target_host_name":{"type":"string","required":true},"usage_model":{"type":"string","required":true},"verification_timer_in_seconds":{"type":"number","optional":true},"write_back_timer_in_seconds":{"type":"number","optional":true}},"block_types":{"namespace_junction":{"nesting_mode":4,"block":{"attributes":{"access_policy_name":{"type":"string","optional":true,"default":"default"},"namespace_path":{"type":"string","required":true},"nfs_export":{"type":"string","required":true},"target_path":{"type":"string","optional":true,"default":""}}},"required":true}}}},"azurerm_image":{"block":{"attributes":{"hyper_v_generation":{"type":"string","optional":true,"default":"V1"},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"source_virtual_machine_id":{"type":"string","optional":true},"tags":{"type":["map","string"],"optional":true},"zone_resilient":{"type":"bool","optional":true,"default":false}},"block_types":{"data_disk":{"nesting_mode":3,"block":{"attributes":{"blob_uri":{"type":"string","optional":true,"computed":true},"caching":{"type":"string","optional":true,"default":"None"},"disk_encryption_set_id":{"type":"string","optional":true},"lun":{"type":"number","optional":true},"managed_disk_id":{"type":"string","optional":true},"size_gb":{"type":"number","optional":true,"computed":true},"storage_type":{"type":"string","required":true}}},"optional":true},"os_disk":{"nesting_mode":3,"block":{"attributes":{"blob_uri":{"type":"string","optional":true,"computed":true},"caching":{"type":"string","optional":true,"default":"None"},"disk_encryption_set_id":{"type":"string","optional":true},"managed_disk_id":{"type":"string","optional":true,"computed":true},"os_state":{"type":"string","optional":true},"os_type":{"type":"string","optional":true},"size_gb":{"type":"number","optional":true,"computed":true},"storage_type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_iot_security_device_group":{"block":{"attributes":{"iothub_id":{"type":"string","required":true},"name":{"type":"string","required":true}},"block_types":{"allow_rule":{"nesting_mode":3,"block":{"attributes":{"connection_from_ips_not_allowed":{"type":["set","string"],"optional":true,"at_least_one_of":["allow_rule.0.connection_from_ips_not_allowed","allow_rule.0.connection_to_ips_not_allowed","allow_rule.0.local_users_not_allowed","allow_rule.0.processes_not_allowed"]},"connection_to_ips_not_allowed":{"type":["set","string"],"optional":true,"at_least_one_of":["allow_rule.0.connection_from_ips_not_allowed","allow_rule.0.connection_to_ips_not_allowed","allow_rule.0.local_users_not_allowed","allow_rule.0.processes_not_allowed"]},"local_users_not_allowed":{"type":["set","string"],"optional":true,"at_least_one_of":["allow_rule.0.connection_from_ips_not_allowed","allow_rule.0.connection_to_ips_not_allowed","allow_rule.0.local_users_not_allowed","allow_rule.0.processes_not_allowed"]},"processes_not_allowed":{"type":["set","string"],"optional":true,"at_least_one_of":["allow_rule.0.connection_from_ips_not_allowed","allow_rule.0.connection_to_ips_not_allowed","allow_rule.0.local_users_not_allowed","allow_rule.0.processes_not_allowed"]}}},"optional":true},"range_rule":{"nesting_mode":4,"block":{"attributes":{"duration":{"type":"string","required":true},"max":{"type":"number","required":true},"min":{"type":"number","required":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_iot_security_solution":{"block":{"attributes":{"disabled_data_sources":{"type":["set","string"],"optional":true},"display_name":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":true},"events_to_export":{"type":["set","string"],"optional":true},"iothub_ids":{"type":["set","string"],"required":true},"location":{"type":"string","required":true},"log_analytics_workspace_id":{"type":"string","optional":true},"log_unmasked_ips_enabled":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"query_for_resources":{"type":"string","optional":true,"computed":true},"query_subscription_ids":{"type":["set","string"],"optional":true,"computed":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"additional_workspace":{"nesting_mode":4,"block":{"attributes":{"data_types":{"type":["set","string"],"required":true},"workspace_id":{"type":"string","required":true}}},"optional":true},"recommendations_enabled":{"nesting_mode":3,"block":{"attributes":{"acr_authentication":{"type":"bool","optional":true,"default":true},"agent_send_unutilized_msg":{"type":"bool","optional":true,"default":true},"baseline":{"type":"bool","optional":true,"default":true},"edge_hub_mem_optimize":{"type":"bool","optional":true,"default":true},"edge_logging_option":{"type":"bool","optional":true,"default":true},"inconsistent_module_settings":{"type":"bool","optional":true,"default":true},"install_agent":{"type":"bool","optional":true,"default":true},"ip_filter_deny_all":{"type":"bool","optional":true,"default":true},"ip_filter_permissive_rule":{"type":"bool","optional":true,"default":true},"open_ports":{"type":"bool","optional":true,"default":true},"permissive_firewall_policy":{"type":"bool","optional":true,"default":true},"permissive_input_firewall_rules":{"type":"bool","optional":true,"default":true},"permissive_output_firewall_rules":{"type":"bool","optional":true,"default":true},"privileged_docker_options":{"type":"bool","optional":true,"default":true},"shared_credentials":{"type":"bool","optional":true,"default":true},"vulnerable_tls_cipher_suite":{"type":"bool","optional":true,"default":true}}},"optional":true,"computed":true}}}},"azurerm_iotcentral_application":{"block":{"attributes":{"display_name":{"type":"string","optional":true,"computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"sku":{"type":"string","optional":true,"default":"ST1"},"sub_domain":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"template":{"type":"string","optional":true,"default":"iotc-pnp-preview@1.0.0"}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_iotcentral_application_network_rule_set":{"block":{"attributes":{"apply_to_device":{"type":"bool","optional":true,"default":true},"default_action":{"type":"string","optional":true,"default":"Deny"},"iotcentral_application_id":{"type":"string","required":true}},"block_types":{"ip_rule":{"nesting_mode":3,"block":{"attributes":{"ip_mask":{"type":"string","required":true},"name":{"type":"string","required":true}}},"optional":true}}}},"azurerm_iotcentral_organization":{"block":{"attributes":{"display_name":{"type":"string","required":true},"iotcentral_application_id":{"type":"string","required":true},"organization_id":{"type":"string","required":true},"parent_organization_id":{"type":"string","optional":true}}}},"azurerm_iothub":{"block":{"attributes":{"endpoint":{"type":["list",["object",{"authentication_type":"string","batch_frequency_in_seconds":"number","connection_string":"string","container_name":"string","encoding":"string","endpoint_uri":"string","entity_path":"string","file_name_format":"string","identity_id":"string","max_chunk_size_in_bytes":"number","name":"string","resource_group_name":"string","type":"string"}]],"optional":true,"computed":true},"enrichment":{"type":["list",["object",{"endpoint_names":["list","string"],"key":"string","value":"string"}]],"optional":true,"computed":true},"event_hub_events_endpoint":{"type":"string","computed":true},"event_hub_events_namespace":{"type":"string","computed":true},"event_hub_events_path":{"type":"string","computed":true},"event_hub_operations_endpoint":{"type":"string","computed":true},"event_hub_operations_path":{"type":"string","computed":true},"event_hub_partition_count":{"type":"number","optional":true,"default":4},"event_hub_retention_in_days":{"type":"number","optional":true,"default":1},"hostname":{"type":"string","computed":true},"local_authentication_enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"min_tls_version":{"type":"string","optional":true},"name":{"type":"string","required":true},"public_network_access_enabled":{"type":"bool","optional":true},"resource_group_name":{"type":"string","required":true},"route":{"type":["list",["object",{"condition":"string","enabled":"bool","endpoint_names":["list","string"],"name":"string","source":"string"}]],"optional":true,"computed":true},"shared_access_policy":{"type":["list",["object",{"key_name":"string","permissions":"string","primary_key":"string","secondary_key":"string"}]],"computed":true},"tags":{"type":["map","string"],"optional":true},"type":{"type":"string","computed":true}},"block_types":{"cloud_to_device":{"nesting_mode":3,"block":{"attributes":{"default_ttl":{"type":"string","optional":true,"default":"PT1H"},"max_delivery_count":{"type":"number","optional":true,"default":10}},"block_types":{"feedback":{"nesting_mode":3,"block":{"attributes":{"lock_duration":{"type":"string","optional":true,"default":"PT60S"},"max_delivery_count":{"type":"number","optional":true,"default":10},"time_to_live":{"type":"string","optional":true,"default":"PT1H"}}},"optional":true}}},"optional":true,"computed":true},"fallback_route":{"nesting_mode":3,"block":{"attributes":{"condition":{"type":"string","optional":true,"default":"true"},"enabled":{"type":"bool","optional":true,"default":true},"endpoint_names":{"type":["list","string"],"optional":true,"computed":true},"source":{"type":"string","optional":true,"default":"DeviceMessages"}}},"optional":true,"computed":true},"file_upload":{"nesting_mode":3,"block":{"attributes":{"authentication_type":{"type":"string","optional":true,"default":"keyBased"},"connection_string":{"type":"string","required":true},"container_name":{"type":"string","required":true},"default_ttl":{"type":"string","optional":true,"default":"PT1H"},"identity_id":{"type":"string","optional":true},"lock_duration":{"type":"string","optional":true,"default":"PT1M"},"max_delivery_count":{"type":"number","optional":true,"default":10},"notifications":{"type":"bool","optional":true,"default":false},"sas_ttl":{"type":"string","optional":true,"default":"PT1H"}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"network_rule_set":{"nesting_mode":3,"block":{"attributes":{"apply_to_builtin_eventhub_endpoint":{"type":"bool","optional":true,"default":false},"default_action":{"type":"string","optional":true,"default":"Deny"}},"block_types":{"ip_rule":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"default":"Allow"},"ip_mask":{"type":"string","required":true},"name":{"type":"string","required":true}}},"optional":true}}},"optional":true},"sku":{"nesting_mode":3,"block":{"attributes":{"capacity":{"type":"number","required":true},"name":{"type":"string","required":true}}},"required":true}}}},"azurerm_iothub_certificate":{"block":{"attributes":{"certificate_content":{"type":"string","required":true},"iothub_name":{"type":"string","required":true},"is_verified":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_iothub_consumer_group":{"block":{"attributes":{"eventhub_endpoint_name":{"type":"string","required":true},"iothub_name":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_iothub_device_update_account":{"block":{"attributes":{"host_name":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"sku":{"type":"string","optional":true,"default":"Standard"},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_iothub_device_update_instance":{"block":{"attributes":{"device_update_account_id":{"type":"string","required":true},"diagnostic_enabled":{"type":"bool","optional":true,"default":false},"iothub_id":{"type":"string","required":true},"name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"diagnostic_storage_account":{"nesting_mode":3,"block":{"attributes":{"connection_string":{"type":"string","required":true},"id":{"type":"string","required":true}}},"optional":true}}}},"azurerm_iothub_dps":{"block":{"attributes":{"allocation_policy":{"type":"string","optional":true,"default":"Hashed"},"data_residency_enabled":{"type":"bool","optional":true,"default":false},"device_provisioning_host_name":{"type":"string","computed":true},"id_scope":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"service_operations_host_name":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"ip_filter_rule":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"ip_mask":{"type":"string","required":true},"name":{"type":"string","required":true},"target":{"type":"string","optional":true}}},"optional":true},"linked_hub":{"nesting_mode":3,"block":{"attributes":{"allocation_weight":{"type":"number","optional":true,"default":1},"apply_allocation_policy":{"type":"bool","optional":true,"default":true},"connection_string":{"type":"string","required":true},"hostname":{"type":"string","computed":true},"location":{"type":"string","required":true}}},"optional":true},"sku":{"nesting_mode":3,"block":{"attributes":{"capacity":{"type":"number","required":true},"name":{"type":"string","required":true}}},"required":true}}}},"azurerm_iothub_dps_certificate":{"block":{"attributes":{"certificate_content":{"type":"string","required":true},"iot_dps_name":{"type":"string","required":true},"is_verified":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_iothub_dps_shared_access_policy":{"block":{"attributes":{"enrollment_read":{"type":"bool","optional":true,"default":false},"enrollment_write":{"type":"bool","optional":true,"default":false},"iothub_dps_name":{"type":"string","required":true},"name":{"type":"string","required":true},"primary_connection_string":{"type":"string","computed":true},"primary_key":{"type":"string","computed":true},"registration_read":{"type":"bool","optional":true,"default":false},"registration_write":{"type":"bool","optional":true,"default":false},"resource_group_name":{"type":"string","required":true},"secondary_connection_string":{"type":"string","computed":true},"secondary_key":{"type":"string","computed":true},"service_config":{"type":"bool","optional":true,"default":false}}}},"azurerm_iothub_endpoint_cosmosdb_account":{"block":{"attributes":{"authentication_type":{"type":"string","optional":true,"default":"keyBased"},"container_name":{"type":"string","required":true},"database_name":{"type":"string","required":true},"endpoint_uri":{"type":"string","required":true},"identity_id":{"type":"string","optional":true,"conflicts_with":["primary_key","secondary_key"]},"iothub_id":{"type":"string","required":true},"name":{"type":"string","required":true},"partition_key_name":{"type":"string","optional":true,"required_with":["partition_key_template"]},"partition_key_template":{"type":"string","optional":true,"required_with":["partition_key_name"]},"primary_key":{"type":"string","optional":true,"conflicts_with":["identity_id"],"required_with":["secondary_key"]},"resource_group_name":{"type":"string","required":true},"secondary_key":{"type":"string","optional":true,"conflicts_with":["identity_id"],"required_with":["primary_key"]}}}},"azurerm_iothub_endpoint_eventhub":{"block":{"attributes":{"authentication_type":{"type":"string","optional":true,"default":"keyBased"},"connection_string":{"type":"string","optional":true,"conflicts_with":["identity_id"],"exactly_one_of":["endpoint_uri","connection_string"]},"endpoint_uri":{"type":"string","optional":true,"exactly_one_of":["endpoint_uri","connection_string"],"required_with":["entity_path"]},"entity_path":{"type":"string","optional":true,"required_with":["endpoint_uri"]},"identity_id":{"type":"string","optional":true,"conflicts_with":["connection_string"]},"iothub_id":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_iothub_endpoint_servicebus_queue":{"block":{"attributes":{"authentication_type":{"type":"string","optional":true,"default":"keyBased"},"connection_string":{"type":"string","optional":true,"conflicts_with":["identity_id"],"exactly_one_of":["endpoint_uri","connection_string"]},"endpoint_uri":{"type":"string","optional":true,"exactly_one_of":["endpoint_uri","connection_string"],"required_with":["entity_path"]},"entity_path":{"type":"string","optional":true,"required_with":["endpoint_uri"]},"identity_id":{"type":"string","optional":true,"conflicts_with":["connection_string"]},"iothub_id":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_iothub_endpoint_servicebus_topic":{"block":{"attributes":{"authentication_type":{"type":"string","optional":true,"default":"keyBased"},"connection_string":{"type":"string","optional":true,"conflicts_with":["identity_id"],"exactly_one_of":["endpoint_uri","connection_string"]},"endpoint_uri":{"type":"string","optional":true,"exactly_one_of":["endpoint_uri","connection_string"],"required_with":["entity_path"]},"entity_path":{"type":"string","optional":true,"required_with":["endpoint_uri"]},"identity_id":{"type":"string","optional":true,"conflicts_with":["connection_string"]},"iothub_id":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_iothub_endpoint_storage_container":{"block":{"attributes":{"authentication_type":{"type":"string","optional":true,"default":"keyBased"},"batch_frequency_in_seconds":{"type":"number","optional":true,"default":300},"connection_string":{"type":"string","optional":true,"conflicts_with":["identity_id"],"exactly_one_of":["endpoint_uri","connection_string"]},"container_name":{"type":"string","required":true},"encoding":{"type":"string","optional":true,"default":"Avro"},"endpoint_uri":{"type":"string","optional":true,"exactly_one_of":["endpoint_uri","connection_string"]},"file_name_format":{"type":"string","optional":true,"default":"{iothub}/{partition}/{YYYY}/{MM}/{DD}/{HH}/{mm}"},"identity_id":{"type":"string","optional":true,"conflicts_with":["connection_string"]},"iothub_id":{"type":"string","required":true},"max_chunk_size_in_bytes":{"type":"number","optional":true,"default":314572800},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_iothub_enrichment":{"block":{"attributes":{"endpoint_names":{"type":["list","string"],"required":true},"iothub_name":{"type":"string","required":true},"key":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"value":{"type":"string","required":true}}}},"azurerm_iothub_fallback_route":{"block":{"attributes":{"condition":{"type":"string","optional":true,"default":"true"},"enabled":{"type":"bool","required":true},"endpoint_names":{"type":["list","string"],"required":true},"iothub_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"source":{"type":"string","optional":true,"default":"DeviceMessages"}}}},"azurerm_iothub_file_upload":{"block":{"attributes":{"authentication_type":{"type":"string","optional":true,"default":"keyBased"},"connection_string":{"type":"string","required":true},"container_name":{"type":"string","required":true},"default_ttl":{"type":"string","optional":true,"default":"PT1H"},"identity_id":{"type":"string","optional":true},"iothub_id":{"type":"string","required":true},"lock_duration":{"type":"string","optional":true,"default":"PT1M"},"max_delivery_count":{"type":"number","optional":true,"default":10},"notifications_enabled":{"type":"bool","optional":true,"default":false},"sas_ttl":{"type":"string","optional":true,"default":"PT1H"}}}},"azurerm_iothub_route":{"block":{"attributes":{"condition":{"type":"string","optional":true,"default":"true"},"enabled":{"type":"bool","required":true},"endpoint_names":{"type":["list","string"],"required":true},"iothub_name":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"source":{"type":"string","required":true}}}},"azurerm_iothub_shared_access_policy":{"block":{"attributes":{"device_connect":{"type":"bool","optional":true,"default":false},"iothub_name":{"type":"string","required":true},"name":{"type":"string","required":true},"primary_connection_string":{"type":"string","computed":true},"primary_key":{"type":"string","computed":true},"registry_read":{"type":"bool","optional":true,"default":false},"registry_write":{"type":"bool","optional":true,"default":false},"resource_group_name":{"type":"string","required":true},"secondary_connection_string":{"type":"string","computed":true},"secondary_key":{"type":"string","computed":true},"service_connect":{"type":"bool","optional":true,"default":false}}}},"azurerm_ip_group":{"block":{"attributes":{"cidrs":{"type":["set","string"],"optional":true},"firewall_ids":{"type":["list","string"],"computed":true},"firewall_policy_ids":{"type":["list","string"],"computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_ip_group_cidr":{"block":{"attributes":{"cidr":{"type":"string","required":true},"ip_group_id":{"type":"string","required":true}}}},"azurerm_key_vault":{"block":{"attributes":{"access_policy":{"type":["list",["object",{"application_id":"string","certificate_permissions":["list","string"],"key_permissions":["list","string"],"object_id":"string","secret_permissions":["list","string"],"storage_permissions":["list","string"],"tenant_id":"string"}]],"optional":true,"computed":true},"enable_rbac_authorization":{"type":"bool","optional":true},"enabled_for_deployment":{"type":"bool","optional":true},"enabled_for_disk_encryption":{"type":"bool","optional":true},"enabled_for_template_deployment":{"type":"bool","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"purge_protection_enabled":{"type":"bool","optional":true},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","required":true},"soft_delete_retention_days":{"type":"number","optional":true,"default":90},"tags":{"type":["map","string"],"optional":true},"tenant_id":{"type":"string","required":true},"vault_uri":{"type":"string","computed":true}},"block_types":{"contact":{"nesting_mode":4,"block":{"attributes":{"email":{"type":"string","required":true},"name":{"type":"string","optional":true},"phone":{"type":"string","optional":true}}},"optional":true,"computed":true},"network_acls":{"nesting_mode":3,"block":{"attributes":{"bypass":{"type":"string","required":true},"default_action":{"type":"string","required":true},"ip_rules":{"type":["set","string"],"optional":true},"virtual_network_subnet_ids":{"type":["set","string"],"optional":true}}},"optional":true,"computed":true}}}},"azurerm_key_vault_access_policy":{"block":{"attributes":{"application_id":{"type":"string","optional":true},"certificate_permissions":{"type":["list","string"],"optional":true},"key_permissions":{"type":["list","string"],"optional":true},"key_vault_id":{"type":"string","required":true},"object_id":{"type":"string","required":true},"secret_permissions":{"type":["list","string"],"optional":true},"storage_permissions":{"type":["list","string"],"optional":true},"tenant_id":{"type":"string","required":true}}}},"azurerm_key_vault_certificate":{"block":{"attributes":{"certificate_attribute":{"type":["list",["object",{"created":"string","enabled":"bool","expires":"string","not_before":"string","recovery_level":"string","updated":"string"}]],"computed":true},"certificate_data":{"type":"string","computed":true},"certificate_data_base64":{"type":"string","computed":true},"key_vault_id":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_manager_id":{"type":"string","computed":true},"resource_manager_versionless_id":{"type":"string","computed":true},"secret_id":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true},"thumbprint":{"type":"string","computed":true},"version":{"type":"string","computed":true},"versionless_id":{"type":"string","computed":true},"versionless_secret_id":{"type":"string","computed":true}},"block_types":{"certificate":{"nesting_mode":3,"block":{"attributes":{"contents":{"type":"string","required":true},"password":{"type":"string","optional":true}}},"optional":true,"at_least_one_of":["certificate_policy","certificate"]},"certificate_policy":{"nesting_mode":3,"block":{"block_types":{"issuer_parameters":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true}}},"required":true},"key_properties":{"nesting_mode":3,"block":{"attributes":{"curve":{"type":"string","optional":true,"computed":true},"exportable":{"type":"bool","required":true},"key_size":{"type":"number","optional":true,"computed":true},"key_type":{"type":"string","required":true},"reuse_key":{"type":"bool","required":true}}},"required":true},"lifetime_action":{"nesting_mode":3,"block":{"block_types":{"action":{"nesting_mode":3,"block":{"attributes":{"action_type":{"type":"string","required":true}}},"required":true},"trigger":{"nesting_mode":3,"block":{"attributes":{"days_before_expiry":{"type":"number","optional":true},"lifetime_percentage":{"type":"number","optional":true}}},"required":true}}},"optional":true},"secret_properties":{"nesting_mode":3,"block":{"attributes":{"content_type":{"type":"string","required":true}}},"required":true},"x509_certificate_properties":{"nesting_mode":3,"block":{"attributes":{"extended_key_usage":{"type":["list","string"],"optional":true,"computed":true},"key_usage":{"type":["set","string"],"required":true},"subject":{"type":"string","required":true},"validity_in_months":{"type":"number","required":true}},"block_types":{"subject_alternative_names":{"nesting_mode":3,"block":{"attributes":{"dns_names":{"type":["set","string"],"optional":true,"at_least_one_of":["certificate_policy.0.x509_certificate_properties.0.subject_alternative_names.0.emails","certificate_policy.0.x509_certificate_properties.0.subject_alternative_names.0.dns_names","certificate_policy.0.x509_certificate_properties.0.subject_alternative_names.0.upns"]},"emails":{"type":["set","string"],"optional":true,"at_least_one_of":["certificate_policy.0.x509_certificate_properties.0.subject_alternative_names.0.emails","certificate_policy.0.x509_certificate_properties.0.subject_alternative_names.0.dns_names","certificate_policy.0.x509_certificate_properties.0.subject_alternative_names.0.upns"]},"upns":{"type":["set","string"],"optional":true,"at_least_one_of":["certificate_policy.0.x509_certificate_properties.0.subject_alternative_names.0.emails","certificate_policy.0.x509_certificate_properties.0.subject_alternative_names.0.dns_names","certificate_policy.0.x509_certificate_properties.0.subject_alternative_names.0.upns"]}}},"optional":true,"computed":true}}},"optional":true,"computed":true}}},"optional":true,"computed":true,"at_least_one_of":["certificate_policy","certificate"]}}}},"azurerm_key_vault_certificate_contacts":{"block":{"attributes":{"key_vault_id":{"type":"string","required":true}},"block_types":{"contact":{"nesting_mode":4,"block":{"attributes":{"email":{"type":"string","required":true},"name":{"type":"string","optional":true},"phone":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_key_vault_certificate_issuer":{"block":{"attributes":{"account_id":{"type":"string","optional":true},"key_vault_id":{"type":"string","required":true},"name":{"type":"string","required":true},"org_id":{"type":"string","optional":true},"password":{"type":"string","optional":true},"provider_name":{"type":"string","required":true}},"block_types":{"admin":{"nesting_mode":3,"block":{"attributes":{"email_address":{"type":"string","required":true},"first_name":{"type":"string","optional":true},"last_name":{"type":"string","optional":true},"phone":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_key_vault_key":{"block":{"attributes":{"curve":{"type":"string","optional":true,"computed":true,"conflicts_with":["key_size"]},"e":{"type":"string","computed":true},"expiration_date":{"type":"string","optional":true},"key_opts":{"type":["list","string"],"required":true},"key_size":{"type":"number","optional":true,"conflicts_with":["curve"]},"key_type":{"type":"string","required":true},"key_vault_id":{"type":"string","required":true},"n":{"type":"string","computed":true},"name":{"type":"string","required":true},"not_before_date":{"type":"string","optional":true},"public_key_openssh":{"type":"string","computed":true},"public_key_pem":{"type":"string","computed":true},"resource_id":{"type":"string","computed":true},"resource_versionless_id":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true},"version":{"type":"string","computed":true},"versionless_id":{"type":"string","computed":true},"x":{"type":"string","computed":true},"y":{"type":"string","computed":true}},"block_types":{"rotation_policy":{"nesting_mode":3,"block":{"attributes":{"expire_after":{"type":"string","optional":true,"at_least_one_of":["rotation_policy.0.expire_after","rotation_policy.0.automatic"],"required_with":["rotation_policy.0.expire_after","rotation_policy.0.notify_before_expiry"]},"notify_before_expiry":{"type":"string","optional":true,"required_with":["rotation_policy.0.expire_after","rotation_policy.0.notify_before_expiry"]}},"block_types":{"automatic":{"nesting_mode":3,"block":{"attributes":{"time_after_creation":{"type":"string","optional":true,"at_least_one_of":["rotation_policy.0.automatic.0.time_after_creation","rotation_policy.0.automatic.0.time_before_expiry"]},"time_before_expiry":{"type":"string","optional":true,"at_least_one_of":["rotation_policy.0.automatic.0.time_after_creation","rotation_policy.0.automatic.0.time_before_expiry"]}}},"optional":true}}},"optional":true}}}},"azurerm_key_vault_managed_hardware_security_module":{"block":{"attributes":{"admin_object_ids":{"type":["set","string"],"required":true},"hsm_uri":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"purge_protection_enabled":{"type":"bool","optional":true},"resource_group_name":{"type":"string","required":true},"security_domain_encrypted_data":{"type":"string","computed":true},"security_domain_key_vault_certificate_ids":{"type":["list","string"],"optional":true,"required_with":["security_domain_quorum"]},"security_domain_quorum":{"type":"number","optional":true,"required_with":["security_domain_key_vault_certificate_ids"]},"sku_name":{"type":"string","required":true},"soft_delete_retention_days":{"type":"number","optional":true,"default":90},"tags":{"type":["map","string"],"optional":true},"tenant_id":{"type":"string","required":true}},"block_types":{"network_acls":{"nesting_mode":3,"block":{"attributes":{"bypass":{"type":"string","required":true},"default_action":{"type":"string","required":true}}},"optional":true,"computed":true}}}},"azurerm_key_vault_managed_hardware_security_module_key":{"block":{"attributes":{"curve":{"type":"string","optional":true,"exactly_one_of":["key_size"]},"expiration_date":{"type":"string","optional":true},"key_opts":{"type":["set","string"],"required":true},"key_size":{"type":"number","optional":true,"exactly_one_of":["curve"]},"key_type":{"type":"string","required":true},"managed_hsm_id":{"type":"string","required":true},"name":{"type":"string","required":true},"not_before_date":{"type":"string","optional":true},"tags":{"type":["map","string"],"optional":true},"versioned_id":{"type":"string","computed":true}}}},"azurerm_key_vault_managed_hardware_security_module_key_rotation_policy":{"block":{"attributes":{"expire_after":{"type":"string","required":true},"managed_hsm_key_id":{"type":"string","required":true},"time_after_creation":{"type":"string","optional":true,"exactly_one_of":["time_after_creation","time_before_expiry"]},"time_before_expiry":{"type":"string","optional":true,"exactly_one_of":["time_after_creation","time_before_expiry"]}}}},"azurerm_key_vault_managed_hardware_security_module_role_assignment":{"block":{"attributes":{"managed_hsm_id":{"type":"string","required":true},"name":{"type":"string","required":true},"principal_id":{"type":"string","required":true},"resource_id":{"type":"string","computed":true},"role_definition_id":{"type":"string","required":true},"scope":{"type":"string","required":true}}}},"azurerm_key_vault_managed_hardware_security_module_role_definition":{"block":{"attributes":{"description":{"type":"string","optional":true},"managed_hsm_id":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_manager_id":{"type":"string","computed":true},"role_name":{"type":"string","optional":true},"role_type":{"type":"string","computed":true}},"block_types":{"permission":{"nesting_mode":3,"block":{"attributes":{"actions":{"type":["list","string"],"optional":true},"data_actions":{"type":["set","string"],"optional":true},"not_actions":{"type":["list","string"],"optional":true},"not_data_actions":{"type":["set","string"],"optional":true}}},"optional":true}}}},"azurerm_key_vault_managed_storage_account":{"block":{"attributes":{"key_vault_id":{"type":"string","required":true},"name":{"type":"string","required":true},"regenerate_key_automatically":{"type":"bool","optional":true,"default":false,"required_with":["regeneration_period"]},"regeneration_period":{"type":"string","optional":true,"required_with":["regenerate_key_automatically"]},"storage_account_id":{"type":"string","required":true},"storage_account_key":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_key_vault_managed_storage_account_sas_token_definition":{"block":{"attributes":{"managed_storage_account_id":{"type":"string","required":true},"name":{"type":"string","required":true},"sas_template_uri":{"type":"string","required":true},"sas_type":{"type":"string","required":true},"secret_id":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true},"validity_period":{"type":"string","required":true}}}},"azurerm_key_vault_secret":{"block":{"attributes":{"content_type":{"type":"string","optional":true},"expiration_date":{"type":"string","optional":true},"key_vault_id":{"type":"string","required":true},"name":{"type":"string","required":true},"not_before_date":{"type":"string","optional":true},"resource_id":{"type":"string","computed":true},"resource_versionless_id":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true},"value":{"type":"string","required":true},"version":{"type":"string","computed":true},"versionless_id":{"type":"string","computed":true}}}},"azurerm_kubernetes_cluster":{"block":{"attributes":{"automatic_upgrade_channel":{"type":"string","optional":true},"azure_policy_enabled":{"type":"bool","optional":true},"cost_analysis_enabled":{"type":"bool","optional":true},"current_kubernetes_version":{"type":"string","computed":true},"disk_encryption_set_id":{"type":"string","optional":true},"dns_prefix":{"type":"string","optional":true,"exactly_one_of":["dns_prefix","dns_prefix_private_cluster"]},"dns_prefix_private_cluster":{"type":"string","optional":true,"exactly_one_of":["dns_prefix","dns_prefix_private_cluster"]},"edge_zone":{"type":"string","optional":true},"fqdn":{"type":"string","computed":true},"http_application_routing_enabled":{"type":"bool","optional":true},"http_application_routing_zone_name":{"type":"string","computed":true},"image_cleaner_enabled":{"type":"bool","optional":true},"image_cleaner_interval_hours":{"type":"number","optional":true},"kube_admin_config":{"type":["list",["object",{"client_certificate":"string","client_key":"string","cluster_ca_certificate":"string","host":"string","password":"string","username":"string"}]],"computed":true},"kube_admin_config_raw":{"type":"string","computed":true},"kube_config":{"type":["list",["object",{"client_certificate":"string","client_key":"string","cluster_ca_certificate":"string","host":"string","password":"string","username":"string"}]],"computed":true},"kube_config_raw":{"type":"string","computed":true},"kubernetes_version":{"type":"string","optional":true,"computed":true},"local_account_disabled":{"type":"bool","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"node_os_upgrade_channel":{"type":"string","optional":true,"default":"NodeImage"},"node_resource_group":{"type":"string","optional":true,"computed":true},"node_resource_group_id":{"type":"string","computed":true},"oidc_issuer_enabled":{"type":"bool","optional":true},"oidc_issuer_url":{"type":"string","computed":true},"open_service_mesh_enabled":{"type":"bool","optional":true},"portal_fqdn":{"type":"string","computed":true},"private_cluster_enabled":{"type":"bool","optional":true,"default":false},"private_cluster_public_fqdn_enabled":{"type":"bool","optional":true,"default":false},"private_dns_zone_id":{"type":"string","optional":true,"computed":true},"private_fqdn":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"role_based_access_control_enabled":{"type":"bool","optional":true,"default":true},"run_command_enabled":{"type":"bool","optional":true,"default":true},"sku_tier":{"type":"string","optional":true,"default":"Free"},"support_plan":{"type":"string","optional":true,"default":"KubernetesOfficial"},"tags":{"type":["map","string"],"optional":true},"workload_identity_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"aci_connector_linux":{"nesting_mode":3,"block":{"attributes":{"connector_identity":{"type":["list",["object",{"client_id":"string","object_id":"string","user_assigned_identity_id":"string"}]],"computed":true},"subnet_name":{"type":"string","required":true}}},"optional":true},"api_server_access_profile":{"nesting_mode":3,"block":{"attributes":{"authorized_ip_ranges":{"type":["set","string"],"optional":true}}},"optional":true},"auto_scaler_profile":{"nesting_mode":3,"block":{"attributes":{"balance_similar_node_groups":{"type":"bool","optional":true,"default":false},"daemonset_eviction_for_empty_nodes_enabled":{"type":"bool","optional":true,"default":false},"daemonset_eviction_for_occupied_nodes_enabled":{"type":"bool","optional":true,"default":true},"empty_bulk_delete_max":{"type":"string","optional":true,"computed":true},"expander":{"type":"string","optional":true,"default":"random"},"ignore_daemonsets_utilization_enabled":{"type":"bool","optional":true,"default":false},"max_graceful_termination_sec":{"type":"string","optional":true,"computed":true},"max_node_provisioning_time":{"type":"string","optional":true,"default":"15m"},"max_unready_nodes":{"type":"number","optional":true,"default":3},"max_unready_percentage":{"type":"number","optional":true,"default":45},"new_pod_scale_up_delay":{"type":"string","optional":true,"computed":true},"scale_down_delay_after_add":{"type":"string","optional":true,"computed":true},"scale_down_delay_after_delete":{"type":"string","optional":true,"computed":true},"scale_down_delay_after_failure":{"type":"string","optional":true,"computed":true},"scale_down_unneeded":{"type":"string","optional":true,"computed":true},"scale_down_unready":{"type":"string","optional":true,"computed":true},"scale_down_utilization_threshold":{"type":"string","optional":true,"computed":true},"scan_interval":{"type":"string","optional":true,"computed":true},"skip_nodes_with_local_storage":{"type":"bool","optional":true},"skip_nodes_with_system_pods":{"type":"bool","optional":true,"default":true}}},"optional":true,"computed":true},"azure_active_directory_role_based_access_control":{"nesting_mode":3,"block":{"attributes":{"admin_group_object_ids":{"type":["list","string"],"optional":true,"at_least_one_of":["azure_active_directory_role_based_access_control.0.tenant_id","azure_active_directory_role_based_access_control.0.admin_group_object_ids"]},"azure_rbac_enabled":{"type":"bool","optional":true},"tenant_id":{"type":"string","optional":true,"computed":true,"at_least_one_of":["azure_active_directory_role_based_access_control.0.tenant_id","azure_active_directory_role_based_access_control.0.admin_group_object_ids"]}}},"optional":true},"confidential_computing":{"nesting_mode":3,"block":{"attributes":{"sgx_quote_helper_enabled":{"type":"bool","required":true}}},"optional":true},"default_node_pool":{"nesting_mode":3,"block":{"attributes":{"auto_scaling_enabled":{"type":"bool","optional":true},"capacity_reservation_group_id":{"type":"string","optional":true},"fips_enabled":{"type":"bool","optional":true},"gpu_instance":{"type":"string","optional":true},"host_encryption_enabled":{"type":"bool","optional":true},"host_group_id":{"type":"string","optional":true},"kubelet_disk_type":{"type":"string","optional":true,"computed":true},"max_count":{"type":"number","optional":true},"max_pods":{"type":"number","optional":true,"computed":true},"min_count":{"type":"number","optional":true},"name":{"type":"string","required":true},"node_count":{"type":"number","optional":true,"computed":true},"node_labels":{"type":["map","string"],"optional":true,"computed":true},"node_public_ip_enabled":{"type":"bool","optional":true},"node_public_ip_prefix_id":{"type":"string","optional":true,"required_with":["default_node_pool.0.node_public_ip_enabled"]},"only_critical_addons_enabled":{"type":"bool","optional":true},"orchestrator_version":{"type":"string","optional":true,"computed":true},"os_disk_size_gb":{"type":"number","optional":true,"computed":true},"os_disk_type":{"type":"string","optional":true,"default":"Managed"},"os_sku":{"type":"string","optional":true,"computed":true},"pod_subnet_id":{"type":"string","optional":true},"proximity_placement_group_id":{"type":"string","optional":true},"scale_down_mode":{"type":"string","optional":true,"default":"Delete"},"snapshot_id":{"type":"string","optional":true},"tags":{"type":["map","string"],"optional":true},"temporary_name_for_rotation":{"type":"string","optional":true},"type":{"type":"string","optional":true,"default":"VirtualMachineScaleSets"},"ultra_ssd_enabled":{"type":"bool","optional":true,"default":false},"vm_size":{"type":"string","required":true},"vnet_subnet_id":{"type":"string","optional":true},"workload_runtime":{"type":"string","optional":true,"computed":true},"zones":{"type":["set","string"],"optional":true}},"block_types":{"kubelet_config":{"nesting_mode":3,"block":{"attributes":{"allowed_unsafe_sysctls":{"type":["set","string"],"optional":true},"container_log_max_line":{"type":"number","optional":true},"container_log_max_size_mb":{"type":"number","optional":true},"cpu_cfs_quota_enabled":{"type":"bool","optional":true,"default":true},"cpu_cfs_quota_period":{"type":"string","optional":true},"cpu_manager_policy":{"type":"string","optional":true},"image_gc_high_threshold":{"type":"number","optional":true},"image_gc_low_threshold":{"type":"number","optional":true},"pod_max_pid":{"type":"number","optional":true},"topology_manager_policy":{"type":"string","optional":true}}},"optional":true},"linux_os_config":{"nesting_mode":3,"block":{"attributes":{"swap_file_size_mb":{"type":"number","optional":true},"transparent_huge_page_defrag":{"type":"string","optional":true},"transparent_huge_page_enabled":{"type":"string","optional":true}},"block_types":{"sysctl_config":{"nesting_mode":3,"block":{"attributes":{"fs_aio_max_nr":{"type":"number","optional":true},"fs_file_max":{"type":"number","optional":true},"fs_inotify_max_user_watches":{"type":"number","optional":true},"fs_nr_open":{"type":"number","optional":true},"kernel_threads_max":{"type":"number","optional":true},"net_core_netdev_max_backlog":{"type":"number","optional":true},"net_core_optmem_max":{"type":"number","optional":true},"net_core_rmem_default":{"type":"number","optional":true},"net_core_rmem_max":{"type":"number","optional":true},"net_core_somaxconn":{"type":"number","optional":true},"net_core_wmem_default":{"type":"number","optional":true},"net_core_wmem_max":{"type":"number","optional":true},"net_ipv4_ip_local_port_range_max":{"type":"number","optional":true},"net_ipv4_ip_local_port_range_min":{"type":"number","optional":true},"net_ipv4_neigh_default_gc_thresh1":{"type":"number","optional":true},"net_ipv4_neigh_default_gc_thresh2":{"type":"number","optional":true},"net_ipv4_neigh_default_gc_thresh3":{"type":"number","optional":true},"net_ipv4_tcp_fin_timeout":{"type":"number","optional":true},"net_ipv4_tcp_keepalive_intvl":{"type":"number","optional":true},"net_ipv4_tcp_keepalive_probes":{"type":"number","optional":true},"net_ipv4_tcp_keepalive_time":{"type":"number","optional":true},"net_ipv4_tcp_max_syn_backlog":{"type":"number","optional":true},"net_ipv4_tcp_max_tw_buckets":{"type":"number","optional":true},"net_ipv4_tcp_tw_reuse":{"type":"bool","optional":true},"net_netfilter_nf_conntrack_buckets":{"type":"number","optional":true},"net_netfilter_nf_conntrack_max":{"type":"number","optional":true},"vm_max_map_count":{"type":"number","optional":true},"vm_swappiness":{"type":"number","optional":true},"vm_vfs_cache_pressure":{"type":"number","optional":true}}},"optional":true}}},"optional":true},"node_network_profile":{"nesting_mode":3,"block":{"attributes":{"application_security_group_ids":{"type":["list","string"],"optional":true},"node_public_ip_tags":{"type":["map","string"],"optional":true}},"block_types":{"allowed_host_ports":{"nesting_mode":3,"block":{"attributes":{"port_end":{"type":"number","optional":true},"port_start":{"type":"number","optional":true},"protocol":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"upgrade_settings":{"nesting_mode":3,"block":{"attributes":{"drain_timeout_in_minutes":{"type":"number","optional":true},"max_surge":{"type":"string","required":true},"node_soak_duration_in_minutes":{"type":"number","optional":true}}},"optional":true}}},"required":true},"http_proxy_config":{"nesting_mode":3,"block":{"attributes":{"http_proxy":{"type":"string","optional":true},"https_proxy":{"type":"string","optional":true},"no_proxy":{"type":["set","string"],"optional":true},"trusted_ca":{"type":"string","optional":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"ingress_application_gateway":{"nesting_mode":3,"block":{"attributes":{"effective_gateway_id":{"type":"string","computed":true},"gateway_id":{"type":"string","optional":true,"conflicts_with":["ingress_application_gateway.0.subnet_cidr","ingress_application_gateway.0.subnet_id"],"at_least_one_of":["ingress_application_gateway.0.gateway_id","ingress_application_gateway.0.subnet_cidr","ingress_application_gateway.0.subnet_id"]},"gateway_name":{"type":"string","optional":true},"ingress_application_gateway_identity":{"type":["list",["object",{"client_id":"string","object_id":"string","user_assigned_identity_id":"string"}]],"computed":true},"subnet_cidr":{"type":"string","optional":true,"conflicts_with":["ingress_application_gateway.0.gateway_id","ingress_application_gateway.0.subnet_id"],"at_least_one_of":["ingress_application_gateway.0.gateway_id","ingress_application_gateway.0.subnet_cidr","ingress_application_gateway.0.subnet_id"]},"subnet_id":{"type":"string","optional":true,"conflicts_with":["ingress_application_gateway.0.gateway_id","ingress_application_gateway.0.subnet_cidr"],"at_least_one_of":["ingress_application_gateway.0.gateway_id","ingress_application_gateway.0.subnet_cidr","ingress_application_gateway.0.subnet_id"]}}},"optional":true},"key_management_service":{"nesting_mode":3,"block":{"attributes":{"key_vault_key_id":{"type":"string","required":true},"key_vault_network_access":{"type":"string","optional":true,"default":"Public"}}},"optional":true},"key_vault_secrets_provider":{"nesting_mode":3,"block":{"attributes":{"secret_identity":{"type":["list",["object",{"client_id":"string","object_id":"string","user_assigned_identity_id":"string"}]],"computed":true},"secret_rotation_enabled":{"type":"bool","optional":true,"default":false,"at_least_one_of":["key_vault_secrets_provider.0.secret_rotation_enabled","key_vault_secrets_provider.0.secret_rotation_interval"]},"secret_rotation_interval":{"type":"string","optional":true,"default":"2m","at_least_one_of":["key_vault_secrets_provider.0.secret_rotation_enabled","key_vault_secrets_provider.0.secret_rotation_interval"]}}},"optional":true},"kubelet_identity":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","optional":true,"computed":true,"required_with":["kubelet_identity.0.object_id","kubelet_identity.0.user_assigned_identity_id","identity.0.identity_ids"]},"object_id":{"type":"string","optional":true,"computed":true,"required_with":["kubelet_identity.0.client_id","kubelet_identity.0.user_assigned_identity_id","identity.0.identity_ids"]},"user_assigned_identity_id":{"type":"string","optional":true,"computed":true,"required_with":["kubelet_identity.0.client_id","kubelet_identity.0.object_id","identity.0.identity_ids"]}}},"optional":true,"computed":true},"linux_profile":{"nesting_mode":3,"block":{"attributes":{"admin_username":{"type":"string","required":true}},"block_types":{"ssh_key":{"nesting_mode":3,"block":{"attributes":{"key_data":{"type":"string","required":true}}},"required":true}}},"optional":true},"maintenance_window":{"nesting_mode":3,"block":{"block_types":{"allowed":{"nesting_mode":4,"block":{"attributes":{"day":{"type":"string","required":true},"hours":{"type":["set","number"],"required":true}}},"optional":true,"at_least_one_of":["maintenance_window.0.allowed","maintenance_window.0.not_allowed"]},"not_allowed":{"nesting_mode":4,"block":{"attributes":{"end":{"type":"string","required":true},"start":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["maintenance_window.0.allowed","maintenance_window.0.not_allowed"]}}},"optional":true},"maintenance_window_auto_upgrade":{"nesting_mode":3,"block":{"attributes":{"day_of_month":{"type":"number","optional":true},"day_of_week":{"type":"string","optional":true},"duration":{"type":"number","required":true},"frequency":{"type":"string","required":true},"interval":{"type":"number","required":true},"start_date":{"type":"string","optional":true,"computed":true},"start_time":{"type":"string","optional":true},"utc_offset":{"type":"string","optional":true},"week_index":{"type":"string","optional":true}},"block_types":{"not_allowed":{"nesting_mode":4,"block":{"attributes":{"end":{"type":"string","required":true},"start":{"type":"string","required":true}}},"optional":true}}},"optional":true},"maintenance_window_node_os":{"nesting_mode":3,"block":{"attributes":{"day_of_month":{"type":"number","optional":true},"day_of_week":{"type":"string","optional":true},"duration":{"type":"number","required":true},"frequency":{"type":"string","required":true},"interval":{"type":"number","required":true},"start_date":{"type":"string","optional":true,"computed":true},"start_time":{"type":"string","optional":true},"utc_offset":{"type":"string","optional":true},"week_index":{"type":"string","optional":true}},"block_types":{"not_allowed":{"nesting_mode":4,"block":{"attributes":{"end":{"type":"string","required":true},"start":{"type":"string","required":true}}},"optional":true}}},"optional":true},"microsoft_defender":{"nesting_mode":3,"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true}}},"optional":true},"monitor_metrics":{"nesting_mode":3,"block":{"attributes":{"annotations_allowed":{"type":"string","optional":true},"labels_allowed":{"type":"string","optional":true}}},"optional":true},"network_profile":{"nesting_mode":3,"block":{"attributes":{"dns_service_ip":{"type":"string","optional":true,"computed":true},"ip_versions":{"type":["list","string"],"optional":true,"computed":true},"load_balancer_sku":{"type":"string","optional":true,"default":"standard"},"network_data_plane":{"type":"string","optional":true,"default":"azure"},"network_mode":{"type":"string","optional":true,"computed":true},"network_plugin":{"type":"string","required":true},"network_plugin_mode":{"type":"string","optional":true},"network_policy":{"type":"string","optional":true,"computed":true},"outbound_type":{"type":"string","optional":true,"default":"loadBalancer"},"pod_cidr":{"type":"string","optional":true,"computed":true},"pod_cidrs":{"type":["list","string"],"optional":true,"computed":true},"service_cidr":{"type":"string","optional":true,"computed":true},"service_cidrs":{"type":["list","string"],"optional":true,"computed":true}},"block_types":{"load_balancer_profile":{"nesting_mode":3,"block":{"attributes":{"backend_pool_type":{"type":"string","optional":true,"default":"NodeIPConfiguration"},"effective_outbound_ips":{"type":["set","string"],"computed":true},"idle_timeout_in_minutes":{"type":"number","optional":true,"default":30},"managed_outbound_ip_count":{"type":"number","optional":true,"computed":true,"conflicts_with":["network_profile.0.load_balancer_profile.0.outbound_ip_prefix_ids","network_profile.0.load_balancer_profile.0.outbound_ip_address_ids"]},"managed_outbound_ipv6_count":{"type":"number","optional":true,"computed":true,"conflicts_with":["network_profile.0.load_balancer_profile.0.outbound_ip_prefix_ids","network_profile.0.load_balancer_profile.0.outbound_ip_address_ids"]},"outbound_ip_address_ids":{"type":["set","string"],"optional":true,"conflicts_with":["network_profile.0.load_balancer_profile.0.managed_outbound_ip_count","network_profile.0.load_balancer_profile.0.outbound_ip_prefix_ids"]},"outbound_ip_prefix_ids":{"type":["set","string"],"optional":true,"conflicts_with":["network_profile.0.load_balancer_profile.0.managed_outbound_ip_count","network_profile.0.load_balancer_profile.0.outbound_ip_address_ids"]},"outbound_ports_allocated":{"type":"number","optional":true,"default":0}}},"optional":true,"computed":true},"nat_gateway_profile":{"nesting_mode":3,"block":{"attributes":{"effective_outbound_ips":{"type":["set","string"],"computed":true},"idle_timeout_in_minutes":{"type":"number","optional":true,"default":4},"managed_outbound_ip_count":{"type":"number","optional":true,"computed":true}}},"optional":true,"computed":true}}},"optional":true,"computed":true},"oms_agent":{"nesting_mode":3,"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"msi_auth_for_monitoring_enabled":{"type":"bool","optional":true},"oms_agent_identity":{"type":["list",["object",{"client_id":"string","object_id":"string","user_assigned_identity_id":"string"}]],"computed":true}}},"optional":true},"service_mesh_profile":{"nesting_mode":3,"block":{"attributes":{"external_ingress_gateway_enabled":{"type":"bool","optional":true},"internal_ingress_gateway_enabled":{"type":"bool","optional":true},"mode":{"type":"string","required":true},"revisions":{"type":["list","string"],"required":true}},"block_types":{"certificate_authority":{"nesting_mode":3,"block":{"attributes":{"cert_chain_object_name":{"type":"string","required":true},"cert_object_name":{"type":"string","required":true},"key_object_name":{"type":"string","required":true},"key_vault_id":{"type":"string","required":true},"root_cert_object_name":{"type":"string","required":true}}},"optional":true}}},"optional":true},"service_principal":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","required":true}}},"optional":true,"exactly_one_of":["identity","service_principal"]},"storage_profile":{"nesting_mode":3,"block":{"attributes":{"blob_driver_enabled":{"type":"bool","optional":true,"default":false},"disk_driver_enabled":{"type":"bool","optional":true,"default":true},"file_driver_enabled":{"type":"bool","optional":true,"default":true},"snapshot_controller_enabled":{"type":"bool","optional":true,"default":true}}},"optional":true},"web_app_routing":{"nesting_mode":3,"block":{"attributes":{"dns_zone_ids":{"type":["list","string"],"required":true},"web_app_routing_identity":{"type":["list",["object",{"client_id":"string","object_id":"string","user_assigned_identity_id":"string"}]],"computed":true}}},"optional":true},"windows_profile":{"nesting_mode":3,"block":{"attributes":{"admin_password":{"type":"string","required":true},"admin_username":{"type":"string","required":true},"license":{"type":"string","optional":true}},"block_types":{"gmsa":{"nesting_mode":3,"block":{"attributes":{"dns_server":{"type":"string","required":true},"root_domain":{"type":"string","required":true}}},"optional":true}}},"optional":true,"computed":true},"workload_autoscaler_profile":{"nesting_mode":3,"block":{"attributes":{"keda_enabled":{"type":"bool","optional":true,"default":false},"vertical_pod_autoscaler_enabled":{"type":"bool","optional":true,"default":false}}},"optional":true}}}},"azurerm_kubernetes_cluster_extension":{"block":{"attributes":{"aks_assigned_identity":{"type":["list",["object",{"principal_id":"string","tenant_id":"string","type":"string"}]],"computed":true},"cluster_id":{"type":"string","required":true},"configuration_protected_settings":{"type":["map","string"],"optional":true},"configuration_settings":{"type":["map","string"],"optional":true},"current_version":{"type":"string","computed":true},"extension_type":{"type":"string","required":true},"name":{"type":"string","required":true},"release_namespace":{"type":"string","optional":true,"computed":true,"conflicts_with":["target_namespace"]},"release_train":{"type":"string","optional":true,"computed":true,"conflicts_with":["version"]},"target_namespace":{"type":"string","optional":true,"computed":true,"conflicts_with":["release_namespace"]},"version":{"type":"string","optional":true,"conflicts_with":["release_train"]}},"block_types":{"plan":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"product":{"type":"string","required":true},"promotion_code":{"type":"string","optional":true},"publisher":{"type":"string","required":true},"version":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_kubernetes_cluster_node_pool":{"block":{"attributes":{"auto_scaling_enabled":{"type":"bool","optional":true},"capacity_reservation_group_id":{"type":"string","optional":true},"eviction_policy":{"type":"string","optional":true},"fips_enabled":{"type":"bool","optional":true},"gpu_instance":{"type":"string","optional":true},"host_encryption_enabled":{"type":"bool","optional":true},"host_group_id":{"type":"string","optional":true},"kubelet_disk_type":{"type":"string","optional":true,"computed":true},"kubernetes_cluster_id":{"type":"string","required":true},"max_count":{"type":"number","optional":true},"max_pods":{"type":"number","optional":true,"computed":true},"min_count":{"type":"number","optional":true},"mode":{"type":"string","optional":true,"default":"User"},"name":{"type":"string","required":true},"node_count":{"type":"number","optional":true,"computed":true},"node_labels":{"type":["map","string"],"optional":true,"computed":true},"node_public_ip_enabled":{"type":"bool","optional":true},"node_public_ip_prefix_id":{"type":"string","optional":true,"required_with":["node_public_ip_enabled"]},"node_taints":{"type":["list","string"],"optional":true},"orchestrator_version":{"type":"string","optional":true,"computed":true},"os_disk_size_gb":{"type":"number","optional":true,"computed":true},"os_disk_type":{"type":"string","optional":true,"default":"Managed"},"os_sku":{"type":"string","optional":true,"computed":true},"os_type":{"type":"string","optional":true,"default":"Linux"},"pod_subnet_id":{"type":"string","optional":true},"priority":{"type":"string","optional":true,"default":"Regular"},"proximity_placement_group_id":{"type":"string","optional":true},"scale_down_mode":{"type":"string","optional":true,"default":"Delete"},"snapshot_id":{"type":"string","optional":true},"spot_max_price":{"type":"number","optional":true,"default":-1},"tags":{"type":["map","string"],"optional":true},"temporary_name_for_rotation":{"type":"string","optional":true},"ultra_ssd_enabled":{"type":"bool","optional":true,"default":false},"vm_size":{"type":"string","required":true},"vnet_subnet_id":{"type":"string","optional":true},"workload_runtime":{"type":"string","optional":true},"zones":{"type":["set","string"],"optional":true}},"block_types":{"kubelet_config":{"nesting_mode":3,"block":{"attributes":{"allowed_unsafe_sysctls":{"type":["set","string"],"optional":true},"container_log_max_line":{"type":"number","optional":true},"container_log_max_size_mb":{"type":"number","optional":true},"cpu_cfs_quota_enabled":{"type":"bool","optional":true,"default":true},"cpu_cfs_quota_period":{"type":"string","optional":true},"cpu_manager_policy":{"type":"string","optional":true},"image_gc_high_threshold":{"type":"number","optional":true},"image_gc_low_threshold":{"type":"number","optional":true},"pod_max_pid":{"type":"number","optional":true},"topology_manager_policy":{"type":"string","optional":true}}},"optional":true},"linux_os_config":{"nesting_mode":3,"block":{"attributes":{"swap_file_size_mb":{"type":"number","optional":true},"transparent_huge_page_defrag":{"type":"string","optional":true},"transparent_huge_page_enabled":{"type":"string","optional":true}},"block_types":{"sysctl_config":{"nesting_mode":3,"block":{"attributes":{"fs_aio_max_nr":{"type":"number","optional":true},"fs_file_max":{"type":"number","optional":true},"fs_inotify_max_user_watches":{"type":"number","optional":true},"fs_nr_open":{"type":"number","optional":true},"kernel_threads_max":{"type":"number","optional":true},"net_core_netdev_max_backlog":{"type":"number","optional":true},"net_core_optmem_max":{"type":"number","optional":true},"net_core_rmem_default":{"type":"number","optional":true},"net_core_rmem_max":{"type":"number","optional":true},"net_core_somaxconn":{"type":"number","optional":true},"net_core_wmem_default":{"type":"number","optional":true},"net_core_wmem_max":{"type":"number","optional":true},"net_ipv4_ip_local_port_range_max":{"type":"number","optional":true},"net_ipv4_ip_local_port_range_min":{"type":"number","optional":true},"net_ipv4_neigh_default_gc_thresh1":{"type":"number","optional":true},"net_ipv4_neigh_default_gc_thresh2":{"type":"number","optional":true},"net_ipv4_neigh_default_gc_thresh3":{"type":"number","optional":true},"net_ipv4_tcp_fin_timeout":{"type":"number","optional":true},"net_ipv4_tcp_keepalive_intvl":{"type":"number","optional":true},"net_ipv4_tcp_keepalive_probes":{"type":"number","optional":true},"net_ipv4_tcp_keepalive_time":{"type":"number","optional":true},"net_ipv4_tcp_max_syn_backlog":{"type":"number","optional":true},"net_ipv4_tcp_max_tw_buckets":{"type":"number","optional":true},"net_ipv4_tcp_tw_reuse":{"type":"bool","optional":true},"net_netfilter_nf_conntrack_buckets":{"type":"number","optional":true},"net_netfilter_nf_conntrack_max":{"type":"number","optional":true},"vm_max_map_count":{"type":"number","optional":true},"vm_swappiness":{"type":"number","optional":true},"vm_vfs_cache_pressure":{"type":"number","optional":true}}},"optional":true}}},"optional":true},"node_network_profile":{"nesting_mode":3,"block":{"attributes":{"application_security_group_ids":{"type":["list","string"],"optional":true},"node_public_ip_tags":{"type":["map","string"],"optional":true}},"block_types":{"allowed_host_ports":{"nesting_mode":3,"block":{"attributes":{"port_end":{"type":"number","optional":true},"port_start":{"type":"number","optional":true},"protocol":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"upgrade_settings":{"nesting_mode":3,"block":{"attributes":{"drain_timeout_in_minutes":{"type":"number","optional":true},"max_surge":{"type":"string","required":true},"node_soak_duration_in_minutes":{"type":"number","optional":true}}},"optional":true},"windows_profile":{"nesting_mode":3,"block":{"attributes":{"outbound_nat_enabled":{"type":"bool","optional":true,"default":true}}},"optional":true}}}},"azurerm_kubernetes_cluster_trusted_access_role_binding":{"block":{"attributes":{"kubernetes_cluster_id":{"type":"string","required":true},"name":{"type":"string","required":true},"roles":{"type":["list","string"],"required":true},"source_resource_id":{"type":"string","required":true}}}},"azurerm_kubernetes_fleet_manager":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"hub_profile":{"nesting_mode":3,"block":{"attributes":{"dns_prefix":{"type":"string","required":true},"fqdn":{"type":"string","computed":true},"kubernetes_version":{"type":"string","computed":true}}},"optional":true}}}},"azurerm_kubernetes_fleet_member":{"block":{"attributes":{"group":{"type":"string","optional":true},"kubernetes_cluster_id":{"type":"string","required":true},"kubernetes_fleet_id":{"type":"string","required":true},"name":{"type":"string","required":true}}}},"azurerm_kubernetes_fleet_update_run":{"block":{"attributes":{"fleet_update_strategy_id":{"type":"string","optional":true,"conflicts_with":["stage"]},"kubernetes_fleet_manager_id":{"type":"string","required":true},"name":{"type":"string","required":true}},"block_types":{"managed_cluster_update":{"nesting_mode":3,"block":{"block_types":{"node_image_selection":{"nesting_mode":3,"block":{"attributes":{"type":{"type":"string","required":true}}},"optional":true},"upgrade":{"nesting_mode":3,"block":{"attributes":{"kubernetes_version":{"type":"string","optional":true},"type":{"type":"string","required":true}}},"required":true}}},"required":true},"stage":{"nesting_mode":3,"block":{"attributes":{"after_stage_wait_in_seconds":{"type":"number","optional":true},"name":{"type":"string","required":true}},"block_types":{"group":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true}}},"required":true}}},"optional":true,"conflicts_with":["fleet_update_strategy_id"]}}}},"azurerm_kubernetes_fleet_update_strategy":{"block":{"attributes":{"kubernetes_fleet_manager_id":{"type":"string","required":true},"name":{"type":"string","required":true}},"block_types":{"stage":{"nesting_mode":3,"block":{"attributes":{"after_stage_wait_in_seconds":{"type":"number","optional":true},"name":{"type":"string","required":true}},"block_types":{"group":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true}}},"required":true}}},"required":true}}}},"azurerm_kubernetes_flux_configuration":{"block":{"attributes":{"cluster_id":{"type":"string","required":true},"continuous_reconciliation_enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"namespace":{"type":"string","required":true},"scope":{"type":"string","optional":true,"default":"namespace"}},"block_types":{"blob_storage":{"nesting_mode":3,"block":{"attributes":{"account_key":{"type":"string","optional":true,"exactly_one_of":["blob_storage.0.account_key","blob_storage.0.local_auth_reference","blob_storage.0.managed_identity","blob_storage.0.sas_token","blob_storage.0.service_principal"]},"container_id":{"type":"string","required":true},"local_auth_reference":{"type":"string","optional":true,"exactly_one_of":["blob_storage.0.account_key","blob_storage.0.local_auth_reference","blob_storage.0.managed_identity","blob_storage.0.sas_token","blob_storage.0.service_principal"]},"sas_token":{"type":"string","optional":true,"exactly_one_of":["blob_storage.0.account_key","blob_storage.0.local_auth_reference","blob_storage.0.managed_identity","blob_storage.0.sas_token","blob_storage.0.service_principal"]},"sync_interval_in_seconds":{"type":"number","optional":true,"default":600},"timeout_in_seconds":{"type":"number","optional":true,"default":600}},"block_types":{"managed_identity":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true}}},"optional":true,"exactly_one_of":["blob_storage.0.account_key","blob_storage.0.local_auth_reference","blob_storage.0.managed_identity","blob_storage.0.sas_token","blob_storage.0.service_principal"]},"service_principal":{"nesting_mode":3,"block":{"attributes":{"client_certificate_base64":{"type":"string","optional":true,"exactly_one_of":["blob_storage.0.service_principal.0.client_certificate_base64","blob_storage.0.service_principal.0.client_secret"]},"client_certificate_password":{"type":"string","optional":true,"required_with":["blob_storage.0.service_principal.0.client_certificate_base64"]},"client_certificate_send_chain":{"type":"bool","optional":true,"default":false},"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["blob_storage.0.service_principal.0.client_certificate_base64","blob_storage.0.service_principal.0.client_secret"]},"tenant_id":{"type":"string","required":true}}},"optional":true,"exactly_one_of":["blob_storage.0.account_key","blob_storage.0.local_auth_reference","blob_storage.0.managed_identity","blob_storage.0.sas_token","blob_storage.0.service_principal"]}}},"optional":true,"exactly_one_of":["blob_storage","bucket","git_repository"]},"bucket":{"nesting_mode":3,"block":{"attributes":{"access_key":{"type":"string","optional":true,"exactly_one_of":["bucket.0.access_key","bucket.0.local_auth_reference"],"required_with":["bucket.0.secret_key_base64"]},"bucket_name":{"type":"string","required":true},"local_auth_reference":{"type":"string","optional":true,"exactly_one_of":["bucket.0.access_key","bucket.0.local_auth_reference"]},"secret_key_base64":{"type":"string","optional":true,"required_with":["bucket.0.access_key"]},"sync_interval_in_seconds":{"type":"number","optional":true,"default":600},"timeout_in_seconds":{"type":"number","optional":true,"default":600},"tls_enabled":{"type":"bool","optional":true,"default":true},"url":{"type":"string","required":true}}},"optional":true,"exactly_one_of":["blob_storage","bucket","git_repository"]},"git_repository":{"nesting_mode":3,"block":{"attributes":{"https_ca_cert_base64":{"type":"string","optional":true,"required_with":["git_repository.0.https_user"]},"https_key_base64":{"type":"string","optional":true,"required_with":["git_repository.0.https_user"]},"https_user":{"type":"string","optional":true,"conflicts_with":["git_repository.0.local_auth_reference","git_repository.0.ssh_private_key_base64","git_repository.0.ssh_known_hosts_base64"],"required_with":["git_repository.0.https_key_base64"]},"local_auth_reference":{"type":"string","optional":true,"conflicts_with":["git_repository.0.https_user","git_repository.0.ssh_private_key_base64","git_repository.0.ssh_known_hosts_base64"]},"reference_type":{"type":"string","required":true},"reference_value":{"type":"string","required":true},"ssh_known_hosts_base64":{"type":"string","optional":true,"conflicts_with":["git_repository.0.https_user","git_repository.0.local_auth_reference"]},"ssh_private_key_base64":{"type":"string","optional":true,"conflicts_with":["git_repository.0.https_user","git_repository.0.local_auth_reference"]},"sync_interval_in_seconds":{"type":"number","optional":true,"default":600},"timeout_in_seconds":{"type":"number","optional":true,"default":600},"url":{"type":"string","required":true}}},"optional":true,"exactly_one_of":["blob_storage","bucket","git_repository"]},"kustomizations":{"nesting_mode":4,"block":{"attributes":{"depends_on":{"type":["list","string"],"optional":true},"garbage_collection_enabled":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"path":{"type":"string","optional":true},"recreating_enabled":{"type":"bool","optional":true,"default":false},"retry_interval_in_seconds":{"type":"number","optional":true,"default":600},"sync_interval_in_seconds":{"type":"number","optional":true,"default":600},"timeout_in_seconds":{"type":"number","optional":true,"default":600},"wait":{"type":"bool","optional":true,"default":true}},"block_types":{"post_build":{"nesting_mode":3,"block":{"attributes":{"substitute":{"type":["map","string"],"optional":true}},"block_types":{"substitute_from":{"nesting_mode":3,"block":{"attributes":{"kind":{"type":"string","required":true},"name":{"type":"string","required":true},"optional":{"type":"bool","optional":true,"default":false}}},"optional":true}}},"optional":true}}},"required":true}}}},"azurerm_kusto_attached_database_configuration":{"block":{"attributes":{"attached_database_names":{"type":["list","string"],"computed":true},"cluster_id":{"type":"string","optional":true,"computed":true,"exactly_one_of":["cluster_id","cluster_resource_id"]},"cluster_name":{"type":"string","required":true},"cluster_resource_id":{"type":"string","optional":true,"computed":true,"exactly_one_of":["cluster_id","cluster_resource_id"]},"database_name":{"type":"string","required":true},"default_principal_modification_kind":{"type":"string","optional":true,"default":"None"},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}},"block_types":{"sharing":{"nesting_mode":3,"block":{"attributes":{"external_tables_to_exclude":{"type":["set","string"],"optional":true},"external_tables_to_include":{"type":["set","string"],"optional":true},"materialized_views_to_exclude":{"type":["set","string"],"optional":true},"materialized_views_to_include":{"type":["set","string"],"optional":true},"tables_to_exclude":{"type":["set","string"],"optional":true},"tables_to_include":{"type":["set","string"],"optional":true}}},"optional":true}}}},"azurerm_kusto_cluster":{"block":{"attributes":{"allowed_fqdns":{"type":["list","string"],"optional":true},"allowed_ip_ranges":{"type":["list","string"],"optional":true},"auto_stop_enabled":{"type":"bool","optional":true,"default":true},"data_ingestion_uri":{"type":"string","computed":true},"disk_encryption_enabled":{"type":"bool","optional":true,"default":false},"double_encryption_enabled":{"type":"bool","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"outbound_network_access_restricted":{"type":"bool","optional":true,"default":false},"public_ip_type":{"type":"string","optional":true,"default":"IPv4"},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"purge_enabled":{"type":"bool","optional":true,"default":false},"resource_group_name":{"type":"string","required":true},"streaming_ingestion_enabled":{"type":"bool","optional":true,"default":false},"tags":{"type":["map","string"],"optional":true},"trusted_external_tenants":{"type":["list","string"],"optional":true,"computed":true},"uri":{"type":"string","computed":true},"zones":{"type":["set","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"language_extensions":{"nesting_mode":3,"block":{"attributes":{"image":{"type":"string","required":true},"name":{"type":"string","required":true}}},"optional":true},"optimized_auto_scale":{"nesting_mode":3,"block":{"attributes":{"maximum_instances":{"type":"number","required":true},"minimum_instances":{"type":"number","required":true}}},"optional":true},"sku":{"nesting_mode":3,"block":{"attributes":{"capacity":{"type":"number","optional":true,"computed":true},"name":{"type":"string","required":true}}},"required":true},"virtual_network_configuration":{"nesting_mode":3,"block":{"attributes":{"data_management_public_ip_id":{"type":"string","required":true},"engine_public_ip_id":{"type":"string","required":true},"subnet_id":{"type":"string","required":true}}},"optional":true}}}},"azurerm_kusto_cluster_customer_managed_key":{"block":{"attributes":{"cluster_id":{"type":"string","required":true},"key_name":{"type":"string","required":true},"key_vault_id":{"type":"string","required":true},"key_version":{"type":"string","optional":true},"user_identity":{"type":"string","optional":true}}}},"azurerm_kusto_cluster_managed_private_endpoint":{"block":{"attributes":{"cluster_name":{"type":"string","required":true},"group_id":{"type":"string","required":true},"name":{"type":"string","required":true},"private_link_resource_id":{"type":"string","required":true},"private_link_resource_region":{"type":"string","optional":true},"request_message":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_kusto_cluster_principal_assignment":{"block":{"attributes":{"cluster_name":{"type":"string","required":true},"name":{"type":"string","required":true},"principal_id":{"type":"string","required":true},"principal_name":{"type":"string","computed":true},"principal_type":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"role":{"type":"string","required":true},"tenant_id":{"type":"string","required":true},"tenant_name":{"type":"string","computed":true}}}},"azurerm_kusto_cosmosdb_data_connection":{"block":{"attributes":{"cosmosdb_container_id":{"type":"string","required":true},"kusto_database_id":{"type":"string","required":true},"location":{"type":"string","required":true},"managed_identity_id":{"type":"string","required":true},"mapping_rule_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"retrieval_start_date":{"type":"string","optional":true},"table_name":{"type":"string","required":true}}}},"azurerm_kusto_database":{"block":{"attributes":{"cluster_name":{"type":"string","required":true},"hot_cache_period":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"size":{"type":"number","computed":true},"soft_delete_period":{"type":"string","optional":true}}}},"azurerm_kusto_database_principal_assignment":{"block":{"attributes":{"cluster_name":{"type":"string","required":true},"database_name":{"type":"string","required":true},"name":{"type":"string","required":true},"principal_id":{"type":"string","required":true},"principal_name":{"type":"string","computed":true},"principal_type":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"role":{"type":"string","required":true},"tenant_id":{"type":"string","required":true},"tenant_name":{"type":"string","computed":true}}}},"azurerm_kusto_eventgrid_data_connection":{"block":{"attributes":{"blob_storage_event_type":{"type":"string","optional":true,"default":"Microsoft.Storage.BlobCreated"},"cluster_name":{"type":"string","required":true},"data_format":{"type":"string","optional":true},"database_name":{"type":"string","required":true},"database_routing_type":{"type":"string","optional":true,"default":"Single"},"eventgrid_event_subscription_id":{"type":"string","optional":true,"computed":true,"conflicts_with":["eventgrid_resource_id"]},"eventgrid_resource_id":{"type":"string","optional":true,"computed":true,"conflicts_with":["eventgrid_event_subscription_id"]},"eventhub_consumer_group_name":{"type":"string","required":true},"eventhub_id":{"type":"string","required":true},"location":{"type":"string","required":true},"managed_identity_id":{"type":"string","optional":true,"computed":true,"conflicts_with":["managed_identity_resource_id"]},"managed_identity_resource_id":{"type":"string","optional":true,"computed":true,"conflicts_with":["managed_identity_id"]},"mapping_rule_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"skip_first_record":{"type":"bool","optional":true,"default":false},"storage_account_id":{"type":"string","required":true},"table_name":{"type":"string","optional":true}}}},"azurerm_kusto_eventhub_data_connection":{"block":{"attributes":{"cluster_name":{"type":"string","required":true},"compression":{"type":"string","optional":true,"default":"None"},"consumer_group":{"type":"string","required":true},"data_format":{"type":"string","optional":true},"database_name":{"type":"string","required":true},"database_routing_type":{"type":"string","optional":true,"default":"Single"},"event_system_properties":{"type":["list","string"],"optional":true,"computed":true},"eventhub_id":{"type":"string","required":true},"identity_id":{"type":"string","optional":true},"location":{"type":"string","required":true},"mapping_rule_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"table_name":{"type":"string","optional":true}}}},"azurerm_kusto_iothub_data_connection":{"block":{"attributes":{"cluster_name":{"type":"string","required":true},"consumer_group":{"type":"string","required":true},"data_format":{"type":"string","optional":true},"database_name":{"type":"string","required":true},"database_routing_type":{"type":"string","optional":true,"default":"Single"},"event_system_properties":{"type":["set","string"],"optional":true},"iothub_id":{"type":"string","required":true},"location":{"type":"string","required":true},"mapping_rule_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"shared_access_policy_name":{"type":"string","required":true},"table_name":{"type":"string","optional":true}}}},"azurerm_kusto_script":{"block":{"attributes":{"continue_on_errors_enabled":{"type":"bool","optional":true,"default":false},"database_id":{"type":"string","required":true},"force_an_update_when_value_changed":{"type":"string","optional":true,"computed":true},"name":{"type":"string","required":true},"sas_token":{"type":"string","optional":true,"required_with":["url"]},"script_content":{"type":"string","optional":true,"exactly_one_of":["url","script_content"]},"url":{"type":"string","optional":true,"exactly_one_of":["url","script_content"],"required_with":["sas_token"]}}}},"azurerm_lb":{"block":{"attributes":{"edge_zone":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"private_ip_address":{"type":"string","computed":true},"private_ip_addresses":{"type":["list","string"],"computed":true},"resource_group_name":{"type":"string","required":true},"sku":{"type":"string","optional":true,"default":"Standard"},"sku_tier":{"type":"string","optional":true,"default":"Regional"},"tags":{"type":["map","string"],"optional":true}},"block_types":{"frontend_ip_configuration":{"nesting_mode":3,"block":{"attributes":{"gateway_load_balancer_frontend_ip_configuration_id":{"type":"string","optional":true,"computed":true},"id":{"type":"string","computed":true},"inbound_nat_rules":{"type":["set","string"],"computed":true},"load_balancer_rules":{"type":["set","string"],"computed":true},"name":{"type":"string","required":true},"outbound_rules":{"type":["set","string"],"computed":true},"private_ip_address":{"type":"string","optional":true,"computed":true},"private_ip_address_allocation":{"type":"string","optional":true,"computed":true},"private_ip_address_version":{"type":"string","optional":true,"computed":true},"public_ip_address_id":{"type":"string","optional":true,"computed":true},"public_ip_prefix_id":{"type":"string","optional":true,"computed":true},"subnet_id":{"type":"string","optional":true,"computed":true},"zones":{"type":["set","string"],"optional":true}}},"optional":true}}}},"azurerm_lb_backend_address_pool":{"block":{"attributes":{"backend_ip_configurations":{"type":["list","string"],"computed":true},"inbound_nat_rules":{"type":["list","string"],"computed":true},"load_balancing_rules":{"type":["list","string"],"computed":true},"loadbalancer_id":{"type":"string","required":true},"name":{"type":"string","required":true},"outbound_rules":{"type":["list","string"],"computed":true},"synchronous_mode":{"type":"string","optional":true,"required_with":["virtual_network_id"]},"virtual_network_id":{"type":"string","optional":true}},"block_types":{"tunnel_interface":{"nesting_mode":3,"block":{"attributes":{"identifier":{"type":"number","required":true},"port":{"type":"number","required":true},"protocol":{"type":"string","required":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_lb_backend_address_pool_address":{"block":{"attributes":{"backend_address_ip_configuration_id":{"type":"string","optional":true,"conflicts_with":["virtual_network_id"]},"backend_address_pool_id":{"type":"string","required":true},"inbound_nat_rule_port_mapping":{"type":["list",["object",{"backend_port":"number","frontend_port":"number","inbound_nat_rule_name":"string"}]],"computed":true},"ip_address":{"type":"string","optional":true},"name":{"type":"string","required":true},"virtual_network_id":{"type":"string","optional":true,"conflicts_with":["backend_address_ip_configuration_id"]}}}},"azurerm_lb_nat_pool":{"block":{"attributes":{"backend_port":{"type":"number","required":true},"floating_ip_enabled":{"type":"bool","optional":true},"frontend_ip_configuration_id":{"type":"string","computed":true},"frontend_ip_configuration_name":{"type":"string","required":true},"frontend_port_end":{"type":"number","required":true},"frontend_port_start":{"type":"number","required":true},"idle_timeout_in_minutes":{"type":"number","optional":true,"default":4},"loadbalancer_id":{"type":"string","required":true},"name":{"type":"string","required":true},"protocol":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tcp_reset_enabled":{"type":"bool","optional":true}}}},"azurerm_lb_nat_rule":{"block":{"attributes":{"backend_address_pool_id":{"type":"string","optional":true,"conflicts_with":["frontend_port"],"required_with":["frontend_port_start","frontend_port_end"]},"backend_ip_configuration_id":{"type":"string","computed":true},"backend_port":{"type":"number","required":true},"enable_floating_ip":{"type":"bool","optional":true,"computed":true},"enable_tcp_reset":{"type":"bool","optional":true},"frontend_ip_configuration_id":{"type":"string","computed":true},"frontend_ip_configuration_name":{"type":"string","required":true},"frontend_port":{"type":"number","optional":true,"conflicts_with":["frontend_port_start","frontend_port_end","backend_address_pool_id"]},"frontend_port_end":{"type":"number","optional":true,"conflicts_with":["frontend_port"],"required_with":["backend_address_pool_id","frontend_port_start"]},"frontend_port_start":{"type":"number","optional":true,"conflicts_with":["frontend_port"],"required_with":["backend_address_pool_id","frontend_port_end"]},"idle_timeout_in_minutes":{"type":"number","optional":true,"default":4},"loadbalancer_id":{"type":"string","required":true},"name":{"type":"string","required":true},"protocol":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_lb_outbound_rule":{"block":{"attributes":{"allocated_outbound_ports":{"type":"number","optional":true,"default":1024},"backend_address_pool_id":{"type":"string","required":true},"enable_tcp_reset":{"type":"bool","optional":true,"default":false},"idle_timeout_in_minutes":{"type":"number","optional":true,"default":4},"loadbalancer_id":{"type":"string","required":true},"name":{"type":"string","required":true},"protocol":{"type":"string","required":true}},"block_types":{"frontend_ip_configuration":{"nesting_mode":3,"block":{"attributes":{"id":{"type":"string","computed":true},"name":{"type":"string","required":true}}},"optional":true}}}},"azurerm_lb_probe":{"block":{"attributes":{"interval_in_seconds":{"type":"number","optional":true,"default":15},"load_balancer_rules":{"type":["set","string"],"computed":true},"loadbalancer_id":{"type":"string","required":true},"name":{"type":"string","required":true},"number_of_probes":{"type":"number","optional":true,"default":2},"port":{"type":"number","required":true},"probe_threshold":{"type":"number","optional":true,"default":1},"protocol":{"type":"string","optional":true,"default":"Tcp"},"request_path":{"type":"string","optional":true}}}},"azurerm_lb_rule":{"block":{"attributes":{"backend_address_pool_ids":{"type":["list","string"],"optional":true},"backend_port":{"type":"number","required":true},"disable_outbound_snat":{"type":"bool","optional":true,"default":false},"enable_floating_ip":{"type":"bool","optional":true,"default":false},"enable_tcp_reset":{"type":"bool","optional":true},"frontend_ip_configuration_id":{"type":"string","computed":true},"frontend_ip_configuration_name":{"type":"string","required":true},"frontend_port":{"type":"number","required":true},"idle_timeout_in_minutes":{"type":"number","optional":true,"default":4},"load_distribution":{"type":"string","optional":true,"default":"Default"},"loadbalancer_id":{"type":"string","required":true},"name":{"type":"string","required":true},"probe_id":{"type":"string","optional":true},"protocol":{"type":"string","required":true}}}},"azurerm_lighthouse_assignment":{"block":{"attributes":{"lighthouse_definition_id":{"type":"string","required":true},"name":{"type":"string","optional":true,"computed":true},"scope":{"type":"string","required":true}}}},"azurerm_lighthouse_definition":{"block":{"attributes":{"description":{"type":"string","optional":true},"lighthouse_definition_id":{"type":"string","optional":true,"computed":true},"managing_tenant_id":{"type":"string","required":true},"name":{"type":"string","required":true},"scope":{"type":"string","required":true}},"block_types":{"authorization":{"nesting_mode":4,"block":{"attributes":{"delegated_role_definition_ids":{"type":["set","string"],"optional":true},"principal_display_name":{"type":"string","optional":true},"principal_id":{"type":"string","required":true},"role_definition_id":{"type":"string","required":true}}},"required":true},"eligible_authorization":{"nesting_mode":4,"block":{"attributes":{"principal_display_name":{"type":"string","optional":true},"principal_id":{"type":"string","required":true},"role_definition_id":{"type":"string","required":true}},"block_types":{"just_in_time_access_policy":{"nesting_mode":3,"block":{"attributes":{"maximum_activation_duration":{"type":"string","optional":true,"default":"PT8H"},"multi_factor_auth_provider":{"type":"string","optional":true}},"block_types":{"approver":{"nesting_mode":4,"block":{"attributes":{"principal_display_name":{"type":"string","optional":true},"principal_id":{"type":"string","required":true}}},"optional":true}}},"optional":true}}},"optional":true},"plan":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"product":{"type":"string","required":true},"publisher":{"type":"string","required":true},"version":{"type":"string","required":true}}},"optional":true}}}},"azurerm_linux_function_app":{"block":{"attributes":{"app_settings":{"type":["map","string"],"optional":true},"builtin_logging_enabled":{"type":"bool","optional":true,"default":true},"client_certificate_enabled":{"type":"bool","optional":true,"default":false},"client_certificate_exclusion_paths":{"type":"string","optional":true},"client_certificate_mode":{"type":"string","optional":true,"default":"Optional"},"content_share_force_disabled":{"type":"bool","optional":true,"default":false},"custom_domain_verification_id":{"type":"string","computed":true},"daily_memory_time_quota":{"type":"number","optional":true,"default":0},"default_hostname":{"type":"string","computed":true},"enabled":{"type":"bool","optional":true,"default":true},"ftp_publish_basic_authentication_enabled":{"type":"bool","optional":true,"default":true},"functions_extension_version":{"type":"string","optional":true,"default":"~4"},"hosting_environment_id":{"type":"string","computed":true},"https_only":{"type":"bool","optional":true,"default":false},"key_vault_reference_identity_id":{"type":"string","optional":true,"computed":true},"kind":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"outbound_ip_address_list":{"type":["list","string"],"computed":true},"outbound_ip_addresses":{"type":"string","computed":true},"possible_outbound_ip_address_list":{"type":["list","string"],"computed":true},"possible_outbound_ip_addresses":{"type":"string","computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"service_plan_id":{"type":"string","required":true},"site_credential":{"type":["list",["object",{"name":"string","password":"string"}]],"computed":true},"storage_account_access_key":{"type":"string","optional":true,"conflicts_with":["storage_uses_managed_identity","storage_key_vault_secret_id"]},"storage_account_name":{"type":"string","optional":true,"exactly_one_of":["storage_account_name","storage_key_vault_secret_id"]},"storage_key_vault_secret_id":{"type":"string","optional":true,"exactly_one_of":["storage_account_name","storage_key_vault_secret_id"]},"storage_uses_managed_identity":{"type":"bool","optional":true,"default":false,"conflicts_with":["storage_account_access_key","storage_key_vault_secret_id"]},"tags":{"type":["map","string"],"optional":true},"virtual_network_subnet_id":{"type":"string","optional":true},"vnet_image_pull_enabled":{"type":"bool","optional":true,"default":false},"webdeploy_publish_basic_authentication_enabled":{"type":"bool","optional":true,"default":true},"zip_deploy_file":{"type":"string","optional":true,"computed":true}},"block_types":{"auth_settings":{"nesting_mode":3,"block":{"attributes":{"additional_login_parameters":{"type":["map","string"],"optional":true},"allowed_external_redirect_urls":{"type":["list","string"],"optional":true,"computed":true},"default_provider":{"type":"string","optional":true,"computed":true},"enabled":{"type":"bool","required":true},"issuer":{"type":"string","optional":true},"runtime_version":{"type":"string","optional":true,"computed":true},"token_refresh_extension_hours":{"type":"number","optional":true,"default":72},"token_store_enabled":{"type":"bool","optional":true,"default":false},"unauthenticated_client_action":{"type":"string","optional":true,"computed":true}},"block_types":{"active_directory":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"conflicts_with":["auth_settings.0.active_directory.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings.0.active_directory.0.client_secret"]}}},"optional":true},"facebook":{"nesting_mode":3,"block":{"attributes":{"app_id":{"type":"string","required":true},"app_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.facebook.0.app_secret","auth_settings.0.facebook.0.app_secret_setting_name"]},"app_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.facebook.0.app_secret","auth_settings.0.facebook.0.app_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"github":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.github.0.client_secret","auth_settings.0.github.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.github.0.client_secret","auth_settings.0.github.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"google":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.google.0.client_secret","auth_settings.0.google.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.google.0.client_secret","auth_settings.0.google.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"microsoft":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.microsoft.0.client_secret","auth_settings.0.microsoft.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.microsoft.0.client_secret","auth_settings.0.microsoft.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"twitter":{"nesting_mode":3,"block":{"attributes":{"consumer_key":{"type":"string","required":true},"consumer_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.twitter.0.consumer_secret","auth_settings.0.twitter.0.consumer_secret_setting_name"]},"consumer_secret_setting_name":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"auth_settings_v2":{"nesting_mode":3,"block":{"attributes":{"auth_enabled":{"type":"bool","optional":true},"config_file_path":{"type":"string","optional":true},"default_provider":{"type":"string","optional":true},"excluded_paths":{"type":["list","string"],"optional":true},"forward_proxy_convention":{"type":"string","optional":true,"default":"NoProxy"},"forward_proxy_custom_host_header_name":{"type":"string","optional":true},"forward_proxy_custom_scheme_header_name":{"type":"string","optional":true},"http_route_api_prefix":{"type":"string","optional":true,"default":"/.auth"},"require_authentication":{"type":"bool","optional":true},"require_https":{"type":"bool","optional":true,"default":true},"runtime_version":{"type":"string","optional":true,"default":"~1"},"unauthenticated_action":{"type":"string","optional":true,"default":"RedirectToLoginPage"}},"block_types":{"active_directory_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_applications":{"type":["list","string"],"optional":true},"allowed_audiences":{"type":["list","string"],"optional":true},"allowed_groups":{"type":["list","string"],"optional":true},"allowed_identities":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_certificate_thumbprint":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.active_directory_v2.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.active_directory_v2.0.client_secret_certificate_thumbprint"]},"jwt_allowed_client_applications":{"type":["list","string"],"optional":true},"jwt_allowed_groups":{"type":["list","string"],"optional":true},"login_parameters":{"type":["map","string"],"optional":true},"tenant_auth_endpoint":{"type":"string","required":true},"www_authentication_disabled":{"type":"bool","optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"apple_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"computed":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"azure_static_web_app_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"custom_oidc_v2":{"nesting_mode":3,"block":{"attributes":{"authorisation_endpoint":{"type":"string","computed":true},"certification_uri":{"type":"string","computed":true},"client_credential_method":{"type":"string","computed":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","computed":true},"issuer_endpoint":{"type":"string","computed":true},"name":{"type":"string","required":true},"name_claim_type":{"type":"string","optional":true},"openid_configuration_endpoint":{"type":"string","required":true},"scopes":{"type":["list","string"],"optional":true},"token_endpoint":{"type":"string","computed":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"facebook_v2":{"nesting_mode":3,"block":{"attributes":{"app_id":{"type":"string","required":true},"app_secret_setting_name":{"type":"string","required":true},"graph_api_version":{"type":"string","optional":true,"computed":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"github_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"google_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"login":{"nesting_mode":3,"block":{"attributes":{"allowed_external_redirect_urls":{"type":["list","string"],"optional":true},"cookie_expiration_convention":{"type":"string","optional":true,"default":"FixedTime"},"cookie_expiration_time":{"type":"string","optional":true,"default":"08:00:00"},"logout_endpoint":{"type":"string","optional":true},"nonce_expiration_time":{"type":"string","optional":true,"default":"00:05:00"},"preserve_url_fragments_for_logins":{"type":"bool","optional":true,"default":false},"token_refresh_extension_time":{"type":"number","optional":true,"default":72},"token_store_enabled":{"type":"bool","optional":true,"default":false},"token_store_path":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.login.0.token_store_sas_setting_name"]},"token_store_sas_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.login.0.token_store_path"]},"validate_nonce":{"type":"bool","optional":true,"default":true}}},"required":true},"microsoft_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"twitter_v2":{"nesting_mode":3,"block":{"attributes":{"consumer_key":{"type":"string","required":true},"consumer_secret_setting_name":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]}}},"optional":true},"backup":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"storage_account_url":{"type":"string","required":true}},"block_types":{"schedule":{"nesting_mode":3,"block":{"attributes":{"frequency_interval":{"type":"number","required":true},"frequency_unit":{"type":"string","required":true},"keep_at_least_one_backup":{"type":"bool","optional":true,"default":false},"last_execution_time":{"type":"string","computed":true},"retention_period_days":{"type":"number","optional":true,"default":30},"start_time":{"type":"string","optional":true,"computed":true}}},"required":true}}},"optional":true},"connection_string":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"type":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"site_config":{"nesting_mode":3,"block":{"attributes":{"always_on":{"type":"bool","optional":true,"computed":true},"api_definition_url":{"type":"string","optional":true},"api_management_api_id":{"type":"string","optional":true},"app_command_line":{"type":"string","optional":true},"app_scale_limit":{"type":"number","optional":true,"computed":true},"application_insights_connection_string":{"type":"string","optional":true},"application_insights_key":{"type":"string","optional":true},"container_registry_managed_identity_client_id":{"type":"string","optional":true},"container_registry_use_managed_identity":{"type":"bool","optional":true,"default":false},"default_documents":{"type":["list","string"],"optional":true,"computed":true},"detailed_error_logging_enabled":{"type":"bool","computed":true},"elastic_instance_minimum":{"type":"number","optional":true,"computed":true},"ftps_state":{"type":"string","optional":true,"default":"Disabled"},"health_check_eviction_time_in_min":{"type":"number","optional":true,"required_with":["site_config.0.health_check_path"]},"health_check_path":{"type":"string","optional":true,"required_with":["site_config.0.health_check_eviction_time_in_min"]},"http2_enabled":{"type":"bool","optional":true,"default":false},"ip_restriction_default_action":{"type":"string","optional":true,"default":"Allow"},"linux_fx_version":{"type":"string","computed":true},"load_balancing_mode":{"type":"string","optional":true,"default":"LeastRequests"},"managed_pipeline_mode":{"type":"string","optional":true,"default":"Integrated"},"minimum_tls_version":{"type":"string","optional":true,"default":"1.2"},"pre_warmed_instance_count":{"type":"number","optional":true,"computed":true},"remote_debugging_enabled":{"type":"bool","optional":true,"default":false},"remote_debugging_version":{"type":"string","optional":true,"computed":true},"runtime_scale_monitoring_enabled":{"type":"bool","optional":true},"scm_ip_restriction_default_action":{"type":"string","optional":true,"default":"Allow"},"scm_minimum_tls_version":{"type":"string","optional":true,"default":"1.2"},"scm_type":{"type":"string","computed":true},"scm_use_main_ip_restriction":{"type":"bool","optional":true,"default":false},"use_32_bit_worker":{"type":"bool","optional":true,"default":false},"vnet_route_all_enabled":{"type":"bool","optional":true,"default":false},"websockets_enabled":{"type":"bool","optional":true,"default":false},"worker_count":{"type":"number","optional":true,"computed":true}},"block_types":{"app_service_logs":{"nesting_mode":3,"block":{"attributes":{"disk_quota_mb":{"type":"number","optional":true,"default":35},"retention_period_days":{"type":"number","optional":true}}},"optional":true},"application_stack":{"nesting_mode":3,"block":{"attributes":{"dotnet_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.docker","site_config.0.application_stack.0.use_custom_runtime"]},"java_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.docker","site_config.0.application_stack.0.use_custom_runtime"]},"node_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.docker","site_config.0.application_stack.0.use_custom_runtime"]},"powershell_core_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.docker","site_config.0.application_stack.0.use_custom_runtime"]},"python_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.docker","site_config.0.application_stack.0.use_custom_runtime"]},"use_custom_runtime":{"type":"bool","optional":true,"exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.docker","site_config.0.application_stack.0.use_custom_runtime"]},"use_dotnet_isolated_runtime":{"type":"bool","optional":true,"default":false,"conflicts_with":["site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.docker","site_config.0.application_stack.0.use_custom_runtime"]}},"block_types":{"docker":{"nesting_mode":3,"block":{"attributes":{"image_name":{"type":"string","required":true},"image_tag":{"type":"string","required":true},"registry_password":{"type":"string","optional":true},"registry_url":{"type":"string","required":true},"registry_username":{"type":"string","optional":true}}},"optional":true,"exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.docker","site_config.0.application_stack.0.use_custom_runtime"]}}},"optional":true},"cors":{"nesting_mode":3,"block":{"attributes":{"allowed_origins":{"type":["set","string"],"optional":true},"support_credentials":{"type":"bool","optional":true,"default":false}}},"optional":true},"ip_restriction":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"default":"Allow"},"description":{"type":"string","optional":true},"headers":{"type":["list",["object",{"x_azure_fdid":["list","string"],"x_fd_health_probe":["list","string"],"x_forwarded_for":["list","string"],"x_forwarded_host":["list","string"]}]],"optional":true},"ip_address":{"type":"string","optional":true},"name":{"type":"string","optional":true,"computed":true},"priority":{"type":"number","optional":true,"default":65000},"service_tag":{"type":"string","optional":true},"virtual_network_subnet_id":{"type":"string","optional":true}}},"optional":true},"scm_ip_restriction":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"default":"Allow"},"description":{"type":"string","optional":true},"headers":{"type":["list",["object",{"x_azure_fdid":["list","string"],"x_fd_health_probe":["list","string"],"x_forwarded_for":["list","string"],"x_forwarded_host":["list","string"]}]],"optional":true},"ip_address":{"type":"string","optional":true},"name":{"type":"string","optional":true,"computed":true},"priority":{"type":"number","optional":true,"default":65000},"service_tag":{"type":"string","optional":true},"virtual_network_subnet_id":{"type":"string","optional":true}}},"optional":true}}},"required":true},"sticky_settings":{"nesting_mode":3,"block":{"attributes":{"app_setting_names":{"type":["list","string"],"optional":true,"at_least_one_of":["sticky_settings.0.app_setting_names","sticky_settings.0.connection_string_names"]},"connection_string_names":{"type":["list","string"],"optional":true,"at_least_one_of":["sticky_settings.0.app_setting_names","sticky_settings.0.connection_string_names"]}}},"optional":true},"storage_account":{"nesting_mode":4,"block":{"attributes":{"access_key":{"type":"string","required":true},"account_name":{"type":"string","required":true},"mount_path":{"type":"string","optional":true},"name":{"type":"string","required":true},"share_name":{"type":"string","required":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_linux_function_app_slot":{"block":{"attributes":{"app_settings":{"type":["map","string"],"optional":true},"builtin_logging_enabled":{"type":"bool","optional":true,"default":true},"client_certificate_enabled":{"type":"bool","optional":true,"default":false},"client_certificate_exclusion_paths":{"type":"string","optional":true},"client_certificate_mode":{"type":"string","optional":true,"default":"Optional"},"content_share_force_disabled":{"type":"bool","optional":true,"default":false},"custom_domain_verification_id":{"type":"string","computed":true},"daily_memory_time_quota":{"type":"number","optional":true,"default":0},"default_hostname":{"type":"string","computed":true},"enabled":{"type":"bool","optional":true,"default":true},"ftp_publish_basic_authentication_enabled":{"type":"bool","optional":true,"default":true},"function_app_id":{"type":"string","required":true},"functions_extension_version":{"type":"string","optional":true,"default":"~4"},"hosting_environment_id":{"type":"string","computed":true},"https_only":{"type":"bool","optional":true,"default":false},"key_vault_reference_identity_id":{"type":"string","optional":true,"computed":true},"kind":{"type":"string","computed":true},"name":{"type":"string","required":true},"outbound_ip_address_list":{"type":["list","string"],"computed":true},"outbound_ip_addresses":{"type":"string","computed":true},"possible_outbound_ip_address_list":{"type":["list","string"],"computed":true},"possible_outbound_ip_addresses":{"type":"string","computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"service_plan_id":{"type":"string","optional":true},"site_credential":{"type":["list",["object",{"name":"string","password":"string"}]],"computed":true},"storage_account_access_key":{"type":"string","optional":true,"conflicts_with":["storage_uses_managed_identity","storage_key_vault_secret_id"]},"storage_account_name":{"type":"string","optional":true,"exactly_one_of":["storage_account_name","storage_key_vault_secret_id"]},"storage_key_vault_secret_id":{"type":"string","optional":true,"exactly_one_of":["storage_account_name","storage_key_vault_secret_id"]},"storage_uses_managed_identity":{"type":"bool","optional":true,"default":false,"conflicts_with":["storage_account_access_key","storage_key_vault_secret_id"]},"tags":{"type":["map","string"],"optional":true},"virtual_network_subnet_id":{"type":"string","optional":true},"vnet_image_pull_enabled":{"type":"bool","optional":true,"default":false},"webdeploy_publish_basic_authentication_enabled":{"type":"bool","optional":true,"default":true}},"block_types":{"auth_settings":{"nesting_mode":3,"block":{"attributes":{"additional_login_parameters":{"type":["map","string"],"optional":true},"allowed_external_redirect_urls":{"type":["list","string"],"optional":true,"computed":true},"default_provider":{"type":"string","optional":true,"computed":true},"enabled":{"type":"bool","required":true},"issuer":{"type":"string","optional":true},"runtime_version":{"type":"string","optional":true,"computed":true},"token_refresh_extension_hours":{"type":"number","optional":true,"default":72},"token_store_enabled":{"type":"bool","optional":true,"default":false},"unauthenticated_client_action":{"type":"string","optional":true,"computed":true}},"block_types":{"active_directory":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"conflicts_with":["auth_settings.0.active_directory.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings.0.active_directory.0.client_secret"]}}},"optional":true},"facebook":{"nesting_mode":3,"block":{"attributes":{"app_id":{"type":"string","required":true},"app_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.facebook.0.app_secret","auth_settings.0.facebook.0.app_secret_setting_name"]},"app_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.facebook.0.app_secret","auth_settings.0.facebook.0.app_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"github":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.github.0.client_secret","auth_settings.0.github.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.github.0.client_secret","auth_settings.0.github.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"google":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.google.0.client_secret","auth_settings.0.google.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.google.0.client_secret","auth_settings.0.google.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"microsoft":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.microsoft.0.client_secret","auth_settings.0.microsoft.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.microsoft.0.client_secret","auth_settings.0.microsoft.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"twitter":{"nesting_mode":3,"block":{"attributes":{"consumer_key":{"type":"string","required":true},"consumer_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.twitter.0.consumer_secret","auth_settings.0.twitter.0.consumer_secret_setting_name"]},"consumer_secret_setting_name":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"auth_settings_v2":{"nesting_mode":3,"block":{"attributes":{"auth_enabled":{"type":"bool","optional":true},"config_file_path":{"type":"string","optional":true},"default_provider":{"type":"string","optional":true},"excluded_paths":{"type":["list","string"],"optional":true},"forward_proxy_convention":{"type":"string","optional":true,"default":"NoProxy"},"forward_proxy_custom_host_header_name":{"type":"string","optional":true},"forward_proxy_custom_scheme_header_name":{"type":"string","optional":true},"http_route_api_prefix":{"type":"string","optional":true,"default":"/.auth"},"require_authentication":{"type":"bool","optional":true},"require_https":{"type":"bool","optional":true,"default":true},"runtime_version":{"type":"string","optional":true,"default":"~1"},"unauthenticated_action":{"type":"string","optional":true,"default":"RedirectToLoginPage"}},"block_types":{"active_directory_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_applications":{"type":["list","string"],"optional":true},"allowed_audiences":{"type":["list","string"],"optional":true},"allowed_groups":{"type":["list","string"],"optional":true},"allowed_identities":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_certificate_thumbprint":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.active_directory_v2.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.active_directory_v2.0.client_secret_certificate_thumbprint"]},"jwt_allowed_client_applications":{"type":["list","string"],"optional":true},"jwt_allowed_groups":{"type":["list","string"],"optional":true},"login_parameters":{"type":["map","string"],"optional":true},"tenant_auth_endpoint":{"type":"string","required":true},"www_authentication_disabled":{"type":"bool","optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"apple_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"computed":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"azure_static_web_app_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"custom_oidc_v2":{"nesting_mode":3,"block":{"attributes":{"authorisation_endpoint":{"type":"string","computed":true},"certification_uri":{"type":"string","computed":true},"client_credential_method":{"type":"string","computed":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","computed":true},"issuer_endpoint":{"type":"string","computed":true},"name":{"type":"string","required":true},"name_claim_type":{"type":"string","optional":true},"openid_configuration_endpoint":{"type":"string","required":true},"scopes":{"type":["list","string"],"optional":true},"token_endpoint":{"type":"string","computed":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"facebook_v2":{"nesting_mode":3,"block":{"attributes":{"app_id":{"type":"string","required":true},"app_secret_setting_name":{"type":"string","required":true},"graph_api_version":{"type":"string","optional":true,"computed":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"github_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"google_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"login":{"nesting_mode":3,"block":{"attributes":{"allowed_external_redirect_urls":{"type":["list","string"],"optional":true},"cookie_expiration_convention":{"type":"string","optional":true,"default":"FixedTime"},"cookie_expiration_time":{"type":"string","optional":true,"default":"08:00:00"},"logout_endpoint":{"type":"string","optional":true},"nonce_expiration_time":{"type":"string","optional":true,"default":"00:05:00"},"preserve_url_fragments_for_logins":{"type":"bool","optional":true,"default":false},"token_refresh_extension_time":{"type":"number","optional":true,"default":72},"token_store_enabled":{"type":"bool","optional":true,"default":false},"token_store_path":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.login.0.token_store_sas_setting_name"]},"token_store_sas_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.login.0.token_store_path"]},"validate_nonce":{"type":"bool","optional":true,"default":true}}},"required":true},"microsoft_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"twitter_v2":{"nesting_mode":3,"block":{"attributes":{"consumer_key":{"type":"string","required":true},"consumer_secret_setting_name":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]}}},"optional":true},"backup":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"storage_account_url":{"type":"string","required":true}},"block_types":{"schedule":{"nesting_mode":3,"block":{"attributes":{"frequency_interval":{"type":"number","required":true},"frequency_unit":{"type":"string","required":true},"keep_at_least_one_backup":{"type":"bool","optional":true,"default":false},"last_execution_time":{"type":"string","computed":true},"retention_period_days":{"type":"number","optional":true,"default":30},"start_time":{"type":"string","optional":true,"computed":true}}},"required":true}}},"optional":true},"connection_string":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"type":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"site_config":{"nesting_mode":3,"block":{"attributes":{"always_on":{"type":"bool","optional":true,"computed":true},"api_definition_url":{"type":"string","optional":true},"api_management_api_id":{"type":"string","optional":true},"app_command_line":{"type":"string","optional":true},"app_scale_limit":{"type":"number","optional":true,"computed":true},"application_insights_connection_string":{"type":"string","optional":true},"application_insights_key":{"type":"string","optional":true},"auto_swap_slot_name":{"type":"string","optional":true},"container_registry_managed_identity_client_id":{"type":"string","optional":true},"container_registry_use_managed_identity":{"type":"bool","optional":true,"default":false},"default_documents":{"type":["list","string"],"optional":true,"computed":true},"detailed_error_logging_enabled":{"type":"bool","computed":true},"elastic_instance_minimum":{"type":"number","optional":true,"computed":true},"ftps_state":{"type":"string","optional":true,"default":"Disabled"},"health_check_eviction_time_in_min":{"type":"number","optional":true,"default":0},"health_check_path":{"type":"string","optional":true},"http2_enabled":{"type":"bool","optional":true,"default":false},"ip_restriction_default_action":{"type":"string","optional":true,"default":"Allow"},"linux_fx_version":{"type":"string","computed":true},"load_balancing_mode":{"type":"string","optional":true,"default":"LeastRequests"},"managed_pipeline_mode":{"type":"string","optional":true,"default":"Integrated"},"minimum_tls_version":{"type":"string","optional":true,"default":"1.2"},"pre_warmed_instance_count":{"type":"number","optional":true,"computed":true},"remote_debugging_enabled":{"type":"bool","optional":true,"default":false},"remote_debugging_version":{"type":"string","optional":true,"computed":true},"runtime_scale_monitoring_enabled":{"type":"bool","optional":true},"scm_ip_restriction_default_action":{"type":"string","optional":true,"default":"Allow"},"scm_minimum_tls_version":{"type":"string","optional":true,"default":"1.2"},"scm_type":{"type":"string","computed":true},"scm_use_main_ip_restriction":{"type":"bool","optional":true,"default":false},"use_32_bit_worker":{"type":"bool","optional":true,"default":false},"vnet_route_all_enabled":{"type":"bool","optional":true,"default":false},"websockets_enabled":{"type":"bool","optional":true,"default":false},"worker_count":{"type":"number","optional":true,"computed":true}},"block_types":{"app_service_logs":{"nesting_mode":3,"block":{"attributes":{"disk_quota_mb":{"type":"number","optional":true,"default":35},"retention_period_days":{"type":"number","optional":true}}},"optional":true},"application_stack":{"nesting_mode":3,"block":{"attributes":{"dotnet_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.docker","site_config.0.application_stack.0.use_custom_runtime"]},"java_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.docker","site_config.0.application_stack.0.use_custom_runtime"]},"node_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.docker","site_config.0.application_stack.0.use_custom_runtime"]},"powershell_core_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.docker","site_config.0.application_stack.0.use_custom_runtime"]},"python_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.docker","site_config.0.application_stack.0.use_custom_runtime"]},"use_custom_runtime":{"type":"bool","optional":true,"exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.docker","site_config.0.application_stack.0.use_custom_runtime"]},"use_dotnet_isolated_runtime":{"type":"bool","optional":true,"default":false,"conflicts_with":["site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.docker","site_config.0.application_stack.0.use_custom_runtime"]}},"block_types":{"docker":{"nesting_mode":3,"block":{"attributes":{"image_name":{"type":"string","required":true},"image_tag":{"type":"string","required":true},"registry_password":{"type":"string","optional":true},"registry_url":{"type":"string","required":true},"registry_username":{"type":"string","optional":true}}},"optional":true,"exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.docker","site_config.0.application_stack.0.use_custom_runtime"]}}},"optional":true},"cors":{"nesting_mode":3,"block":{"attributes":{"allowed_origins":{"type":["set","string"],"optional":true},"support_credentials":{"type":"bool","optional":true,"default":false}}},"optional":true},"ip_restriction":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"default":"Allow"},"description":{"type":"string","optional":true},"headers":{"type":["list",["object",{"x_azure_fdid":["list","string"],"x_fd_health_probe":["list","string"],"x_forwarded_for":["list","string"],"x_forwarded_host":["list","string"]}]],"optional":true},"ip_address":{"type":"string","optional":true},"name":{"type":"string","optional":true,"computed":true},"priority":{"type":"number","optional":true,"default":65000},"service_tag":{"type":"string","optional":true},"virtual_network_subnet_id":{"type":"string","optional":true}}},"optional":true},"scm_ip_restriction":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"default":"Allow"},"description":{"type":"string","optional":true},"headers":{"type":["list",["object",{"x_azure_fdid":["list","string"],"x_fd_health_probe":["list","string"],"x_forwarded_for":["list","string"],"x_forwarded_host":["list","string"]}]],"optional":true},"ip_address":{"type":"string","optional":true},"name":{"type":"string","optional":true,"computed":true},"priority":{"type":"number","optional":true,"default":65000},"service_tag":{"type":"string","optional":true},"virtual_network_subnet_id":{"type":"string","optional":true}}},"optional":true}}},"required":true},"storage_account":{"nesting_mode":4,"block":{"attributes":{"access_key":{"type":"string","required":true},"account_name":{"type":"string","required":true},"mount_path":{"type":"string","optional":true},"name":{"type":"string","required":true},"share_name":{"type":"string","required":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_linux_virtual_machine":{"block":{"attributes":{"admin_password":{"type":"string","optional":true},"admin_username":{"type":"string","required":true},"allow_extension_operations":{"type":"bool","optional":true,"default":true},"availability_set_id":{"type":"string","optional":true,"conflicts_with":["capacity_reservation_group_id","virtual_machine_scale_set_id","zone"]},"bypass_platform_safety_checks_on_user_schedule_enabled":{"type":"bool","optional":true,"default":false},"capacity_reservation_group_id":{"type":"string","optional":true,"conflicts_with":["availability_set_id","proximity_placement_group_id"]},"computer_name":{"type":"string","optional":true,"computed":true},"custom_data":{"type":"string","optional":true},"dedicated_host_group_id":{"type":"string","optional":true,"conflicts_with":["dedicated_host_id"]},"dedicated_host_id":{"type":"string","optional":true,"conflicts_with":["dedicated_host_group_id"]},"disable_password_authentication":{"type":"bool","optional":true,"default":true},"disk_controller_type":{"type":"string","optional":true,"computed":true},"edge_zone":{"type":"string","optional":true},"encryption_at_host_enabled":{"type":"bool","optional":true},"eviction_policy":{"type":"string","optional":true},"extensions_time_budget":{"type":"string","optional":true,"default":"PT1H30M"},"license_type":{"type":"string","optional":true},"location":{"type":"string","required":true},"max_bid_price":{"type":"number","optional":true,"default":-1},"name":{"type":"string","required":true},"network_interface_ids":{"type":["list","string"],"required":true},"patch_assessment_mode":{"type":"string","optional":true,"default":"ImageDefault"},"patch_mode":{"type":"string","optional":true,"default":"ImageDefault"},"platform_fault_domain":{"type":"number","optional":true,"default":-1,"required_with":["virtual_machine_scale_set_id"]},"priority":{"type":"string","optional":true,"default":"Regular"},"private_ip_address":{"type":"string","computed":true},"private_ip_addresses":{"type":["list","string"],"computed":true},"provision_vm_agent":{"type":"bool","optional":true,"default":true},"proximity_placement_group_id":{"type":"string","optional":true,"conflicts_with":["capacity_reservation_group_id"]},"public_ip_address":{"type":"string","computed":true},"public_ip_addresses":{"type":["list","string"],"computed":true},"reboot_setting":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"secure_boot_enabled":{"type":"bool","optional":true},"size":{"type":"string","required":true},"source_image_id":{"type":"string","optional":true,"exactly_one_of":["source_image_id","source_image_reference"]},"tags":{"type":["map","string"],"optional":true},"user_data":{"type":"string","optional":true},"virtual_machine_id":{"type":"string","computed":true},"virtual_machine_scale_set_id":{"type":"string","optional":true,"conflicts_with":["availability_set_id"]},"vm_agent_platform_updates_enabled":{"type":"bool","optional":true,"default":false},"vtpm_enabled":{"type":"bool","optional":true},"zone":{"type":"string","optional":true}},"block_types":{"additional_capabilities":{"nesting_mode":3,"block":{"attributes":{"hibernation_enabled":{"type":"bool","optional":true,"default":false},"ultra_ssd_enabled":{"type":"bool","optional":true,"default":false}}},"optional":true},"admin_ssh_key":{"nesting_mode":4,"block":{"attributes":{"public_key":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true},"boot_diagnostics":{"nesting_mode":3,"block":{"attributes":{"storage_account_uri":{"type":"string","optional":true}}},"optional":true},"gallery_application":{"nesting_mode":3,"block":{"attributes":{"automatic_upgrade_enabled":{"type":"bool","optional":true,"default":false},"configuration_blob_uri":{"type":"string","optional":true},"order":{"type":"number","optional":true,"default":0},"tag":{"type":"string","optional":true},"treat_failure_as_deployment_failure_enabled":{"type":"bool","optional":true,"default":false},"version_id":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"os_disk":{"nesting_mode":3,"block":{"attributes":{"caching":{"type":"string","required":true},"disk_encryption_set_id":{"type":"string","optional":true,"conflicts_with":["os_disk.0.secure_vm_disk_encryption_set_id"]},"disk_size_gb":{"type":"number","optional":true,"computed":true},"id":{"type":"string","computed":true},"name":{"type":"string","optional":true,"computed":true},"secure_vm_disk_encryption_set_id":{"type":"string","optional":true,"conflicts_with":["os_disk.0.disk_encryption_set_id"]},"security_encryption_type":{"type":"string","optional":true},"storage_account_type":{"type":"string","required":true},"write_accelerator_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"diff_disk_settings":{"nesting_mode":3,"block":{"attributes":{"option":{"type":"string","required":true},"placement":{"type":"string","optional":true,"default":"CacheDisk"}}},"optional":true}}},"required":true},"os_image_notification":{"nesting_mode":3,"block":{"attributes":{"timeout":{"type":"string","optional":true,"default":"PT15M"}}},"optional":true},"plan":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"product":{"type":"string","required":true},"publisher":{"type":"string","required":true}}},"optional":true},"secret":{"nesting_mode":3,"block":{"attributes":{"key_vault_id":{"type":"string","required":true}},"block_types":{"certificate":{"nesting_mode":4,"block":{"attributes":{"url":{"type":"string","required":true}}},"required":true}}},"optional":true},"source_image_reference":{"nesting_mode":3,"block":{"attributes":{"offer":{"type":"string","required":true},"publisher":{"type":"string","required":true},"sku":{"type":"string","required":true},"version":{"type":"string","required":true}}},"optional":true,"exactly_one_of":["source_image_id","source_image_reference"]},"termination_notification":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","required":true},"timeout":{"type":"string","optional":true,"default":"PT5M"}}},"optional":true,"computed":true}}}},"azurerm_linux_virtual_machine_scale_set":{"block":{"attributes":{"admin_password":{"type":"string","optional":true},"admin_username":{"type":"string","required":true},"capacity_reservation_group_id":{"type":"string","optional":true,"conflicts_with":["proximity_placement_group_id"]},"computer_name_prefix":{"type":"string","optional":true,"computed":true},"custom_data":{"type":"string","optional":true},"disable_password_authentication":{"type":"bool","optional":true,"default":true},"do_not_run_extensions_on_overprovisioned_machines":{"type":"bool","optional":true,"default":false},"edge_zone":{"type":"string","optional":true},"encryption_at_host_enabled":{"type":"bool","optional":true},"eviction_policy":{"type":"string","optional":true},"extension_operations_enabled":{"type":"bool","optional":true,"default":true},"extensions_time_budget":{"type":"string","optional":true,"default":"PT1H30M"},"health_probe_id":{"type":"string","optional":true},"host_group_id":{"type":"string","optional":true},"instances":{"type":"number","optional":true,"default":0},"location":{"type":"string","required":true},"max_bid_price":{"type":"number","optional":true,"default":-1},"name":{"type":"string","required":true},"overprovision":{"type":"bool","optional":true,"default":true},"platform_fault_domain_count":{"type":"number","optional":true,"computed":true},"priority":{"type":"string","optional":true,"default":"Regular"},"provision_vm_agent":{"type":"bool","optional":true,"default":true},"proximity_placement_group_id":{"type":"string","optional":true,"conflicts_with":["capacity_reservation_group_id"]},"resource_group_name":{"type":"string","required":true},"secure_boot_enabled":{"type":"bool","optional":true},"single_placement_group":{"type":"bool","optional":true,"default":true},"sku":{"type":"string","required":true},"source_image_id":{"type":"string","optional":true,"exactly_one_of":["source_image_id","source_image_reference"]},"tags":{"type":["map","string"],"optional":true},"unique_id":{"type":"string","computed":true},"upgrade_mode":{"type":"string","optional":true,"default":"Manual"},"user_data":{"type":"string","optional":true},"vtpm_enabled":{"type":"bool","optional":true},"zone_balance":{"type":"bool","optional":true,"default":false},"zones":{"type":["set","string"],"optional":true}},"block_types":{"additional_capabilities":{"nesting_mode":3,"block":{"attributes":{"ultra_ssd_enabled":{"type":"bool","optional":true,"default":false}}},"optional":true},"admin_ssh_key":{"nesting_mode":4,"block":{"attributes":{"public_key":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true},"automatic_instance_repair":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"computed":true},"enabled":{"type":"bool","required":true},"grace_period":{"type":"string","optional":true,"computed":true}}},"optional":true,"computed":true},"automatic_os_upgrade_policy":{"nesting_mode":3,"block":{"attributes":{"disable_automatic_rollback":{"type":"bool","required":true},"enable_automatic_os_upgrade":{"type":"bool","required":true}}},"optional":true},"boot_diagnostics":{"nesting_mode":3,"block":{"attributes":{"storage_account_uri":{"type":"string","optional":true}}},"optional":true},"data_disk":{"nesting_mode":3,"block":{"attributes":{"caching":{"type":"string","required":true},"create_option":{"type":"string","optional":true,"default":"Empty"},"disk_encryption_set_id":{"type":"string","optional":true},"disk_size_gb":{"type":"number","required":true},"lun":{"type":"number","required":true},"name":{"type":"string","optional":true},"storage_account_type":{"type":"string","required":true},"ultra_ssd_disk_iops_read_write":{"type":"number","optional":true,"computed":true},"ultra_ssd_disk_mbps_read_write":{"type":"number","optional":true,"computed":true},"write_accelerator_enabled":{"type":"bool","optional":true,"default":false}}},"optional":true},"extension":{"nesting_mode":4,"block":{"attributes":{"auto_upgrade_minor_version":{"type":"bool","optional":true,"default":true},"automatic_upgrade_enabled":{"type":"bool","optional":true,"default":false},"force_update_tag":{"type":"string","optional":true},"name":{"type":"string","required":true},"protected_settings":{"type":"string","optional":true},"provision_after_extensions":{"type":["list","string"],"optional":true},"publisher":{"type":"string","required":true},"settings":{"type":"string","optional":true},"type":{"type":"string","required":true},"type_handler_version":{"type":"string","required":true}},"block_types":{"protected_settings_from_key_vault":{"nesting_mode":3,"block":{"attributes":{"secret_url":{"type":"string","required":true},"source_vault_id":{"type":"string","required":true}}},"optional":true}}},"optional":true,"computed":true},"gallery_application":{"nesting_mode":3,"block":{"attributes":{"configuration_blob_uri":{"type":"string","optional":true},"order":{"type":"number","optional":true,"default":0},"tag":{"type":"string","optional":true},"version_id":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"network_interface":{"nesting_mode":3,"block":{"attributes":{"dns_servers":{"type":["list","string"],"optional":true},"enable_accelerated_networking":{"type":"bool","optional":true,"default":false},"enable_ip_forwarding":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"network_security_group_id":{"type":"string","optional":true},"primary":{"type":"bool","optional":true,"default":false}},"block_types":{"ip_configuration":{"nesting_mode":3,"block":{"attributes":{"application_gateway_backend_address_pool_ids":{"type":["set","string"],"optional":true},"application_security_group_ids":{"type":["set","string"],"optional":true},"load_balancer_backend_address_pool_ids":{"type":["set","string"],"optional":true},"load_balancer_inbound_nat_rules_ids":{"type":["set","string"],"optional":true},"name":{"type":"string","required":true},"primary":{"type":"bool","optional":true,"default":false},"subnet_id":{"type":"string","optional":true},"version":{"type":"string","optional":true,"default":"IPv4"}},"block_types":{"public_ip_address":{"nesting_mode":3,"block":{"attributes":{"domain_name_label":{"type":"string","optional":true},"idle_timeout_in_minutes":{"type":"number","optional":true,"computed":true},"name":{"type":"string","required":true},"public_ip_prefix_id":{"type":"string","optional":true},"version":{"type":"string","optional":true,"default":"IPv4"}},"block_types":{"ip_tag":{"nesting_mode":3,"block":{"attributes":{"tag":{"type":"string","required":true},"type":{"type":"string","required":true}}},"optional":true}}},"optional":true}}},"required":true}}},"required":true},"os_disk":{"nesting_mode":3,"block":{"attributes":{"caching":{"type":"string","required":true},"disk_encryption_set_id":{"type":"string","optional":true,"conflicts_with":["os_disk.0.secure_vm_disk_encryption_set_id"]},"disk_size_gb":{"type":"number","optional":true,"computed":true},"secure_vm_disk_encryption_set_id":{"type":"string","optional":true,"conflicts_with":["os_disk.0.disk_encryption_set_id"]},"security_encryption_type":{"type":"string","optional":true},"storage_account_type":{"type":"string","required":true},"write_accelerator_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"diff_disk_settings":{"nesting_mode":3,"block":{"attributes":{"option":{"type":"string","required":true},"placement":{"type":"string","optional":true,"default":"CacheDisk"}}},"optional":true}}},"required":true},"plan":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"product":{"type":"string","required":true},"publisher":{"type":"string","required":true}}},"optional":true},"rolling_upgrade_policy":{"nesting_mode":3,"block":{"attributes":{"cross_zone_upgrades_enabled":{"type":"bool","optional":true},"max_batch_instance_percent":{"type":"number","required":true},"max_unhealthy_instance_percent":{"type":"number","required":true},"max_unhealthy_upgraded_instance_percent":{"type":"number","required":true},"maximum_surge_instances_enabled":{"type":"bool","optional":true},"pause_time_between_batches":{"type":"string","required":true},"prioritize_unhealthy_instances_enabled":{"type":"bool","optional":true}}},"optional":true},"scale_in":{"nesting_mode":3,"block":{"attributes":{"force_deletion_enabled":{"type":"bool","optional":true,"default":false},"rule":{"type":"string","optional":true,"default":"Default"}}},"optional":true},"secret":{"nesting_mode":3,"block":{"attributes":{"key_vault_id":{"type":"string","required":true}},"block_types":{"certificate":{"nesting_mode":4,"block":{"attributes":{"url":{"type":"string","required":true}}},"required":true}}},"optional":true},"source_image_reference":{"nesting_mode":3,"block":{"attributes":{"offer":{"type":"string","required":true},"publisher":{"type":"string","required":true},"sku":{"type":"string","required":true},"version":{"type":"string","required":true}}},"optional":true,"exactly_one_of":["source_image_id","source_image_reference"]},"spot_restore":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":false},"timeout":{"type":"string","optional":true,"default":"PT1H"}}},"optional":true,"computed":true},"termination_notification":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","required":true},"timeout":{"type":"string","optional":true,"default":"PT5M"}}},"optional":true,"computed":true}}}},"azurerm_linux_web_app":{"block":{"attributes":{"app_settings":{"type":["map","string"],"optional":true},"client_affinity_enabled":{"type":"bool","optional":true,"default":false},"client_certificate_enabled":{"type":"bool","optional":true,"default":false},"client_certificate_exclusion_paths":{"type":"string","optional":true},"client_certificate_mode":{"type":"string","optional":true,"default":"Required"},"custom_domain_verification_id":{"type":"string","computed":true},"default_hostname":{"type":"string","computed":true},"enabled":{"type":"bool","optional":true,"default":true},"ftp_publish_basic_authentication_enabled":{"type":"bool","optional":true,"default":true},"hosting_environment_id":{"type":"string","computed":true},"https_only":{"type":"bool","optional":true,"default":false},"key_vault_reference_identity_id":{"type":"string","optional":true,"computed":true},"kind":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"outbound_ip_address_list":{"type":["list","string"],"computed":true},"outbound_ip_addresses":{"type":"string","computed":true},"possible_outbound_ip_address_list":{"type":["list","string"],"computed":true},"possible_outbound_ip_addresses":{"type":"string","computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"service_plan_id":{"type":"string","required":true},"site_credential":{"type":["list",["object",{"name":"string","password":"string"}]],"computed":true},"tags":{"type":["map","string"],"optional":true},"virtual_network_subnet_id":{"type":"string","optional":true},"webdeploy_publish_basic_authentication_enabled":{"type":"bool","optional":true,"default":true},"zip_deploy_file":{"type":"string","optional":true,"computed":true}},"block_types":{"auth_settings":{"nesting_mode":3,"block":{"attributes":{"additional_login_parameters":{"type":["map","string"],"optional":true},"allowed_external_redirect_urls":{"type":["list","string"],"optional":true,"computed":true},"default_provider":{"type":"string","optional":true,"computed":true},"enabled":{"type":"bool","required":true},"issuer":{"type":"string","optional":true},"runtime_version":{"type":"string","optional":true,"computed":true},"token_refresh_extension_hours":{"type":"number","optional":true,"default":72},"token_store_enabled":{"type":"bool","optional":true,"default":false},"unauthenticated_client_action":{"type":"string","optional":true,"computed":true}},"block_types":{"active_directory":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"conflicts_with":["auth_settings.0.active_directory.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings.0.active_directory.0.client_secret"]}}},"optional":true},"facebook":{"nesting_mode":3,"block":{"attributes":{"app_id":{"type":"string","required":true},"app_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.facebook.0.app_secret","auth_settings.0.facebook.0.app_secret_setting_name"]},"app_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.facebook.0.app_secret","auth_settings.0.facebook.0.app_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"github":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.github.0.client_secret","auth_settings.0.github.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.github.0.client_secret","auth_settings.0.github.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"google":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.google.0.client_secret","auth_settings.0.google.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.google.0.client_secret","auth_settings.0.google.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"microsoft":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.microsoft.0.client_secret","auth_settings.0.microsoft.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.microsoft.0.client_secret","auth_settings.0.microsoft.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"twitter":{"nesting_mode":3,"block":{"attributes":{"consumer_key":{"type":"string","required":true},"consumer_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.twitter.0.consumer_secret","auth_settings.0.twitter.0.consumer_secret_setting_name"]},"consumer_secret_setting_name":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"auth_settings_v2":{"nesting_mode":3,"block":{"attributes":{"auth_enabled":{"type":"bool","optional":true},"config_file_path":{"type":"string","optional":true},"default_provider":{"type":"string","optional":true},"excluded_paths":{"type":["list","string"],"optional":true},"forward_proxy_convention":{"type":"string","optional":true,"default":"NoProxy"},"forward_proxy_custom_host_header_name":{"type":"string","optional":true},"forward_proxy_custom_scheme_header_name":{"type":"string","optional":true},"http_route_api_prefix":{"type":"string","optional":true,"default":"/.auth"},"require_authentication":{"type":"bool","optional":true},"require_https":{"type":"bool","optional":true,"default":true},"runtime_version":{"type":"string","optional":true,"default":"~1"},"unauthenticated_action":{"type":"string","optional":true,"default":"RedirectToLoginPage"}},"block_types":{"active_directory_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_applications":{"type":["list","string"],"optional":true},"allowed_audiences":{"type":["list","string"],"optional":true},"allowed_groups":{"type":["list","string"],"optional":true},"allowed_identities":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_certificate_thumbprint":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.active_directory_v2.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.active_directory_v2.0.client_secret_certificate_thumbprint"]},"jwt_allowed_client_applications":{"type":["list","string"],"optional":true},"jwt_allowed_groups":{"type":["list","string"],"optional":true},"login_parameters":{"type":["map","string"],"optional":true},"tenant_auth_endpoint":{"type":"string","required":true},"www_authentication_disabled":{"type":"bool","optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"apple_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"computed":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"azure_static_web_app_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"custom_oidc_v2":{"nesting_mode":3,"block":{"attributes":{"authorisation_endpoint":{"type":"string","computed":true},"certification_uri":{"type":"string","computed":true},"client_credential_method":{"type":"string","computed":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","computed":true},"issuer_endpoint":{"type":"string","computed":true},"name":{"type":"string","required":true},"name_claim_type":{"type":"string","optional":true},"openid_configuration_endpoint":{"type":"string","required":true},"scopes":{"type":["list","string"],"optional":true},"token_endpoint":{"type":"string","computed":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"facebook_v2":{"nesting_mode":3,"block":{"attributes":{"app_id":{"type":"string","required":true},"app_secret_setting_name":{"type":"string","required":true},"graph_api_version":{"type":"string","optional":true,"computed":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"github_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"google_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"login":{"nesting_mode":3,"block":{"attributes":{"allowed_external_redirect_urls":{"type":["list","string"],"optional":true},"cookie_expiration_convention":{"type":"string","optional":true,"default":"FixedTime"},"cookie_expiration_time":{"type":"string","optional":true,"default":"08:00:00"},"logout_endpoint":{"type":"string","optional":true},"nonce_expiration_time":{"type":"string","optional":true,"default":"00:05:00"},"preserve_url_fragments_for_logins":{"type":"bool","optional":true,"default":false},"token_refresh_extension_time":{"type":"number","optional":true,"default":72},"token_store_enabled":{"type":"bool","optional":true,"default":false},"token_store_path":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.login.0.token_store_sas_setting_name"]},"token_store_sas_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.login.0.token_store_path"]},"validate_nonce":{"type":"bool","optional":true,"default":true}}},"required":true},"microsoft_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"twitter_v2":{"nesting_mode":3,"block":{"attributes":{"consumer_key":{"type":"string","required":true},"consumer_secret_setting_name":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]}}},"optional":true},"backup":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"storage_account_url":{"type":"string","required":true}},"block_types":{"schedule":{"nesting_mode":3,"block":{"attributes":{"frequency_interval":{"type":"number","required":true},"frequency_unit":{"type":"string","required":true},"keep_at_least_one_backup":{"type":"bool","optional":true,"default":false},"last_execution_time":{"type":"string","computed":true},"retention_period_days":{"type":"number","optional":true,"default":30},"start_time":{"type":"string","optional":true,"computed":true}}},"required":true}}},"optional":true},"connection_string":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"type":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"logs":{"nesting_mode":3,"block":{"attributes":{"detailed_error_messages":{"type":"bool","optional":true,"default":false},"failed_request_tracing":{"type":"bool","optional":true,"default":false}},"block_types":{"application_logs":{"nesting_mode":3,"block":{"attributes":{"file_system_level":{"type":"string","required":true}},"block_types":{"azure_blob_storage":{"nesting_mode":3,"block":{"attributes":{"level":{"type":"string","required":true},"retention_in_days":{"type":"number","required":true},"sas_url":{"type":"string","required":true}}},"optional":true}}},"optional":true},"http_logs":{"nesting_mode":3,"block":{"block_types":{"azure_blob_storage":{"nesting_mode":3,"block":{"attributes":{"retention_in_days":{"type":"number","optional":true,"default":0},"sas_url":{"type":"string","required":true}}},"optional":true,"conflicts_with":["logs.0.http_logs.0.file_system"]},"file_system":{"nesting_mode":3,"block":{"attributes":{"retention_in_days":{"type":"number","required":true},"retention_in_mb":{"type":"number","required":true}}},"optional":true,"conflicts_with":["logs.0.http_logs.0.azure_blob_storage"]}}},"optional":true}}},"optional":true},"site_config":{"nesting_mode":3,"block":{"attributes":{"always_on":{"type":"bool","optional":true,"default":true},"api_definition_url":{"type":"string","optional":true},"api_management_api_id":{"type":"string","optional":true},"app_command_line":{"type":"string","optional":true},"container_registry_managed_identity_client_id":{"type":"string","optional":true},"container_registry_use_managed_identity":{"type":"bool","optional":true,"default":false},"default_documents":{"type":["list","string"],"optional":true,"computed":true},"detailed_error_logging_enabled":{"type":"bool","computed":true},"ftps_state":{"type":"string","optional":true,"default":"Disabled"},"health_check_eviction_time_in_min":{"type":"number","optional":true,"required_with":["site_config.0.health_check_path"]},"health_check_path":{"type":"string","optional":true,"required_with":["site_config.0.health_check_eviction_time_in_min"]},"http2_enabled":{"type":"bool","optional":true,"default":false},"ip_restriction_default_action":{"type":"string","optional":true,"default":"Allow"},"linux_fx_version":{"type":"string","computed":true},"load_balancing_mode":{"type":"string","optional":true,"default":"LeastRequests"},"local_mysql_enabled":{"type":"bool","optional":true,"default":false},"managed_pipeline_mode":{"type":"string","optional":true,"default":"Integrated"},"minimum_tls_version":{"type":"string","optional":true,"default":"1.2"},"remote_debugging_enabled":{"type":"bool","optional":true,"default":false},"remote_debugging_version":{"type":"string","optional":true,"computed":true},"scm_ip_restriction_default_action":{"type":"string","optional":true,"default":"Allow"},"scm_minimum_tls_version":{"type":"string","optional":true,"default":"1.2"},"scm_type":{"type":"string","computed":true},"scm_use_main_ip_restriction":{"type":"bool","optional":true,"default":false},"use_32_bit_worker":{"type":"bool","optional":true,"default":true},"vnet_route_all_enabled":{"type":"bool","optional":true,"default":false},"websockets_enabled":{"type":"bool","optional":true,"default":false},"worker_count":{"type":"number","optional":true,"computed":true}},"block_types":{"application_stack":{"nesting_mode":3,"block":{"attributes":{"docker_image_name":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.ruby_version","site_config.0.application_stack.0.go_version"]},"docker_registry_password":{"type":"string","optional":true},"docker_registry_url":{"type":"string","optional":true,"required_with":["site_config.0.application_stack.0.docker_image_name"]},"docker_registry_username":{"type":"string","optional":true},"dotnet_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.ruby_version","site_config.0.application_stack.0.go_version"]},"go_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.ruby_version","site_config.0.application_stack.0.go_version"]},"java_server":{"type":"string","optional":true,"required_with":["site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.java_server_version"]},"java_server_version":{"type":"string","optional":true,"required_with":["site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.java_server"]},"java_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.ruby_version","site_config.0.application_stack.0.go_version"],"required_with":["site_config.0.application_stack.0.java_server_version","site_config.0.application_stack.0.java_server"]},"node_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.ruby_version","site_config.0.application_stack.0.go_version"]},"php_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.ruby_version","site_config.0.application_stack.0.go_version"]},"python_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.ruby_version","site_config.0.application_stack.0.go_version"]},"ruby_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.ruby_version","site_config.0.application_stack.0.go_version"]}}},"optional":true,"computed":true},"auto_heal_setting":{"nesting_mode":3,"block":{"block_types":{"action":{"nesting_mode":3,"block":{"attributes":{"action_type":{"type":"string","required":true},"minimum_process_execution_time":{"type":"string","optional":true,"computed":true}}},"optional":true},"trigger":{"nesting_mode":3,"block":{"block_types":{"requests":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true},"interval":{"type":"string","required":true}}},"optional":true},"slow_request":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true},"interval":{"type":"string","required":true},"time_taken":{"type":"string","required":true}}},"optional":true},"slow_request_with_path":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true},"interval":{"type":"string","required":true},"path":{"type":"string","optional":true},"time_taken":{"type":"string","required":true}}},"optional":true},"status_code":{"nesting_mode":4,"block":{"attributes":{"count":{"type":"number","required":true},"interval":{"type":"string","required":true},"path":{"type":"string","optional":true},"status_code_range":{"type":"string","required":true},"sub_status":{"type":"number","optional":true},"win32_status_code":{"type":"number","optional":true}}},"optional":true}}},"optional":true}}},"optional":true},"cors":{"nesting_mode":3,"block":{"attributes":{"allowed_origins":{"type":["set","string"],"optional":true},"support_credentials":{"type":"bool","optional":true,"default":false}}},"optional":true},"ip_restriction":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"default":"Allow"},"description":{"type":"string","optional":true},"headers":{"type":["list",["object",{"x_azure_fdid":["list","string"],"x_fd_health_probe":["list","string"],"x_forwarded_for":["list","string"],"x_forwarded_host":["list","string"]}]],"optional":true},"ip_address":{"type":"string","optional":true},"name":{"type":"string","optional":true,"computed":true},"priority":{"type":"number","optional":true,"default":65000},"service_tag":{"type":"string","optional":true},"virtual_network_subnet_id":{"type":"string","optional":true}}},"optional":true},"scm_ip_restriction":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"default":"Allow"},"description":{"type":"string","optional":true},"headers":{"type":["list",["object",{"x_azure_fdid":["list","string"],"x_fd_health_probe":["list","string"],"x_forwarded_for":["list","string"],"x_forwarded_host":["list","string"]}]],"optional":true},"ip_address":{"type":"string","optional":true},"name":{"type":"string","optional":true,"computed":true},"priority":{"type":"number","optional":true,"default":65000},"service_tag":{"type":"string","optional":true},"virtual_network_subnet_id":{"type":"string","optional":true}}},"optional":true}}},"required":true},"sticky_settings":{"nesting_mode":3,"block":{"attributes":{"app_setting_names":{"type":["list","string"],"optional":true,"at_least_one_of":["sticky_settings.0.app_setting_names","sticky_settings.0.connection_string_names"]},"connection_string_names":{"type":["list","string"],"optional":true,"at_least_one_of":["sticky_settings.0.app_setting_names","sticky_settings.0.connection_string_names"]}}},"optional":true},"storage_account":{"nesting_mode":4,"block":{"attributes":{"access_key":{"type":"string","required":true},"account_name":{"type":"string","required":true},"mount_path":{"type":"string","optional":true},"name":{"type":"string","required":true},"share_name":{"type":"string","required":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_linux_web_app_slot":{"block":{"attributes":{"app_metadata":{"type":["map","string"],"computed":true},"app_service_id":{"type":"string","required":true},"app_settings":{"type":["map","string"],"optional":true},"client_affinity_enabled":{"type":"bool","optional":true,"default":false},"client_certificate_enabled":{"type":"bool","optional":true,"default":false},"client_certificate_exclusion_paths":{"type":"string","optional":true},"client_certificate_mode":{"type":"string","optional":true,"default":"Required"},"custom_domain_verification_id":{"type":"string","computed":true},"default_hostname":{"type":"string","computed":true},"enabled":{"type":"bool","optional":true,"default":true},"ftp_publish_basic_authentication_enabled":{"type":"bool","optional":true,"default":true},"hosting_environment_id":{"type":"string","computed":true},"https_only":{"type":"bool","optional":true,"default":false},"key_vault_reference_identity_id":{"type":"string","optional":true,"computed":true},"kind":{"type":"string","computed":true},"name":{"type":"string","required":true},"outbound_ip_address_list":{"type":["list","string"],"computed":true},"outbound_ip_addresses":{"type":"string","computed":true},"possible_outbound_ip_address_list":{"type":["list","string"],"computed":true},"possible_outbound_ip_addresses":{"type":"string","computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"service_plan_id":{"type":"string","optional":true},"site_credential":{"type":["list",["object",{"name":"string","password":"string"}]],"computed":true},"tags":{"type":["map","string"],"optional":true},"virtual_network_subnet_id":{"type":"string","optional":true},"webdeploy_publish_basic_authentication_enabled":{"type":"bool","optional":true,"default":true},"zip_deploy_file":{"type":"string","optional":true,"computed":true}},"block_types":{"auth_settings":{"nesting_mode":3,"block":{"attributes":{"additional_login_parameters":{"type":["map","string"],"optional":true},"allowed_external_redirect_urls":{"type":["list","string"],"optional":true,"computed":true},"default_provider":{"type":"string","optional":true,"computed":true},"enabled":{"type":"bool","required":true},"issuer":{"type":"string","optional":true},"runtime_version":{"type":"string","optional":true,"computed":true},"token_refresh_extension_hours":{"type":"number","optional":true,"default":72},"token_store_enabled":{"type":"bool","optional":true,"default":false},"unauthenticated_client_action":{"type":"string","optional":true,"computed":true}},"block_types":{"active_directory":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"conflicts_with":["auth_settings.0.active_directory.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings.0.active_directory.0.client_secret"]}}},"optional":true},"facebook":{"nesting_mode":3,"block":{"attributes":{"app_id":{"type":"string","required":true},"app_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.facebook.0.app_secret","auth_settings.0.facebook.0.app_secret_setting_name"]},"app_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.facebook.0.app_secret","auth_settings.0.facebook.0.app_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"github":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.github.0.client_secret","auth_settings.0.github.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.github.0.client_secret","auth_settings.0.github.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"google":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.google.0.client_secret","auth_settings.0.google.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.google.0.client_secret","auth_settings.0.google.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"microsoft":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.microsoft.0.client_secret","auth_settings.0.microsoft.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.microsoft.0.client_secret","auth_settings.0.microsoft.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"twitter":{"nesting_mode":3,"block":{"attributes":{"consumer_key":{"type":"string","required":true},"consumer_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.twitter.0.consumer_secret","auth_settings.0.twitter.0.consumer_secret_setting_name"]},"consumer_secret_setting_name":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"auth_settings_v2":{"nesting_mode":3,"block":{"attributes":{"auth_enabled":{"type":"bool","optional":true},"config_file_path":{"type":"string","optional":true},"default_provider":{"type":"string","optional":true},"excluded_paths":{"type":["list","string"],"optional":true},"forward_proxy_convention":{"type":"string","optional":true,"default":"NoProxy"},"forward_proxy_custom_host_header_name":{"type":"string","optional":true},"forward_proxy_custom_scheme_header_name":{"type":"string","optional":true},"http_route_api_prefix":{"type":"string","optional":true,"default":"/.auth"},"require_authentication":{"type":"bool","optional":true},"require_https":{"type":"bool","optional":true,"default":true},"runtime_version":{"type":"string","optional":true,"default":"~1"},"unauthenticated_action":{"type":"string","optional":true,"default":"RedirectToLoginPage"}},"block_types":{"active_directory_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_applications":{"type":["list","string"],"optional":true},"allowed_audiences":{"type":["list","string"],"optional":true},"allowed_groups":{"type":["list","string"],"optional":true},"allowed_identities":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_certificate_thumbprint":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.active_directory_v2.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.active_directory_v2.0.client_secret_certificate_thumbprint"]},"jwt_allowed_client_applications":{"type":["list","string"],"optional":true},"jwt_allowed_groups":{"type":["list","string"],"optional":true},"login_parameters":{"type":["map","string"],"optional":true},"tenant_auth_endpoint":{"type":"string","required":true},"www_authentication_disabled":{"type":"bool","optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"apple_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"computed":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"azure_static_web_app_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"custom_oidc_v2":{"nesting_mode":3,"block":{"attributes":{"authorisation_endpoint":{"type":"string","computed":true},"certification_uri":{"type":"string","computed":true},"client_credential_method":{"type":"string","computed":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","computed":true},"issuer_endpoint":{"type":"string","computed":true},"name":{"type":"string","required":true},"name_claim_type":{"type":"string","optional":true},"openid_configuration_endpoint":{"type":"string","required":true},"scopes":{"type":["list","string"],"optional":true},"token_endpoint":{"type":"string","computed":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"facebook_v2":{"nesting_mode":3,"block":{"attributes":{"app_id":{"type":"string","required":true},"app_secret_setting_name":{"type":"string","required":true},"graph_api_version":{"type":"string","optional":true,"computed":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"github_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"google_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"login":{"nesting_mode":3,"block":{"attributes":{"allowed_external_redirect_urls":{"type":["list","string"],"optional":true},"cookie_expiration_convention":{"type":"string","optional":true,"default":"FixedTime"},"cookie_expiration_time":{"type":"string","optional":true,"default":"08:00:00"},"logout_endpoint":{"type":"string","optional":true},"nonce_expiration_time":{"type":"string","optional":true,"default":"00:05:00"},"preserve_url_fragments_for_logins":{"type":"bool","optional":true,"default":false},"token_refresh_extension_time":{"type":"number","optional":true,"default":72},"token_store_enabled":{"type":"bool","optional":true,"default":false},"token_store_path":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.login.0.token_store_sas_setting_name"]},"token_store_sas_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.login.0.token_store_path"]},"validate_nonce":{"type":"bool","optional":true,"default":true}}},"required":true},"microsoft_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"twitter_v2":{"nesting_mode":3,"block":{"attributes":{"consumer_key":{"type":"string","required":true},"consumer_secret_setting_name":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]}}},"optional":true},"backup":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"storage_account_url":{"type":"string","required":true}},"block_types":{"schedule":{"nesting_mode":3,"block":{"attributes":{"frequency_interval":{"type":"number","required":true},"frequency_unit":{"type":"string","required":true},"keep_at_least_one_backup":{"type":"bool","optional":true,"default":false},"last_execution_time":{"type":"string","computed":true},"retention_period_days":{"type":"number","optional":true,"default":30},"start_time":{"type":"string","optional":true,"computed":true}}},"required":true}}},"optional":true},"connection_string":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"type":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"logs":{"nesting_mode":3,"block":{"attributes":{"detailed_error_messages":{"type":"bool","optional":true,"default":false},"failed_request_tracing":{"type":"bool","optional":true,"default":false}},"block_types":{"application_logs":{"nesting_mode":3,"block":{"attributes":{"file_system_level":{"type":"string","required":true}},"block_types":{"azure_blob_storage":{"nesting_mode":3,"block":{"attributes":{"level":{"type":"string","required":true},"retention_in_days":{"type":"number","required":true},"sas_url":{"type":"string","required":true}}},"optional":true}}},"optional":true},"http_logs":{"nesting_mode":3,"block":{"block_types":{"azure_blob_storage":{"nesting_mode":3,"block":{"attributes":{"retention_in_days":{"type":"number","optional":true,"default":0},"sas_url":{"type":"string","required":true}}},"optional":true,"conflicts_with":["logs.0.http_logs.0.file_system"]},"file_system":{"nesting_mode":3,"block":{"attributes":{"retention_in_days":{"type":"number","required":true},"retention_in_mb":{"type":"number","required":true}}},"optional":true,"conflicts_with":["logs.0.http_logs.0.azure_blob_storage"]}}},"optional":true}}},"optional":true},"site_config":{"nesting_mode":3,"block":{"attributes":{"always_on":{"type":"bool","optional":true,"default":true},"api_definition_url":{"type":"string","optional":true},"api_management_api_id":{"type":"string","optional":true},"app_command_line":{"type":"string","optional":true},"auto_swap_slot_name":{"type":"string","optional":true},"container_registry_managed_identity_client_id":{"type":"string","optional":true},"container_registry_use_managed_identity":{"type":"bool","optional":true,"default":false},"default_documents":{"type":["list","string"],"optional":true,"computed":true},"detailed_error_logging_enabled":{"type":"bool","computed":true},"ftps_state":{"type":"string","optional":true,"default":"Disabled"},"health_check_eviction_time_in_min":{"type":"number","optional":true,"required_with":["site_config.0.health_check_path"]},"health_check_path":{"type":"string","optional":true,"required_with":["site_config.0.health_check_eviction_time_in_min"]},"http2_enabled":{"type":"bool","optional":true,"default":false},"ip_restriction_default_action":{"type":"string","optional":true,"default":"Allow"},"linux_fx_version":{"type":"string","computed":true},"load_balancing_mode":{"type":"string","optional":true,"default":"LeastRequests"},"local_mysql_enabled":{"type":"bool","optional":true,"default":false},"managed_pipeline_mode":{"type":"string","optional":true,"default":"Integrated"},"minimum_tls_version":{"type":"string","optional":true,"default":"1.2"},"remote_debugging_enabled":{"type":"bool","optional":true,"default":false},"remote_debugging_version":{"type":"string","optional":true,"computed":true},"scm_ip_restriction_default_action":{"type":"string","optional":true,"default":"Allow"},"scm_minimum_tls_version":{"type":"string","optional":true,"default":"1.2"},"scm_type":{"type":"string","computed":true},"scm_use_main_ip_restriction":{"type":"bool","optional":true,"default":false},"use_32_bit_worker":{"type":"bool","optional":true,"default":true},"vnet_route_all_enabled":{"type":"bool","optional":true,"default":false},"websockets_enabled":{"type":"bool","optional":true,"default":false},"worker_count":{"type":"number","optional":true,"computed":true}},"block_types":{"application_stack":{"nesting_mode":3,"block":{"attributes":{"docker_image_name":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.ruby_version","site_config.0.application_stack.0.go_version"]},"docker_registry_password":{"type":"string","optional":true},"docker_registry_url":{"type":"string","optional":true,"required_with":["site_config.0.application_stack.0.docker_image_name"]},"docker_registry_username":{"type":"string","optional":true},"dotnet_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.ruby_version","site_config.0.application_stack.0.go_version"]},"go_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.ruby_version","site_config.0.application_stack.0.go_version"]},"java_server":{"type":"string","optional":true,"required_with":["site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.java_server_version"]},"java_server_version":{"type":"string","optional":true,"required_with":["site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.java_server"]},"java_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.ruby_version","site_config.0.application_stack.0.go_version"],"required_with":["site_config.0.application_stack.0.java_server_version","site_config.0.application_stack.0.java_server"]},"node_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.ruby_version","site_config.0.application_stack.0.go_version"]},"php_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.ruby_version","site_config.0.application_stack.0.go_version"]},"python_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.ruby_version","site_config.0.application_stack.0.go_version"]},"ruby_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.ruby_version","site_config.0.application_stack.0.go_version"]}}},"optional":true,"computed":true},"auto_heal_setting":{"nesting_mode":3,"block":{"block_types":{"action":{"nesting_mode":3,"block":{"attributes":{"action_type":{"type":"string","required":true},"minimum_process_execution_time":{"type":"string","optional":true,"computed":true}}},"optional":true},"trigger":{"nesting_mode":3,"block":{"block_types":{"requests":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true},"interval":{"type":"string","required":true}}},"optional":true},"slow_request":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true},"interval":{"type":"string","required":true},"time_taken":{"type":"string","required":true}}},"optional":true},"slow_request_with_path":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true},"interval":{"type":"string","required":true},"path":{"type":"string","optional":true},"time_taken":{"type":"string","required":true}}},"optional":true},"status_code":{"nesting_mode":4,"block":{"attributes":{"count":{"type":"number","required":true},"interval":{"type":"string","required":true},"path":{"type":"string","optional":true},"status_code_range":{"type":"string","required":true},"sub_status":{"type":"number","optional":true},"win32_status_code":{"type":"number","optional":true}}},"optional":true}}},"optional":true}}},"optional":true},"cors":{"nesting_mode":3,"block":{"attributes":{"allowed_origins":{"type":["set","string"],"optional":true},"support_credentials":{"type":"bool","optional":true,"default":false}}},"optional":true},"ip_restriction":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"default":"Allow"},"description":{"type":"string","optional":true},"headers":{"type":["list",["object",{"x_azure_fdid":["list","string"],"x_fd_health_probe":["list","string"],"x_forwarded_for":["list","string"],"x_forwarded_host":["list","string"]}]],"optional":true},"ip_address":{"type":"string","optional":true},"name":{"type":"string","optional":true,"computed":true},"priority":{"type":"number","optional":true,"default":65000},"service_tag":{"type":"string","optional":true},"virtual_network_subnet_id":{"type":"string","optional":true}}},"optional":true},"scm_ip_restriction":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"default":"Allow"},"description":{"type":"string","optional":true},"headers":{"type":["list",["object",{"x_azure_fdid":["list","string"],"x_fd_health_probe":["list","string"],"x_forwarded_for":["list","string"],"x_forwarded_host":["list","string"]}]],"optional":true},"ip_address":{"type":"string","optional":true},"name":{"type":"string","optional":true,"computed":true},"priority":{"type":"number","optional":true,"default":65000},"service_tag":{"type":"string","optional":true},"virtual_network_subnet_id":{"type":"string","optional":true}}},"optional":true}}},"required":true},"storage_account":{"nesting_mode":4,"block":{"attributes":{"access_key":{"type":"string","required":true},"account_name":{"type":"string","required":true},"mount_path":{"type":"string","optional":true},"name":{"type":"string","required":true},"share_name":{"type":"string","required":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_load_test":{"block":{"attributes":{"data_plane_uri":{"type":"string","computed":true},"description":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"encryption":{"nesting_mode":3,"block":{"attributes":{"key_url":{"type":"string","required":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_id":{"type":"string","required":true},"type":{"type":"string","required":true}}},"required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_local_network_gateway":{"block":{"attributes":{"address_space":{"type":["list","string"],"optional":true},"gateway_address":{"type":"string","optional":true,"exactly_one_of":["gateway_address","gateway_fqdn"]},"gateway_fqdn":{"type":"string","optional":true,"exactly_one_of":["gateway_address","gateway_fqdn"]},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"bgp_settings":{"nesting_mode":3,"block":{"attributes":{"asn":{"type":"number","required":true},"bgp_peering_address":{"type":"string","required":true},"peer_weight":{"type":"number","optional":true}}},"optional":true}}}},"azurerm_log_analytics_cluster":{"block":{"attributes":{"cluster_id":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"size_gb":{"type":"number","optional":true,"default":100},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"required":true}}}},"azurerm_log_analytics_cluster_customer_managed_key":{"block":{"attributes":{"key_vault_key_id":{"type":"string","required":true},"log_analytics_cluster_id":{"type":"string","required":true}}}},"azurerm_log_analytics_data_export_rule":{"block":{"attributes":{"destination_resource_id":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":false},"export_rule_id":{"type":"string","computed":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"table_names":{"type":["set","string"],"required":true},"workspace_resource_id":{"type":"string","required":true}}}},"azurerm_log_analytics_datasource_windows_event":{"block":{"attributes":{"event_log_name":{"type":"string","required":true},"event_types":{"type":["set","string"],"required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"workspace_name":{"type":"string","required":true}}}},"azurerm_log_analytics_datasource_windows_performance_counter":{"block":{"attributes":{"counter_name":{"type":"string","required":true},"instance_name":{"type":"string","required":true},"interval_seconds":{"type":"number","required":true},"name":{"type":"string","required":true},"object_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"workspace_name":{"type":"string","required":true}}}},"azurerm_log_analytics_linked_service":{"block":{"attributes":{"name":{"type":"string","computed":true},"read_access_id":{"type":"string","optional":true,"computed":true,"exactly_one_of":["read_access_id","write_access_id"]},"resource_group_name":{"type":"string","required":true},"workspace_id":{"type":"string","required":true},"write_access_id":{"type":"string","optional":true,"exactly_one_of":["read_access_id","write_access_id"]}}}},"azurerm_log_analytics_linked_storage_account":{"block":{"attributes":{"data_source_type":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"storage_account_ids":{"type":["set","string"],"required":true},"workspace_resource_id":{"type":"string","required":true}}}},"azurerm_log_analytics_query_pack":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_log_analytics_query_pack_query":{"block":{"attributes":{"additional_settings_json":{"type":"string","optional":true},"body":{"type":"string","required":true},"categories":{"type":["list","string"],"optional":true},"description":{"type":"string","optional":true},"display_name":{"type":"string","required":true},"name":{"type":"string","optional":true,"computed":true},"query_pack_id":{"type":"string","required":true},"resource_types":{"type":["list","string"],"optional":true},"solutions":{"type":["list","string"],"optional":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_log_analytics_saved_search":{"block":{"attributes":{"category":{"type":"string","required":true},"display_name":{"type":"string","required":true},"function_alias":{"type":"string","optional":true},"function_parameters":{"type":["list","string"],"optional":true},"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true},"query":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_log_analytics_solution":{"block":{"attributes":{"location":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"solution_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"workspace_name":{"type":"string","required":true},"workspace_resource_id":{"type":"string","required":true}},"block_types":{"plan":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","computed":true},"product":{"type":"string","required":true},"promotion_code":{"type":"string","optional":true},"publisher":{"type":"string","required":true}}},"required":true}}}},"azurerm_log_analytics_storage_insights":{"block":{"attributes":{"blob_container_names":{"type":["set","string"],"optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"storage_account_id":{"type":"string","required":true},"storage_account_key":{"type":"string","required":true},"table_names":{"type":["set","string"],"optional":true},"workspace_id":{"type":"string","required":true}}}},"azurerm_log_analytics_workspace":{"block":{"attributes":{"allow_resource_only_permissions":{"type":"bool","optional":true,"default":true},"cmk_for_query_forced":{"type":"bool","optional":true},"daily_quota_gb":{"type":"number","optional":true,"default":-1},"data_collection_rule_id":{"type":"string","optional":true},"immediate_data_purge_on_30_days_enabled":{"type":"bool","optional":true},"internet_ingestion_enabled":{"type":"bool","optional":true,"default":true},"internet_query_enabled":{"type":"bool","optional":true,"default":true},"local_authentication_disabled":{"type":"bool","optional":true,"default":false},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"primary_shared_key":{"type":"string","computed":true},"reservation_capacity_in_gb_per_day":{"type":"number","optional":true},"resource_group_name":{"type":"string","required":true},"retention_in_days":{"type":"number","optional":true,"computed":true},"secondary_shared_key":{"type":"string","computed":true},"sku":{"type":"string","optional":true,"computed":true},"tags":{"type":["map","string"],"optional":true},"workspace_id":{"type":"string","computed":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_log_analytics_workspace_table":{"block":{"attributes":{"name":{"type":"string","required":true},"plan":{"type":"string","optional":true,"default":"Analytics"},"retention_in_days":{"type":"number","optional":true},"total_retention_in_days":{"type":"number","optional":true},"workspace_id":{"type":"string","required":true}}}},"azurerm_logic_app_action_custom":{"block":{"attributes":{"body":{"type":"string","required":true},"logic_app_id":{"type":"string","required":true},"name":{"type":"string","required":true}}}},"azurerm_logic_app_action_http":{"block":{"attributes":{"body":{"type":"string","optional":true},"headers":{"type":["map","string"],"optional":true},"logic_app_id":{"type":"string","required":true},"method":{"type":"string","required":true},"name":{"type":"string","required":true},"queries":{"type":["map","string"],"optional":true},"uri":{"type":"string","required":true}},"block_types":{"run_after":{"nesting_mode":4,"block":{"attributes":{"action_name":{"type":"string","required":true},"action_result":{"type":"string","required":true}}},"optional":true}}}},"azurerm_logic_app_integration_account":{"block":{"attributes":{"integration_service_environment_id":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_logic_app_integration_account_agreement":{"block":{"attributes":{"agreement_type":{"type":"string","required":true},"content":{"type":"string","required":true},"guest_partner_name":{"type":"string","required":true},"host_partner_name":{"type":"string","required":true},"integration_account_name":{"type":"string","required":true},"metadata":{"type":["map","string"],"optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}},"block_types":{"guest_identity":{"nesting_mode":3,"block":{"attributes":{"qualifier":{"type":"string","required":true},"value":{"type":"string","required":true}}},"required":true},"host_identity":{"nesting_mode":3,"block":{"attributes":{"qualifier":{"type":"string","required":true},"value":{"type":"string","required":true}}},"required":true}}}},"azurerm_logic_app_integration_account_assembly":{"block":{"attributes":{"assembly_name":{"type":"string","required":true},"assembly_version":{"type":"string","optional":true,"default":"0.0.0.0"},"content":{"type":"string","optional":true,"at_least_one_of":["content","content_link_uri"]},"content_link_uri":{"type":"string","optional":true,"at_least_one_of":["content","content_link_uri"]},"integration_account_name":{"type":"string","required":true},"metadata":{"type":["map","string"],"optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_logic_app_integration_account_batch_configuration":{"block":{"attributes":{"batch_group_name":{"type":"string","required":true},"integration_account_name":{"type":"string","required":true},"metadata":{"type":["map","string"],"optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}},"block_types":{"release_criteria":{"nesting_mode":3,"block":{"attributes":{"batch_size":{"type":"number","optional":true,"at_least_one_of":["release_criteria.0.batch_size","release_criteria.0.message_count","release_criteria.0.recurrence"]},"message_count":{"type":"number","optional":true,"at_least_one_of":["release_criteria.0.batch_size","release_criteria.0.message_count","release_criteria.0.recurrence"]}},"block_types":{"recurrence":{"nesting_mode":3,"block":{"attributes":{"end_time":{"type":"string","optional":true},"frequency":{"type":"string","required":true},"interval":{"type":"number","required":true},"start_time":{"type":"string","optional":true},"time_zone":{"type":"string","optional":true}},"block_types":{"schedule":{"nesting_mode":3,"block":{"attributes":{"hours":{"type":["set","number"],"optional":true},"minutes":{"type":["set","number"],"optional":true},"month_days":{"type":["set","number"],"optional":true,"conflicts_with":["release_criteria.0.recurrence.0.schedule.0.week_days"]},"week_days":{"type":["set","string"],"optional":true,"conflicts_with":["release_criteria.0.recurrence.0.schedule.0.month_days","release_criteria.0.recurrence.0.schedule.0.monthly"]}},"block_types":{"monthly":{"nesting_mode":4,"block":{"attributes":{"week":{"type":"number","required":true},"weekday":{"type":"string","required":true}}},"optional":true,"conflicts_with":["release_criteria.0.recurrence.0.schedule.0.week_days"]}}},"optional":true}}},"optional":true,"at_least_one_of":["release_criteria.0.batch_size","release_criteria.0.message_count","release_criteria.0.recurrence"]}}},"required":true}}}},"azurerm_logic_app_integration_account_certificate":{"block":{"attributes":{"integration_account_name":{"type":"string","required":true},"metadata":{"type":"string","optional":true},"name":{"type":"string","required":true},"public_certificate":{"type":"string","optional":true,"at_least_one_of":["key_vault_key"]},"resource_group_name":{"type":"string","required":true}},"block_types":{"key_vault_key":{"nesting_mode":3,"block":{"attributes":{"key_name":{"type":"string","required":true},"key_vault_id":{"type":"string","required":true},"key_version":{"type":"string","optional":true}}},"optional":true,"at_least_one_of":["public_certificate"]}}}},"azurerm_logic_app_integration_account_map":{"block":{"attributes":{"content":{"type":"string","required":true},"integration_account_name":{"type":"string","required":true},"map_type":{"type":"string","required":true},"metadata":{"type":["map","string"],"optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_logic_app_integration_account_partner":{"block":{"attributes":{"integration_account_name":{"type":"string","required":true},"metadata":{"type":"string","optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}},"block_types":{"business_identity":{"nesting_mode":4,"block":{"attributes":{"qualifier":{"type":"string","required":true},"value":{"type":"string","required":true}}},"required":true}}}},"azurerm_logic_app_integration_account_schema":{"block":{"attributes":{"content":{"type":"string","required":true},"file_name":{"type":"string","optional":true},"integration_account_name":{"type":"string","required":true},"metadata":{"type":"string","optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_logic_app_integration_account_session":{"block":{"attributes":{"content":{"type":"string","required":true},"integration_account_name":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_logic_app_standard":{"block":{"attributes":{"app_service_plan_id":{"type":"string","required":true},"app_settings":{"type":["map","string"],"optional":true,"computed":true},"bundle_version":{"type":"string","optional":true,"default":"[1.*, 2.0.0)"},"client_affinity_enabled":{"type":"bool","optional":true,"computed":true},"client_certificate_mode":{"type":"string","optional":true},"custom_domain_verification_id":{"type":"string","computed":true},"default_hostname":{"type":"string","computed":true},"enabled":{"type":"bool","optional":true,"default":true},"ftp_publish_basic_authentication_enabled":{"type":"bool","optional":true,"default":true},"https_only":{"type":"bool","optional":true,"default":false},"kind":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"outbound_ip_addresses":{"type":"string","computed":true},"possible_outbound_ip_addresses":{"type":"string","computed":true},"public_network_access":{"type":"string","optional":true,"computed":true},"resource_group_name":{"type":"string","required":true},"scm_publish_basic_authentication_enabled":{"type":"bool","optional":true,"default":true},"site_credential":{"type":["list",["object",{"password":"string","username":"string"}]],"computed":true},"storage_account_access_key":{"type":"string","required":true},"storage_account_name":{"type":"string","required":true},"storage_account_share_name":{"type":"string","optional":true,"computed":true},"tags":{"type":["map","string"],"optional":true},"use_extension_bundle":{"type":"bool","optional":true,"default":true},"version":{"type":"string","optional":true,"default":"~4"},"virtual_network_subnet_id":{"type":"string","optional":true}},"block_types":{"connection_string":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"type":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true,"computed":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"site_config":{"nesting_mode":3,"block":{"attributes":{"always_on":{"type":"bool","optional":true,"default":false},"app_scale_limit":{"type":"number","optional":true,"computed":true},"auto_swap_slot_name":{"type":"string","computed":true},"dotnet_framework_version":{"type":"string","optional":true,"default":"v4.0"},"elastic_instance_minimum":{"type":"number","optional":true,"computed":true},"ftps_state":{"type":"string","optional":true,"computed":true},"health_check_path":{"type":"string","optional":true},"http2_enabled":{"type":"bool","optional":true,"default":false},"ip_restriction":{"type":["list",["object",{"action":"string","headers":["list",["object",{"x_azure_fdid":["set","string"],"x_fd_health_probe":["set","string"],"x_forwarded_for":["set","string"],"x_forwarded_host":["set","string"]}]],"ip_address":"string","name":"string","priority":"number","service_tag":"string","virtual_network_subnet_id":"string"}]],"optional":true,"computed":true},"linux_fx_version":{"type":"string","optional":true,"computed":true},"min_tls_version":{"type":"string","optional":true,"computed":true},"pre_warmed_instance_count":{"type":"number","optional":true,"computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"computed":true},"runtime_scale_monitoring_enabled":{"type":"bool","optional":true,"default":false},"scm_ip_restriction":{"type":["list",["object",{"action":"string","headers":["list",["object",{"x_azure_fdid":["set","string"],"x_fd_health_probe":["set","string"],"x_forwarded_for":["set","string"],"x_forwarded_host":["set","string"]}]],"ip_address":"string","name":"string","priority":"number","service_tag":"string","virtual_network_subnet_id":"string"}]],"optional":true,"computed":true},"scm_min_tls_version":{"type":"string","optional":true,"computed":true},"scm_type":{"type":"string","optional":true,"computed":true},"scm_use_main_ip_restriction":{"type":"bool","optional":true,"default":false},"use_32_bit_worker_process":{"type":"bool","optional":true,"default":true},"vnet_route_all_enabled":{"type":"bool","optional":true,"computed":true},"websockets_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"cors":{"nesting_mode":3,"block":{"attributes":{"allowed_origins":{"type":["set","string"],"required":true},"support_credentials":{"type":"bool","optional":true,"default":false}}},"optional":true,"computed":true}}},"optional":true,"computed":true}}}},"azurerm_logic_app_trigger_custom":{"block":{"attributes":{"body":{"type":"string","required":true},"callback_url":{"type":"string","computed":true},"logic_app_id":{"type":"string","required":true},"name":{"type":"string","required":true}}}},"azurerm_logic_app_trigger_http_request":{"block":{"attributes":{"callback_url":{"type":"string","computed":true},"logic_app_id":{"type":"string","required":true},"method":{"type":"string","optional":true},"name":{"type":"string","required":true},"relative_path":{"type":"string","optional":true},"schema":{"type":"string","required":true}}}},"azurerm_logic_app_trigger_recurrence":{"block":{"attributes":{"frequency":{"type":"string","required":true},"interval":{"type":"number","required":true},"logic_app_id":{"type":"string","required":true},"name":{"type":"string","required":true},"start_time":{"type":"string","optional":true},"time_zone":{"type":"string","optional":true,"computed":true}},"block_types":{"schedule":{"nesting_mode":3,"block":{"attributes":{"at_these_hours":{"type":["set","number"],"optional":true,"at_least_one_of":["schedule.0.at_these_hours","schedule.0.at_these_minutes","schedule.0.on_these_days"]},"at_these_minutes":{"type":["set","number"],"optional":true,"at_least_one_of":["schedule.0.at_these_hours","schedule.0.at_these_minutes","schedule.0.on_these_days"]},"on_these_days":{"type":["set","string"],"optional":true,"at_least_one_of":["schedule.0.at_these_hours","schedule.0.at_these_minutes","schedule.0.on_these_days"]}}},"optional":true}}}},"azurerm_logic_app_workflow":{"block":{"attributes":{"access_endpoint":{"type":"string","computed":true},"connector_endpoint_ip_addresses":{"type":["list","string"],"computed":true},"connector_outbound_ip_addresses":{"type":["list","string"],"computed":true},"enabled":{"type":"bool","optional":true,"default":true},"integration_service_environment_id":{"type":"string","optional":true},"location":{"type":"string","required":true},"logic_app_integration_account_id":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"workflow_endpoint_ip_addresses":{"type":["list","string"],"computed":true},"workflow_outbound_ip_addresses":{"type":["list","string"],"computed":true},"workflow_parameters":{"type":["map","string"],"optional":true},"workflow_schema":{"type":"string","optional":true,"default":"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#"},"workflow_version":{"type":"string","optional":true,"default":"1.0.0.0"}},"block_types":{"access_control":{"nesting_mode":3,"block":{"block_types":{"action":{"nesting_mode":3,"block":{"attributes":{"allowed_caller_ip_address_range":{"type":["set","string"],"required":true}}},"optional":true},"content":{"nesting_mode":3,"block":{"attributes":{"allowed_caller_ip_address_range":{"type":["set","string"],"required":true}}},"optional":true},"trigger":{"nesting_mode":3,"block":{"attributes":{"allowed_caller_ip_address_range":{"type":["set","string"],"required":true}},"block_types":{"open_authentication_policy":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true}},"block_types":{"claim":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"required":true}}},"optional":true}}},"optional":true},"workflow_management":{"nesting_mode":3,"block":{"attributes":{"allowed_caller_ip_address_range":{"type":["set","string"],"required":true}}},"optional":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_machine_learning_compute_cluster":{"block":{"attributes":{"description":{"type":"string","optional":true},"local_auth_enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"machine_learning_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true},"node_public_ip_enabled":{"type":"bool","optional":true,"default":true},"ssh_public_access_enabled":{"type":"bool","optional":true,"default":false},"subnet_resource_id":{"type":"string","optional":true,"computed":true},"tags":{"type":["map","string"],"optional":true},"vm_priority":{"type":"string","required":true},"vm_size":{"type":"string","required":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"scale_settings":{"nesting_mode":3,"block":{"attributes":{"max_node_count":{"type":"number","required":true},"min_node_count":{"type":"number","required":true},"scale_down_nodes_after_idle_duration":{"type":"string","required":true}}},"required":true},"ssh":{"nesting_mode":3,"block":{"attributes":{"admin_password":{"type":"string","optional":true,"at_least_one_of":["ssh.0.admin_password","ssh.0.key_value"]},"admin_username":{"type":"string","required":true},"key_value":{"type":"string","optional":true,"at_least_one_of":["ssh.0.admin_password","ssh.0.key_value"]}}},"optional":true}}}},"azurerm_machine_learning_compute_instance":{"block":{"attributes":{"authorization_type":{"type":"string","optional":true},"description":{"type":"string","optional":true},"local_auth_enabled":{"type":"bool","optional":true,"default":true},"machine_learning_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true},"node_public_ip_enabled":{"type":"bool","optional":true,"default":true},"subnet_resource_id":{"type":"string","optional":true},"tags":{"type":["map","string"],"optional":true},"virtual_machine_size":{"type":"string","required":true}},"block_types":{"assign_to_user":{"nesting_mode":3,"block":{"attributes":{"object_id":{"type":"string","optional":true},"tenant_id":{"type":"string","optional":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"ssh":{"nesting_mode":3,"block":{"attributes":{"port":{"type":"number","computed":true},"public_key":{"type":"string","required":true},"username":{"type":"string","computed":true}}},"optional":true}}}},"azurerm_machine_learning_datastore_blobstorage":{"block":{"attributes":{"account_key":{"type":"string","optional":true,"exactly_one_of":["account_key","shared_access_signature"]},"description":{"type":"string","optional":true},"is_default":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"service_data_auth_identity":{"type":"string","optional":true,"default":"None"},"shared_access_signature":{"type":"string","optional":true,"at_least_one_of":["account_key","shared_access_signature"]},"storage_container_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"workspace_id":{"type":"string","required":true}}}},"azurerm_machine_learning_datastore_datalake_gen2":{"block":{"attributes":{"authority_url":{"type":"string","optional":true},"client_id":{"type":"string","optional":true,"required_with":["tenant_id","client_secret"]},"client_secret":{"type":"string","optional":true,"required_with":["tenant_id","client_id"]},"description":{"type":"string","optional":true},"is_default":{"type":"bool","computed":true},"name":{"type":"string","required":true},"service_data_identity":{"type":"string","optional":true,"default":"None"},"storage_container_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"tenant_id":{"type":"string","optional":true,"required_with":["client_id","client_secret"]},"workspace_id":{"type":"string","required":true}}}},"azurerm_machine_learning_datastore_fileshare":{"block":{"attributes":{"account_key":{"type":"string","optional":true,"exactly_one_of":["account_key","shared_access_signature"]},"description":{"type":"string","optional":true},"is_default":{"type":"bool","computed":true},"name":{"type":"string","required":true},"service_data_identity":{"type":"string","optional":true,"default":"None"},"shared_access_signature":{"type":"string","optional":true,"at_least_one_of":["account_key","shared_access_signature"]},"storage_fileshare_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"workspace_id":{"type":"string","required":true}}}},"azurerm_machine_learning_inference_cluster":{"block":{"attributes":{"cluster_purpose":{"type":"string","optional":true,"default":"FastProd"},"description":{"type":"string","optional":true},"kubernetes_cluster_id":{"type":"string","required":true},"location":{"type":"string","required":true},"machine_learning_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"ssl":{"nesting_mode":3,"block":{"attributes":{"cert":{"type":"string","optional":true,"default":"","conflicts_with":["ssl.0.leaf_domain_label","ssl.0.overwrite_existing_domain"]},"cname":{"type":"string","optional":true,"default":"","conflicts_with":["ssl.0.leaf_domain_label","ssl.0.overwrite_existing_domain"]},"key":{"type":"string","optional":true,"default":"","conflicts_with":["ssl.0.leaf_domain_label","ssl.0.overwrite_existing_domain"]},"leaf_domain_label":{"type":"string","optional":true,"default":"","conflicts_with":["ssl.0.cert","ssl.0.key","ssl.0.cname"]},"overwrite_existing_domain":{"type":"bool","optional":true,"default":"","conflicts_with":["ssl.0.cert","ssl.0.key","ssl.0.cname"]}}},"optional":true}}}},"azurerm_machine_learning_synapse_spark":{"block":{"attributes":{"description":{"type":"string","optional":true},"local_auth_enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"machine_learning_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true},"synapse_spark_pool_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_machine_learning_workspace":{"block":{"attributes":{"application_insights_id":{"type":"string","required":true},"container_registry_id":{"type":"string","optional":true},"description":{"type":"string","optional":true},"discovery_url":{"type":"string","computed":true},"friendly_name":{"type":"string","optional":true},"high_business_impact":{"type":"bool","optional":true},"image_build_compute_name":{"type":"string","optional":true},"key_vault_id":{"type":"string","required":true},"kind":{"type":"string","optional":true,"default":"Default"},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"primary_user_assigned_identity":{"type":"string","optional":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","optional":true,"default":"Basic"},"storage_account_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"v1_legacy_mode_enabled":{"type":"bool","optional":true,"default":false},"workspace_id":{"type":"string","computed":true}},"block_types":{"encryption":{"nesting_mode":3,"block":{"attributes":{"key_id":{"type":"string","required":true},"key_vault_id":{"type":"string","required":true},"user_assigned_identity_id":{"type":"string","optional":true}}},"optional":true},"feature_store":{"nesting_mode":3,"block":{"attributes":{"computer_spark_runtime_version":{"type":"string","optional":true},"offline_connection_name":{"type":"string","optional":true},"online_connection_name":{"type":"string","optional":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"required":true},"managed_network":{"nesting_mode":3,"block":{"attributes":{"isolation_mode":{"type":"string","optional":true,"computed":true}}},"optional":true,"computed":true},"serverless_compute":{"nesting_mode":3,"block":{"attributes":{"public_ip_enabled":{"type":"bool","optional":true,"default":false},"subnet_id":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_machine_learning_workspace_network_outbound_rule_fqdn":{"block":{"attributes":{"destination_fqdn":{"type":"string","required":true},"name":{"type":"string","required":true},"workspace_id":{"type":"string","required":true}}}},"azurerm_machine_learning_workspace_network_outbound_rule_private_endpoint":{"block":{"attributes":{"name":{"type":"string","required":true},"service_resource_id":{"type":"string","required":true},"spark_enabled":{"type":"bool","optional":true,"default":false},"sub_resource_target":{"type":"string","required":true},"workspace_id":{"type":"string","required":true}}}},"azurerm_machine_learning_workspace_network_outbound_rule_service_tag":{"block":{"attributes":{"name":{"type":"string","required":true},"port_ranges":{"type":"string","required":true},"protocol":{"type":"string","required":true},"service_tag":{"type":"string","required":true},"workspace_id":{"type":"string","required":true}}}},"azurerm_maintenance_assignment_dedicated_host":{"block":{"attributes":{"dedicated_host_id":{"type":"string","required":true},"location":{"type":"string","required":true},"maintenance_configuration_id":{"type":"string","required":true}}}},"azurerm_maintenance_assignment_dynamic_scope":{"block":{"attributes":{"maintenance_configuration_id":{"type":"string","required":true},"name":{"type":"string","required":true}},"block_types":{"filter":{"nesting_mode":3,"block":{"attributes":{"locations":{"type":["list","string"],"optional":true,"at_least_one_of":["filter.0.locations","filter.0.os_types","filter.0.resource_groups","filter.0.resource_types","filter.0.tags"]},"os_types":{"type":["list","string"],"optional":true,"at_least_one_of":["filter.0.locations","filter.0.os_types","filter.0.resource_groups","filter.0.resource_types","filter.0.tags"]},"resource_groups":{"type":["list","string"],"optional":true,"at_least_one_of":["filter.0.locations","filter.0.os_types","filter.0.resource_groups","filter.0.resource_types","filter.0.tags"]},"resource_types":{"type":["list","string"],"optional":true,"at_least_one_of":["filter.0.locations","filter.0.os_types","filter.0.resource_groups","filter.0.resource_types","filter.0.tags"]},"tag_filter":{"type":"string","optional":true,"default":"Any","required_with":["filter.0.tags"]}},"block_types":{"tags":{"nesting_mode":3,"block":{"attributes":{"tag":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["filter.0.locations","filter.0.os_types","filter.0.resource_groups","filter.0.resource_types","filter.0.tags"]}}},"required":true}}}},"azurerm_maintenance_assignment_virtual_machine":{"block":{"attributes":{"location":{"type":"string","required":true},"maintenance_configuration_id":{"type":"string","required":true},"virtual_machine_id":{"type":"string","required":true}}}},"azurerm_maintenance_assignment_virtual_machine_scale_set":{"block":{"attributes":{"location":{"type":"string","required":true},"maintenance_configuration_id":{"type":"string","required":true},"virtual_machine_scale_set_id":{"type":"string","required":true}}}},"azurerm_maintenance_configuration":{"block":{"attributes":{"in_guest_user_patch_mode":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"properties":{"type":["map","string"],"optional":true},"resource_group_name":{"type":"string","required":true},"scope":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"visibility":{"type":"string","optional":true,"default":"Custom"}},"block_types":{"install_patches":{"nesting_mode":3,"block":{"attributes":{"reboot":{"type":"string","optional":true}},"block_types":{"linux":{"nesting_mode":3,"block":{"attributes":{"classifications_to_include":{"type":["list","string"],"optional":true},"package_names_mask_to_exclude":{"type":["list","string"],"optional":true},"package_names_mask_to_include":{"type":["list","string"],"optional":true}}},"optional":true},"windows":{"nesting_mode":3,"block":{"attributes":{"classifications_to_include":{"type":["list","string"],"optional":true},"kb_numbers_to_exclude":{"type":["list","string"],"optional":true},"kb_numbers_to_include":{"type":["list","string"],"optional":true}}},"optional":true}}},"optional":true},"window":{"nesting_mode":3,"block":{"attributes":{"duration":{"type":"string","optional":true},"expiration_date_time":{"type":"string","optional":true},"recur_every":{"type":"string","optional":true},"start_date_time":{"type":"string","required":true},"time_zone":{"type":"string","required":true}}},"optional":true}}}},"azurerm_managed_application":{"block":{"attributes":{"application_definition_id":{"type":"string","optional":true},"kind":{"type":"string","required":true},"location":{"type":"string","required":true},"managed_resource_group_name":{"type":"string","required":true},"name":{"type":"string","required":true},"outputs":{"type":["map","string"],"computed":true},"parameter_values":{"type":"string","optional":true,"computed":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"plan":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"product":{"type":"string","required":true},"promotion_code":{"type":"string","optional":true},"publisher":{"type":"string","required":true},"version":{"type":"string","required":true}}},"optional":true}}}},"azurerm_managed_application_definition":{"block":{"attributes":{"create_ui_definition":{"type":"string","optional":true,"conflicts_with":["package_file_uri"],"required_with":["main_template"]},"description":{"type":"string","optional":true},"display_name":{"type":"string","required":true},"location":{"type":"string","required":true},"lock_level":{"type":"string","required":true},"main_template":{"type":"string","optional":true,"conflicts_with":["package_file_uri"],"required_with":["create_ui_definition"]},"name":{"type":"string","required":true},"package_enabled":{"type":"bool","optional":true,"default":true},"package_file_uri":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"authorization":{"nesting_mode":4,"block":{"attributes":{"role_definition_id":{"type":"string","required":true},"service_principal_id":{"type":"string","required":true}}},"optional":true}}}},"azurerm_managed_disk":{"block":{"attributes":{"create_option":{"type":"string","required":true},"disk_access_id":{"type":"string","optional":true},"disk_encryption_set_id":{"type":"string","optional":true,"conflicts_with":["secure_vm_disk_encryption_set_id"]},"disk_iops_read_only":{"type":"number","optional":true,"computed":true},"disk_iops_read_write":{"type":"number","optional":true,"computed":true},"disk_mbps_read_only":{"type":"number","optional":true,"computed":true},"disk_mbps_read_write":{"type":"number","optional":true,"computed":true},"disk_size_gb":{"type":"number","optional":true,"computed":true},"edge_zone":{"type":"string","optional":true},"gallery_image_reference_id":{"type":"string","optional":true,"conflicts_with":["image_reference_id"]},"hyper_v_generation":{"type":"string","optional":true},"image_reference_id":{"type":"string","optional":true,"conflicts_with":["gallery_image_reference_id"]},"location":{"type":"string","required":true},"logical_sector_size":{"type":"number","optional":true,"computed":true},"max_shares":{"type":"number","optional":true,"computed":true},"name":{"type":"string","required":true},"network_access_policy":{"type":"string","optional":true},"on_demand_bursting_enabled":{"type":"bool","optional":true},"optimized_frequent_attach_enabled":{"type":"bool","optional":true,"default":false},"os_type":{"type":"string","optional":true},"performance_plus_enabled":{"type":"bool","optional":true,"default":false},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"secure_vm_disk_encryption_set_id":{"type":"string","optional":true,"conflicts_with":["disk_encryption_set_id"]},"security_type":{"type":"string","optional":true},"source_resource_id":{"type":"string","optional":true},"source_uri":{"type":"string","optional":true,"computed":true},"storage_account_id":{"type":"string","optional":true},"storage_account_type":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"tier":{"type":"string","optional":true,"computed":true},"trusted_launch_enabled":{"type":"bool","optional":true},"upload_size_bytes":{"type":"number","optional":true},"zone":{"type":"string","optional":true}},"block_types":{"encryption_settings":{"nesting_mode":3,"block":{"block_types":{"disk_encryption_key":{"nesting_mode":3,"block":{"attributes":{"secret_url":{"type":"string","required":true},"source_vault_id":{"type":"string","required":true}}},"required":true},"key_encryption_key":{"nesting_mode":3,"block":{"attributes":{"key_url":{"type":"string","required":true},"source_vault_id":{"type":"string","required":true}}},"optional":true}}},"optional":true}}}},"azurerm_managed_disk_sas_token":{"block":{"attributes":{"access_level":{"type":"string","required":true},"duration_in_seconds":{"type":"number","required":true},"managed_disk_id":{"type":"string","required":true},"sas_url":{"type":"string","computed":true}}}},"azurerm_managed_lustre_file_system":{"block":{"attributes":{"location":{"type":"string","required":true},"mgs_address":{"type":"string","computed":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","required":true},"storage_capacity_in_tb":{"type":"number","required":true},"subnet_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"zones":{"type":["set","string"],"required":true}},"block_types":{"encryption_key":{"nesting_mode":3,"block":{"attributes":{"key_url":{"type":"string","required":true},"source_vault_id":{"type":"string","required":true}}},"optional":true},"hsm_setting":{"nesting_mode":3,"block":{"attributes":{"container_id":{"type":"string","required":true},"import_prefix":{"type":"string","optional":true},"logging_container_id":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"required":true},"type":{"type":"string","required":true}}},"optional":true},"maintenance_window":{"nesting_mode":3,"block":{"attributes":{"day_of_week":{"type":"string","required":true},"time_of_day_in_utc":{"type":"string","required":true}}},"required":true}}}},"azurerm_management_group":{"block":{"attributes":{"display_name":{"type":"string","optional":true,"computed":true},"name":{"type":"string","optional":true,"computed":true},"parent_management_group_id":{"type":"string","optional":true,"computed":true},"subscription_ids":{"type":["set","string"],"optional":true,"computed":true},"tenant_scoped_id":{"type":"string","computed":true}}}},"azurerm_management_group_policy_assignment":{"block":{"attributes":{"description":{"type":"string","optional":true},"display_name":{"type":"string","optional":true},"enforce":{"type":"bool","optional":true,"default":true},"location":{"type":"string","optional":true},"management_group_id":{"type":"string","required":true},"metadata":{"type":"string","optional":true,"computed":true},"name":{"type":"string","required":true},"not_scopes":{"type":["list","string"],"optional":true},"parameters":{"type":"string","optional":true},"policy_definition_id":{"type":"string","required":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"non_compliance_message":{"nesting_mode":3,"block":{"attributes":{"content":{"type":"string","required":true},"policy_definition_reference_id":{"type":"string","optional":true}}},"optional":true},"overrides":{"nesting_mode":3,"block":{"attributes":{"value":{"type":"string","required":true}},"block_types":{"selectors":{"nesting_mode":3,"block":{"attributes":{"in":{"type":["list","string"],"optional":true},"kind":{"type":"string","computed":true},"not_in":{"type":["list","string"],"optional":true}}},"optional":true}}},"optional":true},"resource_selectors":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","optional":true}},"block_types":{"selectors":{"nesting_mode":3,"block":{"attributes":{"in":{"type":["list","string"],"optional":true},"kind":{"type":"string","required":true},"not_in":{"type":["list","string"],"optional":true}}},"required":true}}},"optional":true}}}},"azurerm_management_group_policy_exemption":{"block":{"attributes":{"description":{"type":"string","optional":true},"display_name":{"type":"string","optional":true},"exemption_category":{"type":"string","required":true},"expires_on":{"type":"string","optional":true},"management_group_id":{"type":"string","required":true},"metadata":{"type":"string","optional":true,"computed":true},"name":{"type":"string","required":true},"policy_assignment_id":{"type":"string","required":true},"policy_definition_reference_ids":{"type":["list","string"],"optional":true}}}},"azurerm_management_group_policy_remediation":{"block":{"attributes":{"failure_percentage":{"type":"number","optional":true},"location_filters":{"type":["list","string"],"optional":true},"management_group_id":{"type":"string","required":true},"name":{"type":"string","required":true},"parallel_deployments":{"type":"number","optional":true},"policy_assignment_id":{"type":"string","required":true},"policy_definition_reference_id":{"type":"string","optional":true},"resource_count":{"type":"number","optional":true}}}},"azurerm_management_group_subscription_association":{"block":{"attributes":{"management_group_id":{"type":"string","required":true},"subscription_id":{"type":"string","required":true}}}},"azurerm_management_group_template_deployment":{"block":{"attributes":{"debug_level":{"type":"string","optional":true},"location":{"type":"string","required":true},"management_group_id":{"type":"string","required":true},"name":{"type":"string","required":true},"output_content":{"type":"string","computed":true},"parameters_content":{"type":"string","optional":true,"computed":true},"tags":{"type":["map","string"],"optional":true},"template_content":{"type":"string","optional":true,"computed":true,"exactly_one_of":["template_content","template_spec_version_id"]},"template_spec_version_id":{"type":"string","optional":true,"exactly_one_of":["template_content","template_spec_version_id"]}}}},"azurerm_management_lock":{"block":{"attributes":{"lock_level":{"type":"string","required":true},"name":{"type":"string","required":true},"notes":{"type":"string","optional":true},"scope":{"type":"string","required":true}}}},"azurerm_maps_account":{"block":{"attributes":{"local_authentication_enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"primary_access_key":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"secondary_access_key":{"type":"string","computed":true},"sku_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"x_ms_client_id":{"type":"string","computed":true}},"block_types":{"cors":{"nesting_mode":3,"block":{"attributes":{"allowed_origins":{"type":["list","string"],"required":true}}},"optional":true},"data_store":{"nesting_mode":3,"block":{"attributes":{"storage_account_id":{"type":"string","optional":true},"unique_name":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_maps_creator":{"block":{"attributes":{"location":{"type":"string","required":true},"maps_account_id":{"type":"string","required":true},"name":{"type":"string","required":true},"storage_units":{"type":"number","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_marketplace_agreement":{"block":{"attributes":{"license_text_link":{"type":"string","computed":true},"offer":{"type":"string","required":true},"plan":{"type":"string","required":true},"privacy_policy_link":{"type":"string","computed":true},"publisher":{"type":"string","required":true}}}},"azurerm_marketplace_role_assignment":{"block":{"attributes":{"condition":{"type":"string","optional":true,"required_with":["condition_version"]},"condition_version":{"type":"string","optional":true,"required_with":["condition"]},"delegated_managed_identity_resource_id":{"type":"string","optional":true},"description":{"type":"string","optional":true},"name":{"type":"string","optional":true},"principal_id":{"type":"string","required":true},"principal_type":{"type":"string","computed":true},"role_definition_id":{"type":"string","optional":true,"conflicts_with":["role_definition_name"]},"role_definition_name":{"type":"string","optional":true,"conflicts_with":["role_definition_id"]},"skip_service_principal_aad_check":{"type":"bool","optional":true,"default":false}}}},"azurerm_mobile_network":{"block":{"attributes":{"location":{"type":"string","required":true},"mobile_country_code":{"type":"string","required":true},"mobile_network_code":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"service_key":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_mobile_network_attached_data_network":{"block":{"attributes":{"dns_addresses":{"type":["list","string"],"required":true},"location":{"type":"string","required":true},"mobile_network_data_network_name":{"type":"string","required":true},"mobile_network_packet_core_data_plane_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"user_equipment_address_pool_prefixes":{"type":["list","string"],"optional":true,"at_least_one_of":["user_equipment_address_pool_prefixes","user_equipment_static_address_pool_prefixes"]},"user_equipment_static_address_pool_prefixes":{"type":["list","string"],"optional":true,"at_least_one_of":["user_equipment_address_pool_prefixes","user_equipment_static_address_pool_prefixes"]},"user_plane_access_ipv4_address":{"type":"string","optional":true},"user_plane_access_ipv4_gateway":{"type":"string","optional":true},"user_plane_access_ipv4_subnet":{"type":"string","optional":true},"user_plane_access_name":{"type":"string","optional":true}},"block_types":{"network_address_port_translation":{"nesting_mode":3,"block":{"attributes":{"icmp_pinhole_timeout_in_seconds":{"type":"number","optional":true,"default":180},"pinhole_maximum_number":{"type":"number","optional":true,"default":65536},"tcp_pinhole_timeout_in_seconds":{"type":"number","optional":true,"default":180},"tcp_port_reuse_minimum_hold_time_in_seconds":{"type":"number","optional":true,"default":120},"udp_pinhole_timeout_in_seconds":{"type":"number","optional":true,"default":180},"udp_port_reuse_minimum_hold_time_in_seconds":{"type":"number","optional":true,"default":60}},"block_types":{"port_range":{"nesting_mode":3,"block":{"attributes":{"maximum":{"type":"number","optional":true,"default":49999},"minimum":{"type":"number","optional":true,"default":1024}}},"optional":true}}},"optional":true}}}},"azurerm_mobile_network_data_network":{"block":{"attributes":{"description":{"type":"string","optional":true},"location":{"type":"string","required":true},"mobile_network_id":{"type":"string","required":true},"name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_mobile_network_packet_core_control_plane":{"block":{"attributes":{"control_plane_access_ipv4_address":{"type":"string","optional":true},"control_plane_access_ipv4_gateway":{"type":"string","optional":true},"control_plane_access_ipv4_subnet":{"type":"string","optional":true},"control_plane_access_name":{"type":"string","optional":true},"core_network_technology":{"type":"string","optional":true},"interoperability_settings_json":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"site_ids":{"type":["list","string"],"required":true},"sku":{"type":"string","required":true},"software_version":{"type":"string","optional":true},"tags":{"type":["map","string"],"optional":true},"user_equipment_mtu_in_bytes":{"type":"number","optional":true,"default":1440}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"required":true},"type":{"type":"string","required":true}}},"optional":true},"local_diagnostics_access":{"nesting_mode":3,"block":{"attributes":{"authentication_type":{"type":"string","required":true},"https_server_certificate_url":{"type":"string","optional":true}}},"required":true},"platform":{"nesting_mode":3,"block":{"attributes":{"arc_kubernetes_cluster_id":{"type":"string","optional":true,"at_least_one_of":["platform.0.edge_device_id","platform.0.stack_hci_cluster_id","platform.0.arc_kubernetes_cluster_id","platform.0.custom_location_id"]},"custom_location_id":{"type":"string","optional":true,"at_least_one_of":["platform.0.edge_device_id","platform.0.stack_hci_cluster_id","platform.0.arc_kubernetes_cluster_id","platform.0.custom_location_id"]},"edge_device_id":{"type":"string","optional":true,"at_least_one_of":["platform.0.edge_device_id","platform.0.stack_hci_cluster_id","platform.0.arc_kubernetes_cluster_id","platform.0.custom_location_id"]},"stack_hci_cluster_id":{"type":"string","optional":true,"at_least_one_of":["platform.0.edge_device_id","platform.0.stack_hci_cluster_id","platform.0.arc_kubernetes_cluster_id","platform.0.custom_location_id"]},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_mobile_network_packet_core_data_plane":{"block":{"attributes":{"location":{"type":"string","required":true},"mobile_network_packet_core_control_plane_id":{"type":"string","required":true},"name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"user_plane_access_ipv4_address":{"type":"string","optional":true},"user_plane_access_ipv4_gateway":{"type":"string","optional":true},"user_plane_access_ipv4_subnet":{"type":"string","optional":true},"user_plane_access_name":{"type":"string","optional":true}}}},"azurerm_mobile_network_service":{"block":{"attributes":{"location":{"type":"string","required":true},"mobile_network_id":{"type":"string","required":true},"name":{"type":"string","required":true},"service_precedence":{"type":"number","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"pcc_rule":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"precedence":{"type":"number","required":true},"traffic_control_enabled":{"type":"bool","optional":true,"default":true}},"block_types":{"qos_policy":{"nesting_mode":3,"block":{"attributes":{"allocation_and_retention_priority_level":{"type":"number","optional":true},"preemption_capability":{"type":"string","optional":true,"default":"NotPreempt"},"preemption_vulnerability":{"type":"string","optional":true,"default":"Preemptable"},"qos_indicator":{"type":"number","required":true}},"block_types":{"guaranteed_bit_rate":{"nesting_mode":3,"block":{"attributes":{"downlink":{"type":"string","required":true},"uplink":{"type":"string","required":true}}},"optional":true},"maximum_bit_rate":{"nesting_mode":3,"block":{"attributes":{"downlink":{"type":"string","required":true},"uplink":{"type":"string","required":true}}},"required":true}}},"optional":true},"service_data_flow_template":{"nesting_mode":3,"block":{"attributes":{"direction":{"type":"string","required":true},"name":{"type":"string","required":true},"ports":{"type":["list","string"],"optional":true},"protocol":{"type":["list","string"],"required":true},"remote_ip_list":{"type":["list","string"],"required":true}}},"required":true}}},"required":true},"service_qos_policy":{"nesting_mode":3,"block":{"attributes":{"allocation_and_retention_priority_level":{"type":"number","optional":true,"default":9},"preemption_capability":{"type":"string","optional":true},"preemption_vulnerability":{"type":"string","optional":true},"qos_indicator":{"type":"number","optional":true}},"block_types":{"maximum_bit_rate":{"nesting_mode":3,"block":{"attributes":{"downlink":{"type":"string","required":true},"uplink":{"type":"string","required":true}}},"required":true}}},"optional":true}}}},"azurerm_mobile_network_sim":{"block":{"attributes":{"authentication_key":{"type":"string","required":true},"device_type":{"type":"string","optional":true},"integrated_circuit_card_identifier":{"type":"string","required":true},"international_mobile_subscriber_identity":{"type":"string","required":true},"mobile_network_sim_group_id":{"type":"string","required":true},"name":{"type":"string","required":true},"operator_key_code":{"type":"string","required":true},"sim_policy_id":{"type":"string","optional":true},"sim_state":{"type":"string","computed":true},"vendor_key_fingerprint":{"type":"string","computed":true},"vendor_name":{"type":"string","computed":true}},"block_types":{"static_ip_configuration":{"nesting_mode":3,"block":{"attributes":{"attached_data_network_id":{"type":"string","required":true},"slice_id":{"type":"string","required":true},"static_ipv4_address":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_mobile_network_sim_group":{"block":{"attributes":{"encryption_key_url":{"type":"string","optional":true},"location":{"type":"string","required":true},"mobile_network_id":{"type":"string","required":true},"name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"required":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_mobile_network_sim_policy":{"block":{"attributes":{"default_slice_id":{"type":"string","required":true},"location":{"type":"string","required":true},"mobile_network_id":{"type":"string","required":true},"name":{"type":"string","required":true},"rat_frequency_selection_priority_index":{"type":"number","optional":true},"registration_timer_in_seconds":{"type":"number","optional":true,"default":3240},"tags":{"type":["map","string"],"optional":true}},"block_types":{"slice":{"nesting_mode":3,"block":{"attributes":{"default_data_network_id":{"type":"string","required":true},"slice_id":{"type":"string","required":true}},"block_types":{"data_network":{"nesting_mode":3,"block":{"attributes":{"additional_allowed_session_types":{"type":["list","string"],"optional":true},"allocation_and_retention_priority_level":{"type":"number","optional":true,"default":0},"allowed_services_ids":{"type":["list","string"],"required":true},"data_network_id":{"type":"string","required":true},"default_session_type":{"type":"string","optional":true,"default":"IPv4"},"max_buffered_packets":{"type":"number","optional":true,"default":10},"preemption_capability":{"type":"string","optional":true,"default":"NotPreempt"},"preemption_vulnerability":{"type":"string","optional":true,"default":"NotPreemptable"},"qos_indicator":{"type":"number","required":true}},"block_types":{"session_aggregate_maximum_bit_rate":{"nesting_mode":3,"block":{"attributes":{"downlink":{"type":"string","required":true},"uplink":{"type":"string","required":true}}},"required":true}}},"required":true}}},"required":true},"user_equipment_aggregate_maximum_bit_rate":{"nesting_mode":3,"block":{"attributes":{"downlink":{"type":"string","required":true},"uplink":{"type":"string","required":true}}},"required":true}}}},"azurerm_mobile_network_site":{"block":{"attributes":{"location":{"type":"string","required":true},"mobile_network_id":{"type":"string","required":true},"name":{"type":"string","required":true},"network_function_ids":{"type":["list","string"],"computed":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_mobile_network_slice":{"block":{"attributes":{"description":{"type":"string","optional":true},"location":{"type":"string","required":true},"mobile_network_id":{"type":"string","required":true},"name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"single_network_slice_selection_assistance_information":{"nesting_mode":3,"block":{"attributes":{"slice_differentiator":{"type":"string","optional":true},"slice_service_type":{"type":"number","required":true}}},"required":true}}}},"azurerm_mongo_cluster":{"block":{"attributes":{"administrator_password":{"type":"string","optional":true,"required_with":["administrator_username"]},"administrator_username":{"type":"string","optional":true,"required_with":["administrator_password"]},"compute_tier":{"type":"string","optional":true},"create_mode":{"type":"string","optional":true,"default":"Default"},"high_availability_mode":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"preview_features":{"type":["list","string"],"optional":true},"public_network_access":{"type":"string","optional":true,"default":"Enabled"},"resource_group_name":{"type":"string","required":true},"shard_count":{"type":"number","optional":true},"source_location":{"type":"string","optional":true,"required_with":["source_server_id"]},"source_server_id":{"type":"string","optional":true},"storage_size_in_gb":{"type":"number","optional":true},"tags":{"type":["map","string"],"optional":true},"version":{"type":"string","optional":true}}}},"azurerm_monitor_aad_diagnostic_setting":{"block":{"attributes":{"eventhub_authorization_rule_id":{"type":"string","optional":true,"at_least_one_of":["eventhub_authorization_rule_id","log_analytics_workspace_id","storage_account_id"]},"eventhub_name":{"type":"string","optional":true},"log_analytics_workspace_id":{"type":"string","optional":true,"at_least_one_of":["eventhub_authorization_rule_id","log_analytics_workspace_id","storage_account_id"]},"name":{"type":"string","required":true},"storage_account_id":{"type":"string","optional":true,"at_least_one_of":["eventhub_authorization_rule_id","log_analytics_workspace_id","storage_account_id"]}},"block_types":{"enabled_log":{"nesting_mode":4,"block":{"attributes":{"category":{"type":"string","required":true}},"block_types":{"retention_policy":{"nesting_mode":3,"block":{"attributes":{"days":{"type":"number","optional":true,"default":0},"enabled":{"type":"bool","optional":true,"default":false}}},"optional":true}}},"optional":true}}}},"azurerm_monitor_action_group":{"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","optional":true,"default":"global"},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"short_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"arm_role_receiver":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"role_id":{"type":"string","required":true},"use_common_alert_schema":{"type":"bool","optional":true}}},"optional":true},"automation_runbook_receiver":{"nesting_mode":3,"block":{"attributes":{"automation_account_id":{"type":"string","required":true},"is_global_runbook":{"type":"bool","required":true},"name":{"type":"string","required":true},"runbook_name":{"type":"string","required":true},"service_uri":{"type":"string","required":true},"use_common_alert_schema":{"type":"bool","optional":true,"default":false},"webhook_resource_id":{"type":"string","required":true}}},"optional":true},"azure_app_push_receiver":{"nesting_mode":3,"block":{"attributes":{"email_address":{"type":"string","required":true},"name":{"type":"string","required":true}}},"optional":true},"azure_function_receiver":{"nesting_mode":3,"block":{"attributes":{"function_app_resource_id":{"type":"string","required":true},"function_name":{"type":"string","required":true},"http_trigger_url":{"type":"string","required":true},"name":{"type":"string","required":true},"use_common_alert_schema":{"type":"bool","optional":true}}},"optional":true},"email_receiver":{"nesting_mode":3,"block":{"attributes":{"email_address":{"type":"string","required":true},"name":{"type":"string","required":true},"use_common_alert_schema":{"type":"bool","optional":true}}},"optional":true},"event_hub_receiver":{"nesting_mode":3,"block":{"attributes":{"event_hub_name":{"type":"string","required":true},"event_hub_namespace":{"type":"string","required":true},"name":{"type":"string","required":true},"subscription_id":{"type":"string","optional":true,"computed":true},"tenant_id":{"type":"string","optional":true,"computed":true},"use_common_alert_schema":{"type":"bool","optional":true}}},"optional":true},"itsm_receiver":{"nesting_mode":3,"block":{"attributes":{"connection_id":{"type":"string","required":true},"name":{"type":"string","required":true},"region":{"type":"string","required":true},"ticket_configuration":{"type":"string","required":true},"workspace_id":{"type":"string","required":true}}},"optional":true},"logic_app_receiver":{"nesting_mode":3,"block":{"attributes":{"callback_url":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_id":{"type":"string","required":true},"use_common_alert_schema":{"type":"bool","optional":true}}},"optional":true},"sms_receiver":{"nesting_mode":3,"block":{"attributes":{"country_code":{"type":"string","required":true},"name":{"type":"string","required":true},"phone_number":{"type":"string","required":true}}},"optional":true},"voice_receiver":{"nesting_mode":3,"block":{"attributes":{"country_code":{"type":"string","required":true},"name":{"type":"string","required":true},"phone_number":{"type":"string","required":true}}},"optional":true},"webhook_receiver":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"service_uri":{"type":"string","required":true},"use_common_alert_schema":{"type":"bool","optional":true}},"block_types":{"aad_auth":{"nesting_mode":3,"block":{"attributes":{"identifier_uri":{"type":"string","optional":true,"computed":true},"object_id":{"type":"string","required":true},"tenant_id":{"type":"string","optional":true,"computed":true}}},"optional":true}}},"optional":true}}}},"azurerm_monitor_activity_log_alert":{"block":{"attributes":{"description":{"type":"string","optional":true},"enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"scopes":{"type":["set","string"],"required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"action":{"nesting_mode":3,"block":{"attributes":{"action_group_id":{"type":"string","required":true},"webhook_properties":{"type":["map","string"],"optional":true}}},"optional":true},"criteria":{"nesting_mode":3,"block":{"attributes":{"caller":{"type":"string","optional":true},"category":{"type":"string","required":true},"level":{"type":"string","optional":true,"conflicts_with":["criteria.0.levels"]},"levels":{"type":["list","string"],"optional":true,"conflicts_with":["criteria.0.level"]},"operation_name":{"type":"string","optional":true},"recommendation_category":{"type":"string","optional":true,"conflicts_with":["criteria.0.recommendation_type"]},"recommendation_impact":{"type":"string","optional":true,"conflicts_with":["criteria.0.recommendation_type"]},"recommendation_type":{"type":"string","optional":true,"conflicts_with":["criteria.0.recommendation_category","criteria.0.recommendation_impact"]},"resource_group":{"type":"string","optional":true,"conflicts_with":["criteria.0.resource_groups"]},"resource_groups":{"type":["list","string"],"optional":true,"conflicts_with":["criteria.0.resource_group"]},"resource_id":{"type":"string","optional":true,"conflicts_with":["criteria.0.resource_ids"]},"resource_ids":{"type":["list","string"],"optional":true,"conflicts_with":["criteria.0.resource_id"]},"resource_provider":{"type":"string","optional":true,"conflicts_with":["criteria.0.resource_providers"]},"resource_providers":{"type":["list","string"],"optional":true,"conflicts_with":["criteria.0.resource_provider"]},"resource_type":{"type":"string","optional":true,"conflicts_with":["criteria.0.resource_types"]},"resource_types":{"type":["list","string"],"optional":true,"conflicts_with":["criteria.0.resource_type"]},"status":{"type":"string","optional":true,"conflicts_with":["criteria.0.statuses"]},"statuses":{"type":["list","string"],"optional":true,"conflicts_with":["criteria.0.status"]},"sub_status":{"type":"string","optional":true,"conflicts_with":["criteria.0.sub_statuses"]},"sub_statuses":{"type":["list","string"],"optional":true,"conflicts_with":["criteria.0.sub_status"]}},"block_types":{"resource_health":{"nesting_mode":3,"block":{"attributes":{"current":{"type":["set","string"],"optional":true},"previous":{"type":["set","string"],"optional":true},"reason":{"type":["set","string"],"optional":true}}},"optional":true,"computed":true,"conflicts_with":["criteria.0.caller","criteria.0.service_health"]},"service_health":{"nesting_mode":3,"block":{"attributes":{"events":{"type":["set","string"],"optional":true},"locations":{"type":["set","string"],"optional":true},"services":{"type":["set","string"],"optional":true}}},"optional":true,"computed":true,"conflicts_with":["criteria.0.caller","criteria.0.resource_health"]}}},"required":true}}}},"azurerm_monitor_alert_processing_rule_action_group":{"block":{"attributes":{"add_action_group_ids":{"type":["list","string"],"required":true},"description":{"type":"string","optional":true},"enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"scopes":{"type":["list","string"],"required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"condition":{"nesting_mode":3,"block":{"block_types":{"alert_context":{"nesting_mode":3,"block":{"attributes":{"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["condition.0.alert_context","condition.0.alert_rule_id","condition.0.alert_rule_name","condition.0.description","condition.0.monitor_condition","condition.0.monitor_service","condition.0.severity","condition.0.signal_type","condition.0.target_resource","condition.0.target_resource_group","condition.0.target_resource_type"]},"alert_rule_id":{"nesting_mode":3,"block":{"attributes":{"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["condition.0.alert_context","condition.0.alert_rule_id","condition.0.alert_rule_name","condition.0.description","condition.0.monitor_condition","condition.0.monitor_service","condition.0.severity","condition.0.signal_type","condition.0.target_resource","condition.0.target_resource_group","condition.0.target_resource_type"]},"alert_rule_name":{"nesting_mode":3,"block":{"attributes":{"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["condition.0.alert_context","condition.0.alert_rule_id","condition.0.alert_rule_name","condition.0.description","condition.0.monitor_condition","condition.0.monitor_service","condition.0.severity","condition.0.signal_type","condition.0.target_resource","condition.0.target_resource_group","condition.0.target_resource_type"]},"description":{"nesting_mode":3,"block":{"attributes":{"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["condition.0.alert_context","condition.0.alert_rule_id","condition.0.alert_rule_name","condition.0.description","condition.0.monitor_condition","condition.0.monitor_service","condition.0.severity","condition.0.signal_type","condition.0.target_resource","condition.0.target_resource_group","condition.0.target_resource_type"]},"monitor_condition":{"nesting_mode":3,"block":{"attributes":{"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["condition.0.alert_context","condition.0.alert_rule_id","condition.0.alert_rule_name","condition.0.description","condition.0.monitor_condition","condition.0.monitor_service","condition.0.severity","condition.0.signal_type","condition.0.target_resource","condition.0.target_resource_group","condition.0.target_resource_type"]},"monitor_service":{"nesting_mode":3,"block":{"attributes":{"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["condition.0.alert_context","condition.0.alert_rule_id","condition.0.alert_rule_name","condition.0.description","condition.0.monitor_condition","condition.0.monitor_service","condition.0.severity","condition.0.signal_type","condition.0.target_resource","condition.0.target_resource_group","condition.0.target_resource_type"]},"severity":{"nesting_mode":3,"block":{"attributes":{"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["condition.0.alert_context","condition.0.alert_rule_id","condition.0.alert_rule_name","condition.0.description","condition.0.monitor_condition","condition.0.monitor_service","condition.0.severity","condition.0.signal_type","condition.0.target_resource","condition.0.target_resource_group","condition.0.target_resource_type"]},"signal_type":{"nesting_mode":3,"block":{"attributes":{"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["condition.0.alert_context","condition.0.alert_rule_id","condition.0.alert_rule_name","condition.0.description","condition.0.monitor_condition","condition.0.monitor_service","condition.0.severity","condition.0.signal_type","condition.0.target_resource","condition.0.target_resource_group","condition.0.target_resource_type"]},"target_resource":{"nesting_mode":3,"block":{"attributes":{"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["condition.0.alert_context","condition.0.alert_rule_id","condition.0.alert_rule_name","condition.0.description","condition.0.monitor_condition","condition.0.monitor_service","condition.0.severity","condition.0.signal_type","condition.0.target_resource","condition.0.target_resource_group","condition.0.target_resource_type"]},"target_resource_group":{"nesting_mode":3,"block":{"attributes":{"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["condition.0.alert_context","condition.0.alert_rule_id","condition.0.alert_rule_name","condition.0.description","condition.0.monitor_condition","condition.0.monitor_service","condition.0.severity","condition.0.signal_type","condition.0.target_resource","condition.0.target_resource_group","condition.0.target_resource_type"]},"target_resource_type":{"nesting_mode":3,"block":{"attributes":{"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["condition.0.alert_context","condition.0.alert_rule_id","condition.0.alert_rule_name","condition.0.description","condition.0.monitor_condition","condition.0.monitor_service","condition.0.severity","condition.0.signal_type","condition.0.target_resource","condition.0.target_resource_group","condition.0.target_resource_type"]}}},"optional":true},"schedule":{"nesting_mode":3,"block":{"attributes":{"effective_from":{"type":"string","optional":true},"effective_until":{"type":"string","optional":true},"time_zone":{"type":"string","optional":true,"default":"UTC"}},"block_types":{"recurrence":{"nesting_mode":3,"block":{"block_types":{"daily":{"nesting_mode":3,"block":{"attributes":{"end_time":{"type":"string","required":true},"start_time":{"type":"string","required":true}}},"optional":true},"monthly":{"nesting_mode":3,"block":{"attributes":{"days_of_month":{"type":["list","number"],"required":true},"end_time":{"type":"string","optional":true},"start_time":{"type":"string","optional":true}}},"optional":true},"weekly":{"nesting_mode":3,"block":{"attributes":{"days_of_week":{"type":["list","string"],"required":true},"end_time":{"type":"string","optional":true},"start_time":{"type":"string","optional":true}}},"optional":true}}},"optional":true}}},"optional":true}}}},"azurerm_monitor_alert_processing_rule_suppression":{"block":{"attributes":{"description":{"type":"string","optional":true},"enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"scopes":{"type":["list","string"],"required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"condition":{"nesting_mode":3,"block":{"block_types":{"alert_context":{"nesting_mode":3,"block":{"attributes":{"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["condition.0.alert_context","condition.0.alert_rule_id","condition.0.alert_rule_name","condition.0.description","condition.0.monitor_condition","condition.0.monitor_service","condition.0.severity","condition.0.signal_type","condition.0.target_resource","condition.0.target_resource_group","condition.0.target_resource_type"]},"alert_rule_id":{"nesting_mode":3,"block":{"attributes":{"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["condition.0.alert_context","condition.0.alert_rule_id","condition.0.alert_rule_name","condition.0.description","condition.0.monitor_condition","condition.0.monitor_service","condition.0.severity","condition.0.signal_type","condition.0.target_resource","condition.0.target_resource_group","condition.0.target_resource_type"]},"alert_rule_name":{"nesting_mode":3,"block":{"attributes":{"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["condition.0.alert_context","condition.0.alert_rule_id","condition.0.alert_rule_name","condition.0.description","condition.0.monitor_condition","condition.0.monitor_service","condition.0.severity","condition.0.signal_type","condition.0.target_resource","condition.0.target_resource_group","condition.0.target_resource_type"]},"description":{"nesting_mode":3,"block":{"attributes":{"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["condition.0.alert_context","condition.0.alert_rule_id","condition.0.alert_rule_name","condition.0.description","condition.0.monitor_condition","condition.0.monitor_service","condition.0.severity","condition.0.signal_type","condition.0.target_resource","condition.0.target_resource_group","condition.0.target_resource_type"]},"monitor_condition":{"nesting_mode":3,"block":{"attributes":{"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["condition.0.alert_context","condition.0.alert_rule_id","condition.0.alert_rule_name","condition.0.description","condition.0.monitor_condition","condition.0.monitor_service","condition.0.severity","condition.0.signal_type","condition.0.target_resource","condition.0.target_resource_group","condition.0.target_resource_type"]},"monitor_service":{"nesting_mode":3,"block":{"attributes":{"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["condition.0.alert_context","condition.0.alert_rule_id","condition.0.alert_rule_name","condition.0.description","condition.0.monitor_condition","condition.0.monitor_service","condition.0.severity","condition.0.signal_type","condition.0.target_resource","condition.0.target_resource_group","condition.0.target_resource_type"]},"severity":{"nesting_mode":3,"block":{"attributes":{"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["condition.0.alert_context","condition.0.alert_rule_id","condition.0.alert_rule_name","condition.0.description","condition.0.monitor_condition","condition.0.monitor_service","condition.0.severity","condition.0.signal_type","condition.0.target_resource","condition.0.target_resource_group","condition.0.target_resource_type"]},"signal_type":{"nesting_mode":3,"block":{"attributes":{"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["condition.0.alert_context","condition.0.alert_rule_id","condition.0.alert_rule_name","condition.0.description","condition.0.monitor_condition","condition.0.monitor_service","condition.0.severity","condition.0.signal_type","condition.0.target_resource","condition.0.target_resource_group","condition.0.target_resource_type"]},"target_resource":{"nesting_mode":3,"block":{"attributes":{"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["condition.0.alert_context","condition.0.alert_rule_id","condition.0.alert_rule_name","condition.0.description","condition.0.monitor_condition","condition.0.monitor_service","condition.0.severity","condition.0.signal_type","condition.0.target_resource","condition.0.target_resource_group","condition.0.target_resource_type"]},"target_resource_group":{"nesting_mode":3,"block":{"attributes":{"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["condition.0.alert_context","condition.0.alert_rule_id","condition.0.alert_rule_name","condition.0.description","condition.0.monitor_condition","condition.0.monitor_service","condition.0.severity","condition.0.signal_type","condition.0.target_resource","condition.0.target_resource_group","condition.0.target_resource_type"]},"target_resource_type":{"nesting_mode":3,"block":{"attributes":{"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["condition.0.alert_context","condition.0.alert_rule_id","condition.0.alert_rule_name","condition.0.description","condition.0.monitor_condition","condition.0.monitor_service","condition.0.severity","condition.0.signal_type","condition.0.target_resource","condition.0.target_resource_group","condition.0.target_resource_type"]}}},"optional":true},"schedule":{"nesting_mode":3,"block":{"attributes":{"effective_from":{"type":"string","optional":true},"effective_until":{"type":"string","optional":true},"time_zone":{"type":"string","optional":true,"default":"UTC"}},"block_types":{"recurrence":{"nesting_mode":3,"block":{"block_types":{"daily":{"nesting_mode":3,"block":{"attributes":{"end_time":{"type":"string","required":true},"start_time":{"type":"string","required":true}}},"optional":true},"monthly":{"nesting_mode":3,"block":{"attributes":{"days_of_month":{"type":["list","number"],"required":true},"end_time":{"type":"string","optional":true},"start_time":{"type":"string","optional":true}}},"optional":true},"weekly":{"nesting_mode":3,"block":{"attributes":{"days_of_week":{"type":["list","string"],"required":true},"end_time":{"type":"string","optional":true},"start_time":{"type":"string","optional":true}}},"optional":true}}},"optional":true}}},"optional":true}}}},"azurerm_monitor_alert_prometheus_rule_group":{"block":{"attributes":{"cluster_name":{"type":"string","optional":true},"description":{"type":"string","optional":true},"interval":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"rule_group_enabled":{"type":"bool","optional":true},"scopes":{"type":["list","string"],"required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"rule":{"nesting_mode":3,"block":{"attributes":{"alert":{"type":"string","optional":true},"annotations":{"type":["map","string"],"optional":true},"enabled":{"type":"bool","optional":true},"expression":{"type":"string","required":true},"for":{"type":"string","optional":true},"labels":{"type":["map","string"],"optional":true},"record":{"type":"string","optional":true},"severity":{"type":"number","optional":true}},"block_types":{"action":{"nesting_mode":3,"block":{"attributes":{"action_group_id":{"type":"string","required":true},"action_properties":{"type":["map","string"],"optional":true}}},"optional":true},"alert_resolution":{"nesting_mode":3,"block":{"attributes":{"auto_resolved":{"type":"bool","optional":true},"time_to_resolve":{"type":"string","optional":true}}},"optional":true}}},"required":true}}}},"azurerm_monitor_autoscale_setting":{"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"target_resource_id":{"type":"string","required":true}},"block_types":{"notification":{"nesting_mode":3,"block":{"block_types":{"email":{"nesting_mode":3,"block":{"attributes":{"custom_emails":{"type":["list","string"],"optional":true},"send_to_subscription_administrator":{"type":"bool","optional":true,"default":false},"send_to_subscription_co_administrator":{"type":"bool","optional":true,"default":false}}},"optional":true,"at_least_one_of":["notification.0.email","notification.0.webhook"]},"webhook":{"nesting_mode":3,"block":{"attributes":{"properties":{"type":["map","string"],"optional":true},"service_uri":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["notification.0.email","notification.0.webhook"]}}},"optional":true},"predictive":{"nesting_mode":3,"block":{"attributes":{"look_ahead_time":{"type":"string","optional":true},"scale_mode":{"type":"string","required":true}}},"optional":true},"profile":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true}},"block_types":{"capacity":{"nesting_mode":3,"block":{"attributes":{"default":{"type":"number","required":true},"maximum":{"type":"number","required":true},"minimum":{"type":"number","required":true}}},"required":true},"fixed_date":{"nesting_mode":3,"block":{"attributes":{"end":{"type":"string","required":true},"start":{"type":"string","required":true},"timezone":{"type":"string","optional":true,"default":"UTC"}}},"optional":true},"recurrence":{"nesting_mode":3,"block":{"attributes":{"days":{"type":["list","string"],"required":true},"hours":{"type":["list","number"],"required":true},"minutes":{"type":["list","number"],"required":true},"timezone":{"type":"string","optional":true,"default":"UTC"}}},"optional":true},"rule":{"nesting_mode":3,"block":{"block_types":{"metric_trigger":{"nesting_mode":3,"block":{"attributes":{"divide_by_instance_count":{"type":"bool","optional":true},"metric_name":{"type":"string","required":true},"metric_namespace":{"type":"string","optional":true},"metric_resource_id":{"type":"string","required":true},"operator":{"type":"string","required":true},"statistic":{"type":"string","required":true},"threshold":{"type":"number","required":true},"time_aggregation":{"type":"string","required":true},"time_grain":{"type":"string","required":true},"time_window":{"type":"string","required":true}},"block_types":{"dimensions":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true}}},"required":true},"scale_action":{"nesting_mode":3,"block":{"attributes":{"cooldown":{"type":"string","required":true},"direction":{"type":"string","required":true},"type":{"type":"string","required":true},"value":{"type":"number","required":true}}},"required":true}}},"optional":true}}},"required":true}}}},"azurerm_monitor_data_collection_endpoint":{"block":{"attributes":{"configuration_access_endpoint":{"type":"string","computed":true},"description":{"type":"string","optional":true},"immutable_id":{"type":"string","computed":true},"kind":{"type":"string","optional":true},"location":{"type":"string","required":true},"logs_ingestion_endpoint":{"type":"string","computed":true},"name":{"type":"string","required":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_monitor_data_collection_rule":{"block":{"attributes":{"data_collection_endpoint_id":{"type":"string","optional":true},"description":{"type":"string","optional":true},"immutable_id":{"type":"string","computed":true},"kind":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"data_flow":{"nesting_mode":3,"block":{"attributes":{"built_in_transform":{"type":"string","optional":true},"destinations":{"type":["list","string"],"required":true},"output_stream":{"type":"string","optional":true},"streams":{"type":["list","string"],"required":true},"transform_kql":{"type":"string","optional":true}}},"required":true},"data_sources":{"nesting_mode":3,"block":{"block_types":{"data_import":{"nesting_mode":3,"block":{"block_types":{"event_hub_data_source":{"nesting_mode":3,"block":{"attributes":{"consumer_group":{"type":"string","optional":true},"name":{"type":"string","required":true},"stream":{"type":"string","required":true}}},"required":true}}},"optional":true},"extension":{"nesting_mode":3,"block":{"attributes":{"extension_json":{"type":"string","optional":true},"extension_name":{"type":"string","required":true},"input_data_sources":{"type":["list","string"],"optional":true},"name":{"type":"string","required":true},"streams":{"type":["list","string"],"required":true}}},"optional":true},"iis_log":{"nesting_mode":3,"block":{"attributes":{"log_directories":{"type":["list","string"],"optional":true},"name":{"type":"string","required":true},"streams":{"type":["list","string"],"required":true}}},"optional":true},"log_file":{"nesting_mode":3,"block":{"attributes":{"file_patterns":{"type":["list","string"],"required":true},"format":{"type":"string","required":true},"name":{"type":"string","required":true},"streams":{"type":["list","string"],"required":true}},"block_types":{"settings":{"nesting_mode":3,"block":{"block_types":{"text":{"nesting_mode":3,"block":{"attributes":{"record_start_timestamp_format":{"type":"string","required":true}}},"required":true}}},"optional":true}}},"optional":true},"performance_counter":{"nesting_mode":3,"block":{"attributes":{"counter_specifiers":{"type":["list","string"],"required":true},"name":{"type":"string","required":true},"sampling_frequency_in_seconds":{"type":"number","required":true},"streams":{"type":["list","string"],"required":true}}},"optional":true},"platform_telemetry":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"streams":{"type":["list","string"],"required":true}}},"optional":true},"prometheus_forwarder":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"streams":{"type":["list","string"],"required":true}},"block_types":{"label_include_filter":{"nesting_mode":4,"block":{"attributes":{"label":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true},"syslog":{"nesting_mode":3,"block":{"attributes":{"facility_names":{"type":["list","string"],"required":true},"log_levels":{"type":["list","string"],"required":true},"name":{"type":"string","required":true},"streams":{"type":["list","string"],"required":true}}},"optional":true},"windows_event_log":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"streams":{"type":["list","string"],"required":true},"x_path_queries":{"type":["list","string"],"required":true}}},"optional":true},"windows_firewall_log":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"streams":{"type":["list","string"],"required":true}}},"optional":true}}},"optional":true},"destinations":{"nesting_mode":3,"block":{"block_types":{"azure_monitor_metrics":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["destinations.0.azure_monitor_metrics","destinations.0.event_hub","destinations.0.event_hub_direct","destinations.0.log_analytics","destinations.0.monitor_account","destinations.0.storage_blob","destinations.0.storage_blob_direct","destinations.0.storage_table_direct"]},"event_hub":{"nesting_mode":3,"block":{"attributes":{"event_hub_id":{"type":"string","required":true},"name":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["destinations.0.azure_monitor_metrics","destinations.0.event_hub","destinations.0.event_hub_direct","destinations.0.log_analytics","destinations.0.monitor_account","destinations.0.storage_blob","destinations.0.storage_blob_direct","destinations.0.storage_table_direct"]},"event_hub_direct":{"nesting_mode":3,"block":{"attributes":{"event_hub_id":{"type":"string","required":true},"name":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["destinations.0.azure_monitor_metrics","destinations.0.event_hub","destinations.0.event_hub_direct","destinations.0.log_analytics","destinations.0.monitor_account","destinations.0.storage_blob","destinations.0.storage_blob_direct","destinations.0.storage_table_direct"]},"log_analytics":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"workspace_resource_id":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["destinations.0.azure_monitor_metrics","destinations.0.event_hub","destinations.0.event_hub_direct","destinations.0.log_analytics","destinations.0.monitor_account","destinations.0.storage_blob","destinations.0.storage_blob_direct","destinations.0.storage_table_direct"]},"monitor_account":{"nesting_mode":3,"block":{"attributes":{"monitor_account_id":{"type":"string","required":true},"name":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["destinations.0.azure_monitor_metrics","destinations.0.event_hub","destinations.0.event_hub_direct","destinations.0.log_analytics","destinations.0.monitor_account","destinations.0.storage_blob","destinations.0.storage_blob_direct","destinations.0.storage_table_direct"]},"storage_blob":{"nesting_mode":3,"block":{"attributes":{"container_name":{"type":"string","required":true},"name":{"type":"string","required":true},"storage_account_id":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["destinations.0.azure_monitor_metrics","destinations.0.event_hub","destinations.0.event_hub_direct","destinations.0.log_analytics","destinations.0.monitor_account","destinations.0.storage_blob","destinations.0.storage_blob_direct","destinations.0.storage_table_direct"]},"storage_blob_direct":{"nesting_mode":3,"block":{"attributes":{"container_name":{"type":"string","required":true},"name":{"type":"string","required":true},"storage_account_id":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["destinations.0.azure_monitor_metrics","destinations.0.event_hub","destinations.0.event_hub_direct","destinations.0.log_analytics","destinations.0.monitor_account","destinations.0.storage_blob","destinations.0.storage_blob_direct","destinations.0.storage_table_direct"]},"storage_table_direct":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"storage_account_id":{"type":"string","required":true},"table_name":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["destinations.0.azure_monitor_metrics","destinations.0.event_hub","destinations.0.event_hub_direct","destinations.0.log_analytics","destinations.0.monitor_account","destinations.0.storage_blob","destinations.0.storage_blob_direct","destinations.0.storage_table_direct"]}}},"required":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"stream_declaration":{"nesting_mode":4,"block":{"attributes":{"stream_name":{"type":"string","required":true}},"block_types":{"column":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"type":{"type":"string","required":true}}},"required":true}}},"optional":true}}}},"azurerm_monitor_data_collection_rule_association":{"block":{"attributes":{"data_collection_endpoint_id":{"type":"string","optional":true,"exactly_one_of":["data_collection_endpoint_id","data_collection_rule_id"]},"data_collection_rule_id":{"type":"string","optional":true,"exactly_one_of":["data_collection_endpoint_id","data_collection_rule_id"],"required_with":["name"]},"description":{"type":"string","optional":true},"name":{"type":"string","optional":true,"default":"configurationAccessEndpoint"},"target_resource_id":{"type":"string","required":true}}}},"azurerm_monitor_diagnostic_setting":{"block":{"attributes":{"eventhub_authorization_rule_id":{"type":"string","optional":true,"at_least_one_of":["eventhub_authorization_rule_id","log_analytics_workspace_id","storage_account_id","partner_solution_id"]},"eventhub_name":{"type":"string","optional":true},"log_analytics_destination_type":{"type":"string","optional":true,"computed":true},"log_analytics_workspace_id":{"type":"string","optional":true,"at_least_one_of":["eventhub_authorization_rule_id","log_analytics_workspace_id","storage_account_id","partner_solution_id"]},"name":{"type":"string","required":true},"partner_solution_id":{"type":"string","optional":true,"at_least_one_of":["eventhub_authorization_rule_id","log_analytics_workspace_id","storage_account_id","partner_solution_id"]},"storage_account_id":{"type":"string","optional":true,"at_least_one_of":["eventhub_authorization_rule_id","log_analytics_workspace_id","storage_account_id","partner_solution_id"]},"target_resource_id":{"type":"string","required":true}},"block_types":{"enabled_log":{"nesting_mode":4,"block":{"attributes":{"category":{"type":"string","optional":true},"category_group":{"type":"string","optional":true}},"block_types":{"retention_policy":{"nesting_mode":3,"block":{"attributes":{"days":{"type":"number","optional":true},"enabled":{"type":"bool","required":true}}},"optional":true}}},"optional":true,"at_least_one_of":["enabled_log","metric"]},"metric":{"nesting_mode":4,"block":{"attributes":{"category":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":true}},"block_types":{"retention_policy":{"nesting_mode":3,"block":{"attributes":{"days":{"type":"number","optional":true},"enabled":{"type":"bool","required":true}}},"optional":true}}},"optional":true,"at_least_one_of":["enabled_log","metric"]}}}},"azurerm_monitor_metric_alert":{"block":{"attributes":{"auto_mitigate":{"type":"bool","optional":true,"default":true},"description":{"type":"string","optional":true},"enabled":{"type":"bool","optional":true,"default":true},"frequency":{"type":"string","optional":true,"default":"PT1M"},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"scopes":{"type":["set","string"],"required":true},"severity":{"type":"number","optional":true,"default":3},"tags":{"type":["map","string"],"optional":true},"target_resource_location":{"type":"string","optional":true,"computed":true},"target_resource_type":{"type":"string","optional":true,"computed":true},"window_size":{"type":"string","optional":true,"default":"PT5M"}},"block_types":{"action":{"nesting_mode":4,"block":{"attributes":{"action_group_id":{"type":"string","required":true},"webhook_properties":{"type":["map","string"],"optional":true}}},"optional":true},"application_insights_web_test_location_availability_criteria":{"nesting_mode":3,"block":{"attributes":{"component_id":{"type":"string","required":true},"failed_location_count":{"type":"number","required":true},"web_test_id":{"type":"string","required":true}}},"optional":true,"exactly_one_of":["criteria","dynamic_criteria","application_insights_web_test_location_availability_criteria"]},"criteria":{"nesting_mode":3,"block":{"attributes":{"aggregation":{"type":"string","required":true},"metric_name":{"type":"string","required":true},"metric_namespace":{"type":"string","required":true},"operator":{"type":"string","required":true},"skip_metric_validation":{"type":"bool","optional":true,"default":false},"threshold":{"type":"number","required":true}},"block_types":{"dimension":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true}}},"optional":true,"exactly_one_of":["criteria","dynamic_criteria","application_insights_web_test_location_availability_criteria"]},"dynamic_criteria":{"nesting_mode":3,"block":{"attributes":{"aggregation":{"type":"string","required":true},"alert_sensitivity":{"type":"string","required":true},"evaluation_failure_count":{"type":"number","optional":true,"default":4},"evaluation_total_count":{"type":"number","optional":true,"default":4},"ignore_data_before":{"type":"string","optional":true},"metric_name":{"type":"string","required":true},"metric_namespace":{"type":"string","required":true},"operator":{"type":"string","required":true},"skip_metric_validation":{"type":"bool","optional":true}},"block_types":{"dimension":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true}}},"optional":true,"exactly_one_of":["criteria","dynamic_criteria","application_insights_web_test_location_availability_criteria"]}}}},"azurerm_monitor_private_link_scope":{"block":{"attributes":{"ingestion_access_mode":{"type":"string","optional":true,"default":"Open"},"name":{"type":"string","required":true},"query_access_mode":{"type":"string","optional":true,"default":"Open"},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_monitor_private_link_scoped_service":{"block":{"attributes":{"linked_resource_id":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"scope_name":{"type":"string","required":true}}}},"azurerm_monitor_scheduled_query_rules_alert":{"block":{"attributes":{"authorized_resource_ids":{"type":["set","string"],"optional":true},"auto_mitigation_enabled":{"type":"bool","optional":true,"default":false,"conflicts_with":["throttling"]},"data_source_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"enabled":{"type":"bool","optional":true,"default":true},"frequency":{"type":"number","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"query":{"type":"string","required":true},"query_type":{"type":"string","optional":true,"default":"ResultCount"},"resource_group_name":{"type":"string","required":true},"severity":{"type":"number","optional":true},"tags":{"type":["map","string"],"optional":true},"throttling":{"type":"number","optional":true,"conflicts_with":["auto_mitigation_enabled"]},"time_window":{"type":"number","required":true}},"block_types":{"action":{"nesting_mode":3,"block":{"attributes":{"action_group":{"type":["set","string"],"required":true},"custom_webhook_payload":{"type":"string","optional":true},"email_subject":{"type":"string","optional":true}}},"required":true},"trigger":{"nesting_mode":3,"block":{"attributes":{"operator":{"type":"string","required":true},"threshold":{"type":"number","required":true}},"block_types":{"metric_trigger":{"nesting_mode":3,"block":{"attributes":{"metric_column":{"type":"string","optional":true},"metric_trigger_type":{"type":"string","required":true},"operator":{"type":"string","required":true},"threshold":{"type":"number","required":true}}},"optional":true}}},"required":true}}}},"azurerm_monitor_scheduled_query_rules_alert_v2":{"block":{"attributes":{"auto_mitigation_enabled":{"type":"bool","optional":true,"default":false},"created_with_api_version":{"type":"string","computed":true},"description":{"type":"string","optional":true},"display_name":{"type":"string","optional":true},"enabled":{"type":"bool","optional":true,"default":true},"evaluation_frequency":{"type":"string","required":true},"is_a_legacy_log_analytics_rule":{"type":"bool","computed":true},"is_workspace_alerts_storage_configured":{"type":"bool","computed":true},"location":{"type":"string","required":true},"mute_actions_after_alert_duration":{"type":"string","optional":true},"name":{"type":"string","required":true},"query_time_range_override":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"scopes":{"type":["list","string"],"required":true},"severity":{"type":"number","required":true},"skip_query_validation":{"type":"bool","optional":true},"tags":{"type":["map","string"],"optional":true},"target_resource_types":{"type":["list","string"],"optional":true},"window_duration":{"type":"string","required":true},"workspace_alerts_storage_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"action":{"nesting_mode":3,"block":{"attributes":{"action_groups":{"type":["list","string"],"optional":true},"custom_properties":{"type":["map","string"],"optional":true}}},"optional":true},"criteria":{"nesting_mode":3,"block":{"attributes":{"metric_measure_column":{"type":"string","optional":true},"operator":{"type":"string","required":true},"query":{"type":"string","required":true},"resource_id_column":{"type":"string","optional":true},"threshold":{"type":"number","required":true},"time_aggregation_method":{"type":"string","required":true}},"block_types":{"dimension":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true},"failing_periods":{"nesting_mode":3,"block":{"attributes":{"minimum_failing_periods_to_trigger_alert":{"type":"number","required":true},"number_of_evaluation_periods":{"type":"number","required":true}}},"optional":true}}},"required":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_monitor_scheduled_query_rules_log":{"block":{"attributes":{"authorized_resource_ids":{"type":["set","string"],"optional":true},"data_source_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"criteria":{"nesting_mode":3,"block":{"attributes":{"metric_name":{"type":"string","required":true}},"block_types":{"dimension":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"operator":{"type":"string","optional":true,"default":"Include"},"values":{"type":["list","string"],"required":true}}},"required":true}}},"required":true}}}},"azurerm_monitor_smart_detector_alert_rule":{"block":{"attributes":{"description":{"type":"string","optional":true},"detector_type":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":true},"frequency":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"scope_resource_ids":{"type":["set","string"],"required":true},"severity":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"throttling_duration":{"type":"string","optional":true}},"block_types":{"action_group":{"nesting_mode":3,"block":{"attributes":{"email_subject":{"type":"string","optional":true},"ids":{"type":["set","string"],"required":true},"webhook_payload":{"type":"string","optional":true}}},"required":true}}}},"azurerm_monitor_workspace":{"block":{"attributes":{"default_data_collection_endpoint_id":{"type":"string","computed":true},"default_data_collection_rule_id":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"query_endpoint":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_mssql_database":{"block":{"attributes":{"auto_pause_delay_in_minutes":{"type":"number","optional":true,"computed":true},"collation":{"type":"string","optional":true,"computed":true},"create_mode":{"type":"string","optional":true,"default":"Default","conflicts_with":["import"]},"creation_source_database_id":{"type":"string","optional":true,"computed":true},"elastic_pool_id":{"type":"string","optional":true},"enclave_type":{"type":"string","optional":true,"computed":true},"geo_backup_enabled":{"type":"bool","optional":true,"default":true},"ledger_enabled":{"type":"bool","optional":true,"computed":true},"license_type":{"type":"string","optional":true,"computed":true},"maintenance_configuration_name":{"type":"string","optional":true,"computed":true,"conflicts_with":["elastic_pool_id"]},"max_size_gb":{"type":"number","optional":true,"computed":true},"min_capacity":{"type":"number","optional":true,"computed":true},"name":{"type":"string","required":true},"read_replica_count":{"type":"number","optional":true,"computed":true},"read_scale":{"type":"bool","optional":true,"computed":true},"recover_database_id":{"type":"string","optional":true},"recovery_point_id":{"type":"string","optional":true},"restore_dropped_database_id":{"type":"string","optional":true},"restore_long_term_retention_backup_id":{"type":"string","optional":true},"restore_point_in_time":{"type":"string","optional":true,"computed":true},"sample_name":{"type":"string","optional":true,"computed":true},"secondary_type":{"type":"string","optional":true,"computed":true},"server_id":{"type":"string","required":true},"sku_name":{"type":"string","optional":true,"computed":true},"storage_account_type":{"type":"string","optional":true,"default":"Geo"},"tags":{"type":["map","string"],"optional":true},"transparent_data_encryption_enabled":{"type":"bool","optional":true,"default":true},"transparent_data_encryption_key_automatic_rotation_enabled":{"type":"bool","optional":true,"default":false,"required_with":["transparent_data_encryption_key_vault_key_id"]},"transparent_data_encryption_key_vault_key_id":{"type":"string","optional":true},"zone_redundant":{"type":"bool","optional":true,"computed":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"required":true},"type":{"type":"string","required":true}}},"optional":true},"import":{"nesting_mode":3,"block":{"attributes":{"administrator_login":{"type":"string","required":true},"administrator_login_password":{"type":"string","required":true},"authentication_type":{"type":"string","required":true},"storage_account_id":{"type":"string","optional":true},"storage_key":{"type":"string","required":true},"storage_key_type":{"type":"string","required":true},"storage_uri":{"type":"string","required":true}}},"optional":true,"conflicts_with":["create_mode"]},"long_term_retention_policy":{"nesting_mode":3,"block":{"attributes":{"immutable_backups_enabled":{"type":"bool","optional":true,"default":false},"monthly_retention":{"type":"string","optional":true,"computed":true,"at_least_one_of":["long_term_retention_policy.0.weekly_retention","long_term_retention_policy.0.monthly_retention","long_term_retention_policy.0.yearly_retention","long_term_retention_policy.0.week_of_year"]},"week_of_year":{"type":"number","optional":true,"computed":true,"at_least_one_of":["long_term_retention_policy.0.weekly_retention","long_term_retention_policy.0.monthly_retention","long_term_retention_policy.0.yearly_retention","long_term_retention_policy.0.week_of_year"]},"weekly_retention":{"type":"string","optional":true,"computed":true,"at_least_one_of":["long_term_retention_policy.0.weekly_retention","long_term_retention_policy.0.monthly_retention","long_term_retention_policy.0.yearly_retention","long_term_retention_policy.0.week_of_year"]},"yearly_retention":{"type":"string","optional":true,"computed":true,"at_least_one_of":["long_term_retention_policy.0.weekly_retention","long_term_retention_policy.0.monthly_retention","long_term_retention_policy.0.yearly_retention","long_term_retention_policy.0.week_of_year"]}}},"optional":true,"computed":true},"short_term_retention_policy":{"nesting_mode":3,"block":{"attributes":{"backup_interval_in_hours":{"type":"number","optional":true,"computed":true},"retention_days":{"type":"number","required":true}}},"optional":true,"computed":true},"threat_detection_policy":{"nesting_mode":3,"block":{"attributes":{"disabled_alerts":{"type":["set","string"],"optional":true},"email_account_admins":{"type":"string","optional":true,"default":"Disabled"},"email_addresses":{"type":["set","string"],"optional":true},"retention_days":{"type":"number","optional":true},"state":{"type":"string","optional":true,"default":"Disabled"},"storage_account_access_key":{"type":"string","optional":true},"storage_endpoint":{"type":"string","optional":true}}},"optional":true,"computed":true}}}},"azurerm_mssql_database_extended_auditing_policy":{"block":{"attributes":{"database_id":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":true},"log_monitoring_enabled":{"type":"bool","optional":true,"default":true},"retention_in_days":{"type":"number","optional":true,"default":0},"storage_account_access_key":{"type":"string","optional":true},"storage_account_access_key_is_secondary":{"type":"bool","optional":true,"default":false},"storage_endpoint":{"type":"string","optional":true}}}},"azurerm_mssql_database_vulnerability_assessment_rule_baseline":{"block":{"attributes":{"baseline_name":{"type":"string","optional":true,"default":"default"},"database_name":{"type":"string","required":true},"rule_id":{"type":"string","required":true},"server_vulnerability_assessment_id":{"type":"string","required":true}},"block_types":{"baseline_result":{"nesting_mode":4,"block":{"attributes":{"result":{"type":["list","string"],"required":true}}},"required":true}}}},"azurerm_mssql_elasticpool":{"block":{"attributes":{"enclave_type":{"type":"string","optional":true,"computed":true},"license_type":{"type":"string","optional":true,"computed":true},"location":{"type":"string","required":true},"maintenance_configuration_name":{"type":"string","optional":true,"default":"SQL_Default"},"max_size_bytes":{"type":"number","optional":true,"computed":true,"conflicts_with":["max_size_gb"]},"max_size_gb":{"type":"number","optional":true,"computed":true,"conflicts_with":["max_size_bytes"]},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"server_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"zone_redundant":{"type":"bool","optional":true}},"block_types":{"per_database_settings":{"nesting_mode":3,"block":{"attributes":{"max_capacity":{"type":"number","required":true},"min_capacity":{"type":"number","required":true}}},"required":true},"sku":{"nesting_mode":3,"block":{"attributes":{"capacity":{"type":"number","required":true},"family":{"type":"string","optional":true},"name":{"type":"string","required":true},"tier":{"type":"string","required":true}}},"required":true}}}},"azurerm_mssql_failover_group":{"block":{"attributes":{"databases":{"type":["set","string"],"optional":true},"name":{"type":"string","required":true},"readonly_endpoint_failover_policy_enabled":{"type":"bool","optional":true,"computed":true},"server_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"partner_server":{"nesting_mode":3,"block":{"attributes":{"id":{"type":"string","required":true},"location":{"type":"string","computed":true},"role":{"type":"string","computed":true}}},"required":true},"read_write_endpoint_failover_policy":{"nesting_mode":3,"block":{"attributes":{"grace_minutes":{"type":"number","optional":true},"mode":{"type":"string","required":true}}},"required":true}}}},"azurerm_mssql_firewall_rule":{"block":{"attributes":{"end_ip_address":{"type":"string","required":true},"name":{"type":"string","required":true},"server_id":{"type":"string","required":true},"start_ip_address":{"type":"string","required":true}}}},"azurerm_mssql_job":{"block":{"attributes":{"description":{"type":"string","optional":true},"job_agent_id":{"type":"string","required":true},"name":{"type":"string","required":true}}}},"azurerm_mssql_job_agent":{"block":{"attributes":{"database_id":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_mssql_job_credential":{"block":{"attributes":{"job_agent_id":{"type":"string","required":true},"name":{"type":"string","required":true},"password":{"type":"string","required":true},"username":{"type":"string","required":true}}}},"azurerm_mssql_job_schedule":{"block":{"attributes":{"enabled":{"type":"bool","optional":true,"computed":true},"end_time":{"type":"string","optional":true,"computed":true},"interval":{"type":"string","optional":true},"job_id":{"type":"string","required":true},"start_time":{"type":"string","optional":true,"computed":true},"type":{"type":"string","required":true}}}},"azurerm_mssql_job_step":{"block":{"attributes":{"initial_retry_interval_seconds":{"type":"number","optional":true,"default":1},"job_credential_id":{"type":"string","required":true},"job_id":{"type":"string","required":true},"job_step_index":{"type":"number","required":true},"job_target_group_id":{"type":"string","required":true},"maximum_retry_interval_seconds":{"type":"number","optional":true,"default":120},"name":{"type":"string","required":true},"retry_attempts":{"type":"number","optional":true,"default":10},"retry_interval_backoff_multiplier":{"type":"number","optional":true,"default":2},"sql_script":{"type":"string","required":true},"timeout_seconds":{"type":"number","optional":true,"default":43200}},"block_types":{"output_target":{"nesting_mode":3,"block":{"attributes":{"job_credential_id":{"type":"string","required":true},"mssql_database_id":{"type":"string","required":true},"schema_name":{"type":"string","optional":true,"default":"dbo"},"table_name":{"type":"string","required":true}}},"optional":true}}}},"azurerm_mssql_job_target_group":{"block":{"attributes":{"job_agent_id":{"type":"string","required":true},"name":{"type":"string","required":true}},"block_types":{"job_target":{"nesting_mode":4,"block":{"attributes":{"database_name":{"type":"string","optional":true},"elastic_pool_name":{"type":"string","optional":true},"job_credential_id":{"type":"string","optional":true},"membership_type":{"type":"string","optional":true,"default":"Include"},"server_name":{"type":"string","required":true},"type":{"type":"string","computed":true}}},"optional":true}}}},"azurerm_mssql_managed_database":{"block":{"attributes":{"managed_instance_id":{"type":"string","required":true},"name":{"type":"string","required":true},"short_term_retention_days":{"type":"number","optional":true,"default":7},"tags":{"type":["map","string"],"optional":true}},"block_types":{"long_term_retention_policy":{"nesting_mode":3,"block":{"attributes":{"immutable_backups_enabled":{"type":"bool","optional":true,"default":false},"monthly_retention":{"type":"string","optional":true,"computed":true,"at_least_one_of":["long_term_retention_policy.0.weekly_retention","long_term_retention_policy.0.monthly_retention","long_term_retention_policy.0.yearly_retention","long_term_retention_policy.0.week_of_year"]},"week_of_year":{"type":"number","optional":true,"computed":true,"at_least_one_of":["long_term_retention_policy.0.weekly_retention","long_term_retention_policy.0.monthly_retention","long_term_retention_policy.0.yearly_retention","long_term_retention_policy.0.week_of_year"]},"weekly_retention":{"type":"string","optional":true,"computed":true,"at_least_one_of":["long_term_retention_policy.0.weekly_retention","long_term_retention_policy.0.monthly_retention","long_term_retention_policy.0.yearly_retention","long_term_retention_policy.0.week_of_year"]},"yearly_retention":{"type":"string","optional":true,"computed":true,"at_least_one_of":["long_term_retention_policy.0.weekly_retention","long_term_retention_policy.0.monthly_retention","long_term_retention_policy.0.yearly_retention","long_term_retention_policy.0.week_of_year"]}}},"optional":true,"computed":true},"point_in_time_restore":{"nesting_mode":3,"block":{"attributes":{"restore_point_in_time":{"type":"string","required":true},"source_database_id":{"type":"string","required":true}}},"optional":true}}}},"azurerm_mssql_managed_instance":{"block":{"attributes":{"administrator_login":{"type":"string","optional":true,"at_least_one_of":["administrator_login","azure_active_directory_administrator"],"required_with":["administrator_login","administrator_login_password"]},"administrator_login_password":{"type":"string","optional":true,"at_least_one_of":["administrator_login_password","azure_active_directory_administrator"],"required_with":["administrator_login","administrator_login_password"]},"collation":{"type":"string","optional":true,"default":"SQL_Latin1_General_CP1_CI_AS"},"dns_zone":{"type":"string","computed":true},"dns_zone_partner_id":{"type":"string","optional":true},"fqdn":{"type":"string","computed":true},"license_type":{"type":"string","required":true},"location":{"type":"string","required":true},"maintenance_configuration_name":{"type":"string","optional":true,"default":"SQL_Default"},"minimum_tls_version":{"type":"string","optional":true,"default":"1.2"},"name":{"type":"string","required":true},"proxy_override":{"type":"string","optional":true,"default":"Default"},"public_data_endpoint_enabled":{"type":"bool","optional":true,"default":false},"resource_group_name":{"type":"string","required":true},"service_principal_type":{"type":"string","optional":true},"sku_name":{"type":"string","required":true},"storage_account_type":{"type":"string","optional":true,"default":"GRS"},"storage_size_in_gb":{"type":"number","required":true},"subnet_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"timezone_id":{"type":"string","optional":true,"default":"UTC"},"vcores":{"type":"number","required":true},"zone_redundant_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"azure_active_directory_administrator":{"nesting_mode":3,"block":{"attributes":{"azuread_authentication_only_enabled":{"type":"bool","optional":true,"default":false},"login_username":{"type":"string","required":true},"object_id":{"type":"string","required":true},"principal_type":{"type":"string","required":true},"tenant_id":{"type":"string","optional":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_mssql_managed_instance_active_directory_administrator":{"block":{"attributes":{"azuread_authentication_only":{"type":"bool","optional":true},"login_username":{"type":"string","required":true},"managed_instance_id":{"type":"string","required":true},"object_id":{"type":"string","required":true},"tenant_id":{"type":"string","required":true}}}},"azurerm_mssql_managed_instance_failover_group":{"block":{"attributes":{"location":{"type":"string","required":true},"managed_instance_id":{"type":"string","required":true},"name":{"type":"string","required":true},"partner_managed_instance_id":{"type":"string","required":true},"partner_region":{"type":["list",["object",{"location":"string","role":"string"}]],"computed":true},"readonly_endpoint_failover_policy_enabled":{"type":"bool","optional":true,"default":true},"role":{"type":"string","computed":true},"secondary_type":{"type":"string","optional":true,"default":"Geo"}},"block_types":{"read_write_endpoint_failover_policy":{"nesting_mode":3,"block":{"attributes":{"grace_minutes":{"type":"number","optional":true},"mode":{"type":"string","required":true}}},"required":true}}}},"azurerm_mssql_managed_instance_security_alert_policy":{"block":{"attributes":{"disabled_alerts":{"type":["set","string"],"optional":true},"email_account_admins_enabled":{"type":"bool","optional":true,"default":false},"email_addresses":{"type":["set","string"],"optional":true},"enabled":{"type":"bool","optional":true},"managed_instance_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"retention_days":{"type":"number","optional":true,"default":0},"storage_account_access_key":{"type":"string","optional":true},"storage_endpoint":{"type":"string","optional":true}}}},"azurerm_mssql_managed_instance_transparent_data_encryption":{"block":{"attributes":{"auto_rotation_enabled":{"type":"bool","optional":true,"default":false},"key_vault_key_id":{"type":"string","optional":true,"conflicts_with":["managed_hsm_key_id"]},"managed_hsm_key_id":{"type":"string","optional":true,"conflicts_with":["key_vault_key_id"]},"managed_instance_id":{"type":"string","required":true}}}},"azurerm_mssql_managed_instance_vulnerability_assessment":{"block":{"attributes":{"managed_instance_id":{"type":"string","required":true},"storage_account_access_key":{"type":"string","optional":true},"storage_container_path":{"type":"string","required":true},"storage_container_sas_key":{"type":"string","optional":true}},"block_types":{"recurring_scans":{"nesting_mode":3,"block":{"attributes":{"email_subscription_admins":{"type":"bool","optional":true,"default":true},"emails":{"type":["list","string"],"optional":true},"enabled":{"type":"bool","optional":true,"default":false}}},"optional":true,"computed":true}}}},"azurerm_mssql_outbound_firewall_rule":{"block":{"attributes":{"name":{"type":"string","required":true},"server_id":{"type":"string","required":true}}}},"azurerm_mssql_server":{"block":{"attributes":{"administrator_login":{"type":"string","optional":true,"computed":true,"at_least_one_of":["administrator_login","azuread_administrator.0.azuread_authentication_only"],"required_with":["administrator_login","administrator_login_password"]},"administrator_login_password":{"type":"string","optional":true,"at_least_one_of":["administrator_login_password","azuread_administrator.0.azuread_authentication_only"],"required_with":["administrator_login","administrator_login_password"]},"connection_policy":{"type":"string","optional":true,"default":"Default"},"fully_qualified_domain_name":{"type":"string","computed":true},"location":{"type":"string","required":true},"minimum_tls_version":{"type":"string","optional":true,"default":"1.2"},"name":{"type":"string","required":true},"outbound_network_restriction_enabled":{"type":"bool","optional":true,"default":false},"primary_user_assigned_identity_id":{"type":"string","optional":true,"computed":true,"required_with":["identity"]},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"restorable_dropped_database_ids":{"type":["list","string"],"computed":true},"tags":{"type":["map","string"],"optional":true},"transparent_data_encryption_key_vault_key_id":{"type":"string","optional":true},"version":{"type":"string","required":true}},"block_types":{"azuread_administrator":{"nesting_mode":3,"block":{"attributes":{"azuread_authentication_only":{"type":"bool","optional":true,"computed":true},"login_username":{"type":"string","required":true},"object_id":{"type":"string","required":true},"tenant_id":{"type":"string","optional":true,"computed":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_mssql_server_dns_alias":{"block":{"attributes":{"dns_record":{"type":"string","computed":true},"mssql_server_id":{"type":"string","required":true},"name":{"type":"string","required":true}}}},"azurerm_mssql_server_extended_auditing_policy":{"block":{"attributes":{"audit_actions_and_groups":{"type":["list","string"],"optional":true,"computed":true},"enabled":{"type":"bool","optional":true,"default":true},"log_monitoring_enabled":{"type":"bool","optional":true,"default":true},"predicate_expression":{"type":"string","optional":true},"retention_in_days":{"type":"number","optional":true,"default":0},"server_id":{"type":"string","required":true},"storage_account_access_key":{"type":"string","optional":true},"storage_account_access_key_is_secondary":{"type":"bool","optional":true,"default":false},"storage_account_subscription_id":{"type":"string","optional":true},"storage_endpoint":{"type":"string","optional":true}}}},"azurerm_mssql_server_microsoft_support_auditing_policy":{"block":{"attributes":{"blob_storage_endpoint":{"type":"string","optional":true},"enabled":{"type":"bool","optional":true,"default":true},"log_monitoring_enabled":{"type":"bool","optional":true,"default":true},"server_id":{"type":"string","required":true},"storage_account_access_key":{"type":"string","optional":true},"storage_account_subscription_id":{"type":"string","optional":true}}}},"azurerm_mssql_server_security_alert_policy":{"block":{"attributes":{"disabled_alerts":{"type":["set","string"],"optional":true},"email_account_admins":{"type":"bool","optional":true,"default":false},"email_addresses":{"type":["set","string"],"optional":true},"resource_group_name":{"type":"string","required":true},"retention_days":{"type":"number","optional":true,"default":0},"server_name":{"type":"string","required":true},"state":{"type":"string","required":true},"storage_account_access_key":{"type":"string","optional":true},"storage_endpoint":{"type":"string","optional":true}}}},"azurerm_mssql_server_transparent_data_encryption":{"block":{"attributes":{"auto_rotation_enabled":{"type":"bool","optional":true,"default":false},"key_vault_key_id":{"type":"string","optional":true,"conflicts_with":["managed_hsm_key_id"]},"managed_hsm_key_id":{"type":"string","optional":true,"conflicts_with":["key_vault_key_id"]},"server_id":{"type":"string","required":true}}}},"azurerm_mssql_server_vulnerability_assessment":{"block":{"attributes":{"server_security_alert_policy_id":{"type":"string","required":true},"storage_account_access_key":{"type":"string","optional":true},"storage_container_path":{"type":"string","required":true},"storage_container_sas_key":{"type":"string","optional":true}},"block_types":{"recurring_scans":{"nesting_mode":3,"block":{"attributes":{"email_subscription_admins":{"type":"bool","optional":true,"default":false},"emails":{"type":["list","string"],"optional":true},"enabled":{"type":"bool","optional":true,"default":false}}},"optional":true,"computed":true}}}},"azurerm_mssql_virtual_machine":{"block":{"attributes":{"r_services_enabled":{"type":"bool","optional":true},"sql_connectivity_port":{"type":"number","optional":true,"default":1433},"sql_connectivity_type":{"type":"string","optional":true,"default":"PRIVATE"},"sql_connectivity_update_password":{"type":"string","optional":true},"sql_connectivity_update_username":{"type":"string","optional":true},"sql_license_type":{"type":"string","optional":true},"sql_virtual_machine_group_id":{"type":"string","optional":true},"tags":{"type":["map","string"],"optional":true},"virtual_machine_id":{"type":"string","required":true}},"block_types":{"assessment":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"run_immediately":{"type":"bool","optional":true,"default":false}},"block_types":{"schedule":{"nesting_mode":3,"block":{"attributes":{"day_of_week":{"type":"string","required":true},"monthly_occurrence":{"type":"number","optional":true,"exactly_one_of":["assessment.0.schedule.0.weekly_interval"]},"start_time":{"type":"string","required":true},"weekly_interval":{"type":"number","optional":true,"exactly_one_of":["assessment.0.schedule.0.monthly_occurrence"]}}},"optional":true}}},"optional":true},"auto_backup":{"nesting_mode":3,"block":{"attributes":{"encryption_enabled":{"type":"bool","optional":true,"computed":true},"encryption_password":{"type":"string","optional":true},"retention_period_in_days":{"type":"number","required":true},"storage_account_access_key":{"type":"string","required":true},"storage_blob_endpoint":{"type":"string","required":true},"system_databases_backup_enabled":{"type":"bool","optional":true}},"block_types":{"manual_schedule":{"nesting_mode":3,"block":{"attributes":{"days_of_week":{"type":["set","string"],"optional":true},"full_backup_frequency":{"type":"string","required":true},"full_backup_start_hour":{"type":"number","required":true},"full_backup_window_in_hours":{"type":"number","required":true},"log_backup_frequency_in_minutes":{"type":"number","required":true}}},"optional":true}}},"optional":true},"auto_patching":{"nesting_mode":3,"block":{"attributes":{"day_of_week":{"type":"string","required":true},"maintenance_window_duration_in_minutes":{"type":"number","required":true},"maintenance_window_starting_hour":{"type":"number","required":true}}},"optional":true},"key_vault_credential":{"nesting_mode":3,"block":{"attributes":{"key_vault_url":{"type":"string","required":true},"name":{"type":"string","required":true},"service_principal_name":{"type":"string","required":true},"service_principal_secret":{"type":"string","required":true}}},"optional":true},"sql_instance":{"nesting_mode":3,"block":{"attributes":{"adhoc_workloads_optimization_enabled":{"type":"bool","optional":true,"default":false},"collation":{"type":"string","optional":true,"default":"SQL_Latin1_General_CP1_CI_AS"},"instant_file_initialization_enabled":{"type":"bool","optional":true,"default":false},"lock_pages_in_memory_enabled":{"type":"bool","optional":true,"default":false},"max_dop":{"type":"number","optional":true,"default":0},"max_server_memory_mb":{"type":"number","optional":true,"default":2147483647},"min_server_memory_mb":{"type":"number","optional":true,"default":0}}},"optional":true},"storage_configuration":{"nesting_mode":3,"block":{"attributes":{"disk_type":{"type":"string","required":true},"storage_workload_type":{"type":"string","required":true},"system_db_on_data_disk_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"data_settings":{"nesting_mode":3,"block":{"attributes":{"default_file_path":{"type":"string","required":true},"luns":{"type":["list","number"],"required":true}}},"optional":true},"log_settings":{"nesting_mode":3,"block":{"attributes":{"default_file_path":{"type":"string","required":true},"luns":{"type":["list","number"],"required":true}}},"optional":true},"temp_db_settings":{"nesting_mode":3,"block":{"attributes":{"data_file_count":{"type":"number","optional":true,"default":8},"data_file_growth_in_mb":{"type":"number","optional":true,"default":512},"data_file_size_mb":{"type":"number","optional":true,"default":256},"default_file_path":{"type":"string","required":true},"log_file_growth_mb":{"type":"number","optional":true,"default":512},"log_file_size_mb":{"type":"number","optional":true,"default":256},"luns":{"type":["list","number"],"required":true}}},"optional":true}}},"optional":true},"wsfc_domain_credential":{"nesting_mode":3,"block":{"attributes":{"cluster_bootstrap_account_password":{"type":"string","required":true},"cluster_operator_account_password":{"type":"string","required":true},"sql_service_account_password":{"type":"string","required":true}}},"optional":true}}}},"azurerm_mssql_virtual_machine_availability_group_listener":{"block":{"attributes":{"availability_group_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"port":{"type":"number","optional":true},"sql_virtual_machine_group_id":{"type":"string","required":true}},"block_types":{"load_balancer_configuration":{"nesting_mode":3,"block":{"attributes":{"load_balancer_id":{"type":"string","required":true},"private_ip_address":{"type":"string","required":true},"probe_port":{"type":"number","required":true},"sql_virtual_machine_ids":{"type":["set","string"],"required":true},"subnet_id":{"type":"string","required":true}}},"optional":true,"exactly_one_of":["load_balancer_configuration","multi_subnet_ip_configuration"]},"multi_subnet_ip_configuration":{"nesting_mode":4,"block":{"attributes":{"private_ip_address":{"type":"string","required":true},"sql_virtual_machine_id":{"type":"string","required":true},"subnet_id":{"type":"string","required":true}}},"optional":true,"exactly_one_of":["load_balancer_configuration","multi_subnet_ip_configuration"]},"replica":{"nesting_mode":4,"block":{"attributes":{"commit":{"type":"string","required":true},"failover_mode":{"type":"string","required":true},"readable_secondary":{"type":"string","required":true},"role":{"type":"string","required":true},"sql_virtual_machine_id":{"type":"string","required":true}}},"required":true}}}},"azurerm_mssql_virtual_machine_group":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"sql_image_offer":{"type":"string","required":true},"sql_image_sku":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"wsfc_domain_profile":{"nesting_mode":3,"block":{"attributes":{"cluster_bootstrap_account_name":{"type":"string","optional":true},"cluster_operator_account_name":{"type":"string","optional":true},"cluster_subnet_type":{"type":"string","required":true},"fqdn":{"type":"string","required":true},"organizational_unit_path":{"type":"string","optional":true},"sql_service_account_name":{"type":"string","optional":true},"storage_account_primary_key":{"type":"string","optional":true},"storage_account_url":{"type":"string","optional":true}}},"required":true}}}},"azurerm_mssql_virtual_network_rule":{"block":{"attributes":{"ignore_missing_vnet_service_endpoint":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"server_id":{"type":"string","required":true},"subnet_id":{"type":"string","required":true}}}},"azurerm_mysql_flexible_database":{"block":{"attributes":{"charset":{"type":"string","required":true},"collation":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"server_name":{"type":"string","required":true}}}},"azurerm_mysql_flexible_server":{"block":{"attributes":{"administrator_login":{"type":"string","optional":true,"computed":true},"administrator_password":{"type":"string","optional":true},"backup_retention_days":{"type":"number","optional":true,"default":7},"create_mode":{"type":"string","optional":true},"delegated_subnet_id":{"type":"string","optional":true},"fqdn":{"type":"string","computed":true},"geo_redundant_backup_enabled":{"type":"bool","optional":true,"default":false},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"point_in_time_restore_time_in_utc":{"type":"string","optional":true},"private_dns_zone_id":{"type":"string","optional":true},"public_network_access_enabled":{"type":"bool","computed":true},"replica_capacity":{"type":"number","computed":true},"replication_role":{"type":"string","optional":true,"computed":true},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","optional":true,"computed":true},"source_server_id":{"type":"string","optional":true},"tags":{"type":["map","string"],"optional":true},"version":{"type":"string","optional":true,"computed":true},"zone":{"type":"string","optional":true}},"block_types":{"customer_managed_key":{"nesting_mode":3,"block":{"attributes":{"geo_backup_key_vault_key_id":{"type":"string","optional":true,"required_with":["identity","customer_managed_key.0.geo_backup_user_assigned_identity_id"]},"geo_backup_user_assigned_identity_id":{"type":"string","optional":true},"key_vault_key_id":{"type":"string","optional":true,"required_with":["identity","customer_managed_key.0.primary_user_assigned_identity_id"]},"primary_user_assigned_identity_id":{"type":"string","optional":true}}},"optional":true},"high_availability":{"nesting_mode":3,"block":{"attributes":{"mode":{"type":"string","required":true},"standby_availability_zone":{"type":"string","optional":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"required":true},"type":{"type":"string","required":true}}},"optional":true},"maintenance_window":{"nesting_mode":3,"block":{"attributes":{"day_of_week":{"type":"number","optional":true,"default":0},"start_hour":{"type":"number","optional":true,"default":0},"start_minute":{"type":"number","optional":true,"default":0}}},"optional":true},"storage":{"nesting_mode":3,"block":{"attributes":{"auto_grow_enabled":{"type":"bool","optional":true,"default":true},"io_scaling_enabled":{"type":"bool","optional":true,"default":false},"iops":{"type":"number","optional":true,"computed":true},"size_gb":{"type":"number","optional":true,"computed":true}}},"optional":true,"computed":true}}}},"azurerm_mysql_flexible_server_active_directory_administrator":{"block":{"attributes":{"identity_id":{"type":"string","required":true},"login":{"type":"string","required":true},"object_id":{"type":"string","required":true},"server_id":{"type":"string","required":true},"tenant_id":{"type":"string","required":true}}}},"azurerm_mysql_flexible_server_configuration":{"block":{"attributes":{"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"server_name":{"type":"string","required":true},"value":{"type":"string","required":true}}}},"azurerm_mysql_flexible_server_firewall_rule":{"block":{"attributes":{"end_ip_address":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"server_name":{"type":"string","required":true},"start_ip_address":{"type":"string","required":true}}}},"azurerm_nat_gateway":{"block":{"attributes":{"idle_timeout_in_minutes":{"type":"number","optional":true,"default":4},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"resource_guid":{"type":"string","computed":true},"sku_name":{"type":"string","optional":true,"default":"Standard"},"tags":{"type":["map","string"],"optional":true},"zones":{"type":["set","string"],"optional":true}}}},"azurerm_nat_gateway_public_ip_association":{"block":{"attributes":{"nat_gateway_id":{"type":"string","required":true},"public_ip_address_id":{"type":"string","required":true}}}},"azurerm_nat_gateway_public_ip_prefix_association":{"block":{"attributes":{"nat_gateway_id":{"type":"string","required":true},"public_ip_prefix_id":{"type":"string","required":true}}}},"azurerm_netapp_account":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"active_directory":{"nesting_mode":3,"block":{"attributes":{"aes_encryption_enabled":{"type":"bool","optional":true,"default":false},"dns_servers":{"type":["list","string"],"required":true},"domain":{"type":"string","required":true},"kerberos_ad_name":{"type":"string","optional":true},"kerberos_kdc_ip":{"type":"string","optional":true},"ldap_over_tls_enabled":{"type":"bool","optional":true,"default":false,"required_with":["active_directory.0.server_root_ca_certificate"]},"ldap_signing_enabled":{"type":"bool","optional":true,"default":false},"local_nfs_users_with_ldap_allowed":{"type":"bool","optional":true,"default":false},"organizational_unit":{"type":"string","optional":true,"default":"CN=Computers"},"password":{"type":"string","required":true},"server_root_ca_certificate":{"type":"string","optional":true,"required_with":["active_directory.0.ldap_over_tls_enabled"]},"site_name":{"type":"string","optional":true,"default":"Default-First-Site-Name"},"smb_server_name":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_netapp_account_encryption":{"block":{"attributes":{"encryption_key":{"type":"string","required":true},"netapp_account_id":{"type":"string","required":true},"system_assigned_identity_principal_id":{"type":"string","optional":true,"conflicts_with":["user_assigned_identity_id"]},"user_assigned_identity_id":{"type":"string","optional":true,"conflicts_with":["system_assigned_identity_principal_id"]}}}},"azurerm_netapp_backup_policy":{"block":{"attributes":{"account_name":{"type":"string","required":true},"daily_backups_to_keep":{"type":"number","optional":true,"default":2},"enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"monthly_backups_to_keep":{"type":"number","optional":true,"default":1},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"weekly_backups_to_keep":{"type":"number","optional":true,"default":1}}}},"azurerm_netapp_backup_vault":{"block":{"attributes":{"account_name":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_netapp_pool":{"block":{"attributes":{"account_name":{"type":"string","required":true},"encryption_type":{"type":"string","optional":true,"default":"Single"},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"qos_type":{"type":"string","optional":true,"default":"Auto"},"resource_group_name":{"type":"string","required":true},"service_level":{"type":"string","required":true},"size_in_tb":{"type":"number","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_netapp_snapshot":{"block":{"attributes":{"account_name":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"pool_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"volume_name":{"type":"string","required":true}}}},"azurerm_netapp_snapshot_policy":{"block":{"attributes":{"account_name":{"type":"string","required":true},"enabled":{"type":"bool","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"daily_schedule":{"nesting_mode":3,"block":{"attributes":{"hour":{"type":"number","required":true},"minute":{"type":"number","required":true},"snapshots_to_keep":{"type":"number","required":true}}},"optional":true},"hourly_schedule":{"nesting_mode":3,"block":{"attributes":{"minute":{"type":"number","required":true},"snapshots_to_keep":{"type":"number","required":true}}},"optional":true},"monthly_schedule":{"nesting_mode":3,"block":{"attributes":{"days_of_month":{"type":["set","number"],"required":true},"hour":{"type":"number","required":true},"minute":{"type":"number","required":true},"snapshots_to_keep":{"type":"number","required":true}}},"optional":true},"weekly_schedule":{"nesting_mode":3,"block":{"attributes":{"days_of_week":{"type":["set","string"],"required":true},"hour":{"type":"number","required":true},"minute":{"type":"number","required":true},"snapshots_to_keep":{"type":"number","required":true}}},"optional":true}}}},"azurerm_netapp_volume":{"block":{"attributes":{"account_name":{"type":"string","required":true},"azure_vmware_data_store_enabled":{"type":"bool","optional":true,"default":false},"create_from_snapshot_resource_id":{"type":"string","optional":true},"encryption_key_source":{"type":"string","optional":true,"computed":true},"kerberos_enabled":{"type":"bool","optional":true},"key_vault_private_endpoint_id":{"type":"string","optional":true,"computed":true,"required_with":["encryption_key_source"]},"location":{"type":"string","required":true},"mount_ip_addresses":{"type":["list","string"],"computed":true},"name":{"type":"string","required":true},"network_features":{"type":"string","optional":true,"computed":true},"pool_name":{"type":"string","required":true},"protocols":{"type":["set","string"],"optional":true,"computed":true},"resource_group_name":{"type":"string","required":true},"security_style":{"type":"string","optional":true,"computed":true},"service_level":{"type":"string","required":true},"smb3_protocol_encryption_enabled":{"type":"bool","optional":true},"smb_access_based_enumeration_enabled":{"type":"bool","optional":true,"default":false},"smb_continuous_availability_enabled":{"type":"bool","optional":true},"smb_non_browsable_enabled":{"type":"bool","optional":true,"default":false},"snapshot_directory_visible":{"type":"bool","optional":true,"default":true},"storage_quota_in_gb":{"type":"number","required":true},"subnet_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"throughput_in_mibps":{"type":"number","optional":true,"computed":true},"volume_path":{"type":"string","required":true},"zone":{"type":"string","optional":true}},"block_types":{"data_protection_backup_policy":{"nesting_mode":3,"block":{"attributes":{"backup_policy_id":{"type":"string","required":true},"backup_vault_id":{"type":"string","required":true},"policy_enabled":{"type":"bool","optional":true,"default":true}}},"optional":true},"data_protection_replication":{"nesting_mode":3,"block":{"attributes":{"endpoint_type":{"type":"string","optional":true,"default":"dst"},"remote_volume_location":{"type":"string","required":true},"remote_volume_resource_id":{"type":"string","required":true},"replication_frequency":{"type":"string","required":true}}},"optional":true},"data_protection_snapshot_policy":{"nesting_mode":3,"block":{"attributes":{"snapshot_policy_id":{"type":"string","required":true}}},"optional":true},"export_policy_rule":{"nesting_mode":3,"block":{"attributes":{"allowed_clients":{"type":["set","string"],"required":true},"kerberos_5_read_only_enabled":{"type":"bool","optional":true},"kerberos_5_read_write_enabled":{"type":"bool","optional":true},"kerberos_5i_read_only_enabled":{"type":"bool","optional":true},"kerberos_5i_read_write_enabled":{"type":"bool","optional":true},"kerberos_5p_read_only_enabled":{"type":"bool","optional":true},"kerberos_5p_read_write_enabled":{"type":"bool","optional":true},"protocols_enabled":{"type":["list","string"],"optional":true},"root_access_enabled":{"type":"bool","optional":true},"rule_index":{"type":"number","required":true},"unix_read_only":{"type":"bool","optional":true},"unix_read_write":{"type":"bool","optional":true}}},"optional":true}}}},"azurerm_netapp_volume_group_oracle":{"block":{"attributes":{"account_name":{"type":"string","required":true},"application_identifier":{"type":"string","required":true},"group_description":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}},"block_types":{"volume":{"nesting_mode":3,"block":{"attributes":{"capacity_pool_id":{"type":"string","required":true},"encryption_key_source":{"type":"string","optional":true,"computed":true},"id":{"type":"string","computed":true},"key_vault_private_endpoint_id":{"type":"string","optional":true,"computed":true},"mount_ip_addresses":{"type":["list","string"],"computed":true},"name":{"type":"string","required":true},"network_features":{"type":"string","optional":true,"computed":true},"protocols":{"type":["list","string"],"required":true},"proximity_placement_group_id":{"type":"string","optional":true},"security_style":{"type":"string","required":true},"service_level":{"type":"string","required":true},"snapshot_directory_visible":{"type":"bool","required":true},"storage_quota_in_gb":{"type":"number","required":true},"subnet_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"throughput_in_mibps":{"type":"number","required":true},"volume_path":{"type":"string","required":true},"volume_spec_name":{"type":"string","required":true},"zone":{"type":"string","optional":true}},"block_types":{"data_protection_snapshot_policy":{"nesting_mode":3,"block":{"attributes":{"snapshot_policy_id":{"type":"string","required":true}}},"optional":true,"computed":true},"export_policy_rule":{"nesting_mode":3,"block":{"attributes":{"allowed_clients":{"type":"string","required":true},"nfsv3_enabled":{"type":"bool","required":true},"nfsv41_enabled":{"type":"bool","required":true},"root_access_enabled":{"type":"bool","optional":true,"default":true},"rule_index":{"type":"number","required":true},"unix_read_only":{"type":"bool","optional":true,"default":false},"unix_read_write":{"type":"bool","optional":true,"default":true}}},"required":true}}},"required":true}}}},"azurerm_netapp_volume_group_sap_hana":{"block":{"attributes":{"account_name":{"type":"string","required":true},"application_identifier":{"type":"string","required":true},"group_description":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}},"block_types":{"volume":{"nesting_mode":3,"block":{"attributes":{"capacity_pool_id":{"type":"string","required":true},"id":{"type":"string","computed":true},"mount_ip_addresses":{"type":["list","string"],"computed":true},"name":{"type":"string","required":true},"protocols":{"type":["list","string"],"required":true},"proximity_placement_group_id":{"type":"string","optional":true},"security_style":{"type":"string","required":true},"service_level":{"type":"string","required":true},"snapshot_directory_visible":{"type":"bool","required":true},"storage_quota_in_gb":{"type":"number","required":true},"subnet_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"throughput_in_mibps":{"type":"number","required":true},"volume_path":{"type":"string","required":true},"volume_spec_name":{"type":"string","required":true}},"block_types":{"data_protection_replication":{"nesting_mode":3,"block":{"attributes":{"endpoint_type":{"type":"string","optional":true,"default":"dst"},"remote_volume_location":{"type":"string","required":true},"remote_volume_resource_id":{"type":"string","required":true},"replication_frequency":{"type":"string","required":true}}},"optional":true},"data_protection_snapshot_policy":{"nesting_mode":3,"block":{"attributes":{"snapshot_policy_id":{"type":"string","required":true}}},"optional":true,"computed":true},"export_policy_rule":{"nesting_mode":3,"block":{"attributes":{"allowed_clients":{"type":"string","required":true},"nfsv3_enabled":{"type":"bool","required":true},"nfsv41_enabled":{"type":"bool","required":true},"root_access_enabled":{"type":"bool","optional":true,"default":true},"rule_index":{"type":"number","required":true},"unix_read_only":{"type":"bool","optional":true,"default":false},"unix_read_write":{"type":"bool","optional":true,"default":true}}},"required":true}}},"required":true}}}},"azurerm_netapp_volume_quota_rule":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"quota_size_in_kib":{"type":"number","required":true},"quota_target":{"type":"string","optional":true},"quota_type":{"type":"string","required":true},"volume_id":{"type":"string","required":true}}}},"azurerm_network_connection_monitor":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"network_watcher_id":{"type":"string","required":true},"notes":{"type":"string","optional":true},"output_workspace_resource_ids":{"type":["set","string"],"optional":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"endpoint":{"nesting_mode":4,"block":{"attributes":{"address":{"type":"string","optional":true},"coverage_level":{"type":"string","optional":true},"excluded_ip_addresses":{"type":["set","string"],"optional":true},"included_ip_addresses":{"type":["set","string"],"optional":true},"name":{"type":"string","required":true},"target_resource_id":{"type":"string","optional":true},"target_resource_type":{"type":"string","optional":true}},"block_types":{"filter":{"nesting_mode":3,"block":{"attributes":{"type":{"type":"string","optional":true,"default":"Include"}},"block_types":{"item":{"nesting_mode":4,"block":{"attributes":{"address":{"type":"string","optional":true},"type":{"type":"string","optional":true,"default":"AgentAddress"}}},"optional":true}}},"optional":true}}},"required":true},"test_configuration":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"preferred_ip_version":{"type":"string","optional":true},"protocol":{"type":"string","required":true},"test_frequency_in_seconds":{"type":"number","optional":true,"default":60}},"block_types":{"http_configuration":{"nesting_mode":3,"block":{"attributes":{"method":{"type":"string","optional":true,"default":"Get"},"path":{"type":"string","optional":true},"port":{"type":"number","optional":true},"prefer_https":{"type":"bool","optional":true,"default":false},"valid_status_code_ranges":{"type":["set","string"],"optional":true}},"block_types":{"request_header":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true},"icmp_configuration":{"nesting_mode":3,"block":{"attributes":{"trace_route_enabled":{"type":"bool","optional":true,"default":true}}},"optional":true},"success_threshold":{"nesting_mode":3,"block":{"attributes":{"checks_failed_percent":{"type":"number","optional":true},"round_trip_time_ms":{"type":"number","optional":true}}},"optional":true},"tcp_configuration":{"nesting_mode":3,"block":{"attributes":{"destination_port_behavior":{"type":"string","optional":true},"port":{"type":"number","required":true},"trace_route_enabled":{"type":"bool","optional":true,"default":true}}},"optional":true}}},"required":true},"test_group":{"nesting_mode":4,"block":{"attributes":{"destination_endpoints":{"type":["set","string"],"required":true},"enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"source_endpoints":{"type":["set","string"],"required":true},"test_configuration_names":{"type":["set","string"],"required":true}}},"required":true}}}},"azurerm_network_ddos_protection_plan":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"virtual_network_ids":{"type":["list","string"],"computed":true}}}},"azurerm_network_function_azure_traffic_collector":{"block":{"attributes":{"collector_policy_ids":{"type":["list","string"],"computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"virtual_hub_id":{"type":["list","string"],"computed":true}}}},"azurerm_network_function_collector_policy":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"traffic_collector_id":{"type":"string","required":true}},"block_types":{"ipfx_emission":{"nesting_mode":3,"block":{"attributes":{"destination_types":{"type":["list","string"],"required":true}}},"required":true},"ipfx_ingestion":{"nesting_mode":3,"block":{"attributes":{"source_resource_ids":{"type":["set","string"],"required":true}}},"required":true}}}},"azurerm_network_interface":{"block":{"attributes":{"accelerated_networking_enabled":{"type":"bool","optional":true,"default":false},"applied_dns_servers":{"type":["list","string"],"computed":true},"auxiliary_mode":{"type":"string","optional":true,"required_with":["auxiliary_sku"]},"auxiliary_sku":{"type":"string","optional":true,"required_with":["auxiliary_mode"]},"dns_servers":{"type":["list","string"],"optional":true},"edge_zone":{"type":"string","optional":true},"internal_dns_name_label":{"type":"string","optional":true},"internal_domain_name_suffix":{"type":"string","computed":true},"ip_forwarding_enabled":{"type":"bool","optional":true,"default":false},"location":{"type":"string","required":true},"mac_address":{"type":"string","computed":true},"name":{"type":"string","required":true},"private_ip_address":{"type":"string","computed":true},"private_ip_addresses":{"type":["list","string"],"computed":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"virtual_machine_id":{"type":"string","computed":true}},"block_types":{"ip_configuration":{"nesting_mode":3,"block":{"attributes":{"gateway_load_balancer_frontend_ip_configuration_id":{"type":"string","optional":true,"computed":true},"name":{"type":"string","required":true},"primary":{"type":"bool","optional":true,"computed":true},"private_ip_address":{"type":"string","optional":true,"computed":true},"private_ip_address_allocation":{"type":"string","required":true},"private_ip_address_version":{"type":"string","optional":true,"default":"IPv4"},"public_ip_address_id":{"type":"string","optional":true},"subnet_id":{"type":"string","optional":true}}},"required":true}}}},"azurerm_network_interface_application_gateway_backend_address_pool_association":{"block":{"attributes":{"backend_address_pool_id":{"type":"string","required":true},"ip_configuration_name":{"type":"string","required":true},"network_interface_id":{"type":"string","required":true}}}},"azurerm_network_interface_application_security_group_association":{"block":{"attributes":{"application_security_group_id":{"type":"string","required":true},"network_interface_id":{"type":"string","required":true}}}},"azurerm_network_interface_backend_address_pool_association":{"block":{"attributes":{"backend_address_pool_id":{"type":"string","required":true},"ip_configuration_name":{"type":"string","required":true},"network_interface_id":{"type":"string","required":true}}}},"azurerm_network_interface_nat_rule_association":{"block":{"attributes":{"ip_configuration_name":{"type":"string","required":true},"nat_rule_id":{"type":"string","required":true},"network_interface_id":{"type":"string","required":true}}}},"azurerm_network_interface_security_group_association":{"block":{"attributes":{"network_interface_id":{"type":"string","required":true},"network_security_group_id":{"type":"string","required":true}}}},"azurerm_network_manager":{"block":{"attributes":{"cross_tenant_scopes":{"type":["list",["object",{"management_groups":["list","string"],"subscriptions":["list","string"],"tenant_id":"string"}]],"computed":true},"description":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"scope_accesses":{"type":["list","string"],"required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"scope":{"nesting_mode":3,"block":{"attributes":{"management_group_ids":{"type":["list","string"],"optional":true,"at_least_one_of":["scope.0.management_group_ids","scope.0.subscription_ids"]},"subscription_ids":{"type":["list","string"],"optional":true,"at_least_one_of":["scope.0.management_group_ids","scope.0.subscription_ids"]}}},"required":true}}}},"azurerm_network_manager_admin_rule":{"block":{"attributes":{"action":{"type":"string","required":true},"admin_rule_collection_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"destination_port_ranges":{"type":["list","string"],"optional":true},"direction":{"type":"string","required":true},"name":{"type":"string","required":true},"priority":{"type":"number","required":true},"protocol":{"type":"string","required":true},"source_port_ranges":{"type":["list","string"],"optional":true}},"block_types":{"destination":{"nesting_mode":3,"block":{"attributes":{"address_prefix":{"type":"string","required":true},"address_prefix_type":{"type":"string","required":true}}},"optional":true},"source":{"nesting_mode":3,"block":{"attributes":{"address_prefix":{"type":"string","required":true},"address_prefix_type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_network_manager_admin_rule_collection":{"block":{"attributes":{"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"network_group_ids":{"type":["list","string"],"required":true},"security_admin_configuration_id":{"type":"string","required":true}}}},"azurerm_network_manager_connectivity_configuration":{"block":{"attributes":{"connectivity_topology":{"type":"string","required":true},"delete_existing_peering_enabled":{"type":"bool","optional":true},"description":{"type":"string","optional":true},"global_mesh_enabled":{"type":"bool","optional":true},"name":{"type":"string","required":true},"network_manager_id":{"type":"string","required":true}},"block_types":{"applies_to_group":{"nesting_mode":3,"block":{"attributes":{"global_mesh_enabled":{"type":"bool","optional":true},"group_connectivity":{"type":"string","required":true},"network_group_id":{"type":"string","required":true},"use_hub_gateway":{"type":"bool","optional":true}}},"required":true},"hub":{"nesting_mode":3,"block":{"attributes":{"resource_id":{"type":"string","required":true},"resource_type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_network_manager_deployment":{"block":{"attributes":{"configuration_ids":{"type":["list","string"],"required":true},"location":{"type":"string","required":true},"network_manager_id":{"type":"string","required":true},"scope_access":{"type":"string","required":true},"triggers":{"type":["map","string"],"optional":true}}}},"azurerm_network_manager_management_group_connection":{"block":{"attributes":{"connection_state":{"type":"string","computed":true},"description":{"type":"string","optional":true},"management_group_id":{"type":"string","required":true},"name":{"type":"string","required":true},"network_manager_id":{"type":"string","required":true}}}},"azurerm_network_manager_network_group":{"block":{"attributes":{"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"network_manager_id":{"type":"string","required":true}}}},"azurerm_network_manager_scope_connection":{"block":{"attributes":{"connection_state":{"type":"string","computed":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"network_manager_id":{"type":"string","required":true},"target_scope_id":{"type":"string","required":true},"tenant_id":{"type":"string","required":true}}}},"azurerm_network_manager_security_admin_configuration":{"block":{"attributes":{"apply_on_network_intent_policy_based_services":{"type":["list","string"],"optional":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"network_manager_id":{"type":"string","required":true}}}},"azurerm_network_manager_static_member":{"block":{"attributes":{"name":{"type":"string","required":true},"network_group_id":{"type":"string","required":true},"region":{"type":"string","computed":true},"target_virtual_network_id":{"type":"string","required":true}}}},"azurerm_network_manager_subscription_connection":{"block":{"attributes":{"connection_state":{"type":"string","computed":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"network_manager_id":{"type":"string","required":true},"subscription_id":{"type":"string","required":true}}}},"azurerm_network_packet_capture":{"block":{"attributes":{"maximum_bytes_per_packet":{"type":"number","optional":true,"default":0},"maximum_bytes_per_session":{"type":"number","optional":true,"default":1073741824},"maximum_capture_duration":{"type":"number","optional":true,"default":18000},"name":{"type":"string","required":true},"network_watcher_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"target_resource_id":{"type":"string","required":true}},"block_types":{"filter":{"nesting_mode":3,"block":{"attributes":{"local_ip_address":{"type":"string","optional":true},"local_port":{"type":"string","optional":true},"protocol":{"type":"string","required":true},"remote_ip_address":{"type":"string","optional":true},"remote_port":{"type":"string","optional":true}}},"optional":true},"storage_location":{"nesting_mode":3,"block":{"attributes":{"file_path":{"type":"string","optional":true,"at_least_one_of":["storage_location.0.file_path","storage_location.0.storage_account_id"]},"storage_account_id":{"type":"string","optional":true,"at_least_one_of":["storage_location.0.file_path","storage_location.0.storage_account_id"]},"storage_path":{"type":"string","computed":true}}},"required":true}}}},"azurerm_network_profile":{"block":{"attributes":{"container_network_interface_ids":{"type":["list","string"],"computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"container_network_interface":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true}},"block_types":{"ip_configuration":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"subnet_id":{"type":"string","required":true}}},"required":true}}},"required":true}}}},"azurerm_network_security_group":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"security_rule":{"type":["set",["object",{"access":"string","description":"string","destination_address_prefix":"string","destination_address_prefixes":["set","string"],"destination_application_security_group_ids":["set","string"],"destination_port_range":"string","destination_port_ranges":["set","string"],"direction":"string","name":"string","priority":"number","protocol":"string","source_address_prefix":"string","source_address_prefixes":["set","string"],"source_application_security_group_ids":["set","string"],"source_port_range":"string","source_port_ranges":["set","string"]}]],"optional":true,"computed":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_network_security_rule":{"block":{"attributes":{"access":{"type":"string","required":true},"description":{"type":"string","optional":true},"destination_address_prefix":{"type":"string","optional":true,"conflicts_with":["destination_address_prefixes"]},"destination_address_prefixes":{"type":["set","string"],"optional":true,"conflicts_with":["destination_address_prefix"]},"destination_application_security_group_ids":{"type":["set","string"],"optional":true},"destination_port_range":{"type":"string","optional":true,"conflicts_with":["destination_port_ranges"]},"destination_port_ranges":{"type":["set","string"],"optional":true,"conflicts_with":["destination_port_range"]},"direction":{"type":"string","required":true},"name":{"type":"string","required":true},"network_security_group_name":{"type":"string","required":true},"priority":{"type":"number","required":true},"protocol":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"source_address_prefix":{"type":"string","optional":true,"conflicts_with":["source_address_prefixes"]},"source_address_prefixes":{"type":["set","string"],"optional":true,"conflicts_with":["source_address_prefix"]},"source_application_security_group_ids":{"type":["set","string"],"optional":true},"source_port_range":{"type":"string","optional":true,"conflicts_with":["source_port_ranges"]},"source_port_ranges":{"type":["set","string"],"optional":true,"conflicts_with":["source_port_range"]}}}},"azurerm_network_watcher":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_network_watcher_flow_log":{"block":{"attributes":{"enabled":{"type":"bool","required":true},"location":{"type":"string","optional":true,"computed":true},"name":{"type":"string","required":true},"network_security_group_id":{"type":"string","optional":true,"computed":true,"exactly_one_of":["network_security_group_id","target_resource_id"]},"network_watcher_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"storage_account_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"target_resource_id":{"type":"string","optional":true,"computed":true,"exactly_one_of":["network_security_group_id","target_resource_id"]},"version":{"type":"number","optional":true,"default":1}},"block_types":{"retention_policy":{"nesting_mode":3,"block":{"attributes":{"days":{"type":"number","required":true},"enabled":{"type":"bool","required":true}}},"required":true},"traffic_analytics":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","required":true},"interval_in_minutes":{"type":"number","optional":true,"default":60},"workspace_id":{"type":"string","required":true},"workspace_region":{"type":"string","required":true},"workspace_resource_id":{"type":"string","required":true}}},"optional":true}}}},"azurerm_new_relic_monitor":{"block":{"attributes":{"account_creation_source":{"type":"string","optional":true,"default":"LIFTR"},"account_id":{"type":"string","optional":true,"computed":true},"ingestion_key":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"org_creation_source":{"type":"string","optional":true,"default":"LIFTR"},"organization_id":{"type":"string","optional":true,"computed":true},"resource_group_name":{"type":"string","required":true},"user_id":{"type":"string","optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"plan":{"nesting_mode":3,"block":{"attributes":{"billing_cycle":{"type":"string","optional":true,"default":"MONTHLY"},"effective_date":{"type":"string","required":true},"plan_id":{"type":"string","optional":true,"default":"newrelic-pay-as-you-go-free-live"},"usage_type":{"type":"string","optional":true,"default":"PAYG"}}},"required":true},"user":{"nesting_mode":3,"block":{"attributes":{"email":{"type":"string","required":true},"first_name":{"type":"string","required":true},"last_name":{"type":"string","required":true},"phone_number":{"type":"string","required":true}}},"required":true}}}},"azurerm_new_relic_tag_rule":{"block":{"attributes":{"activity_log_enabled":{"type":"bool","optional":true,"default":false},"azure_active_directory_log_enabled":{"type":"bool","optional":true,"default":false},"metric_enabled":{"type":"bool","optional":true,"default":false},"monitor_id":{"type":"string","required":true},"subscription_log_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"log_tag_filter":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"metric_tag_filter":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}}},"azurerm_nginx_certificate":{"block":{"attributes":{"certificate_virtual_path":{"type":"string","required":true},"key_vault_secret_id":{"type":"string","required":true},"key_virtual_path":{"type":"string","required":true},"name":{"type":"string","required":true},"nginx_deployment_id":{"type":"string","required":true}}}},"azurerm_nginx_configuration":{"block":{"attributes":{"nginx_deployment_id":{"type":"string","required":true},"package_data":{"type":"string","optional":true,"conflicts_with":["protected_file","config_file"],"at_least_one_of":["config_file","package_data"]},"root_file":{"type":"string","required":true}},"block_types":{"config_file":{"nesting_mode":4,"block":{"attributes":{"content":{"type":"string","required":true},"virtual_path":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["config_file","package_data"]},"protected_file":{"nesting_mode":4,"block":{"attributes":{"content":{"type":"string","required":true},"content_hash":{"type":"string","computed":true},"virtual_path":{"type":"string","required":true}}},"optional":true,"required_with":["config_file"]}}}},"azurerm_nginx_deployment":{"block":{"attributes":{"automatic_upgrade_channel":{"type":"string","optional":true,"default":"stable"},"capacity":{"type":"number","optional":true,"conflicts_with":["auto_scale_profile"]},"dataplane_api_endpoint":{"type":"string","computed":true},"diagnose_support_enabled":{"type":"bool","optional":true},"email":{"type":"string","optional":true},"ip_address":{"type":"string","computed":true},"location":{"type":"string","required":true},"managed_resource_group":{"type":"string","optional":true,"computed":true},"name":{"type":"string","required":true},"nginx_version":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"sku":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"auto_scale_profile":{"nesting_mode":3,"block":{"attributes":{"max_capacity":{"type":"number","required":true},"min_capacity":{"type":"number","required":true},"name":{"type":"string","required":true}}},"optional":true,"conflicts_with":["capacity"]},"frontend_private":{"nesting_mode":3,"block":{"attributes":{"allocation_method":{"type":"string","required":true},"ip_address":{"type":"string","required":true},"subnet_id":{"type":"string","required":true}}},"optional":true,"conflicts_with":["frontend_public"]},"frontend_public":{"nesting_mode":3,"block":{"attributes":{"ip_address":{"type":["list","string"],"optional":true}}},"optional":true,"conflicts_with":["frontend_private"]},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"logging_storage_account":{"nesting_mode":3,"block":{"attributes":{"container_name":{"type":"string","optional":true},"name":{"type":"string","optional":true}}},"optional":true},"network_interface":{"nesting_mode":3,"block":{"attributes":{"subnet_id":{"type":"string","required":true}}},"optional":true}}}},"azurerm_notification_hub":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"namespace_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"apns_credential":{"nesting_mode":3,"block":{"attributes":{"application_mode":{"type":"string","required":true},"bundle_id":{"type":"string","required":true},"key_id":{"type":"string","required":true},"team_id":{"type":"string","required":true},"token":{"type":"string","required":true}}},"optional":true},"browser_credential":{"nesting_mode":3,"block":{"attributes":{"subject":{"type":"string","required":true},"vapid_private_key":{"type":"string","required":true},"vapid_public_key":{"type":"string","required":true}}},"optional":true},"gcm_credential":{"nesting_mode":3,"block":{"attributes":{"api_key":{"type":"string","required":true}}},"optional":true}}}},"azurerm_notification_hub_authorization_rule":{"block":{"attributes":{"listen":{"type":"bool","optional":true,"default":false},"manage":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"namespace_name":{"type":"string","required":true},"notification_hub_name":{"type":"string","required":true},"primary_access_key":{"type":"string","computed":true},"primary_connection_string":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"secondary_access_key":{"type":"string","computed":true},"secondary_connection_string":{"type":"string","computed":true},"send":{"type":"bool","optional":true,"default":false}}}},"azurerm_notification_hub_namespace":{"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"namespace_type":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"servicebus_endpoint":{"type":"string","computed":true},"sku_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_oracle_autonomous_database":{"block":{"attributes":{"admin_password":{"type":"string","required":true},"auto_scaling_enabled":{"type":"bool","required":true},"auto_scaling_for_storage_enabled":{"type":"bool","required":true},"backup_retention_period_in_days":{"type":"number","required":true},"character_set":{"type":"string","required":true},"compute_count":{"type":"number","required":true},"compute_model":{"type":"string","required":true},"customer_contacts":{"type":["list","string"],"optional":true,"computed":true},"data_storage_size_in_tbs":{"type":"number","required":true},"db_version":{"type":"string","required":true},"db_workload":{"type":"string","required":true},"display_name":{"type":"string","required":true},"license_model":{"type":"string","required":true},"location":{"type":"string","required":true},"mtls_connection_required":{"type":"bool","required":true},"name":{"type":"string","required":true},"national_character_set":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"subnet_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"virtual_network_id":{"type":"string","required":true}}}},"azurerm_oracle_cloud_vm_cluster":{"block":{"attributes":{"backup_subnet_cidr":{"type":"string","optional":true},"cloud_exadata_infrastructure_id":{"type":"string","required":true},"cluster_name":{"type":"string","optional":true,"computed":true},"cpu_core_count":{"type":"number","required":true},"data_storage_percentage":{"type":"number","optional":true,"computed":true},"data_storage_size_in_tbs":{"type":"number","optional":true,"computed":true},"db_node_storage_size_in_gbs":{"type":"number","optional":true,"computed":true},"db_servers":{"type":["list","string"],"required":true},"display_name":{"type":"string","required":true},"domain":{"type":"string","optional":true,"computed":true},"gi_version":{"type":"string","required":true},"hostname":{"type":"string","required":true},"hostname_actual":{"type":"string","computed":true},"license_model":{"type":"string","required":true},"local_backup_enabled":{"type":"bool","optional":true,"computed":true},"location":{"type":"string","required":true},"memory_size_in_gbs":{"type":"number","optional":true,"computed":true},"name":{"type":"string","required":true},"ocid":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"scan_listener_port_tcp":{"type":"number","optional":true,"default":1521},"scan_listener_port_tcp_ssl":{"type":"number","optional":true,"default":2484},"sparse_diskgroup_enabled":{"type":"bool","optional":true,"computed":true},"ssh_public_keys":{"type":["list","string"],"required":true},"subnet_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"time_zone":{"type":"string","optional":true,"computed":true},"virtual_network_id":{"type":"string","required":true},"zone_id":{"type":"string","optional":true,"computed":true}},"block_types":{"data_collection_options":{"nesting_mode":3,"block":{"attributes":{"diagnostics_events_enabled":{"type":"bool","optional":true,"computed":true},"health_monitoring_enabled":{"type":"bool","optional":true,"computed":true},"incident_logs_enabled":{"type":"bool","optional":true,"computed":true}}},"optional":true,"computed":true}}}},"azurerm_oracle_exadata_infrastructure":{"block":{"attributes":{"compute_count":{"type":"number","required":true},"customer_contacts":{"type":["list","string"],"optional":true,"computed":true},"display_name":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"shape":{"type":"string","required":true},"storage_count":{"type":"number","required":true},"tags":{"type":["map","string"],"optional":true},"zones":{"type":["set","string"],"required":true}},"block_types":{"maintenance_window":{"nesting_mode":3,"block":{"attributes":{"days_of_week":{"type":["list","string"],"optional":true,"computed":true},"hours_of_day":{"type":["list","number"],"optional":true,"computed":true},"lead_time_in_weeks":{"type":"number","optional":true,"computed":true},"months":{"type":["list","string"],"optional":true,"computed":true},"patching_mode":{"type":"string","optional":true,"computed":true},"preference":{"type":"string","optional":true,"computed":true},"weeks_of_month":{"type":["list","number"],"optional":true,"computed":true}}},"optional":true,"computed":true}}}},"azurerm_orbital_contact":{"block":{"attributes":{"contact_profile_id":{"type":"string","required":true},"ground_station_name":{"type":"string","required":true},"name":{"type":"string","required":true},"reservation_end_time":{"type":"string","required":true},"reservation_start_time":{"type":"string","required":true},"spacecraft_id":{"type":"string","required":true}}}},"azurerm_orbital_contact_profile":{"block":{"attributes":{"auto_tracking":{"type":"string","required":true},"event_hub_uri":{"type":"string","optional":true},"location":{"type":"string","required":true},"minimum_elevation_degrees":{"type":"number","optional":true},"minimum_variable_contact_duration":{"type":"string","required":true},"name":{"type":"string","required":true},"network_configuration_subnet_id":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"links":{"nesting_mode":3,"block":{"attributes":{"direction":{"type":"string","required":true},"name":{"type":"string","required":true},"polarization":{"type":"string","required":true}},"block_types":{"channels":{"nesting_mode":3,"block":{"attributes":{"bandwidth_mhz":{"type":"number","required":true},"center_frequency_mhz":{"type":"number","required":true},"demodulation_configuration":{"type":"string","optional":true},"modulation_configuration":{"type":"string","optional":true},"name":{"type":"string","required":true}},"block_types":{"end_point":{"nesting_mode":4,"block":{"attributes":{"end_point_name":{"type":"string","required":true},"ip_address":{"type":"string","optional":true},"port":{"type":"string","required":true},"protocol":{"type":"string","required":true}}},"required":true}}},"required":true}}},"required":true}}}},"azurerm_orbital_spacecraft":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"norad_id":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"title_line":{"type":"string","required":true},"two_line_elements":{"type":["list","string"],"required":true}},"block_types":{"links":{"nesting_mode":3,"block":{"attributes":{"bandwidth_mhz":{"type":"number","required":true},"center_frequency_mhz":{"type":"number","required":true},"direction":{"type":"string","required":true},"name":{"type":"string","required":true},"polarization":{"type":"string","required":true}}},"required":true}}}},"azurerm_orchestrated_virtual_machine_scale_set":{"block":{"attributes":{"capacity_reservation_group_id":{"type":"string","optional":true,"conflicts_with":["proximity_placement_group_id"]},"encryption_at_host_enabled":{"type":"bool","optional":true},"eviction_policy":{"type":"string","optional":true},"extension_operations_enabled":{"type":"bool","optional":true,"default":true},"extensions_time_budget":{"type":"string","optional":true,"default":"PT1H30M"},"instances":{"type":"number","optional":true,"computed":true},"license_type":{"type":"string","optional":true},"location":{"type":"string","required":true},"max_bid_price":{"type":"number","optional":true,"default":-1},"name":{"type":"string","required":true},"platform_fault_domain_count":{"type":"number","required":true},"priority":{"type":"string","optional":true,"default":"Regular"},"proximity_placement_group_id":{"type":"string","optional":true,"conflicts_with":["capacity_reservation_group_id"]},"resource_group_name":{"type":"string","required":true},"single_placement_group":{"type":"bool","optional":true,"computed":true},"sku_name":{"type":"string","optional":true},"source_image_id":{"type":"string","optional":true,"conflicts_with":["source_image_reference"]},"tags":{"type":["map","string"],"optional":true},"unique_id":{"type":"string","computed":true},"user_data_base64":{"type":"string","optional":true},"zone_balance":{"type":"bool","optional":true,"default":false},"zones":{"type":["set","string"],"optional":true}},"block_types":{"additional_capabilities":{"nesting_mode":3,"block":{"attributes":{"ultra_ssd_enabled":{"type":"bool","optional":true,"default":false}}},"optional":true},"automatic_instance_repair":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"computed":true},"enabled":{"type":"bool","required":true},"grace_period":{"type":"string","optional":true,"computed":true}}},"optional":true,"computed":true},"boot_diagnostics":{"nesting_mode":3,"block":{"attributes":{"storage_account_uri":{"type":"string","optional":true}}},"optional":true},"data_disk":{"nesting_mode":3,"block":{"attributes":{"caching":{"type":"string","required":true},"create_option":{"type":"string","optional":true,"default":"Empty"},"disk_encryption_set_id":{"type":"string","optional":true},"disk_size_gb":{"type":"number","optional":true,"computed":true},"lun":{"type":"number","optional":true,"computed":true},"storage_account_type":{"type":"string","required":true},"ultra_ssd_disk_iops_read_write":{"type":"number","optional":true,"computed":true},"ultra_ssd_disk_mbps_read_write":{"type":"number","optional":true,"computed":true},"write_accelerator_enabled":{"type":"bool","optional":true,"default":false}}},"optional":true},"extension":{"nesting_mode":4,"block":{"attributes":{"auto_upgrade_minor_version_enabled":{"type":"bool","optional":true,"default":true},"extensions_to_provision_after_vm_creation":{"type":["list","string"],"optional":true},"failure_suppression_enabled":{"type":"bool","optional":true,"default":false},"force_extension_execution_on_change":{"type":"string","optional":true},"name":{"type":"string","required":true},"protected_settings":{"type":"string","optional":true},"publisher":{"type":"string","required":true},"settings":{"type":"string","optional":true},"type":{"type":"string","required":true},"type_handler_version":{"type":"string","required":true}},"block_types":{"protected_settings_from_key_vault":{"nesting_mode":3,"block":{"attributes":{"secret_url":{"type":"string","required":true},"source_vault_id":{"type":"string","required":true}}},"optional":true}}},"optional":true,"computed":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"required":true},"type":{"type":"string","required":true}}},"optional":true},"network_interface":{"nesting_mode":3,"block":{"attributes":{"dns_servers":{"type":["list","string"],"optional":true},"enable_accelerated_networking":{"type":"bool","optional":true,"default":false},"enable_ip_forwarding":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"network_security_group_id":{"type":"string","optional":true},"primary":{"type":"bool","optional":true,"default":false}},"block_types":{"ip_configuration":{"nesting_mode":3,"block":{"attributes":{"application_gateway_backend_address_pool_ids":{"type":["set","string"],"optional":true},"application_security_group_ids":{"type":["set","string"],"optional":true},"load_balancer_backend_address_pool_ids":{"type":["set","string"],"optional":true},"name":{"type":"string","required":true},"primary":{"type":"bool","optional":true,"default":false},"subnet_id":{"type":"string","optional":true},"version":{"type":"string","optional":true,"default":"IPv4"}},"block_types":{"public_ip_address":{"nesting_mode":3,"block":{"attributes":{"domain_name_label":{"type":"string","optional":true},"idle_timeout_in_minutes":{"type":"number","optional":true,"computed":true},"name":{"type":"string","required":true},"public_ip_prefix_id":{"type":"string","optional":true},"sku_name":{"type":"string","optional":true},"version":{"type":"string","optional":true,"default":"IPv4"}},"block_types":{"ip_tag":{"nesting_mode":3,"block":{"attributes":{"tag":{"type":"string","required":true},"type":{"type":"string","required":true}}},"optional":true}}},"optional":true}}},"required":true}}},"optional":true},"os_disk":{"nesting_mode":3,"block":{"attributes":{"caching":{"type":"string","required":true},"disk_encryption_set_id":{"type":"string","optional":true},"disk_size_gb":{"type":"number","optional":true,"computed":true},"storage_account_type":{"type":"string","required":true},"write_accelerator_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"diff_disk_settings":{"nesting_mode":3,"block":{"attributes":{"option":{"type":"string","required":true},"placement":{"type":"string","optional":true,"default":"CacheDisk"}}},"optional":true}}},"optional":true},"os_profile":{"nesting_mode":3,"block":{"attributes":{"custom_data":{"type":"string","optional":true}},"block_types":{"linux_configuration":{"nesting_mode":3,"block":{"attributes":{"admin_password":{"type":"string","optional":true},"admin_username":{"type":"string","required":true},"computer_name_prefix":{"type":"string","optional":true,"computed":true},"disable_password_authentication":{"type":"bool","optional":true,"default":true},"patch_assessment_mode":{"type":"string","optional":true,"default":"ImageDefault"},"patch_mode":{"type":"string","optional":true,"default":"ImageDefault"},"provision_vm_agent":{"type":"bool","optional":true,"default":true}},"block_types":{"admin_ssh_key":{"nesting_mode":4,"block":{"attributes":{"public_key":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true},"secret":{"nesting_mode":3,"block":{"attributes":{"key_vault_id":{"type":"string","required":true}},"block_types":{"certificate":{"nesting_mode":4,"block":{"attributes":{"url":{"type":"string","required":true}}},"required":true}}},"optional":true}}},"optional":true},"windows_configuration":{"nesting_mode":3,"block":{"attributes":{"admin_password":{"type":"string","required":true},"admin_username":{"type":"string","required":true},"computer_name_prefix":{"type":"string","optional":true,"computed":true},"enable_automatic_updates":{"type":"bool","optional":true,"default":true},"hotpatching_enabled":{"type":"bool","optional":true,"default":false},"patch_assessment_mode":{"type":"string","optional":true,"default":"ImageDefault"},"patch_mode":{"type":"string","optional":true,"default":"AutomaticByOS"},"provision_vm_agent":{"type":"bool","optional":true,"default":true},"timezone":{"type":"string","optional":true}},"block_types":{"additional_unattend_content":{"nesting_mode":3,"block":{"attributes":{"content":{"type":"string","required":true},"setting":{"type":"string","required":true}}},"optional":true},"secret":{"nesting_mode":3,"block":{"attributes":{"key_vault_id":{"type":"string","required":true}},"block_types":{"certificate":{"nesting_mode":4,"block":{"attributes":{"store":{"type":"string","required":true},"url":{"type":"string","required":true}}},"required":true}}},"optional":true},"winrm_listener":{"nesting_mode":4,"block":{"attributes":{"certificate_url":{"type":"string","optional":true},"protocol":{"type":"string","required":true}}},"optional":true}}},"optional":true}}},"optional":true},"plan":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"product":{"type":"string","required":true},"publisher":{"type":"string","required":true}}},"optional":true},"priority_mix":{"nesting_mode":3,"block":{"attributes":{"base_regular_count":{"type":"number","optional":true,"default":0},"regular_percentage_above_base":{"type":"number","optional":true,"default":0}}},"optional":true},"sku_profile":{"nesting_mode":3,"block":{"attributes":{"allocation_strategy":{"type":"string","required":true},"vm_sizes":{"type":["set","string"],"required":true}}},"optional":true},"source_image_reference":{"nesting_mode":3,"block":{"attributes":{"offer":{"type":"string","required":true},"publisher":{"type":"string","required":true},"sku":{"type":"string","required":true},"version":{"type":"string","required":true}}},"optional":true,"conflicts_with":["source_image_id"]},"termination_notification":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","required":true},"timeout":{"type":"string","optional":true,"default":"PT5M"}}},"optional":true,"computed":true}}}},"azurerm_palo_alto_local_rulestack":{"block":{"attributes":{"anti_spyware_profile":{"type":"string","optional":true},"anti_virus_profile":{"type":"string","optional":true},"description":{"type":"string","optional":true},"dns_subscription":{"type":"string","optional":true},"file_blocking_profile":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"url_filtering_profile":{"type":"string","optional":true},"vulnerability_profile":{"type":"string","optional":true}}}},"azurerm_palo_alto_local_rulestack_certificate":{"block":{"attributes":{"audit_comment":{"type":"string","optional":true},"description":{"type":"string","optional":true},"key_vault_certificate_id":{"type":"string","optional":true,"exactly_one_of":["self_signed","key_vault_certificate_id"]},"name":{"type":"string","required":true},"rulestack_id":{"type":"string","required":true},"self_signed":{"type":"bool","optional":true,"default":false,"exactly_one_of":["key_vault_certificate_id","self_signed"]}}}},"azurerm_palo_alto_local_rulestack_fqdn_list":{"block":{"attributes":{"audit_comment":{"type":"string","optional":true},"description":{"type":"string","optional":true},"fully_qualified_domain_names":{"type":["list","string"],"required":true},"name":{"type":"string","required":true},"rulestack_id":{"type":"string","required":true}}}},"azurerm_palo_alto_local_rulestack_outbound_trust_certificate_association":{"block":{"attributes":{"certificate_id":{"type":"string","required":true}}}},"azurerm_palo_alto_local_rulestack_outbound_untrust_certificate_association":{"block":{"attributes":{"certificate_id":{"type":"string","required":true}}}},"azurerm_palo_alto_local_rulestack_prefix_list":{"block":{"attributes":{"audit_comment":{"type":"string","optional":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"prefix_list":{"type":["list","string"],"required":true},"rulestack_id":{"type":"string","required":true}}}},"azurerm_palo_alto_local_rulestack_rule":{"block":{"attributes":{"action":{"type":"string","required":true},"applications":{"type":["list","string"],"required":true},"audit_comment":{"type":"string","optional":true},"decryption_rule_type":{"type":"string","optional":true,"default":"None"},"description":{"type":"string","optional":true},"enabled":{"type":"bool","optional":true,"default":true},"inspection_certificate_id":{"type":"string","optional":true},"logging_enabled":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"negate_destination":{"type":"bool","optional":true,"default":false},"negate_source":{"type":"bool","optional":true,"default":false},"priority":{"type":"number","required":true},"protocol":{"type":"string","optional":true,"exactly_one_of":["protocol","protocol_ports"]},"protocol_ports":{"type":["list","string"],"optional":true,"exactly_one_of":["protocol","protocol_ports"]},"rulestack_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"category":{"nesting_mode":3,"block":{"attributes":{"custom_urls":{"type":["list","string"],"required":true},"feeds":{"type":["list","string"],"optional":true}}},"optional":true},"destination":{"nesting_mode":3,"block":{"attributes":{"cidrs":{"type":["list","string"],"optional":true,"at_least_one_of":["destination.0.cidrs","destination.0.countries","destination.0.feeds","destination.0.local_rulestack_fqdn_list_ids","destination.0.local_rulestack_prefix_list_ids"]},"countries":{"type":["list","string"],"optional":true,"at_least_one_of":["destination.0.cidrs","destination.0.countries","destination.0.feeds","destination.0.local_rulestack_fqdn_list_ids","destination.0.local_rulestack_prefix_list_ids"]},"feeds":{"type":["list","string"],"optional":true,"at_least_one_of":["destination.0.cidrs","destination.0.countries","destination.0.feeds","destination.0.local_rulestack_fqdn_list_ids","destination.0.local_rulestack_prefix_list_ids"]},"local_rulestack_fqdn_list_ids":{"type":["list","string"],"optional":true,"at_least_one_of":["destination.0.cidrs","destination.0.countries","destination.0.feeds","destination.0.local_rulestack_fqdn_list_ids","destination.0.local_rulestack_prefix_list_ids"]},"local_rulestack_prefix_list_ids":{"type":["list","string"],"optional":true,"at_least_one_of":["destination.0.cidrs","destination.0.countries","destination.0.feeds","destination.0.local_rulestack_fqdn_list_ids","destination.0.local_rulestack_prefix_list_ids"]}}},"required":true},"source":{"nesting_mode":3,"block":{"attributes":{"cidrs":{"type":["list","string"],"optional":true,"at_least_one_of":["source.0.cidrs","source.0.countries","source.0.feeds","source.0.local_rulestack_prefix_list_ids"]},"countries":{"type":["list","string"],"optional":true,"at_least_one_of":["source.0.cidrs","source.0.countries","source.0.feeds","source.0.local_rulestack_prefix_list_ids"]},"feeds":{"type":["list","string"],"optional":true,"at_least_one_of":["source.0.cidrs","source.0.countries","source.0.feeds","source.0.local_rulestack_prefix_list_ids"]},"local_rulestack_prefix_list_ids":{"type":["list","string"],"optional":true,"at_least_one_of":["source.0.cidrs","source.0.countries","source.0.feeds","source.0.local_rulestack_prefix_list_ids"]}}},"required":true}}}},"azurerm_palo_alto_next_generation_firewall_virtual_hub_local_rulestack":{"block":{"attributes":{"marketplace_offer_id":{"type":"string","optional":true,"default":"pan_swfw_cloud_ngfw"},"name":{"type":"string","required":true},"plan_id":{"type":"string","optional":true,"default":"panw-cloud-ngfw-payg"},"resource_group_name":{"type":"string","required":true},"rulestack_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"destination_nat":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"protocol":{"type":"string","required":true}},"block_types":{"backend_config":{"nesting_mode":3,"block":{"attributes":{"port":{"type":"number","required":true},"public_ip_address":{"type":"string","required":true}}},"optional":true},"frontend_config":{"nesting_mode":3,"block":{"attributes":{"port":{"type":"number","required":true},"public_ip_address_id":{"type":"string","required":true}}},"optional":true}}},"optional":true},"dns_settings":{"nesting_mode":3,"block":{"attributes":{"azure_dns_servers":{"type":["list","string"],"computed":true},"dns_servers":{"type":["list","string"],"optional":true,"conflicts_with":["dns_settings.0.use_azure_dns"]},"use_azure_dns":{"type":"bool","optional":true,"default":false,"conflicts_with":["dns_settings.0.dns_servers"]}}},"optional":true},"network_profile":{"nesting_mode":3,"block":{"attributes":{"egress_nat_ip_address_ids":{"type":["list","string"],"optional":true},"egress_nat_ip_addresses":{"type":["list","string"],"computed":true},"ip_of_trust_for_user_defined_routes":{"type":"string","computed":true},"network_virtual_appliance_id":{"type":"string","required":true},"public_ip_address_ids":{"type":["list","string"],"required":true},"public_ip_addresses":{"type":["list","string"],"computed":true},"trusted_address_ranges":{"type":["list","string"],"optional":true},"trusted_subnet_id":{"type":"string","computed":true},"untrusted_subnet_id":{"type":"string","computed":true},"virtual_hub_id":{"type":"string","required":true}}},"required":true}}}},"azurerm_palo_alto_next_generation_firewall_virtual_hub_panorama":{"block":{"attributes":{"location":{"type":"string","required":true},"marketplace_offer_id":{"type":"string","optional":true,"default":"pan_swfw_cloud_ngfw"},"name":{"type":"string","required":true},"panorama":{"type":["list",["object",{"device_group_name":"string","host_name":"string","name":"string","panorama_server_1":"string","panorama_server_2":"string","template_name":"string","virtual_machine_ssh_key":"string"}]],"computed":true},"panorama_base64_config":{"type":"string","required":true},"plan_id":{"type":"string","optional":true,"default":"panw-cloud-ngfw-payg"},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"destination_nat":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"protocol":{"type":"string","required":true}},"block_types":{"backend_config":{"nesting_mode":3,"block":{"attributes":{"port":{"type":"number","required":true},"public_ip_address":{"type":"string","required":true}}},"optional":true},"frontend_config":{"nesting_mode":3,"block":{"attributes":{"port":{"type":"number","required":true},"public_ip_address_id":{"type":"string","required":true}}},"optional":true}}},"optional":true},"dns_settings":{"nesting_mode":3,"block":{"attributes":{"azure_dns_servers":{"type":["list","string"],"computed":true},"dns_servers":{"type":["list","string"],"optional":true,"conflicts_with":["dns_settings.0.use_azure_dns"]},"use_azure_dns":{"type":"bool","optional":true,"default":false,"conflicts_with":["dns_settings.0.dns_servers"]}}},"optional":true},"network_profile":{"nesting_mode":3,"block":{"attributes":{"egress_nat_ip_address_ids":{"type":["list","string"],"optional":true},"egress_nat_ip_addresses":{"type":["list","string"],"computed":true},"ip_of_trust_for_user_defined_routes":{"type":"string","computed":true},"network_virtual_appliance_id":{"type":"string","required":true},"public_ip_address_ids":{"type":["list","string"],"required":true},"public_ip_addresses":{"type":["list","string"],"computed":true},"trusted_address_ranges":{"type":["list","string"],"optional":true},"trusted_subnet_id":{"type":"string","computed":true},"untrusted_subnet_id":{"type":"string","computed":true},"virtual_hub_id":{"type":"string","required":true}}},"required":true}}}},"azurerm_palo_alto_next_generation_firewall_virtual_network_local_rulestack":{"block":{"attributes":{"marketplace_offer_id":{"type":"string","optional":true,"default":"pan_swfw_cloud_ngfw"},"name":{"type":"string","required":true},"plan_id":{"type":"string","optional":true,"default":"panw-cloud-ngfw-payg"},"resource_group_name":{"type":"string","required":true},"rulestack_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"destination_nat":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"protocol":{"type":"string","required":true}},"block_types":{"backend_config":{"nesting_mode":3,"block":{"attributes":{"port":{"type":"number","required":true},"public_ip_address":{"type":"string","required":true}}},"optional":true},"frontend_config":{"nesting_mode":3,"block":{"attributes":{"port":{"type":"number","required":true},"public_ip_address_id":{"type":"string","required":true}}},"optional":true}}},"optional":true},"dns_settings":{"nesting_mode":3,"block":{"attributes":{"azure_dns_servers":{"type":["list","string"],"computed":true},"dns_servers":{"type":["list","string"],"optional":true,"conflicts_with":["dns_settings.0.use_azure_dns"]},"use_azure_dns":{"type":"bool","optional":true,"default":false,"conflicts_with":["dns_settings.0.dns_servers"]}}},"optional":true},"network_profile":{"nesting_mode":3,"block":{"attributes":{"egress_nat_ip_address_ids":{"type":["list","string"],"optional":true},"egress_nat_ip_addresses":{"type":["list","string"],"computed":true},"public_ip_address_ids":{"type":["list","string"],"required":true},"public_ip_addresses":{"type":["list","string"],"computed":true},"trusted_address_ranges":{"type":["list","string"],"optional":true}},"block_types":{"vnet_configuration":{"nesting_mode":3,"block":{"attributes":{"ip_of_trust_for_user_defined_routes":{"type":"string","computed":true},"trusted_subnet_id":{"type":"string","optional":true},"untrusted_subnet_id":{"type":"string","optional":true},"virtual_network_id":{"type":"string","required":true}}},"required":true}}},"required":true}}}},"azurerm_palo_alto_next_generation_firewall_virtual_network_panorama":{"block":{"attributes":{"location":{"type":"string","required":true},"marketplace_offer_id":{"type":"string","optional":true,"default":"pan_swfw_cloud_ngfw"},"name":{"type":"string","required":true},"panorama":{"type":["list",["object",{"device_group_name":"string","host_name":"string","name":"string","panorama_server_1":"string","panorama_server_2":"string","template_name":"string","virtual_machine_ssh_key":"string"}]],"computed":true},"panorama_base64_config":{"type":"string","required":true},"plan_id":{"type":"string","optional":true,"default":"panw-cloud-ngfw-payg"},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"destination_nat":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"protocol":{"type":"string","required":true}},"block_types":{"backend_config":{"nesting_mode":3,"block":{"attributes":{"port":{"type":"number","required":true},"public_ip_address":{"type":"string","required":true}}},"optional":true},"frontend_config":{"nesting_mode":3,"block":{"attributes":{"port":{"type":"number","required":true},"public_ip_address_id":{"type":"string","required":true}}},"optional":true}}},"optional":true},"dns_settings":{"nesting_mode":3,"block":{"attributes":{"azure_dns_servers":{"type":["list","string"],"computed":true},"dns_servers":{"type":["list","string"],"optional":true,"conflicts_with":["dns_settings.0.use_azure_dns"]},"use_azure_dns":{"type":"bool","optional":true,"default":false,"conflicts_with":["dns_settings.0.dns_servers"]}}},"optional":true},"network_profile":{"nesting_mode":3,"block":{"attributes":{"egress_nat_ip_address_ids":{"type":["list","string"],"optional":true},"egress_nat_ip_addresses":{"type":["list","string"],"computed":true},"public_ip_address_ids":{"type":["list","string"],"required":true},"public_ip_addresses":{"type":["list","string"],"computed":true},"trusted_address_ranges":{"type":["list","string"],"optional":true}},"block_types":{"vnet_configuration":{"nesting_mode":3,"block":{"attributes":{"ip_of_trust_for_user_defined_routes":{"type":"string","computed":true},"trusted_subnet_id":{"type":"string","optional":true},"untrusted_subnet_id":{"type":"string","optional":true},"virtual_network_id":{"type":"string","required":true}}},"required":true}}},"required":true}}}},"azurerm_palo_alto_virtual_network_appliance":{"block":{"attributes":{"name":{"type":"string","required":true},"virtual_hub_id":{"type":"string","required":true}}}},"azurerm_pim_active_role_assignment":{"block":{"attributes":{"justification":{"type":"string","optional":true,"computed":true},"principal_id":{"type":"string","required":true},"principal_type":{"type":"string","computed":true},"role_definition_id":{"type":"string","required":true},"scope":{"type":"string","required":true}},"block_types":{"schedule":{"nesting_mode":3,"block":{"attributes":{"start_date_time":{"type":"string","optional":true,"computed":true}},"block_types":{"expiration":{"nesting_mode":3,"block":{"attributes":{"duration_days":{"type":"number","optional":true,"computed":true,"conflicts_with":["schedule.0.expiration.0.duration_hours","schedule.0.expiration.0.end_date_time"]},"duration_hours":{"type":"number","optional":true,"computed":true,"conflicts_with":["schedule.0.expiration.0.duration_days","schedule.0.expiration.0.end_date_time"]},"end_date_time":{"type":"string","optional":true,"computed":true,"conflicts_with":["schedule.0.expiration.0.duration_days","schedule.0.expiration.0.duration_hours"]}}},"optional":true}}},"optional":true,"computed":true},"ticket":{"nesting_mode":3,"block":{"attributes":{"number":{"type":"string","optional":true},"system":{"type":"string","optional":true}}},"optional":true,"computed":true}}}},"azurerm_pim_eligible_role_assignment":{"block":{"attributes":{"condition":{"type":"string","optional":true,"required_with":["condition_version"]},"condition_version":{"type":"string","optional":true,"required_with":["condition"]},"justification":{"type":"string","optional":true,"computed":true},"principal_id":{"type":"string","required":true},"principal_type":{"type":"string","computed":true},"role_definition_id":{"type":"string","required":true},"scope":{"type":"string","required":true}},"block_types":{"schedule":{"nesting_mode":3,"block":{"attributes":{"start_date_time":{"type":"string","optional":true,"computed":true}},"block_types":{"expiration":{"nesting_mode":3,"block":{"attributes":{"duration_days":{"type":"number","optional":true,"computed":true,"conflicts_with":["schedule.0.expiration.0.duration_hours","schedule.0.expiration.0.end_date_time"]},"duration_hours":{"type":"number","optional":true,"computed":true,"conflicts_with":["schedule.0.expiration.0.duration_days","schedule.0.expiration.0.end_date_time"]},"end_date_time":{"type":"string","optional":true,"computed":true,"conflicts_with":["schedule.0.expiration.0.duration_days","schedule.0.expiration.0.duration_hours"]}}},"optional":true}}},"optional":true,"computed":true},"ticket":{"nesting_mode":3,"block":{"attributes":{"number":{"type":"string","optional":true},"system":{"type":"string","optional":true}}},"optional":true,"computed":true}}}},"azurerm_point_to_site_vpn_gateway":{"block":{"attributes":{"dns_servers":{"type":["list","string"],"optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"routing_preference_internet_enabled":{"type":"bool","optional":true,"default":false},"scale_unit":{"type":"number","required":true},"tags":{"type":["map","string"],"optional":true},"virtual_hub_id":{"type":"string","required":true},"vpn_server_configuration_id":{"type":"string","required":true}},"block_types":{"connection_configuration":{"nesting_mode":3,"block":{"attributes":{"internet_security_enabled":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true}},"block_types":{"route":{"nesting_mode":3,"block":{"attributes":{"associated_route_table_id":{"type":"string","required":true},"inbound_route_map_id":{"type":"string","optional":true},"outbound_route_map_id":{"type":"string","optional":true}},"block_types":{"propagated_route_table":{"nesting_mode":3,"block":{"attributes":{"ids":{"type":["list","string"],"required":true},"labels":{"type":["set","string"],"optional":true}}},"optional":true}}},"optional":true,"computed":true},"vpn_client_address_pool":{"nesting_mode":3,"block":{"attributes":{"address_prefixes":{"type":["set","string"],"required":true}}},"required":true}}},"required":true}}}},"azurerm_policy_definition":{"block":{"attributes":{"description":{"type":"string","optional":true},"display_name":{"type":"string","required":true},"management_group_id":{"type":"string","optional":true},"metadata":{"type":"string","optional":true,"computed":true},"mode":{"type":"string","required":true},"name":{"type":"string","required":true},"parameters":{"type":"string","optional":true},"policy_rule":{"type":"string","optional":true},"policy_type":{"type":"string","required":true},"role_definition_ids":{"type":["list","string"],"computed":true}}}},"azurerm_policy_set_definition":{"block":{"attributes":{"description":{"type":"string","optional":true},"display_name":{"type":"string","required":true},"management_group_id":{"type":"string","optional":true},"metadata":{"type":"string","optional":true,"computed":true},"name":{"type":"string","required":true},"parameters":{"type":"string","optional":true},"policy_type":{"type":"string","required":true}},"block_types":{"policy_definition_group":{"nesting_mode":4,"block":{"attributes":{"additional_metadata_resource_id":{"type":"string","optional":true},"category":{"type":"string","optional":true},"description":{"type":"string","optional":true},"display_name":{"type":"string","optional":true},"name":{"type":"string","required":true}}},"optional":true},"policy_definition_reference":{"nesting_mode":3,"block":{"attributes":{"parameter_values":{"type":"string","optional":true},"policy_definition_id":{"type":"string","required":true},"policy_group_names":{"type":["set","string"],"optional":true},"reference_id":{"type":"string","optional":true,"computed":true}}},"required":true}}}},"azurerm_policy_virtual_machine_configuration_assignment":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"virtual_machine_id":{"type":"string","required":true}},"block_types":{"configuration":{"nesting_mode":3,"block":{"attributes":{"assignment_type":{"type":"string","optional":true},"content_hash":{"type":"string","optional":true,"computed":true},"content_uri":{"type":"string","optional":true,"computed":true},"version":{"type":"string","optional":true}},"block_types":{"parameter":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"required":true}}}},"azurerm_portal_dashboard":{"block":{"attributes":{"dashboard_properties":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_portal_tenant_configuration":{"block":{"attributes":{"private_markdown_storage_enforced":{"type":"bool","required":true}}}},"azurerm_postgresql_active_directory_administrator":{"block":{"attributes":{"login":{"type":"string","required":true},"object_id":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"server_name":{"type":"string","required":true},"tenant_id":{"type":"string","required":true}}}},"azurerm_postgresql_configuration":{"block":{"attributes":{"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"server_name":{"type":"string","required":true},"value":{"type":"string","required":true}}}},"azurerm_postgresql_database":{"block":{"attributes":{"charset":{"type":"string","required":true},"collation":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"server_name":{"type":"string","required":true}}}},"azurerm_postgresql_firewall_rule":{"block":{"attributes":{"end_ip_address":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"server_name":{"type":"string","required":true},"start_ip_address":{"type":"string","required":true}}}},"azurerm_postgresql_flexible_server":{"block":{"attributes":{"administrator_login":{"type":"string","optional":true,"computed":true},"administrator_password":{"type":"string","optional":true},"auto_grow_enabled":{"type":"bool","optional":true,"default":false},"backup_retention_days":{"type":"number","optional":true,"computed":true},"create_mode":{"type":"string","optional":true},"delegated_subnet_id":{"type":"string","optional":true},"fqdn":{"type":"string","computed":true},"geo_redundant_backup_enabled":{"type":"bool","optional":true,"default":false},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"point_in_time_restore_time_in_utc":{"type":"string","optional":true},"private_dns_zone_id":{"type":"string","optional":true,"computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"replication_role":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","optional":true,"computed":true},"source_server_id":{"type":"string","optional":true},"storage_mb":{"type":"number","optional":true,"computed":true},"storage_tier":{"type":"string","optional":true,"computed":true},"tags":{"type":["map","string"],"optional":true},"version":{"type":"string","optional":true,"computed":true},"zone":{"type":"string","optional":true}},"block_types":{"authentication":{"nesting_mode":3,"block":{"attributes":{"active_directory_auth_enabled":{"type":"bool","optional":true,"default":false},"password_auth_enabled":{"type":"bool","optional":true,"default":true},"tenant_id":{"type":"string","optional":true,"required_with":["authentication.0.active_directory_auth_enabled"]}}},"optional":true,"computed":true},"customer_managed_key":{"nesting_mode":3,"block":{"attributes":{"geo_backup_key_vault_key_id":{"type":"string","optional":true,"required_with":["identity","customer_managed_key.0.geo_backup_user_assigned_identity_id"]},"geo_backup_user_assigned_identity_id":{"type":"string","optional":true},"key_vault_key_id":{"type":"string","required":true,"required_with":["identity","customer_managed_key.0.primary_user_assigned_identity_id"]},"primary_user_assigned_identity_id":{"type":"string","optional":true}}},"optional":true},"high_availability":{"nesting_mode":3,"block":{"attributes":{"mode":{"type":"string","required":true},"standby_availability_zone":{"type":"string","optional":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"required":true},"type":{"type":"string","required":true}}},"optional":true},"maintenance_window":{"nesting_mode":3,"block":{"attributes":{"day_of_week":{"type":"number","optional":true,"default":0},"start_hour":{"type":"number","optional":true,"default":0},"start_minute":{"type":"number","optional":true,"default":0}}},"optional":true}}}},"azurerm_postgresql_flexible_server_active_directory_administrator":{"block":{"attributes":{"object_id":{"type":"string","required":true},"principal_name":{"type":"string","required":true},"principal_type":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"server_name":{"type":"string","required":true},"tenant_id":{"type":"string","required":true}}}},"azurerm_postgresql_flexible_server_configuration":{"block":{"attributes":{"name":{"type":"string","required":true},"server_id":{"type":"string","required":true},"value":{"type":"string","required":true}}}},"azurerm_postgresql_flexible_server_database":{"block":{"attributes":{"charset":{"type":"string","optional":true,"default":"UTF8"},"collation":{"type":"string","optional":true,"default":"en_US.utf8"},"name":{"type":"string","required":true},"server_id":{"type":"string","required":true}}}},"azurerm_postgresql_flexible_server_firewall_rule":{"block":{"attributes":{"end_ip_address":{"type":"string","required":true},"name":{"type":"string","required":true},"server_id":{"type":"string","required":true},"start_ip_address":{"type":"string","required":true}}}},"azurerm_postgresql_flexible_server_virtual_endpoint":{"block":{"attributes":{"name":{"type":"string","required":true},"replica_server_id":{"type":"string","required":true},"source_server_id":{"type":"string","required":true},"type":{"type":"string","required":true}}}},"azurerm_postgresql_server":{"block":{"attributes":{"administrator_login":{"type":"string","optional":true,"computed":true},"administrator_login_password":{"type":"string","optional":true},"auto_grow_enabled":{"type":"bool","optional":true,"default":true},"backup_retention_days":{"type":"number","optional":true,"computed":true},"create_mode":{"type":"string","optional":true,"default":"Default"},"creation_source_server_id":{"type":"string","optional":true},"fqdn":{"type":"string","computed":true},"geo_redundant_backup_enabled":{"type":"bool","optional":true,"default":false},"infrastructure_encryption_enabled":{"type":"bool","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"restore_point_in_time":{"type":"string","optional":true},"sku_name":{"type":"string","required":true},"ssl_enforcement_enabled":{"type":"bool","required":true},"ssl_minimal_tls_version_enforced":{"type":"string","optional":true,"default":"TLS1_2"},"storage_mb":{"type":"number","optional":true,"computed":true},"tags":{"type":["map","string"],"optional":true},"version":{"type":"string","required":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"threat_detection_policy":{"nesting_mode":3,"block":{"attributes":{"disabled_alerts":{"type":["set","string"],"optional":true,"at_least_one_of":["threat_detection_policy.0.enabled","threat_detection_policy.0.disabled_alerts","threat_detection_policy.0.email_account_admins","threat_detection_policy.0.email_addresses","threat_detection_policy.0.retention_days","threat_detection_policy.0.storage_account_access_key","threat_detection_policy.0.storage_endpoint"]},"email_account_admins":{"type":"bool","optional":true,"at_least_one_of":["threat_detection_policy.0.enabled","threat_detection_policy.0.disabled_alerts","threat_detection_policy.0.email_account_admins","threat_detection_policy.0.email_addresses","threat_detection_policy.0.retention_days","threat_detection_policy.0.storage_account_access_key","threat_detection_policy.0.storage_endpoint"]},"email_addresses":{"type":["set","string"],"optional":true,"at_least_one_of":["threat_detection_policy.0.enabled","threat_detection_policy.0.disabled_alerts","threat_detection_policy.0.email_account_admins","threat_detection_policy.0.email_addresses","threat_detection_policy.0.retention_days","threat_detection_policy.0.storage_account_access_key","threat_detection_policy.0.storage_endpoint"]},"enabled":{"type":"bool","optional":true,"at_least_one_of":["threat_detection_policy.0.enabled","threat_detection_policy.0.disabled_alerts","threat_detection_policy.0.email_account_admins","threat_detection_policy.0.email_addresses","threat_detection_policy.0.retention_days","threat_detection_policy.0.storage_account_access_key","threat_detection_policy.0.storage_endpoint"]},"retention_days":{"type":"number","optional":true,"at_least_one_of":["threat_detection_policy.0.enabled","threat_detection_policy.0.disabled_alerts","threat_detection_policy.0.email_account_admins","threat_detection_policy.0.email_addresses","threat_detection_policy.0.retention_days","threat_detection_policy.0.storage_account_access_key","threat_detection_policy.0.storage_endpoint"]},"storage_account_access_key":{"type":"string","optional":true,"at_least_one_of":["threat_detection_policy.0.enabled","threat_detection_policy.0.disabled_alerts","threat_detection_policy.0.email_account_admins","threat_detection_policy.0.email_addresses","threat_detection_policy.0.retention_days","threat_detection_policy.0.storage_account_access_key","threat_detection_policy.0.storage_endpoint"]},"storage_endpoint":{"type":"string","optional":true,"at_least_one_of":["threat_detection_policy.0.enabled","threat_detection_policy.0.disabled_alerts","threat_detection_policy.0.email_account_admins","threat_detection_policy.0.email_addresses","threat_detection_policy.0.retention_days","threat_detection_policy.0.storage_account_access_key","threat_detection_policy.0.storage_endpoint"]}}},"optional":true}}}},"azurerm_postgresql_server_key":{"block":{"attributes":{"key_vault_key_id":{"type":"string","required":true},"server_id":{"type":"string","required":true}}}},"azurerm_postgresql_virtual_network_rule":{"block":{"attributes":{"ignore_missing_vnet_service_endpoint":{"type":"bool","optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"server_name":{"type":"string","required":true},"subnet_id":{"type":"string","required":true}}}},"azurerm_powerbi_embedded":{"block":{"attributes":{"administrators":{"type":["set","string"],"required":true},"location":{"type":"string","required":true},"mode":{"type":"string","optional":true,"default":"Gen1"},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_private_dns_a_record":{"block":{"attributes":{"fqdn":{"type":"string","computed":true},"name":{"type":"string","required":true},"records":{"type":["set","string"],"required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"ttl":{"type":"number","required":true},"zone_name":{"type":"string","required":true}}}},"azurerm_private_dns_aaaa_record":{"block":{"attributes":{"fqdn":{"type":"string","computed":true},"name":{"type":"string","required":true},"records":{"type":["set","string"],"required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"ttl":{"type":"number","required":true},"zone_name":{"type":"string","required":true}}}},"azurerm_private_dns_cname_record":{"block":{"attributes":{"fqdn":{"type":"string","computed":true},"name":{"type":"string","required":true},"record":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"ttl":{"type":"number","required":true},"zone_name":{"type":"string","required":true}}}},"azurerm_private_dns_mx_record":{"block":{"attributes":{"fqdn":{"type":"string","computed":true},"name":{"type":"string","optional":true,"default":"@"},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"ttl":{"type":"number","required":true},"zone_name":{"type":"string","required":true}},"block_types":{"record":{"nesting_mode":4,"block":{"attributes":{"exchange":{"type":"string","required":true},"preference":{"type":"number","required":true}}},"required":true}}}},"azurerm_private_dns_ptr_record":{"block":{"attributes":{"fqdn":{"type":"string","computed":true},"name":{"type":"string","required":true},"records":{"type":["set","string"],"required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"ttl":{"type":"number","required":true},"zone_name":{"type":"string","required":true}}}},"azurerm_private_dns_resolver":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"virtual_network_id":{"type":"string","required":true}}}},"azurerm_private_dns_resolver_dns_forwarding_ruleset":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"private_dns_resolver_outbound_endpoint_ids":{"type":["list","string"],"required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_private_dns_resolver_forwarding_rule":{"block":{"attributes":{"dns_forwarding_ruleset_id":{"type":"string","required":true},"domain_name":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":true},"metadata":{"type":["map","string"],"optional":true},"name":{"type":"string","required":true}},"block_types":{"target_dns_servers":{"nesting_mode":3,"block":{"attributes":{"ip_address":{"type":"string","required":true},"port":{"type":"number","optional":true}}},"required":true}}}},"azurerm_private_dns_resolver_inbound_endpoint":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"private_dns_resolver_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"ip_configurations":{"nesting_mode":3,"block":{"attributes":{"private_ip_address":{"type":"string","optional":true,"computed":true},"private_ip_allocation_method":{"type":"string","optional":true,"default":"Dynamic"},"subnet_id":{"type":"string","required":true}}},"required":true}}}},"azurerm_private_dns_resolver_outbound_endpoint":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"private_dns_resolver_id":{"type":"string","required":true},"subnet_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_private_dns_resolver_virtual_network_link":{"block":{"attributes":{"dns_forwarding_ruleset_id":{"type":"string","required":true},"metadata":{"type":["map","string"],"optional":true},"name":{"type":"string","required":true},"virtual_network_id":{"type":"string","required":true}}}},"azurerm_private_dns_srv_record":{"block":{"attributes":{"fqdn":{"type":"string","computed":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"ttl":{"type":"number","required":true},"zone_name":{"type":"string","required":true}},"block_types":{"record":{"nesting_mode":4,"block":{"attributes":{"port":{"type":"number","required":true},"priority":{"type":"number","required":true},"target":{"type":"string","required":true},"weight":{"type":"number","required":true}}},"required":true}}}},"azurerm_private_dns_txt_record":{"block":{"attributes":{"fqdn":{"type":"string","computed":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"ttl":{"type":"number","required":true},"zone_name":{"type":"string","required":true}},"block_types":{"record":{"nesting_mode":4,"block":{"attributes":{"value":{"type":"string","required":true}}},"required":true}}}},"azurerm_private_dns_zone":{"block":{"attributes":{"max_number_of_record_sets":{"type":"number","computed":true},"max_number_of_virtual_network_links":{"type":"number","computed":true},"max_number_of_virtual_network_links_with_registration":{"type":"number","computed":true},"name":{"type":"string","required":true},"number_of_record_sets":{"type":"number","computed":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"soa_record":{"nesting_mode":3,"block":{"attributes":{"email":{"type":"string","required":true},"expire_time":{"type":"number","optional":true,"default":2419200},"fqdn":{"type":"string","computed":true},"host_name":{"type":"string","computed":true},"minimum_ttl":{"type":"number","optional":true,"default":10},"refresh_time":{"type":"number","optional":true,"default":3600},"retry_time":{"type":"number","optional":true,"default":300},"serial_number":{"type":"number","computed":true},"tags":{"type":["map","string"],"optional":true},"ttl":{"type":"number","optional":true,"default":3600}}},"optional":true,"computed":true}}}},"azurerm_private_dns_zone_virtual_network_link":{"block":{"attributes":{"name":{"type":"string","required":true},"private_dns_zone_name":{"type":"string","required":true},"registration_enabled":{"type":"bool","optional":true,"default":false},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"virtual_network_id":{"type":"string","required":true}}}},"azurerm_private_endpoint":{"block":{"attributes":{"custom_dns_configs":{"type":["list",["object",{"fqdn":"string","ip_addresses":["list","string"]}]],"computed":true},"custom_network_interface_name":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"network_interface":{"type":["list",["object",{"id":"string","name":"string"}]],"computed":true},"private_dns_zone_configs":{"type":["list",["object",{"id":"string","name":"string","private_dns_zone_id":"string","record_sets":["list",["object",{"fqdn":"string","ip_addresses":["list","string"],"name":"string","ttl":"number","type":"string"}]]}]],"computed":true},"resource_group_name":{"type":"string","required":true},"subnet_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"ip_configuration":{"nesting_mode":3,"block":{"attributes":{"member_name":{"type":"string","optional":true,"computed":true},"name":{"type":"string","required":true},"private_ip_address":{"type":"string","required":true},"subresource_name":{"type":"string","optional":true}}},"optional":true},"private_dns_zone_group":{"nesting_mode":3,"block":{"attributes":{"id":{"type":"string","computed":true},"name":{"type":"string","required":true},"private_dns_zone_ids":{"type":["list","string"],"required":true}}},"optional":true},"private_service_connection":{"nesting_mode":3,"block":{"attributes":{"is_manual_connection":{"type":"bool","required":true},"name":{"type":"string","required":true},"private_connection_resource_alias":{"type":"string","optional":true,"exactly_one_of":["private_service_connection.0.private_connection_resource_alias","private_service_connection.0.private_connection_resource_id"]},"private_connection_resource_id":{"type":"string","optional":true,"exactly_one_of":["private_service_connection.0.private_connection_resource_alias","private_service_connection.0.private_connection_resource_id"]},"private_ip_address":{"type":"string","computed":true},"request_message":{"type":"string","optional":true},"subresource_names":{"type":["list","string"],"optional":true}}},"required":true}}}},"azurerm_private_endpoint_application_security_group_association":{"block":{"attributes":{"application_security_group_id":{"type":"string","required":true},"private_endpoint_id":{"type":"string","required":true}}}},"azurerm_private_link_service":{"block":{"attributes":{"alias":{"type":"string","computed":true},"auto_approval_subscription_ids":{"type":["set","string"],"optional":true},"enable_proxy_protocol":{"type":"bool","optional":true},"fqdns":{"type":["list","string"],"optional":true},"load_balancer_frontend_ip_configuration_ids":{"type":["set","string"],"required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"visibility_subscription_ids":{"type":["set","string"],"optional":true}},"block_types":{"nat_ip_configuration":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"primary":{"type":"bool","required":true},"private_ip_address":{"type":"string","optional":true},"private_ip_address_version":{"type":"string","optional":true,"default":"IPv4"},"subnet_id":{"type":"string","required":true}}},"required":true}}}},"azurerm_proximity_placement_group":{"block":{"attributes":{"allowed_vm_sizes":{"type":["set","string"],"optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"zone":{"type":"string","optional":true,"required_with":["allowed_vm_sizes"]}}}},"azurerm_public_ip":{"block":{"attributes":{"allocation_method":{"type":"string","required":true},"ddos_protection_mode":{"type":"string","optional":true,"default":"VirtualNetworkInherited"},"ddos_protection_plan_id":{"type":"string","optional":true},"domain_name_label":{"type":"string","optional":true},"domain_name_label_scope":{"type":"string","optional":true},"edge_zone":{"type":"string","optional":true},"fqdn":{"type":"string","computed":true},"idle_timeout_in_minutes":{"type":"number","optional":true,"default":4},"ip_address":{"type":"string","computed":true},"ip_tags":{"type":["map","string"],"optional":true},"ip_version":{"type":"string","optional":true,"default":"IPv4"},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"public_ip_prefix_id":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"reverse_fqdn":{"type":"string","optional":true},"sku":{"type":"string","optional":true,"default":"Standard"},"sku_tier":{"type":"string","optional":true,"default":"Regional"},"tags":{"type":["map","string"],"optional":true},"zones":{"type":["set","string"],"optional":true}}}},"azurerm_public_ip_prefix":{"block":{"attributes":{"ip_prefix":{"type":"string","computed":true},"ip_version":{"type":"string","optional":true,"default":"IPv4"},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"prefix_length":{"type":"number","optional":true,"default":28},"resource_group_name":{"type":"string","required":true},"sku":{"type":"string","optional":true,"default":"Standard"},"sku_tier":{"type":"string","optional":true,"default":"Regional"},"tags":{"type":["map","string"],"optional":true},"zones":{"type":["set","string"],"optional":true}}}},"azurerm_purview_account":{"block":{"attributes":{"atlas_kafka_endpoint_primary_connection_string":{"type":"string","computed":true},"atlas_kafka_endpoint_secondary_connection_string":{"type":"string","computed":true},"catalog_endpoint":{"type":"string","computed":true},"guardian_endpoint":{"type":"string","computed":true},"location":{"type":"string","required":true},"managed_resource_group_name":{"type":"string","optional":true,"computed":true},"managed_resources":{"type":["list",["object",{"event_hub_namespace_id":"string","resource_group_id":"string","storage_account_id":"string"}]],"computed":true},"name":{"type":"string","required":true},"public_network_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"scan_endpoint":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"required":true}}}},"azurerm_recovery_services_vault":{"block":{"attributes":{"classic_vmware_replication_enabled":{"type":"bool","optional":true},"cross_region_restore_enabled":{"type":"bool","optional":true,"default":false},"immutability":{"type":"string","optional":true,"computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"sku":{"type":"string","required":true},"soft_delete_enabled":{"type":"bool","optional":true,"default":true},"storage_mode_type":{"type":"string","optional":true,"default":"GeoRedundant"},"tags":{"type":["map","string"],"optional":true}},"block_types":{"encryption":{"nesting_mode":3,"block":{"attributes":{"infrastructure_encryption_enabled":{"type":"bool","required":true},"key_id":{"type":"string","required":true},"use_system_assigned_identity":{"type":"bool","optional":true,"default":true},"user_assigned_identity_id":{"type":"string","optional":true}}},"optional":true,"required_with":["identity"]},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"monitoring":{"nesting_mode":3,"block":{"attributes":{"alerts_for_all_job_failures_enabled":{"type":"bool","optional":true,"default":true},"alerts_for_critical_operation_failures_enabled":{"type":"bool","optional":true,"default":true}}},"optional":true}}}},"azurerm_recovery_services_vault_resource_guard_association":{"block":{"attributes":{"resource_guard_id":{"type":"string","required":true},"vault_id":{"type":"string","required":true}}}},"azurerm_redhat_openshift_cluster":{"block":{"attributes":{"console_url":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"api_server_profile":{"nesting_mode":3,"block":{"attributes":{"ip_address":{"type":"string","computed":true},"url":{"type":"string","computed":true},"visibility":{"type":"string","required":true}}},"required":true},"cluster_profile":{"nesting_mode":3,"block":{"attributes":{"domain":{"type":"string","required":true},"fips_enabled":{"type":"bool","optional":true,"default":false},"managed_resource_group_name":{"type":"string","optional":true},"pull_secret":{"type":"string","optional":true},"resource_group_id":{"type":"string","computed":true},"version":{"type":"string","required":true}}},"required":true},"ingress_profile":{"nesting_mode":3,"block":{"attributes":{"ip_address":{"type":"string","computed":true},"name":{"type":"string","computed":true},"visibility":{"type":"string","required":true}}},"required":true},"main_profile":{"nesting_mode":3,"block":{"attributes":{"disk_encryption_set_id":{"type":"string","optional":true},"encryption_at_host_enabled":{"type":"bool","optional":true,"default":false},"subnet_id":{"type":"string","required":true},"vm_size":{"type":"string","required":true}}},"required":true},"network_profile":{"nesting_mode":3,"block":{"attributes":{"outbound_type":{"type":"string","optional":true,"default":"Loadbalancer"},"pod_cidr":{"type":"string","required":true},"preconfigured_network_security_group_enabled":{"type":"bool","optional":true,"default":false},"service_cidr":{"type":"string","required":true}}},"required":true},"service_principal":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","required":true}}},"required":true},"worker_profile":{"nesting_mode":3,"block":{"attributes":{"disk_encryption_set_id":{"type":"string","optional":true},"disk_size_gb":{"type":"number","required":true},"encryption_at_host_enabled":{"type":"bool","optional":true,"default":false},"node_count":{"type":"number","required":true},"subnet_id":{"type":"string","required":true},"vm_size":{"type":"string","required":true}}},"required":true}}}},"azurerm_redis_cache":{"block":{"attributes":{"access_keys_authentication_enabled":{"type":"bool","optional":true,"default":true},"capacity":{"type":"number","required":true},"family":{"type":"string","required":true},"hostname":{"type":"string","computed":true},"location":{"type":"string","required":true},"minimum_tls_version":{"type":"string","optional":true,"default":"1.2"},"name":{"type":"string","required":true},"non_ssl_port_enabled":{"type":"bool","optional":true,"default":false},"port":{"type":"number","computed":true},"primary_access_key":{"type":"string","computed":true},"primary_connection_string":{"type":"string","computed":true},"private_static_ip_address":{"type":"string","optional":true,"computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"redis_version":{"type":"string","optional":true,"default":6},"replicas_per_master":{"type":"number","optional":true,"computed":true},"replicas_per_primary":{"type":"number","optional":true,"computed":true},"resource_group_name":{"type":"string","required":true},"secondary_access_key":{"type":"string","computed":true},"secondary_connection_string":{"type":"string","computed":true},"shard_count":{"type":"number","optional":true},"sku_name":{"type":"string","required":true},"ssl_port":{"type":"number","computed":true},"subnet_id":{"type":"string","optional":true},"tags":{"type":["map","string"],"optional":true},"tenant_settings":{"type":["map","string"],"optional":true},"zones":{"type":["set","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"patch_schedule":{"nesting_mode":3,"block":{"attributes":{"day_of_week":{"type":"string","required":true},"maintenance_window":{"type":"string","optional":true,"default":"PT5H"},"start_hour_utc":{"type":"number","optional":true}}},"optional":true},"redis_configuration":{"nesting_mode":3,"block":{"attributes":{"active_directory_authentication_enabled":{"type":"bool","optional":true},"aof_backup_enabled":{"type":"bool","optional":true},"aof_storage_connection_string_0":{"type":"string","optional":true},"aof_storage_connection_string_1":{"type":"string","optional":true},"authentication_enabled":{"type":"bool","optional":true,"default":true},"data_persistence_authentication_method":{"type":"string","optional":true},"maxclients":{"type":"number","computed":true},"maxfragmentationmemory_reserved":{"type":"number","optional":true,"computed":true},"maxmemory_delta":{"type":"number","optional":true,"computed":true},"maxmemory_policy":{"type":"string","optional":true,"default":"volatile-lru"},"maxmemory_reserved":{"type":"number","optional":true,"computed":true},"notify_keyspace_events":{"type":"string","optional":true},"rdb_backup_enabled":{"type":"bool","optional":true},"rdb_backup_frequency":{"type":"number","optional":true},"rdb_backup_max_snapshot_count":{"type":"number","optional":true},"rdb_storage_connection_string":{"type":"string","optional":true},"storage_account_subscription_id":{"type":"string","optional":true}}},"optional":true,"computed":true}}}},"azurerm_redis_cache_access_policy":{"block":{"attributes":{"name":{"type":"string","required":true},"permissions":{"type":"string","required":true},"redis_cache_id":{"type":"string","required":true}}}},"azurerm_redis_cache_access_policy_assignment":{"block":{"attributes":{"access_policy_name":{"type":"string","required":true},"name":{"type":"string","required":true},"object_id":{"type":"string","required":true},"object_id_alias":{"type":"string","required":true},"redis_cache_id":{"type":"string","required":true}}}},"azurerm_redis_enterprise_cluster":{"block":{"attributes":{"hostname":{"type":"string","computed":true},"location":{"type":"string","required":true},"minimum_tls_version":{"type":"string","optional":true,"default":"1.2"},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"zones":{"type":["set","string"],"optional":true}}}},"azurerm_redis_enterprise_database":{"block":{"attributes":{"client_protocol":{"type":"string","optional":true,"default":"Encrypted"},"cluster_id":{"type":"string","required":true},"clustering_policy":{"type":"string","optional":true,"default":"OSSCluster"},"eviction_policy":{"type":"string","optional":true,"default":"VolatileLRU"},"linked_database_group_nickname":{"type":"string","optional":true,"required_with":["linked_database_id"]},"linked_database_id":{"type":["set","string"],"optional":true},"name":{"type":"string","optional":true,"default":"default"},"port":{"type":"number","optional":true,"default":10000},"primary_access_key":{"type":"string","computed":true},"secondary_access_key":{"type":"string","computed":true}},"block_types":{"module":{"nesting_mode":3,"block":{"attributes":{"args":{"type":"string","optional":true,"default":""},"name":{"type":"string","required":true},"version":{"type":"string","computed":true}}},"optional":true}}}},"azurerm_redis_firewall_rule":{"block":{"attributes":{"end_ip":{"type":"string","required":true},"name":{"type":"string","required":true},"redis_cache_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"start_ip":{"type":"string","required":true}}}},"azurerm_redis_linked_server":{"block":{"attributes":{"geo_replicated_primary_host_name":{"type":"string","computed":true},"linked_redis_cache_id":{"type":"string","required":true},"linked_redis_cache_location":{"type":"string","required":true},"name":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"server_role":{"type":"string","required":true},"target_redis_cache_name":{"type":"string","required":true}}}},"azurerm_relay_hybrid_connection":{"block":{"attributes":{"name":{"type":"string","required":true},"relay_namespace_name":{"type":"string","required":true},"requires_client_authorization":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"user_metadata":{"type":"string","optional":true}}}},"azurerm_relay_hybrid_connection_authorization_rule":{"block":{"attributes":{"hybrid_connection_name":{"type":"string","required":true},"listen":{"type":"bool","optional":true,"default":false},"manage":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"namespace_name":{"type":"string","required":true},"primary_connection_string":{"type":"string","computed":true},"primary_key":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"secondary_connection_string":{"type":"string","computed":true},"secondary_key":{"type":"string","computed":true},"send":{"type":"bool","optional":true,"default":false}}}},"azurerm_relay_namespace":{"block":{"attributes":{"location":{"type":"string","required":true},"metric_id":{"type":"string","computed":true},"name":{"type":"string","required":true},"primary_connection_string":{"type":"string","computed":true},"primary_key":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"secondary_connection_string":{"type":"string","computed":true},"secondary_key":{"type":"string","computed":true},"sku_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_relay_namespace_authorization_rule":{"block":{"attributes":{"listen":{"type":"bool","optional":true,"default":false},"manage":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"namespace_name":{"type":"string","required":true},"primary_connection_string":{"type":"string","computed":true},"primary_key":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"secondary_connection_string":{"type":"string","computed":true},"secondary_key":{"type":"string","computed":true},"send":{"type":"bool","optional":true,"default":false}}}},"azurerm_resource_deployment_script_azure_cli":{"block":{"attributes":{"cleanup_preference":{"type":"string","optional":true,"default":"Always"},"command_line":{"type":"string","optional":true},"force_update_tag":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"outputs":{"type":"string","computed":true},"primary_script_uri":{"type":"string","optional":true,"exactly_one_of":["primary_script_uri","script_content"]},"resource_group_name":{"type":"string","required":true},"retention_interval":{"type":"string","required":true},"script_content":{"type":"string","optional":true,"exactly_one_of":["primary_script_uri","script_content"]},"supporting_script_uris":{"type":["list","string"],"optional":true},"tags":{"type":["map","string"],"optional":true},"timeout":{"type":"string","optional":true,"default":"P1D"},"version":{"type":"string","required":true}},"block_types":{"container":{"nesting_mode":3,"block":{"attributes":{"container_group_name":{"type":"string","optional":true}}},"optional":true},"environment_variable":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"secure_value":{"type":"string","optional":true},"value":{"type":"string","optional":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"required":true},"type":{"type":"string","required":true}}},"optional":true},"storage_account":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"name":{"type":"string","required":true}}},"optional":true}}}},"azurerm_resource_deployment_script_azure_power_shell":{"block":{"attributes":{"cleanup_preference":{"type":"string","optional":true,"default":"Always"},"command_line":{"type":"string","optional":true},"force_update_tag":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"outputs":{"type":"string","computed":true},"primary_script_uri":{"type":"string","optional":true,"exactly_one_of":["primary_script_uri","script_content"]},"resource_group_name":{"type":"string","required":true},"retention_interval":{"type":"string","required":true},"script_content":{"type":"string","optional":true,"exactly_one_of":["primary_script_uri","script_content"]},"supporting_script_uris":{"type":["list","string"],"optional":true},"tags":{"type":["map","string"],"optional":true},"timeout":{"type":"string","optional":true,"default":"P1D"},"version":{"type":"string","required":true}},"block_types":{"container":{"nesting_mode":3,"block":{"attributes":{"container_group_name":{"type":"string","optional":true}}},"optional":true},"environment_variable":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"secure_value":{"type":"string","optional":true},"value":{"type":"string","optional":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"required":true},"type":{"type":"string","required":true}}},"optional":true},"storage_account":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"name":{"type":"string","required":true}}},"optional":true}}}},"azurerm_resource_group":{"block":{"attributes":{"location":{"type":"string","required":true},"managed_by":{"type":"string","optional":true},"name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_resource_group_cost_management_export":{"block":{"attributes":{"active":{"type":"bool","optional":true,"default":true},"file_format":{"type":"string","optional":true,"default":"Csv"},"name":{"type":"string","required":true},"recurrence_period_end_date":{"type":"string","required":true},"recurrence_period_start_date":{"type":"string","required":true},"recurrence_type":{"type":"string","required":true},"resource_group_id":{"type":"string","required":true}},"block_types":{"export_data_options":{"nesting_mode":3,"block":{"attributes":{"time_frame":{"type":"string","required":true},"type":{"type":"string","required":true}}},"required":true},"export_data_storage_location":{"nesting_mode":3,"block":{"attributes":{"container_id":{"type":"string","required":true},"root_folder_path":{"type":"string","required":true}}},"required":true}}}},"azurerm_resource_group_cost_management_view":{"block":{"attributes":{"accumulated":{"type":"bool","required":true},"chart_type":{"type":"string","required":true},"display_name":{"type":"string","required":true},"name":{"type":"string","required":true},"report_type":{"type":"string","required":true},"resource_group_id":{"type":"string","required":true},"timeframe":{"type":"string","required":true}},"block_types":{"dataset":{"nesting_mode":3,"block":{"attributes":{"granularity":{"type":"string","required":true}},"block_types":{"aggregation":{"nesting_mode":4,"block":{"attributes":{"column_name":{"type":"string","required":true},"name":{"type":"string","required":true}}},"required":true},"grouping":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"type":{"type":"string","required":true}}},"optional":true},"sorting":{"nesting_mode":3,"block":{"attributes":{"direction":{"type":"string","required":true},"name":{"type":"string","required":true}}},"optional":true}}},"required":true},"kpi":{"nesting_mode":3,"block":{"attributes":{"type":{"type":"string","required":true}}},"optional":true},"pivot":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_resource_group_policy_assignment":{"block":{"attributes":{"description":{"type":"string","optional":true},"display_name":{"type":"string","optional":true},"enforce":{"type":"bool","optional":true,"default":true},"location":{"type":"string","optional":true},"metadata":{"type":"string","optional":true,"computed":true},"name":{"type":"string","required":true},"not_scopes":{"type":["list","string"],"optional":true},"parameters":{"type":"string","optional":true},"policy_definition_id":{"type":"string","required":true},"resource_group_id":{"type":"string","required":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"non_compliance_message":{"nesting_mode":3,"block":{"attributes":{"content":{"type":"string","required":true},"policy_definition_reference_id":{"type":"string","optional":true}}},"optional":true},"overrides":{"nesting_mode":3,"block":{"attributes":{"value":{"type":"string","required":true}},"block_types":{"selectors":{"nesting_mode":3,"block":{"attributes":{"in":{"type":["list","string"],"optional":true},"kind":{"type":"string","computed":true},"not_in":{"type":["list","string"],"optional":true}}},"optional":true}}},"optional":true},"resource_selectors":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","optional":true}},"block_types":{"selectors":{"nesting_mode":3,"block":{"attributes":{"in":{"type":["list","string"],"optional":true},"kind":{"type":"string","required":true},"not_in":{"type":["list","string"],"optional":true}}},"required":true}}},"optional":true}}}},"azurerm_resource_group_policy_exemption":{"block":{"attributes":{"description":{"type":"string","optional":true},"display_name":{"type":"string","optional":true},"exemption_category":{"type":"string","required":true},"expires_on":{"type":"string","optional":true},"metadata":{"type":"string","optional":true,"computed":true},"name":{"type":"string","required":true},"policy_assignment_id":{"type":"string","required":true},"policy_definition_reference_ids":{"type":["list","string"],"optional":true},"resource_group_id":{"type":"string","required":true}}}},"azurerm_resource_group_policy_remediation":{"block":{"attributes":{"failure_percentage":{"type":"number","optional":true},"location_filters":{"type":["list","string"],"optional":true},"name":{"type":"string","required":true},"parallel_deployments":{"type":"number","optional":true},"policy_assignment_id":{"type":"string","required":true},"policy_definition_reference_id":{"type":"string","optional":true},"resource_count":{"type":"number","optional":true},"resource_discovery_mode":{"type":"string","optional":true,"default":"ExistingNonCompliant"},"resource_group_id":{"type":"string","required":true}}}},"azurerm_resource_group_template_deployment":{"block":{"attributes":{"debug_level":{"type":"string","optional":true},"deployment_mode":{"type":"string","required":true},"name":{"type":"string","required":true},"output_content":{"type":"string","computed":true},"parameters_content":{"type":"string","optional":true,"computed":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"template_content":{"type":"string","optional":true,"computed":true,"exactly_one_of":["template_content","template_spec_version_id"]},"template_spec_version_id":{"type":"string","optional":true,"exactly_one_of":["template_content","template_spec_version_id"]}}}},"azurerm_resource_management_private_link":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_resource_management_private_link_association":{"block":{"attributes":{"management_group_id":{"type":"string","required":true},"name":{"type":"string","optional":true},"public_network_access_enabled":{"type":"bool","required":true},"resource_management_private_link_id":{"type":"string","required":true},"tenant_id":{"type":"string","computed":true}}}},"azurerm_resource_policy_assignment":{"block":{"attributes":{"description":{"type":"string","optional":true},"display_name":{"type":"string","optional":true},"enforce":{"type":"bool","optional":true,"default":true},"location":{"type":"string","optional":true},"metadata":{"type":"string","optional":true,"computed":true},"name":{"type":"string","required":true},"not_scopes":{"type":["list","string"],"optional":true},"parameters":{"type":"string","optional":true},"policy_definition_id":{"type":"string","required":true},"resource_id":{"type":"string","required":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"non_compliance_message":{"nesting_mode":3,"block":{"attributes":{"content":{"type":"string","required":true},"policy_definition_reference_id":{"type":"string","optional":true}}},"optional":true},"overrides":{"nesting_mode":3,"block":{"attributes":{"value":{"type":"string","required":true}},"block_types":{"selectors":{"nesting_mode":3,"block":{"attributes":{"in":{"type":["list","string"],"optional":true},"kind":{"type":"string","computed":true},"not_in":{"type":["list","string"],"optional":true}}},"optional":true}}},"optional":true},"resource_selectors":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","optional":true}},"block_types":{"selectors":{"nesting_mode":3,"block":{"attributes":{"in":{"type":["list","string"],"optional":true},"kind":{"type":"string","required":true},"not_in":{"type":["list","string"],"optional":true}}},"required":true}}},"optional":true}}}},"azurerm_resource_policy_exemption":{"block":{"attributes":{"description":{"type":"string","optional":true},"display_name":{"type":"string","optional":true},"exemption_category":{"type":"string","required":true},"expires_on":{"type":"string","optional":true},"metadata":{"type":"string","optional":true,"computed":true},"name":{"type":"string","required":true},"policy_assignment_id":{"type":"string","required":true},"policy_definition_reference_ids":{"type":["list","string"],"optional":true},"resource_id":{"type":"string","required":true}}}},"azurerm_resource_policy_remediation":{"block":{"attributes":{"failure_percentage":{"type":"number","optional":true},"location_filters":{"type":["list","string"],"optional":true},"name":{"type":"string","required":true},"parallel_deployments":{"type":"number","optional":true},"policy_assignment_id":{"type":"string","required":true},"policy_definition_reference_id":{"type":"string","optional":true},"resource_count":{"type":"number","optional":true},"resource_discovery_mode":{"type":"string","optional":true,"default":"ExistingNonCompliant"},"resource_id":{"type":"string","required":true}}}},"azurerm_resource_provider_registration":{"block":{"attributes":{"name":{"type":"string","required":true}},"block_types":{"feature":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"registered":{"type":"bool","required":true}}},"optional":true}}}},"azurerm_restore_point_collection":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"source_virtual_machine_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_role_assignment":{"block":{"attributes":{"condition":{"type":"string","optional":true},"condition_version":{"type":"string","optional":true,"computed":true},"delegated_managed_identity_resource_id":{"type":"string","optional":true},"description":{"type":"string","optional":true},"name":{"type":"string","optional":true,"computed":true},"principal_id":{"type":"string","required":true},"principal_type":{"type":"string","optional":true,"computed":true},"role_definition_id":{"type":"string","optional":true,"computed":true,"conflicts_with":["role_definition_name"]},"role_definition_name":{"type":"string","optional":true,"computed":true,"conflicts_with":["role_definition_id"]},"scope":{"type":"string","required":true},"skip_service_principal_aad_check":{"type":"bool","optional":true,"computed":true}}}},"azurerm_role_definition":{"block":{"attributes":{"assignable_scopes":{"type":["list","string"],"optional":true,"computed":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"role_definition_id":{"type":"string","optional":true,"computed":true},"role_definition_resource_id":{"type":"string","computed":true},"scope":{"type":"string","required":true}},"block_types":{"permissions":{"nesting_mode":3,"block":{"attributes":{"actions":{"type":["list","string"],"optional":true},"data_actions":{"type":["set","string"],"optional":true},"not_actions":{"type":["list","string"],"optional":true},"not_data_actions":{"type":["set","string"],"optional":true}}},"optional":true}}}},"azurerm_role_management_policy":{"block":{"attributes":{"description":{"type":"string","computed":true},"name":{"type":"string","computed":true},"role_definition_id":{"type":"string","required":true},"scope":{"type":"string","required":true}},"block_types":{"activation_rules":{"nesting_mode":3,"block":{"attributes":{"maximum_duration":{"type":"string","optional":true,"computed":true},"require_approval":{"type":"bool","optional":true,"computed":true},"require_justification":{"type":"bool","optional":true,"computed":true},"require_multifactor_authentication":{"type":"bool","optional":true,"computed":true,"conflicts_with":["activation_rules.0.required_conditional_access_authentication_context"]},"require_ticket_info":{"type":"bool","optional":true,"computed":true},"required_conditional_access_authentication_context":{"type":"string","optional":true,"computed":true,"conflicts_with":["activation_rules.0.require_multifactor_authentication"]}},"block_types":{"approval_stage":{"nesting_mode":3,"block":{"block_types":{"primary_approver":{"nesting_mode":4,"block":{"attributes":{"object_id":{"type":"string","required":true},"type":{"type":"string","required":true}}},"required":true}}},"optional":true}}},"optional":true,"computed":true},"active_assignment_rules":{"nesting_mode":3,"block":{"attributes":{"expiration_required":{"type":"bool","optional":true,"computed":true},"expire_after":{"type":"string","optional":true,"computed":true},"require_justification":{"type":"bool","optional":true,"computed":true},"require_multifactor_authentication":{"type":"bool","optional":true,"computed":true},"require_ticket_info":{"type":"bool","optional":true,"computed":true}}},"optional":true,"computed":true},"eligible_assignment_rules":{"nesting_mode":3,"block":{"attributes":{"expiration_required":{"type":"bool","optional":true,"computed":true},"expire_after":{"type":"string","optional":true,"computed":true}}},"optional":true,"computed":true},"notification_rules":{"nesting_mode":3,"block":{"block_types":{"active_assignments":{"nesting_mode":3,"block":{"block_types":{"admin_notifications":{"nesting_mode":3,"block":{"attributes":{"additional_recipients":{"type":["set","string"],"optional":true,"computed":true},"default_recipients":{"type":"bool","required":true},"notification_level":{"type":"string","required":true}}},"optional":true,"computed":true},"approver_notifications":{"nesting_mode":3,"block":{"attributes":{"additional_recipients":{"type":["set","string"],"optional":true,"computed":true},"default_recipients":{"type":"bool","required":true},"notification_level":{"type":"string","required":true}}},"optional":true,"computed":true},"assignee_notifications":{"nesting_mode":3,"block":{"attributes":{"additional_recipients":{"type":["set","string"],"optional":true,"computed":true},"default_recipients":{"type":"bool","required":true},"notification_level":{"type":"string","required":true}}},"optional":true,"computed":true}}},"optional":true,"computed":true},"eligible_activations":{"nesting_mode":3,"block":{"block_types":{"admin_notifications":{"nesting_mode":3,"block":{"attributes":{"additional_recipients":{"type":["set","string"],"optional":true,"computed":true},"default_recipients":{"type":"bool","required":true},"notification_level":{"type":"string","required":true}}},"optional":true,"computed":true},"approver_notifications":{"nesting_mode":3,"block":{"attributes":{"additional_recipients":{"type":["set","string"],"optional":true,"computed":true},"default_recipients":{"type":"bool","required":true},"notification_level":{"type":"string","required":true}}},"optional":true,"computed":true},"assignee_notifications":{"nesting_mode":3,"block":{"attributes":{"additional_recipients":{"type":["set","string"],"optional":true,"computed":true},"default_recipients":{"type":"bool","required":true},"notification_level":{"type":"string","required":true}}},"optional":true,"computed":true}}},"optional":true,"computed":true},"eligible_assignments":{"nesting_mode":3,"block":{"block_types":{"admin_notifications":{"nesting_mode":3,"block":{"attributes":{"additional_recipients":{"type":["set","string"],"optional":true,"computed":true},"default_recipients":{"type":"bool","required":true},"notification_level":{"type":"string","required":true}}},"optional":true,"computed":true},"approver_notifications":{"nesting_mode":3,"block":{"attributes":{"additional_recipients":{"type":["set","string"],"optional":true,"computed":true},"default_recipients":{"type":"bool","required":true},"notification_level":{"type":"string","required":true}}},"optional":true,"computed":true},"assignee_notifications":{"nesting_mode":3,"block":{"attributes":{"additional_recipients":{"type":["set","string"],"optional":true,"computed":true},"default_recipients":{"type":"bool","required":true},"notification_level":{"type":"string","required":true}}},"optional":true,"computed":true}}},"optional":true,"computed":true}}},"optional":true,"computed":true}}}},"azurerm_route":{"block":{"attributes":{"address_prefix":{"type":"string","required":true},"name":{"type":"string","required":true},"next_hop_in_ip_address":{"type":"string","optional":true},"next_hop_type":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"route_table_name":{"type":"string","required":true}}}},"azurerm_route_filter":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"rule":{"type":["list",["object",{"access":"string","communities":["list","string"],"name":"string","rule_type":"string"}]],"optional":true,"computed":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_route_map":{"block":{"attributes":{"name":{"type":"string","required":true},"virtual_hub_id":{"type":"string","required":true}},"block_types":{"rule":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"next_step_if_matched":{"type":"string","optional":true,"default":"Unknown"}},"block_types":{"action":{"nesting_mode":3,"block":{"attributes":{"type":{"type":"string","required":true}},"block_types":{"parameter":{"nesting_mode":3,"block":{"attributes":{"as_path":{"type":["list","string"],"optional":true},"community":{"type":["list","string"],"optional":true},"route_prefix":{"type":["list","string"],"optional":true}}},"optional":true}}},"optional":true},"match_criterion":{"nesting_mode":3,"block":{"attributes":{"as_path":{"type":["list","string"],"optional":true},"community":{"type":["list","string"],"optional":true},"match_condition":{"type":"string","required":true},"route_prefix":{"type":["list","string"],"optional":true}}},"optional":true}}},"optional":true}}}},"azurerm_route_server":{"block":{"attributes":{"branch_to_branch_traffic_enabled":{"type":"bool","optional":true,"default":false},"hub_routing_preference":{"type":"string","optional":true,"default":"ExpressRoute"},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"public_ip_address_id":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"routing_state":{"type":"string","computed":true},"sku":{"type":"string","required":true},"subnet_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"virtual_router_asn":{"type":"number","computed":true},"virtual_router_ips":{"type":["set","string"],"computed":true}}}},"azurerm_route_server_bgp_connection":{"block":{"attributes":{"name":{"type":"string","required":true},"peer_asn":{"type":"number","required":true},"peer_ip":{"type":"string","required":true},"route_server_id":{"type":"string","required":true}}}},"azurerm_route_table":{"block":{"attributes":{"bgp_route_propagation_enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"route":{"type":["set",["object",{"address_prefix":"string","name":"string","next_hop_in_ip_address":"string","next_hop_type":"string"}]],"optional":true,"computed":true},"subnets":{"type":["set","string"],"computed":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_search_service":{"block":{"attributes":{"allowed_ips":{"type":["set","string"],"optional":true},"authentication_failure_mode":{"type":"string","optional":true},"customer_managed_key_encryption_compliance_status":{"type":"string","computed":true},"customer_managed_key_enforcement_enabled":{"type":"bool","optional":true,"default":false},"hosting_mode":{"type":"string","optional":true,"default":"default"},"local_authentication_enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"network_rule_bypass_option":{"type":"string","optional":true,"default":"None"},"partition_count":{"type":"number","optional":true,"default":1},"primary_key":{"type":"string","computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"query_keys":{"type":["list",["object",{"key":"string","name":"string"}]],"computed":true},"replica_count":{"type":"number","optional":true,"default":1},"resource_group_name":{"type":"string","required":true},"secondary_key":{"type":"string","computed":true},"semantic_search_sku":{"type":"string","optional":true},"sku":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_search_shared_private_link_service":{"block":{"attributes":{"name":{"type":"string","required":true},"request_message":{"type":"string","optional":true},"search_service_id":{"type":"string","required":true},"status":{"type":"string","computed":true},"subresource_name":{"type":"string","required":true},"target_resource_id":{"type":"string","required":true}}}},"azurerm_security_center_assessment":{"block":{"attributes":{"additional_data":{"type":["map","string"],"optional":true},"assessment_policy_id":{"type":"string","required":true},"target_resource_id":{"type":"string","required":true}},"block_types":{"status":{"nesting_mode":3,"block":{"attributes":{"cause":{"type":"string","optional":true},"code":{"type":"string","required":true},"description":{"type":"string","optional":true}}},"required":true}}}},"azurerm_security_center_assessment_policy":{"block":{"attributes":{"categories":{"type":["set","string"],"optional":true,"computed":true},"description":{"type":"string","required":true},"display_name":{"type":"string","required":true},"implementation_effort":{"type":"string","optional":true},"name":{"type":"string","computed":true},"remediation_description":{"type":"string","optional":true},"severity":{"type":"string","optional":true,"default":"Medium"},"threats":{"type":["set","string"],"optional":true},"user_impact":{"type":"string","optional":true}}}},"azurerm_security_center_auto_provisioning":{"block":{"attributes":{"auto_provision":{"type":"string","required":true}}}},"azurerm_security_center_automation":{"block":{"attributes":{"description":{"type":"string","optional":true},"enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"scopes":{"type":["list","string"],"required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"action":{"nesting_mode":3,"block":{"attributes":{"connection_string":{"type":"string","optional":true},"resource_id":{"type":"string","required":true},"trigger_url":{"type":"string","optional":true},"type":{"type":"string","required":true}}},"required":true},"source":{"nesting_mode":3,"block":{"attributes":{"event_source":{"type":"string","required":true}},"block_types":{"rule_set":{"nesting_mode":3,"block":{"block_types":{"rule":{"nesting_mode":3,"block":{"attributes":{"expected_value":{"type":"string","required":true},"operator":{"type":"string","required":true},"property_path":{"type":"string","required":true},"property_type":{"type":"string","required":true}}},"required":true}}},"optional":true}}},"required":true}}}},"azurerm_security_center_contact":{"block":{"attributes":{"alert_notifications":{"type":"bool","required":true},"alerts_to_admins":{"type":"bool","required":true},"email":{"type":"string","required":true},"name":{"type":"string","required":true},"phone":{"type":"string","optional":true}}}},"azurerm_security_center_server_vulnerability_assessment_virtual_machine":{"block":{"attributes":{"virtual_machine_id":{"type":"string","required":true}}}},"azurerm_security_center_server_vulnerability_assessments_setting":{"block":{"attributes":{"vulnerability_assessment_provider":{"type":"string","required":true}}}},"azurerm_security_center_setting":{"block":{"attributes":{"enabled":{"type":"bool","required":true},"setting_name":{"type":"string","required":true}}}},"azurerm_security_center_storage_defender":{"block":{"attributes":{"malware_scanning_on_upload_cap_gb_per_month":{"type":"number","optional":true,"default":-1},"malware_scanning_on_upload_enabled":{"type":"bool","optional":true,"default":false},"override_subscription_settings_enabled":{"type":"bool","optional":true,"default":false},"scan_results_event_grid_topic_id":{"type":"string","optional":true},"sensitive_data_discovery_enabled":{"type":"bool","optional":true,"default":false},"storage_account_id":{"type":"string","required":true}}}},"azurerm_security_center_subscription_pricing":{"block":{"attributes":{"resource_type":{"type":"string","optional":true,"default":"VirtualMachines"},"subplan":{"type":"string","optional":true},"tier":{"type":"string","required":true}},"block_types":{"extension":{"nesting_mode":4,"block":{"attributes":{"additional_extension_properties":{"type":["map","string"],"optional":true},"name":{"type":"string","required":true}}},"optional":true}}}},"azurerm_security_center_workspace":{"block":{"attributes":{"scope":{"type":"string","required":true},"workspace_id":{"type":"string","required":true}}}},"azurerm_sentinel_alert_rule_anomaly_built_in":{"block":{"attributes":{"anomaly_settings_version":{"type":"number","computed":true},"anomaly_version":{"type":"string","computed":true},"description":{"type":"string","computed":true},"display_name":{"type":"string","optional":true,"computed":true,"exactly_one_of":["name","display_name"]},"enabled":{"type":"bool","required":true},"frequency":{"type":"string","computed":true},"log_analytics_workspace_id":{"type":"string","required":true},"mode":{"type":"string","required":true},"multi_select_observation":{"type":["list",["object",{"description":"string","name":"string","supported_values":["list","string"],"values":["list","string"]}]],"computed":true},"name":{"type":"string","optional":true,"computed":true,"exactly_one_of":["name","display_name"]},"prioritized_exclude_observation":{"type":["list",["object",{"description":"string","exclude":"string","name":"string","prioritize":"string"}]],"computed":true},"required_data_connector":{"type":["list",["object",{"connector_id":"string","data_types":["list","string"]}]],"computed":true},"settings_definition_id":{"type":"string","computed":true},"single_select_observation":{"type":["list",["object",{"description":"string","name":"string","supported_values":["list","string"],"value":"string"}]],"computed":true},"tactics":{"type":["list","string"],"computed":true},"techniques":{"type":["list","string"],"computed":true},"threshold_observation":{"type":["list",["object",{"description":"string","max":"string","min":"string","name":"string","value":"string"}]],"computed":true}}}},"azurerm_sentinel_alert_rule_anomaly_duplicate":{"block":{"attributes":{"anomaly_settings_version":{"type":"number","computed":true},"anomaly_version":{"type":"string","computed":true},"built_in_rule_id":{"type":"string","required":true},"description":{"type":"string","computed":true},"display_name":{"type":"string","required":true},"enabled":{"type":"bool","required":true},"frequency":{"type":"string","computed":true},"is_default_settings":{"type":"bool","computed":true},"log_analytics_workspace_id":{"type":"string","required":true},"mode":{"type":"string","required":true},"name":{"type":"string","computed":true},"required_data_connector":{"type":["list",["object",{"connector_id":"string","data_types":["list","string"]}]],"computed":true},"settings_definition_id":{"type":"string","computed":true},"tactics":{"type":["list","string"],"computed":true},"techniques":{"type":["list","string"],"computed":true}},"block_types":{"multi_select_observation":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","computed":true},"name":{"type":"string","required":true},"supported_values":{"type":["list","string"],"computed":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"computed":true},"prioritized_exclude_observation":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","computed":true},"exclude":{"type":"string","optional":true},"name":{"type":"string","required":true},"prioritize":{"type":"string","optional":true}}},"optional":true,"computed":true},"single_select_observation":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","computed":true},"name":{"type":"string","required":true},"supported_values":{"type":["list","string"],"computed":true},"value":{"type":"string","required":true}}},"optional":true,"computed":true},"threshold_observation":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","computed":true},"max":{"type":"string","computed":true},"min":{"type":"string","computed":true},"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true,"computed":true}}}},"azurerm_sentinel_alert_rule_fusion":{"block":{"attributes":{"alert_rule_template_guid":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":true},"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","optional":true,"default":"BuiltInFusion"}},"block_types":{"source":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true}},"block_types":{"sub_type":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"severities_allowed":{"type":["set","string"],"required":true}}},"optional":true}}},"optional":true,"computed":true}}}},"azurerm_sentinel_alert_rule_machine_learning_behavior_analytics":{"block":{"attributes":{"alert_rule_template_guid":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":true},"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true}}}},"azurerm_sentinel_alert_rule_ms_security_incident":{"block":{"attributes":{"alert_rule_template_guid":{"type":"string","optional":true},"description":{"type":"string","optional":true},"display_name":{"type":"string","required":true},"display_name_exclude_filter":{"type":["set","string"],"optional":true},"display_name_filter":{"type":["set","string"],"optional":true},"enabled":{"type":"bool","optional":true,"default":true},"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true},"product_filter":{"type":"string","required":true},"severity_filter":{"type":["set","string"],"required":true}}}},"azurerm_sentinel_alert_rule_nrt":{"block":{"attributes":{"alert_rule_template_guid":{"type":"string","optional":true},"alert_rule_template_version":{"type":"string","optional":true},"custom_details":{"type":["map","string"],"optional":true},"description":{"type":"string","optional":true},"display_name":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":true},"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true},"query":{"type":"string","required":true},"severity":{"type":"string","required":true},"suppression_duration":{"type":"string","optional":true,"default":"PT5H"},"suppression_enabled":{"type":"bool","optional":true,"default":false},"tactics":{"type":["set","string"],"optional":true},"techniques":{"type":["set","string"],"optional":true}},"block_types":{"alert_details_override":{"nesting_mode":3,"block":{"attributes":{"description_format":{"type":"string","optional":true},"display_name_format":{"type":"string","optional":true},"severity_column_name":{"type":"string","optional":true},"tactics_column_name":{"type":"string","optional":true}},"block_types":{"dynamic_property":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true},"entity_mapping":{"nesting_mode":3,"block":{"attributes":{"entity_type":{"type":"string","required":true}},"block_types":{"field_mapping":{"nesting_mode":3,"block":{"attributes":{"column_name":{"type":"string","required":true},"identifier":{"type":"string","required":true}}},"required":true}}},"optional":true},"event_grouping":{"nesting_mode":3,"block":{"attributes":{"aggregation_method":{"type":"string","required":true}}},"required":true},"incident":{"nesting_mode":3,"block":{"attributes":{"create_incident_enabled":{"type":"bool","required":true}},"block_types":{"grouping":{"nesting_mode":3,"block":{"attributes":{"by_alert_details":{"type":["list","string"],"optional":true},"by_custom_details":{"type":["list","string"],"optional":true},"by_entities":{"type":["list","string"],"optional":true},"enabled":{"type":"bool","optional":true,"default":true},"entity_matching_method":{"type":"string","optional":true,"default":"AnyAlert"},"lookback_duration":{"type":"string","optional":true,"default":"PT5M"},"reopen_closed_incidents":{"type":"bool","optional":true,"default":false}}},"required":true}}},"optional":true,"computed":true},"sentinel_entity_mapping":{"nesting_mode":3,"block":{"attributes":{"column_name":{"type":"string","required":true}}},"optional":true}}}},"azurerm_sentinel_alert_rule_scheduled":{"block":{"attributes":{"alert_rule_template_guid":{"type":"string","optional":true},"alert_rule_template_version":{"type":"string","optional":true},"custom_details":{"type":["map","string"],"optional":true},"description":{"type":"string","optional":true},"display_name":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":true},"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true},"query":{"type":"string","required":true},"query_frequency":{"type":"string","optional":true,"default":"PT5H"},"query_period":{"type":"string","optional":true,"default":"PT5H"},"severity":{"type":"string","required":true},"suppression_duration":{"type":"string","optional":true,"default":"PT5H"},"suppression_enabled":{"type":"bool","optional":true,"default":false},"tactics":{"type":["set","string"],"optional":true},"techniques":{"type":["set","string"],"optional":true},"trigger_operator":{"type":"string","optional":true,"default":"GreaterThan"},"trigger_threshold":{"type":"number","optional":true,"default":0}},"block_types":{"alert_details_override":{"nesting_mode":3,"block":{"attributes":{"description_format":{"type":"string","optional":true},"display_name_format":{"type":"string","optional":true},"severity_column_name":{"type":"string","optional":true},"tactics_column_name":{"type":"string","optional":true}},"block_types":{"dynamic_property":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true},"entity_mapping":{"nesting_mode":3,"block":{"attributes":{"entity_type":{"type":"string","required":true}},"block_types":{"field_mapping":{"nesting_mode":3,"block":{"attributes":{"column_name":{"type":"string","required":true},"identifier":{"type":"string","required":true}}},"required":true}}},"optional":true},"event_grouping":{"nesting_mode":3,"block":{"attributes":{"aggregation_method":{"type":"string","required":true}}},"optional":true},"incident":{"nesting_mode":3,"block":{"attributes":{"create_incident_enabled":{"type":"bool","required":true}},"block_types":{"grouping":{"nesting_mode":3,"block":{"attributes":{"by_alert_details":{"type":["list","string"],"optional":true},"by_custom_details":{"type":["list","string"],"optional":true},"by_entities":{"type":["list","string"],"optional":true},"enabled":{"type":"bool","optional":true,"default":true},"entity_matching_method":{"type":"string","optional":true,"default":"AnyAlert"},"lookback_duration":{"type":"string","optional":true,"default":"PT5M"},"reopen_closed_incidents":{"type":"bool","optional":true,"default":false}}},"required":true}}},"optional":true,"computed":true},"sentinel_entity_mapping":{"nesting_mode":3,"block":{"attributes":{"column_name":{"type":"string","required":true}}},"optional":true}}}},"azurerm_sentinel_alert_rule_threat_intelligence":{"block":{"attributes":{"alert_rule_template_guid":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":true},"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true}}}},"azurerm_sentinel_automation_rule":{"block":{"attributes":{"condition_json":{"type":"string","optional":true},"display_name":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":true},"expiration":{"type":"string","optional":true},"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true},"order":{"type":"number","required":true},"triggers_on":{"type":"string","optional":true,"default":"Incidents"},"triggers_when":{"type":"string","optional":true,"default":"Created"}},"block_types":{"action_incident":{"nesting_mode":3,"block":{"attributes":{"classification":{"type":"string","optional":true},"classification_comment":{"type":"string","optional":true},"labels":{"type":["list","string"],"optional":true},"order":{"type":"number","required":true},"owner_id":{"type":"string","optional":true},"severity":{"type":"string","optional":true},"status":{"type":"string","optional":true}}},"optional":true,"at_least_one_of":["action_incident","action_playbook"]},"action_playbook":{"nesting_mode":3,"block":{"attributes":{"logic_app_id":{"type":"string","required":true},"order":{"type":"number","required":true},"tenant_id":{"type":"string","optional":true,"computed":true}}},"optional":true,"at_least_one_of":["action_incident","action_playbook"]}}}},"azurerm_sentinel_data_connector_aws_cloud_trail":{"block":{"attributes":{"aws_role_arn":{"type":"string","required":true},"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true}}}},"azurerm_sentinel_data_connector_aws_s3":{"block":{"attributes":{"aws_role_arn":{"type":"string","required":true},"destination_table":{"type":"string","required":true},"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true},"sqs_urls":{"type":["list","string"],"required":true}}}},"azurerm_sentinel_data_connector_azure_active_directory":{"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true},"tenant_id":{"type":"string","optional":true,"computed":true}}}},"azurerm_sentinel_data_connector_azure_advanced_threat_protection":{"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true},"tenant_id":{"type":"string","optional":true,"computed":true}}}},"azurerm_sentinel_data_connector_azure_security_center":{"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true},"subscription_id":{"type":"string","optional":true,"computed":true}}}},"azurerm_sentinel_data_connector_dynamics_365":{"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true},"tenant_id":{"type":"string","optional":true,"computed":true}}}},"azurerm_sentinel_data_connector_iot":{"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true},"subscription_id":{"type":"string","optional":true,"computed":true}}}},"azurerm_sentinel_data_connector_microsoft_cloud_app_security":{"block":{"attributes":{"alerts_enabled":{"type":"bool","optional":true,"default":true},"discovery_logs_enabled":{"type":"bool","optional":true,"default":true},"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true},"tenant_id":{"type":"string","optional":true,"computed":true}}}},"azurerm_sentinel_data_connector_microsoft_defender_advanced_threat_protection":{"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true},"tenant_id":{"type":"string","optional":true,"computed":true}}}},"azurerm_sentinel_data_connector_microsoft_threat_intelligence":{"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"microsoft_emerging_threat_feed_lookback_date":{"type":"string","required":true},"name":{"type":"string","required":true},"tenant_id":{"type":"string","optional":true,"computed":true}}}},"azurerm_sentinel_data_connector_microsoft_threat_protection":{"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true},"tenant_id":{"type":"string","optional":true,"computed":true}}}},"azurerm_sentinel_data_connector_office_365":{"block":{"attributes":{"exchange_enabled":{"type":"bool","optional":true,"default":true},"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true},"sharepoint_enabled":{"type":"bool","optional":true,"default":true},"teams_enabled":{"type":"bool","optional":true,"default":true},"tenant_id":{"type":"string","optional":true,"computed":true}}}},"azurerm_sentinel_data_connector_office_365_project":{"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true},"tenant_id":{"type":"string","optional":true,"computed":true}}}},"azurerm_sentinel_data_connector_office_atp":{"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true},"tenant_id":{"type":"string","optional":true,"computed":true}}}},"azurerm_sentinel_data_connector_office_irm":{"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true},"tenant_id":{"type":"string","optional":true,"computed":true}}}},"azurerm_sentinel_data_connector_office_power_bi":{"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true},"tenant_id":{"type":"string","optional":true,"computed":true}}}},"azurerm_sentinel_data_connector_threat_intelligence":{"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"lookback_date":{"type":"string","optional":true,"default":"1970-01-01T00:00:00Z"},"name":{"type":"string","required":true},"tenant_id":{"type":"string","optional":true,"computed":true}}}},"azurerm_sentinel_data_connector_threat_intelligence_taxii":{"block":{"attributes":{"api_root_url":{"type":"string","required":true},"collection_id":{"type":"string","required":true},"display_name":{"type":"string","required":true},"log_analytics_workspace_id":{"type":"string","required":true},"lookback_date":{"type":"string","optional":true,"default":"1970-01-01T00:00:00Z"},"name":{"type":"string","required":true},"password":{"type":"string","optional":true},"polling_frequency":{"type":"string","optional":true,"default":"OnceAnHour"},"tenant_id":{"type":"string","optional":true,"computed":true},"user_name":{"type":"string","optional":true}}}},"azurerm_sentinel_log_analytics_workspace_onboarding":{"block":{"attributes":{"customer_managed_key_enabled":{"type":"bool","optional":true,"default":false},"workspace_id":{"type":"string","required":true}}}},"azurerm_sentinel_metadata":{"block":{"attributes":{"content_id":{"type":"string","required":true},"content_schema_version":{"type":"string","optional":true,"default":"2.0"},"custom_version":{"type":"string","optional":true},"dependency":{"type":"string","optional":true},"first_publish_date":{"type":"string","optional":true},"icon_id":{"type":"string","optional":true},"kind":{"type":"string","required":true},"last_publish_date":{"type":"string","optional":true},"name":{"type":"string","required":true},"parent_id":{"type":"string","required":true},"preview_images":{"type":["list","string"],"optional":true},"preview_images_dark":{"type":["list","string"],"optional":true},"providers":{"type":["list","string"],"optional":true},"threat_analysis_tactics":{"type":["list","string"],"optional":true},"threat_analysis_techniques":{"type":["list","string"],"optional":true},"version":{"type":"string","optional":true},"workspace_id":{"type":"string","required":true}},"block_types":{"author":{"nesting_mode":3,"block":{"attributes":{"email":{"type":"string","optional":true},"link":{"type":"string","optional":true},"name":{"type":"string","optional":true}}},"optional":true},"category":{"nesting_mode":3,"block":{"attributes":{"domains":{"type":["list","string"],"optional":true},"verticals":{"type":["list","string"],"optional":true}}},"optional":true},"source":{"nesting_mode":3,"block":{"attributes":{"id":{"type":"string","optional":true},"kind":{"type":"string","required":true},"name":{"type":"string","optional":true}}},"optional":true,"computed":true},"support":{"nesting_mode":3,"block":{"attributes":{"email":{"type":"string","optional":true},"link":{"type":"string","optional":true},"name":{"type":"string","optional":true},"tier":{"type":"string","required":true}}},"optional":true}}}},"azurerm_sentinel_threat_intelligence_indicator":{"block":{"attributes":{"confidence":{"type":"number","optional":true,"default":-1},"created_by":{"type":"string","optional":true},"created_on":{"type":"string","computed":true},"defanged":{"type":"bool","computed":true},"description":{"type":"string","optional":true},"display_name":{"type":"string","required":true},"extension":{"type":"string","optional":true,"computed":true},"external_id":{"type":"string","computed":true},"external_last_updated_time_utc":{"type":"string","computed":true},"guid":{"type":"string","computed":true},"indicator_type":{"type":["list","string"],"computed":true},"language":{"type":"string","optional":true},"last_updated_time_utc":{"type":"string","computed":true},"object_marking_refs":{"type":["list","string"],"optional":true},"parsed_pattern":{"type":["list",["object",{"pattern_type_key":"string","pattern_type_values":["list",["object",{"value":"string","value_type":"string"}]]}]],"computed":true},"pattern":{"type":"string","required":true},"pattern_type":{"type":"string","required":true},"pattern_version":{"type":"string","optional":true},"revoked":{"type":"bool","optional":true,"default":false},"source":{"type":"string","required":true},"tags":{"type":["list","string"],"optional":true},"threat_types":{"type":["list","string"],"optional":true},"validate_from_utc":{"type":"string","required":true},"validate_until_utc":{"type":"string","optional":true},"workspace_id":{"type":"string","required":true}},"block_types":{"external_reference":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"hashes":{"type":["map","string"],"optional":true},"id":{"type":"string","computed":true},"source_name":{"type":"string","optional":true},"url":{"type":"string","optional":true}}},"optional":true},"granular_marking":{"nesting_mode":3,"block":{"attributes":{"language":{"type":"string","optional":true},"marking_ref":{"type":"string","optional":true},"selectors":{"type":["list","string"],"optional":true}}},"optional":true},"kill_chain_phase":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_sentinel_watchlist":{"block":{"attributes":{"default_duration":{"type":"string","optional":true},"description":{"type":"string","optional":true},"display_name":{"type":"string","required":true},"item_search_key":{"type":"string","required":true},"labels":{"type":["list","string"],"optional":true},"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true}}}},"azurerm_sentinel_watchlist_item":{"block":{"attributes":{"name":{"type":"string","optional":true,"computed":true},"properties":{"type":["map","string"],"required":true},"watchlist_id":{"type":"string","required":true}}}},"azurerm_service_fabric_cluster":{"block":{"attributes":{"add_on_features":{"type":["set","string"],"optional":true},"cluster_code_version":{"type":"string","optional":true,"computed":true},"cluster_endpoint":{"type":"string","computed":true},"location":{"type":"string","required":true},"management_endpoint":{"type":"string","required":true},"name":{"type":"string","required":true},"reliability_level":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"service_fabric_zonal_upgrade_mode":{"type":"string","optional":true},"tags":{"type":["map","string"],"optional":true},"upgrade_mode":{"type":"string","required":true},"vm_image":{"type":"string","required":true},"vmss_zonal_upgrade_mode":{"type":"string","optional":true}},"block_types":{"azure_active_directory":{"nesting_mode":3,"block":{"attributes":{"client_application_id":{"type":"string","required":true},"cluster_application_id":{"type":"string","required":true},"tenant_id":{"type":"string","required":true}}},"optional":true},"certificate":{"nesting_mode":3,"block":{"attributes":{"thumbprint":{"type":"string","required":true},"thumbprint_secondary":{"type":"string","optional":true},"x509_store_name":{"type":"string","required":true}}},"optional":true,"conflicts_with":["certificate_common_names"]},"certificate_common_names":{"nesting_mode":3,"block":{"attributes":{"x509_store_name":{"type":"string","required":true}},"block_types":{"common_names":{"nesting_mode":4,"block":{"attributes":{"certificate_common_name":{"type":"string","required":true},"certificate_issuer_thumbprint":{"type":"string","optional":true}}},"required":true}}},"optional":true,"conflicts_with":["certificate"]},"client_certificate_common_name":{"nesting_mode":3,"block":{"attributes":{"common_name":{"type":"string","required":true},"is_admin":{"type":"bool","required":true},"issuer_thumbprint":{"type":"string","optional":true}}},"optional":true},"client_certificate_thumbprint":{"nesting_mode":3,"block":{"attributes":{"is_admin":{"type":"bool","required":true},"thumbprint":{"type":"string","required":true}}},"optional":true},"diagnostics_config":{"nesting_mode":3,"block":{"attributes":{"blob_endpoint":{"type":"string","required":true},"protected_account_key_name":{"type":"string","required":true},"queue_endpoint":{"type":"string","required":true},"storage_account_name":{"type":"string","required":true},"table_endpoint":{"type":"string","required":true}}},"optional":true},"fabric_settings":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true},"node_type":{"nesting_mode":3,"block":{"attributes":{"capacities":{"type":["map","string"],"optional":true},"client_endpoint_port":{"type":"number","required":true},"durability_level":{"type":"string","optional":true,"default":"Bronze"},"http_endpoint_port":{"type":"number","required":true},"instance_count":{"type":"number","required":true},"is_primary":{"type":"bool","required":true},"is_stateless":{"type":"bool","optional":true},"multiple_availability_zones":{"type":"bool","optional":true},"name":{"type":"string","required":true},"placement_properties":{"type":["map","string"],"optional":true},"reverse_proxy_endpoint_port":{"type":"number","optional":true}},"block_types":{"application_ports":{"nesting_mode":3,"block":{"attributes":{"end_port":{"type":"number","required":true},"start_port":{"type":"number","required":true}}},"optional":true,"computed":true},"ephemeral_ports":{"nesting_mode":3,"block":{"attributes":{"end_port":{"type":"number","required":true},"start_port":{"type":"number","required":true}}},"optional":true,"computed":true}}},"required":true},"reverse_proxy_certificate":{"nesting_mode":3,"block":{"attributes":{"thumbprint":{"type":"string","required":true},"thumbprint_secondary":{"type":"string","optional":true},"x509_store_name":{"type":"string","required":true}}},"optional":true,"conflicts_with":["reverse_proxy_certificate_common_names"]},"reverse_proxy_certificate_common_names":{"nesting_mode":3,"block":{"attributes":{"x509_store_name":{"type":"string","required":true}},"block_types":{"common_names":{"nesting_mode":4,"block":{"attributes":{"certificate_common_name":{"type":"string","required":true},"certificate_issuer_thumbprint":{"type":"string","optional":true}}},"required":true}}},"optional":true,"conflicts_with":["reverse_proxy_certificate"]},"upgrade_policy":{"nesting_mode":3,"block":{"attributes":{"force_restart_enabled":{"type":"bool","optional":true},"health_check_retry_timeout":{"type":"string","optional":true,"default":"00:45:00"},"health_check_stable_duration":{"type":"string","optional":true,"default":"00:01:00"},"health_check_wait_duration":{"type":"string","optional":true,"default":"00:00:30"},"upgrade_domain_timeout":{"type":"string","optional":true,"default":"02:00:00"},"upgrade_replica_set_check_timeout":{"type":"string","optional":true,"default":"10675199.02:48:05.4775807"},"upgrade_timeout":{"type":"string","optional":true,"default":"12:00:00"}},"block_types":{"delta_health_policy":{"nesting_mode":3,"block":{"attributes":{"max_delta_unhealthy_applications_percent":{"type":"number","optional":true,"default":0},"max_delta_unhealthy_nodes_percent":{"type":"number","optional":true,"default":0},"max_upgrade_domain_delta_unhealthy_nodes_percent":{"type":"number","optional":true,"default":0}}},"optional":true},"health_policy":{"nesting_mode":3,"block":{"attributes":{"max_unhealthy_applications_percent":{"type":"number","optional":true,"default":0},"max_unhealthy_nodes_percent":{"type":"number","optional":true,"default":0}}},"optional":true}}},"optional":true}}}},"azurerm_service_fabric_managed_cluster":{"block":{"attributes":{"backup_service_enabled":{"type":"bool","optional":true},"client_connection_port":{"type":"number","required":true},"dns_name":{"type":"string","optional":true,"computed":true},"dns_service_enabled":{"type":"bool","optional":true},"http_gateway_port":{"type":"number","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"password":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"sku":{"type":"string","optional":true,"default":"Basic"},"tags":{"type":["map","string"],"optional":true},"upgrade_wave":{"type":"string","optional":true,"default":"Wave0"},"username":{"type":"string","optional":true}},"block_types":{"authentication":{"nesting_mode":3,"block":{"block_types":{"active_directory":{"nesting_mode":3,"block":{"attributes":{"client_application_id":{"type":"string","required":true},"cluster_application_id":{"type":"string","required":true},"tenant_id":{"type":"string","required":true}}},"optional":true},"certificate":{"nesting_mode":3,"block":{"attributes":{"common_name":{"type":"string","optional":true},"thumbprint":{"type":"string","required":true},"type":{"type":"string","required":true}}},"optional":true}}},"optional":true},"custom_fabric_setting":{"nesting_mode":3,"block":{"attributes":{"parameter":{"type":"string","required":true},"section":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"lb_rule":{"nesting_mode":3,"block":{"attributes":{"backend_port":{"type":"number","required":true},"frontend_port":{"type":"number","required":true},"probe_protocol":{"type":"string","required":true},"probe_request_path":{"type":"string","optional":true},"protocol":{"type":"string","required":true}}},"required":true},"node_type":{"nesting_mode":3,"block":{"attributes":{"application_port_range":{"type":"string","required":true},"capacities":{"type":["map","string"],"optional":true},"data_disk_size_gb":{"type":"number","required":true},"data_disk_type":{"type":"string","optional":true,"default":"Standard_LRS"},"ephemeral_port_range":{"type":"string","required":true},"id":{"type":"string","computed":true},"multiple_placement_groups_enabled":{"type":"bool","optional":true},"name":{"type":"string","required":true},"placement_properties":{"type":["map","string"],"optional":true},"primary":{"type":"bool","optional":true},"stateless":{"type":"bool","optional":true},"vm_image_offer":{"type":"string","required":true},"vm_image_publisher":{"type":"string","required":true},"vm_image_sku":{"type":"string","required":true},"vm_image_version":{"type":"string","required":true},"vm_instance_count":{"type":"number","required":true},"vm_size":{"type":"string","required":true}},"block_types":{"vm_secrets":{"nesting_mode":3,"block":{"attributes":{"vault_id":{"type":"string","required":true}},"block_types":{"certificates":{"nesting_mode":3,"block":{"attributes":{"store":{"type":"string","required":true},"url":{"type":"string","required":true}}},"required":true}}},"optional":true}}},"optional":true}}}},"azurerm_service_plan":{"block":{"attributes":{"app_service_environment_id":{"type":"string","optional":true},"kind":{"type":"string","computed":true},"location":{"type":"string","required":true},"maximum_elastic_worker_count":{"type":"number","optional":true,"computed":true},"name":{"type":"string","required":true},"os_type":{"type":"string","required":true},"per_site_scaling_enabled":{"type":"bool","optional":true,"default":false},"premium_plan_auto_scale_enabled":{"type":"bool","optional":true,"default":false},"reserved":{"type":"bool","computed":true},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"worker_count":{"type":"number","optional":true,"computed":true},"zone_balancing_enabled":{"type":"bool","optional":true}}}},"azurerm_servicebus_namespace":{"block":{"attributes":{"capacity":{"type":"number","optional":true,"default":0},"default_primary_connection_string":{"type":"string","computed":true},"default_primary_key":{"type":"string","computed":true},"default_secondary_connection_string":{"type":"string","computed":true},"default_secondary_key":{"type":"string","computed":true},"endpoint":{"type":"string","computed":true},"local_auth_enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"minimum_tls_version":{"type":"string","optional":true,"default":"1.2"},"name":{"type":"string","required":true},"premium_messaging_partitions":{"type":"number","optional":true,"default":0},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"sku":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"customer_managed_key":{"nesting_mode":3,"block":{"attributes":{"identity_id":{"type":"string","required":true},"infrastructure_encryption_enabled":{"type":"bool","optional":true},"key_vault_key_id":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"network_rule_set":{"nesting_mode":3,"block":{"attributes":{"default_action":{"type":"string","optional":true,"default":"Allow"},"ip_rules":{"type":["set","string"],"optional":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"trusted_services_allowed":{"type":"bool","optional":true,"default":false}},"block_types":{"network_rules":{"nesting_mode":4,"block":{"attributes":{"ignore_missing_vnet_service_endpoint":{"type":"bool","optional":true,"default":false},"subnet_id":{"type":"string","required":true}}},"optional":true}}},"optional":true,"computed":true}}}},"azurerm_servicebus_namespace_authorization_rule":{"block":{"attributes":{"listen":{"type":"bool","optional":true,"default":false},"manage":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"namespace_id":{"type":"string","required":true},"primary_connection_string":{"type":"string","computed":true},"primary_connection_string_alias":{"type":"string","computed":true},"primary_key":{"type":"string","computed":true},"secondary_connection_string":{"type":"string","computed":true},"secondary_connection_string_alias":{"type":"string","computed":true},"secondary_key":{"type":"string","computed":true},"send":{"type":"bool","optional":true,"default":false}}}},"azurerm_servicebus_namespace_disaster_recovery_config":{"block":{"attributes":{"alias_authorization_rule_id":{"type":"string","optional":true},"default_primary_key":{"type":"string","computed":true},"default_secondary_key":{"type":"string","computed":true},"name":{"type":"string","required":true},"partner_namespace_id":{"type":"string","required":true},"primary_connection_string_alias":{"type":"string","computed":true},"primary_namespace_id":{"type":"string","required":true},"secondary_connection_string_alias":{"type":"string","computed":true}}}},"azurerm_servicebus_queue":{"block":{"attributes":{"auto_delete_on_idle":{"type":"string","optional":true,"computed":true},"batched_operations_enabled":{"type":"bool","optional":true,"default":true},"dead_lettering_on_message_expiration":{"type":"bool","optional":true,"default":false},"default_message_ttl":{"type":"string","optional":true,"computed":true},"duplicate_detection_history_time_window":{"type":"string","optional":true,"default":"PT10M"},"express_enabled":{"type":"bool","optional":true,"default":false},"forward_dead_lettered_messages_to":{"type":"string","optional":true},"forward_to":{"type":"string","optional":true},"lock_duration":{"type":"string","optional":true,"default":"PT1M"},"max_delivery_count":{"type":"number","optional":true,"default":10},"max_message_size_in_kilobytes":{"type":"number","optional":true,"computed":true},"max_size_in_megabytes":{"type":"number","optional":true,"computed":true},"name":{"type":"string","required":true},"namespace_id":{"type":"string","required":true},"partitioning_enabled":{"type":"bool","optional":true,"default":false},"requires_duplicate_detection":{"type":"bool","optional":true,"default":false},"requires_session":{"type":"bool","optional":true,"default":false},"status":{"type":"string","optional":true,"default":"Active"}}}},"azurerm_servicebus_queue_authorization_rule":{"block":{"attributes":{"listen":{"type":"bool","optional":true,"default":false},"manage":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"primary_connection_string":{"type":"string","computed":true},"primary_connection_string_alias":{"type":"string","computed":true},"primary_key":{"type":"string","computed":true},"queue_id":{"type":"string","required":true},"secondary_connection_string":{"type":"string","computed":true},"secondary_connection_string_alias":{"type":"string","computed":true},"secondary_key":{"type":"string","computed":true},"send":{"type":"bool","optional":true,"default":false}}}},"azurerm_servicebus_subscription":{"block":{"attributes":{"auto_delete_on_idle":{"type":"string","optional":true,"default":"P10675199DT2H48M5.4775807S"},"batched_operations_enabled":{"type":"bool","optional":true},"client_scoped_subscription_enabled":{"type":"bool","optional":true,"default":false},"dead_lettering_on_filter_evaluation_error":{"type":"bool","optional":true,"default":true},"dead_lettering_on_message_expiration":{"type":"bool","optional":true},"default_message_ttl":{"type":"string","optional":true,"default":"P10675199DT2H48M5.4775807S"},"forward_dead_lettered_messages_to":{"type":"string","optional":true},"forward_to":{"type":"string","optional":true},"lock_duration":{"type":"string","optional":true,"default":"PT1M"},"max_delivery_count":{"type":"number","required":true},"name":{"type":"string","required":true},"requires_session":{"type":"bool","optional":true},"status":{"type":"string","optional":true,"default":"Active"},"topic_id":{"type":"string","required":true}},"block_types":{"client_scoped_subscription":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","optional":true},"is_client_scoped_subscription_durable":{"type":"bool","computed":true},"is_client_scoped_subscription_shareable":{"type":"bool","optional":true,"default":true}}},"optional":true}}}},"azurerm_servicebus_subscription_rule":{"block":{"attributes":{"action":{"type":"string","optional":true},"filter_type":{"type":"string","required":true},"name":{"type":"string","required":true},"sql_filter":{"type":"string","optional":true},"sql_filter_compatibility_level":{"type":"number","computed":true},"subscription_id":{"type":"string","required":true}},"block_types":{"correlation_filter":{"nesting_mode":3,"block":{"attributes":{"content_type":{"type":"string","optional":true,"at_least_one_of":["correlation_filter.0.correlation_id","correlation_filter.0.message_id","correlation_filter.0.to","correlation_filter.0.reply_to","correlation_filter.0.label","correlation_filter.0.session_id","correlation_filter.0.reply_to_session_id","correlation_filter.0.content_type","correlation_filter.0.properties"]},"correlation_id":{"type":"string","optional":true,"at_least_one_of":["correlation_filter.0.correlation_id","correlation_filter.0.message_id","correlation_filter.0.to","correlation_filter.0.reply_to","correlation_filter.0.label","correlation_filter.0.session_id","correlation_filter.0.reply_to_session_id","correlation_filter.0.content_type","correlation_filter.0.properties"]},"label":{"type":"string","optional":true,"at_least_one_of":["correlation_filter.0.correlation_id","correlation_filter.0.message_id","correlation_filter.0.to","correlation_filter.0.reply_to","correlation_filter.0.label","correlation_filter.0.session_id","correlation_filter.0.reply_to_session_id","correlation_filter.0.content_type","correlation_filter.0.properties"]},"message_id":{"type":"string","optional":true,"at_least_one_of":["correlation_filter.0.correlation_id","correlation_filter.0.message_id","correlation_filter.0.to","correlation_filter.0.reply_to","correlation_filter.0.label","correlation_filter.0.session_id","correlation_filter.0.reply_to_session_id","correlation_filter.0.content_type","correlation_filter.0.properties"]},"properties":{"type":["map","string"],"optional":true,"at_least_one_of":["correlation_filter.0.correlation_id","correlation_filter.0.message_id","correlation_filter.0.to","correlation_filter.0.reply_to","correlation_filter.0.label","correlation_filter.0.session_id","correlation_filter.0.reply_to_session_id","correlation_filter.0.content_type","correlation_filter.0.properties"]},"reply_to":{"type":"string","optional":true,"at_least_one_of":["correlation_filter.0.correlation_id","correlation_filter.0.message_id","correlation_filter.0.to","correlation_filter.0.reply_to","correlation_filter.0.label","correlation_filter.0.session_id","correlation_filter.0.reply_to_session_id","correlation_filter.0.content_type","correlation_filter.0.properties"]},"reply_to_session_id":{"type":"string","optional":true,"at_least_one_of":["correlation_filter.0.correlation_id","correlation_filter.0.message_id","correlation_filter.0.to","correlation_filter.0.reply_to","correlation_filter.0.label","correlation_filter.0.session_id","correlation_filter.0.reply_to_session_id","correlation_filter.0.content_type","correlation_filter.0.properties"]},"session_id":{"type":"string","optional":true,"at_least_one_of":["correlation_filter.0.correlation_id","correlation_filter.0.message_id","correlation_filter.0.to","correlation_filter.0.reply_to","correlation_filter.0.label","correlation_filter.0.session_id","correlation_filter.0.reply_to_session_id","correlation_filter.0.content_type","correlation_filter.0.properties"]},"to":{"type":"string","optional":true,"at_least_one_of":["correlation_filter.0.correlation_id","correlation_filter.0.message_id","correlation_filter.0.to","correlation_filter.0.reply_to","correlation_filter.0.label","correlation_filter.0.session_id","correlation_filter.0.reply_to_session_id","correlation_filter.0.content_type","correlation_filter.0.properties"]}}},"optional":true,"conflicts_with":["sql_filter"]}}}},"azurerm_servicebus_topic":{"block":{"attributes":{"auto_delete_on_idle":{"type":"string","optional":true,"default":"P10675199DT2H48M5.4775807S"},"batched_operations_enabled":{"type":"bool","optional":true},"default_message_ttl":{"type":"string","optional":true,"default":"P10675199DT2H48M5.4775807S"},"duplicate_detection_history_time_window":{"type":"string","optional":true,"default":"PT10M"},"express_enabled":{"type":"bool","optional":true},"max_message_size_in_kilobytes":{"type":"number","optional":true,"computed":true},"max_size_in_megabytes":{"type":"number","optional":true,"computed":true},"name":{"type":"string","required":true},"namespace_id":{"type":"string","required":true},"partitioning_enabled":{"type":"bool","optional":true},"requires_duplicate_detection":{"type":"bool","optional":true},"status":{"type":"string","optional":true,"default":"Active"},"support_ordering":{"type":"bool","optional":true}}}},"azurerm_servicebus_topic_authorization_rule":{"block":{"attributes":{"listen":{"type":"bool","optional":true,"default":false},"manage":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"primary_connection_string":{"type":"string","computed":true},"primary_connection_string_alias":{"type":"string","computed":true},"primary_key":{"type":"string","computed":true},"secondary_connection_string":{"type":"string","computed":true},"secondary_connection_string_alias":{"type":"string","computed":true},"secondary_key":{"type":"string","computed":true},"send":{"type":"bool","optional":true,"default":false},"topic_id":{"type":"string","required":true}}}},"azurerm_shared_image":{"block":{"attributes":{"accelerated_network_support_enabled":{"type":"bool","optional":true},"architecture":{"type":"string","optional":true,"default":"x64"},"confidential_vm_enabled":{"type":"bool","optional":true,"conflicts_with":["trusted_launch_supported","trusted_launch_enabled","confidential_vm_supported"]},"confidential_vm_supported":{"type":"bool","optional":true,"conflicts_with":["trusted_launch_supported","trusted_launch_enabled","confidential_vm_enabled"]},"description":{"type":"string","optional":true},"disk_controller_type_nvme_enabled":{"type":"bool","optional":true},"disk_types_not_allowed":{"type":["set","string"],"optional":true},"end_of_life_date":{"type":"string","optional":true},"eula":{"type":"string","optional":true},"gallery_name":{"type":"string","required":true},"hibernation_enabled":{"type":"bool","optional":true},"hyper_v_generation":{"type":"string","optional":true,"default":"V1"},"location":{"type":"string","required":true},"max_recommended_memory_in_gb":{"type":"number","optional":true},"max_recommended_vcpu_count":{"type":"number","optional":true},"min_recommended_memory_in_gb":{"type":"number","optional":true},"min_recommended_vcpu_count":{"type":"number","optional":true},"name":{"type":"string","required":true},"os_type":{"type":"string","required":true},"privacy_statement_uri":{"type":"string","optional":true},"release_note_uri":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"specialized":{"type":"bool","optional":true},"tags":{"type":["map","string"],"optional":true},"trusted_launch_enabled":{"type":"bool","optional":true,"conflicts_with":["trusted_launch_supported","confidential_vm_supported","confidential_vm_enabled"]},"trusted_launch_supported":{"type":"bool","optional":true,"conflicts_with":["trusted_launch_enabled","confidential_vm_supported","confidential_vm_enabled"]}},"block_types":{"identifier":{"nesting_mode":3,"block":{"attributes":{"offer":{"type":"string","required":true},"publisher":{"type":"string","required":true},"sku":{"type":"string","required":true}}},"required":true},"purchase_plan":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"product":{"type":"string","optional":true},"publisher":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_shared_image_gallery":{"block":{"attributes":{"description":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"unique_name":{"type":"string","computed":true}},"block_types":{"sharing":{"nesting_mode":3,"block":{"attributes":{"permission":{"type":"string","required":true}},"block_types":{"community_gallery":{"nesting_mode":3,"block":{"attributes":{"eula":{"type":"string","required":true},"name":{"type":"string","computed":true},"prefix":{"type":"string","required":true},"publisher_email":{"type":"string","required":true},"publisher_uri":{"type":"string","required":true}}},"optional":true}}},"optional":true}}}},"azurerm_shared_image_version":{"block":{"attributes":{"blob_uri":{"type":"string","optional":true,"exactly_one_of":["blob_uri","os_disk_snapshot_id","managed_image_id"],"required_with":["storage_account_id"]},"deletion_of_replicated_locations_enabled":{"type":"bool","optional":true,"default":false},"end_of_life_date":{"type":"string","optional":true},"exclude_from_latest":{"type":"bool","optional":true,"default":false},"gallery_name":{"type":"string","required":true},"image_name":{"type":"string","required":true},"location":{"type":"string","required":true},"managed_image_id":{"type":"string","optional":true,"exactly_one_of":["blob_uri","os_disk_snapshot_id","managed_image_id"]},"name":{"type":"string","required":true},"os_disk_snapshot_id":{"type":"string","optional":true,"exactly_one_of":["blob_uri","os_disk_snapshot_id","managed_image_id"]},"replication_mode":{"type":"string","optional":true,"default":"Full"},"resource_group_name":{"type":"string","required":true},"storage_account_id":{"type":"string","optional":true,"required_with":["blob_uri"]},"tags":{"type":["map","string"],"optional":true}},"block_types":{"target_region":{"nesting_mode":3,"block":{"attributes":{"disk_encryption_set_id":{"type":"string","optional":true},"exclude_from_latest_enabled":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"regional_replica_count":{"type":"number","required":true},"storage_account_type":{"type":"string","optional":true,"default":"Standard_LRS"}}},"required":true}}}},"azurerm_signalr_service":{"block":{"attributes":{"aad_auth_enabled":{"type":"bool","optional":true,"default":true},"connectivity_logs_enabled":{"type":"bool","optional":true,"default":false},"hostname":{"type":"string","computed":true},"http_request_logs_enabled":{"type":"bool","optional":true,"default":false},"ip_address":{"type":"string","computed":true},"live_trace_enabled":{"type":"bool","optional":true,"default":false},"local_auth_enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"messaging_logs_enabled":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"primary_access_key":{"type":"string","computed":true},"primary_connection_string":{"type":"string","computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"public_port":{"type":"number","computed":true},"resource_group_name":{"type":"string","required":true},"secondary_access_key":{"type":"string","computed":true},"secondary_connection_string":{"type":"string","computed":true},"server_port":{"type":"number","computed":true},"serverless_connection_timeout_in_seconds":{"type":"number","optional":true,"default":30},"service_mode":{"type":"string","optional":true,"default":"Default"},"tags":{"type":["map","string"],"optional":true},"tls_client_cert_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"cors":{"nesting_mode":3,"block":{"attributes":{"allowed_origins":{"type":["set","string"],"required":true}}},"optional":true,"computed":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"live_trace":{"nesting_mode":3,"block":{"attributes":{"connectivity_logs_enabled":{"type":"bool","optional":true,"default":true},"enabled":{"type":"bool","optional":true,"default":true},"http_request_logs_enabled":{"type":"bool","optional":true,"default":true},"messaging_logs_enabled":{"type":"bool","optional":true,"default":true}}},"optional":true},"sku":{"nesting_mode":3,"block":{"attributes":{"capacity":{"type":"number","required":true},"name":{"type":"string","required":true}}},"required":true},"upstream_endpoint":{"nesting_mode":4,"block":{"attributes":{"category_pattern":{"type":["list","string"],"required":true},"event_pattern":{"type":["list","string"],"required":true},"hub_pattern":{"type":["list","string"],"required":true},"url_template":{"type":"string","required":true},"user_assigned_identity_id":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_signalr_service_custom_certificate":{"block":{"attributes":{"certificate_version":{"type":"string","computed":true},"custom_certificate_id":{"type":"string","required":true},"name":{"type":"string","required":true},"signalr_service_id":{"type":"string","required":true}}}},"azurerm_signalr_service_custom_domain":{"block":{"attributes":{"domain_name":{"type":"string","required":true},"name":{"type":"string","required":true},"signalr_custom_certificate_id":{"type":"string","required":true},"signalr_service_id":{"type":"string","required":true}}}},"azurerm_signalr_service_network_acl":{"block":{"attributes":{"default_action":{"type":"string","required":true},"signalr_service_id":{"type":"string","required":true}},"block_types":{"private_endpoint":{"nesting_mode":4,"block":{"attributes":{"allowed_request_types":{"type":["set","string"],"optional":true},"denied_request_types":{"type":["set","string"],"optional":true},"id":{"type":"string","required":true}}},"optional":true},"public_network":{"nesting_mode":3,"block":{"attributes":{"allowed_request_types":{"type":["set","string"],"optional":true,"conflicts_with":["public_network.0.denied_request_types"]},"denied_request_types":{"type":["set","string"],"optional":true,"conflicts_with":["public_network.0.allowed_request_types"]}}},"required":true}}}},"azurerm_signalr_shared_private_link_resource":{"block":{"attributes":{"name":{"type":"string","required":true},"request_message":{"type":"string","optional":true},"signalr_service_id":{"type":"string","required":true},"status":{"type":"string","computed":true},"sub_resource_name":{"type":"string","required":true},"target_resource_id":{"type":"string","required":true}}}},"azurerm_site_recovery_fabric":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"recovery_vault_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_site_recovery_hyperv_network_mapping":{"block":{"attributes":{"name":{"type":"string","required":true},"recovery_vault_id":{"type":"string","required":true},"source_network_name":{"type":"string","required":true},"source_system_center_virtual_machine_manager_name":{"type":"string","required":true},"target_network_id":{"type":"string","required":true}}}},"azurerm_site_recovery_hyperv_replication_policy":{"block":{"attributes":{"application_consistent_snapshot_frequency_in_hours":{"type":"number","required":true},"name":{"type":"string","required":true},"recovery_point_retention_in_hours":{"type":"number","required":true},"recovery_vault_id":{"type":"string","required":true},"replication_interval_in_seconds":{"type":"number","required":true}}}},"azurerm_site_recovery_hyperv_replication_policy_association":{"block":{"attributes":{"hyperv_site_id":{"type":"string","required":true},"name":{"type":"string","required":true},"policy_id":{"type":"string","required":true}}}},"azurerm_site_recovery_network_mapping":{"block":{"attributes":{"name":{"type":"string","required":true},"recovery_vault_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"source_network_id":{"type":"string","required":true},"source_recovery_fabric_name":{"type":"string","required":true},"target_network_id":{"type":"string","required":true},"target_recovery_fabric_name":{"type":"string","required":true}}}},"azurerm_site_recovery_protection_container":{"block":{"attributes":{"name":{"type":"string","required":true},"recovery_fabric_name":{"type":"string","required":true},"recovery_vault_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_site_recovery_protection_container_mapping":{"block":{"attributes":{"name":{"type":"string","required":true},"recovery_fabric_name":{"type":"string","required":true},"recovery_replication_policy_id":{"type":"string","required":true},"recovery_source_protection_container_name":{"type":"string","required":true},"recovery_target_protection_container_id":{"type":"string","required":true},"recovery_vault_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}},"block_types":{"automatic_update":{"nesting_mode":3,"block":{"attributes":{"authentication_type":{"type":"string","optional":true,"default":"SystemAssignedIdentity"},"automation_account_id":{"type":"string","optional":true},"enabled":{"type":"bool","optional":true,"default":false}}},"optional":true,"computed":true}}}},"azurerm_site_recovery_replicated_vm":{"block":{"attributes":{"managed_disk":{"type":["set",["object",{"disk_id":"string","staging_storage_account_id":"string","target_disk_encryption":["list",["object",{"disk_encryption_key":["list",["object",{"secret_url":"string","vault_id":"string"}]],"key_encryption_key":["list",["object",{"key_url":"string","vault_id":"string"}]]}]],"target_disk_encryption_set_id":"string","target_disk_type":"string","target_replica_disk_type":"string","target_resource_group_id":"string"}]],"optional":true,"computed":true},"multi_vm_group_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"network_interface":{"type":["set",["object",{"failover_test_public_ip_address_id":"string","failover_test_static_ip":"string","failover_test_subnet_name":"string","recovery_load_balancer_backend_address_pool_ids":["set","string"],"recovery_public_ip_address_id":"string","source_network_interface_id":"string","target_static_ip":"string","target_subnet_name":"string"}]],"optional":true,"computed":true},"recovery_replication_policy_id":{"type":"string","required":true},"recovery_vault_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"source_recovery_fabric_name":{"type":"string","required":true},"source_recovery_protection_container_name":{"type":"string","required":true},"source_vm_id":{"type":"string","required":true},"target_availability_set_id":{"type":"string","optional":true,"conflicts_with":["target_zone"]},"target_boot_diagnostic_storage_account_id":{"type":"string","optional":true},"target_capacity_reservation_group_id":{"type":"string","optional":true},"target_edge_zone":{"type":"string","optional":true},"target_network_id":{"type":"string","optional":true,"computed":true},"target_proximity_placement_group_id":{"type":"string","optional":true},"target_recovery_fabric_id":{"type":"string","required":true},"target_recovery_protection_container_id":{"type":"string","required":true},"target_resource_group_id":{"type":"string","required":true},"target_virtual_machine_scale_set_id":{"type":"string","optional":true},"target_virtual_machine_size":{"type":"string","optional":true,"computed":true},"target_zone":{"type":"string","optional":true},"test_network_id":{"type":"string","optional":true,"computed":true},"unmanaged_disk":{"type":["set",["object",{"disk_uri":"string","staging_storage_account_id":"string","target_storage_account_id":"string"}]],"optional":true,"computed":true}}}},"azurerm_site_recovery_replication_policy":{"block":{"attributes":{"application_consistent_snapshot_frequency_in_minutes":{"type":"number","required":true},"name":{"type":"string","required":true},"recovery_point_retention_in_minutes":{"type":"number","required":true},"recovery_vault_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_site_recovery_replication_recovery_plan":{"block":{"attributes":{"name":{"type":"string","required":true},"recovery_vault_id":{"type":"string","required":true},"source_recovery_fabric_id":{"type":"string","required":true},"target_recovery_fabric_id":{"type":"string","required":true}},"block_types":{"azure_to_azure_settings":{"nesting_mode":3,"block":{"attributes":{"primary_edge_zone":{"type":"string","optional":true,"required_with":["azure_to_azure_settings.0.recovery_edge_zone"]},"primary_zone":{"type":"string","optional":true,"required_with":["azure_to_azure_settings.0.recovery_zone"]},"recovery_edge_zone":{"type":"string","optional":true,"required_with":["azure_to_azure_settings.0.primary_edge_zone"]},"recovery_zone":{"type":"string","optional":true,"required_with":["azure_to_azure_settings.0.primary_zone"]}}},"optional":true},"boot_recovery_group":{"nesting_mode":3,"block":{"attributes":{"replicated_protected_items":{"type":["list","string"],"optional":true}},"block_types":{"post_action":{"nesting_mode":3,"block":{"attributes":{"fabric_location":{"type":"string","optional":true},"fail_over_directions":{"type":["set","string"],"required":true},"fail_over_types":{"type":["set","string"],"required":true},"manual_action_instruction":{"type":"string","optional":true},"name":{"type":"string","required":true},"runbook_id":{"type":"string","optional":true},"script_path":{"type":"string","optional":true},"type":{"type":"string","required":true}}},"optional":true},"pre_action":{"nesting_mode":3,"block":{"attributes":{"fabric_location":{"type":"string","optional":true},"fail_over_directions":{"type":["set","string"],"required":true},"fail_over_types":{"type":["set","string"],"required":true},"manual_action_instruction":{"type":"string","optional":true},"name":{"type":"string","required":true},"runbook_id":{"type":"string","optional":true},"script_path":{"type":"string","optional":true},"type":{"type":"string","required":true}}},"optional":true}}},"required":true},"failover_recovery_group":{"nesting_mode":3,"block":{"block_types":{"post_action":{"nesting_mode":3,"block":{"attributes":{"fabric_location":{"type":"string","optional":true},"fail_over_directions":{"type":["set","string"],"required":true},"fail_over_types":{"type":["set","string"],"required":true},"manual_action_instruction":{"type":"string","optional":true},"name":{"type":"string","required":true},"runbook_id":{"type":"string","optional":true},"script_path":{"type":"string","optional":true},"type":{"type":"string","required":true}}},"optional":true},"pre_action":{"nesting_mode":3,"block":{"attributes":{"fabric_location":{"type":"string","optional":true},"fail_over_directions":{"type":["set","string"],"required":true},"fail_over_types":{"type":["set","string"],"required":true},"manual_action_instruction":{"type":"string","optional":true},"name":{"type":"string","required":true},"runbook_id":{"type":"string","optional":true},"script_path":{"type":"string","optional":true},"type":{"type":"string","required":true}}},"optional":true}}},"required":true},"shutdown_recovery_group":{"nesting_mode":3,"block":{"block_types":{"post_action":{"nesting_mode":3,"block":{"attributes":{"fabric_location":{"type":"string","optional":true},"fail_over_directions":{"type":["set","string"],"required":true},"fail_over_types":{"type":["set","string"],"required":true},"manual_action_instruction":{"type":"string","optional":true},"name":{"type":"string","required":true},"runbook_id":{"type":"string","optional":true},"script_path":{"type":"string","optional":true},"type":{"type":"string","required":true}}},"optional":true},"pre_action":{"nesting_mode":3,"block":{"attributes":{"fabric_location":{"type":"string","optional":true},"fail_over_directions":{"type":["set","string"],"required":true},"fail_over_types":{"type":["set","string"],"required":true},"manual_action_instruction":{"type":"string","optional":true},"name":{"type":"string","required":true},"runbook_id":{"type":"string","optional":true},"script_path":{"type":"string","optional":true},"type":{"type":"string","required":true}}},"optional":true}}},"required":true}}}},"azurerm_site_recovery_services_vault_hyperv_site":{"block":{"attributes":{"name":{"type":"string","required":true},"recovery_vault_id":{"type":"string","required":true}}}},"azurerm_site_recovery_vmware_replicated_vm":{"block":{"attributes":{"appliance_name":{"type":"string","required":true},"default_log_storage_account_id":{"type":"string","optional":true,"exactly_one_of":["managed_disk","default_log_storage_account_id"]},"default_recovery_disk_type":{"type":"string","optional":true,"exactly_one_of":["managed_disk","default_recovery_disk_type"]},"default_target_disk_encryption_set_id":{"type":"string","optional":true},"license_type":{"type":"string","optional":true,"default":"NotSpecified"},"multi_vm_group_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"physical_server_credential_name":{"type":"string","required":true},"recovery_replication_policy_id":{"type":"string","required":true},"recovery_vault_id":{"type":"string","required":true},"source_vm_name":{"type":"string","required":true},"target_availability_set_id":{"type":"string","optional":true,"conflicts_with":["target_zone"]},"target_boot_diagnostics_storage_account_id":{"type":"string","optional":true},"target_network_id":{"type":"string","optional":true,"required_with":["network_interface"]},"target_proximity_placement_group_id":{"type":"string","optional":true},"target_resource_group_id":{"type":"string","required":true},"target_vm_name":{"type":"string","required":true},"target_vm_size":{"type":"string","optional":true},"target_zone":{"type":"string","optional":true,"conflicts_with":["target_availability_set_id"]},"test_network_id":{"type":"string","optional":true}},"block_types":{"managed_disk":{"nesting_mode":3,"block":{"attributes":{"disk_id":{"type":"string","required":true},"log_storage_account_id":{"type":"string","optional":true},"target_disk_encryption_set_id":{"type":"string","optional":true},"target_disk_type":{"type":"string","required":true}}},"optional":true},"network_interface":{"nesting_mode":3,"block":{"attributes":{"is_primary":{"type":"bool","required":true},"source_mac_address":{"type":"string","required":true},"target_static_ip":{"type":"string","optional":true},"target_subnet_name":{"type":"string","optional":true},"test_subnet_name":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_site_recovery_vmware_replication_policy":{"block":{"attributes":{"application_consistent_snapshot_frequency_in_minutes":{"type":"number","required":true},"name":{"type":"string","required":true},"recovery_point_retention_in_minutes":{"type":"number","required":true},"recovery_vault_id":{"type":"string","required":true}}}},"azurerm_site_recovery_vmware_replication_policy_association":{"block":{"attributes":{"name":{"type":"string","required":true},"policy_id":{"type":"string","required":true},"recovery_vault_id":{"type":"string","required":true}}}},"azurerm_snapshot":{"block":{"attributes":{"create_option":{"type":"string","required":true},"disk_access_id":{"type":"string","optional":true},"disk_size_gb":{"type":"number","optional":true,"computed":true},"incremental_enabled":{"type":"bool","optional":true,"default":false},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"network_access_policy":{"type":"string","optional":true,"default":"AllowAll"},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"source_resource_id":{"type":"string","optional":true},"source_uri":{"type":"string","optional":true},"storage_account_id":{"type":"string","optional":true},"tags":{"type":["map","string"],"optional":true},"trusted_launch_enabled":{"type":"bool","computed":true}},"block_types":{"encryption_settings":{"nesting_mode":3,"block":{"block_types":{"disk_encryption_key":{"nesting_mode":3,"block":{"attributes":{"secret_url":{"type":"string","required":true},"source_vault_id":{"type":"string","required":true}}},"required":true},"key_encryption_key":{"nesting_mode":3,"block":{"attributes":{"key_url":{"type":"string","required":true},"source_vault_id":{"type":"string","required":true}}},"optional":true}}},"optional":true}}}},"azurerm_source_control_token":{"block":{"attributes":{"token":{"type":"string","required":true},"token_secret":{"type":"string","optional":true},"type":{"type":"string","required":true}}}},"azurerm_spatial_anchors_account":{"block":{"attributes":{"account_domain":{"type":"string","computed":true},"account_id":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_spring_cloud_accelerator":{"block":{"attributes":{"name":{"type":"string","required":true},"spring_cloud_service_id":{"type":"string","required":true}}}},"azurerm_spring_cloud_active_deployment":{"block":{"attributes":{"deployment_name":{"type":"string","required":true},"spring_cloud_app_id":{"type":"string","required":true}}}},"azurerm_spring_cloud_api_portal":{"block":{"attributes":{"api_try_out_enabled":{"type":"bool","optional":true},"gateway_ids":{"type":["set","string"],"optional":true},"https_only_enabled":{"type":"bool","optional":true},"instance_count":{"type":"number","optional":true,"default":1},"name":{"type":"string","required":true},"public_network_access_enabled":{"type":"bool","optional":true},"spring_cloud_service_id":{"type":"string","required":true},"url":{"type":"string","computed":true}},"block_types":{"sso":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","optional":true},"client_secret":{"type":"string","optional":true},"issuer_uri":{"type":"string","optional":true},"scope":{"type":["set","string"],"optional":true}}},"optional":true}}}},"azurerm_spring_cloud_api_portal_custom_domain":{"block":{"attributes":{"name":{"type":"string","required":true},"spring_cloud_api_portal_id":{"type":"string","required":true},"thumbprint":{"type":"string","optional":true}}}},"azurerm_spring_cloud_app":{"block":{"attributes":{"addon_json":{"type":"string","optional":true,"computed":true},"fqdn":{"type":"string","computed":true},"https_only":{"type":"bool","optional":true,"default":false},"is_public":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"public_endpoint_enabled":{"type":"bool","optional":true},"resource_group_name":{"type":"string","required":true},"service_name":{"type":"string","required":true},"tls_enabled":{"type":"bool","optional":true,"default":false},"url":{"type":"string","computed":true}},"block_types":{"custom_persistent_disk":{"nesting_mode":3,"block":{"attributes":{"mount_options":{"type":["set","string"],"optional":true},"mount_path":{"type":"string","required":true},"read_only_enabled":{"type":"bool","optional":true,"default":false},"share_name":{"type":"string","required":true},"storage_name":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"ingress_settings":{"nesting_mode":3,"block":{"attributes":{"backend_protocol":{"type":"string","optional":true,"default":"Default"},"read_timeout_in_seconds":{"type":"number","optional":true,"default":300},"send_timeout_in_seconds":{"type":"number","optional":true,"default":60},"session_affinity":{"type":"string","optional":true,"default":"None"},"session_cookie_max_age":{"type":"number","optional":true}}},"optional":true,"computed":true},"persistent_disk":{"nesting_mode":3,"block":{"attributes":{"mount_path":{"type":"string","optional":true,"default":"/persistent"},"size_in_gb":{"type":"number","required":true}}},"optional":true,"computed":true}}}},"azurerm_spring_cloud_app_cosmosdb_association":{"block":{"attributes":{"api_type":{"type":"string","required":true},"cosmosdb_access_key":{"type":"string","required":true},"cosmosdb_account_id":{"type":"string","required":true},"cosmosdb_cassandra_keyspace_name":{"type":"string","optional":true,"conflicts_with":["cosmosdb_gremlin_database_name","cosmosdb_gremlin_graph_name","cosmosdb_mongo_database_name","cosmosdb_sql_database_name"]},"cosmosdb_gremlin_database_name":{"type":"string","optional":true,"conflicts_with":["cosmosdb_cassandra_keyspace_name","cosmosdb_mongo_database_name","cosmosdb_sql_database_name"],"required_with":["cosmosdb_gremlin_graph_name"]},"cosmosdb_gremlin_graph_name":{"type":"string","optional":true,"conflicts_with":["cosmosdb_cassandra_keyspace_name","cosmosdb_mongo_database_name","cosmosdb_sql_database_name"],"required_with":["cosmosdb_gremlin_database_name"]},"cosmosdb_mongo_database_name":{"type":"string","optional":true,"conflicts_with":["cosmosdb_cassandra_keyspace_name","cosmosdb_gremlin_database_name","cosmosdb_gremlin_graph_name","cosmosdb_sql_database_name"]},"cosmosdb_sql_database_name":{"type":"string","optional":true,"conflicts_with":["cosmosdb_cassandra_keyspace_name","cosmosdb_gremlin_database_name","cosmosdb_gremlin_graph_name","cosmosdb_mongo_database_name"]},"name":{"type":"string","required":true},"spring_cloud_app_id":{"type":"string","required":true}}}},"azurerm_spring_cloud_app_dynamics_application_performance_monitoring":{"block":{"attributes":{"agent_account_access_key":{"type":"string","required":true},"agent_account_name":{"type":"string","required":true},"agent_application_name":{"type":"string","optional":true},"agent_node_name":{"type":"string","optional":true},"agent_tier_name":{"type":"string","optional":true},"agent_unique_host_id":{"type":"string","optional":true},"controller_host_name":{"type":"string","required":true},"controller_port":{"type":"number","optional":true},"controller_ssl_enabled":{"type":"bool","optional":true},"globally_enabled":{"type":"bool","optional":true},"name":{"type":"string","required":true},"spring_cloud_service_id":{"type":"string","required":true}}}},"azurerm_spring_cloud_app_mysql_association":{"block":{"attributes":{"database_name":{"type":"string","required":true},"mysql_server_id":{"type":"string","required":true},"name":{"type":"string","required":true},"password":{"type":"string","required":true},"spring_cloud_app_id":{"type":"string","required":true},"username":{"type":"string","required":true}}}},"azurerm_spring_cloud_app_redis_association":{"block":{"attributes":{"name":{"type":"string","required":true},"redis_access_key":{"type":"string","required":true},"redis_cache_id":{"type":"string","required":true},"spring_cloud_app_id":{"type":"string","required":true},"ssl_enabled":{"type":"bool","optional":true,"default":true}}}},"azurerm_spring_cloud_application_insights_application_performance_monitoring":{"block":{"attributes":{"connection_string":{"type":"string","optional":true},"globally_enabled":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"role_instance":{"type":"string","optional":true},"role_name":{"type":"string","optional":true},"sampling_percentage":{"type":"number","optional":true},"sampling_requests_per_second":{"type":"number","optional":true},"spring_cloud_service_id":{"type":"string","required":true}}}},"azurerm_spring_cloud_application_live_view":{"block":{"attributes":{"name":{"type":"string","required":true},"spring_cloud_service_id":{"type":"string","required":true}}}},"azurerm_spring_cloud_build_deployment":{"block":{"attributes":{"addon_json":{"type":"string","optional":true,"computed":true},"application_performance_monitoring_ids":{"type":["list","string"],"optional":true},"build_result_id":{"type":"string","required":true},"environment_variables":{"type":["map","string"],"optional":true},"instance_count":{"type":"number","optional":true,"default":1},"name":{"type":"string","required":true},"spring_cloud_app_id":{"type":"string","required":true}},"block_types":{"quota":{"nesting_mode":3,"block":{"attributes":{"cpu":{"type":"string","optional":true,"computed":true},"memory":{"type":"string","optional":true,"computed":true}}},"optional":true,"computed":true}}}},"azurerm_spring_cloud_build_pack_binding":{"block":{"attributes":{"binding_type":{"type":"string","optional":true},"name":{"type":"string","required":true},"spring_cloud_builder_id":{"type":"string","required":true}},"block_types":{"launch":{"nesting_mode":3,"block":{"attributes":{"properties":{"type":["map","string"],"optional":true},"secrets":{"type":["map","string"],"optional":true}}},"optional":true}}}},"azurerm_spring_cloud_builder":{"block":{"attributes":{"name":{"type":"string","required":true},"spring_cloud_service_id":{"type":"string","required":true}},"block_types":{"build_pack_group":{"nesting_mode":4,"block":{"attributes":{"build_pack_ids":{"type":["list","string"],"optional":true},"name":{"type":"string","required":true}}},"required":true},"stack":{"nesting_mode":3,"block":{"attributes":{"id":{"type":"string","required":true},"version":{"type":"string","required":true}}},"required":true}}}},"azurerm_spring_cloud_certificate":{"block":{"attributes":{"certificate_content":{"type":"string","optional":true,"at_least_one_of":["key_vault_certificate_id","certificate_content"]},"exclude_private_key":{"type":"bool","optional":true},"key_vault_certificate_id":{"type":"string","optional":true,"at_least_one_of":["key_vault_certificate_id","certificate_content"]},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"service_name":{"type":"string","required":true},"thumbprint":{"type":"string","computed":true}}}},"azurerm_spring_cloud_configuration_service":{"block":{"attributes":{"generation":{"type":"string","optional":true},"name":{"type":"string","required":true},"refresh_interval_in_seconds":{"type":"number","optional":true},"spring_cloud_service_id":{"type":"string","required":true}},"block_types":{"repository":{"nesting_mode":3,"block":{"attributes":{"ca_certificate_id":{"type":"string","optional":true},"host_key":{"type":"string","optional":true},"host_key_algorithm":{"type":"string","optional":true},"label":{"type":"string","required":true},"name":{"type":"string","required":true},"password":{"type":"string","optional":true},"patterns":{"type":["set","string"],"required":true},"private_key":{"type":"string","optional":true},"search_paths":{"type":["set","string"],"optional":true},"strict_host_key_checking":{"type":"bool","optional":true},"uri":{"type":"string","required":true},"username":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_spring_cloud_connection":{"block":{"attributes":{"client_type":{"type":"string","optional":true,"default":"none"},"name":{"type":"string","required":true},"spring_cloud_id":{"type":"string","required":true},"target_resource_id":{"type":"string","required":true},"vnet_solution":{"type":"string","optional":true}},"block_types":{"authentication":{"nesting_mode":3,"block":{"attributes":{"certificate":{"type":"string","optional":true},"client_id":{"type":"string","optional":true},"name":{"type":"string","optional":true},"principal_id":{"type":"string","optional":true},"secret":{"type":"string","optional":true},"subscription_id":{"type":"string","optional":true},"type":{"type":"string","required":true}}},"required":true},"secret_store":{"nesting_mode":3,"block":{"attributes":{"key_vault_id":{"type":"string","required":true}}},"optional":true}}}},"azurerm_spring_cloud_container_deployment":{"block":{"attributes":{"addon_json":{"type":"string","optional":true,"computed":true},"application_performance_monitoring_ids":{"type":["list","string"],"optional":true},"arguments":{"type":["list","string"],"optional":true},"commands":{"type":["list","string"],"optional":true},"environment_variables":{"type":["map","string"],"optional":true},"image":{"type":"string","required":true},"instance_count":{"type":"number","optional":true,"default":1},"language_framework":{"type":"string","optional":true},"name":{"type":"string","required":true},"server":{"type":"string","required":true},"spring_cloud_app_id":{"type":"string","required":true}},"block_types":{"quota":{"nesting_mode":3,"block":{"attributes":{"cpu":{"type":"string","optional":true,"computed":true},"memory":{"type":"string","optional":true,"computed":true}}},"optional":true,"computed":true}}}},"azurerm_spring_cloud_custom_domain":{"block":{"attributes":{"certificate_name":{"type":"string","optional":true,"required_with":["thumbprint"]},"name":{"type":"string","required":true},"spring_cloud_app_id":{"type":"string","required":true},"thumbprint":{"type":"string","optional":true,"required_with":["certificate_name"]}}}},"azurerm_spring_cloud_customized_accelerator":{"block":{"attributes":{"accelerator_tags":{"type":["list","string"],"optional":true},"accelerator_type":{"type":"string","optional":true,"default":"Accelerator"},"description":{"type":"string","optional":true},"display_name":{"type":"string","optional":true},"icon_url":{"type":"string","optional":true},"name":{"type":"string","required":true},"spring_cloud_accelerator_id":{"type":"string","required":true}},"block_types":{"git_repository":{"nesting_mode":3,"block":{"attributes":{"branch":{"type":"string","optional":true,"exactly_one_of":["git_repository.0.branch","git_repository.0.commit","git_repository.0.git_tag"]},"ca_certificate_id":{"type":"string","optional":true},"commit":{"type":"string","optional":true,"exactly_one_of":["git_repository.0.branch","git_repository.0.commit","git_repository.0.git_tag"]},"git_tag":{"type":"string","optional":true,"exactly_one_of":["git_repository.0.branch","git_repository.0.commit","git_repository.0.git_tag"]},"interval_in_seconds":{"type":"number","optional":true},"path":{"type":"string","optional":true},"url":{"type":"string","required":true}},"block_types":{"basic_auth":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true,"conflicts_with":["git_repository.0.ssh_auth"]},"ssh_auth":{"nesting_mode":3,"block":{"attributes":{"host_key":{"type":"string","optional":true},"host_key_algorithm":{"type":"string","optional":true},"private_key":{"type":"string","required":true}}},"optional":true,"conflicts_with":["git_repository.0.basic_auth"]}}},"required":true}}}},"azurerm_spring_cloud_dev_tool_portal":{"block":{"attributes":{"application_accelerator_enabled":{"type":"bool","optional":true,"computed":true},"application_live_view_enabled":{"type":"bool","optional":true,"computed":true},"name":{"type":"string","required":true},"public_network_access_enabled":{"type":"bool","optional":true},"spring_cloud_service_id":{"type":"string","required":true}},"block_types":{"sso":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","optional":true},"client_secret":{"type":"string","optional":true},"metadata_url":{"type":"string","optional":true},"scope":{"type":["set","string"],"optional":true}}},"optional":true}}}},"azurerm_spring_cloud_dynatrace_application_performance_monitoring":{"block":{"attributes":{"api_token":{"type":"string","optional":true},"api_url":{"type":"string","optional":true},"connection_point":{"type":"string","required":true},"environment_id":{"type":"string","optional":true},"globally_enabled":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"spring_cloud_service_id":{"type":"string","required":true},"tenant":{"type":"string","required":true},"tenant_token":{"type":"string","required":true}}}},"azurerm_spring_cloud_elastic_application_performance_monitoring":{"block":{"attributes":{"application_packages":{"type":["list","string"],"required":true},"globally_enabled":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"server_url":{"type":"string","required":true},"service_name":{"type":"string","required":true},"spring_cloud_service_id":{"type":"string","required":true}}}},"azurerm_spring_cloud_gateway":{"block":{"attributes":{"application_performance_monitoring_ids":{"type":["list","string"],"optional":true},"application_performance_monitoring_types":{"type":["list","string"],"optional":true},"environment_variables":{"type":["map","string"],"optional":true},"https_only":{"type":"bool","optional":true},"instance_count":{"type":"number","optional":true,"default":1},"name":{"type":"string","required":true},"public_network_access_enabled":{"type":"bool","optional":true},"sensitive_environment_variables":{"type":["map","string"],"optional":true},"spring_cloud_service_id":{"type":"string","required":true},"url":{"type":"string","computed":true}},"block_types":{"api_metadata":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"documentation_url":{"type":"string","optional":true},"server_url":{"type":"string","optional":true},"title":{"type":"string","optional":true},"version":{"type":"string","optional":true}}},"optional":true},"client_authorization":{"nesting_mode":3,"block":{"attributes":{"certificate_ids":{"type":["list","string"],"optional":true},"verification_enabled":{"type":"bool","optional":true}}},"optional":true},"cors":{"nesting_mode":3,"block":{"attributes":{"allowed_headers":{"type":["set","string"],"optional":true},"allowed_methods":{"type":["set","string"],"optional":true},"allowed_origin_patterns":{"type":["set","string"],"optional":true},"allowed_origins":{"type":["set","string"],"optional":true},"credentials_allowed":{"type":"bool","optional":true},"exposed_headers":{"type":["set","string"],"optional":true},"max_age_seconds":{"type":"number","optional":true}}},"optional":true},"local_response_cache_per_instance":{"nesting_mode":3,"block":{"attributes":{"size":{"type":"string","optional":true},"time_to_live":{"type":"string","optional":true}}},"optional":true,"conflicts_with":["local_response_cache_per_route"]},"local_response_cache_per_route":{"nesting_mode":3,"block":{"attributes":{"size":{"type":"string","optional":true},"time_to_live":{"type":"string","optional":true}}},"optional":true,"conflicts_with":["local_response_cache_per_instance"]},"quota":{"nesting_mode":3,"block":{"attributes":{"cpu":{"type":"string","optional":true,"default":"1"},"memory":{"type":"string","optional":true,"default":"2Gi"}}},"optional":true,"computed":true},"sso":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","optional":true},"client_secret":{"type":"string","optional":true},"issuer_uri":{"type":"string","optional":true},"scope":{"type":["set","string"],"optional":true}}},"optional":true}}}},"azurerm_spring_cloud_gateway_custom_domain":{"block":{"attributes":{"name":{"type":"string","required":true},"spring_cloud_gateway_id":{"type":"string","required":true},"thumbprint":{"type":"string","optional":true}}}},"azurerm_spring_cloud_gateway_route_config":{"block":{"attributes":{"filters":{"type":["set","string"],"optional":true},"name":{"type":"string","required":true},"predicates":{"type":["set","string"],"optional":true},"protocol":{"type":"string","required":true},"spring_cloud_app_id":{"type":"string","optional":true},"spring_cloud_gateway_id":{"type":"string","required":true},"sso_validation_enabled":{"type":"bool","optional":true}},"block_types":{"open_api":{"nesting_mode":3,"block":{"attributes":{"uri":{"type":"string","optional":true}}},"optional":true},"route":{"nesting_mode":4,"block":{"attributes":{"classification_tags":{"type":["set","string"],"optional":true},"description":{"type":"string","optional":true},"filters":{"type":["set","string"],"optional":true},"order":{"type":"number","required":true},"predicates":{"type":["set","string"],"optional":true},"sso_validation_enabled":{"type":"bool","optional":true},"title":{"type":"string","optional":true},"token_relay":{"type":"bool","optional":true},"uri":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_spring_cloud_java_deployment":{"block":{"attributes":{"environment_variables":{"type":["map","string"],"optional":true},"instance_count":{"type":"number","optional":true,"default":1},"jvm_options":{"type":"string","optional":true},"name":{"type":"string","required":true},"runtime_version":{"type":"string","optional":true,"default":"Java_8"},"spring_cloud_app_id":{"type":"string","required":true}},"block_types":{"quota":{"nesting_mode":3,"block":{"attributes":{"cpu":{"type":"string","optional":true,"computed":true},"memory":{"type":"string","optional":true,"computed":true}}},"optional":true,"computed":true}}}},"azurerm_spring_cloud_new_relic_application_performance_monitoring":{"block":{"attributes":{"agent_enabled":{"type":"bool","optional":true,"default":true},"app_name":{"type":"string","required":true},"app_server_port":{"type":"number","optional":true},"audit_mode_enabled":{"type":"bool","optional":true},"auto_app_naming_enabled":{"type":"bool","optional":true},"auto_transaction_naming_enabled":{"type":"bool","optional":true,"default":true},"custom_tracing_enabled":{"type":"bool","optional":true,"default":true},"globally_enabled":{"type":"bool","optional":true},"labels":{"type":["map","string"],"optional":true},"license_key":{"type":"string","required":true},"name":{"type":"string","required":true},"spring_cloud_service_id":{"type":"string","required":true}}}},"azurerm_spring_cloud_service":{"block":{"attributes":{"build_agent_pool_size":{"type":"string","optional":true},"location":{"type":"string","required":true},"log_stream_public_endpoint_enabled":{"type":"bool","optional":true},"managed_environment_id":{"type":"string","optional":true},"name":{"type":"string","required":true},"outbound_public_ip_addresses":{"type":["list","string"],"computed":true},"required_network_traffic_rules":{"type":["list",["object",{"direction":"string","fqdns":["list","string"],"ip_addresses":["list","string"],"port":"number","protocol":"string"}]],"computed":true},"resource_group_name":{"type":"string","required":true},"service_registry_enabled":{"type":"bool","optional":true},"service_registry_id":{"type":"string","computed":true},"sku_name":{"type":"string","optional":true,"default":"S0"},"sku_tier":{"type":"string","optional":true,"computed":true},"tags":{"type":["map","string"],"optional":true},"zone_redundant":{"type":"bool","optional":true,"default":false}},"block_types":{"config_server_git_setting":{"nesting_mode":3,"block":{"attributes":{"label":{"type":"string","optional":true},"search_paths":{"type":["list","string"],"optional":true},"uri":{"type":"string","required":true}},"block_types":{"http_basic_auth":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true,"conflicts_with":["config_server_git_setting.0.ssh_auth"]},"repository":{"nesting_mode":3,"block":{"attributes":{"label":{"type":"string","optional":true},"name":{"type":"string","required":true},"pattern":{"type":["list","string"],"optional":true},"search_paths":{"type":["list","string"],"optional":true},"uri":{"type":"string","required":true}},"block_types":{"http_basic_auth":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true},"ssh_auth":{"nesting_mode":3,"block":{"attributes":{"host_key":{"type":"string","optional":true},"host_key_algorithm":{"type":"string","optional":true},"private_key":{"type":"string","required":true},"strict_host_key_checking_enabled":{"type":"bool","optional":true,"default":true}}},"optional":true}}},"optional":true},"ssh_auth":{"nesting_mode":3,"block":{"attributes":{"host_key":{"type":"string","optional":true},"host_key_algorithm":{"type":"string","optional":true},"private_key":{"type":"string","required":true},"strict_host_key_checking_enabled":{"type":"bool","optional":true,"default":true}}},"optional":true,"conflicts_with":["config_server_git_setting.0.http_basic_auth"]}}},"optional":true},"container_registry":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"password":{"type":"string","required":true},"server":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true},"default_build_service":{"nesting_mode":3,"block":{"attributes":{"container_registry_name":{"type":"string","optional":true}}},"optional":true},"marketplace":{"nesting_mode":3,"block":{"attributes":{"plan":{"type":"string","required":true},"product":{"type":"string","required":true},"publisher":{"type":"string","required":true}}},"optional":true,"computed":true},"network":{"nesting_mode":3,"block":{"attributes":{"app_network_resource_group":{"type":"string","optional":true,"computed":true},"app_subnet_id":{"type":"string","required":true},"cidr_ranges":{"type":["list","string"],"required":true},"outbound_type":{"type":"string","optional":true,"default":"loadBalancer"},"read_timeout_seconds":{"type":"number","optional":true},"service_runtime_network_resource_group":{"type":"string","optional":true,"computed":true},"service_runtime_subnet_id":{"type":"string","required":true}}},"optional":true},"trace":{"nesting_mode":3,"block":{"attributes":{"connection_string":{"type":"string","optional":true},"sample_rate":{"type":"number","optional":true,"default":10}}},"optional":true}}}},"azurerm_spring_cloud_storage":{"block":{"attributes":{"name":{"type":"string","required":true},"spring_cloud_service_id":{"type":"string","required":true},"storage_account_key":{"type":"string","required":true},"storage_account_name":{"type":"string","required":true}}}},"azurerm_ssh_public_key":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"public_key":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_stack_hci_cluster":{"block":{"attributes":{"automanage_configuration_id":{"type":"string","optional":true},"client_id":{"type":"string","optional":true},"cloud_id":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"resource_provider_object_id":{"type":"string","computed":true},"service_endpoint":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true},"tenant_id":{"type":"string","optional":true,"computed":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_stack_hci_deployment_setting":{"block":{"attributes":{"arc_resource_ids":{"type":["list","string"],"required":true},"stack_hci_cluster_id":{"type":"string","required":true},"version":{"type":"string","required":true}},"block_types":{"scale_unit":{"nesting_mode":3,"block":{"attributes":{"active_directory_organizational_unit_path":{"type":"string","required":true},"bitlocker_boot_volume_enabled":{"type":"bool","optional":true,"default":true},"bitlocker_data_volume_enabled":{"type":"bool","optional":true,"default":true},"credential_guard_enabled":{"type":"bool","optional":true,"default":false},"domain_fqdn":{"type":"string","required":true},"drift_control_enabled":{"type":"bool","optional":true,"default":true},"drtm_protection_enabled":{"type":"bool","optional":true,"default":true},"episodic_data_upload_enabled":{"type":"bool","optional":true,"default":true},"eu_location_enabled":{"type":"bool","optional":true,"default":false},"hvci_protection_enabled":{"type":"bool","optional":true,"default":true},"name_prefix":{"type":"string","required":true},"secrets_location":{"type":"string","required":true},"side_channel_mitigation_enabled":{"type":"bool","optional":true,"default":true},"smb_cluster_encryption_enabled":{"type":"bool","optional":true,"default":false},"smb_signing_enabled":{"type":"bool","optional":true,"default":true},"streaming_data_client_enabled":{"type":"bool","optional":true,"default":true},"wdac_enabled":{"type":"bool","optional":true,"default":true}},"block_types":{"cluster":{"nesting_mode":3,"block":{"attributes":{"azure_service_endpoint":{"type":"string","required":true},"cloud_account_name":{"type":"string","required":true},"name":{"type":"string","required":true},"witness_path":{"type":"string","required":true},"witness_type":{"type":"string","required":true}}},"required":true},"host_network":{"nesting_mode":3,"block":{"attributes":{"storage_auto_ip_enabled":{"type":"bool","optional":true,"default":true},"storage_connectivity_switchless_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"intent":{"nesting_mode":3,"block":{"attributes":{"adapter":{"type":["list","string"],"required":true},"adapter_property_override_enabled":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"qos_policy_override_enabled":{"type":"bool","optional":true,"default":false},"traffic_type":{"type":["list","string"],"required":true},"virtual_switch_configuration_override_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"adapter_property_override":{"nesting_mode":3,"block":{"attributes":{"jumbo_packet":{"type":"string","optional":true},"network_direct":{"type":"string","optional":true},"network_direct_technology":{"type":"string","optional":true}}},"optional":true},"qos_policy_override":{"nesting_mode":3,"block":{"attributes":{"bandwidth_percentage_smb":{"type":"string","optional":true},"priority_value8021_action_cluster":{"type":"string","optional":true},"priority_value8021_action_smb":{"type":"string","optional":true}}},"optional":true},"virtual_switch_configuration_override":{"nesting_mode":3,"block":{"attributes":{"enable_iov":{"type":"string","optional":true},"load_balancing_algorithm":{"type":"string","optional":true}}},"optional":true}}},"required":true},"storage_network":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"network_adapter_name":{"type":"string","required":true},"vlan_id":{"type":"string","required":true}}},"required":true}}},"required":true},"infrastructure_network":{"nesting_mode":3,"block":{"attributes":{"dhcp_enabled":{"type":"bool","optional":true,"default":false},"dns_server":{"type":["list","string"],"required":true},"gateway":{"type":"string","required":true},"subnet_mask":{"type":"string","required":true}},"block_types":{"ip_pool":{"nesting_mode":3,"block":{"attributes":{"ending_address":{"type":"string","required":true},"starting_address":{"type":"string","required":true}}},"required":true}}},"required":true},"optional_service":{"nesting_mode":3,"block":{"attributes":{"custom_location":{"type":"string","required":true}}},"required":true},"physical_node":{"nesting_mode":3,"block":{"attributes":{"ipv4_address":{"type":"string","required":true},"name":{"type":"string","required":true}}},"required":true},"storage":{"nesting_mode":3,"block":{"attributes":{"configuration_mode":{"type":"string","required":true}}},"required":true}}},"required":true}}}},"azurerm_stack_hci_extension":{"block":{"attributes":{"arc_setting_id":{"type":"string","required":true},"auto_upgrade_minor_version_enabled":{"type":"bool","optional":true,"default":true},"automatic_upgrade_enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"protected_settings":{"type":"string","optional":true},"publisher":{"type":"string","required":true},"settings":{"type":"string","optional":true},"type":{"type":"string","required":true},"type_handler_version":{"type":"string","optional":true}}}},"azurerm_stack_hci_logical_network":{"block":{"attributes":{"custom_location_id":{"type":"string","required":true},"dns_servers":{"type":["list","string"],"optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"virtual_switch_name":{"type":"string","required":true}},"block_types":{"subnet":{"nesting_mode":3,"block":{"attributes":{"address_prefix":{"type":"string","optional":true},"ip_allocation_method":{"type":"string","required":true},"vlan_id":{"type":"number","optional":true}},"block_types":{"ip_pool":{"nesting_mode":3,"block":{"attributes":{"end":{"type":"string","required":true},"start":{"type":"string","required":true}}},"optional":true},"route":{"nesting_mode":3,"block":{"attributes":{"address_prefix":{"type":"string","required":true},"name":{"type":"string","optional":true},"next_hop_ip_address":{"type":"string","required":true}}},"optional":true}}},"required":true}}}},"azurerm_stack_hci_marketplace_gallery_image":{"block":{"attributes":{"custom_location_id":{"type":"string","required":true},"hyperv_generation":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"os_type":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"storage_path_id":{"type":"string","optional":true},"tags":{"type":["map","string"],"optional":true},"version":{"type":"string","required":true}},"block_types":{"identifier":{"nesting_mode":3,"block":{"attributes":{"offer":{"type":"string","required":true},"publisher":{"type":"string","required":true},"sku":{"type":"string","required":true}}},"required":true}}}},"azurerm_stack_hci_network_interface":{"block":{"attributes":{"custom_location_id":{"type":"string","required":true},"dns_servers":{"type":["list","string"],"optional":true},"location":{"type":"string","required":true},"mac_address":{"type":"string","optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"ip_configuration":{"nesting_mode":3,"block":{"attributes":{"gateway":{"type":"string","computed":true},"prefix_length":{"type":"string","computed":true},"private_ip_address":{"type":"string","optional":true},"subnet_id":{"type":"string","required":true}}},"required":true}}}},"azurerm_stack_hci_storage_path":{"block":{"attributes":{"custom_location_id":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"path":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_stack_hci_virtual_hard_disk":{"block":{"attributes":{"block_size_in_bytes":{"type":"number","optional":true},"custom_location_id":{"type":"string","required":true},"disk_file_format":{"type":"string","optional":true},"disk_size_in_gb":{"type":"number","required":true},"dynamic_enabled":{"type":"bool","optional":true,"default":false},"hyperv_generation":{"type":"string","optional":true},"location":{"type":"string","required":true},"logical_sector_in_bytes":{"type":"number","optional":true},"name":{"type":"string","required":true},"physical_sector_in_bytes":{"type":"number","optional":true},"resource_group_name":{"type":"string","required":true},"storage_path_id":{"type":"string","optional":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_static_site":{"block":{"attributes":{"api_key":{"type":"string","computed":true},"app_settings":{"type":["map","string"],"optional":true},"default_host_name":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"sku_size":{"type":"string","optional":true,"default":"Free"},"sku_tier":{"type":"string","optional":true,"default":"Free"},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_static_site_custom_domain":{"block":{"attributes":{"domain_name":{"type":"string","required":true},"static_site_id":{"type":"string","required":true},"validation_token":{"type":"string","computed":true},"validation_type":{"type":"string","optional":true}}}},"azurerm_static_web_app":{"block":{"attributes":{"api_key":{"type":"string","computed":true},"app_settings":{"type":["map","string"],"optional":true},"configuration_file_changes_enabled":{"type":"bool","optional":true,"default":true},"default_host_name":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"preview_environments_enabled":{"type":"bool","optional":true,"default":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"repository_branch":{"type":"string","optional":true,"required_with":["repository_url","repository_token"]},"repository_token":{"type":"string","optional":true,"required_with":["repository_url","repository_branch"]},"repository_url":{"type":"string","optional":true,"required_with":["repository_token","repository_branch"]},"resource_group_name":{"type":"string","required":true},"sku_size":{"type":"string","optional":true,"default":"Free"},"sku_tier":{"type":"string","optional":true,"default":"Free"},"tags":{"type":["map","string"],"optional":true}},"block_types":{"basic_auth":{"nesting_mode":3,"block":{"attributes":{"environments":{"type":"string","required":true},"password":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_static_web_app_custom_domain":{"block":{"attributes":{"domain_name":{"type":"string","required":true},"static_web_app_id":{"type":"string","required":true},"validation_token":{"type":"string","computed":true},"validation_type":{"type":"string","required":true}}}},"azurerm_static_web_app_function_app_registration":{"block":{"attributes":{"function_app_id":{"type":"string","required":true},"static_web_app_id":{"type":"string","required":true}}}},"azurerm_storage_account":{"block":{"attributes":{"access_tier":{"type":"string","optional":true,"computed":true},"account_kind":{"type":"string","optional":true,"default":"StorageV2"},"account_replication_type":{"type":"string","required":true},"account_tier":{"type":"string","required":true},"allow_nested_items_to_be_public":{"type":"bool","optional":true,"default":true},"allowed_copy_scope":{"type":"string","optional":true},"cross_tenant_replication_enabled":{"type":"bool","optional":true,"default":false},"default_to_oauth_authentication":{"type":"bool","optional":true,"default":false},"dns_endpoint_type":{"type":"string","optional":true,"default":"Standard"},"edge_zone":{"type":"string","optional":true},"https_traffic_only_enabled":{"type":"bool","optional":true,"default":true},"infrastructure_encryption_enabled":{"type":"bool","optional":true,"default":false},"is_hns_enabled":{"type":"bool","optional":true,"default":false},"large_file_share_enabled":{"type":"bool","optional":true,"computed":true},"local_user_enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"min_tls_version":{"type":"string","optional":true,"default":"TLS1_2"},"name":{"type":"string","required":true},"nfsv3_enabled":{"type":"bool","optional":true,"default":false},"primary_access_key":{"type":"string","computed":true},"primary_blob_connection_string":{"type":"string","computed":true},"primary_blob_endpoint":{"type":"string","computed":true},"primary_blob_host":{"type":"string","computed":true},"primary_blob_internet_endpoint":{"type":"string","computed":true},"primary_blob_internet_host":{"type":"string","computed":true},"primary_blob_microsoft_endpoint":{"type":"string","computed":true},"primary_blob_microsoft_host":{"type":"string","computed":true},"primary_connection_string":{"type":"string","computed":true},"primary_dfs_endpoint":{"type":"string","computed":true},"primary_dfs_host":{"type":"string","computed":true},"primary_dfs_internet_endpoint":{"type":"string","computed":true},"primary_dfs_internet_host":{"type":"string","computed":true},"primary_dfs_microsoft_endpoint":{"type":"string","computed":true},"primary_dfs_microsoft_host":{"type":"string","computed":true},"primary_file_endpoint":{"type":"string","computed":true},"primary_file_host":{"type":"string","computed":true},"primary_file_internet_endpoint":{"type":"string","computed":true},"primary_file_internet_host":{"type":"string","computed":true},"primary_file_microsoft_endpoint":{"type":"string","computed":true},"primary_file_microsoft_host":{"type":"string","computed":true},"primary_location":{"type":"string","computed":true},"primary_queue_endpoint":{"type":"string","computed":true},"primary_queue_host":{"type":"string","computed":true},"primary_queue_microsoft_endpoint":{"type":"string","computed":true},"primary_queue_microsoft_host":{"type":"string","computed":true},"primary_table_endpoint":{"type":"string","computed":true},"primary_table_host":{"type":"string","computed":true},"primary_table_microsoft_endpoint":{"type":"string","computed":true},"primary_table_microsoft_host":{"type":"string","computed":true},"primary_web_endpoint":{"type":"string","computed":true},"primary_web_host":{"type":"string","computed":true},"primary_web_internet_endpoint":{"type":"string","computed":true},"primary_web_internet_host":{"type":"string","computed":true},"primary_web_microsoft_endpoint":{"type":"string","computed":true},"primary_web_microsoft_host":{"type":"string","computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"queue_encryption_key_type":{"type":"string","optional":true,"default":"Service"},"resource_group_name":{"type":"string","required":true},"secondary_access_key":{"type":"string","computed":true},"secondary_blob_connection_string":{"type":"string","computed":true},"secondary_blob_endpoint":{"type":"string","computed":true},"secondary_blob_host":{"type":"string","computed":true},"secondary_blob_internet_endpoint":{"type":"string","computed":true},"secondary_blob_internet_host":{"type":"string","computed":true},"secondary_blob_microsoft_endpoint":{"type":"string","computed":true},"secondary_blob_microsoft_host":{"type":"string","computed":true},"secondary_connection_string":{"type":"string","computed":true},"secondary_dfs_endpoint":{"type":"string","computed":true},"secondary_dfs_host":{"type":"string","computed":true},"secondary_dfs_internet_endpoint":{"type":"string","computed":true},"secondary_dfs_internet_host":{"type":"string","computed":true},"secondary_dfs_microsoft_endpoint":{"type":"string","computed":true},"secondary_dfs_microsoft_host":{"type":"string","computed":true},"secondary_file_endpoint":{"type":"string","computed":true},"secondary_file_host":{"type":"string","computed":true},"secondary_file_internet_endpoint":{"type":"string","computed":true},"secondary_file_internet_host":{"type":"string","computed":true},"secondary_file_microsoft_endpoint":{"type":"string","computed":true},"secondary_file_microsoft_host":{"type":"string","computed":true},"secondary_location":{"type":"string","computed":true},"secondary_queue_endpoint":{"type":"string","computed":true},"secondary_queue_host":{"type":"string","computed":true},"secondary_queue_microsoft_endpoint":{"type":"string","computed":true},"secondary_queue_microsoft_host":{"type":"string","computed":true},"secondary_table_endpoint":{"type":"string","computed":true},"secondary_table_host":{"type":"string","computed":true},"secondary_table_microsoft_endpoint":{"type":"string","computed":true},"secondary_table_microsoft_host":{"type":"string","computed":true},"secondary_web_endpoint":{"type":"string","computed":true},"secondary_web_host":{"type":"string","computed":true},"secondary_web_internet_endpoint":{"type":"string","computed":true},"secondary_web_internet_host":{"type":"string","computed":true},"secondary_web_microsoft_endpoint":{"type":"string","computed":true},"secondary_web_microsoft_host":{"type":"string","computed":true},"sftp_enabled":{"type":"bool","optional":true,"default":false},"shared_access_key_enabled":{"type":"bool","optional":true,"default":true},"table_encryption_key_type":{"type":"string","optional":true,"default":"Service"},"tags":{"type":["map","string"],"optional":true}},"block_types":{"azure_files_authentication":{"nesting_mode":3,"block":{"attributes":{"default_share_level_permission":{"type":"string","optional":true,"default":"None"},"directory_type":{"type":"string","required":true}},"block_types":{"active_directory":{"nesting_mode":3,"block":{"attributes":{"domain_guid":{"type":"string","required":true},"domain_name":{"type":"string","required":true},"domain_sid":{"type":"string","optional":true},"forest_name":{"type":"string","optional":true},"netbios_domain_name":{"type":"string","optional":true},"storage_sid":{"type":"string","optional":true}}},"optional":true,"computed":true}}},"optional":true},"blob_properties":{"nesting_mode":3,"block":{"attributes":{"change_feed_enabled":{"type":"bool","optional":true,"default":false},"change_feed_retention_in_days":{"type":"number","optional":true},"default_service_version":{"type":"string","optional":true,"computed":true},"last_access_time_enabled":{"type":"bool","optional":true,"default":false},"versioning_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"container_delete_retention_policy":{"nesting_mode":3,"block":{"attributes":{"days":{"type":"number","optional":true,"default":7}}},"optional":true},"cors_rule":{"nesting_mode":3,"block":{"attributes":{"allowed_headers":{"type":["list","string"],"required":true},"allowed_methods":{"type":["list","string"],"required":true},"allowed_origins":{"type":["list","string"],"required":true},"exposed_headers":{"type":["list","string"],"required":true},"max_age_in_seconds":{"type":"number","required":true}}},"optional":true},"delete_retention_policy":{"nesting_mode":3,"block":{"attributes":{"days":{"type":"number","optional":true,"default":7},"permanent_delete_enabled":{"type":"bool","optional":true,"default":false}}},"optional":true},"restore_policy":{"nesting_mode":3,"block":{"attributes":{"days":{"type":"number","required":true}}},"optional":true,"required_with":["blob_properties.0.delete_retention_policy"]}}},"optional":true,"computed":true},"custom_domain":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"use_subdomain":{"type":"bool","optional":true,"default":false}}},"optional":true},"customer_managed_key":{"nesting_mode":3,"block":{"attributes":{"key_vault_key_id":{"type":"string","optional":true,"exactly_one_of":["customer_managed_key.0.managed_hsm_key_id","customer_managed_key.0.key_vault_key_id"]},"managed_hsm_key_id":{"type":"string","optional":true,"exactly_one_of":["customer_managed_key.0.managed_hsm_key_id","customer_managed_key.0.key_vault_key_id"]},"user_assigned_identity_id":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"immutability_policy":{"nesting_mode":3,"block":{"attributes":{"allow_protected_append_writes":{"type":"bool","required":true},"period_since_creation_in_days":{"type":"number","required":true},"state":{"type":"string","required":true}}},"optional":true},"network_rules":{"nesting_mode":3,"block":{"attributes":{"bypass":{"type":["set","string"],"optional":true,"computed":true},"default_action":{"type":"string","required":true},"ip_rules":{"type":["set","string"],"optional":true,"computed":true},"virtual_network_subnet_ids":{"type":["set","string"],"optional":true,"computed":true}},"block_types":{"private_link_access":{"nesting_mode":3,"block":{"attributes":{"endpoint_resource_id":{"type":"string","required":true},"endpoint_tenant_id":{"type":"string","optional":true,"computed":true}}},"optional":true}}},"optional":true,"computed":true},"queue_properties":{"nesting_mode":3,"block":{"block_types":{"cors_rule":{"nesting_mode":3,"block":{"attributes":{"allowed_headers":{"type":["list","string"],"required":true},"allowed_methods":{"type":["list","string"],"required":true},"allowed_origins":{"type":["list","string"],"required":true},"exposed_headers":{"type":["list","string"],"required":true},"max_age_in_seconds":{"type":"number","required":true}}},"optional":true},"hour_metrics":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","required":true},"include_apis":{"type":"bool","optional":true},"retention_policy_days":{"type":"number","optional":true},"version":{"type":"string","required":true}}},"optional":true,"computed":true},"logging":{"nesting_mode":3,"block":{"attributes":{"delete":{"type":"bool","required":true},"read":{"type":"bool","required":true},"retention_policy_days":{"type":"number","optional":true},"version":{"type":"string","required":true},"write":{"type":"bool","required":true}}},"optional":true,"computed":true},"minute_metrics":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","required":true},"include_apis":{"type":"bool","optional":true},"retention_policy_days":{"type":"number","optional":true},"version":{"type":"string","required":true}}},"optional":true,"computed":true}}},"optional":true,"computed":true},"routing":{"nesting_mode":3,"block":{"attributes":{"choice":{"type":"string","optional":true,"default":"MicrosoftRouting"},"publish_internet_endpoints":{"type":"bool","optional":true,"default":false},"publish_microsoft_endpoints":{"type":"bool","optional":true,"default":false}}},"optional":true,"computed":true},"sas_policy":{"nesting_mode":3,"block":{"attributes":{"expiration_action":{"type":"string","optional":true,"default":"Log"},"expiration_period":{"type":"string","required":true}}},"optional":true},"share_properties":{"nesting_mode":3,"block":{"block_types":{"cors_rule":{"nesting_mode":3,"block":{"attributes":{"allowed_headers":{"type":["list","string"],"required":true},"allowed_methods":{"type":["list","string"],"required":true},"allowed_origins":{"type":["list","string"],"required":true},"exposed_headers":{"type":["list","string"],"required":true},"max_age_in_seconds":{"type":"number","required":true}}},"optional":true},"retention_policy":{"nesting_mode":3,"block":{"attributes":{"days":{"type":"number","optional":true,"default":7}}},"optional":true},"smb":{"nesting_mode":3,"block":{"attributes":{"authentication_types":{"type":["set","string"],"optional":true},"channel_encryption_type":{"type":["set","string"],"optional":true},"kerberos_ticket_encryption_type":{"type":["set","string"],"optional":true},"multichannel_enabled":{"type":"bool","optional":true,"default":false},"versions":{"type":["set","string"],"optional":true}}},"optional":true}}},"optional":true,"computed":true},"static_website":{"nesting_mode":3,"block":{"attributes":{"error_404_document":{"type":"string","optional":true},"index_document":{"type":"string","optional":true}}},"optional":true,"computed":true}}}},"azurerm_storage_account_customer_managed_key":{"block":{"attributes":{"federated_identity_client_id":{"type":"string","optional":true,"required_with":["user_assigned_identity_id"]},"key_name":{"type":"string","required":true},"key_vault_id":{"type":"string","optional":true,"exactly_one_of":["managed_hsm_key_id","key_vault_id","key_vault_uri"]},"key_vault_uri":{"type":"string","optional":true,"computed":true,"exactly_one_of":["managed_hsm_key_id","key_vault_id","key_vault_uri"]},"key_version":{"type":"string","optional":true},"managed_hsm_key_id":{"type":"string","optional":true,"exactly_one_of":["managed_hsm_key_id","key_vault_id","key_vault_uri"]},"storage_account_id":{"type":"string","required":true},"user_assigned_identity_id":{"type":"string","optional":true}}}},"azurerm_storage_account_local_user":{"block":{"attributes":{"home_directory":{"type":"string","optional":true},"name":{"type":"string","required":true},"password":{"type":"string","computed":true},"sid":{"type":"string","computed":true},"ssh_key_enabled":{"type":"bool","optional":true,"default":false,"at_least_one_of":["ssh_key_enabled","ssh_password_enabled"]},"ssh_password_enabled":{"type":"bool","optional":true,"default":false,"at_least_one_of":["ssh_key_enabled","ssh_password_enabled"]},"storage_account_id":{"type":"string","required":true}},"block_types":{"permission_scope":{"nesting_mode":3,"block":{"attributes":{"resource_name":{"type":"string","required":true},"service":{"type":"string","required":true}},"block_types":{"permissions":{"nesting_mode":3,"block":{"attributes":{"create":{"type":"bool","optional":true,"default":false},"delete":{"type":"bool","optional":true,"default":false},"list":{"type":"bool","optional":true,"default":false},"read":{"type":"bool","optional":true,"default":false},"write":{"type":"bool","optional":true,"default":false}}},"required":true}}},"optional":true},"ssh_authorized_key":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"key":{"type":"string","required":true}}},"optional":true,"required_with":["ssh_key_enabled"]}}}},"azurerm_storage_account_network_rules":{"block":{"attributes":{"bypass":{"type":["set","string"],"optional":true,"computed":true},"default_action":{"type":"string","required":true},"ip_rules":{"type":["set","string"],"optional":true},"storage_account_id":{"type":"string","required":true},"virtual_network_subnet_ids":{"type":["set","string"],"optional":true}},"block_types":{"private_link_access":{"nesting_mode":3,"block":{"attributes":{"endpoint_resource_id":{"type":"string","required":true},"endpoint_tenant_id":{"type":"string","optional":true,"computed":true}}},"optional":true}}}},"azurerm_storage_account_queue_properties":{"block":{"attributes":{"storage_account_id":{"type":"string","required":true}},"block_types":{"cors_rule":{"nesting_mode":3,"block":{"attributes":{"allowed_headers":{"type":["list","string"],"required":true},"allowed_methods":{"type":["list","string"],"required":true},"allowed_origins":{"type":["list","string"],"required":true},"exposed_headers":{"type":["list","string"],"required":true},"max_age_in_seconds":{"type":"number","required":true}}},"optional":true,"at_least_one_of":["minute_metrics","hour_metrics","logging","cors_rule"]},"hour_metrics":{"nesting_mode":3,"block":{"attributes":{"include_apis":{"type":"bool","optional":true,"default":false},"retention_policy_days":{"type":"number","optional":true},"version":{"type":"string","required":true}}},"optional":true,"computed":true,"at_least_one_of":["minute_metrics","hour_metrics","logging","cors_rule"]},"logging":{"nesting_mode":3,"block":{"attributes":{"delete":{"type":"bool","required":true},"read":{"type":"bool","required":true},"retention_policy_days":{"type":"number","optional":true},"version":{"type":"string","required":true},"write":{"type":"bool","required":true}}},"optional":true,"computed":true,"at_least_one_of":["minute_metrics","hour_metrics","logging","cors_rule"]},"minute_metrics":{"nesting_mode":3,"block":{"attributes":{"include_apis":{"type":"bool","optional":true,"default":false},"retention_policy_days":{"type":"number","optional":true},"version":{"type":"string","required":true}}},"optional":true,"computed":true,"at_least_one_of":["minute_metrics","hour_metrics","logging","cors_rule"]}}}},"azurerm_storage_account_static_website":{"block":{"attributes":{"error_404_document":{"type":"string","optional":true,"at_least_one_of":["error_404_document","index_document"]},"index_document":{"type":"string","optional":true,"at_least_one_of":["error_404_document","index_document"]},"storage_account_id":{"type":"string","required":true}}}},"azurerm_storage_blob":{"block":{"attributes":{"access_tier":{"type":"string","optional":true,"computed":true},"cache_control":{"type":"string","optional":true},"content_md5":{"type":"string","optional":true,"conflicts_with":["source_uri"]},"content_type":{"type":"string","optional":true,"default":"application/octet-stream"},"encryption_scope":{"type":"string","optional":true},"metadata":{"type":["map","string"],"optional":true,"computed":true},"name":{"type":"string","required":true},"parallelism":{"type":"number","optional":true,"default":8},"size":{"type":"number","optional":true,"default":0},"source":{"type":"string","optional":true,"conflicts_with":["source_uri","source_content"]},"source_content":{"type":"string","optional":true,"conflicts_with":["source","source_uri"]},"source_uri":{"type":"string","optional":true,"conflicts_with":["source","source_content"]},"storage_account_name":{"type":"string","required":true},"storage_container_name":{"type":"string","required":true},"type":{"type":"string","required":true},"url":{"type":"string","computed":true}}}},"azurerm_storage_blob_inventory_policy":{"block":{"attributes":{"storage_account_id":{"type":"string","required":true}},"block_types":{"rules":{"nesting_mode":4,"block":{"attributes":{"format":{"type":"string","required":true},"name":{"type":"string","required":true},"schedule":{"type":"string","required":true},"schema_fields":{"type":["list","string"],"required":true},"scope":{"type":"string","required":true},"storage_container_name":{"type":"string","required":true}},"block_types":{"filter":{"nesting_mode":3,"block":{"attributes":{"blob_types":{"type":["set","string"],"required":true},"exclude_prefixes":{"type":["set","string"],"optional":true},"include_blob_versions":{"type":"bool","optional":true,"default":false},"include_deleted":{"type":"bool","optional":true,"default":false},"include_snapshots":{"type":"bool","optional":true,"default":false},"prefix_match":{"type":["set","string"],"optional":true}}},"optional":true}}},"required":true}}}},"azurerm_storage_container":{"block":{"attributes":{"container_access_type":{"type":"string","optional":true,"default":"private"},"default_encryption_scope":{"type":"string","optional":true,"computed":true},"encryption_scope_override_enabled":{"type":"bool","optional":true,"default":true,"required_with":["default_encryption_scope"]},"has_immutability_policy":{"type":"bool","computed":true},"has_legal_hold":{"type":"bool","computed":true},"metadata":{"type":["map","string"],"optional":true,"computed":true},"name":{"type":"string","required":true},"resource_manager_id":{"type":"string","computed":true},"storage_account_id":{"type":"string","optional":true,"exactly_one_of":["storage_account_id","storage_account_name"]},"storage_account_name":{"type":"string","optional":true,"exactly_one_of":["storage_account_id","storage_account_name"]}}}},"azurerm_storage_container_immutability_policy":{"block":{"attributes":{"immutability_period_in_days":{"type":"number","required":true},"locked":{"type":"bool","optional":true,"default":false},"protected_append_writes_all_enabled":{"type":"bool","optional":true,"default":false},"protected_append_writes_enabled":{"type":"bool","optional":true,"default":false},"storage_container_resource_manager_id":{"type":"string","required":true}}}},"azurerm_storage_data_lake_gen2_filesystem":{"block":{"attributes":{"default_encryption_scope":{"type":"string","optional":true,"computed":true},"group":{"type":"string","optional":true,"computed":true},"name":{"type":"string","required":true},"owner":{"type":"string","optional":true,"computed":true},"properties":{"type":["map","string"],"optional":true},"storage_account_id":{"type":"string","required":true}},"block_types":{"ace":{"nesting_mode":4,"block":{"attributes":{"id":{"type":"string","optional":true},"permissions":{"type":"string","required":true},"scope":{"type":"string","optional":true,"default":"access"},"type":{"type":"string","required":true}}},"optional":true,"computed":true}}}},"azurerm_storage_data_lake_gen2_path":{"block":{"attributes":{"filesystem_name":{"type":"string","required":true},"group":{"type":"string","optional":true,"computed":true},"owner":{"type":"string","optional":true,"computed":true},"path":{"type":"string","required":true},"resource":{"type":"string","required":true},"storage_account_id":{"type":"string","required":true}},"block_types":{"ace":{"nesting_mode":4,"block":{"attributes":{"id":{"type":"string","optional":true},"permissions":{"type":"string","required":true},"scope":{"type":"string","optional":true,"default":"access"},"type":{"type":"string","required":true}}},"optional":true,"computed":true}}}},"azurerm_storage_encryption_scope":{"block":{"attributes":{"infrastructure_encryption_required":{"type":"bool","optional":true},"key_vault_key_id":{"type":"string","optional":true},"name":{"type":"string","required":true},"source":{"type":"string","required":true},"storage_account_id":{"type":"string","required":true}}}},"azurerm_storage_management_policy":{"block":{"attributes":{"storage_account_id":{"type":"string","required":true}},"block_types":{"rule":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","required":true},"name":{"type":"string","required":true}},"block_types":{"actions":{"nesting_mode":3,"block":{"block_types":{"base_blob":{"nesting_mode":3,"block":{"attributes":{"auto_tier_to_hot_from_cool_enabled":{"type":"bool","optional":true},"delete_after_days_since_creation_greater_than":{"type":"number","optional":true,"default":-1},"delete_after_days_since_last_access_time_greater_than":{"type":"number","optional":true,"default":-1},"delete_after_days_since_modification_greater_than":{"type":"number","optional":true,"default":-1},"tier_to_archive_after_days_since_creation_greater_than":{"type":"number","optional":true,"default":-1},"tier_to_archive_after_days_since_last_access_time_greater_than":{"type":"number","optional":true,"default":-1},"tier_to_archive_after_days_since_last_tier_change_greater_than":{"type":"number","optional":true,"default":-1},"tier_to_archive_after_days_since_modification_greater_than":{"type":"number","optional":true,"default":-1},"tier_to_cold_after_days_since_creation_greater_than":{"type":"number","optional":true,"default":-1},"tier_to_cold_after_days_since_last_access_time_greater_than":{"type":"number","optional":true,"default":-1},"tier_to_cold_after_days_since_modification_greater_than":{"type":"number","optional":true,"default":-1},"tier_to_cool_after_days_since_creation_greater_than":{"type":"number","optional":true,"default":-1},"tier_to_cool_after_days_since_last_access_time_greater_than":{"type":"number","optional":true,"default":-1},"tier_to_cool_after_days_since_modification_greater_than":{"type":"number","optional":true,"default":-1}}},"optional":true},"snapshot":{"nesting_mode":3,"block":{"attributes":{"change_tier_to_archive_after_days_since_creation":{"type":"number","optional":true,"default":-1},"change_tier_to_cool_after_days_since_creation":{"type":"number","optional":true,"default":-1},"delete_after_days_since_creation_greater_than":{"type":"number","optional":true,"default":-1},"tier_to_archive_after_days_since_last_tier_change_greater_than":{"type":"number","optional":true,"default":-1},"tier_to_cold_after_days_since_creation_greater_than":{"type":"number","optional":true,"default":-1}}},"optional":true},"version":{"nesting_mode":3,"block":{"attributes":{"change_tier_to_archive_after_days_since_creation":{"type":"number","optional":true,"default":-1},"change_tier_to_cool_after_days_since_creation":{"type":"number","optional":true,"default":-1},"delete_after_days_since_creation":{"type":"number","optional":true,"default":-1},"tier_to_archive_after_days_since_last_tier_change_greater_than":{"type":"number","optional":true,"default":-1},"tier_to_cold_after_days_since_creation_greater_than":{"type":"number","optional":true,"default":-1}}},"optional":true}}},"required":true},"filters":{"nesting_mode":3,"block":{"attributes":{"blob_types":{"type":["set","string"],"required":true},"prefix_match":{"type":["set","string"],"optional":true}},"block_types":{"match_blob_index_tag":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"operation":{"type":"string","optional":true,"default":"=="},"value":{"type":"string","required":true}}},"optional":true}}},"required":true}}},"optional":true}}}},"azurerm_storage_mover":{"block":{"attributes":{"description":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_storage_mover_agent":{"block":{"attributes":{"arc_virtual_machine_id":{"type":"string","required":true},"arc_virtual_machine_uuid":{"type":"string","required":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"storage_mover_id":{"type":"string","required":true}}}},"azurerm_storage_mover_job_definition":{"block":{"attributes":{"agent_name":{"type":"string","optional":true},"copy_mode":{"type":"string","required":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"source_name":{"type":"string","required":true},"source_sub_path":{"type":"string","optional":true},"storage_mover_project_id":{"type":"string","required":true},"target_name":{"type":"string","required":true},"target_sub_path":{"type":"string","optional":true}}}},"azurerm_storage_mover_project":{"block":{"attributes":{"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"storage_mover_id":{"type":"string","required":true}}}},"azurerm_storage_mover_source_endpoint":{"block":{"attributes":{"description":{"type":"string","optional":true},"export":{"type":"string","optional":true},"host":{"type":"string","required":true},"name":{"type":"string","required":true},"nfs_version":{"type":"string","optional":true,"default":"NFSauto"},"storage_mover_id":{"type":"string","required":true}}}},"azurerm_storage_mover_target_endpoint":{"block":{"attributes":{"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"storage_account_id":{"type":"string","required":true},"storage_container_name":{"type":"string","required":true},"storage_mover_id":{"type":"string","required":true}}}},"azurerm_storage_object_replication":{"block":{"attributes":{"destination_object_replication_id":{"type":"string","computed":true},"destination_storage_account_id":{"type":"string","required":true},"source_object_replication_id":{"type":"string","computed":true},"source_storage_account_id":{"type":"string","required":true}},"block_types":{"rules":{"nesting_mode":4,"block":{"attributes":{"copy_blobs_created_after":{"type":"string","optional":true,"default":"OnlyNewObjects"},"destination_container_name":{"type":"string","required":true},"filter_out_blobs_with_prefix":{"type":["set","string"],"optional":true},"name":{"type":"string","computed":true},"source_container_name":{"type":"string","required":true}}},"required":true}}}},"azurerm_storage_queue":{"block":{"attributes":{"metadata":{"type":["map","string"],"optional":true},"name":{"type":"string","required":true},"resource_manager_id":{"type":"string","computed":true},"storage_account_name":{"type":"string","required":true}}}},"azurerm_storage_share":{"block":{"attributes":{"access_tier":{"type":"string","optional":true,"computed":true},"enabled_protocol":{"type":"string","optional":true,"default":"SMB"},"metadata":{"type":["map","string"],"optional":true,"computed":true},"name":{"type":"string","required":true},"quota":{"type":"number","required":true},"resource_manager_id":{"type":"string","computed":true},"storage_account_id":{"type":"string","optional":true,"exactly_one_of":["storage_account_name","storage_account_id"]},"storage_account_name":{"type":"string","optional":true,"exactly_one_of":["storage_account_name","storage_account_id"]},"url":{"type":"string","computed":true}},"block_types":{"acl":{"nesting_mode":4,"block":{"attributes":{"id":{"type":"string","required":true}},"block_types":{"access_policy":{"nesting_mode":3,"block":{"attributes":{"expiry":{"type":"string","optional":true},"permissions":{"type":"string","required":true},"start":{"type":"string","optional":true}}},"optional":true}}},"optional":true}}}},"azurerm_storage_share_directory":{"block":{"attributes":{"metadata":{"type":["map","string"],"optional":true},"name":{"type":"string","required":true},"storage_share_id":{"type":"string","required":true}}}},"azurerm_storage_share_file":{"block":{"attributes":{"content_disposition":{"type":"string","optional":true},"content_encoding":{"type":"string","optional":true},"content_length":{"type":"number","computed":true},"content_md5":{"type":"string","optional":true},"content_type":{"type":"string","optional":true,"default":"application/octet-stream"},"metadata":{"type":["map","string"],"optional":true},"name":{"type":"string","required":true},"path":{"type":"string","optional":true,"default":""},"source":{"type":"string","optional":true},"storage_share_id":{"type":"string","required":true}}}},"azurerm_storage_sync":{"block":{"attributes":{"incoming_traffic_policy":{"type":"string","optional":true,"default":"AllowAllTraffic"},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"registered_servers":{"type":["list","string"],"computed":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_storage_sync_cloud_endpoint":{"block":{"attributes":{"file_share_name":{"type":"string","required":true},"name":{"type":"string","required":true},"storage_account_id":{"type":"string","required":true},"storage_account_tenant_id":{"type":"string","optional":true,"computed":true},"storage_sync_group_id":{"type":"string","required":true}}}},"azurerm_storage_sync_group":{"block":{"attributes":{"name":{"type":"string","required":true},"storage_sync_id":{"type":"string","required":true}}}},"azurerm_storage_sync_server_endpoint":{"block":{"attributes":{"cloud_tiering_enabled":{"type":"bool","optional":true,"default":false},"initial_download_policy":{"type":"string","optional":true,"default":"NamespaceThenModifiedFiles"},"local_cache_mode":{"type":"string","optional":true,"default":"UpdateLocallyCachedFiles"},"name":{"type":"string","required":true},"registered_server_id":{"type":"string","required":true},"server_local_path":{"type":"string","required":true},"storage_sync_group_id":{"type":"string","required":true},"tier_files_older_than_days":{"type":"number","optional":true},"volume_free_space_percent":{"type":"number","optional":true,"default":20}}}},"azurerm_storage_table":{"block":{"attributes":{"name":{"type":"string","required":true},"resource_manager_id":{"type":"string","computed":true},"storage_account_name":{"type":"string","required":true}},"block_types":{"acl":{"nesting_mode":4,"block":{"attributes":{"id":{"type":"string","required":true}},"block_types":{"access_policy":{"nesting_mode":3,"block":{"attributes":{"expiry":{"type":"string","required":true},"permissions":{"type":"string","required":true},"start":{"type":"string","required":true}}},"optional":true}}},"optional":true}}}},"azurerm_storage_table_entity":{"block":{"attributes":{"entity":{"type":["map","string"],"required":true},"partition_key":{"type":"string","required":true},"row_key":{"type":"string","required":true},"storage_table_id":{"type":"string","required":true}}}},"azurerm_stream_analytics_cluster":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"streaming_capacity":{"type":"number","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_stream_analytics_function_javascript_uda":{"block":{"attributes":{"name":{"type":"string","required":true},"script":{"type":"string","required":true},"stream_analytics_job_id":{"type":"string","required":true}},"block_types":{"input":{"nesting_mode":3,"block":{"attributes":{"configuration_parameter":{"type":"bool","optional":true,"default":false},"type":{"type":"string","required":true}}},"required":true},"output":{"nesting_mode":3,"block":{"attributes":{"type":{"type":"string","required":true}}},"required":true}}}},"azurerm_stream_analytics_function_javascript_udf":{"block":{"attributes":{"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"script":{"type":"string","required":true},"stream_analytics_job_name":{"type":"string","required":true}},"block_types":{"input":{"nesting_mode":3,"block":{"attributes":{"configuration_parameter":{"type":"bool","optional":true,"default":false},"type":{"type":"string","required":true}}},"required":true},"output":{"nesting_mode":3,"block":{"attributes":{"type":{"type":"string","required":true}}},"required":true}}}},"azurerm_stream_analytics_job":{"block":{"attributes":{"compatibility_level":{"type":"string","optional":true,"computed":true},"content_storage_policy":{"type":"string","optional":true,"default":"SystemAccount"},"data_locale":{"type":"string","optional":true,"default":"en-US"},"events_late_arrival_max_delay_in_seconds":{"type":"number","optional":true,"default":5},"events_out_of_order_max_delay_in_seconds":{"type":"number","optional":true,"default":0},"events_out_of_order_policy":{"type":"string","optional":true,"default":"Adjust"},"job_id":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"output_error_policy":{"type":"string","optional":true,"default":"Drop"},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","optional":true,"default":"Standard"},"stream_analytics_cluster_id":{"type":"string","optional":true},"streaming_units":{"type":"number","optional":true},"tags":{"type":["map","string"],"optional":true},"transformation_query":{"type":"string","required":true},"type":{"type":"string","optional":true,"default":"Cloud"}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"job_storage_account":{"nesting_mode":3,"block":{"attributes":{"account_key":{"type":"string","required":true},"account_name":{"type":"string","required":true},"authentication_mode":{"type":"string","optional":true,"default":"ConnectionString"}}},"optional":true}}}},"azurerm_stream_analytics_job_schedule":{"block":{"attributes":{"last_output_time":{"type":"string","computed":true},"start_mode":{"type":"string","required":true},"start_time":{"type":"string","optional":true,"computed":true},"stream_analytics_job_id":{"type":"string","required":true}}}},"azurerm_stream_analytics_managed_private_endpoint":{"block":{"attributes":{"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"stream_analytics_cluster_name":{"type":"string","required":true},"subresource_name":{"type":"string","required":true},"target_resource_id":{"type":"string","required":true}}}},"azurerm_stream_analytics_output_blob":{"block":{"attributes":{"authentication_mode":{"type":"string","optional":true,"default":"ConnectionString"},"batch_max_wait_time":{"type":"string","optional":true},"batch_min_rows":{"type":"number","optional":true},"blob_write_mode":{"type":"string","optional":true,"default":"Append"},"date_format":{"type":"string","required":true},"name":{"type":"string","required":true},"path_pattern":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"storage_account_key":{"type":"string","optional":true},"storage_account_name":{"type":"string","required":true},"storage_container_name":{"type":"string","required":true},"stream_analytics_job_name":{"type":"string","required":true},"time_format":{"type":"string","required":true}},"block_types":{"serialization":{"nesting_mode":3,"block":{"attributes":{"encoding":{"type":"string","optional":true},"field_delimiter":{"type":"string","optional":true},"format":{"type":"string","optional":true},"type":{"type":"string","required":true}}},"required":true}}}},"azurerm_stream_analytics_output_cosmosdb":{"block":{"attributes":{"authentication_mode":{"type":"string","optional":true,"default":"ConnectionString"},"container_name":{"type":"string","required":true},"cosmosdb_account_key":{"type":"string","required":true},"cosmosdb_sql_database_id":{"type":"string","required":true},"document_id":{"type":"string","optional":true},"name":{"type":"string","required":true},"partition_key":{"type":"string","optional":true},"stream_analytics_job_id":{"type":"string","required":true}}}},"azurerm_stream_analytics_output_eventhub":{"block":{"attributes":{"authentication_mode":{"type":"string","optional":true,"default":"ConnectionString"},"eventhub_name":{"type":"string","required":true},"name":{"type":"string","required":true},"partition_key":{"type":"string","optional":true},"property_columns":{"type":["list","string"],"optional":true},"resource_group_name":{"type":"string","required":true},"servicebus_namespace":{"type":"string","required":true},"shared_access_policy_key":{"type":"string","optional":true},"shared_access_policy_name":{"type":"string","optional":true},"stream_analytics_job_name":{"type":"string","required":true}},"block_types":{"serialization":{"nesting_mode":3,"block":{"attributes":{"encoding":{"type":"string","optional":true},"field_delimiter":{"type":"string","optional":true},"format":{"type":"string","optional":true},"type":{"type":"string","required":true}}},"required":true}}}},"azurerm_stream_analytics_output_function":{"block":{"attributes":{"api_key":{"type":"string","required":true},"batch_max_count":{"type":"number","optional":true,"default":100},"batch_max_in_bytes":{"type":"number","optional":true,"default":262144},"function_app":{"type":"string","required":true},"function_name":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"stream_analytics_job_name":{"type":"string","required":true}}}},"azurerm_stream_analytics_output_mssql":{"block":{"attributes":{"authentication_mode":{"type":"string","optional":true,"default":"ConnectionString"},"database":{"type":"string","required":true},"max_batch_count":{"type":"number","optional":true,"default":10000},"max_writer_count":{"type":"number","optional":true,"default":1},"name":{"type":"string","required":true},"password":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"server":{"type":"string","required":true},"stream_analytics_job_name":{"type":"string","required":true},"table":{"type":"string","required":true},"user":{"type":"string","optional":true}}}},"azurerm_stream_analytics_output_powerbi":{"block":{"attributes":{"dataset":{"type":"string","required":true},"group_id":{"type":"string","required":true},"group_name":{"type":"string","required":true},"name":{"type":"string","required":true},"stream_analytics_job_id":{"type":"string","required":true},"table":{"type":"string","required":true},"token_user_display_name":{"type":"string","optional":true},"token_user_principal_name":{"type":"string","optional":true}}}},"azurerm_stream_analytics_output_servicebus_queue":{"block":{"attributes":{"authentication_mode":{"type":"string","optional":true,"default":"ConnectionString"},"name":{"type":"string","required":true},"property_columns":{"type":["list","string"],"optional":true},"queue_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"servicebus_namespace":{"type":"string","required":true},"shared_access_policy_key":{"type":"string","optional":true},"shared_access_policy_name":{"type":"string","optional":true},"stream_analytics_job_name":{"type":"string","required":true},"system_property_columns":{"type":["map","string"],"optional":true}},"block_types":{"serialization":{"nesting_mode":3,"block":{"attributes":{"encoding":{"type":"string","optional":true},"field_delimiter":{"type":"string","optional":true},"format":{"type":"string","optional":true},"type":{"type":"string","required":true}}},"required":true}}}},"azurerm_stream_analytics_output_servicebus_topic":{"block":{"attributes":{"authentication_mode":{"type":"string","optional":true,"default":"ConnectionString"},"name":{"type":"string","required":true},"property_columns":{"type":["list","string"],"optional":true},"resource_group_name":{"type":"string","required":true},"servicebus_namespace":{"type":"string","required":true},"shared_access_policy_key":{"type":"string","optional":true},"shared_access_policy_name":{"type":"string","optional":true},"stream_analytics_job_name":{"type":"string","required":true},"system_property_columns":{"type":["map","string"],"optional":true},"topic_name":{"type":"string","required":true}},"block_types":{"serialization":{"nesting_mode":3,"block":{"attributes":{"encoding":{"type":"string","optional":true},"field_delimiter":{"type":"string","optional":true},"format":{"type":"string","optional":true},"type":{"type":"string","required":true}}},"required":true}}}},"azurerm_stream_analytics_output_synapse":{"block":{"attributes":{"database":{"type":"string","required":true},"name":{"type":"string","required":true},"password":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"server":{"type":"string","required":true},"stream_analytics_job_name":{"type":"string","required":true},"table":{"type":"string","required":true},"user":{"type":"string","required":true}}}},"azurerm_stream_analytics_output_table":{"block":{"attributes":{"batch_size":{"type":"number","required":true},"columns_to_remove":{"type":["list","string"],"optional":true},"name":{"type":"string","required":true},"partition_key":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"row_key":{"type":"string","required":true},"storage_account_key":{"type":"string","required":true},"storage_account_name":{"type":"string","required":true},"stream_analytics_job_name":{"type":"string","required":true},"table":{"type":"string","required":true}}}},"azurerm_stream_analytics_reference_input_blob":{"block":{"attributes":{"authentication_mode":{"type":"string","optional":true,"default":"ConnectionString"},"date_format":{"type":"string","required":true},"name":{"type":"string","required":true},"path_pattern":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"storage_account_key":{"type":"string","optional":true},"storage_account_name":{"type":"string","required":true},"storage_container_name":{"type":"string","required":true},"stream_analytics_job_name":{"type":"string","required":true},"time_format":{"type":"string","required":true}},"block_types":{"serialization":{"nesting_mode":3,"block":{"attributes":{"encoding":{"type":"string","optional":true},"field_delimiter":{"type":"string","optional":true},"type":{"type":"string","required":true}}},"required":true}}}},"azurerm_stream_analytics_reference_input_mssql":{"block":{"attributes":{"database":{"type":"string","required":true},"delta_snapshot_query":{"type":"string","optional":true},"full_snapshot_query":{"type":"string","required":true},"name":{"type":"string","required":true},"password":{"type":"string","required":true},"refresh_interval_duration":{"type":"string","optional":true},"refresh_type":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"server":{"type":"string","required":true},"stream_analytics_job_name":{"type":"string","required":true},"table":{"type":"string","optional":true},"username":{"type":"string","required":true}}}},"azurerm_stream_analytics_stream_input_blob":{"block":{"attributes":{"authentication_mode":{"type":"string","optional":true,"default":"ConnectionString"},"date_format":{"type":"string","required":true},"name":{"type":"string","required":true},"path_pattern":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"storage_account_key":{"type":"string","required":true},"storage_account_name":{"type":"string","required":true},"storage_container_name":{"type":"string","required":true},"stream_analytics_job_name":{"type":"string","required":true},"time_format":{"type":"string","required":true}},"block_types":{"serialization":{"nesting_mode":3,"block":{"attributes":{"encoding":{"type":"string","optional":true},"field_delimiter":{"type":"string","optional":true},"type":{"type":"string","required":true}}},"required":true}}}},"azurerm_stream_analytics_stream_input_eventhub":{"block":{"attributes":{"authentication_mode":{"type":"string","optional":true,"default":"ConnectionString"},"eventhub_consumer_group_name":{"type":"string","optional":true},"eventhub_name":{"type":"string","required":true},"name":{"type":"string","required":true},"partition_key":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"servicebus_namespace":{"type":"string","required":true},"shared_access_policy_key":{"type":"string","optional":true},"shared_access_policy_name":{"type":"string","optional":true},"stream_analytics_job_name":{"type":"string","required":true}},"block_types":{"serialization":{"nesting_mode":3,"block":{"attributes":{"encoding":{"type":"string","optional":true},"field_delimiter":{"type":"string","optional":true},"type":{"type":"string","required":true}}},"required":true}}}},"azurerm_stream_analytics_stream_input_eventhub_v2":{"block":{"attributes":{"authentication_mode":{"type":"string","optional":true,"default":"ConnectionString"},"eventhub_consumer_group_name":{"type":"string","optional":true},"eventhub_name":{"type":"string","required":true},"name":{"type":"string","required":true},"partition_key":{"type":"string","optional":true},"servicebus_namespace":{"type":"string","required":true},"shared_access_policy_key":{"type":"string","optional":true},"shared_access_policy_name":{"type":"string","optional":true},"stream_analytics_job_id":{"type":"string","required":true}},"block_types":{"serialization":{"nesting_mode":3,"block":{"attributes":{"encoding":{"type":"string","optional":true},"field_delimiter":{"type":"string","optional":true},"type":{"type":"string","required":true}}},"required":true}}}},"azurerm_stream_analytics_stream_input_iothub":{"block":{"attributes":{"endpoint":{"type":"string","required":true},"eventhub_consumer_group_name":{"type":"string","required":true},"iothub_namespace":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"shared_access_policy_key":{"type":"string","required":true},"shared_access_policy_name":{"type":"string","required":true},"stream_analytics_job_name":{"type":"string","required":true}},"block_types":{"serialization":{"nesting_mode":3,"block":{"attributes":{"encoding":{"type":"string","optional":true},"field_delimiter":{"type":"string","optional":true},"type":{"type":"string","required":true}}},"required":true}}}},"azurerm_subnet":{"block":{"attributes":{"address_prefixes":{"type":["list","string"],"required":true},"default_outbound_access_enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"private_endpoint_network_policies":{"type":"string","optional":true,"default":"Disabled"},"private_link_service_network_policies_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"service_endpoint_policy_ids":{"type":["set","string"],"optional":true},"service_endpoints":{"type":["set","string"],"optional":true},"virtual_network_name":{"type":"string","required":true}},"block_types":{"delegation":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true}},"block_types":{"service_delegation":{"nesting_mode":3,"block":{"attributes":{"actions":{"type":["set","string"],"optional":true},"name":{"type":"string","required":true}}},"required":true}}},"optional":true}}}},"azurerm_subnet_nat_gateway_association":{"block":{"attributes":{"nat_gateway_id":{"type":"string","required":true},"subnet_id":{"type":"string","required":true}}}},"azurerm_subnet_network_security_group_association":{"block":{"attributes":{"network_security_group_id":{"type":"string","required":true},"subnet_id":{"type":"string","required":true}}}},"azurerm_subnet_route_table_association":{"block":{"attributes":{"route_table_id":{"type":"string","required":true},"subnet_id":{"type":"string","required":true}}}},"azurerm_subnet_service_endpoint_storage_policy":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"definition":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"service":{"type":"string","optional":true,"default":"Microsoft.Storage"},"service_resources":{"type":["set","string"],"required":true}}},"optional":true}}}},"azurerm_subscription":{"block":{"attributes":{"alias":{"type":"string","optional":true,"computed":true},"billing_scope_id":{"type":"string","optional":true,"exactly_one_of":["subscription_id","billing_scope_id"]},"subscription_id":{"type":"string","optional":true,"computed":true,"exactly_one_of":["subscription_id","billing_scope_id"]},"subscription_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"tenant_id":{"type":"string","computed":true},"workload":{"type":"string","optional":true}}}},"azurerm_subscription_cost_management_export":{"block":{"attributes":{"active":{"type":"bool","optional":true,"default":true},"file_format":{"type":"string","optional":true,"default":"Csv"},"name":{"type":"string","required":true},"recurrence_period_end_date":{"type":"string","required":true},"recurrence_period_start_date":{"type":"string","required":true},"recurrence_type":{"type":"string","required":true},"subscription_id":{"type":"string","required":true}},"block_types":{"export_data_options":{"nesting_mode":3,"block":{"attributes":{"time_frame":{"type":"string","required":true},"type":{"type":"string","required":true}}},"required":true},"export_data_storage_location":{"nesting_mode":3,"block":{"attributes":{"container_id":{"type":"string","required":true},"root_folder_path":{"type":"string","required":true}}},"required":true}}}},"azurerm_subscription_cost_management_view":{"block":{"attributes":{"accumulated":{"type":"bool","required":true},"chart_type":{"type":"string","required":true},"display_name":{"type":"string","required":true},"name":{"type":"string","required":true},"report_type":{"type":"string","required":true},"subscription_id":{"type":"string","required":true},"timeframe":{"type":"string","required":true}},"block_types":{"dataset":{"nesting_mode":3,"block":{"attributes":{"granularity":{"type":"string","required":true}},"block_types":{"aggregation":{"nesting_mode":4,"block":{"attributes":{"column_name":{"type":"string","required":true},"name":{"type":"string","required":true}}},"required":true},"grouping":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"type":{"type":"string","required":true}}},"optional":true},"sorting":{"nesting_mode":3,"block":{"attributes":{"direction":{"type":"string","required":true},"name":{"type":"string","required":true}}},"optional":true}}},"required":true},"kpi":{"nesting_mode":3,"block":{"attributes":{"type":{"type":"string","required":true}}},"optional":true},"pivot":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_subscription_policy_assignment":{"block":{"attributes":{"description":{"type":"string","optional":true},"display_name":{"type":"string","optional":true},"enforce":{"type":"bool","optional":true,"default":true},"location":{"type":"string","optional":true},"metadata":{"type":"string","optional":true,"computed":true},"name":{"type":"string","required":true},"not_scopes":{"type":["list","string"],"optional":true},"parameters":{"type":"string","optional":true},"policy_definition_id":{"type":"string","required":true},"subscription_id":{"type":"string","required":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"non_compliance_message":{"nesting_mode":3,"block":{"attributes":{"content":{"type":"string","required":true},"policy_definition_reference_id":{"type":"string","optional":true}}},"optional":true},"overrides":{"nesting_mode":3,"block":{"attributes":{"value":{"type":"string","required":true}},"block_types":{"selectors":{"nesting_mode":3,"block":{"attributes":{"in":{"type":["list","string"],"optional":true},"kind":{"type":"string","computed":true},"not_in":{"type":["list","string"],"optional":true}}},"optional":true}}},"optional":true},"resource_selectors":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","optional":true}},"block_types":{"selectors":{"nesting_mode":3,"block":{"attributes":{"in":{"type":["list","string"],"optional":true},"kind":{"type":"string","required":true},"not_in":{"type":["list","string"],"optional":true}}},"required":true}}},"optional":true}}}},"azurerm_subscription_policy_exemption":{"block":{"attributes":{"description":{"type":"string","optional":true},"display_name":{"type":"string","optional":true},"exemption_category":{"type":"string","required":true},"expires_on":{"type":"string","optional":true},"metadata":{"type":"string","optional":true,"computed":true},"name":{"type":"string","required":true},"policy_assignment_id":{"type":"string","required":true},"policy_definition_reference_ids":{"type":["list","string"],"optional":true},"subscription_id":{"type":"string","required":true}}}},"azurerm_subscription_policy_remediation":{"block":{"attributes":{"failure_percentage":{"type":"number","optional":true},"location_filters":{"type":["list","string"],"optional":true},"name":{"type":"string","required":true},"parallel_deployments":{"type":"number","optional":true},"policy_assignment_id":{"type":"string","required":true},"policy_definition_reference_id":{"type":"string","optional":true},"resource_count":{"type":"number","optional":true},"resource_discovery_mode":{"type":"string","optional":true,"default":"ExistingNonCompliant"},"subscription_id":{"type":"string","required":true}}}},"azurerm_subscription_template_deployment":{"block":{"attributes":{"debug_level":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"output_content":{"type":"string","computed":true},"parameters_content":{"type":"string","optional":true,"computed":true},"tags":{"type":["map","string"],"optional":true},"template_content":{"type":"string","optional":true,"computed":true,"exactly_one_of":["template_content","template_spec_version_id"]},"template_spec_version_id":{"type":"string","optional":true,"exactly_one_of":["template_content","template_spec_version_id"]}}}},"azurerm_synapse_firewall_rule":{"block":{"attributes":{"end_ip_address":{"type":"string","required":true},"name":{"type":"string","required":true},"start_ip_address":{"type":"string","required":true},"synapse_workspace_id":{"type":"string","required":true}}}},"azurerm_synapse_integration_runtime_azure":{"block":{"attributes":{"compute_type":{"type":"string","optional":true,"default":"General"},"core_count":{"type":"number","optional":true,"default":8},"description":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"synapse_workspace_id":{"type":"string","required":true},"time_to_live_min":{"type":"number","optional":true,"default":0}}}},"azurerm_synapse_integration_runtime_self_hosted":{"block":{"attributes":{"authorization_key_primary":{"type":"string","computed":true},"authorization_key_secondary":{"type":"string","computed":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"synapse_workspace_id":{"type":"string","required":true}}}},"azurerm_synapse_linked_service":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"synapse_workspace_id":{"type":"string","required":true},"type":{"type":"string","required":true},"type_properties_json":{"type":"string","required":true}},"block_types":{"integration_runtime":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true}}}},"azurerm_synapse_managed_private_endpoint":{"block":{"attributes":{"name":{"type":"string","required":true},"subresource_name":{"type":"string","required":true},"synapse_workspace_id":{"type":"string","required":true},"target_resource_id":{"type":"string","required":true}}}},"azurerm_synapse_private_link_hub":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_synapse_role_assignment":{"block":{"attributes":{"principal_id":{"type":"string","required":true},"principal_type":{"type":"string","optional":true},"role_name":{"type":"string","required":true},"synapse_spark_pool_id":{"type":"string","optional":true,"exactly_one_of":["synapse_workspace_id","synapse_spark_pool_id"]},"synapse_workspace_id":{"type":"string","optional":true,"exactly_one_of":["synapse_workspace_id","synapse_spark_pool_id"]}}}},"azurerm_synapse_spark_pool":{"block":{"attributes":{"cache_size":{"type":"number","optional":true},"compute_isolation_enabled":{"type":"bool","optional":true,"default":false},"dynamic_executor_allocation_enabled":{"type":"bool","optional":true,"default":false},"max_executors":{"type":"number","optional":true},"min_executors":{"type":"number","optional":true},"name":{"type":"string","required":true},"node_count":{"type":"number","optional":true,"computed":true,"exactly_one_of":["node_count","auto_scale"]},"node_size":{"type":"string","required":true},"node_size_family":{"type":"string","required":true},"session_level_packages_enabled":{"type":"bool","optional":true,"default":false},"spark_events_folder":{"type":"string","optional":true,"default":"/events"},"spark_log_folder":{"type":"string","optional":true,"default":"/logs"},"spark_version":{"type":"string","required":true},"synapse_workspace_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"auto_pause":{"nesting_mode":3,"block":{"attributes":{"delay_in_minutes":{"type":"number","required":true}}},"optional":true},"auto_scale":{"nesting_mode":3,"block":{"attributes":{"max_node_count":{"type":"number","required":true},"min_node_count":{"type":"number","required":true}}},"optional":true,"exactly_one_of":["node_count","auto_scale"]},"library_requirement":{"nesting_mode":3,"block":{"attributes":{"content":{"type":"string","required":true},"filename":{"type":"string","required":true}}},"optional":true},"spark_config":{"nesting_mode":3,"block":{"attributes":{"content":{"type":"string","required":true},"filename":{"type":"string","required":true}}},"optional":true}}}},"azurerm_synapse_sql_pool":{"block":{"attributes":{"collation":{"type":"string","optional":true,"computed":true},"create_mode":{"type":"string","optional":true,"default":"Default"},"data_encrypted":{"type":"bool","optional":true},"geo_backup_policy_enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"recovery_database_id":{"type":"string","optional":true,"conflicts_with":["restore"]},"sku_name":{"type":"string","required":true},"storage_account_type":{"type":"string","required":true},"synapse_workspace_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"restore":{"nesting_mode":3,"block":{"attributes":{"point_in_time":{"type":"string","required":true},"source_database_id":{"type":"string","required":true}}},"optional":true,"conflicts_with":["recovery_database_id"]}}}},"azurerm_synapse_sql_pool_extended_auditing_policy":{"block":{"attributes":{"log_monitoring_enabled":{"type":"bool","optional":true,"default":true},"retention_in_days":{"type":"number","optional":true,"default":0},"sql_pool_id":{"type":"string","required":true},"storage_account_access_key":{"type":"string","optional":true},"storage_account_access_key_is_secondary":{"type":"bool","optional":true,"default":false},"storage_endpoint":{"type":"string","optional":true}}}},"azurerm_synapse_sql_pool_security_alert_policy":{"block":{"attributes":{"disabled_alerts":{"type":["set","string"],"optional":true},"email_account_admins_enabled":{"type":"bool","optional":true,"default":false},"email_addresses":{"type":["set","string"],"optional":true},"policy_state":{"type":"string","required":true},"retention_days":{"type":"number","optional":true,"default":0},"sql_pool_id":{"type":"string","required":true},"storage_account_access_key":{"type":"string","optional":true},"storage_endpoint":{"type":"string","optional":true}}}},"azurerm_synapse_sql_pool_vulnerability_assessment":{"block":{"attributes":{"sql_pool_security_alert_policy_id":{"type":"string","required":true},"storage_account_access_key":{"type":"string","optional":true},"storage_container_path":{"type":"string","required":true},"storage_container_sas_key":{"type":"string","optional":true}},"block_types":{"recurring_scans":{"nesting_mode":3,"block":{"attributes":{"email_subscription_admins_enabled":{"type":"bool","optional":true,"default":true},"emails":{"type":["list","string"],"optional":true},"enabled":{"type":"bool","optional":true,"default":false}}},"optional":true,"computed":true}}}},"azurerm_synapse_sql_pool_vulnerability_assessment_baseline":{"block":{"attributes":{"name":{"type":"string","required":true},"rule_name":{"type":"string","required":true},"sql_pool_vulnerability_assessment_id":{"type":"string","required":true}},"block_types":{"baseline":{"nesting_mode":3,"block":{"attributes":{"result":{"type":["list","string"],"required":true}}},"optional":true}}}},"azurerm_synapse_sql_pool_workload_classifier":{"block":{"attributes":{"context":{"type":"string","optional":true},"end_time":{"type":"string","optional":true},"importance":{"type":"string","optional":true},"label":{"type":"string","optional":true},"member_name":{"type":"string","required":true},"name":{"type":"string","required":true},"start_time":{"type":"string","optional":true},"workload_group_id":{"type":"string","required":true}}}},"azurerm_synapse_sql_pool_workload_group":{"block":{"attributes":{"importance":{"type":"string","optional":true,"default":"normal"},"max_resource_percent":{"type":"number","required":true},"max_resource_percent_per_request":{"type":"number","optional":true,"default":3},"min_resource_percent":{"type":"number","required":true},"min_resource_percent_per_request":{"type":"number","optional":true},"name":{"type":"string","required":true},"query_execution_timeout_in_seconds":{"type":"number","optional":true},"sql_pool_id":{"type":"string","required":true}}}},"azurerm_synapse_workspace":{"block":{"attributes":{"azuread_authentication_only":{"type":"bool","optional":true,"default":false},"compute_subnet_id":{"type":"string","optional":true},"connectivity_endpoints":{"type":["map","string"],"computed":true},"data_exfiltration_protection_enabled":{"type":"bool","optional":true},"linking_allowed_for_aad_tenant_ids":{"type":["list","string"],"optional":true},"location":{"type":"string","required":true},"managed_resource_group_name":{"type":"string","optional":true,"computed":true},"managed_virtual_network_enabled":{"type":"bool","optional":true},"name":{"type":"string","required":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"purview_id":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"sql_administrator_login":{"type":"string","optional":true},"sql_administrator_login_password":{"type":"string","optional":true},"sql_identity_control_enabled":{"type":"bool","optional":true},"storage_data_lake_gen2_filesystem_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"azure_devops_repo":{"nesting_mode":3,"block":{"attributes":{"account_name":{"type":"string","required":true},"branch_name":{"type":"string","required":true},"last_commit_id":{"type":"string","optional":true},"project_name":{"type":"string","required":true},"repository_name":{"type":"string","required":true},"root_folder":{"type":"string","required":true},"tenant_id":{"type":"string","optional":true,"computed":true}}},"optional":true,"conflicts_with":["github_repo"]},"customer_managed_key":{"nesting_mode":3,"block":{"attributes":{"key_name":{"type":"string","optional":true,"default":"cmk"},"key_versionless_id":{"type":"string","required":true},"user_assigned_identity_id":{"type":"string","optional":true}}},"optional":true},"github_repo":{"nesting_mode":3,"block":{"attributes":{"account_name":{"type":"string","required":true},"branch_name":{"type":"string","required":true},"git_url":{"type":"string","optional":true},"last_commit_id":{"type":"string","optional":true},"repository_name":{"type":"string","required":true},"root_folder":{"type":"string","required":true}}},"optional":true,"conflicts_with":["azure_devops_repo"]},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_synapse_workspace_aad_admin":{"block":{"attributes":{"login":{"type":"string","required":true},"object_id":{"type":"string","required":true},"synapse_workspace_id":{"type":"string","required":true},"tenant_id":{"type":"string","required":true}}}},"azurerm_synapse_workspace_extended_auditing_policy":{"block":{"attributes":{"log_monitoring_enabled":{"type":"bool","optional":true,"default":true},"retention_in_days":{"type":"number","optional":true,"default":0},"storage_account_access_key":{"type":"string","optional":true},"storage_account_access_key_is_secondary":{"type":"bool","optional":true,"default":false},"storage_endpoint":{"type":"string","optional":true},"synapse_workspace_id":{"type":"string","required":true}}}},"azurerm_synapse_workspace_key":{"block":{"attributes":{"active":{"type":"bool","required":true},"customer_managed_key_name":{"type":"string","required":true},"customer_managed_key_versionless_id":{"type":"string","optional":true},"synapse_workspace_id":{"type":"string","required":true}}}},"azurerm_synapse_workspace_security_alert_policy":{"block":{"attributes":{"disabled_alerts":{"type":["set","string"],"optional":true},"email_account_admins_enabled":{"type":"bool","optional":true,"default":false},"email_addresses":{"type":["set","string"],"optional":true},"policy_state":{"type":"string","required":true},"retention_days":{"type":"number","optional":true,"default":0},"storage_account_access_key":{"type":"string","optional":true},"storage_endpoint":{"type":"string","optional":true},"synapse_workspace_id":{"type":"string","required":true}}}},"azurerm_synapse_workspace_sql_aad_admin":{"block":{"attributes":{"login":{"type":"string","required":true},"object_id":{"type":"string","required":true},"synapse_workspace_id":{"type":"string","required":true},"tenant_id":{"type":"string","required":true}}}},"azurerm_synapse_workspace_vulnerability_assessment":{"block":{"attributes":{"storage_account_access_key":{"type":"string","optional":true},"storage_container_path":{"type":"string","required":true},"storage_container_sas_key":{"type":"string","optional":true},"workspace_security_alert_policy_id":{"type":"string","required":true}},"block_types":{"recurring_scans":{"nesting_mode":3,"block":{"attributes":{"email_subscription_admins_enabled":{"type":"bool","optional":true,"default":true},"emails":{"type":["list","string"],"optional":true},"enabled":{"type":"bool","optional":true,"default":false}}},"optional":true,"computed":true}}}},"azurerm_system_center_virtual_machine_manager_availability_set":{"block":{"attributes":{"custom_location_id":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"system_center_virtual_machine_manager_server_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_system_center_virtual_machine_manager_cloud":{"block":{"attributes":{"custom_location_id":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"system_center_virtual_machine_manager_server_inventory_item_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_system_center_virtual_machine_manager_server":{"block":{"attributes":{"custom_location_id":{"type":"string","required":true},"fqdn":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"password":{"type":"string","required":true},"port":{"type":"number","optional":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"username":{"type":"string","required":true}}}},"azurerm_system_center_virtual_machine_manager_virtual_machine_template":{"block":{"attributes":{"custom_location_id":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"system_center_virtual_machine_manager_server_inventory_item_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_system_center_virtual_machine_manager_virtual_network":{"block":{"attributes":{"custom_location_id":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"system_center_virtual_machine_manager_server_inventory_item_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_tenant_template_deployment":{"block":{"attributes":{"debug_level":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"output_content":{"type":"string","computed":true},"parameters_content":{"type":"string","optional":true,"computed":true},"tags":{"type":["map","string"],"optional":true},"template_content":{"type":"string","optional":true,"computed":true,"exactly_one_of":["template_content","template_spec_version_id"]},"template_spec_version_id":{"type":"string","optional":true,"exactly_one_of":["template_content","template_spec_version_id"]}}}},"azurerm_traffic_manager_azure_endpoint":{"block":{"attributes":{"always_serve_enabled":{"type":"bool","optional":true,"default":false},"enabled":{"type":"bool","optional":true,"default":true},"geo_mappings":{"type":["list","string"],"optional":true},"name":{"type":"string","required":true},"priority":{"type":"number","optional":true,"computed":true},"profile_id":{"type":"string","required":true},"target_resource_id":{"type":"string","required":true},"weight":{"type":"number","optional":true,"default":1}},"block_types":{"custom_header":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"subnet":{"nesting_mode":3,"block":{"attributes":{"first":{"type":"string","required":true},"last":{"type":"string","optional":true},"scope":{"type":"number","optional":true}}},"optional":true}}}},"azurerm_traffic_manager_external_endpoint":{"block":{"attributes":{"always_serve_enabled":{"type":"bool","optional":true,"default":false},"enabled":{"type":"bool","optional":true,"default":true},"endpoint_location":{"type":"string","optional":true,"computed":true},"geo_mappings":{"type":["list","string"],"optional":true},"name":{"type":"string","required":true},"priority":{"type":"number","optional":true,"computed":true},"profile_id":{"type":"string","required":true},"target":{"type":"string","required":true},"weight":{"type":"number","optional":true,"default":1}},"block_types":{"custom_header":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"subnet":{"nesting_mode":3,"block":{"attributes":{"first":{"type":"string","required":true},"last":{"type":"string","optional":true},"scope":{"type":"number","optional":true}}},"optional":true}}}},"azurerm_traffic_manager_nested_endpoint":{"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"endpoint_location":{"type":"string","optional":true,"computed":true},"geo_mappings":{"type":["list","string"],"optional":true},"minimum_child_endpoints":{"type":"number","required":true},"minimum_required_child_endpoints_ipv4":{"type":"number","optional":true},"minimum_required_child_endpoints_ipv6":{"type":"number","optional":true},"name":{"type":"string","required":true},"priority":{"type":"number","optional":true,"default":1},"profile_id":{"type":"string","required":true},"target_resource_id":{"type":"string","required":true},"weight":{"type":"number","optional":true,"default":1}},"block_types":{"custom_header":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"subnet":{"nesting_mode":3,"block":{"attributes":{"first":{"type":"string","required":true},"last":{"type":"string","optional":true},"scope":{"type":"number","optional":true}}},"optional":true}}}},"azurerm_traffic_manager_profile":{"block":{"attributes":{"fqdn":{"type":"string","computed":true},"max_return":{"type":"number","optional":true},"name":{"type":"string","required":true},"profile_status":{"type":"string","optional":true,"default":"Enabled"},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"traffic_routing_method":{"type":"string","required":true},"traffic_view_enabled":{"type":"bool","optional":true}},"block_types":{"dns_config":{"nesting_mode":3,"block":{"attributes":{"relative_name":{"type":"string","required":true},"ttl":{"type":"number","required":true}}},"required":true},"monitor_config":{"nesting_mode":3,"block":{"attributes":{"expected_status_code_ranges":{"type":["list","string"],"optional":true},"interval_in_seconds":{"type":"number","optional":true,"default":30},"path":{"type":"string","optional":true},"port":{"type":"number","required":true},"protocol":{"type":"string","required":true},"timeout_in_seconds":{"type":"number","optional":true,"default":10},"tolerated_number_of_failures":{"type":"number","optional":true,"default":3}},"block_types":{"custom_header":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"required":true}}}},"azurerm_trusted_signing_account":{"block":{"attributes":{"account_uri":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_user_assigned_identity":{"block":{"attributes":{"client_id":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"principal_id":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"tenant_id":{"type":"string","computed":true}}}},"azurerm_video_indexer_account":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"required":true},"storage":{"nesting_mode":3,"block":{"attributes":{"storage_account_id":{"type":"string","required":true},"user_assigned_identity_id":{"type":"string","optional":true}}},"required":true}}}},"azurerm_virtual_desktop_application":{"block":{"attributes":{"application_group_id":{"type":"string","required":true},"command_line_argument_policy":{"type":"string","required":true},"command_line_arguments":{"type":"string","optional":true},"description":{"type":"string","optional":true},"friendly_name":{"type":"string","optional":true,"computed":true},"icon_index":{"type":"number","optional":true},"icon_path":{"type":"string","optional":true,"computed":true},"name":{"type":"string","required":true},"path":{"type":"string","required":true},"show_in_portal":{"type":"bool","optional":true}}}},"azurerm_virtual_desktop_application_group":{"block":{"attributes":{"default_desktop_display_name":{"type":"string","optional":true},"description":{"type":"string","optional":true},"friendly_name":{"type":"string","optional":true},"host_pool_id":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"type":{"type":"string","required":true}}}},"azurerm_virtual_desktop_host_pool":{"block":{"attributes":{"custom_rdp_properties":{"type":"string","optional":true},"description":{"type":"string","optional":true},"friendly_name":{"type":"string","optional":true},"load_balancer_type":{"type":"string","required":true},"location":{"type":"string","required":true},"maximum_sessions_allowed":{"type":"number","optional":true,"default":999999},"name":{"type":"string","required":true},"personal_desktop_assignment_type":{"type":"string","optional":true},"preferred_app_group_type":{"type":"string","optional":true,"default":"Desktop"},"public_network_access":{"type":"string","optional":true,"default":"Enabled"},"resource_group_name":{"type":"string","required":true},"start_vm_on_connect":{"type":"bool","optional":true,"default":false},"tags":{"type":["map","string"],"optional":true},"type":{"type":"string","required":true},"validate_environment":{"type":"bool","optional":true,"default":false},"vm_template":{"type":"string","optional":true}},"block_types":{"scheduled_agent_updates":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":false},"timezone":{"type":"string","optional":true,"default":"UTC"},"use_session_host_timezone":{"type":"bool","optional":true,"default":false}},"block_types":{"schedule":{"nesting_mode":3,"block":{"attributes":{"day_of_week":{"type":"string","required":true},"hour_of_day":{"type":"number","required":true}}},"optional":true}}},"optional":true}}}},"azurerm_virtual_desktop_host_pool_registration_info":{"block":{"attributes":{"expiration_date":{"type":"string","required":true},"hostpool_id":{"type":"string","required":true},"token":{"type":"string","computed":true}}}},"azurerm_virtual_desktop_scaling_plan":{"block":{"attributes":{"description":{"type":"string","optional":true},"exclusion_tag":{"type":"string","optional":true},"friendly_name":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"time_zone":{"type":"string","required":true}},"block_types":{"host_pool":{"nesting_mode":3,"block":{"attributes":{"hostpool_id":{"type":"string","required":true},"scaling_plan_enabled":{"type":"bool","required":true}}},"optional":true,"computed":true},"schedule":{"nesting_mode":3,"block":{"attributes":{"days_of_week":{"type":["set","string"],"required":true},"name":{"type":"string","required":true},"off_peak_load_balancing_algorithm":{"type":"string","required":true},"off_peak_start_time":{"type":"string","required":true},"peak_load_balancing_algorithm":{"type":"string","required":true},"peak_start_time":{"type":"string","required":true},"ramp_down_capacity_threshold_percent":{"type":"number","required":true},"ramp_down_force_logoff_users":{"type":"bool","required":true},"ramp_down_load_balancing_algorithm":{"type":"string","required":true},"ramp_down_minimum_hosts_percent":{"type":"number","required":true},"ramp_down_notification_message":{"type":"string","required":true},"ramp_down_start_time":{"type":"string","required":true},"ramp_down_stop_hosts_when":{"type":"string","required":true},"ramp_down_wait_time_minutes":{"type":"number","required":true},"ramp_up_capacity_threshold_percent":{"type":"number","optional":true},"ramp_up_load_balancing_algorithm":{"type":"string","required":true},"ramp_up_minimum_hosts_percent":{"type":"number","optional":true},"ramp_up_start_time":{"type":"string","required":true}}},"required":true}}}},"azurerm_virtual_desktop_scaling_plan_host_pool_association":{"block":{"attributes":{"enabled":{"type":"bool","required":true},"host_pool_id":{"type":"string","required":true},"scaling_plan_id":{"type":"string","required":true}}}},"azurerm_virtual_desktop_workspace":{"block":{"attributes":{"description":{"type":"string","optional":true},"friendly_name":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_virtual_desktop_workspace_application_group_association":{"block":{"attributes":{"application_group_id":{"type":"string","required":true},"workspace_id":{"type":"string","required":true}}}},"azurerm_virtual_hub":{"block":{"attributes":{"address_prefix":{"type":"string","optional":true},"default_route_table_id":{"type":"string","computed":true},"hub_routing_preference":{"type":"string","optional":true,"default":"ExpressRoute"},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"sku":{"type":"string","optional":true},"tags":{"type":["map","string"],"optional":true},"virtual_router_asn":{"type":"number","computed":true},"virtual_router_auto_scale_min_capacity":{"type":"number","optional":true,"default":2},"virtual_router_ips":{"type":["list","string"],"computed":true},"virtual_wan_id":{"type":"string","optional":true}},"block_types":{"route":{"nesting_mode":4,"block":{"attributes":{"address_prefixes":{"type":["list","string"],"required":true},"next_hop_ip_address":{"type":"string","required":true}}},"optional":true}}}},"azurerm_virtual_hub_bgp_connection":{"block":{"attributes":{"name":{"type":"string","required":true},"peer_asn":{"type":"number","required":true},"peer_ip":{"type":"string","required":true},"virtual_hub_id":{"type":"string","required":true},"virtual_network_connection_id":{"type":"string","optional":true}}}},"azurerm_virtual_hub_connection":{"block":{"attributes":{"internet_security_enabled":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"remote_virtual_network_id":{"type":"string","required":true},"virtual_hub_id":{"type":"string","required":true}},"block_types":{"routing":{"nesting_mode":3,"block":{"attributes":{"associated_route_table_id":{"type":"string","optional":true,"computed":true,"at_least_one_of":["routing.0.associated_route_table_id","routing.0.propagated_route_table","routing.0.static_vnet_route"]},"inbound_route_map_id":{"type":"string","optional":true},"outbound_route_map_id":{"type":"string","optional":true},"static_vnet_local_route_override_criteria":{"type":"string","optional":true,"default":"Contains"}},"block_types":{"propagated_route_table":{"nesting_mode":3,"block":{"attributes":{"labels":{"type":["set","string"],"optional":true,"computed":true,"at_least_one_of":["routing.0.propagated_route_table.0.labels","routing.0.propagated_route_table.0.route_table_ids"]},"route_table_ids":{"type":["list","string"],"optional":true,"computed":true,"at_least_one_of":["routing.0.propagated_route_table.0.labels","routing.0.propagated_route_table.0.route_table_ids"]}}},"optional":true,"computed":true,"at_least_one_of":["routing.0.associated_route_table_id","routing.0.propagated_route_table","routing.0.static_vnet_route"]},"static_vnet_route":{"nesting_mode":3,"block":{"attributes":{"address_prefixes":{"type":["set","string"],"optional":true},"name":{"type":"string","optional":true},"next_hop_ip_address":{"type":"string","optional":true}}},"optional":true,"at_least_one_of":["routing.0.associated_route_table_id","routing.0.propagated_route_table","routing.0.static_vnet_route"]}}},"optional":true,"computed":true}}}},"azurerm_virtual_hub_ip":{"block":{"attributes":{"name":{"type":"string","required":true},"private_ip_address":{"type":"string","optional":true},"private_ip_allocation_method":{"type":"string","optional":true,"default":"Dynamic"},"public_ip_address_id":{"type":"string","required":true},"subnet_id":{"type":"string","required":true},"virtual_hub_id":{"type":"string","required":true}}}},"azurerm_virtual_hub_route_table":{"block":{"attributes":{"labels":{"type":["set","string"],"optional":true},"name":{"type":"string","required":true},"virtual_hub_id":{"type":"string","required":true}},"block_types":{"route":{"nesting_mode":4,"block":{"attributes":{"destinations":{"type":["set","string"],"required":true},"destinations_type":{"type":"string","required":true},"name":{"type":"string","required":true},"next_hop":{"type":"string","required":true},"next_hop_type":{"type":"string","optional":true,"default":"ResourceId"}}},"optional":true,"computed":true}}}},"azurerm_virtual_hub_route_table_route":{"block":{"attributes":{"destinations":{"type":["set","string"],"required":true},"destinations_type":{"type":"string","required":true},"name":{"type":"string","required":true},"next_hop":{"type":"string","required":true},"next_hop_type":{"type":"string","optional":true,"default":"ResourceId"},"route_table_id":{"type":"string","required":true}}}},"azurerm_virtual_hub_routing_intent":{"block":{"attributes":{"name":{"type":"string","required":true},"virtual_hub_id":{"type":"string","required":true}},"block_types":{"routing_policy":{"nesting_mode":3,"block":{"attributes":{"destinations":{"type":["list","string"],"required":true},"name":{"type":"string","required":true},"next_hop":{"type":"string","required":true}}},"required":true}}}},"azurerm_virtual_hub_security_partner_provider":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"security_provider_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"virtual_hub_id":{"type":"string","optional":true}}}},"azurerm_virtual_machine":{"block":{"attributes":{"availability_set_id":{"type":"string","optional":true,"computed":true,"conflicts_with":["zones"]},"delete_data_disks_on_termination":{"type":"bool","optional":true,"default":false},"delete_os_disk_on_termination":{"type":"bool","optional":true,"default":false},"license_type":{"type":"string","optional":true,"computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"network_interface_ids":{"type":["list","string"],"required":true},"primary_network_interface_id":{"type":"string","optional":true},"proximity_placement_group_id":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"vm_size":{"type":"string","required":true},"zones":{"type":["list","string"],"optional":true}},"block_types":{"additional_capabilities":{"nesting_mode":3,"block":{"attributes":{"ultra_ssd_enabled":{"type":"bool","required":true}}},"optional":true},"boot_diagnostics":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","required":true},"storage_uri":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"os_profile":{"nesting_mode":4,"block":{"attributes":{"admin_password":{"type":"string","optional":true},"admin_username":{"type":"string","required":true},"computer_name":{"type":"string","required":true},"custom_data":{"type":"string","optional":true,"computed":true}}},"optional":true},"os_profile_linux_config":{"nesting_mode":4,"block":{"attributes":{"disable_password_authentication":{"type":"bool","required":true}},"block_types":{"ssh_keys":{"nesting_mode":3,"block":{"attributes":{"key_data":{"type":"string","required":true},"path":{"type":"string","required":true}}},"optional":true}}},"optional":true,"conflicts_with":["os_profile_windows_config"]},"os_profile_secrets":{"nesting_mode":3,"block":{"attributes":{"source_vault_id":{"type":"string","required":true}},"block_types":{"vault_certificates":{"nesting_mode":3,"block":{"attributes":{"certificate_store":{"type":"string","optional":true},"certificate_url":{"type":"string","required":true}}},"optional":true}}},"optional":true},"os_profile_windows_config":{"nesting_mode":4,"block":{"attributes":{"enable_automatic_upgrades":{"type":"bool","optional":true,"default":false},"provision_vm_agent":{"type":"bool","optional":true,"default":false},"timezone":{"type":"string","optional":true}},"block_types":{"additional_unattend_config":{"nesting_mode":3,"block":{"attributes":{"component":{"type":"string","required":true},"content":{"type":"string","required":true},"pass":{"type":"string","required":true},"setting_name":{"type":"string","required":true}}},"optional":true},"winrm":{"nesting_mode":3,"block":{"attributes":{"certificate_url":{"type":"string","optional":true},"protocol":{"type":"string","required":true}}},"optional":true}}},"optional":true,"conflicts_with":["os_profile_linux_config"]},"plan":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"product":{"type":"string","required":true},"publisher":{"type":"string","required":true}}},"optional":true},"storage_data_disk":{"nesting_mode":3,"block":{"attributes":{"caching":{"type":"string","optional":true,"computed":true},"create_option":{"type":"string","required":true},"disk_size_gb":{"type":"number","optional":true,"computed":true},"lun":{"type":"number","required":true},"managed_disk_id":{"type":"string","optional":true,"computed":true},"managed_disk_type":{"type":"string","optional":true,"computed":true},"name":{"type":"string","required":true},"vhd_uri":{"type":"string","optional":true},"write_accelerator_enabled":{"type":"bool","optional":true,"default":false}}},"optional":true,"computed":true},"storage_image_reference":{"nesting_mode":4,"block":{"attributes":{"id":{"type":"string","optional":true},"offer":{"type":"string","optional":true},"publisher":{"type":"string","optional":true},"sku":{"type":"string","optional":true},"version":{"type":"string","optional":true,"computed":true}}},"optional":true,"computed":true},"storage_os_disk":{"nesting_mode":3,"block":{"attributes":{"caching":{"type":"string","optional":true,"computed":true},"create_option":{"type":"string","required":true},"disk_size_gb":{"type":"number","optional":true,"computed":true},"image_uri":{"type":"string","optional":true},"managed_disk_id":{"type":"string","optional":true,"computed":true,"conflicts_with":["storage_os_disk.0.vhd_uri"]},"managed_disk_type":{"type":"string","optional":true,"computed":true,"conflicts_with":["storage_os_disk.0.vhd_uri"]},"name":{"type":"string","required":true},"os_type":{"type":"string","optional":true,"computed":true},"vhd_uri":{"type":"string","optional":true,"conflicts_with":["storage_os_disk.0.managed_disk_id","storage_os_disk.0.managed_disk_type"]},"write_accelerator_enabled":{"type":"bool","optional":true,"default":false}}},"required":true}}}},"azurerm_virtual_machine_automanage_configuration_assignment":{"block":{"attributes":{"configuration_id":{"type":"string","required":true},"virtual_machine_id":{"type":"string","required":true}}}},"azurerm_virtual_machine_data_disk_attachment":{"block":{"attributes":{"caching":{"type":"string","required":true},"create_option":{"type":"string","optional":true,"default":"Attach"},"lun":{"type":"number","required":true},"managed_disk_id":{"type":"string","required":true},"virtual_machine_id":{"type":"string","required":true},"write_accelerator_enabled":{"type":"bool","optional":true,"default":false}}}},"azurerm_virtual_machine_extension":{"block":{"attributes":{"auto_upgrade_minor_version":{"type":"bool","optional":true},"automatic_upgrade_enabled":{"type":"bool","optional":true},"failure_suppression_enabled":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"protected_settings":{"type":"string","optional":true,"conflicts_with":["protected_settings_from_key_vault"]},"provision_after_extensions":{"type":["list","string"],"optional":true},"publisher":{"type":"string","required":true},"settings":{"type":"string","optional":true},"tags":{"type":["map","string"],"optional":true},"type":{"type":"string","required":true},"type_handler_version":{"type":"string","required":true},"virtual_machine_id":{"type":"string","required":true}},"block_types":{"protected_settings_from_key_vault":{"nesting_mode":3,"block":{"attributes":{"secret_url":{"type":"string","required":true},"source_vault_id":{"type":"string","required":true}}},"optional":true,"conflicts_with":["protected_settings"]}}}},"azurerm_virtual_machine_gallery_application_assignment":{"block":{"attributes":{"configuration_blob_uri":{"type":"string","optional":true},"gallery_application_version_id":{"type":"string","required":true},"order":{"type":"number","optional":true,"default":0},"tag":{"type":"string","optional":true},"virtual_machine_id":{"type":"string","required":true}}}},"azurerm_virtual_machine_implicit_data_disk_from_source":{"block":{"attributes":{"caching":{"type":"string","optional":true},"create_option":{"type":"string","required":true},"disk_size_gb":{"type":"number","required":true},"lun":{"type":"number","required":true},"name":{"type":"string","required":true},"source_resource_id":{"type":"string","required":true},"virtual_machine_id":{"type":"string","required":true},"write_accelerator_enabled":{"type":"bool","optional":true,"default":false}}}},"azurerm_virtual_machine_packet_capture":{"block":{"attributes":{"maximum_bytes_per_packet":{"type":"number","optional":true,"default":0},"maximum_bytes_per_session":{"type":"number","optional":true,"default":1073741824},"maximum_capture_duration_in_seconds":{"type":"number","optional":true,"default":18000},"name":{"type":"string","required":true},"network_watcher_id":{"type":"string","required":true},"virtual_machine_id":{"type":"string","required":true}},"block_types":{"filter":{"nesting_mode":3,"block":{"attributes":{"local_ip_address":{"type":"string","optional":true},"local_port":{"type":"string","optional":true},"protocol":{"type":"string","required":true},"remote_ip_address":{"type":"string","optional":true},"remote_port":{"type":"string","optional":true}}},"optional":true},"storage_location":{"nesting_mode":3,"block":{"attributes":{"file_path":{"type":"string","optional":true,"at_least_one_of":["storage_location.0.file_path","storage_location.0.storage_account_id"]},"storage_account_id":{"type":"string","optional":true,"at_least_one_of":["storage_location.0.file_path","storage_location.0.storage_account_id"]},"storage_path":{"type":"string","computed":true}}},"required":true}}}},"azurerm_virtual_machine_restore_point":{"block":{"attributes":{"crash_consistency_mode_enabled":{"type":"bool","optional":true,"default":false},"excluded_disks":{"type":["set","string"],"optional":true},"name":{"type":"string","required":true},"virtual_machine_restore_point_collection_id":{"type":"string","required":true}}}},"azurerm_virtual_machine_restore_point_collection":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"source_virtual_machine_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_virtual_machine_run_command":{"block":{"attributes":{"error_blob_uri":{"type":"string","optional":true},"instance_view":{"type":["list",["object",{"end_time":"string","error_message":"string","execution_message":"string","execution_state":"string","exit_code":"number","output":"string","start_time":"string"}]],"computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"output_blob_uri":{"type":"string","optional":true},"run_as_password":{"type":"string","optional":true},"run_as_user":{"type":"string","optional":true},"tags":{"type":["map","string"],"optional":true},"virtual_machine_id":{"type":"string","required":true}},"block_types":{"error_blob_managed_identity":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","optional":true,"conflicts_with":["error_blob_managed_identity.0.object_id"]},"object_id":{"type":"string","optional":true,"conflicts_with":["error_blob_managed_identity.0.client_id"]}}},"optional":true,"required_with":["error_blob_uri"]},"output_blob_managed_identity":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","optional":true,"conflicts_with":["output_blob_managed_identity.0.object_id"]},"object_id":{"type":"string","optional":true,"conflicts_with":["output_blob_managed_identity.0.client_id"]}}},"optional":true,"required_with":["output_blob_uri"]},"parameter":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"protected_parameter":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"source":{"nesting_mode":3,"block":{"attributes":{"command_id":{"type":"string","optional":true,"exactly_one_of":["source.0.command_id","source.0.script","source.0.script_uri"]},"script":{"type":"string","optional":true,"exactly_one_of":["source.0.command_id","source.0.script","source.0.script_uri"]},"script_uri":{"type":"string","optional":true,"exactly_one_of":["source.0.command_id","source.0.script","source.0.script_uri"]}},"block_types":{"script_uri_managed_identity":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","optional":true,"conflicts_with":["source.0.script_uri_managed_identity.0.object_id"]},"object_id":{"type":"string","optional":true,"conflicts_with":["source.0.script_uri_managed_identity.0.client_id"]}}},"optional":true,"required_with":["source.0.script_uri"]}}},"required":true}}}},"azurerm_virtual_machine_scale_set":{"block":{"attributes":{"automatic_os_upgrade":{"type":"bool","optional":true,"default":false},"eviction_policy":{"type":"string","optional":true},"health_probe_id":{"type":"string","optional":true},"license_type":{"type":"string","optional":true,"computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"overprovision":{"type":"bool","optional":true,"default":true},"priority":{"type":"string","optional":true},"proximity_placement_group_id":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"single_placement_group":{"type":"bool","optional":true,"default":true},"tags":{"type":["map","string"],"optional":true},"upgrade_policy_mode":{"type":"string","required":true},"zones":{"type":["list","string"],"optional":true}},"block_types":{"boot_diagnostics":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"storage_uri":{"type":"string","required":true}}},"optional":true},"extension":{"nesting_mode":4,"block":{"attributes":{"auto_upgrade_minor_version":{"type":"bool","optional":true},"name":{"type":"string","required":true},"protected_settings":{"type":"string","optional":true},"provision_after_extensions":{"type":["set","string"],"optional":true},"publisher":{"type":"string","required":true},"settings":{"type":"string","optional":true},"type":{"type":"string","required":true},"type_handler_version":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"network_profile":{"nesting_mode":4,"block":{"attributes":{"accelerated_networking":{"type":"bool","optional":true},"ip_forwarding":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"network_security_group_id":{"type":"string","optional":true},"primary":{"type":"bool","required":true}},"block_types":{"dns_settings":{"nesting_mode":3,"block":{"attributes":{"dns_servers":{"type":["list","string"],"required":true}}},"optional":true},"ip_configuration":{"nesting_mode":3,"block":{"attributes":{"application_gateway_backend_address_pool_ids":{"type":["set","string"],"optional":true},"application_security_group_ids":{"type":["set","string"],"optional":true},"load_balancer_backend_address_pool_ids":{"type":["set","string"],"optional":true},"load_balancer_inbound_nat_rules_ids":{"type":["set","string"],"optional":true,"computed":true},"name":{"type":"string","required":true},"primary":{"type":"bool","required":true},"subnet_id":{"type":"string","required":true}},"block_types":{"public_ip_address_configuration":{"nesting_mode":3,"block":{"attributes":{"domain_name_label":{"type":"string","required":true},"idle_timeout":{"type":"number","required":true},"name":{"type":"string","required":true}}},"optional":true}}},"required":true}}},"required":true},"os_profile":{"nesting_mode":3,"block":{"attributes":{"admin_password":{"type":"string","optional":true},"admin_username":{"type":"string","required":true},"computer_name_prefix":{"type":"string","required":true},"custom_data":{"type":"string","optional":true}}},"required":true},"os_profile_linux_config":{"nesting_mode":4,"block":{"attributes":{"disable_password_authentication":{"type":"bool","optional":true,"default":false}},"block_types":{"ssh_keys":{"nesting_mode":3,"block":{"attributes":{"key_data":{"type":"string","optional":true},"path":{"type":"string","required":true}}},"optional":true}}},"optional":true,"computed":true},"os_profile_secrets":{"nesting_mode":4,"block":{"attributes":{"source_vault_id":{"type":"string","required":true}},"block_types":{"vault_certificates":{"nesting_mode":3,"block":{"attributes":{"certificate_store":{"type":"string","optional":true},"certificate_url":{"type":"string","required":true}}},"optional":true}}},"optional":true},"os_profile_windows_config":{"nesting_mode":4,"block":{"attributes":{"enable_automatic_upgrades":{"type":"bool","optional":true},"provision_vm_agent":{"type":"bool","optional":true}},"block_types":{"additional_unattend_config":{"nesting_mode":3,"block":{"attributes":{"component":{"type":"string","required":true},"content":{"type":"string","required":true},"pass":{"type":"string","required":true},"setting_name":{"type":"string","required":true}}},"optional":true},"winrm":{"nesting_mode":3,"block":{"attributes":{"certificate_url":{"type":"string","optional":true},"protocol":{"type":"string","required":true}}},"optional":true}}},"optional":true},"plan":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"product":{"type":"string","required":true},"publisher":{"type":"string","required":true}}},"optional":true},"rolling_upgrade_policy":{"nesting_mode":3,"block":{"attributes":{"max_batch_instance_percent":{"type":"number","optional":true,"default":20},"max_unhealthy_instance_percent":{"type":"number","optional":true,"default":20},"max_unhealthy_upgraded_instance_percent":{"type":"number","optional":true,"default":20},"pause_time_between_batches":{"type":"string","optional":true,"default":"PT0S"}}},"optional":true},"sku":{"nesting_mode":3,"block":{"attributes":{"capacity":{"type":"number","required":true},"name":{"type":"string","required":true},"tier":{"type":"string","optional":true,"computed":true}}},"required":true},"storage_profile_data_disk":{"nesting_mode":3,"block":{"attributes":{"caching":{"type":"string","optional":true,"computed":true},"create_option":{"type":"string","required":true},"disk_size_gb":{"type":"number","optional":true,"computed":true},"lun":{"type":"number","required":true},"managed_disk_type":{"type":"string","optional":true,"computed":true}}},"optional":true},"storage_profile_image_reference":{"nesting_mode":4,"block":{"attributes":{"id":{"type":"string","optional":true},"offer":{"type":"string","optional":true},"publisher":{"type":"string","optional":true},"sku":{"type":"string","optional":true},"version":{"type":"string","optional":true}}},"optional":true,"computed":true},"storage_profile_os_disk":{"nesting_mode":4,"block":{"attributes":{"caching":{"type":"string","optional":true,"computed":true},"create_option":{"type":"string","required":true},"image":{"type":"string","optional":true},"managed_disk_type":{"type":"string","optional":true,"computed":true},"name":{"type":"string","optional":true},"os_type":{"type":"string","optional":true},"vhd_containers":{"type":["set","string"],"optional":true}}},"required":true}}}},"azurerm_virtual_machine_scale_set_extension":{"block":{"attributes":{"auto_upgrade_minor_version":{"type":"bool","optional":true,"default":true},"automatic_upgrade_enabled":{"type":"bool","optional":true},"failure_suppression_enabled":{"type":"bool","optional":true,"default":false},"force_update_tag":{"type":"string","optional":true},"name":{"type":"string","required":true},"protected_settings":{"type":"string","optional":true},"provision_after_extensions":{"type":["list","string"],"optional":true},"publisher":{"type":"string","required":true},"settings":{"type":"string","optional":true},"type":{"type":"string","required":true},"type_handler_version":{"type":"string","required":true},"virtual_machine_scale_set_id":{"type":"string","required":true}},"block_types":{"protected_settings_from_key_vault":{"nesting_mode":3,"block":{"attributes":{"secret_url":{"type":"string","required":true},"source_vault_id":{"type":"string","required":true}}},"optional":true,"conflicts_with":["protected_settings"]}}}},"azurerm_virtual_machine_scale_set_packet_capture":{"block":{"attributes":{"maximum_bytes_per_packet":{"type":"number","optional":true,"default":0},"maximum_bytes_per_session":{"type":"number","optional":true,"default":1073741824},"maximum_capture_duration_in_seconds":{"type":"number","optional":true,"default":18000},"name":{"type":"string","required":true},"network_watcher_id":{"type":"string","required":true},"virtual_machine_scale_set_id":{"type":"string","required":true}},"block_types":{"filter":{"nesting_mode":3,"block":{"attributes":{"local_ip_address":{"type":"string","optional":true},"local_port":{"type":"string","optional":true},"protocol":{"type":"string","required":true},"remote_ip_address":{"type":"string","optional":true},"remote_port":{"type":"string","optional":true}}},"optional":true},"machine_scope":{"nesting_mode":3,"block":{"attributes":{"exclude_instance_ids":{"type":["list","string"],"optional":true,"conflicts_with":["machine_scope.0.include_instance_ids"]},"include_instance_ids":{"type":["list","string"],"optional":true,"conflicts_with":["machine_scope.0.exclude_instance_ids"]}}},"optional":true},"storage_location":{"nesting_mode":3,"block":{"attributes":{"file_path":{"type":"string","optional":true,"at_least_one_of":["storage_location.0.file_path","storage_location.0.storage_account_id"]},"storage_account_id":{"type":"string","optional":true,"at_least_one_of":["storage_location.0.file_path","storage_location.0.storage_account_id"]},"storage_path":{"type":"string","computed":true}}},"required":true}}}},"azurerm_virtual_machine_scale_set_standby_pool":{"block":{"attributes":{"attached_virtual_machine_scale_set_id":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"virtual_machine_state":{"type":"string","required":true}},"block_types":{"elasticity_profile":{"nesting_mode":3,"block":{"attributes":{"max_ready_capacity":{"type":"number","required":true},"min_ready_capacity":{"type":"number","required":true}}},"required":true}}}},"azurerm_virtual_network":{"block":{"attributes":{"address_space":{"type":["set","string"],"required":true},"bgp_community":{"type":"string","optional":true},"dns_servers":{"type":["list","string"],"optional":true,"computed":true},"edge_zone":{"type":"string","optional":true},"flow_timeout_in_minutes":{"type":"number","optional":true},"guid":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"private_endpoint_vnet_policies":{"type":"string","optional":true,"default":"Disabled"},"resource_group_name":{"type":"string","required":true},"subnet":{"type":["set",["object",{"address_prefixes":["list","string"],"default_outbound_access_enabled":"bool","delegation":["list",["object",{"name":"string","service_delegation":["list",["object",{"actions":["set","string"],"name":"string"}]]}]],"id":"string","name":"string","private_endpoint_network_policies":"string","private_link_service_network_policies_enabled":"bool","route_table_id":"string","security_group":"string","service_endpoint_policy_ids":["set","string"],"service_endpoints":["set","string"]}]],"optional":true,"computed":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"ddos_protection_plan":{"nesting_mode":3,"block":{"attributes":{"enable":{"type":"bool","required":true},"id":{"type":"string","required":true}}},"optional":true},"encryption":{"nesting_mode":3,"block":{"attributes":{"enforcement":{"type":"string","required":true}}},"optional":true}}}},"azurerm_virtual_network_dns_servers":{"block":{"attributes":{"dns_servers":{"type":["list","string"],"optional":true},"virtual_network_id":{"type":"string","required":true}}}},"azurerm_virtual_network_gateway":{"block":{"attributes":{"active_active":{"type":"bool","optional":true,"computed":true},"bgp_route_translation_for_nat_enabled":{"type":"bool","optional":true,"default":false},"default_local_network_gateway_id":{"type":"string","optional":true},"dns_forwarding_enabled":{"type":"bool","optional":true},"edge_zone":{"type":"string","optional":true},"enable_bgp":{"type":"bool","optional":true,"computed":true},"generation":{"type":"string","optional":true,"computed":true},"ip_sec_replay_protection_enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"private_ip_address_enabled":{"type":"bool","optional":true},"remote_vnet_traffic_enabled":{"type":"bool","optional":true,"default":false},"resource_group_name":{"type":"string","required":true},"sku":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"type":{"type":"string","required":true},"virtual_wan_traffic_enabled":{"type":"bool","optional":true,"default":false},"vpn_type":{"type":"string","optional":true,"default":"RouteBased"}},"block_types":{"bgp_settings":{"nesting_mode":3,"block":{"attributes":{"asn":{"type":"number","optional":true,"at_least_one_of":["bgp_settings.0.asn","bgp_settings.0.peer_weight","bgp_settings.0.peering_addresses"]},"peer_weight":{"type":"number","optional":true,"at_least_one_of":["bgp_settings.0.asn","bgp_settings.0.peer_weight","bgp_settings.0.peering_addresses"]}},"block_types":{"peering_addresses":{"nesting_mode":3,"block":{"attributes":{"apipa_addresses":{"type":["list","string"],"optional":true},"default_addresses":{"type":["list","string"],"computed":true},"ip_configuration_name":{"type":"string","optional":true,"computed":true},"tunnel_ip_addresses":{"type":["list","string"],"computed":true}}},"optional":true,"computed":true,"at_least_one_of":["bgp_settings.0.asn","bgp_settings.0.peer_weight","bgp_settings.0.peering_addresses"]}}},"optional":true,"computed":true},"custom_route":{"nesting_mode":3,"block":{"attributes":{"address_prefixes":{"type":["set","string"],"optional":true}}},"optional":true},"ip_configuration":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","optional":true,"default":"vnetGatewayConfig"},"private_ip_address_allocation":{"type":"string","optional":true,"default":"Dynamic"},"public_ip_address_id":{"type":"string","required":true},"subnet_id":{"type":"string","required":true}}},"required":true},"policy_group":{"nesting_mode":3,"block":{"attributes":{"is_default":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"priority":{"type":"number","optional":true,"default":0}},"block_types":{"policy_member":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"type":{"type":"string","required":true},"value":{"type":"string","required":true}}},"required":true}}},"optional":true},"vpn_client_configuration":{"nesting_mode":3,"block":{"attributes":{"aad_audience":{"type":"string","optional":true,"required_with":["vpn_client_configuration.0.aad_issuer","vpn_client_configuration.0.aad_tenant"]},"aad_issuer":{"type":"string","optional":true,"required_with":["vpn_client_configuration.0.aad_audience","vpn_client_configuration.0.aad_tenant"]},"aad_tenant":{"type":"string","optional":true,"required_with":["vpn_client_configuration.0.aad_audience","vpn_client_configuration.0.aad_issuer"]},"address_space":{"type":["list","string"],"required":true},"radius_server_address":{"type":"string","optional":true,"required_with":["vpn_client_configuration.0.radius_server_secret"]},"radius_server_secret":{"type":"string","optional":true,"required_with":["vpn_client_configuration.0.radius_server_address"]},"vpn_auth_types":{"type":["set","string"],"optional":true,"computed":true},"vpn_client_protocols":{"type":["set","string"],"optional":true,"computed":true}},"block_types":{"ipsec_policy":{"nesting_mode":3,"block":{"attributes":{"dh_group":{"type":"string","required":true},"ike_encryption":{"type":"string","required":true},"ike_integrity":{"type":"string","required":true},"ipsec_encryption":{"type":"string","required":true},"ipsec_integrity":{"type":"string","required":true},"pfs_group":{"type":"string","required":true},"sa_data_size_in_kilobytes":{"type":"number","required":true},"sa_lifetime_in_seconds":{"type":"number","required":true}}},"optional":true},"radius_server":{"nesting_mode":3,"block":{"attributes":{"address":{"type":"string","required":true},"score":{"type":"number","required":true},"secret":{"type":"string","required":true}}},"optional":true},"revoked_certificate":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"thumbprint":{"type":"string","required":true}}},"optional":true},"root_certificate":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"public_cert_data":{"type":"string","required":true}}},"optional":true},"virtual_network_gateway_client_connection":{"nesting_mode":3,"block":{"attributes":{"address_prefixes":{"type":["list","string"],"required":true},"name":{"type":"string","required":true},"policy_group_names":{"type":["list","string"],"required":true}}},"optional":true}}},"optional":true}}}},"azurerm_virtual_network_gateway_connection":{"block":{"attributes":{"authorization_key":{"type":"string","optional":true},"connection_mode":{"type":"string","optional":true,"default":"Default"},"connection_protocol":{"type":"string","optional":true,"computed":true},"dpd_timeout_seconds":{"type":"number","optional":true},"egress_nat_rule_ids":{"type":["set","string"],"optional":true},"enable_bgp":{"type":"bool","optional":true,"computed":true},"express_route_circuit_id":{"type":"string","optional":true},"express_route_gateway_bypass":{"type":"bool","optional":true,"computed":true},"ingress_nat_rule_ids":{"type":["set","string"],"optional":true},"local_azure_ip_address_enabled":{"type":"bool","optional":true},"local_network_gateway_id":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"peer_virtual_network_gateway_id":{"type":"string","optional":true},"private_link_fast_path_enabled":{"type":"bool","optional":true,"default":false},"resource_group_name":{"type":"string","required":true},"routing_weight":{"type":"number","optional":true,"computed":true},"shared_key":{"type":"string","optional":true,"computed":true},"tags":{"type":["map","string"],"optional":true},"type":{"type":"string","required":true},"use_policy_based_traffic_selectors":{"type":"bool","optional":true,"computed":true},"virtual_network_gateway_id":{"type":"string","required":true}},"block_types":{"custom_bgp_addresses":{"nesting_mode":3,"block":{"attributes":{"primary":{"type":"string","required":true},"secondary":{"type":"string","optional":true}}},"optional":true},"ipsec_policy":{"nesting_mode":3,"block":{"attributes":{"dh_group":{"type":"string","required":true},"ike_encryption":{"type":"string","required":true},"ike_integrity":{"type":"string","required":true},"ipsec_encryption":{"type":"string","required":true},"ipsec_integrity":{"type":"string","required":true},"pfs_group":{"type":"string","required":true},"sa_datasize":{"type":"number","optional":true,"computed":true},"sa_lifetime":{"type":"number","optional":true,"computed":true}}},"optional":true},"traffic_selector_policy":{"nesting_mode":3,"block":{"attributes":{"local_address_cidrs":{"type":["list","string"],"required":true},"remote_address_cidrs":{"type":["list","string"],"required":true}}},"optional":true}}}},"azurerm_virtual_network_gateway_nat_rule":{"block":{"attributes":{"ip_configuration_id":{"type":"string","optional":true},"mode":{"type":"string","optional":true,"default":"EgressSnat"},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"type":{"type":"string","optional":true,"default":"Static"},"virtual_network_gateway_id":{"type":"string","required":true}},"block_types":{"external_mapping":{"nesting_mode":3,"block":{"attributes":{"address_space":{"type":"string","required":true},"port_range":{"type":"string","optional":true}}},"required":true},"internal_mapping":{"nesting_mode":3,"block":{"attributes":{"address_space":{"type":"string","required":true},"port_range":{"type":"string","optional":true}}},"required":true}}}},"azurerm_virtual_network_peering":{"block":{"attributes":{"allow_forwarded_traffic":{"type":"bool","optional":true,"default":false},"allow_gateway_transit":{"type":"bool","optional":true,"default":false},"allow_virtual_network_access":{"type":"bool","optional":true,"default":true},"local_subnet_names":{"type":["list","string"],"optional":true},"name":{"type":"string","required":true},"only_ipv6_peering_enabled":{"type":"bool","optional":true},"peer_complete_virtual_networks_enabled":{"type":"bool","optional":true,"default":true},"remote_subnet_names":{"type":["list","string"],"optional":true},"remote_virtual_network_id":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"triggers":{"type":["map","string"],"optional":true},"use_remote_gateways":{"type":"bool","optional":true,"default":false},"virtual_network_name":{"type":"string","required":true}}}},"azurerm_virtual_wan":{"block":{"attributes":{"allow_branch_to_branch_traffic":{"type":"bool","optional":true,"default":true},"disable_vpn_encryption":{"type":"bool","optional":true,"default":false},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"office365_local_breakout_category":{"type":"string","optional":true,"default":"None"},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"type":{"type":"string","optional":true,"default":"Standard"}}}},"azurerm_vmware_cluster":{"block":{"attributes":{"cluster_node_count":{"type":"number","required":true},"cluster_number":{"type":"number","computed":true},"hosts":{"type":["list","string"],"computed":true},"name":{"type":"string","required":true},"sku_name":{"type":"string","required":true},"vmware_cloud_id":{"type":"string","required":true}}}},"azurerm_vmware_express_route_authorization":{"block":{"attributes":{"express_route_authorization_id":{"type":"string","computed":true},"express_route_authorization_key":{"type":"string","computed":true},"name":{"type":"string","required":true},"private_cloud_id":{"type":"string","required":true}}}},"azurerm_vmware_netapp_volume_attachment":{"block":{"attributes":{"name":{"type":"string","required":true},"netapp_volume_id":{"type":"string","required":true},"vmware_cluster_id":{"type":"string","required":true}}}},"azurerm_vmware_private_cloud":{"block":{"attributes":{"circuit":{"type":["list",["object",{"express_route_id":"string","express_route_private_peering_id":"string","primary_subnet_cidr":"string","secondary_subnet_cidr":"string"}]],"computed":true},"hcx_cloud_manager_endpoint":{"type":"string","computed":true},"internet_connection_enabled":{"type":"bool","optional":true,"default":false},"location":{"type":"string","required":true},"management_subnet_cidr":{"type":"string","computed":true},"name":{"type":"string","required":true},"network_subnet_cidr":{"type":"string","required":true},"nsxt_certificate_thumbprint":{"type":"string","computed":true},"nsxt_manager_endpoint":{"type":"string","computed":true},"nsxt_password":{"type":"string","optional":true},"provisioning_subnet_cidr":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"vcenter_certificate_thumbprint":{"type":"string","computed":true},"vcenter_password":{"type":"string","optional":true},"vcsa_endpoint":{"type":"string","computed":true},"vmotion_subnet_cidr":{"type":"string","computed":true}},"block_types":{"management_cluster":{"nesting_mode":3,"block":{"attributes":{"hosts":{"type":["list","string"],"computed":true},"id":{"type":"number","computed":true},"size":{"type":"number","required":true}}},"required":true}}}},"azurerm_voice_services_communications_gateway":{"block":{"attributes":{"api_bridge":{"type":"string","optional":true},"auto_generated_domain_name_label_scope":{"type":"string","optional":true,"default":"TenantReuse"},"codecs":{"type":"string","required":true},"connectivity":{"type":"string","required":true},"e911_type":{"type":"string","required":true},"emergency_dial_strings":{"type":["list","string"],"optional":true},"location":{"type":"string","required":true},"microsoft_teams_voicemail_pilot_number":{"type":"string","optional":true},"name":{"type":"string","required":true},"on_prem_mcp_enabled":{"type":"bool","optional":true},"platforms":{"type":["list","string"],"required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"service_location":{"nesting_mode":4,"block":{"attributes":{"allowed_media_source_address_prefixes":{"type":["set","string"],"optional":true},"allowed_signaling_source_address_prefixes":{"type":["set","string"],"optional":true},"esrp_addresses":{"type":["set","string"],"optional":true},"location":{"type":"string","required":true},"operator_addresses":{"type":["set","string"],"required":true}}},"required":true}}}},"azurerm_voice_services_communications_gateway_test_line":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"phone_number":{"type":"string","required":true},"purpose":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"voice_services_communications_gateway_id":{"type":"string","required":true}}}},"azurerm_vpn_gateway":{"block":{"attributes":{"bgp_route_translation_for_nat_enabled":{"type":"bool","optional":true,"default":false},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"routing_preference":{"type":"string","optional":true,"default":"Microsoft Network"},"scale_unit":{"type":"number","optional":true,"default":1},"tags":{"type":["map","string"],"optional":true},"virtual_hub_id":{"type":"string","required":true}},"block_types":{"bgp_settings":{"nesting_mode":3,"block":{"attributes":{"asn":{"type":"number","required":true},"bgp_peering_address":{"type":"string","computed":true},"peer_weight":{"type":"number","required":true}},"block_types":{"instance_0_bgp_peering_address":{"nesting_mode":3,"block":{"attributes":{"custom_ips":{"type":["set","string"],"required":true},"default_ips":{"type":["set","string"],"computed":true},"ip_configuration_id":{"type":"string","computed":true},"tunnel_ips":{"type":["set","string"],"computed":true}}},"optional":true,"computed":true},"instance_1_bgp_peering_address":{"nesting_mode":3,"block":{"attributes":{"custom_ips":{"type":["set","string"],"required":true},"default_ips":{"type":["set","string"],"computed":true},"ip_configuration_id":{"type":"string","computed":true},"tunnel_ips":{"type":["set","string"],"computed":true}}},"optional":true,"computed":true}}},"optional":true,"computed":true}}}},"azurerm_vpn_gateway_connection":{"block":{"attributes":{"internet_security_enabled":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"remote_vpn_site_id":{"type":"string","required":true},"vpn_gateway_id":{"type":"string","required":true}},"block_types":{"routing":{"nesting_mode":3,"block":{"attributes":{"associated_route_table":{"type":"string","required":true},"inbound_route_map_id":{"type":"string","optional":true},"outbound_route_map_id":{"type":"string","optional":true}},"block_types":{"propagated_route_table":{"nesting_mode":3,"block":{"attributes":{"labels":{"type":["set","string"],"optional":true},"route_table_ids":{"type":["list","string"],"required":true}}},"optional":true,"computed":true}}},"optional":true,"computed":true},"traffic_selector_policy":{"nesting_mode":4,"block":{"attributes":{"local_address_ranges":{"type":["set","string"],"required":true},"remote_address_ranges":{"type":["set","string"],"required":true}}},"optional":true},"vpn_link":{"nesting_mode":3,"block":{"attributes":{"bandwidth_mbps":{"type":"number","optional":true,"default":10},"bgp_enabled":{"type":"bool","optional":true,"default":false},"connection_mode":{"type":"string","optional":true,"default":"Default"},"egress_nat_rule_ids":{"type":["set","string"],"optional":true},"ingress_nat_rule_ids":{"type":["set","string"],"optional":true},"local_azure_ip_address_enabled":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"policy_based_traffic_selector_enabled":{"type":"bool","optional":true,"default":false},"protocol":{"type":"string","optional":true,"default":"IKEv2"},"ratelimit_enabled":{"type":"bool","optional":true,"default":false},"route_weight":{"type":"number","optional":true,"default":0},"shared_key":{"type":"string","optional":true},"vpn_site_link_id":{"type":"string","required":true}},"block_types":{"custom_bgp_address":{"nesting_mode":4,"block":{"attributes":{"ip_address":{"type":"string","required":true},"ip_configuration_id":{"type":"string","required":true}}},"optional":true},"ipsec_policy":{"nesting_mode":3,"block":{"attributes":{"dh_group":{"type":"string","required":true},"encryption_algorithm":{"type":"string","required":true},"ike_encryption_algorithm":{"type":"string","required":true},"ike_integrity_algorithm":{"type":"string","required":true},"integrity_algorithm":{"type":"string","required":true},"pfs_group":{"type":"string","required":true},"sa_data_size_kb":{"type":"number","required":true},"sa_lifetime_sec":{"type":"number","required":true}}},"optional":true}}},"required":true}}}},"azurerm_vpn_gateway_nat_rule":{"block":{"attributes":{"ip_configuration_id":{"type":"string","optional":true},"mode":{"type":"string","optional":true,"default":"EgressSnat"},"name":{"type":"string","required":true},"type":{"type":"string","optional":true,"default":"Static"},"vpn_gateway_id":{"type":"string","required":true}},"block_types":{"external_mapping":{"nesting_mode":3,"block":{"attributes":{"address_space":{"type":"string","required":true},"port_range":{"type":"string","optional":true}}},"optional":true},"internal_mapping":{"nesting_mode":3,"block":{"attributes":{"address_space":{"type":"string","required":true},"port_range":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_vpn_server_configuration":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"vpn_authentication_types":{"type":["list","string"],"required":true},"vpn_protocols":{"type":["set","string"],"optional":true,"computed":true}},"block_types":{"azure_active_directory_authentication":{"nesting_mode":3,"block":{"attributes":{"audience":{"type":"string","required":true},"issuer":{"type":"string","required":true},"tenant":{"type":"string","required":true}}},"optional":true},"client_revoked_certificate":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"thumbprint":{"type":"string","required":true}}},"optional":true},"client_root_certificate":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"public_cert_data":{"type":"string","required":true}}},"optional":true},"ipsec_policy":{"nesting_mode":3,"block":{"attributes":{"dh_group":{"type":"string","required":true},"ike_encryption":{"type":"string","required":true},"ike_integrity":{"type":"string","required":true},"ipsec_encryption":{"type":"string","required":true},"ipsec_integrity":{"type":"string","required":true},"pfs_group":{"type":"string","required":true},"sa_data_size_kilobytes":{"type":"number","required":true},"sa_lifetime_seconds":{"type":"number","required":true}}},"optional":true},"radius":{"nesting_mode":3,"block":{"block_types":{"client_root_certificate":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"thumbprint":{"type":"string","required":true}}},"optional":true},"server":{"nesting_mode":3,"block":{"attributes":{"address":{"type":"string","required":true},"score":{"type":"number","required":true},"secret":{"type":"string","required":true}}},"optional":true},"server_root_certificate":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"public_cert_data":{"type":"string","required":true}}},"optional":true}}},"optional":true}}}},"azurerm_vpn_server_configuration_policy_group":{"block":{"attributes":{"is_default":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"priority":{"type":"number","optional":true,"default":0},"vpn_server_configuration_id":{"type":"string","required":true}},"block_types":{"policy":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"type":{"type":"string","required":true},"value":{"type":"string","required":true}}},"required":true}}}},"azurerm_vpn_site":{"block":{"attributes":{"address_cidrs":{"type":["set","string"],"optional":true},"device_model":{"type":"string","optional":true},"device_vendor":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"virtual_wan_id":{"type":"string","required":true}},"block_types":{"link":{"nesting_mode":3,"block":{"attributes":{"fqdn":{"type":"string","optional":true},"id":{"type":"string","computed":true},"ip_address":{"type":"string","optional":true},"name":{"type":"string","required":true},"provider_name":{"type":"string","optional":true},"speed_in_mbps":{"type":"number","optional":true,"default":0}},"block_types":{"bgp":{"nesting_mode":3,"block":{"attributes":{"asn":{"type":"number","required":true},"peering_address":{"type":"string","required":true}}},"optional":true}}},"optional":true},"o365_policy":{"nesting_mode":3,"block":{"block_types":{"traffic_category":{"nesting_mode":3,"block":{"attributes":{"allow_endpoint_enabled":{"type":"bool","optional":true,"default":false},"default_endpoint_enabled":{"type":"bool","optional":true,"default":false},"optimize_endpoint_enabled":{"type":"bool","optional":true,"default":false}}},"optional":true,"computed":true}}},"optional":true,"computed":true}}}},"azurerm_web_app_active_slot":{"block":{"attributes":{"last_successful_swap":{"type":"string","computed":true},"overwrite_network_config":{"type":"bool","optional":true,"default":true},"slot_id":{"type":"string","required":true}}}},"azurerm_web_app_hybrid_connection":{"block":{"attributes":{"hostname":{"type":"string","required":true},"namespace_name":{"type":"string","computed":true},"port":{"type":"number","required":true},"relay_id":{"type":"string","required":true},"relay_name":{"type":"string","computed":true},"send_key_name":{"type":"string","optional":true,"default":"RootManageSharedAccessKey"},"send_key_value":{"type":"string","computed":true},"service_bus_namespace":{"type":"string","computed":true},"service_bus_suffix":{"type":"string","computed":true},"web_app_id":{"type":"string","required":true}}}},"azurerm_web_application_firewall_policy":{"block":{"attributes":{"http_listener_ids":{"type":["list","string"],"computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"path_based_rule_ids":{"type":["list","string"],"computed":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"custom_rules":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":true},"group_rate_limit_by":{"type":"string","optional":true},"name":{"type":"string","optional":true},"priority":{"type":"number","required":true},"rate_limit_duration":{"type":"string","optional":true},"rate_limit_threshold":{"type":"number","optional":true},"rule_type":{"type":"string","required":true}},"block_types":{"match_conditions":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["list","string"],"optional":true},"negation_condition":{"type":"bool","optional":true},"operator":{"type":"string","required":true},"transforms":{"type":["set","string"],"optional":true}},"block_types":{"match_variables":{"nesting_mode":3,"block":{"attributes":{"selector":{"type":"string","optional":true},"variable_name":{"type":"string","required":true}}},"required":true}}},"required":true}}},"optional":true},"managed_rules":{"nesting_mode":3,"block":{"block_types":{"exclusion":{"nesting_mode":3,"block":{"attributes":{"match_variable":{"type":"string","required":true},"selector":{"type":"string","required":true},"selector_match_operator":{"type":"string","required":true}},"block_types":{"excluded_rule_set":{"nesting_mode":3,"block":{"attributes":{"type":{"type":"string","optional":true,"default":"OWASP"},"version":{"type":"string","optional":true,"default":"3.2"}},"block_types":{"rule_group":{"nesting_mode":3,"block":{"attributes":{"excluded_rules":{"type":["list","string"],"optional":true},"rule_group_name":{"type":"string","required":true}}},"optional":true}}},"optional":true}}},"optional":true},"managed_rule_set":{"nesting_mode":3,"block":{"attributes":{"type":{"type":"string","optional":true,"default":"OWASP"},"version":{"type":"string","required":true}},"block_types":{"rule_group_override":{"nesting_mode":3,"block":{"attributes":{"rule_group_name":{"type":"string","required":true}},"block_types":{"rule":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true},"enabled":{"type":"bool","optional":true,"default":false},"id":{"type":"string","required":true}}},"optional":true}}},"optional":true}}},"required":true}}},"required":true},"policy_settings":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"file_upload_enforcement":{"type":"bool","optional":true,"computed":true},"file_upload_limit_in_mb":{"type":"number","optional":true,"default":100},"js_challenge_cookie_expiration_in_minutes":{"type":"number","optional":true,"default":30},"max_request_body_size_in_kb":{"type":"number","optional":true,"default":128},"mode":{"type":"string","optional":true,"default":"Prevention"},"request_body_check":{"type":"bool","optional":true,"default":true},"request_body_enforcement":{"type":"bool","optional":true,"default":true},"request_body_inspect_limit_in_kb":{"type":"number","optional":true,"default":128}},"block_types":{"log_scrubbing":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true}},"block_types":{"rule":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"match_variable":{"type":"string","required":true},"selector":{"type":"string","optional":true},"selector_match_operator":{"type":"string","optional":true,"default":"Equals"}}},"optional":true}}},"optional":true}}},"optional":true}}}},"azurerm_web_pubsub":{"block":{"attributes":{"aad_auth_enabled":{"type":"bool","optional":true,"default":true},"capacity":{"type":"number","optional":true,"default":1},"external_ip":{"type":"string","computed":true},"hostname":{"type":"string","computed":true},"local_auth_enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"primary_access_key":{"type":"string","computed":true},"primary_connection_string":{"type":"string","computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"public_port":{"type":"number","computed":true},"resource_group_name":{"type":"string","required":true},"secondary_access_key":{"type":"string","computed":true},"secondary_connection_string":{"type":"string","computed":true},"server_port":{"type":"number","computed":true},"sku":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"tls_client_cert_enabled":{"type":"bool","optional":true,"default":false},"version":{"type":"string","computed":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"live_trace":{"nesting_mode":3,"block":{"attributes":{"connectivity_logs_enabled":{"type":"bool","optional":true,"default":true},"enabled":{"type":"bool","optional":true,"default":true},"http_request_logs_enabled":{"type":"bool","optional":true,"default":true},"messaging_logs_enabled":{"type":"bool","optional":true,"default":true}}},"optional":true}}}},"azurerm_web_pubsub_custom_certificate":{"block":{"attributes":{"certificate_version":{"type":"string","computed":true},"custom_certificate_id":{"type":"string","required":true},"name":{"type":"string","required":true},"web_pubsub_id":{"type":"string","required":true}}}},"azurerm_web_pubsub_custom_domain":{"block":{"attributes":{"domain_name":{"type":"string","required":true},"name":{"type":"string","required":true},"web_pubsub_custom_certificate_id":{"type":"string","required":true},"web_pubsub_id":{"type":"string","required":true}}}},"azurerm_web_pubsub_hub":{"block":{"attributes":{"anonymous_connections_enabled":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"web_pubsub_id":{"type":"string","required":true}},"block_types":{"event_handler":{"nesting_mode":3,"block":{"attributes":{"system_events":{"type":["set","string"],"optional":true},"url_template":{"type":"string","required":true},"user_event_pattern":{"type":"string","optional":true}},"block_types":{"auth":{"nesting_mode":3,"block":{"attributes":{"managed_identity_id":{"type":"string","required":true}}},"optional":true}}},"optional":true},"event_listener":{"nesting_mode":3,"block":{"attributes":{"eventhub_name":{"type":"string","required":true},"eventhub_namespace_name":{"type":"string","required":true},"system_event_name_filter":{"type":["list","string"],"optional":true},"user_event_name_filter":{"type":["list","string"],"optional":true}}},"optional":true}}}},"azurerm_web_pubsub_network_acl":{"block":{"attributes":{"default_action":{"type":"string","optional":true,"default":"Deny"},"web_pubsub_id":{"type":"string","required":true}},"block_types":{"private_endpoint":{"nesting_mode":4,"block":{"attributes":{"allowed_request_types":{"type":["set","string"],"optional":true},"denied_request_types":{"type":["set","string"],"optional":true},"id":{"type":"string","required":true}}},"optional":true},"public_network":{"nesting_mode":3,"block":{"attributes":{"allowed_request_types":{"type":["set","string"],"optional":true,"conflicts_with":["public_network.0.denied_request_types"]},"denied_request_types":{"type":["set","string"],"optional":true,"conflicts_with":["public_network.0.allowed_request_types"]}}},"required":true}}}},"azurerm_web_pubsub_shared_private_link_resource":{"block":{"attributes":{"name":{"type":"string","required":true},"request_message":{"type":"string","optional":true},"status":{"type":"string","computed":true},"subresource_name":{"type":"string","required":true},"target_resource_id":{"type":"string","required":true},"web_pubsub_id":{"type":"string","required":true}}}},"azurerm_windows_function_app":{"block":{"attributes":{"app_settings":{"type":["map","string"],"optional":true},"builtin_logging_enabled":{"type":"bool","optional":true,"default":true},"client_certificate_enabled":{"type":"bool","optional":true,"default":false},"client_certificate_exclusion_paths":{"type":"string","optional":true},"client_certificate_mode":{"type":"string","optional":true,"default":"Optional"},"content_share_force_disabled":{"type":"bool","optional":true,"default":false},"custom_domain_verification_id":{"type":"string","computed":true},"daily_memory_time_quota":{"type":"number","optional":true,"default":0},"default_hostname":{"type":"string","computed":true},"enabled":{"type":"bool","optional":true,"default":true},"ftp_publish_basic_authentication_enabled":{"type":"bool","optional":true,"default":true},"functions_extension_version":{"type":"string","optional":true,"default":"~4"},"hosting_environment_id":{"type":"string","computed":true},"https_only":{"type":"bool","optional":true,"computed":true},"key_vault_reference_identity_id":{"type":"string","optional":true,"computed":true},"kind":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"outbound_ip_address_list":{"type":["list","string"],"computed":true},"outbound_ip_addresses":{"type":"string","computed":true},"possible_outbound_ip_address_list":{"type":["list","string"],"computed":true},"possible_outbound_ip_addresses":{"type":"string","computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"service_plan_id":{"type":"string","required":true},"site_credential":{"type":["list",["object",{"name":"string","password":"string"}]],"computed":true},"storage_account_access_key":{"type":"string","optional":true,"conflicts_with":["storage_uses_managed_identity","storage_key_vault_secret_id"]},"storage_account_name":{"type":"string","optional":true,"exactly_one_of":["storage_account_name","storage_key_vault_secret_id"]},"storage_key_vault_secret_id":{"type":"string","optional":true,"exactly_one_of":["storage_account_name","storage_key_vault_secret_id"]},"storage_uses_managed_identity":{"type":"bool","optional":true,"default":false,"conflicts_with":["storage_account_access_key","storage_key_vault_secret_id"]},"tags":{"type":["map","string"],"optional":true},"virtual_network_subnet_id":{"type":"string","optional":true},"vnet_image_pull_enabled":{"type":"bool","optional":true,"default":false},"webdeploy_publish_basic_authentication_enabled":{"type":"bool","optional":true,"default":true},"zip_deploy_file":{"type":"string","optional":true,"computed":true}},"block_types":{"auth_settings":{"nesting_mode":3,"block":{"attributes":{"additional_login_parameters":{"type":["map","string"],"optional":true},"allowed_external_redirect_urls":{"type":["list","string"],"optional":true,"computed":true},"default_provider":{"type":"string","optional":true,"computed":true},"enabled":{"type":"bool","required":true},"issuer":{"type":"string","optional":true},"runtime_version":{"type":"string","optional":true,"computed":true},"token_refresh_extension_hours":{"type":"number","optional":true,"default":72},"token_store_enabled":{"type":"bool","optional":true,"default":false},"unauthenticated_client_action":{"type":"string","optional":true,"computed":true}},"block_types":{"active_directory":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"conflicts_with":["auth_settings.0.active_directory.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings.0.active_directory.0.client_secret"]}}},"optional":true},"facebook":{"nesting_mode":3,"block":{"attributes":{"app_id":{"type":"string","required":true},"app_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.facebook.0.app_secret","auth_settings.0.facebook.0.app_secret_setting_name"]},"app_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.facebook.0.app_secret","auth_settings.0.facebook.0.app_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"github":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.github.0.client_secret","auth_settings.0.github.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.github.0.client_secret","auth_settings.0.github.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"google":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.google.0.client_secret","auth_settings.0.google.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.google.0.client_secret","auth_settings.0.google.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"microsoft":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.microsoft.0.client_secret","auth_settings.0.microsoft.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.microsoft.0.client_secret","auth_settings.0.microsoft.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"twitter":{"nesting_mode":3,"block":{"attributes":{"consumer_key":{"type":"string","required":true},"consumer_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.twitter.0.consumer_secret","auth_settings.0.twitter.0.consumer_secret_setting_name"]},"consumer_secret_setting_name":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"auth_settings_v2":{"nesting_mode":3,"block":{"attributes":{"auth_enabled":{"type":"bool","optional":true},"config_file_path":{"type":"string","optional":true},"default_provider":{"type":"string","optional":true},"excluded_paths":{"type":["list","string"],"optional":true},"forward_proxy_convention":{"type":"string","optional":true,"default":"NoProxy"},"forward_proxy_custom_host_header_name":{"type":"string","optional":true},"forward_proxy_custom_scheme_header_name":{"type":"string","optional":true},"http_route_api_prefix":{"type":"string","optional":true,"default":"/.auth"},"require_authentication":{"type":"bool","optional":true},"require_https":{"type":"bool","optional":true,"default":true},"runtime_version":{"type":"string","optional":true,"default":"~1"},"unauthenticated_action":{"type":"string","optional":true,"default":"RedirectToLoginPage"}},"block_types":{"active_directory_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_applications":{"type":["list","string"],"optional":true},"allowed_audiences":{"type":["list","string"],"optional":true},"allowed_groups":{"type":["list","string"],"optional":true},"allowed_identities":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_certificate_thumbprint":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.active_directory_v2.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.active_directory_v2.0.client_secret_certificate_thumbprint"]},"jwt_allowed_client_applications":{"type":["list","string"],"optional":true},"jwt_allowed_groups":{"type":["list","string"],"optional":true},"login_parameters":{"type":["map","string"],"optional":true},"tenant_auth_endpoint":{"type":"string","required":true},"www_authentication_disabled":{"type":"bool","optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"apple_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"computed":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"azure_static_web_app_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"custom_oidc_v2":{"nesting_mode":3,"block":{"attributes":{"authorisation_endpoint":{"type":"string","computed":true},"certification_uri":{"type":"string","computed":true},"client_credential_method":{"type":"string","computed":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","computed":true},"issuer_endpoint":{"type":"string","computed":true},"name":{"type":"string","required":true},"name_claim_type":{"type":"string","optional":true},"openid_configuration_endpoint":{"type":"string","required":true},"scopes":{"type":["list","string"],"optional":true},"token_endpoint":{"type":"string","computed":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"facebook_v2":{"nesting_mode":3,"block":{"attributes":{"app_id":{"type":"string","required":true},"app_secret_setting_name":{"type":"string","required":true},"graph_api_version":{"type":"string","optional":true,"computed":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"github_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"google_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"login":{"nesting_mode":3,"block":{"attributes":{"allowed_external_redirect_urls":{"type":["list","string"],"optional":true},"cookie_expiration_convention":{"type":"string","optional":true,"default":"FixedTime"},"cookie_expiration_time":{"type":"string","optional":true,"default":"08:00:00"},"logout_endpoint":{"type":"string","optional":true},"nonce_expiration_time":{"type":"string","optional":true,"default":"00:05:00"},"preserve_url_fragments_for_logins":{"type":"bool","optional":true,"default":false},"token_refresh_extension_time":{"type":"number","optional":true,"default":72},"token_store_enabled":{"type":"bool","optional":true,"default":false},"token_store_path":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.login.0.token_store_sas_setting_name"]},"token_store_sas_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.login.0.token_store_path"]},"validate_nonce":{"type":"bool","optional":true,"default":true}}},"required":true},"microsoft_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"twitter_v2":{"nesting_mode":3,"block":{"attributes":{"consumer_key":{"type":"string","required":true},"consumer_secret_setting_name":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]}}},"optional":true},"backup":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"storage_account_url":{"type":"string","required":true}},"block_types":{"schedule":{"nesting_mode":3,"block":{"attributes":{"frequency_interval":{"type":"number","required":true},"frequency_unit":{"type":"string","required":true},"keep_at_least_one_backup":{"type":"bool","optional":true,"default":false},"last_execution_time":{"type":"string","computed":true},"retention_period_days":{"type":"number","optional":true,"default":30},"start_time":{"type":"string","optional":true,"computed":true}}},"required":true}}},"optional":true},"connection_string":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"type":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"site_config":{"nesting_mode":3,"block":{"attributes":{"always_on":{"type":"bool","optional":true,"computed":true},"api_definition_url":{"type":"string","optional":true},"api_management_api_id":{"type":"string","optional":true},"app_command_line":{"type":"string","optional":true},"app_scale_limit":{"type":"number","optional":true,"computed":true},"application_insights_connection_string":{"type":"string","optional":true},"application_insights_key":{"type":"string","optional":true},"default_documents":{"type":["list","string"],"optional":true,"computed":true},"detailed_error_logging_enabled":{"type":"bool","computed":true},"elastic_instance_minimum":{"type":"number","optional":true,"computed":true},"ftps_state":{"type":"string","optional":true,"default":"Disabled"},"health_check_eviction_time_in_min":{"type":"number","optional":true,"required_with":["site_config.0.health_check_path"]},"health_check_path":{"type":"string","optional":true,"required_with":["site_config.0.health_check_eviction_time_in_min"]},"http2_enabled":{"type":"bool","optional":true,"default":false},"ip_restriction_default_action":{"type":"string","optional":true,"default":"Allow"},"load_balancing_mode":{"type":"string","optional":true,"default":"LeastRequests"},"managed_pipeline_mode":{"type":"string","optional":true,"default":"Integrated"},"minimum_tls_version":{"type":"string","optional":true,"default":"1.2"},"pre_warmed_instance_count":{"type":"number","optional":true,"computed":true},"remote_debugging_enabled":{"type":"bool","optional":true,"default":false},"remote_debugging_version":{"type":"string","optional":true,"computed":true},"runtime_scale_monitoring_enabled":{"type":"bool","optional":true},"scm_ip_restriction_default_action":{"type":"string","optional":true,"default":"Allow"},"scm_minimum_tls_version":{"type":"string","optional":true,"default":"1.2"},"scm_type":{"type":"string","computed":true},"scm_use_main_ip_restriction":{"type":"bool","optional":true,"default":false},"use_32_bit_worker":{"type":"bool","optional":true,"default":true},"vnet_route_all_enabled":{"type":"bool","optional":true,"default":false},"websockets_enabled":{"type":"bool","optional":true,"default":false},"windows_fx_version":{"type":"string","computed":true},"worker_count":{"type":"number","optional":true,"computed":true}},"block_types":{"app_service_logs":{"nesting_mode":3,"block":{"attributes":{"disk_quota_mb":{"type":"number","optional":true,"default":35},"retention_period_days":{"type":"number","optional":true}}},"optional":true},"application_stack":{"nesting_mode":3,"block":{"attributes":{"dotnet_version":{"type":"string","optional":true,"default":"v4.0","exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.use_custom_runtime"]},"java_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.use_custom_runtime"]},"node_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.use_custom_runtime"]},"powershell_core_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.use_custom_runtime"]},"use_custom_runtime":{"type":"bool","optional":true,"computed":true,"exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.use_custom_runtime"]},"use_dotnet_isolated_runtime":{"type":"bool","optional":true,"computed":true,"conflicts_with":["site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.use_custom_runtime"]}}},"optional":true,"computed":true},"cors":{"nesting_mode":3,"block":{"attributes":{"allowed_origins":{"type":["set","string"],"optional":true},"support_credentials":{"type":"bool","optional":true,"default":false}}},"optional":true},"ip_restriction":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"default":"Allow"},"description":{"type":"string","optional":true},"headers":{"type":["list",["object",{"x_azure_fdid":["list","string"],"x_fd_health_probe":["list","string"],"x_forwarded_for":["list","string"],"x_forwarded_host":["list","string"]}]],"optional":true},"ip_address":{"type":"string","optional":true},"name":{"type":"string","optional":true,"computed":true},"priority":{"type":"number","optional":true,"default":65000},"service_tag":{"type":"string","optional":true},"virtual_network_subnet_id":{"type":"string","optional":true}}},"optional":true},"scm_ip_restriction":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"default":"Allow"},"description":{"type":"string","optional":true},"headers":{"type":["list",["object",{"x_azure_fdid":["list","string"],"x_fd_health_probe":["list","string"],"x_forwarded_for":["list","string"],"x_forwarded_host":["list","string"]}]],"optional":true},"ip_address":{"type":"string","optional":true},"name":{"type":"string","optional":true,"computed":true},"priority":{"type":"number","optional":true,"default":65000},"service_tag":{"type":"string","optional":true},"virtual_network_subnet_id":{"type":"string","optional":true}}},"optional":true}}},"required":true},"sticky_settings":{"nesting_mode":3,"block":{"attributes":{"app_setting_names":{"type":["list","string"],"optional":true,"at_least_one_of":["sticky_settings.0.app_setting_names","sticky_settings.0.connection_string_names"]},"connection_string_names":{"type":["list","string"],"optional":true,"at_least_one_of":["sticky_settings.0.app_setting_names","sticky_settings.0.connection_string_names"]}}},"optional":true},"storage_account":{"nesting_mode":4,"block":{"attributes":{"access_key":{"type":"string","required":true},"account_name":{"type":"string","required":true},"mount_path":{"type":"string","optional":true},"name":{"type":"string","required":true},"share_name":{"type":"string","required":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_windows_function_app_slot":{"block":{"attributes":{"app_settings":{"type":["map","string"],"optional":true},"builtin_logging_enabled":{"type":"bool","optional":true,"default":true},"client_certificate_enabled":{"type":"bool","optional":true,"default":false},"client_certificate_exclusion_paths":{"type":"string","optional":true},"client_certificate_mode":{"type":"string","optional":true,"default":"Optional"},"content_share_force_disabled":{"type":"bool","optional":true,"default":false},"custom_domain_verification_id":{"type":"string","computed":true},"daily_memory_time_quota":{"type":"number","optional":true,"default":0},"default_hostname":{"type":"string","computed":true},"enabled":{"type":"bool","optional":true,"default":true},"ftp_publish_basic_authentication_enabled":{"type":"bool","optional":true,"default":true},"function_app_id":{"type":"string","required":true},"functions_extension_version":{"type":"string","optional":true,"default":"~4"},"hosting_environment_id":{"type":"string","computed":true},"https_only":{"type":"bool","optional":true,"default":false},"key_vault_reference_identity_id":{"type":"string","optional":true,"computed":true},"kind":{"type":"string","computed":true},"name":{"type":"string","required":true},"outbound_ip_address_list":{"type":["list","string"],"computed":true},"outbound_ip_addresses":{"type":"string","computed":true},"possible_outbound_ip_address_list":{"type":["list","string"],"computed":true},"possible_outbound_ip_addresses":{"type":"string","computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"service_plan_id":{"type":"string","optional":true},"site_credential":{"type":["list",["object",{"name":"string","password":"string"}]],"computed":true},"storage_account_access_key":{"type":"string","optional":true,"conflicts_with":["storage_uses_managed_identity","storage_key_vault_secret_id"]},"storage_account_name":{"type":"string","optional":true,"exactly_one_of":["storage_account_name","storage_key_vault_secret_id"]},"storage_key_vault_secret_id":{"type":"string","optional":true,"exactly_one_of":["storage_account_name","storage_key_vault_secret_id"]},"storage_uses_managed_identity":{"type":"bool","optional":true,"default":false,"conflicts_with":["storage_account_access_key","storage_key_vault_secret_id"]},"tags":{"type":["map","string"],"optional":true},"virtual_network_subnet_id":{"type":"string","optional":true},"vnet_image_pull_enabled":{"type":"bool","optional":true,"default":false},"webdeploy_publish_basic_authentication_enabled":{"type":"bool","optional":true,"default":true}},"block_types":{"auth_settings":{"nesting_mode":3,"block":{"attributes":{"additional_login_parameters":{"type":["map","string"],"optional":true},"allowed_external_redirect_urls":{"type":["list","string"],"optional":true,"computed":true},"default_provider":{"type":"string","optional":true,"computed":true},"enabled":{"type":"bool","required":true},"issuer":{"type":"string","optional":true},"runtime_version":{"type":"string","optional":true,"computed":true},"token_refresh_extension_hours":{"type":"number","optional":true,"default":72},"token_store_enabled":{"type":"bool","optional":true,"default":false},"unauthenticated_client_action":{"type":"string","optional":true,"computed":true}},"block_types":{"active_directory":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"conflicts_with":["auth_settings.0.active_directory.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings.0.active_directory.0.client_secret"]}}},"optional":true},"facebook":{"nesting_mode":3,"block":{"attributes":{"app_id":{"type":"string","required":true},"app_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.facebook.0.app_secret","auth_settings.0.facebook.0.app_secret_setting_name"]},"app_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.facebook.0.app_secret","auth_settings.0.facebook.0.app_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"github":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.github.0.client_secret","auth_settings.0.github.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.github.0.client_secret","auth_settings.0.github.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"google":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.google.0.client_secret","auth_settings.0.google.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.google.0.client_secret","auth_settings.0.google.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"microsoft":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.microsoft.0.client_secret","auth_settings.0.microsoft.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.microsoft.0.client_secret","auth_settings.0.microsoft.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"twitter":{"nesting_mode":3,"block":{"attributes":{"consumer_key":{"type":"string","required":true},"consumer_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.twitter.0.consumer_secret","auth_settings.0.twitter.0.consumer_secret_setting_name"]},"consumer_secret_setting_name":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"auth_settings_v2":{"nesting_mode":3,"block":{"attributes":{"auth_enabled":{"type":"bool","optional":true},"config_file_path":{"type":"string","optional":true},"default_provider":{"type":"string","optional":true},"excluded_paths":{"type":["list","string"],"optional":true},"forward_proxy_convention":{"type":"string","optional":true,"default":"NoProxy"},"forward_proxy_custom_host_header_name":{"type":"string","optional":true},"forward_proxy_custom_scheme_header_name":{"type":"string","optional":true},"http_route_api_prefix":{"type":"string","optional":true,"default":"/.auth"},"require_authentication":{"type":"bool","optional":true},"require_https":{"type":"bool","optional":true,"default":true},"runtime_version":{"type":"string","optional":true,"default":"~1"},"unauthenticated_action":{"type":"string","optional":true,"default":"RedirectToLoginPage"}},"block_types":{"active_directory_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_applications":{"type":["list","string"],"optional":true},"allowed_audiences":{"type":["list","string"],"optional":true},"allowed_groups":{"type":["list","string"],"optional":true},"allowed_identities":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_certificate_thumbprint":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.active_directory_v2.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.active_directory_v2.0.client_secret_certificate_thumbprint"]},"jwt_allowed_client_applications":{"type":["list","string"],"optional":true},"jwt_allowed_groups":{"type":["list","string"],"optional":true},"login_parameters":{"type":["map","string"],"optional":true},"tenant_auth_endpoint":{"type":"string","required":true},"www_authentication_disabled":{"type":"bool","optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"apple_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"computed":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"azure_static_web_app_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"custom_oidc_v2":{"nesting_mode":3,"block":{"attributes":{"authorisation_endpoint":{"type":"string","computed":true},"certification_uri":{"type":"string","computed":true},"client_credential_method":{"type":"string","computed":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","computed":true},"issuer_endpoint":{"type":"string","computed":true},"name":{"type":"string","required":true},"name_claim_type":{"type":"string","optional":true},"openid_configuration_endpoint":{"type":"string","required":true},"scopes":{"type":["list","string"],"optional":true},"token_endpoint":{"type":"string","computed":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"facebook_v2":{"nesting_mode":3,"block":{"attributes":{"app_id":{"type":"string","required":true},"app_secret_setting_name":{"type":"string","required":true},"graph_api_version":{"type":"string","optional":true,"computed":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"github_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"google_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"login":{"nesting_mode":3,"block":{"attributes":{"allowed_external_redirect_urls":{"type":["list","string"],"optional":true},"cookie_expiration_convention":{"type":"string","optional":true,"default":"FixedTime"},"cookie_expiration_time":{"type":"string","optional":true,"default":"08:00:00"},"logout_endpoint":{"type":"string","optional":true},"nonce_expiration_time":{"type":"string","optional":true,"default":"00:05:00"},"preserve_url_fragments_for_logins":{"type":"bool","optional":true,"default":false},"token_refresh_extension_time":{"type":"number","optional":true,"default":72},"token_store_enabled":{"type":"bool","optional":true,"default":false},"token_store_path":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.login.0.token_store_sas_setting_name"]},"token_store_sas_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.login.0.token_store_path"]},"validate_nonce":{"type":"bool","optional":true,"default":true}}},"required":true},"microsoft_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"twitter_v2":{"nesting_mode":3,"block":{"attributes":{"consumer_key":{"type":"string","required":true},"consumer_secret_setting_name":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]}}},"optional":true},"backup":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"storage_account_url":{"type":"string","required":true}},"block_types":{"schedule":{"nesting_mode":3,"block":{"attributes":{"frequency_interval":{"type":"number","required":true},"frequency_unit":{"type":"string","required":true},"keep_at_least_one_backup":{"type":"bool","optional":true,"default":false},"last_execution_time":{"type":"string","computed":true},"retention_period_days":{"type":"number","optional":true,"default":30},"start_time":{"type":"string","optional":true,"computed":true}}},"required":true}}},"optional":true},"connection_string":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"type":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"site_config":{"nesting_mode":3,"block":{"attributes":{"always_on":{"type":"bool","optional":true,"computed":true},"api_definition_url":{"type":"string","optional":true},"api_management_api_id":{"type":"string","optional":true},"app_command_line":{"type":"string","optional":true},"app_scale_limit":{"type":"number","optional":true,"computed":true},"application_insights_connection_string":{"type":"string","optional":true},"application_insights_key":{"type":"string","optional":true},"auto_swap_slot_name":{"type":"string","optional":true},"default_documents":{"type":["list","string"],"optional":true,"computed":true},"detailed_error_logging_enabled":{"type":"bool","computed":true},"elastic_instance_minimum":{"type":"number","optional":true,"computed":true},"ftps_state":{"type":"string","optional":true,"default":"Disabled"},"health_check_eviction_time_in_min":{"type":"number","optional":true,"default":0},"health_check_path":{"type":"string","optional":true},"http2_enabled":{"type":"bool","optional":true,"default":false},"ip_restriction_default_action":{"type":"string","optional":true,"default":"Allow"},"load_balancing_mode":{"type":"string","optional":true,"default":"LeastRequests"},"managed_pipeline_mode":{"type":"string","optional":true,"default":"Integrated"},"minimum_tls_version":{"type":"string","optional":true,"default":"1.2"},"pre_warmed_instance_count":{"type":"number","optional":true,"computed":true},"remote_debugging_enabled":{"type":"bool","optional":true,"default":false},"remote_debugging_version":{"type":"string","optional":true,"computed":true},"runtime_scale_monitoring_enabled":{"type":"bool","optional":true},"scm_ip_restriction_default_action":{"type":"string","optional":true,"default":"Allow"},"scm_minimum_tls_version":{"type":"string","optional":true,"default":"1.2"},"scm_type":{"type":"string","computed":true},"scm_use_main_ip_restriction":{"type":"bool","optional":true,"default":false},"use_32_bit_worker":{"type":"bool","optional":true,"default":true},"vnet_route_all_enabled":{"type":"bool","optional":true,"default":false},"websockets_enabled":{"type":"bool","optional":true,"default":false},"windows_fx_version":{"type":"string","computed":true},"worker_count":{"type":"number","optional":true,"computed":true}},"block_types":{"app_service_logs":{"nesting_mode":3,"block":{"attributes":{"disk_quota_mb":{"type":"number","optional":true,"default":35},"retention_period_days":{"type":"number","optional":true}}},"optional":true},"application_stack":{"nesting_mode":3,"block":{"attributes":{"dotnet_version":{"type":"string","optional":true,"default":"v4.0","exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.use_custom_runtime"]},"java_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.use_custom_runtime"]},"node_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.use_custom_runtime"]},"powershell_core_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.use_custom_runtime"]},"use_custom_runtime":{"type":"bool","optional":true,"computed":true,"exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.use_custom_runtime"]},"use_dotnet_isolated_runtime":{"type":"bool","optional":true,"computed":true,"conflicts_with":["site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.use_custom_runtime"]}}},"optional":true,"computed":true},"cors":{"nesting_mode":3,"block":{"attributes":{"allowed_origins":{"type":["set","string"],"optional":true},"support_credentials":{"type":"bool","optional":true,"default":false}}},"optional":true},"ip_restriction":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"default":"Allow"},"description":{"type":"string","optional":true},"headers":{"type":["list",["object",{"x_azure_fdid":["list","string"],"x_fd_health_probe":["list","string"],"x_forwarded_for":["list","string"],"x_forwarded_host":["list","string"]}]],"optional":true},"ip_address":{"type":"string","optional":true},"name":{"type":"string","optional":true,"computed":true},"priority":{"type":"number","optional":true,"default":65000},"service_tag":{"type":"string","optional":true},"virtual_network_subnet_id":{"type":"string","optional":true}}},"optional":true},"scm_ip_restriction":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"default":"Allow"},"description":{"type":"string","optional":true},"headers":{"type":["list",["object",{"x_azure_fdid":["list","string"],"x_fd_health_probe":["list","string"],"x_forwarded_for":["list","string"],"x_forwarded_host":["list","string"]}]],"optional":true},"ip_address":{"type":"string","optional":true},"name":{"type":"string","optional":true,"computed":true},"priority":{"type":"number","optional":true,"default":65000},"service_tag":{"type":"string","optional":true},"virtual_network_subnet_id":{"type":"string","optional":true}}},"optional":true}}},"required":true},"storage_account":{"nesting_mode":4,"block":{"attributes":{"access_key":{"type":"string","required":true},"account_name":{"type":"string","required":true},"mount_path":{"type":"string","optional":true},"name":{"type":"string","required":true},"share_name":{"type":"string","required":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_windows_virtual_machine":{"block":{"attributes":{"admin_password":{"type":"string","required":true},"admin_username":{"type":"string","required":true},"allow_extension_operations":{"type":"bool","optional":true,"default":true},"availability_set_id":{"type":"string","optional":true,"conflicts_with":["capacity_reservation_group_id","virtual_machine_scale_set_id","zone"]},"bypass_platform_safety_checks_on_user_schedule_enabled":{"type":"bool","optional":true,"default":false},"capacity_reservation_group_id":{"type":"string","optional":true,"conflicts_with":["availability_set_id","proximity_placement_group_id"]},"computer_name":{"type":"string","optional":true,"computed":true},"custom_data":{"type":"string","optional":true},"dedicated_host_group_id":{"type":"string","optional":true,"conflicts_with":["dedicated_host_id"]},"dedicated_host_id":{"type":"string","optional":true,"conflicts_with":["dedicated_host_group_id"]},"disk_controller_type":{"type":"string","optional":true,"computed":true},"edge_zone":{"type":"string","optional":true},"enable_automatic_updates":{"type":"bool","optional":true,"default":true},"encryption_at_host_enabled":{"type":"bool","optional":true},"eviction_policy":{"type":"string","optional":true},"extensions_time_budget":{"type":"string","optional":true,"default":"PT1H30M"},"hotpatching_enabled":{"type":"bool","optional":true,"default":false},"license_type":{"type":"string","optional":true},"location":{"type":"string","required":true},"max_bid_price":{"type":"number","optional":true,"default":-1},"name":{"type":"string","required":true},"network_interface_ids":{"type":["list","string"],"required":true},"patch_assessment_mode":{"type":"string","optional":true,"default":"ImageDefault"},"patch_mode":{"type":"string","optional":true,"default":"AutomaticByOS"},"platform_fault_domain":{"type":"number","optional":true,"default":-1,"required_with":["virtual_machine_scale_set_id"]},"priority":{"type":"string","optional":true,"default":"Regular"},"private_ip_address":{"type":"string","computed":true},"private_ip_addresses":{"type":["list","string"],"computed":true},"provision_vm_agent":{"type":"bool","optional":true,"default":true},"proximity_placement_group_id":{"type":"string","optional":true,"conflicts_with":["capacity_reservation_group_id"]},"public_ip_address":{"type":"string","computed":true},"public_ip_addresses":{"type":["list","string"],"computed":true},"reboot_setting":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"secure_boot_enabled":{"type":"bool","optional":true},"size":{"type":"string","required":true},"source_image_id":{"type":"string","optional":true,"exactly_one_of":["source_image_id","source_image_reference"]},"tags":{"type":["map","string"],"optional":true},"timezone":{"type":"string","optional":true},"user_data":{"type":"string","optional":true},"virtual_machine_id":{"type":"string","computed":true},"virtual_machine_scale_set_id":{"type":"string","optional":true,"conflicts_with":["availability_set_id"]},"vm_agent_platform_updates_enabled":{"type":"bool","optional":true,"default":false},"vtpm_enabled":{"type":"bool","optional":true},"zone":{"type":"string","optional":true}},"block_types":{"additional_capabilities":{"nesting_mode":3,"block":{"attributes":{"hibernation_enabled":{"type":"bool","optional":true,"default":false},"ultra_ssd_enabled":{"type":"bool","optional":true,"default":false}}},"optional":true},"additional_unattend_content":{"nesting_mode":3,"block":{"attributes":{"content":{"type":"string","required":true},"setting":{"type":"string","required":true}}},"optional":true},"boot_diagnostics":{"nesting_mode":3,"block":{"attributes":{"storage_account_uri":{"type":"string","optional":true}}},"optional":true},"gallery_application":{"nesting_mode":3,"block":{"attributes":{"automatic_upgrade_enabled":{"type":"bool","optional":true,"default":false},"configuration_blob_uri":{"type":"string","optional":true},"order":{"type":"number","optional":true,"default":0},"tag":{"type":"string","optional":true},"treat_failure_as_deployment_failure_enabled":{"type":"bool","optional":true,"default":false},"version_id":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"os_disk":{"nesting_mode":3,"block":{"attributes":{"caching":{"type":"string","required":true},"disk_encryption_set_id":{"type":"string","optional":true,"conflicts_with":["os_disk.0.secure_vm_disk_encryption_set_id"]},"disk_size_gb":{"type":"number","optional":true,"computed":true},"id":{"type":"string","computed":true},"name":{"type":"string","optional":true,"computed":true},"secure_vm_disk_encryption_set_id":{"type":"string","optional":true,"conflicts_with":["os_disk.0.disk_encryption_set_id"]},"security_encryption_type":{"type":"string","optional":true},"storage_account_type":{"type":"string","required":true},"write_accelerator_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"diff_disk_settings":{"nesting_mode":3,"block":{"attributes":{"option":{"type":"string","required":true},"placement":{"type":"string","optional":true,"default":"CacheDisk"}}},"optional":true}}},"required":true},"os_image_notification":{"nesting_mode":3,"block":{"attributes":{"timeout":{"type":"string","optional":true,"default":"PT15M"}}},"optional":true},"plan":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"product":{"type":"string","required":true},"publisher":{"type":"string","required":true}}},"optional":true},"secret":{"nesting_mode":3,"block":{"attributes":{"key_vault_id":{"type":"string","required":true}},"block_types":{"certificate":{"nesting_mode":4,"block":{"attributes":{"store":{"type":"string","required":true},"url":{"type":"string","required":true}}},"required":true}}},"optional":true},"source_image_reference":{"nesting_mode":3,"block":{"attributes":{"offer":{"type":"string","required":true},"publisher":{"type":"string","required":true},"sku":{"type":"string","required":true},"version":{"type":"string","required":true}}},"optional":true,"exactly_one_of":["source_image_id","source_image_reference"]},"termination_notification":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","required":true},"timeout":{"type":"string","optional":true,"default":"PT5M"}}},"optional":true,"computed":true},"winrm_listener":{"nesting_mode":4,"block":{"attributes":{"certificate_url":{"type":"string","optional":true},"protocol":{"type":"string","required":true}}},"optional":true}}}},"azurerm_windows_virtual_machine_scale_set":{"block":{"attributes":{"admin_password":{"type":"string","required":true},"admin_username":{"type":"string","required":true},"capacity_reservation_group_id":{"type":"string","optional":true,"conflicts_with":["proximity_placement_group_id"]},"computer_name_prefix":{"type":"string","optional":true,"computed":true},"custom_data":{"type":"string","optional":true},"do_not_run_extensions_on_overprovisioned_machines":{"type":"bool","optional":true,"default":false},"edge_zone":{"type":"string","optional":true},"enable_automatic_updates":{"type":"bool","optional":true,"default":true},"encryption_at_host_enabled":{"type":"bool","optional":true},"eviction_policy":{"type":"string","optional":true},"extension_operations_enabled":{"type":"bool","optional":true,"default":true},"extensions_time_budget":{"type":"string","optional":true,"default":"PT1H30M"},"health_probe_id":{"type":"string","optional":true},"host_group_id":{"type":"string","optional":true},"instances":{"type":"number","required":true},"license_type":{"type":"string","optional":true},"location":{"type":"string","required":true},"max_bid_price":{"type":"number","optional":true,"default":-1},"name":{"type":"string","required":true},"overprovision":{"type":"bool","optional":true,"default":true},"platform_fault_domain_count":{"type":"number","optional":true,"computed":true},"priority":{"type":"string","optional":true,"default":"Regular"},"provision_vm_agent":{"type":"bool","optional":true,"default":true},"proximity_placement_group_id":{"type":"string","optional":true,"conflicts_with":["capacity_reservation_group_id"]},"resource_group_name":{"type":"string","required":true},"secure_boot_enabled":{"type":"bool","optional":true},"single_placement_group":{"type":"bool","optional":true,"default":true},"sku":{"type":"string","required":true},"source_image_id":{"type":"string","optional":true,"exactly_one_of":["source_image_id","source_image_reference"]},"tags":{"type":["map","string"],"optional":true},"timezone":{"type":"string","optional":true},"unique_id":{"type":"string","computed":true},"upgrade_mode":{"type":"string","optional":true,"default":"Manual"},"user_data":{"type":"string","optional":true},"vtpm_enabled":{"type":"bool","optional":true},"zone_balance":{"type":"bool","optional":true,"default":false},"zones":{"type":["set","string"],"optional":true}},"block_types":{"additional_capabilities":{"nesting_mode":3,"block":{"attributes":{"ultra_ssd_enabled":{"type":"bool","optional":true,"default":false}}},"optional":true},"additional_unattend_content":{"nesting_mode":3,"block":{"attributes":{"content":{"type":"string","required":true},"setting":{"type":"string","required":true}}},"optional":true},"automatic_instance_repair":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"computed":true},"enabled":{"type":"bool","required":true},"grace_period":{"type":"string","optional":true,"computed":true}}},"optional":true,"computed":true},"automatic_os_upgrade_policy":{"nesting_mode":3,"block":{"attributes":{"disable_automatic_rollback":{"type":"bool","required":true},"enable_automatic_os_upgrade":{"type":"bool","required":true}}},"optional":true},"boot_diagnostics":{"nesting_mode":3,"block":{"attributes":{"storage_account_uri":{"type":"string","optional":true}}},"optional":true},"data_disk":{"nesting_mode":3,"block":{"attributes":{"caching":{"type":"string","required":true},"create_option":{"type":"string","optional":true,"default":"Empty"},"disk_encryption_set_id":{"type":"string","optional":true},"disk_size_gb":{"type":"number","required":true},"lun":{"type":"number","required":true},"name":{"type":"string","optional":true},"storage_account_type":{"type":"string","required":true},"ultra_ssd_disk_iops_read_write":{"type":"number","optional":true,"computed":true},"ultra_ssd_disk_mbps_read_write":{"type":"number","optional":true,"computed":true},"write_accelerator_enabled":{"type":"bool","optional":true,"default":false}}},"optional":true},"extension":{"nesting_mode":4,"block":{"attributes":{"auto_upgrade_minor_version":{"type":"bool","optional":true,"default":true},"automatic_upgrade_enabled":{"type":"bool","optional":true,"default":false},"force_update_tag":{"type":"string","optional":true},"name":{"type":"string","required":true},"protected_settings":{"type":"string","optional":true},"provision_after_extensions":{"type":["list","string"],"optional":true},"publisher":{"type":"string","required":true},"settings":{"type":"string","optional":true},"type":{"type":"string","required":true},"type_handler_version":{"type":"string","required":true}},"block_types":{"protected_settings_from_key_vault":{"nesting_mode":3,"block":{"attributes":{"secret_url":{"type":"string","required":true},"source_vault_id":{"type":"string","required":true}}},"optional":true}}},"optional":true,"computed":true},"gallery_application":{"nesting_mode":3,"block":{"attributes":{"configuration_blob_uri":{"type":"string","optional":true},"order":{"type":"number","optional":true,"default":0},"tag":{"type":"string","optional":true},"version_id":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"network_interface":{"nesting_mode":3,"block":{"attributes":{"dns_servers":{"type":["list","string"],"optional":true},"enable_accelerated_networking":{"type":"bool","optional":true,"default":false},"enable_ip_forwarding":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"network_security_group_id":{"type":"string","optional":true},"primary":{"type":"bool","optional":true,"default":false}},"block_types":{"ip_configuration":{"nesting_mode":3,"block":{"attributes":{"application_gateway_backend_address_pool_ids":{"type":["set","string"],"optional":true},"application_security_group_ids":{"type":["set","string"],"optional":true},"load_balancer_backend_address_pool_ids":{"type":["set","string"],"optional":true},"load_balancer_inbound_nat_rules_ids":{"type":["set","string"],"optional":true},"name":{"type":"string","required":true},"primary":{"type":"bool","optional":true,"default":false},"subnet_id":{"type":"string","optional":true},"version":{"type":"string","optional":true,"default":"IPv4"}},"block_types":{"public_ip_address":{"nesting_mode":3,"block":{"attributes":{"domain_name_label":{"type":"string","optional":true},"idle_timeout_in_minutes":{"type":"number","optional":true,"computed":true},"name":{"type":"string","required":true},"public_ip_prefix_id":{"type":"string","optional":true},"version":{"type":"string","optional":true,"default":"IPv4"}},"block_types":{"ip_tag":{"nesting_mode":3,"block":{"attributes":{"tag":{"type":"string","required":true},"type":{"type":"string","required":true}}},"optional":true}}},"optional":true}}},"required":true}}},"required":true},"os_disk":{"nesting_mode":3,"block":{"attributes":{"caching":{"type":"string","required":true},"disk_encryption_set_id":{"type":"string","optional":true,"conflicts_with":["os_disk.0.secure_vm_disk_encryption_set_id"]},"disk_size_gb":{"type":"number","optional":true,"computed":true},"secure_vm_disk_encryption_set_id":{"type":"string","optional":true,"conflicts_with":["os_disk.0.disk_encryption_set_id"]},"security_encryption_type":{"type":"string","optional":true},"storage_account_type":{"type":"string","required":true},"write_accelerator_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"diff_disk_settings":{"nesting_mode":3,"block":{"attributes":{"option":{"type":"string","required":true},"placement":{"type":"string","optional":true,"default":"CacheDisk"}}},"optional":true}}},"required":true},"plan":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"product":{"type":"string","required":true},"publisher":{"type":"string","required":true}}},"optional":true},"rolling_upgrade_policy":{"nesting_mode":3,"block":{"attributes":{"cross_zone_upgrades_enabled":{"type":"bool","optional":true},"max_batch_instance_percent":{"type":"number","required":true},"max_unhealthy_instance_percent":{"type":"number","required":true},"max_unhealthy_upgraded_instance_percent":{"type":"number","required":true},"maximum_surge_instances_enabled":{"type":"bool","optional":true},"pause_time_between_batches":{"type":"string","required":true},"prioritize_unhealthy_instances_enabled":{"type":"bool","optional":true}}},"optional":true},"scale_in":{"nesting_mode":3,"block":{"attributes":{"force_deletion_enabled":{"type":"bool","optional":true,"default":false},"rule":{"type":"string","optional":true,"default":"Default"}}},"optional":true},"secret":{"nesting_mode":3,"block":{"attributes":{"key_vault_id":{"type":"string","required":true}},"block_types":{"certificate":{"nesting_mode":4,"block":{"attributes":{"store":{"type":"string","required":true},"url":{"type":"string","required":true}}},"required":true}}},"optional":true},"source_image_reference":{"nesting_mode":3,"block":{"attributes":{"offer":{"type":"string","required":true},"publisher":{"type":"string","required":true},"sku":{"type":"string","required":true},"version":{"type":"string","required":true}}},"optional":true,"exactly_one_of":["source_image_id","source_image_reference"]},"spot_restore":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":false},"timeout":{"type":"string","optional":true,"default":"PT1H"}}},"optional":true,"computed":true},"termination_notification":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","required":true},"timeout":{"type":"string","optional":true,"default":"PT5M"}}},"optional":true,"computed":true},"winrm_listener":{"nesting_mode":4,"block":{"attributes":{"certificate_url":{"type":"string","optional":true},"protocol":{"type":"string","required":true}}},"optional":true}}}},"azurerm_windows_web_app":{"block":{"attributes":{"app_settings":{"type":["map","string"],"optional":true},"client_affinity_enabled":{"type":"bool","optional":true,"default":false},"client_certificate_enabled":{"type":"bool","optional":true,"default":false},"client_certificate_exclusion_paths":{"type":"string","optional":true},"client_certificate_mode":{"type":"string","optional":true,"default":"Required"},"custom_domain_verification_id":{"type":"string","computed":true},"default_hostname":{"type":"string","computed":true},"enabled":{"type":"bool","optional":true,"default":true},"ftp_publish_basic_authentication_enabled":{"type":"bool","optional":true,"default":true},"hosting_environment_id":{"type":"string","computed":true},"https_only":{"type":"bool","optional":true,"default":false},"key_vault_reference_identity_id":{"type":"string","optional":true,"computed":true},"kind":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"outbound_ip_address_list":{"type":["list","string"],"computed":true},"outbound_ip_addresses":{"type":"string","computed":true},"possible_outbound_ip_address_list":{"type":["list","string"],"computed":true},"possible_outbound_ip_addresses":{"type":"string","computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"service_plan_id":{"type":"string","required":true},"site_credential":{"type":["list",["object",{"name":"string","password":"string"}]],"computed":true},"tags":{"type":["map","string"],"optional":true},"virtual_network_subnet_id":{"type":"string","optional":true},"webdeploy_publish_basic_authentication_enabled":{"type":"bool","optional":true,"default":true},"zip_deploy_file":{"type":"string","optional":true,"computed":true}},"block_types":{"auth_settings":{"nesting_mode":3,"block":{"attributes":{"additional_login_parameters":{"type":["map","string"],"optional":true},"allowed_external_redirect_urls":{"type":["list","string"],"optional":true,"computed":true},"default_provider":{"type":"string","optional":true,"computed":true},"enabled":{"type":"bool","required":true},"issuer":{"type":"string","optional":true},"runtime_version":{"type":"string","optional":true,"computed":true},"token_refresh_extension_hours":{"type":"number","optional":true,"default":72},"token_store_enabled":{"type":"bool","optional":true,"default":false},"unauthenticated_client_action":{"type":"string","optional":true,"computed":true}},"block_types":{"active_directory":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"conflicts_with":["auth_settings.0.active_directory.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings.0.active_directory.0.client_secret"]}}},"optional":true},"facebook":{"nesting_mode":3,"block":{"attributes":{"app_id":{"type":"string","required":true},"app_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.facebook.0.app_secret","auth_settings.0.facebook.0.app_secret_setting_name"]},"app_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.facebook.0.app_secret","auth_settings.0.facebook.0.app_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"github":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.github.0.client_secret","auth_settings.0.github.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.github.0.client_secret","auth_settings.0.github.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"google":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.google.0.client_secret","auth_settings.0.google.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.google.0.client_secret","auth_settings.0.google.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"microsoft":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.microsoft.0.client_secret","auth_settings.0.microsoft.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.microsoft.0.client_secret","auth_settings.0.microsoft.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"twitter":{"nesting_mode":3,"block":{"attributes":{"consumer_key":{"type":"string","required":true},"consumer_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.twitter.0.consumer_secret","auth_settings.0.twitter.0.consumer_secret_setting_name"]},"consumer_secret_setting_name":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"auth_settings_v2":{"nesting_mode":3,"block":{"attributes":{"auth_enabled":{"type":"bool","optional":true},"config_file_path":{"type":"string","optional":true},"default_provider":{"type":"string","optional":true},"excluded_paths":{"type":["list","string"],"optional":true},"forward_proxy_convention":{"type":"string","optional":true,"default":"NoProxy"},"forward_proxy_custom_host_header_name":{"type":"string","optional":true},"forward_proxy_custom_scheme_header_name":{"type":"string","optional":true},"http_route_api_prefix":{"type":"string","optional":true,"default":"/.auth"},"require_authentication":{"type":"bool","optional":true},"require_https":{"type":"bool","optional":true,"default":true},"runtime_version":{"type":"string","optional":true,"default":"~1"},"unauthenticated_action":{"type":"string","optional":true,"default":"RedirectToLoginPage"}},"block_types":{"active_directory_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_applications":{"type":["list","string"],"optional":true},"allowed_audiences":{"type":["list","string"],"optional":true},"allowed_groups":{"type":["list","string"],"optional":true},"allowed_identities":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_certificate_thumbprint":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.active_directory_v2.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.active_directory_v2.0.client_secret_certificate_thumbprint"]},"jwt_allowed_client_applications":{"type":["list","string"],"optional":true},"jwt_allowed_groups":{"type":["list","string"],"optional":true},"login_parameters":{"type":["map","string"],"optional":true},"tenant_auth_endpoint":{"type":"string","required":true},"www_authentication_disabled":{"type":"bool","optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"apple_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"computed":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"azure_static_web_app_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"custom_oidc_v2":{"nesting_mode":3,"block":{"attributes":{"authorisation_endpoint":{"type":"string","computed":true},"certification_uri":{"type":"string","computed":true},"client_credential_method":{"type":"string","computed":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","computed":true},"issuer_endpoint":{"type":"string","computed":true},"name":{"type":"string","required":true},"name_claim_type":{"type":"string","optional":true},"openid_configuration_endpoint":{"type":"string","required":true},"scopes":{"type":["list","string"],"optional":true},"token_endpoint":{"type":"string","computed":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"facebook_v2":{"nesting_mode":3,"block":{"attributes":{"app_id":{"type":"string","required":true},"app_secret_setting_name":{"type":"string","required":true},"graph_api_version":{"type":"string","optional":true,"computed":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"github_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"google_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"login":{"nesting_mode":3,"block":{"attributes":{"allowed_external_redirect_urls":{"type":["list","string"],"optional":true},"cookie_expiration_convention":{"type":"string","optional":true,"default":"FixedTime"},"cookie_expiration_time":{"type":"string","optional":true,"default":"08:00:00"},"logout_endpoint":{"type":"string","optional":true},"nonce_expiration_time":{"type":"string","optional":true,"default":"00:05:00"},"preserve_url_fragments_for_logins":{"type":"bool","optional":true,"default":false},"token_refresh_extension_time":{"type":"number","optional":true,"default":72},"token_store_enabled":{"type":"bool","optional":true,"default":false},"token_store_path":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.login.0.token_store_sas_setting_name"]},"token_store_sas_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.login.0.token_store_path"]},"validate_nonce":{"type":"bool","optional":true,"default":true}}},"required":true},"microsoft_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"twitter_v2":{"nesting_mode":3,"block":{"attributes":{"consumer_key":{"type":"string","required":true},"consumer_secret_setting_name":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]}}},"optional":true},"backup":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"storage_account_url":{"type":"string","required":true}},"block_types":{"schedule":{"nesting_mode":3,"block":{"attributes":{"frequency_interval":{"type":"number","required":true},"frequency_unit":{"type":"string","required":true},"keep_at_least_one_backup":{"type":"bool","optional":true,"default":false},"last_execution_time":{"type":"string","computed":true},"retention_period_days":{"type":"number","optional":true,"default":30},"start_time":{"type":"string","optional":true,"computed":true}}},"required":true}}},"optional":true},"connection_string":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"type":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"logs":{"nesting_mode":3,"block":{"attributes":{"detailed_error_messages":{"type":"bool","optional":true,"default":false},"failed_request_tracing":{"type":"bool","optional":true,"default":false}},"block_types":{"application_logs":{"nesting_mode":3,"block":{"attributes":{"file_system_level":{"type":"string","required":true}},"block_types":{"azure_blob_storage":{"nesting_mode":3,"block":{"attributes":{"level":{"type":"string","required":true},"retention_in_days":{"type":"number","required":true},"sas_url":{"type":"string","required":true}}},"optional":true}}},"optional":true},"http_logs":{"nesting_mode":3,"block":{"block_types":{"azure_blob_storage":{"nesting_mode":3,"block":{"attributes":{"retention_in_days":{"type":"number","optional":true,"default":0},"sas_url":{"type":"string","required":true}}},"optional":true,"conflicts_with":["logs.0.http_logs.0.file_system"]},"file_system":{"nesting_mode":3,"block":{"attributes":{"retention_in_days":{"type":"number","required":true},"retention_in_mb":{"type":"number","required":true}}},"optional":true,"conflicts_with":["logs.0.http_logs.0.azure_blob_storage"]}}},"optional":true}}},"optional":true},"site_config":{"nesting_mode":3,"block":{"attributes":{"always_on":{"type":"bool","optional":true,"default":true},"api_definition_url":{"type":"string","optional":true},"api_management_api_id":{"type":"string","optional":true},"app_command_line":{"type":"string","optional":true},"container_registry_managed_identity_client_id":{"type":"string","optional":true},"container_registry_use_managed_identity":{"type":"bool","optional":true,"default":false},"default_documents":{"type":["list","string"],"optional":true,"computed":true},"detailed_error_logging_enabled":{"type":"bool","computed":true},"ftps_state":{"type":"string","optional":true,"default":"Disabled"},"health_check_eviction_time_in_min":{"type":"number","optional":true,"required_with":["site_config.0.health_check_path"]},"health_check_path":{"type":"string","optional":true,"required_with":["site_config.0.health_check_eviction_time_in_min"]},"http2_enabled":{"type":"bool","optional":true,"default":false},"ip_restriction_default_action":{"type":"string","optional":true,"default":"Allow"},"linux_fx_version":{"type":"string","computed":true},"load_balancing_mode":{"type":"string","optional":true,"default":"LeastRequests"},"local_mysql_enabled":{"type":"bool","optional":true,"default":false},"managed_pipeline_mode":{"type":"string","optional":true,"default":"Integrated"},"minimum_tls_version":{"type":"string","optional":true,"default":"1.2"},"remote_debugging_enabled":{"type":"bool","optional":true,"default":false},"remote_debugging_version":{"type":"string","optional":true,"computed":true},"scm_ip_restriction_default_action":{"type":"string","optional":true,"default":"Allow"},"scm_minimum_tls_version":{"type":"string","optional":true,"default":"1.2"},"scm_type":{"type":"string","computed":true},"scm_use_main_ip_restriction":{"type":"bool","optional":true,"default":false},"use_32_bit_worker":{"type":"bool","optional":true,"default":true},"vnet_route_all_enabled":{"type":"bool","optional":true,"default":false},"websockets_enabled":{"type":"bool","optional":true,"default":false},"windows_fx_version":{"type":"string","computed":true},"worker_count":{"type":"number","optional":true,"computed":true}},"block_types":{"application_stack":{"nesting_mode":3,"block":{"attributes":{"current_stack":{"type":"string","optional":true,"computed":true},"docker_image_name":{"type":"string","optional":true,"at_least_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.dotnet_core_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python"]},"docker_registry_password":{"type":"string","optional":true},"docker_registry_url":{"type":"string","optional":true,"required_with":["site_config.0.application_stack.0.docker_image_name"]},"docker_registry_username":{"type":"string","optional":true},"dotnet_core_version":{"type":"string","optional":true,"at_least_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.dotnet_core_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python"]},"dotnet_version":{"type":"string","optional":true,"computed":true,"at_least_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.dotnet_core_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python"]},"java_container":{"type":"string","optional":true,"conflicts_with":["site_config.0.application_stack.0.tomcat_version"],"required_with":["site_config.0.application_stack.0.java_container_version"]},"java_container_version":{"type":"string","optional":true,"required_with":["site_config.0.application_stack.0.java_container"]},"java_embedded_server_enabled":{"type":"bool","optional":true,"computed":true,"conflicts_with":["site_config.0.application_stack.0.tomcat_version"],"required_with":["site_config.0.application_stack.0.java_version"]},"java_version":{"type":"string","optional":true,"at_least_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.dotnet_core_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python"]},"node_version":{"type":"string","optional":true,"at_least_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.dotnet_core_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python"]},"php_version":{"type":"string","optional":true,"computed":true,"at_least_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.dotnet_core_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python"]},"python":{"type":"bool","optional":true,"default":false,"at_least_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.dotnet_core_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python"]},"tomcat_version":{"type":"string","optional":true,"conflicts_with":["site_config.0.application_stack.0.java_embedded_server_enabled"],"required_with":["site_config.0.application_stack.0.java_version"]}}},"optional":true,"computed":true},"auto_heal_setting":{"nesting_mode":3,"block":{"block_types":{"action":{"nesting_mode":3,"block":{"attributes":{"action_type":{"type":"string","required":true},"minimum_process_execution_time":{"type":"string","optional":true,"computed":true}},"block_types":{"custom_action":{"nesting_mode":3,"block":{"attributes":{"executable":{"type":"string","required":true},"parameters":{"type":"string","optional":true}}},"optional":true}}},"required":true},"trigger":{"nesting_mode":3,"block":{"attributes":{"private_memory_kb":{"type":"number","optional":true}},"block_types":{"requests":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true},"interval":{"type":"string","required":true}}},"optional":true},"slow_request":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true},"interval":{"type":"string","required":true},"time_taken":{"type":"string","required":true}}},"optional":true},"slow_request_with_path":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true},"interval":{"type":"string","required":true},"path":{"type":"string","optional":true},"time_taken":{"type":"string","required":true}}},"optional":true},"status_code":{"nesting_mode":4,"block":{"attributes":{"count":{"type":"number","required":true},"interval":{"type":"string","required":true},"path":{"type":"string","optional":true},"status_code_range":{"type":"string","required":true},"sub_status":{"type":"number","optional":true},"win32_status_code":{"type":"number","optional":true}}},"optional":true}}},"required":true}}},"optional":true},"cors":{"nesting_mode":3,"block":{"attributes":{"allowed_origins":{"type":["set","string"],"optional":true},"support_credentials":{"type":"bool","optional":true,"default":false}}},"optional":true},"handler_mapping":{"nesting_mode":4,"block":{"attributes":{"arguments":{"type":"string","optional":true},"extension":{"type":"string","required":true},"script_processor_path":{"type":"string","required":true}}},"optional":true},"ip_restriction":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"default":"Allow"},"description":{"type":"string","optional":true},"headers":{"type":["list",["object",{"x_azure_fdid":["list","string"],"x_fd_health_probe":["list","string"],"x_forwarded_for":["list","string"],"x_forwarded_host":["list","string"]}]],"optional":true},"ip_address":{"type":"string","optional":true},"name":{"type":"string","optional":true,"computed":true},"priority":{"type":"number","optional":true,"default":65000},"service_tag":{"type":"string","optional":true},"virtual_network_subnet_id":{"type":"string","optional":true}}},"optional":true},"scm_ip_restriction":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"default":"Allow"},"description":{"type":"string","optional":true},"headers":{"type":["list",["object",{"x_azure_fdid":["list","string"],"x_fd_health_probe":["list","string"],"x_forwarded_for":["list","string"],"x_forwarded_host":["list","string"]}]],"optional":true},"ip_address":{"type":"string","optional":true},"name":{"type":"string","optional":true,"computed":true},"priority":{"type":"number","optional":true,"default":65000},"service_tag":{"type":"string","optional":true},"virtual_network_subnet_id":{"type":"string","optional":true}}},"optional":true},"virtual_application":{"nesting_mode":4,"block":{"attributes":{"physical_path":{"type":"string","required":true},"preload":{"type":"bool","required":true},"virtual_path":{"type":"string","required":true}},"block_types":{"virtual_directory":{"nesting_mode":4,"block":{"attributes":{"physical_path":{"type":"string","optional":true},"virtual_path":{"type":"string","optional":true}}},"optional":true}}},"optional":true}}},"required":true},"sticky_settings":{"nesting_mode":3,"block":{"attributes":{"app_setting_names":{"type":["list","string"],"optional":true,"at_least_one_of":["sticky_settings.0.app_setting_names","sticky_settings.0.connection_string_names"]},"connection_string_names":{"type":["list","string"],"optional":true,"at_least_one_of":["sticky_settings.0.app_setting_names","sticky_settings.0.connection_string_names"]}}},"optional":true},"storage_account":{"nesting_mode":4,"block":{"attributes":{"access_key":{"type":"string","required":true},"account_name":{"type":"string","required":true},"mount_path":{"type":"string","optional":true},"name":{"type":"string","required":true},"share_name":{"type":"string","required":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_windows_web_app_slot":{"block":{"attributes":{"app_service_id":{"type":"string","required":true},"app_settings":{"type":["map","string"],"optional":true},"client_affinity_enabled":{"type":"bool","optional":true,"default":false},"client_certificate_enabled":{"type":"bool","optional":true,"default":false},"client_certificate_exclusion_paths":{"type":"string","optional":true},"client_certificate_mode":{"type":"string","optional":true,"default":"Required"},"custom_domain_verification_id":{"type":"string","computed":true},"default_hostname":{"type":"string","computed":true},"enabled":{"type":"bool","optional":true,"default":true},"ftp_publish_basic_authentication_enabled":{"type":"bool","optional":true,"default":true},"hosting_environment_id":{"type":"string","computed":true},"https_only":{"type":"bool","optional":true,"default":false},"key_vault_reference_identity_id":{"type":"string","optional":true,"computed":true},"kind":{"type":"string","computed":true},"name":{"type":"string","required":true},"outbound_ip_address_list":{"type":["list","string"],"computed":true},"outbound_ip_addresses":{"type":"string","computed":true},"possible_outbound_ip_address_list":{"type":["list","string"],"computed":true},"possible_outbound_ip_addresses":{"type":"string","computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"service_plan_id":{"type":"string","optional":true},"site_credential":{"type":["list",["object",{"name":"string","password":"string"}]],"computed":true},"tags":{"type":["map","string"],"optional":true},"virtual_network_subnet_id":{"type":"string","optional":true},"webdeploy_publish_basic_authentication_enabled":{"type":"bool","optional":true,"default":true},"zip_deploy_file":{"type":"string","optional":true,"computed":true}},"block_types":{"auth_settings":{"nesting_mode":3,"block":{"attributes":{"additional_login_parameters":{"type":["map","string"],"optional":true},"allowed_external_redirect_urls":{"type":["list","string"],"optional":true,"computed":true},"default_provider":{"type":"string","optional":true,"computed":true},"enabled":{"type":"bool","required":true},"issuer":{"type":"string","optional":true},"runtime_version":{"type":"string","optional":true,"computed":true},"token_refresh_extension_hours":{"type":"number","optional":true,"default":72},"token_store_enabled":{"type":"bool","optional":true,"default":false},"unauthenticated_client_action":{"type":"string","optional":true,"computed":true}},"block_types":{"active_directory":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"conflicts_with":["auth_settings.0.active_directory.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings.0.active_directory.0.client_secret"]}}},"optional":true},"facebook":{"nesting_mode":3,"block":{"attributes":{"app_id":{"type":"string","required":true},"app_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.facebook.0.app_secret","auth_settings.0.facebook.0.app_secret_setting_name"]},"app_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.facebook.0.app_secret","auth_settings.0.facebook.0.app_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"github":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.github.0.client_secret","auth_settings.0.github.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.github.0.client_secret","auth_settings.0.github.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"google":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.google.0.client_secret","auth_settings.0.google.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.google.0.client_secret","auth_settings.0.google.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"microsoft":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.microsoft.0.client_secret","auth_settings.0.microsoft.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.microsoft.0.client_secret","auth_settings.0.microsoft.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"twitter":{"nesting_mode":3,"block":{"attributes":{"consumer_key":{"type":"string","required":true},"consumer_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.twitter.0.consumer_secret","auth_settings.0.twitter.0.consumer_secret_setting_name"]},"consumer_secret_setting_name":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"auth_settings_v2":{"nesting_mode":3,"block":{"attributes":{"auth_enabled":{"type":"bool","optional":true},"config_file_path":{"type":"string","optional":true},"default_provider":{"type":"string","optional":true},"excluded_paths":{"type":["list","string"],"optional":true},"forward_proxy_convention":{"type":"string","optional":true,"default":"NoProxy"},"forward_proxy_custom_host_header_name":{"type":"string","optional":true},"forward_proxy_custom_scheme_header_name":{"type":"string","optional":true},"http_route_api_prefix":{"type":"string","optional":true,"default":"/.auth"},"require_authentication":{"type":"bool","optional":true},"require_https":{"type":"bool","optional":true,"default":true},"runtime_version":{"type":"string","optional":true,"default":"~1"},"unauthenticated_action":{"type":"string","optional":true,"default":"RedirectToLoginPage"}},"block_types":{"active_directory_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_applications":{"type":["list","string"],"optional":true},"allowed_audiences":{"type":["list","string"],"optional":true},"allowed_groups":{"type":["list","string"],"optional":true},"allowed_identities":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_certificate_thumbprint":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.active_directory_v2.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.active_directory_v2.0.client_secret_certificate_thumbprint"]},"jwt_allowed_client_applications":{"type":["list","string"],"optional":true},"jwt_allowed_groups":{"type":["list","string"],"optional":true},"login_parameters":{"type":["map","string"],"optional":true},"tenant_auth_endpoint":{"type":"string","required":true},"www_authentication_disabled":{"type":"bool","optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"apple_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"computed":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"azure_static_web_app_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"custom_oidc_v2":{"nesting_mode":3,"block":{"attributes":{"authorisation_endpoint":{"type":"string","computed":true},"certification_uri":{"type":"string","computed":true},"client_credential_method":{"type":"string","computed":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","computed":true},"issuer_endpoint":{"type":"string","computed":true},"name":{"type":"string","required":true},"name_claim_type":{"type":"string","optional":true},"openid_configuration_endpoint":{"type":"string","required":true},"scopes":{"type":["list","string"],"optional":true},"token_endpoint":{"type":"string","computed":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"facebook_v2":{"nesting_mode":3,"block":{"attributes":{"app_id":{"type":"string","required":true},"app_secret_setting_name":{"type":"string","required":true},"graph_api_version":{"type":"string","optional":true,"computed":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"github_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"google_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"login":{"nesting_mode":3,"block":{"attributes":{"allowed_external_redirect_urls":{"type":["list","string"],"optional":true},"cookie_expiration_convention":{"type":"string","optional":true,"default":"FixedTime"},"cookie_expiration_time":{"type":"string","optional":true,"default":"08:00:00"},"logout_endpoint":{"type":"string","optional":true},"nonce_expiration_time":{"type":"string","optional":true,"default":"00:05:00"},"preserve_url_fragments_for_logins":{"type":"bool","optional":true,"default":false},"token_refresh_extension_time":{"type":"number","optional":true,"default":72},"token_store_enabled":{"type":"bool","optional":true,"default":false},"token_store_path":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.login.0.token_store_sas_setting_name"]},"token_store_sas_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.login.0.token_store_path"]},"validate_nonce":{"type":"bool","optional":true,"default":true}}},"required":true},"microsoft_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"twitter_v2":{"nesting_mode":3,"block":{"attributes":{"consumer_key":{"type":"string","required":true},"consumer_secret_setting_name":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]}}},"optional":true},"backup":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"storage_account_url":{"type":"string","required":true}},"block_types":{"schedule":{"nesting_mode":3,"block":{"attributes":{"frequency_interval":{"type":"number","required":true},"frequency_unit":{"type":"string","required":true},"keep_at_least_one_backup":{"type":"bool","optional":true,"default":false},"last_execution_time":{"type":"string","computed":true},"retention_period_days":{"type":"number","optional":true,"default":30},"start_time":{"type":"string","optional":true,"computed":true}}},"required":true}}},"optional":true},"connection_string":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"type":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"logs":{"nesting_mode":3,"block":{"attributes":{"detailed_error_messages":{"type":"bool","optional":true,"default":false},"failed_request_tracing":{"type":"bool","optional":true,"default":false}},"block_types":{"application_logs":{"nesting_mode":3,"block":{"attributes":{"file_system_level":{"type":"string","required":true}},"block_types":{"azure_blob_storage":{"nesting_mode":3,"block":{"attributes":{"level":{"type":"string","required":true},"retention_in_days":{"type":"number","required":true},"sas_url":{"type":"string","required":true}}},"optional":true}}},"optional":true},"http_logs":{"nesting_mode":3,"block":{"block_types":{"azure_blob_storage":{"nesting_mode":3,"block":{"attributes":{"retention_in_days":{"type":"number","optional":true,"default":0},"sas_url":{"type":"string","required":true}}},"optional":true,"conflicts_with":["logs.0.http_logs.0.file_system"]},"file_system":{"nesting_mode":3,"block":{"attributes":{"retention_in_days":{"type":"number","required":true},"retention_in_mb":{"type":"number","required":true}}},"optional":true,"conflicts_with":["logs.0.http_logs.0.azure_blob_storage"]}}},"optional":true}}},"optional":true},"site_config":{"nesting_mode":3,"block":{"attributes":{"always_on":{"type":"bool","optional":true,"default":true},"api_definition_url":{"type":"string","optional":true},"api_management_api_id":{"type":"string","optional":true},"app_command_line":{"type":"string","optional":true},"auto_swap_slot_name":{"type":"string","optional":true},"container_registry_managed_identity_client_id":{"type":"string","optional":true},"container_registry_use_managed_identity":{"type":"bool","optional":true,"default":false},"default_documents":{"type":["list","string"],"optional":true,"computed":true},"detailed_error_logging_enabled":{"type":"bool","computed":true},"ftps_state":{"type":"string","optional":true,"default":"Disabled"},"health_check_eviction_time_in_min":{"type":"number","optional":true,"required_with":["site_config.0.health_check_path"]},"health_check_path":{"type":"string","optional":true,"required_with":["site_config.0.health_check_eviction_time_in_min"]},"http2_enabled":{"type":"bool","optional":true,"default":false},"ip_restriction_default_action":{"type":"string","optional":true,"default":"Allow"},"load_balancing_mode":{"type":"string","optional":true,"default":"LeastRequests"},"local_mysql_enabled":{"type":"bool","optional":true,"default":false},"managed_pipeline_mode":{"type":"string","optional":true,"default":"Integrated"},"minimum_tls_version":{"type":"string","optional":true,"default":"1.2"},"remote_debugging_enabled":{"type":"bool","optional":true,"default":false},"remote_debugging_version":{"type":"string","optional":true,"computed":true},"scm_ip_restriction_default_action":{"type":"string","optional":true,"default":"Allow"},"scm_minimum_tls_version":{"type":"string","optional":true,"default":"1.2"},"scm_type":{"type":"string","computed":true},"scm_use_main_ip_restriction":{"type":"bool","optional":true,"default":false},"use_32_bit_worker":{"type":"bool","optional":true,"computed":true},"vnet_route_all_enabled":{"type":"bool","optional":true,"default":false},"websockets_enabled":{"type":"bool","optional":true,"default":false},"windows_fx_version":{"type":"string","computed":true},"worker_count":{"type":"number","optional":true,"computed":true}},"block_types":{"application_stack":{"nesting_mode":3,"block":{"attributes":{"current_stack":{"type":"string","optional":true,"computed":true},"docker_image_name":{"type":"string","optional":true,"at_least_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.dotnet_core_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python"]},"docker_registry_password":{"type":"string","optional":true},"docker_registry_url":{"type":"string","optional":true,"required_with":["site_config.0.application_stack.0.docker_image_name"]},"docker_registry_username":{"type":"string","optional":true},"dotnet_core_version":{"type":"string","optional":true,"at_least_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.dotnet_core_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python"]},"dotnet_version":{"type":"string","optional":true,"computed":true,"at_least_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.dotnet_core_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python"]},"java_container":{"type":"string","optional":true,"conflicts_with":["site_config.0.application_stack.0.tomcat_version"],"required_with":["site_config.0.application_stack.0.java_container_version"]},"java_container_version":{"type":"string","optional":true,"required_with":["site_config.0.application_stack.0.java_container"]},"java_embedded_server_enabled":{"type":"bool","optional":true,"computed":true,"conflicts_with":["site_config.0.application_stack.0.tomcat_version"],"required_with":["site_config.0.application_stack.0.java_version"]},"java_version":{"type":"string","optional":true,"at_least_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.dotnet_core_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python"]},"node_version":{"type":"string","optional":true,"at_least_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.dotnet_core_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python"]},"php_version":{"type":"string","optional":true,"computed":true,"at_least_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.dotnet_core_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python"]},"python":{"type":"bool","optional":true,"default":false,"at_least_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.dotnet_core_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python"]},"tomcat_version":{"type":"string","optional":true,"conflicts_with":["site_config.0.application_stack.0.java_embedded_server_enabled"],"required_with":["site_config.0.application_stack.0.java_version"]}}},"optional":true,"computed":true},"auto_heal_setting":{"nesting_mode":3,"block":{"block_types":{"action":{"nesting_mode":3,"block":{"attributes":{"action_type":{"type":"string","required":true},"minimum_process_execution_time":{"type":"string","optional":true,"computed":true}},"block_types":{"custom_action":{"nesting_mode":3,"block":{"attributes":{"executable":{"type":"string","required":true},"parameters":{"type":"string","optional":true}}},"optional":true}}},"required":true},"trigger":{"nesting_mode":3,"block":{"attributes":{"private_memory_kb":{"type":"number","optional":true}},"block_types":{"requests":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true},"interval":{"type":"string","required":true}}},"optional":true},"slow_request":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true},"interval":{"type":"string","required":true},"time_taken":{"type":"string","required":true}}},"optional":true},"slow_request_with_path":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true},"interval":{"type":"string","required":true},"path":{"type":"string","optional":true},"time_taken":{"type":"string","required":true}}},"optional":true},"status_code":{"nesting_mode":4,"block":{"attributes":{"count":{"type":"number","required":true},"interval":{"type":"string","required":true},"path":{"type":"string","optional":true},"status_code_range":{"type":"string","required":true},"sub_status":{"type":"number","optional":true},"win32_status_code":{"type":"number","optional":true}}},"optional":true}}},"required":true}}},"optional":true},"cors":{"nesting_mode":3,"block":{"attributes":{"allowed_origins":{"type":["set","string"],"optional":true},"support_credentials":{"type":"bool","optional":true,"default":false}}},"optional":true},"handler_mapping":{"nesting_mode":4,"block":{"attributes":{"arguments":{"type":"string","optional":true},"extension":{"type":"string","required":true},"script_processor_path":{"type":"string","required":true}}},"optional":true},"ip_restriction":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"default":"Allow"},"description":{"type":"string","optional":true},"headers":{"type":["list",["object",{"x_azure_fdid":["list","string"],"x_fd_health_probe":["list","string"],"x_forwarded_for":["list","string"],"x_forwarded_host":["list","string"]}]],"optional":true},"ip_address":{"type":"string","optional":true},"name":{"type":"string","optional":true,"computed":true},"priority":{"type":"number","optional":true,"default":65000},"service_tag":{"type":"string","optional":true},"virtual_network_subnet_id":{"type":"string","optional":true}}},"optional":true},"scm_ip_restriction":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"default":"Allow"},"description":{"type":"string","optional":true},"headers":{"type":["list",["object",{"x_azure_fdid":["list","string"],"x_fd_health_probe":["list","string"],"x_forwarded_for":["list","string"],"x_forwarded_host":["list","string"]}]],"optional":true},"ip_address":{"type":"string","optional":true},"name":{"type":"string","optional":true,"computed":true},"priority":{"type":"number","optional":true,"default":65000},"service_tag":{"type":"string","optional":true},"virtual_network_subnet_id":{"type":"string","optional":true}}},"optional":true},"virtual_application":{"nesting_mode":4,"block":{"attributes":{"physical_path":{"type":"string","required":true},"preload":{"type":"bool","required":true},"virtual_path":{"type":"string","required":true}},"block_types":{"virtual_directory":{"nesting_mode":4,"block":{"attributes":{"physical_path":{"type":"string","optional":true},"virtual_path":{"type":"string","optional":true}}},"optional":true}}},"optional":true}}},"required":true},"storage_account":{"nesting_mode":4,"block":{"attributes":{"access_key":{"type":"string","required":true},"account_name":{"type":"string","required":true},"mount_path":{"type":"string","optional":true},"name":{"type":"string","required":true},"share_name":{"type":"string","required":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_workloads_sap_discovery_virtual_instance":{"block":{"attributes":{"central_server_virtual_machine_id":{"type":"string","required":true},"environment":{"type":"string","required":true},"location":{"type":"string","required":true},"managed_resource_group_name":{"type":"string","optional":true},"managed_storage_account_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"sap_product":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"required":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_workloads_sap_single_node_virtual_instance":{"block":{"attributes":{"app_location":{"type":"string","required":true},"environment":{"type":"string","required":true},"location":{"type":"string","required":true},"managed_resource_group_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"sap_fqdn":{"type":"string","required":true},"sap_product":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"required":true},"type":{"type":"string","required":true}}},"optional":true},"single_server_configuration":{"nesting_mode":3,"block":{"attributes":{"app_resource_group_name":{"type":"string","required":true},"database_type":{"type":"string","optional":true},"secondary_ip_enabled":{"type":"bool","optional":true,"default":false},"subnet_id":{"type":"string","required":true}},"block_types":{"disk_volume_configuration":{"nesting_mode":4,"block":{"attributes":{"number_of_disks":{"type":"number","required":true},"size_in_gb":{"type":"number","required":true},"sku_name":{"type":"string","required":true},"volume_name":{"type":"string","required":true}}},"optional":true},"virtual_machine_configuration":{"nesting_mode":3,"block":{"attributes":{"virtual_machine_size":{"type":"string","required":true}},"block_types":{"image":{"nesting_mode":3,"block":{"attributes":{"offer":{"type":"string","required":true},"publisher":{"type":"string","required":true},"sku":{"type":"string","required":true},"version":{"type":"string","required":true}}},"required":true},"os_profile":{"nesting_mode":3,"block":{"attributes":{"admin_username":{"type":"string","required":true},"ssh_private_key":{"type":"string","required":true},"ssh_public_key":{"type":"string","required":true}}},"required":true}}},"required":true},"virtual_machine_resource_names":{"nesting_mode":3,"block":{"attributes":{"host_name":{"type":"string","optional":true,"at_least_one_of":["single_server_configuration.0.virtual_machine_resource_names.0.data_disk","single_server_configuration.0.virtual_machine_resource_names.0.host_name","single_server_configuration.0.virtual_machine_resource_names.0.network_interface_names","single_server_configuration.0.virtual_machine_resource_names.0.os_disk_name","single_server_configuration.0.virtual_machine_resource_names.0.virtual_machine_name"]},"network_interface_names":{"type":["list","string"],"optional":true,"at_least_one_of":["single_server_configuration.0.virtual_machine_resource_names.0.data_disk","single_server_configuration.0.virtual_machine_resource_names.0.host_name","single_server_configuration.0.virtual_machine_resource_names.0.network_interface_names","single_server_configuration.0.virtual_machine_resource_names.0.os_disk_name","single_server_configuration.0.virtual_machine_resource_names.0.virtual_machine_name"]},"os_disk_name":{"type":"string","optional":true,"at_least_one_of":["single_server_configuration.0.virtual_machine_resource_names.0.data_disk","single_server_configuration.0.virtual_machine_resource_names.0.host_name","single_server_configuration.0.virtual_machine_resource_names.0.network_interface_names","single_server_configuration.0.virtual_machine_resource_names.0.os_disk_name","single_server_configuration.0.virtual_machine_resource_names.0.virtual_machine_name"]},"virtual_machine_name":{"type":"string","optional":true,"at_least_one_of":["single_server_configuration.0.virtual_machine_resource_names.0.data_disk","single_server_configuration.0.virtual_machine_resource_names.0.host_name","single_server_configuration.0.virtual_machine_resource_names.0.network_interface_names","single_server_configuration.0.virtual_machine_resource_names.0.os_disk_name","single_server_configuration.0.virtual_machine_resource_names.0.virtual_machine_name"]}},"block_types":{"data_disk":{"nesting_mode":4,"block":{"attributes":{"names":{"type":["list","string"],"required":true},"volume_name":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["single_server_configuration.0.virtual_machine_resource_names.0.data_disk","single_server_configuration.0.virtual_machine_resource_names.0.host_name","single_server_configuration.0.virtual_machine_resource_names.0.network_interface_names","single_server_configuration.0.virtual_machine_resource_names.0.os_disk_name","single_server_configuration.0.virtual_machine_resource_names.0.virtual_machine_name"]}}},"optional":true}}},"required":true}}}},"azurerm_workloads_sap_three_tier_virtual_instance":{"block":{"attributes":{"app_location":{"type":"string","required":true},"environment":{"type":"string","required":true},"location":{"type":"string","required":true},"managed_resource_group_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"sap_fqdn":{"type":"string","required":true},"sap_product":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"required":true},"type":{"type":"string","required":true}}},"optional":true},"three_tier_configuration":{"nesting_mode":3,"block":{"attributes":{"app_resource_group_name":{"type":"string","required":true},"high_availability_type":{"type":"string","optional":true},"secondary_ip_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"application_server_configuration":{"nesting_mode":3,"block":{"attributes":{"instance_count":{"type":"number","required":true},"subnet_id":{"type":"string","required":true}},"block_types":{"virtual_machine_configuration":{"nesting_mode":3,"block":{"attributes":{"virtual_machine_size":{"type":"string","required":true}},"block_types":{"image":{"nesting_mode":3,"block":{"attributes":{"offer":{"type":"string","required":true},"publisher":{"type":"string","required":true},"sku":{"type":"string","required":true},"version":{"type":"string","required":true}}},"required":true},"os_profile":{"nesting_mode":3,"block":{"attributes":{"admin_username":{"type":"string","required":true},"ssh_private_key":{"type":"string","required":true},"ssh_public_key":{"type":"string","required":true}}},"required":true}}},"required":true}}},"required":true},"central_server_configuration":{"nesting_mode":3,"block":{"attributes":{"instance_count":{"type":"number","required":true},"subnet_id":{"type":"string","required":true}},"block_types":{"virtual_machine_configuration":{"nesting_mode":3,"block":{"attributes":{"virtual_machine_size":{"type":"string","required":true}},"block_types":{"image":{"nesting_mode":3,"block":{"attributes":{"offer":{"type":"string","required":true},"publisher":{"type":"string","required":true},"sku":{"type":"string","required":true},"version":{"type":"string","required":true}}},"required":true},"os_profile":{"nesting_mode":3,"block":{"attributes":{"admin_username":{"type":"string","required":true},"ssh_private_key":{"type":"string","required":true},"ssh_public_key":{"type":"string","required":true}}},"required":true}}},"required":true}}},"required":true},"database_server_configuration":{"nesting_mode":3,"block":{"attributes":{"database_type":{"type":"string","optional":true},"instance_count":{"type":"number","required":true},"subnet_id":{"type":"string","required":true}},"block_types":{"disk_volume_configuration":{"nesting_mode":4,"block":{"attributes":{"number_of_disks":{"type":"number","required":true},"size_in_gb":{"type":"number","required":true},"sku_name":{"type":"string","required":true},"volume_name":{"type":"string","required":true}}},"optional":true},"virtual_machine_configuration":{"nesting_mode":3,"block":{"attributes":{"virtual_machine_size":{"type":"string","required":true}},"block_types":{"image":{"nesting_mode":3,"block":{"attributes":{"offer":{"type":"string","required":true},"publisher":{"type":"string","required":true},"sku":{"type":"string","required":true},"version":{"type":"string","required":true}}},"required":true},"os_profile":{"nesting_mode":3,"block":{"attributes":{"admin_username":{"type":"string","required":true},"ssh_private_key":{"type":"string","required":true},"ssh_public_key":{"type":"string","required":true}}},"required":true}}},"required":true}}},"required":true},"resource_names":{"nesting_mode":3,"block":{"block_types":{"application_server":{"nesting_mode":3,"block":{"attributes":{"availability_set_name":{"type":"string","optional":true}},"block_types":{"virtual_machine":{"nesting_mode":3,"block":{"attributes":{"host_name":{"type":"string","optional":true},"network_interface_names":{"type":["list","string"],"optional":true},"os_disk_name":{"type":"string","optional":true},"virtual_machine_name":{"type":"string","optional":true}},"block_types":{"data_disk":{"nesting_mode":4,"block":{"attributes":{"names":{"type":["list","string"],"required":true},"volume_name":{"type":"string","required":true}}},"optional":true}}},"optional":true}}},"optional":true},"central_server":{"nesting_mode":3,"block":{"attributes":{"availability_set_name":{"type":"string","optional":true}},"block_types":{"load_balancer":{"nesting_mode":3,"block":{"attributes":{"backend_pool_names":{"type":["list","string"],"optional":true},"frontend_ip_configuration_names":{"type":["list","string"],"optional":true},"health_probe_names":{"type":["list","string"],"optional":true},"name":{"type":"string","optional":true}}},"optional":true},"virtual_machine":{"nesting_mode":3,"block":{"attributes":{"host_name":{"type":"string","optional":true},"network_interface_names":{"type":["list","string"],"optional":true},"os_disk_name":{"type":"string","optional":true},"virtual_machine_name":{"type":"string","optional":true}},"block_types":{"data_disk":{"nesting_mode":4,"block":{"attributes":{"names":{"type":["list","string"],"required":true},"volume_name":{"type":"string","required":true}}},"optional":true}}},"optional":true}}},"optional":true},"database_server":{"nesting_mode":3,"block":{"attributes":{"availability_set_name":{"type":"string","optional":true}},"block_types":{"load_balancer":{"nesting_mode":3,"block":{"attributes":{"backend_pool_names":{"type":["list","string"],"optional":true},"frontend_ip_configuration_names":{"type":["list","string"],"optional":true},"health_probe_names":{"type":["list","string"],"optional":true},"name":{"type":"string","optional":true}}},"optional":true},"virtual_machine":{"nesting_mode":3,"block":{"attributes":{"host_name":{"type":"string","optional":true},"network_interface_names":{"type":["list","string"],"optional":true},"os_disk_name":{"type":"string","optional":true},"virtual_machine_name":{"type":"string","optional":true}},"block_types":{"data_disk":{"nesting_mode":4,"block":{"attributes":{"names":{"type":["list","string"],"required":true},"volume_name":{"type":"string","required":true}}},"optional":true}}},"optional":true}}},"optional":true},"shared_storage":{"nesting_mode":3,"block":{"attributes":{"account_name":{"type":"string","optional":true},"private_endpoint_name":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"transport_create_and_mount":{"nesting_mode":3,"block":{"attributes":{"resource_group_id":{"type":"string","optional":true},"storage_account_name":{"type":"string","optional":true}}},"optional":true}}},"required":true}}}}}}`) if err := json.Unmarshal(b, &ProviderSchemaInfo); err != nil { fmt.Fprintf(os.Stderr, "unmarshalling the provider schema: %s", err) os.Exit(1) diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/CHANGELOG.md index d13f2e0b3..cf422304e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/CHANGELOG.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/CHANGELOG.md @@ -1,5 +1,37 @@ # Release History +## 1.17.0 (2025-01-07) + +### Features Added + +* Added field `OperationLocationResultPath` to `runtime.NewPollerOptions[T]` for LROs that use the `Operation-Location` pattern. +* Support `encoding.TextMarshaler` and `encoding.TextUnmarshaler` interfaces in `arm.ResourceID`. + +## 1.16.0 (2024-10-17) + +### Features Added + +* Added field `Kind` to `runtime.StartSpanOptions` to allow a kind to be set when starting a span. + +### Bugs Fixed + +* `BearerTokenPolicy` now rewinds request bodies before retrying + +## 1.15.0 (2024-10-14) + +### Features Added + +* `BearerTokenPolicy` handles CAE claims challenges + +### Bugs Fixed + +* Omit the `ResponseError.RawResponse` field from JSON marshaling so instances can be marshaled. +* Fixed an integer overflow in the retry policy. + +### Other Changes + +* Update dependencies. + ## 1.14.0 (2024-08-07) ### Features Added diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/internal/resource/resource_identifier.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/internal/resource/resource_identifier.go index 00f2d5a0a..d9a4e36dc 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/internal/resource/resource_identifier.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/internal/resource/resource_identifier.go @@ -110,6 +110,21 @@ func (id *ResourceID) String() string { return id.stringValue } +// MarshalText returns a textual representation of the ResourceID +func (id *ResourceID) MarshalText() ([]byte, error) { + return []byte(id.String()), nil +} + +// UnmarshalText decodes the textual representation of a ResourceID +func (id *ResourceID) UnmarshalText(text []byte) error { + newId, err := ParseResourceID(string(text)) + if err != nil { + return err + } + *id = *newId + return nil +} + func newResourceID(parent *ResourceID, resourceTypeName string, resourceName string) *ResourceID { id := &ResourceID{} id.init(parent, chooseResourceType(resourceTypeName, parent), resourceName, true) diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime/policy_bearer_token.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime/policy_bearer_token.go index 765fbc684..8ad3d5400 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime/policy_bearer_token.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime/policy_bearer_token.go @@ -5,7 +5,6 @@ package runtime import ( "context" - "encoding/base64" "fmt" "net/http" "strings" @@ -66,31 +65,16 @@ func NewBearerTokenPolicy(cred azcore.TokenCredential, opts *armpolicy.BearerTok p.btp = azruntime.NewBearerTokenPolicy(cred, opts.Scopes, &azpolicy.BearerTokenOptions{ InsecureAllowCredentialWithHTTP: opts.InsecureAllowCredentialWithHTTP, AuthorizationHandler: azpolicy.AuthorizationHandler{ - OnChallenge: p.onChallenge, - OnRequest: p.onRequest, + OnRequest: p.onRequest, }, }) return p } -func (b *BearerTokenPolicy) onChallenge(req *azpolicy.Request, res *http.Response, authNZ func(azpolicy.TokenRequestOptions) error) error { - challenge := res.Header.Get(shared.HeaderWWWAuthenticate) - claims, err := parseChallenge(challenge) - if err != nil { - // the challenge contains claims we can't parse - return err - } else if claims != "" { - // request a new token having the specified claims, send the request again - return authNZ(azpolicy.TokenRequestOptions{Claims: claims, EnableCAE: true, Scopes: b.scopes}) - } - // auth challenge didn't include claims, so this is a simple authorization failure - return azruntime.NewResponseError(res) -} - // onRequest authorizes requests with one or more bearer tokens func (b *BearerTokenPolicy) onRequest(req *azpolicy.Request, authNZ func(azpolicy.TokenRequestOptions) error) error { // authorize the request with a token for the primary tenant - err := authNZ(azpolicy.TokenRequestOptions{EnableCAE: true, Scopes: b.scopes}) + err := authNZ(azpolicy.TokenRequestOptions{Scopes: b.scopes}) if err != nil || len(b.auxResources) == 0 { return err } @@ -116,31 +100,3 @@ func (b *BearerTokenPolicy) onRequest(req *azpolicy.Request, authNZ func(azpolic func (b *BearerTokenPolicy) Do(req *azpolicy.Request) (*http.Response, error) { return b.btp.Do(req) } - -// parseChallenge parses claims from an authentication challenge issued by ARM so a client can request a token -// that will satisfy conditional access policies. It returns a non-nil error when the given value contains -// claims it can't parse. If the value contains no claims, it returns an empty string and a nil error. -func parseChallenge(wwwAuthenticate string) (string, error) { - claims := "" - var err error - for _, param := range strings.Split(wwwAuthenticate, ",") { - if _, after, found := strings.Cut(param, "claims="); found { - if claims != "" { - // The header contains multiple challenges, at least two of which specify claims. The specs allow this - // but it's unclear what a client should do in this case and there's as yet no concrete example of it. - err = fmt.Errorf("found multiple claims challenges in %q", wwwAuthenticate) - break - } - // trim stuff that would get an error from RawURLEncoding; claims may or may not be padded - claims = strings.Trim(after, `\"=`) - // we don't return this error because it's something unhelpful like "illegal base64 data at input byte 42" - if b, decErr := base64.RawURLEncoding.DecodeString(claims); decErr == nil { - claims = string(b) - } else { - err = fmt.Errorf("failed to parse claims from %q", wwwAuthenticate) - break - } - } - } - return claims, err -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/errors.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/errors.go index 17bd50c67..03cb227d0 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/errors.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/errors.go @@ -11,4 +11,7 @@ import "github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/exported" // ResponseError is returned when a request is made to a service and // the service returns a non-success HTTP status code. // Use errors.As() to access this type in the error chain. +// +// When marshaling instances, the RawResponse field will be omitted. +// However, the contents returned by Error() will be preserved. type ResponseError = exported.ResponseError diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/exported/response_error.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/exported/response_error.go index 08a954587..8aec256bd 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/exported/response_error.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/exported/response_error.go @@ -117,12 +117,18 @@ type ResponseError struct { StatusCode int // RawResponse is the underlying HTTP response. - RawResponse *http.Response + RawResponse *http.Response `json:"-"` + + errMsg string } // Error implements the error interface for type ResponseError. // Note that the message contents are not contractual and can change over time. func (e *ResponseError) Error() string { + if e.errMsg != "" { + return e.errMsg + } + const separator = "--------------------------------------------------------------------------------" // write the request method and URL with response status code msg := &bytes.Buffer{} @@ -163,5 +169,33 @@ func (e *ResponseError) Error() string { } fmt.Fprintln(msg, separator) - return msg.String() + e.errMsg = msg.String() + return e.errMsg +} + +// internal type used for marshaling/unmarshaling +type responseError struct { + ErrorCode string `json:"errorCode"` + StatusCode int `json:"statusCode"` + ErrorMessage string `json:"errorMessage"` +} + +func (e ResponseError) MarshalJSON() ([]byte, error) { + return json.Marshal(responseError{ + ErrorCode: e.ErrorCode, + StatusCode: e.StatusCode, + ErrorMessage: e.Error(), + }) +} + +func (e *ResponseError) UnmarshalJSON(data []byte) error { + re := responseError{} + if err := json.Unmarshal(data, &re); err != nil { + return err + } + + e.ErrorCode = re.ErrorCode + e.StatusCode = re.StatusCode + e.errMsg = re.ErrorMessage + return nil } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/pollers/op/op.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/pollers/op/op.go index 03699fd76..f49633189 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/pollers/op/op.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/pollers/op/op.go @@ -40,12 +40,13 @@ type Poller[T any] struct { OrigURL string `json:"origURL"` Method string `json:"method"` FinalState pollers.FinalStateVia `json:"finalState"` + ResultPath string `json:"resultPath"` CurState string `json:"state"` } // New creates a new Poller from the provided initial response. // Pass nil for response to create an empty Poller for rehydration. -func New[T any](pl exported.Pipeline, resp *http.Response, finalState pollers.FinalStateVia) (*Poller[T], error) { +func New[T any](pl exported.Pipeline, resp *http.Response, finalState pollers.FinalStateVia, resultPath string) (*Poller[T], error) { if resp == nil { log.Write(log.EventLRO, "Resuming Operation-Location poller.") return &Poller[T]{pl: pl}, nil @@ -82,6 +83,7 @@ func New[T any](pl exported.Pipeline, resp *http.Response, finalState pollers.Fi OrigURL: resp.Request.URL.String(), Method: resp.Request.Method, FinalState: finalState, + ResultPath: resultPath, CurState: curState, }, nil } @@ -116,10 +118,6 @@ func (p *Poller[T]) Result(ctx context.Context, out *T) error { var req *exported.Request var err error - // when the payload is included with the status monitor on - // terminal success it's in the "result" JSON property - payloadPath := "result" - if p.FinalState == pollers.FinalStateViaLocation && p.LocURL != "" { req, err = exported.NewRequest(ctx, http.MethodGet, p.LocURL) } else if rl, rlErr := poller.GetResourceLocation(p.resp); rlErr != nil && !errors.Is(rlErr, poller.ErrNoBody) { @@ -138,7 +136,7 @@ func (p *Poller[T]) Result(ctx context.Context, out *T) error { // if a final GET request has been created, execute it if req != nil { // no JSON path when making a final GET request - payloadPath = "" + p.ResultPath = "" resp, err := p.pl.Do(req) if err != nil { return err @@ -146,5 +144,5 @@ func (p *Poller[T]) Result(ctx context.Context, out *T) error { p.resp = resp } - return pollers.ResultHelper(p.resp, poller.Failed(p.CurState), payloadPath, out) + return pollers.ResultHelper(p.resp, poller.Failed(p.CurState), p.ResultPath, out) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/shared/constants.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/shared/constants.go index 7cb8c207e..44ab00d40 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/shared/constants.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/shared/constants.go @@ -40,5 +40,5 @@ const ( Module = "azcore" // Version is the semantic version (see http://semver.org) of this module. - Version = "v1.14.0" + Version = "v1.17.0" ) diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/policy/policy.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/policy/policy.go index 8d9845358..bb37a5efb 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/policy/policy.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/policy/policy.go @@ -161,19 +161,20 @@ type BearerTokenOptions struct { // AuthorizationHandler allows SDK developers to insert custom logic that runs when BearerTokenPolicy must authorize a request. type AuthorizationHandler struct { - // OnRequest is called each time the policy receives a request. Its func parameter authorizes the request with a token - // from the policy's given credential. Implementations that need to perform I/O should use the Request's context, - // available from Request.Raw().Context(). When OnRequest returns an error, the policy propagates that error and doesn't - // send the request. When OnRequest is nil, the policy follows its default behavior, authorizing the request with a - // token from its credential according to its configuration. + // OnRequest provides TokenRequestOptions the policy can use to acquire a token for a request. The policy calls OnRequest + // whenever it needs a token and may call it multiple times for the same request. Its func parameter authorizes the request + // with a token from the policy's credential. Implementations that need to perform I/O should use the Request's context, + // available from Request.Raw().Context(). When OnRequest returns an error, the policy propagates that error and doesn't send + // the request. When OnRequest is nil, the policy follows its default behavior, which is to authorize the request with a token + // from its credential according to its configuration. OnRequest func(*Request, func(TokenRequestOptions) error) error - // OnChallenge is called when the policy receives a 401 response, allowing the AuthorizationHandler to re-authorize the - // request according to an authentication challenge (the Response's WWW-Authenticate header). OnChallenge is responsible - // for parsing parameters from the challenge. Its func parameter will authorize the request with a token from the policy's - // given credential. Implementations that need to perform I/O should use the Request's context, available from - // Request.Raw().Context(). When OnChallenge returns nil, the policy will send the request again. When OnChallenge is nil, - // the policy will return any 401 response to the client. + // OnChallenge allows clients to implement custom HTTP authentication challenge handling. BearerTokenPolicy calls it upon + // receiving a 401 response containing multiple Bearer challenges or a challenge BearerTokenPolicy itself can't handle. + // OnChallenge is responsible for parsing challenge(s) (the Response's WWW-Authenticate header) and reauthorizing the + // Request accordingly. Its func argument authorizes the Request with a token from the policy's credential using the given + // TokenRequestOptions. OnChallenge should honor the Request's context, available from Request.Raw().Context(). When + // OnChallenge returns nil, the policy will send the Request again. OnChallenge func(*Request, *http.Response, func(TokenRequestOptions) error) error } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/pager.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/pager.go index b960cff0b..c66fc0a90 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/pager.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/pager.go @@ -32,6 +32,7 @@ type PagingHandler[T any] struct { } // Pager provides operations for iterating over paged responses. +// Methods on this type are not safe for concurrent use. type Pager[T any] struct { current *T handler PagingHandler[T] diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_bearer_token.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_bearer_token.go index cb2a69528..b26db920b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_bearer_token.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_bearer_token.go @@ -4,9 +4,12 @@ package runtime import ( + "encoding/base64" "errors" "net/http" + "regexp" "strings" + "sync" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/exported" @@ -17,6 +20,11 @@ import ( ) // BearerTokenPolicy authorizes requests with bearer tokens acquired from a TokenCredential. +// It handles [Continuous Access Evaluation] (CAE) challenges. Clients needing to handle +// additional authentication challenges, or needing more control over authorization, should +// provide a [policy.AuthorizationHandler] in [policy.BearerTokenOptions]. +// +// [Continuous Access Evaluation]: https://learn.microsoft.com/entra/identity/conditional-access/concept-continuous-access-evaluation type BearerTokenPolicy struct { // mainResource is the resource to be retreived using the tenant specified in the credential mainResource *temporal.Resource[exported.AccessToken, acquiringResourceState] @@ -51,8 +59,18 @@ func NewBearerTokenPolicy(cred exported.TokenCredential, scopes []string, opts * if opts == nil { opts = &policy.BearerTokenOptions{} } + ah := opts.AuthorizationHandler + if ah.OnRequest == nil { + // Set a default OnRequest that simply requests a token with the given scopes. OnChallenge + // doesn't get a default so the policy can use a nil check to determine whether the caller + // provided an implementation. + ah.OnRequest = func(_ *policy.Request, authNZ func(policy.TokenRequestOptions) error) error { + // authNZ sets EnableCAE: true in all cases, no need to duplicate that here + return authNZ(policy.TokenRequestOptions{Scopes: scopes}) + } + } return &BearerTokenPolicy{ - authzHandler: opts.AuthorizationHandler, + authzHandler: ah, cred: cred, scopes: scopes, mainResource: temporal.NewResource(acquire), @@ -63,6 +81,7 @@ func NewBearerTokenPolicy(cred exported.TokenCredential, scopes []string, opts * // authenticateAndAuthorize returns a function which authorizes req with a token from the policy's credential func (b *BearerTokenPolicy) authenticateAndAuthorize(req *policy.Request) func(policy.TokenRequestOptions) error { return func(tro policy.TokenRequestOptions) error { + tro.EnableCAE = true as := acquiringResourceState{p: b, req: req, tro: tro} tk, err := b.mainResource.Get(as) if err != nil { @@ -86,12 +105,7 @@ func (b *BearerTokenPolicy) Do(req *policy.Request) (*http.Response, error) { return nil, err } - var err error - if b.authzHandler.OnRequest != nil { - err = b.authzHandler.OnRequest(req, b.authenticateAndAuthorize(req)) - } else { - err = b.authenticateAndAuthorize(req)(policy.TokenRequestOptions{Scopes: b.scopes}) - } + err := b.authzHandler.OnRequest(req, b.authenticateAndAuthorize(req)) if err != nil { return nil, errorinfo.NonRetriableError(err) } @@ -101,17 +115,54 @@ func (b *BearerTokenPolicy) Do(req *policy.Request) (*http.Response, error) { return nil, err } + res, err = b.handleChallenge(req, res, false) + return res, err +} + +// handleChallenge handles authentication challenges either directly (for CAE challenges) or by calling +// the AuthorizationHandler. It's a no-op when the response doesn't include an authentication challenge. +// It will recurse at most once, to handle a CAE challenge following a non-CAE challenge handled by the +// AuthorizationHandler. +func (b *BearerTokenPolicy) handleChallenge(req *policy.Request, res *http.Response, recursed bool) (*http.Response, error) { + var err error if res.StatusCode == http.StatusUnauthorized { b.mainResource.Expire() - if res.Header.Get("WWW-Authenticate") != "" && b.authzHandler.OnChallenge != nil { - if err = b.authzHandler.OnChallenge(req, res, b.authenticateAndAuthorize(req)); err == nil { - res, err = req.Next() + if res.Header.Get(shared.HeaderWWWAuthenticate) != "" { + caeChallenge, parseErr := parseCAEChallenge(res) + if parseErr != nil { + return res, parseErr + } + switch { + case caeChallenge != nil: + authNZ := func(tro policy.TokenRequestOptions) error { + // Take the TokenRequestOptions provided by OnRequest and add the challenge claims. The value + // will be empty at time of writing because CAE is the only feature involving claims. If in + // the future some client needs to specify unrelated claims, this function may need to merge + // them with the challenge claims. + tro.Claims = caeChallenge.params["claims"] + return b.authenticateAndAuthorize(req)(tro) + } + if err = b.authzHandler.OnRequest(req, authNZ); err == nil { + if err = req.RewindBody(); err == nil { + res, err = req.Next() + } + } + case b.authzHandler.OnChallenge != nil && !recursed: + if err = b.authzHandler.OnChallenge(req, res, b.authenticateAndAuthorize(req)); err == nil { + if err = req.RewindBody(); err == nil { + if res, err = req.Next(); err == nil { + res, err = b.handleChallenge(req, res, true) + } + } + } else { + // don't retry challenge handling errors + err = errorinfo.NonRetriableError(err) + } + default: + // return the response to the pipeline } } } - if err != nil { - err = errorinfo.NonRetriableError(err) - } return res, err } @@ -121,3 +172,65 @@ func checkHTTPSForAuth(req *policy.Request, allowHTTP bool) error { } return nil } + +// parseCAEChallenge returns a *authChallenge representing Response's CAE challenge (nil when Response has none). +// If Response includes a CAE challenge having invalid claims, it returns a NonRetriableError. +func parseCAEChallenge(res *http.Response) (*authChallenge, error) { + var ( + caeChallenge *authChallenge + err error + ) + for _, c := range parseChallenges(res) { + if c.scheme == "Bearer" { + if claims := c.params["claims"]; claims != "" && c.params["error"] == "insufficient_claims" { + if b, de := base64.StdEncoding.DecodeString(claims); de == nil { + c.params["claims"] = string(b) + caeChallenge = &c + } else { + // don't include the decoding error because it's something + // unhelpful like "illegal base64 data at input byte 42" + err = errorinfo.NonRetriableError(errors.New("authentication challenge contains invalid claims: " + claims)) + } + break + } + } + } + return caeChallenge, err +} + +var ( + challenge, challengeParams *regexp.Regexp + once = &sync.Once{} +) + +type authChallenge struct { + scheme string + params map[string]string +} + +// parseChallenges assumes authentication challenges have quoted parameter values +func parseChallenges(res *http.Response) []authChallenge { + once.Do(func() { + // matches challenges having quoted parameters, capturing scheme and parameters + challenge = regexp.MustCompile(`(?:(\w+) ((?:\w+="[^"]*",?\s*)+))`) + // captures parameter names and values in a match of the above expression + challengeParams = regexp.MustCompile(`(\w+)="([^"]*)"`) + }) + parsed := []authChallenge{} + // WWW-Authenticate can have multiple values, each containing multiple challenges + for _, h := range res.Header.Values(shared.HeaderWWWAuthenticate) { + for _, sm := range challenge.FindAllStringSubmatch(h, -1) { + // sm is [challenge, scheme, params] (see regexp documentation on submatches) + c := authChallenge{ + params: make(map[string]string), + scheme: sm[1], + } + for _, sm := range challengeParams.FindAllStringSubmatch(sm[2], -1) { + // sm is [key="value", key, value] (see regexp documentation on submatches) + c.params[sm[1]] = sm[2] + } + parsed = append(parsed, c) + } + } + return parsed +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_http_trace.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_http_trace.go index bc6989310..f375195c4 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_http_trace.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_http_trace.go @@ -96,6 +96,8 @@ func (h *httpTracePolicy) Do(req *policy.Request) (resp *http.Response, err erro // StartSpanOptions contains the optional values for StartSpan. type StartSpanOptions struct { + // Kind indicates the kind of Span. + Kind tracing.SpanKind // Attributes contains key-value pairs of attributes for the span. Attributes []tracing.Attribute } @@ -115,7 +117,6 @@ func StartSpan(ctx context.Context, name string, tracer tracing.Tracer, options // we MUST propagate the active tracer before returning so that the trace policy can access it ctx = context.WithValue(ctx, shared.CtxWithTracingTracer{}, tracer) - const newSpanKind = tracing.SpanKindInternal if activeSpan := ctx.Value(ctxActiveSpan{}); activeSpan != nil { // per the design guidelines, if a SDK method Foo() calls SDK method Bar(), // then the span for Bar() must be suppressed. however, if Bar() makes a REST @@ -131,12 +132,15 @@ func StartSpan(ctx context.Context, name string, tracer tracing.Tracer, options if options == nil { options = &StartSpanOptions{} } + if options.Kind == 0 { + options.Kind = tracing.SpanKindInternal + } ctx, span := tracer.Start(ctx, name, &tracing.SpanOptions{ - Kind: newSpanKind, + Kind: options.Kind, Attributes: options.Attributes, }) - ctx = context.WithValue(ctx, ctxActiveSpan{}, newSpanKind) + ctx = context.WithValue(ctx, ctxActiveSpan{}, options.Kind) return ctx, func(err error) { if err != nil { errType := strings.Replace(fmt.Sprintf("%T", err), "*exported.", "*azcore.", 1) diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_retry.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_retry.go index e15eea824..4c3a31fea 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_retry.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_retry.go @@ -59,13 +59,33 @@ func setDefaults(o *policy.RetryOptions) { } func calcDelay(o policy.RetryOptions, try int32) time.Duration { // try is >=1; never 0 - delay := time.Duration((1< o.MaxRetryDelay { + delayFloat := float64(delay) * jitterMultiplier + if delayFloat > float64(math.MaxInt64) { + // the jitter pushed us over MaxInt64, so just use MaxInt64 + delay = time.Duration(math.MaxInt64) + } else { + delay = time.Duration(delayFloat) + } + + if delay > o.MaxRetryDelay { // MaxRetryDelay is backfilled with non-negative value delay = o.MaxRetryDelay } + return delay } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/poller.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/poller.go index 03f76c9aa..4f90e4474 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/poller.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/poller.go @@ -50,8 +50,14 @@ const ( // NewPollerOptions contains the optional parameters for NewPoller. type NewPollerOptions[T any] struct { // FinalStateVia contains the final-state-via value for the LRO. + // NOTE: used only for Azure-AsyncOperation and Operation-Location LROs. FinalStateVia FinalStateVia + // OperationLocationResultPath contains the JSON path to the result's + // payload when it's included with the terminal success response. + // NOTE: only used for Operation-Location LROs. + OperationLocationResultPath string + // Response contains a preconstructed response type. // The final payload will be unmarshaled into it and returned. Response *T @@ -98,7 +104,7 @@ func NewPoller[T any](resp *http.Response, pl exported.Pipeline, options *NewPol opr, err = async.New[T](pl, resp, options.FinalStateVia) } else if op.Applicable(resp) { // op poller must be checked before loc as it can also have a location header - opr, err = op.New[T](pl, resp, options.FinalStateVia) + opr, err = op.New[T](pl, resp, options.FinalStateVia, options.OperationLocationResultPath) } else if loc.Applicable(resp) { opr, err = loc.New[T](pl, resp) } else if body.Applicable(resp) { @@ -172,7 +178,7 @@ func NewPollerFromResumeToken[T any](token string, pl exported.Pipeline, options } else if loc.CanResume(asJSON) { opr, _ = loc.New[T](pl, nil) } else if op.CanResume(asJSON) { - opr, _ = op.New[T](pl, nil, "") + opr, _ = op.New[T](pl, nil, "", "") } else { return nil, fmt.Errorf("unhandled poller token %s", string(raw)) } @@ -200,6 +206,7 @@ type PollingHandler[T any] interface { } // Poller encapsulates a long-running operation, providing polling facilities until the operation reaches a terminal state. +// Methods on this type are not safe for concurrent use. type Poller[T any] struct { op PollingHandler[T] resp *http.Response diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/CHANGELOG.md index a06978122..16efa8052 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/CHANGELOG.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/CHANGELOG.md @@ -1,5 +1,127 @@ # Release History +## 1.7.0 (2024-12-27) +### Features Added + +- New value `ModelLifecycleStatusDeprecated`, `ModelLifecycleStatusDeprecating`, `ModelLifecycleStatusStable` added to enum type `ModelLifecycleStatus` +- New enum type `ByPassSelection` with values `ByPassSelectionAzureServices`, `ByPassSelectionNone` +- New enum type `ContentLevel` with values `ContentLevelHigh`, `ContentLevelLow`, `ContentLevelMedium` +- New enum type `DefenderForAISettingState` with values `DefenderForAISettingStateDisabled`, `DefenderForAISettingStateEnabled` +- New enum type `EncryptionScopeProvisioningState` with values `EncryptionScopeProvisioningStateAccepted`, `EncryptionScopeProvisioningStateCanceled`, `EncryptionScopeProvisioningStateCreating`, `EncryptionScopeProvisioningStateDeleting`, `EncryptionScopeProvisioningStateFailed`, `EncryptionScopeProvisioningStateMoving`, `EncryptionScopeProvisioningStateSucceeded` +- New enum type `EncryptionScopeState` with values `EncryptionScopeStateDisabled`, `EncryptionScopeStateEnabled` +- New enum type `NspAccessRuleDirection` with values `NspAccessRuleDirectionInbound`, `NspAccessRuleDirectionOutbound` +- New enum type `RaiPolicyContentSource` with values `RaiPolicyContentSourceCompletion`, `RaiPolicyContentSourcePrompt` +- New enum type `RaiPolicyMode` with values `RaiPolicyModeAsynchronousFilter`, `RaiPolicyModeBlocking`, `RaiPolicyModeDefault`, `RaiPolicyModeDeferred` +- New enum type `RaiPolicyType` with values `RaiPolicyTypeSystemManaged`, `RaiPolicyTypeUserManaged` +- New function `*ClientFactory.NewDefenderForAISettingsClient() *DefenderForAISettingsClient` +- New function `*ClientFactory.NewEncryptionScopesClient() *EncryptionScopesClient` +- New function `*ClientFactory.NewLocationBasedModelCapacitiesClient() *LocationBasedModelCapacitiesClient` +- New function `*ClientFactory.NewModelCapacitiesClient() *ModelCapacitiesClient` +- New function `*ClientFactory.NewNetworkSecurityPerimeterConfigurationsClient() *NetworkSecurityPerimeterConfigurationsClient` +- New function `*ClientFactory.NewRaiBlocklistItemsClient() *RaiBlocklistItemsClient` +- New function `*ClientFactory.NewRaiBlocklistsClient() *RaiBlocklistsClient` +- New function `*ClientFactory.NewRaiContentFiltersClient() *RaiContentFiltersClient` +- New function `*ClientFactory.NewRaiPoliciesClient() *RaiPoliciesClient` +- New function `NewDefenderForAISettingsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*DefenderForAISettingsClient, error)` +- New function `*DefenderForAISettingsClient.CreateOrUpdate(context.Context, string, string, string, DefenderForAISetting, *DefenderForAISettingsClientCreateOrUpdateOptions) (DefenderForAISettingsClientCreateOrUpdateResponse, error)` +- New function `*DefenderForAISettingsClient.Get(context.Context, string, string, string, *DefenderForAISettingsClientGetOptions) (DefenderForAISettingsClientGetResponse, error)` +- New function `*DefenderForAISettingsClient.NewListPager(string, string, *DefenderForAISettingsClientListOptions) *runtime.Pager[DefenderForAISettingsClientListResponse]` +- New function `*DefenderForAISettingsClient.Update(context.Context, string, string, string, DefenderForAISetting, *DefenderForAISettingsClientUpdateOptions) (DefenderForAISettingsClientUpdateResponse, error)` +- New function `*DeploymentsClient.NewListSKUsPager(string, string, string, *DeploymentsClientListSKUsOptions) *runtime.Pager[DeploymentsClientListSKUsResponse]` +- New function `*DeploymentsClient.BeginUpdate(context.Context, string, string, string, PatchResourceTagsAndSKU, *DeploymentsClientBeginUpdateOptions) (*runtime.Poller[DeploymentsClientUpdateResponse], error)` +- New function `NewEncryptionScopesClient(string, azcore.TokenCredential, *arm.ClientOptions) (*EncryptionScopesClient, error)` +- New function `*EncryptionScopesClient.CreateOrUpdate(context.Context, string, string, string, EncryptionScope, *EncryptionScopesClientCreateOrUpdateOptions) (EncryptionScopesClientCreateOrUpdateResponse, error)` +- New function `*EncryptionScopesClient.BeginDelete(context.Context, string, string, string, *EncryptionScopesClientBeginDeleteOptions) (*runtime.Poller[EncryptionScopesClientDeleteResponse], error)` +- New function `*EncryptionScopesClient.Get(context.Context, string, string, string, *EncryptionScopesClientGetOptions) (EncryptionScopesClientGetResponse, error)` +- New function `*EncryptionScopesClient.NewListPager(string, string, *EncryptionScopesClientListOptions) *runtime.Pager[EncryptionScopesClientListResponse]` +- New function `NewLocationBasedModelCapacitiesClient(string, azcore.TokenCredential, *arm.ClientOptions) (*LocationBasedModelCapacitiesClient, error)` +- New function `*LocationBasedModelCapacitiesClient.NewListPager(string, string, string, string, *LocationBasedModelCapacitiesClientListOptions) *runtime.Pager[LocationBasedModelCapacitiesClientListResponse]` +- New function `*ManagementClient.CalculateModelCapacity(context.Context, CalculateModelCapacityParameter, *ManagementClientCalculateModelCapacityOptions) (ManagementClientCalculateModelCapacityResponse, error)` +- New function `NewModelCapacitiesClient(string, azcore.TokenCredential, *arm.ClientOptions) (*ModelCapacitiesClient, error)` +- New function `*ModelCapacitiesClient.NewListPager(string, string, string, *ModelCapacitiesClientListOptions) *runtime.Pager[ModelCapacitiesClientListResponse]` +- New function `NewRaiBlocklistItemsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*RaiBlocklistItemsClient, error)` +- New function `*RaiBlocklistItemsClient.BatchAdd(context.Context, string, string, string, []*RaiBlocklistItemBulkRequest, *RaiBlocklistItemsClientBatchAddOptions) (RaiBlocklistItemsClientBatchAddResponse, error)` +- New function `*RaiBlocklistItemsClient.BatchDelete(context.Context, string, string, string, any, *RaiBlocklistItemsClientBatchDeleteOptions) (RaiBlocklistItemsClientBatchDeleteResponse, error)` +- New function `*RaiBlocklistItemsClient.CreateOrUpdate(context.Context, string, string, string, string, RaiBlocklistItem, *RaiBlocklistItemsClientCreateOrUpdateOptions) (RaiBlocklistItemsClientCreateOrUpdateResponse, error)` +- New function `*RaiBlocklistItemsClient.BeginDelete(context.Context, string, string, string, string, *RaiBlocklistItemsClientBeginDeleteOptions) (*runtime.Poller[RaiBlocklistItemsClientDeleteResponse], error)` +- New function `*RaiBlocklistItemsClient.Get(context.Context, string, string, string, string, *RaiBlocklistItemsClientGetOptions) (RaiBlocklistItemsClientGetResponse, error)` +- New function `*RaiBlocklistItemsClient.NewListPager(string, string, string, *RaiBlocklistItemsClientListOptions) *runtime.Pager[RaiBlocklistItemsClientListResponse]` +- New function `NewRaiBlocklistsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*RaiBlocklistsClient, error)` +- New function `*RaiBlocklistsClient.CreateOrUpdate(context.Context, string, string, string, RaiBlocklist, *RaiBlocklistsClientCreateOrUpdateOptions) (RaiBlocklistsClientCreateOrUpdateResponse, error)` +- New function `*RaiBlocklistsClient.BeginDelete(context.Context, string, string, string, *RaiBlocklistsClientBeginDeleteOptions) (*runtime.Poller[RaiBlocklistsClientDeleteResponse], error)` +- New function `*RaiBlocklistsClient.Get(context.Context, string, string, string, *RaiBlocklistsClientGetOptions) (RaiBlocklistsClientGetResponse, error)` +- New function `*RaiBlocklistsClient.NewListPager(string, string, *RaiBlocklistsClientListOptions) *runtime.Pager[RaiBlocklistsClientListResponse]` +- New function `NewRaiContentFiltersClient(string, azcore.TokenCredential, *arm.ClientOptions) (*RaiContentFiltersClient, error)` +- New function `*RaiContentFiltersClient.Get(context.Context, string, string, *RaiContentFiltersClientGetOptions) (RaiContentFiltersClientGetResponse, error)` +- New function `*RaiContentFiltersClient.NewListPager(string, *RaiContentFiltersClientListOptions) *runtime.Pager[RaiContentFiltersClientListResponse]` +- New function `NewRaiPoliciesClient(string, azcore.TokenCredential, *arm.ClientOptions) (*RaiPoliciesClient, error)` +- New function `*RaiPoliciesClient.CreateOrUpdate(context.Context, string, string, string, RaiPolicy, *RaiPoliciesClientCreateOrUpdateOptions) (RaiPoliciesClientCreateOrUpdateResponse, error)` +- New function `*RaiPoliciesClient.BeginDelete(context.Context, string, string, string, *RaiPoliciesClientBeginDeleteOptions) (*runtime.Poller[RaiPoliciesClientDeleteResponse], error)` +- New function `*RaiPoliciesClient.Get(context.Context, string, string, string, *RaiPoliciesClientGetOptions) (RaiPoliciesClientGetResponse, error)` +- New function `*RaiPoliciesClient.NewListPager(string, string, *RaiPoliciesClientListOptions) *runtime.Pager[RaiPoliciesClientListResponse]` +- New function `NewNetworkSecurityPerimeterConfigurationsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*NetworkSecurityPerimeterConfigurationsClient, error)` +- New function `*NetworkSecurityPerimeterConfigurationsClient.Get(context.Context, string, string, string, *NetworkSecurityPerimeterConfigurationsClientGetOptions) (NetworkSecurityPerimeterConfigurationsClientGetResponse, error)` +- New function `*NetworkSecurityPerimeterConfigurationsClient.NewListPager(string, string, *NetworkSecurityPerimeterConfigurationsClientListOptions) *runtime.Pager[NetworkSecurityPerimeterConfigurationsClientListResponse]` +- New function `*NetworkSecurityPerimeterConfigurationsClient.BeginReconcile(context.Context, string, string, string, *NetworkSecurityPerimeterConfigurationsClientBeginReconcileOptions) (*runtime.Poller[NetworkSecurityPerimeterConfigurationsClientReconcileResponse], error)` +- New struct `BillingMeterInfo` +- New struct `CalculateModelCapacityParameter` +- New struct `CalculateModelCapacityResult` +- New struct `CalculateModelCapacityResultEstimatedCapacity` +- New struct `CustomBlocklistConfig` +- New struct `DefenderForAISetting` +- New struct `DefenderForAISettingProperties` +- New struct `DefenderForAISettingResult` +- New struct `DeploymentCapacitySettings` +- New struct `DeploymentSKUListResult` +- New struct `EncryptionScope` +- New struct `EncryptionScopeListResult` +- New struct `EncryptionScopeProperties` +- New struct `ModelCapacityCalculatorWorkload` +- New struct `ModelCapacityCalculatorWorkloadRequestParam` +- New struct `ModelCapacityListResult` +- New struct `ModelCapacityListResultValueItem` +- New struct `ModelSKUCapacityProperties` +- New struct `NetworkSecurityPerimeter` +- New struct `NetworkSecurityPerimeterAccessRule` +- New struct `NetworkSecurityPerimeterAccessRuleProperties` +- New struct `NetworkSecurityPerimeterAccessRulePropertiesSubscriptionsItem` +- New struct `NetworkSecurityPerimeterConfiguration` +- New struct `NetworkSecurityPerimeterConfigurationAssociationInfo` +- New struct `NetworkSecurityPerimeterConfigurationList` +- New struct `NetworkSecurityPerimeterConfigurationProperties` +- New struct `NetworkSecurityPerimeterProfileInfo` +- New struct `ProvisioningIssue` +- New struct `ProvisioningIssueProperties` +- New struct `RaiBlockListItemsResult` +- New struct `RaiBlockListResult` +- New struct `RaiBlocklist` +- New struct `RaiBlocklistConfig` +- New struct `RaiBlocklistItem` +- New struct `RaiBlocklistItemBulkRequest` +- New struct `RaiBlocklistItemProperties` +- New struct `RaiBlocklistProperties` +- New struct `RaiContentFilter` +- New struct `RaiContentFilterListResult` +- New struct `RaiContentFilterProperties` +- New struct `RaiMonitorConfig` +- New struct `RaiPolicy` +- New struct `RaiPolicyContentFilter` +- New struct `RaiPolicyListResult` +- New struct `RaiPolicyProperties` +- New struct `SKUResource` +- New struct `UserOwnedAmlWorkspace` +- New field `Publisher`, `SourceAccount` in struct `AccountModel` +- New field `AmlWorkspace`, `RaiMonitorConfig` in struct `AccountProperties` +- New field `AllowedValues` in struct `CapacityConfig` +- New field `Tags` in struct `CommitmentPlanAccountAssociation` +- New field `Tags` in struct `Deployment` +- New field `Publisher`, `SourceAccount` in struct `DeploymentModel` +- New field `CapacitySettings`, `CurrentCapacity`, `DynamicThrottlingEnabled`, `ParentDeploymentName` in struct `DeploymentProperties` +- New field `Description` in struct `Model` +- New field `Cost` in struct `ModelSKU` +- New field `Bypass` in struct `NetworkRuleSet` + + ## 1.6.0 (2023-11-24) ### Features Added diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/README.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/README.md index 86e501361..c0fdcbabd 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/README.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/README.md @@ -1,7 +1,5 @@ # Azure Cognitive Services Module for Go -[![PkgGoDev](https://pkg.go.dev/badge/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices)](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices) - The `armcognitiveservices` module provides operations for working with Azure Cognitive Services. [Source code](https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/resourcemanager/cognitiveservices/armcognitiveservices) @@ -25,7 +23,7 @@ go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/a ## Authorization -When creating a client, you will need to provide a credential for authenticating with Azure Cognitive Services. The `azidentity` module provides facilities for various ways of authenticating with Azure including client/secret, certificate, managed identity, and more. +When creating a client, you will need to provide a credential for authenticating with Azure Cognitive Services. The `azidentity` module provides facilities for various ways of authenticating with Azure including client/secret, certificate, managed identity, and more. ```go cred, err := azidentity.NewDefaultAzureCredential(nil) @@ -54,7 +52,7 @@ clientFactory, err := armcognitiveservices.NewClientFactory(, c ## Clients -A client groups a set of related APIs, providing access to its functionality. Create one or more clients to access the APIs you require using client factory. +A client groups a set of related APIs, providing access to its functionality. Create one or more clients to access the APIs you require using client factory. ```go client := clientFactory.NewAccountsClient() @@ -89,4 +87,4 @@ This project has adopted the For more information, see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any -additional questions or comments. \ No newline at end of file +additional questions or comments. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/accounts_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/accounts_client.go index bd3916f2a..173f3f8fb 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/accounts_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/accounts_client.go @@ -47,7 +47,7 @@ func NewAccountsClient(subscriptionID string, credential azcore.TokenCredential, // developer to access intelligent APIs. It's also the resource type for billing. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of Cognitive Services account. // - account - The parameters to provide for the created account. @@ -73,7 +73,7 @@ func (client *AccountsClient) BeginCreate(ctx context.Context, resourceGroupName // to access intelligent APIs. It's also the resource type for billing. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2024-10-01 func (client *AccountsClient) create(ctx context.Context, resourceGroupName string, accountName string, account Account, options *AccountsClientBeginCreateOptions) (*http.Response, error) { var err error const operationName = "AccountsClient.BeginCreate" @@ -115,7 +115,7 @@ func (client *AccountsClient) createCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, account); err != nil { @@ -127,7 +127,7 @@ func (client *AccountsClient) createCreateRequest(ctx context.Context, resourceG // BeginDelete - Deletes a Cognitive Services account from the resource group. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of Cognitive Services account. // - options - AccountsClientBeginDeleteOptions contains the optional parameters for the AccountsClient.BeginDelete method. @@ -151,7 +151,7 @@ func (client *AccountsClient) BeginDelete(ctx context.Context, resourceGroupName // Delete - Deletes a Cognitive Services account from the resource group. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2024-10-01 func (client *AccountsClient) deleteOperation(ctx context.Context, resourceGroupName string, accountName string, options *AccountsClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "AccountsClient.BeginDelete" @@ -193,7 +193,7 @@ func (client *AccountsClient) deleteCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -202,7 +202,7 @@ func (client *AccountsClient) deleteCreateRequest(ctx context.Context, resourceG // Get - Returns a Cognitive Services account specified by the parameters. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of Cognitive Services account. // - options - AccountsClientGetOptions contains the optional parameters for the AccountsClient.Get method. @@ -248,7 +248,7 @@ func (client *AccountsClient) getCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -265,7 +265,7 @@ func (client *AccountsClient) getHandleResponse(resp *http.Response) (AccountsCl // NewListPager - Returns all the resources of a particular type belonging to a subscription. // -// Generated from API version 2023-05-01 +// Generated from API version 2024-10-01 // - options - AccountsClientListOptions contains the optional parameters for the AccountsClient.NewListPager method. func (client *AccountsClient) NewListPager(options *AccountsClientListOptions) *runtime.Pager[AccountsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[AccountsClientListResponse]{ @@ -302,7 +302,7 @@ func (client *AccountsClient) listCreateRequest(ctx context.Context, options *Ac return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -319,7 +319,7 @@ func (client *AccountsClient) listHandleResponse(resp *http.Response) (AccountsC // NewListByResourceGroupPager - Returns all the resources of a particular type belonging to a resource group // -// Generated from API version 2023-05-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - options - AccountsClientListByResourceGroupOptions contains the optional parameters for the AccountsClient.NewListByResourceGroupPager // method. @@ -362,7 +362,7 @@ func (client *AccountsClient) listByResourceGroupCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -380,7 +380,7 @@ func (client *AccountsClient) listByResourceGroupHandleResponse(resp *http.Respo // ListKeys - Lists the account keys for the specified Cognitive Services account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of Cognitive Services account. // - options - AccountsClientListKeysOptions contains the optional parameters for the AccountsClient.ListKeys method. @@ -426,7 +426,7 @@ func (client *AccountsClient) listKeysCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -443,7 +443,7 @@ func (client *AccountsClient) listKeysHandleResponse(resp *http.Response) (Accou // NewListModelsPager - List available Models for the requested Cognitive Services account // -// Generated from API version 2023-05-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of Cognitive Services account. // - options - AccountsClientListModelsOptions contains the optional parameters for the AccountsClient.NewListModelsPager method. @@ -490,7 +490,7 @@ func (client *AccountsClient) listModelsCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -508,7 +508,7 @@ func (client *AccountsClient) listModelsHandleResponse(resp *http.Response) (Acc // ListSKUs - List available SKUs for the requested Cognitive Services account // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of Cognitive Services account. // - options - AccountsClientListSKUsOptions contains the optional parameters for the AccountsClient.ListSKUs method. @@ -554,7 +554,7 @@ func (client *AccountsClient) listSKUsCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -572,7 +572,7 @@ func (client *AccountsClient) listSKUsHandleResponse(resp *http.Response) (Accou // ListUsages - Get usages for the requested Cognitive Services account // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of Cognitive Services account. // - options - AccountsClientListUsagesOptions contains the optional parameters for the AccountsClient.ListUsages method. @@ -618,10 +618,10 @@ func (client *AccountsClient) listUsagesCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -639,7 +639,7 @@ func (client *AccountsClient) listUsagesHandleResponse(resp *http.Response) (Acc // RegenerateKey - Regenerates the specified account key for the specified Cognitive Services account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of Cognitive Services account. // - parameters - regenerate key parameters. @@ -686,7 +686,7 @@ func (client *AccountsClient) regenerateKeyCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { @@ -707,7 +707,7 @@ func (client *AccountsClient) regenerateKeyHandleResponse(resp *http.Response) ( // BeginUpdate - Updates a Cognitive Services account // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of Cognitive Services account. // - account - The parameters to provide for the created account. @@ -732,7 +732,7 @@ func (client *AccountsClient) BeginUpdate(ctx context.Context, resourceGroupName // Update - Updates a Cognitive Services account // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2024-10-01 func (client *AccountsClient) update(ctx context.Context, resourceGroupName string, accountName string, account Account, options *AccountsClientBeginUpdateOptions) (*http.Response, error) { var err error const operationName = "AccountsClient.BeginUpdate" @@ -774,7 +774,7 @@ func (client *AccountsClient) updateCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, account); err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/autorest.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/autorest.md index 900c143ad..a08ac854e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/autorest.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/autorest.md @@ -5,9 +5,9 @@ ``` yaml azure-arm: true require: -- https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/cognitiveservices/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/cognitiveservices/resource-manager/readme.go.md +- https://github.com/Azure/azure-rest-api-specs/blob/069a65e8a6d1a6c0c58d9a9d97610b7103b6e8a5/specification/cognitiveservices/resource-manager/readme.md +- https://github.com/Azure/azure-rest-api-specs/blob/069a65e8a6d1a6c0c58d9a9d97610b7103b6e8a5/specification/cognitiveservices/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 1.6.0 -tag: package-2023-05 +module-version: 1.7.0 +tag: package-2024-10 ``` \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/ci.yml b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/ci.yml index 7b3b514d3..29b46f312 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/ci.yml +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/ci.yml @@ -21,8 +21,8 @@ pr: include: - sdk/resourcemanager/cognitiveservices/armcognitiveservices/ -stages: -- template: /eng/pipelines/templates/jobs/archetype-sdk-client.yml +extends: + template: /eng/pipelines/templates/jobs/archetype-sdk-client.yml parameters: IncludeRelease: true ServiceDirectory: 'resourcemanager/cognitiveservices/armcognitiveservices' diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/client_factory.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/client_factory.go index eda98b5e2..c3644d915 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/client_factory.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/client_factory.go @@ -17,8 +17,7 @@ import ( // Don't use this type directly, use NewClientFactory instead. type ClientFactory struct { subscriptionID string - credential azcore.TokenCredential - options *arm.ClientOptions + internal *arm.Client } // NewClientFactory creates a new instance of ClientFactory with the specified values. @@ -27,84 +26,179 @@ type ClientFactory struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error) { - _, err := arm.NewClient(moduleName, moduleVersion, credential, options) + internal, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } return &ClientFactory{ - subscriptionID: subscriptionID, credential: credential, - options: options.Clone(), + subscriptionID: subscriptionID, + internal: internal, }, nil } // NewAccountsClient creates a new instance of AccountsClient. func (c *ClientFactory) NewAccountsClient() *AccountsClient { - subClient, _ := NewAccountsClient(c.subscriptionID, c.credential, c.options) - return subClient + return &AccountsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewCommitmentPlansClient creates a new instance of CommitmentPlansClient. func (c *ClientFactory) NewCommitmentPlansClient() *CommitmentPlansClient { - subClient, _ := NewCommitmentPlansClient(c.subscriptionID, c.credential, c.options) - return subClient + return &CommitmentPlansClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewCommitmentTiersClient creates a new instance of CommitmentTiersClient. func (c *ClientFactory) NewCommitmentTiersClient() *CommitmentTiersClient { - subClient, _ := NewCommitmentTiersClient(c.subscriptionID, c.credential, c.options) - return subClient + return &CommitmentTiersClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewDefenderForAISettingsClient creates a new instance of DefenderForAISettingsClient. +func (c *ClientFactory) NewDefenderForAISettingsClient() *DefenderForAISettingsClient { + return &DefenderForAISettingsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewDeletedAccountsClient creates a new instance of DeletedAccountsClient. func (c *ClientFactory) NewDeletedAccountsClient() *DeletedAccountsClient { - subClient, _ := NewDeletedAccountsClient(c.subscriptionID, c.credential, c.options) - return subClient + return &DeletedAccountsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewDeploymentsClient creates a new instance of DeploymentsClient. func (c *ClientFactory) NewDeploymentsClient() *DeploymentsClient { - subClient, _ := NewDeploymentsClient(c.subscriptionID, c.credential, c.options) - return subClient + return &DeploymentsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewEncryptionScopesClient creates a new instance of EncryptionScopesClient. +func (c *ClientFactory) NewEncryptionScopesClient() *EncryptionScopesClient { + return &EncryptionScopesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewLocationBasedModelCapacitiesClient creates a new instance of LocationBasedModelCapacitiesClient. +func (c *ClientFactory) NewLocationBasedModelCapacitiesClient() *LocationBasedModelCapacitiesClient { + return &LocationBasedModelCapacitiesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewManagementClient creates a new instance of ManagementClient. func (c *ClientFactory) NewManagementClient() *ManagementClient { - subClient, _ := NewManagementClient(c.subscriptionID, c.credential, c.options) - return subClient + return &ManagementClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewModelCapacitiesClient creates a new instance of ModelCapacitiesClient. +func (c *ClientFactory) NewModelCapacitiesClient() *ModelCapacitiesClient { + return &ModelCapacitiesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewModelsClient creates a new instance of ModelsClient. func (c *ClientFactory) NewModelsClient() *ModelsClient { - subClient, _ := NewModelsClient(c.subscriptionID, c.credential, c.options) - return subClient + return &ModelsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewNetworkSecurityPerimeterConfigurationsClient creates a new instance of NetworkSecurityPerimeterConfigurationsClient. +func (c *ClientFactory) NewNetworkSecurityPerimeterConfigurationsClient() *NetworkSecurityPerimeterConfigurationsClient { + return &NetworkSecurityPerimeterConfigurationsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewOperationsClient creates a new instance of OperationsClient. func (c *ClientFactory) NewOperationsClient() *OperationsClient { - subClient, _ := NewOperationsClient(c.credential, c.options) - return subClient + return &OperationsClient{ + internal: c.internal, + } } // NewPrivateEndpointConnectionsClient creates a new instance of PrivateEndpointConnectionsClient. func (c *ClientFactory) NewPrivateEndpointConnectionsClient() *PrivateEndpointConnectionsClient { - subClient, _ := NewPrivateEndpointConnectionsClient(c.subscriptionID, c.credential, c.options) - return subClient + return &PrivateEndpointConnectionsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewPrivateLinkResourcesClient creates a new instance of PrivateLinkResourcesClient. func (c *ClientFactory) NewPrivateLinkResourcesClient() *PrivateLinkResourcesClient { - subClient, _ := NewPrivateLinkResourcesClient(c.subscriptionID, c.credential, c.options) - return subClient + return &PrivateLinkResourcesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewRaiBlocklistItemsClient creates a new instance of RaiBlocklistItemsClient. +func (c *ClientFactory) NewRaiBlocklistItemsClient() *RaiBlocklistItemsClient { + return &RaiBlocklistItemsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewRaiBlocklistsClient creates a new instance of RaiBlocklistsClient. +func (c *ClientFactory) NewRaiBlocklistsClient() *RaiBlocklistsClient { + return &RaiBlocklistsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewRaiContentFiltersClient creates a new instance of RaiContentFiltersClient. +func (c *ClientFactory) NewRaiContentFiltersClient() *RaiContentFiltersClient { + return &RaiContentFiltersClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewRaiPoliciesClient creates a new instance of RaiPoliciesClient. +func (c *ClientFactory) NewRaiPoliciesClient() *RaiPoliciesClient { + return &RaiPoliciesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewResourceSKUsClient creates a new instance of ResourceSKUsClient. func (c *ClientFactory) NewResourceSKUsClient() *ResourceSKUsClient { - subClient, _ := NewResourceSKUsClient(c.subscriptionID, c.credential, c.options) - return subClient + return &ResourceSKUsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewUsagesClient creates a new instance of UsagesClient. func (c *ClientFactory) NewUsagesClient() *UsagesClient { - subClient, _ := NewUsagesClient(c.subscriptionID, c.credential, c.options) - return subClient + return &UsagesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/commitmentplans_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/commitmentplans_client.go index 8ec8b1b08..e3c1f3b2e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/commitmentplans_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/commitmentplans_client.go @@ -46,7 +46,7 @@ func NewCommitmentPlansClient(subscriptionID string, credential azcore.TokenCred // CreateOrUpdate - Update the state of specified commitmentPlans associated with the Cognitive Services account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of Cognitive Services account. // - commitmentPlanName - The name of the commitmentPlan associated with the Cognitive Services Account @@ -99,7 +99,7 @@ func (client *CommitmentPlansClient) createOrUpdateCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, commitmentPlan); err != nil { @@ -120,7 +120,7 @@ func (client *CommitmentPlansClient) createOrUpdateHandleResponse(resp *http.Res // BeginCreateOrUpdateAssociation - Create or update the association of the Cognitive Services commitment plan. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - commitmentPlanName - The name of the commitmentPlan associated with the Cognitive Services Account // - commitmentPlanAssociationName - The name of the commitment plan association with the Cognitive Services Account @@ -148,7 +148,7 @@ func (client *CommitmentPlansClient) BeginCreateOrUpdateAssociation(ctx context. // CreateOrUpdateAssociation - Create or update the association of the Cognitive Services commitment plan. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2024-10-01 func (client *CommitmentPlansClient) createOrUpdateAssociation(ctx context.Context, resourceGroupName string, commitmentPlanName string, commitmentPlanAssociationName string, association CommitmentPlanAccountAssociation, options *CommitmentPlansClientBeginCreateOrUpdateAssociationOptions) (*http.Response, error) { var err error const operationName = "CommitmentPlansClient.BeginCreateOrUpdateAssociation" @@ -194,7 +194,7 @@ func (client *CommitmentPlansClient) createOrUpdateAssociationCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, association); err != nil { @@ -206,7 +206,7 @@ func (client *CommitmentPlansClient) createOrUpdateAssociationCreateRequest(ctx // BeginCreateOrUpdatePlan - Create Cognitive Services commitment plan. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - commitmentPlanName - The name of the commitmentPlan associated with the Cognitive Services Account // - commitmentPlan - The parameters to provide for the created commitment plan. @@ -233,7 +233,7 @@ func (client *CommitmentPlansClient) BeginCreateOrUpdatePlan(ctx context.Context // CreateOrUpdatePlan - Create Cognitive Services commitment plan. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2024-10-01 func (client *CommitmentPlansClient) createOrUpdatePlan(ctx context.Context, resourceGroupName string, commitmentPlanName string, commitmentPlan CommitmentPlan, options *CommitmentPlansClientBeginCreateOrUpdatePlanOptions) (*http.Response, error) { var err error const operationName = "CommitmentPlansClient.BeginCreateOrUpdatePlan" @@ -275,7 +275,7 @@ func (client *CommitmentPlansClient) createOrUpdatePlanCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, commitmentPlan); err != nil { @@ -287,7 +287,7 @@ func (client *CommitmentPlansClient) createOrUpdatePlanCreateRequest(ctx context // BeginDelete - Deletes the specified commitmentPlan associated with the Cognitive Services account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of Cognitive Services account. // - commitmentPlanName - The name of the commitmentPlan associated with the Cognitive Services Account @@ -313,7 +313,7 @@ func (client *CommitmentPlansClient) BeginDelete(ctx context.Context, resourceGr // Delete - Deletes the specified commitmentPlan associated with the Cognitive Services account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2024-10-01 func (client *CommitmentPlansClient) deleteOperation(ctx context.Context, resourceGroupName string, accountName string, commitmentPlanName string, options *CommitmentPlansClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "CommitmentPlansClient.BeginDelete" @@ -359,7 +359,7 @@ func (client *CommitmentPlansClient) deleteCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -368,7 +368,7 @@ func (client *CommitmentPlansClient) deleteCreateRequest(ctx context.Context, re // BeginDeleteAssociation - Deletes the association of the Cognitive Services commitment plan. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - commitmentPlanName - The name of the commitmentPlan associated with the Cognitive Services Account // - commitmentPlanAssociationName - The name of the commitment plan association with the Cognitive Services Account @@ -395,7 +395,7 @@ func (client *CommitmentPlansClient) BeginDeleteAssociation(ctx context.Context, // DeleteAssociation - Deletes the association of the Cognitive Services commitment plan. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2024-10-01 func (client *CommitmentPlansClient) deleteAssociation(ctx context.Context, resourceGroupName string, commitmentPlanName string, commitmentPlanAssociationName string, options *CommitmentPlansClientBeginDeleteAssociationOptions) (*http.Response, error) { var err error const operationName = "CommitmentPlansClient.BeginDeleteAssociation" @@ -441,7 +441,7 @@ func (client *CommitmentPlansClient) deleteAssociationCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -450,7 +450,7 @@ func (client *CommitmentPlansClient) deleteAssociationCreateRequest(ctx context. // BeginDeletePlan - Deletes a Cognitive Services commitment plan from the resource group. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - commitmentPlanName - The name of the commitmentPlan associated with the Cognitive Services Account // - options - CommitmentPlansClientBeginDeletePlanOptions contains the optional parameters for the CommitmentPlansClient.BeginDeletePlan @@ -476,7 +476,7 @@ func (client *CommitmentPlansClient) BeginDeletePlan(ctx context.Context, resour // DeletePlan - Deletes a Cognitive Services commitment plan from the resource group. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2024-10-01 func (client *CommitmentPlansClient) deletePlan(ctx context.Context, resourceGroupName string, commitmentPlanName string, options *CommitmentPlansClientBeginDeletePlanOptions) (*http.Response, error) { var err error const operationName = "CommitmentPlansClient.BeginDeletePlan" @@ -518,7 +518,7 @@ func (client *CommitmentPlansClient) deletePlanCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -527,7 +527,7 @@ func (client *CommitmentPlansClient) deletePlanCreateRequest(ctx context.Context // Get - Gets the specified commitmentPlans associated with the Cognitive Services account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of Cognitive Services account. // - commitmentPlanName - The name of the commitmentPlan associated with the Cognitive Services Account @@ -578,7 +578,7 @@ func (client *CommitmentPlansClient) getCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -596,7 +596,7 @@ func (client *CommitmentPlansClient) getHandleResponse(resp *http.Response) (Com // GetAssociation - Gets the association of the Cognitive Services commitment plan. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - commitmentPlanName - The name of the commitmentPlan associated with the Cognitive Services Account // - commitmentPlanAssociationName - The name of the commitment plan association with the Cognitive Services Account @@ -648,7 +648,7 @@ func (client *CommitmentPlansClient) getAssociationCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -666,7 +666,7 @@ func (client *CommitmentPlansClient) getAssociationHandleResponse(resp *http.Res // GetPlan - Returns a Cognitive Services commitment plan specified by the parameters. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - commitmentPlanName - The name of the commitmentPlan associated with the Cognitive Services Account // - options - CommitmentPlansClientGetPlanOptions contains the optional parameters for the CommitmentPlansClient.GetPlan method. @@ -712,7 +712,7 @@ func (client *CommitmentPlansClient) getPlanCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -729,7 +729,7 @@ func (client *CommitmentPlansClient) getPlanHandleResponse(resp *http.Response) // NewListPager - Gets the commitmentPlans associated with the Cognitive Services account. // -// Generated from API version 2023-05-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of Cognitive Services account. // - options - CommitmentPlansClientListOptions contains the optional parameters for the CommitmentPlansClient.NewListPager @@ -777,7 +777,7 @@ func (client *CommitmentPlansClient) listCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -794,7 +794,7 @@ func (client *CommitmentPlansClient) listHandleResponse(resp *http.Response) (Co // NewListAssociationsPager - Gets the associations of the Cognitive Services commitment plan. // -// Generated from API version 2023-05-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - commitmentPlanName - The name of the commitmentPlan associated with the Cognitive Services Account // - options - CommitmentPlansClientListAssociationsOptions contains the optional parameters for the CommitmentPlansClient.NewListAssociationsPager @@ -842,7 +842,7 @@ func (client *CommitmentPlansClient) listAssociationsCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -859,7 +859,7 @@ func (client *CommitmentPlansClient) listAssociationsHandleResponse(resp *http.R // NewListPlansByResourceGroupPager - Returns all the resources of a particular type belonging to a resource group // -// Generated from API version 2023-05-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - options - CommitmentPlansClientListPlansByResourceGroupOptions contains the optional parameters for the CommitmentPlansClient.NewListPlansByResourceGroupPager // method. @@ -902,7 +902,7 @@ func (client *CommitmentPlansClient) listPlansByResourceGroupCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -919,7 +919,7 @@ func (client *CommitmentPlansClient) listPlansByResourceGroupHandleResponse(resp // NewListPlansBySubscriptionPager - Returns all the resources of a particular type belonging to a subscription. // -// Generated from API version 2023-05-01 +// Generated from API version 2024-10-01 // - options - CommitmentPlansClientListPlansBySubscriptionOptions contains the optional parameters for the CommitmentPlansClient.NewListPlansBySubscriptionPager // method. func (client *CommitmentPlansClient) NewListPlansBySubscriptionPager(options *CommitmentPlansClientListPlansBySubscriptionOptions) *runtime.Pager[CommitmentPlansClientListPlansBySubscriptionResponse] { @@ -957,7 +957,7 @@ func (client *CommitmentPlansClient) listPlansBySubscriptionCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -975,7 +975,7 @@ func (client *CommitmentPlansClient) listPlansBySubscriptionHandleResponse(resp // BeginUpdatePlan - Create Cognitive Services commitment plan. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - commitmentPlanName - The name of the commitmentPlan associated with the Cognitive Services Account // - commitmentPlan - The parameters to provide for the created commitment plan. @@ -1002,7 +1002,7 @@ func (client *CommitmentPlansClient) BeginUpdatePlan(ctx context.Context, resour // UpdatePlan - Create Cognitive Services commitment plan. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2024-10-01 func (client *CommitmentPlansClient) updatePlan(ctx context.Context, resourceGroupName string, commitmentPlanName string, commitmentPlan PatchResourceTagsAndSKU, options *CommitmentPlansClientBeginUpdatePlanOptions) (*http.Response, error) { var err error const operationName = "CommitmentPlansClient.BeginUpdatePlan" @@ -1044,7 +1044,7 @@ func (client *CommitmentPlansClient) updatePlanCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, commitmentPlan); err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/commitmenttiers_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/commitmenttiers_client.go index 790015c03..8d1078d9b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/commitmenttiers_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/commitmenttiers_client.go @@ -45,7 +45,7 @@ func NewCommitmentTiersClient(subscriptionID string, credential azcore.TokenCred // NewListPager - List Commitment Tiers. // -// Generated from API version 2023-05-01 +// Generated from API version 2024-10-01 // - location - Resource location. // - options - CommitmentTiersClientListOptions contains the optional parameters for the CommitmentTiersClient.NewListPager // method. @@ -88,7 +88,7 @@ func (client *CommitmentTiersClient) listCreateRequest(ctx context.Context, loca return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/constants.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/constants.go index e42f8185f..9cf5b2560 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/constants.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/constants.go @@ -10,7 +10,7 @@ package armcognitiveservices const ( moduleName = "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices" - moduleVersion = "v1.6.0" + moduleVersion = "v1.7.0" ) // AbusePenaltyAction - The action of AbusePenalty. @@ -43,6 +43,22 @@ func PossibleActionTypeValues() []ActionType { } } +// ByPassSelection - Setting for trusted services. +type ByPassSelection string + +const ( + ByPassSelectionAzureServices ByPassSelection = "AzureServices" + ByPassSelectionNone ByPassSelection = "None" +) + +// PossibleByPassSelectionValues returns the possible values for the ByPassSelection const type. +func PossibleByPassSelectionValues() []ByPassSelection { + return []ByPassSelection{ + ByPassSelectionAzureServices, + ByPassSelectionNone, + } +} + // CommitmentPlanProvisioningState - Gets the status of the resource at the time the operation was called. type CommitmentPlanProvisioningState string @@ -69,6 +85,24 @@ func PossibleCommitmentPlanProvisioningStateValues() []CommitmentPlanProvisionin } } +// ContentLevel - Level at which content is filtered. +type ContentLevel string + +const ( + ContentLevelHigh ContentLevel = "High" + ContentLevelLow ContentLevel = "Low" + ContentLevelMedium ContentLevel = "Medium" +) + +// PossibleContentLevelValues returns the possible values for the ContentLevel const type. +func PossibleContentLevelValues() []ContentLevel { + return []ContentLevel{ + ContentLevelHigh, + ContentLevelLow, + ContentLevelMedium, + } +} + // CreatedByType - The type of identity that created the resource. type CreatedByType string @@ -89,6 +123,22 @@ func PossibleCreatedByTypeValues() []CreatedByType { } } +// DefenderForAISettingState - Defender for AI state on the AI resource. +type DefenderForAISettingState string + +const ( + DefenderForAISettingStateDisabled DefenderForAISettingState = "Disabled" + DefenderForAISettingStateEnabled DefenderForAISettingState = "Enabled" +) + +// PossibleDefenderForAISettingStateValues returns the possible values for the DefenderForAISettingState const type. +func PossibleDefenderForAISettingStateValues() []DefenderForAISettingState { + return []DefenderForAISettingState{ + DefenderForAISettingStateDisabled, + DefenderForAISettingStateEnabled, + } +} + // DeploymentModelVersionUpgradeOption - Deployment model version upgrade option. type DeploymentModelVersionUpgradeOption string @@ -151,6 +201,48 @@ func PossibleDeploymentScaleTypeValues() []DeploymentScaleType { } } +// EncryptionScopeProvisioningState - Gets the status of the resource at the time the operation was called. +type EncryptionScopeProvisioningState string + +const ( + EncryptionScopeProvisioningStateAccepted EncryptionScopeProvisioningState = "Accepted" + EncryptionScopeProvisioningStateCanceled EncryptionScopeProvisioningState = "Canceled" + EncryptionScopeProvisioningStateCreating EncryptionScopeProvisioningState = "Creating" + EncryptionScopeProvisioningStateDeleting EncryptionScopeProvisioningState = "Deleting" + EncryptionScopeProvisioningStateFailed EncryptionScopeProvisioningState = "Failed" + EncryptionScopeProvisioningStateMoving EncryptionScopeProvisioningState = "Moving" + EncryptionScopeProvisioningStateSucceeded EncryptionScopeProvisioningState = "Succeeded" +) + +// PossibleEncryptionScopeProvisioningStateValues returns the possible values for the EncryptionScopeProvisioningState const type. +func PossibleEncryptionScopeProvisioningStateValues() []EncryptionScopeProvisioningState { + return []EncryptionScopeProvisioningState{ + EncryptionScopeProvisioningStateAccepted, + EncryptionScopeProvisioningStateCanceled, + EncryptionScopeProvisioningStateCreating, + EncryptionScopeProvisioningStateDeleting, + EncryptionScopeProvisioningStateFailed, + EncryptionScopeProvisioningStateMoving, + EncryptionScopeProvisioningStateSucceeded, + } +} + +// EncryptionScopeState - The encryptionScope state. +type EncryptionScopeState string + +const ( + EncryptionScopeStateDisabled EncryptionScopeState = "Disabled" + EncryptionScopeStateEnabled EncryptionScopeState = "Enabled" +) + +// PossibleEncryptionScopeStateValues returns the possible values for the EncryptionScopeState const type. +func PossibleEncryptionScopeStateValues() []EncryptionScopeState { + return []EncryptionScopeState{ + EncryptionScopeStateDisabled, + EncryptionScopeStateEnabled, + } +} + // HostingModel - Account hosting model. type HostingModel string @@ -207,15 +299,21 @@ func PossibleKeySourceValues() []KeySource { type ModelLifecycleStatus string const ( + ModelLifecycleStatusDeprecated ModelLifecycleStatus = "Deprecated" + ModelLifecycleStatusDeprecating ModelLifecycleStatus = "Deprecating" ModelLifecycleStatusGenerallyAvailable ModelLifecycleStatus = "GenerallyAvailable" ModelLifecycleStatusPreview ModelLifecycleStatus = "Preview" + ModelLifecycleStatusStable ModelLifecycleStatus = "Stable" ) // PossibleModelLifecycleStatusValues returns the possible values for the ModelLifecycleStatus const type. func PossibleModelLifecycleStatusValues() []ModelLifecycleStatus { return []ModelLifecycleStatus{ + ModelLifecycleStatusDeprecated, + ModelLifecycleStatusDeprecating, ModelLifecycleStatusGenerallyAvailable, ModelLifecycleStatusPreview, + ModelLifecycleStatusStable, } } @@ -236,6 +334,22 @@ func PossibleNetworkRuleActionValues() []NetworkRuleAction { } } +// NspAccessRuleDirection - Direction of Access Rule +type NspAccessRuleDirection string + +const ( + NspAccessRuleDirectionInbound NspAccessRuleDirection = "Inbound" + NspAccessRuleDirectionOutbound NspAccessRuleDirection = "Outbound" +) + +// PossibleNspAccessRuleDirectionValues returns the possible values for the NspAccessRuleDirection const type. +func PossibleNspAccessRuleDirectionValues() []NspAccessRuleDirection { + return []NspAccessRuleDirection{ + NspAccessRuleDirectionInbound, + NspAccessRuleDirectionOutbound, + } +} + // Origin - The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default // value is "user,system" type Origin string @@ -355,6 +469,60 @@ func PossibleQuotaUsageStatusValues() []QuotaUsageStatus { } } +// RaiPolicyContentSource - Content source to apply the Content Filters. +type RaiPolicyContentSource string + +const ( + RaiPolicyContentSourceCompletion RaiPolicyContentSource = "Completion" + RaiPolicyContentSourcePrompt RaiPolicyContentSource = "Prompt" +) + +// PossibleRaiPolicyContentSourceValues returns the possible values for the RaiPolicyContentSource const type. +func PossibleRaiPolicyContentSourceValues() []RaiPolicyContentSource { + return []RaiPolicyContentSource{ + RaiPolicyContentSourceCompletion, + RaiPolicyContentSourcePrompt, + } +} + +// RaiPolicyMode - Rai policy mode. The enum value mapping is as below: Default = 0, Deferred=1, Blocking=2, Asynchronousfilter +// =3. Please use 'Asynchronousfilter' after 2024-10-01. It is the same as 'Deferred' in +// previous version. +type RaiPolicyMode string + +const ( + RaiPolicyModeAsynchronousFilter RaiPolicyMode = "Asynchronous_filter" + RaiPolicyModeBlocking RaiPolicyMode = "Blocking" + RaiPolicyModeDefault RaiPolicyMode = "Default" + RaiPolicyModeDeferred RaiPolicyMode = "Deferred" +) + +// PossibleRaiPolicyModeValues returns the possible values for the RaiPolicyMode const type. +func PossibleRaiPolicyModeValues() []RaiPolicyMode { + return []RaiPolicyMode{ + RaiPolicyModeAsynchronousFilter, + RaiPolicyModeBlocking, + RaiPolicyModeDefault, + RaiPolicyModeDeferred, + } +} + +// RaiPolicyType - Content Filters policy type. +type RaiPolicyType string + +const ( + RaiPolicyTypeSystemManaged RaiPolicyType = "SystemManaged" + RaiPolicyTypeUserManaged RaiPolicyType = "UserManaged" +) + +// PossibleRaiPolicyTypeValues returns the possible values for the RaiPolicyType const type. +func PossibleRaiPolicyTypeValues() []RaiPolicyType { + return []RaiPolicyType{ + RaiPolicyTypeSystemManaged, + RaiPolicyTypeUserManaged, + } +} + // ResourceIdentityType - The identity type. type ResourceIdentityType string diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/defenderforaisettings_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/defenderforaisettings_client.go new file mode 100644 index 000000000..444cb8377 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/defenderforaisettings_client.go @@ -0,0 +1,327 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armcognitiveservices + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// DefenderForAISettingsClient contains the methods for the DefenderForAISettings group. +// Don't use this type directly, use NewDefenderForAISettingsClient() instead. +type DefenderForAISettingsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewDefenderForAISettingsClient creates a new instance of DefenderForAISettingsClient with the specified values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewDefenderForAISettingsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DefenderForAISettingsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &DefenderForAISettingsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Creates or Updates the specified Defender for AI setting. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-10-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of Cognitive Services account. +// - defenderForAISettingName - The name of the defender for AI setting. +// - defenderForAISettings - Properties describing the Defender for AI setting. +// - options - DefenderForAISettingsClientCreateOrUpdateOptions contains the optional parameters for the DefenderForAISettingsClient.CreateOrUpdate +// method. +func (client *DefenderForAISettingsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, accountName string, defenderForAISettingName string, defenderForAISettings DefenderForAISetting, options *DefenderForAISettingsClientCreateOrUpdateOptions) (DefenderForAISettingsClientCreateOrUpdateResponse, error) { + var err error + const operationName = "DefenderForAISettingsClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, accountName, defenderForAISettingName, defenderForAISettings, options) + if err != nil { + return DefenderForAISettingsClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return DefenderForAISettingsClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return DefenderForAISettingsClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *DefenderForAISettingsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, accountName string, defenderForAISettingName string, defenderForAISettings DefenderForAISetting, options *DefenderForAISettingsClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/defenderForAISettings/{defenderForAISettingName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if defenderForAISettingName == "" { + return nil, errors.New("parameter defenderForAISettingName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{defenderForAISettingName}", url.PathEscape(defenderForAISettingName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-10-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, defenderForAISettings); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *DefenderForAISettingsClient) createOrUpdateHandleResponse(resp *http.Response) (DefenderForAISettingsClientCreateOrUpdateResponse, error) { + result := DefenderForAISettingsClientCreateOrUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DefenderForAISetting); err != nil { + return DefenderForAISettingsClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// Get - Gets the specified Defender for AI setting by name. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-10-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of Cognitive Services account. +// - defenderForAISettingName - The name of the defender for AI setting. +// - options - DefenderForAISettingsClientGetOptions contains the optional parameters for the DefenderForAISettingsClient.Get +// method. +func (client *DefenderForAISettingsClient) Get(ctx context.Context, resourceGroupName string, accountName string, defenderForAISettingName string, options *DefenderForAISettingsClientGetOptions) (DefenderForAISettingsClientGetResponse, error) { + var err error + const operationName = "DefenderForAISettingsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, accountName, defenderForAISettingName, options) + if err != nil { + return DefenderForAISettingsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return DefenderForAISettingsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DefenderForAISettingsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *DefenderForAISettingsClient) getCreateRequest(ctx context.Context, resourceGroupName string, accountName string, defenderForAISettingName string, options *DefenderForAISettingsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/defenderForAISettings/{defenderForAISettingName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if defenderForAISettingName == "" { + return nil, errors.New("parameter defenderForAISettingName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{defenderForAISettingName}", url.PathEscape(defenderForAISettingName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-10-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *DefenderForAISettingsClient) getHandleResponse(resp *http.Response) (DefenderForAISettingsClientGetResponse, error) { + result := DefenderForAISettingsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DefenderForAISetting); err != nil { + return DefenderForAISettingsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Lists the Defender for AI settings. +// +// Generated from API version 2024-10-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of Cognitive Services account. +// - options - DefenderForAISettingsClientListOptions contains the optional parameters for the DefenderForAISettingsClient.NewListPager +// method. +func (client *DefenderForAISettingsClient) NewListPager(resourceGroupName string, accountName string, options *DefenderForAISettingsClientListOptions) *runtime.Pager[DefenderForAISettingsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[DefenderForAISettingsClientListResponse]{ + More: func(page DefenderForAISettingsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *DefenderForAISettingsClientListResponse) (DefenderForAISettingsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DefenderForAISettingsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, accountName, options) + }, nil) + if err != nil { + return DefenderForAISettingsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *DefenderForAISettingsClient) listCreateRequest(ctx context.Context, resourceGroupName string, accountName string, options *DefenderForAISettingsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/defenderForAISettings" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-10-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *DefenderForAISettingsClient) listHandleResponse(resp *http.Response) (DefenderForAISettingsClientListResponse, error) { + result := DefenderForAISettingsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DefenderForAISettingResult); err != nil { + return DefenderForAISettingsClientListResponse{}, err + } + return result, nil +} + +// Update - Updates the specified Defender for AI setting. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-10-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of Cognitive Services account. +// - defenderForAISettingName - The name of the defender for AI setting. +// - defenderForAISettings - Properties describing the Defender for AI setting. +// - options - DefenderForAISettingsClientUpdateOptions contains the optional parameters for the DefenderForAISettingsClient.Update +// method. +func (client *DefenderForAISettingsClient) Update(ctx context.Context, resourceGroupName string, accountName string, defenderForAISettingName string, defenderForAISettings DefenderForAISetting, options *DefenderForAISettingsClientUpdateOptions) (DefenderForAISettingsClientUpdateResponse, error) { + var err error + const operationName = "DefenderForAISettingsClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, accountName, defenderForAISettingName, defenderForAISettings, options) + if err != nil { + return DefenderForAISettingsClientUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return DefenderForAISettingsClientUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DefenderForAISettingsClientUpdateResponse{}, err + } + resp, err := client.updateHandleResponse(httpResp) + return resp, err +} + +// updateCreateRequest creates the Update request. +func (client *DefenderForAISettingsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, accountName string, defenderForAISettingName string, defenderForAISettings DefenderForAISetting, options *DefenderForAISettingsClientUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/defenderForAISettings/{defenderForAISettingName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if defenderForAISettingName == "" { + return nil, errors.New("parameter defenderForAISettingName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{defenderForAISettingName}", url.PathEscape(defenderForAISettingName)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-10-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, defenderForAISettings); err != nil { + return nil, err + } + return req, nil +} + +// updateHandleResponse handles the Update response. +func (client *DefenderForAISettingsClient) updateHandleResponse(resp *http.Response) (DefenderForAISettingsClientUpdateResponse, error) { + result := DefenderForAISettingsClientUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DefenderForAISetting); err != nil { + return DefenderForAISettingsClientUpdateResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/deletedaccounts_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/deletedaccounts_client.go index f3e3acb93..692a0bbf6 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/deletedaccounts_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/deletedaccounts_client.go @@ -46,7 +46,7 @@ func NewDeletedAccountsClient(subscriptionID string, credential azcore.TokenCred // Get - Returns a Cognitive Services account specified by the parameters. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2024-10-01 // - location - Resource location. // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of Cognitive Services account. @@ -97,7 +97,7 @@ func (client *DeletedAccountsClient) getCreateRequest(ctx context.Context, locat return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -114,7 +114,7 @@ func (client *DeletedAccountsClient) getHandleResponse(resp *http.Response) (Del // NewListPager - Returns all the resources of a particular type belonging to a subscription. // -// Generated from API version 2023-05-01 +// Generated from API version 2024-10-01 // - options - DeletedAccountsClientListOptions contains the optional parameters for the DeletedAccountsClient.NewListPager // method. func (client *DeletedAccountsClient) NewListPager(options *DeletedAccountsClientListOptions) *runtime.Pager[DeletedAccountsClientListResponse] { @@ -152,7 +152,7 @@ func (client *DeletedAccountsClient) listCreateRequest(ctx context.Context, opti return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -170,7 +170,7 @@ func (client *DeletedAccountsClient) listHandleResponse(resp *http.Response) (De // BeginPurge - Deletes a Cognitive Services account from the resource group. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2024-10-01 // - location - Resource location. // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of Cognitive Services account. @@ -196,7 +196,7 @@ func (client *DeletedAccountsClient) BeginPurge(ctx context.Context, location st // Purge - Deletes a Cognitive Services account from the resource group. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2024-10-01 func (client *DeletedAccountsClient) purge(ctx context.Context, location string, resourceGroupName string, accountName string, options *DeletedAccountsClientBeginPurgeOptions) (*http.Response, error) { var err error const operationName = "DeletedAccountsClient.BeginPurge" @@ -242,7 +242,7 @@ func (client *DeletedAccountsClient) purgeCreateRequest(ctx context.Context, loc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/deployments_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/deployments_client.go index c045f05c2..50c4d053a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/deployments_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/deployments_client.go @@ -46,7 +46,7 @@ func NewDeploymentsClient(subscriptionID string, credential azcore.TokenCredenti // BeginCreateOrUpdate - Update the state of specified deployments associated with the Cognitive Services account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of Cognitive Services account. // - deploymentName - The name of the deployment associated with the Cognitive Services Account @@ -74,7 +74,7 @@ func (client *DeploymentsClient) BeginCreateOrUpdate(ctx context.Context, resour // CreateOrUpdate - Update the state of specified deployments associated with the Cognitive Services account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2024-10-01 func (client *DeploymentsClient) createOrUpdate(ctx context.Context, resourceGroupName string, accountName string, deploymentName string, deployment Deployment, options *DeploymentsClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "DeploymentsClient.BeginCreateOrUpdate" @@ -120,7 +120,7 @@ func (client *DeploymentsClient) createOrUpdateCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, deployment); err != nil { @@ -132,7 +132,7 @@ func (client *DeploymentsClient) createOrUpdateCreateRequest(ctx context.Context // BeginDelete - Deletes the specified deployment associated with the Cognitive Services account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of Cognitive Services account. // - deploymentName - The name of the deployment associated with the Cognitive Services Account @@ -157,7 +157,7 @@ func (client *DeploymentsClient) BeginDelete(ctx context.Context, resourceGroupN // Delete - Deletes the specified deployment associated with the Cognitive Services account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2024-10-01 func (client *DeploymentsClient) deleteOperation(ctx context.Context, resourceGroupName string, accountName string, deploymentName string, options *DeploymentsClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "DeploymentsClient.BeginDelete" @@ -203,7 +203,7 @@ func (client *DeploymentsClient) deleteCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -212,7 +212,7 @@ func (client *DeploymentsClient) deleteCreateRequest(ctx context.Context, resour // Get - Gets the specified deployments associated with the Cognitive Services account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of Cognitive Services account. // - deploymentName - The name of the deployment associated with the Cognitive Services Account @@ -263,7 +263,7 @@ func (client *DeploymentsClient) getCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -280,7 +280,7 @@ func (client *DeploymentsClient) getHandleResponse(resp *http.Response) (Deploym // NewListPager - Gets the deployments associated with the Cognitive Services account. // -// Generated from API version 2023-05-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of Cognitive Services account. // - options - DeploymentsClientListOptions contains the optional parameters for the DeploymentsClient.NewListPager method. @@ -327,7 +327,7 @@ func (client *DeploymentsClient) listCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -341,3 +341,158 @@ func (client *DeploymentsClient) listHandleResponse(resp *http.Response) (Deploy } return result, nil } + +// NewListSKUsPager - Lists the specified deployments skus associated with the Cognitive Services account. +// +// Generated from API version 2024-10-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of Cognitive Services account. +// - deploymentName - The name of the deployment associated with the Cognitive Services Account +// - options - DeploymentsClientListSKUsOptions contains the optional parameters for the DeploymentsClient.NewListSKUsPager +// method. +func (client *DeploymentsClient) NewListSKUsPager(resourceGroupName string, accountName string, deploymentName string, options *DeploymentsClientListSKUsOptions) *runtime.Pager[DeploymentsClientListSKUsResponse] { + return runtime.NewPager(runtime.PagingHandler[DeploymentsClientListSKUsResponse]{ + More: func(page DeploymentsClientListSKUsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *DeploymentsClientListSKUsResponse) (DeploymentsClientListSKUsResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DeploymentsClient.NewListSKUsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listSKUsCreateRequest(ctx, resourceGroupName, accountName, deploymentName, options) + }, nil) + if err != nil { + return DeploymentsClientListSKUsResponse{}, err + } + return client.listSKUsHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listSKUsCreateRequest creates the ListSKUs request. +func (client *DeploymentsClient) listSKUsCreateRequest(ctx context.Context, resourceGroupName string, accountName string, deploymentName string, options *DeploymentsClientListSKUsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/deployments/{deploymentName}/skus" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if deploymentName == "" { + return nil, errors.New("parameter deploymentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{deploymentName}", url.PathEscape(deploymentName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-10-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listSKUsHandleResponse handles the ListSKUs response. +func (client *DeploymentsClient) listSKUsHandleResponse(resp *http.Response) (DeploymentsClientListSKUsResponse, error) { + result := DeploymentsClientListSKUsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DeploymentSKUListResult); err != nil { + return DeploymentsClientListSKUsResponse{}, err + } + return result, nil +} + +// BeginUpdate - Update specified deployments associated with the Cognitive Services account. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-10-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of Cognitive Services account. +// - deploymentName - The name of the deployment associated with the Cognitive Services Account +// - deployment - The deployment properties. +// - options - DeploymentsClientBeginUpdateOptions contains the optional parameters for the DeploymentsClient.BeginUpdate method. +func (client *DeploymentsClient) BeginUpdate(ctx context.Context, resourceGroupName string, accountName string, deploymentName string, deployment PatchResourceTagsAndSKU, options *DeploymentsClientBeginUpdateOptions) (*runtime.Poller[DeploymentsClientUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.update(ctx, resourceGroupName, accountName, deploymentName, deployment, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DeploymentsClientUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DeploymentsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Update - Update specified deployments associated with the Cognitive Services account. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-10-01 +func (client *DeploymentsClient) update(ctx context.Context, resourceGroupName string, accountName string, deploymentName string, deployment PatchResourceTagsAndSKU, options *DeploymentsClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "DeploymentsClient.BeginUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, accountName, deploymentName, deployment, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// updateCreateRequest creates the Update request. +func (client *DeploymentsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, accountName string, deploymentName string, deployment PatchResourceTagsAndSKU, options *DeploymentsClientBeginUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/deployments/{deploymentName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if deploymentName == "" { + return nil, errors.New("parameter deploymentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{deploymentName}", url.PathEscape(deploymentName)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-10-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, deployment); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/encryptionscopes_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/encryptionscopes_client.go new file mode 100644 index 000000000..6f3b137e4 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/encryptionscopes_client.go @@ -0,0 +1,333 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armcognitiveservices + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// EncryptionScopesClient contains the methods for the EncryptionScopes group. +// Don't use this type directly, use NewEncryptionScopesClient() instead. +type EncryptionScopesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewEncryptionScopesClient creates a new instance of EncryptionScopesClient with the specified values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewEncryptionScopesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*EncryptionScopesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &EncryptionScopesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Update the state of specified encryptionScope associated with the Cognitive Services account. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-10-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of Cognitive Services account. +// - encryptionScopeName - The name of the encryptionScope associated with the Cognitive Services Account +// - encryptionScope - The encryptionScope properties. +// - options - EncryptionScopesClientCreateOrUpdateOptions contains the optional parameters for the EncryptionScopesClient.CreateOrUpdate +// method. +func (client *EncryptionScopesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, accountName string, encryptionScopeName string, encryptionScope EncryptionScope, options *EncryptionScopesClientCreateOrUpdateOptions) (EncryptionScopesClientCreateOrUpdateResponse, error) { + var err error + const operationName = "EncryptionScopesClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, accountName, encryptionScopeName, encryptionScope, options) + if err != nil { + return EncryptionScopesClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return EncryptionScopesClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return EncryptionScopesClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *EncryptionScopesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, accountName string, encryptionScopeName string, encryptionScope EncryptionScope, options *EncryptionScopesClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/encryptionScopes/{encryptionScopeName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if encryptionScopeName == "" { + return nil, errors.New("parameter encryptionScopeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{encryptionScopeName}", url.PathEscape(encryptionScopeName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-10-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, encryptionScope); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *EncryptionScopesClient) createOrUpdateHandleResponse(resp *http.Response) (EncryptionScopesClientCreateOrUpdateResponse, error) { + result := EncryptionScopesClientCreateOrUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.EncryptionScope); err != nil { + return EncryptionScopesClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// BeginDelete - Deletes the specified encryptionScope associated with the Cognitive Services account. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-10-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of Cognitive Services account. +// - encryptionScopeName - The name of the encryptionScope associated with the Cognitive Services Account +// - options - EncryptionScopesClientBeginDeleteOptions contains the optional parameters for the EncryptionScopesClient.BeginDelete +// method. +func (client *EncryptionScopesClient) BeginDelete(ctx context.Context, resourceGroupName string, accountName string, encryptionScopeName string, options *EncryptionScopesClientBeginDeleteOptions) (*runtime.Poller[EncryptionScopesClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, accountName, encryptionScopeName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[EncryptionScopesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[EncryptionScopesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes the specified encryptionScope associated with the Cognitive Services account. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-10-01 +func (client *EncryptionScopesClient) deleteOperation(ctx context.Context, resourceGroupName string, accountName string, encryptionScopeName string, options *EncryptionScopesClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "EncryptionScopesClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, accountName, encryptionScopeName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *EncryptionScopesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, accountName string, encryptionScopeName string, options *EncryptionScopesClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/encryptionScopes/{encryptionScopeName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if encryptionScopeName == "" { + return nil, errors.New("parameter encryptionScopeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{encryptionScopeName}", url.PathEscape(encryptionScopeName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-10-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets the specified EncryptionScope associated with the Cognitive Services account. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-10-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of Cognitive Services account. +// - encryptionScopeName - The name of the encryptionScope associated with the Cognitive Services Account +// - options - EncryptionScopesClientGetOptions contains the optional parameters for the EncryptionScopesClient.Get method. +func (client *EncryptionScopesClient) Get(ctx context.Context, resourceGroupName string, accountName string, encryptionScopeName string, options *EncryptionScopesClientGetOptions) (EncryptionScopesClientGetResponse, error) { + var err error + const operationName = "EncryptionScopesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, accountName, encryptionScopeName, options) + if err != nil { + return EncryptionScopesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return EncryptionScopesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return EncryptionScopesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *EncryptionScopesClient) getCreateRequest(ctx context.Context, resourceGroupName string, accountName string, encryptionScopeName string, options *EncryptionScopesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/encryptionScopes/{encryptionScopeName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if encryptionScopeName == "" { + return nil, errors.New("parameter encryptionScopeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{encryptionScopeName}", url.PathEscape(encryptionScopeName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-10-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *EncryptionScopesClient) getHandleResponse(resp *http.Response) (EncryptionScopesClientGetResponse, error) { + result := EncryptionScopesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.EncryptionScope); err != nil { + return EncryptionScopesClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Gets the content filters associated with the Azure OpenAI account. +// +// Generated from API version 2024-10-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of Cognitive Services account. +// - options - EncryptionScopesClientListOptions contains the optional parameters for the EncryptionScopesClient.NewListPager +// method. +func (client *EncryptionScopesClient) NewListPager(resourceGroupName string, accountName string, options *EncryptionScopesClientListOptions) *runtime.Pager[EncryptionScopesClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[EncryptionScopesClientListResponse]{ + More: func(page EncryptionScopesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *EncryptionScopesClientListResponse) (EncryptionScopesClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "EncryptionScopesClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, accountName, options) + }, nil) + if err != nil { + return EncryptionScopesClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *EncryptionScopesClient) listCreateRequest(ctx context.Context, resourceGroupName string, accountName string, options *EncryptionScopesClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/encryptionScopes" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-10-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *EncryptionScopesClient) listHandleResponse(resp *http.Response) (EncryptionScopesClientListResponse, error) { + result := EncryptionScopesClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.EncryptionScopeListResult); err != nil { + return EncryptionScopesClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/locationbasedmodelcapacities_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/locationbasedmodelcapacities_client.go new file mode 100644 index 000000000..514e8b354 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/locationbasedmodelcapacities_client.go @@ -0,0 +1,110 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armcognitiveservices + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// LocationBasedModelCapacitiesClient contains the methods for the LocationBasedModelCapacities group. +// Don't use this type directly, use NewLocationBasedModelCapacitiesClient() instead. +type LocationBasedModelCapacitiesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewLocationBasedModelCapacitiesClient creates a new instance of LocationBasedModelCapacitiesClient with the specified values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewLocationBasedModelCapacitiesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LocationBasedModelCapacitiesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &LocationBasedModelCapacitiesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// NewListPager - List Location Based ModelCapacities. +// +// Generated from API version 2024-10-01 +// - location - Resource location. +// - modelFormat - The format of the Model +// - modelName - The name of the Model +// - modelVersion - The version of the Model +// - options - LocationBasedModelCapacitiesClientListOptions contains the optional parameters for the LocationBasedModelCapacitiesClient.NewListPager +// method. +func (client *LocationBasedModelCapacitiesClient) NewListPager(location string, modelFormat string, modelName string, modelVersion string, options *LocationBasedModelCapacitiesClientListOptions) *runtime.Pager[LocationBasedModelCapacitiesClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[LocationBasedModelCapacitiesClientListResponse]{ + More: func(page LocationBasedModelCapacitiesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *LocationBasedModelCapacitiesClientListResponse) (LocationBasedModelCapacitiesClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "LocationBasedModelCapacitiesClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, location, modelFormat, modelName, modelVersion, options) + }, nil) + if err != nil { + return LocationBasedModelCapacitiesClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *LocationBasedModelCapacitiesClient) listCreateRequest(ctx context.Context, location string, modelFormat string, modelName string, modelVersion string, options *LocationBasedModelCapacitiesClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/locations/{location}/modelCapacities" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if location == "" { + return nil, errors.New("parameter location cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-10-01") + reqQP.Set("modelFormat", modelFormat) + reqQP.Set("modelName", modelName) + reqQP.Set("modelVersion", modelVersion) + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *LocationBasedModelCapacitiesClient) listHandleResponse(resp *http.Response) (LocationBasedModelCapacitiesClientListResponse, error) { + result := LocationBasedModelCapacitiesClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ModelCapacityListResult); err != nil { + return LocationBasedModelCapacitiesClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/management_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/management_client.go index fb576233d..07bfa4f2d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/management_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/management_client.go @@ -43,10 +43,69 @@ func NewManagementClient(subscriptionID string, credential azcore.TokenCredentia return client, nil } +// CalculateModelCapacity - Model capacity calculator. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-10-01 +// - parameters - Check Domain Availability parameter. +// - options - ManagementClientCalculateModelCapacityOptions contains the optional parameters for the ManagementClient.CalculateModelCapacity +// method. +func (client *ManagementClient) CalculateModelCapacity(ctx context.Context, parameters CalculateModelCapacityParameter, options *ManagementClientCalculateModelCapacityOptions) (ManagementClientCalculateModelCapacityResponse, error) { + var err error + const operationName = "ManagementClient.CalculateModelCapacity" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.calculateModelCapacityCreateRequest(ctx, parameters, options) + if err != nil { + return ManagementClientCalculateModelCapacityResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ManagementClientCalculateModelCapacityResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ManagementClientCalculateModelCapacityResponse{}, err + } + resp, err := client.calculateModelCapacityHandleResponse(httpResp) + return resp, err +} + +// calculateModelCapacityCreateRequest creates the CalculateModelCapacity request. +func (client *ManagementClient) calculateModelCapacityCreateRequest(ctx context.Context, parameters CalculateModelCapacityParameter, options *ManagementClientCalculateModelCapacityOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/calculateModelCapacity" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-10-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// calculateModelCapacityHandleResponse handles the CalculateModelCapacity response. +func (client *ManagementClient) calculateModelCapacityHandleResponse(resp *http.Response) (ManagementClientCalculateModelCapacityResponse, error) { + result := ManagementClientCalculateModelCapacityResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.CalculateModelCapacityResult); err != nil { + return ManagementClientCalculateModelCapacityResponse{}, err + } + return result, nil +} + // CheckDomainAvailability - Check whether a domain is available. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2024-10-01 // - parameters - Check Domain Availability parameter. // - options - ManagementClientCheckDomainAvailabilityOptions contains the optional parameters for the ManagementClient.CheckDomainAvailability // method. @@ -84,7 +143,7 @@ func (client *ManagementClient) checkDomainAvailabilityCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { @@ -105,7 +164,7 @@ func (client *ManagementClient) checkDomainAvailabilityHandleResponse(resp *http // CheckSKUAvailability - Check available SKUs. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2024-10-01 // - location - Resource location. // - parameters - Check SKU Availability POST body. // - options - ManagementClientCheckSKUAvailabilityOptions contains the optional parameters for the ManagementClient.CheckSKUAvailability @@ -148,7 +207,7 @@ func (client *ManagementClient) checkSKUAvailabilityCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/modelcapacities_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/modelcapacities_client.go new file mode 100644 index 000000000..9a4be0a60 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/modelcapacities_client.go @@ -0,0 +1,105 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armcognitiveservices + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ModelCapacitiesClient contains the methods for the ModelCapacities group. +// Don't use this type directly, use NewModelCapacitiesClient() instead. +type ModelCapacitiesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewModelCapacitiesClient creates a new instance of ModelCapacitiesClient with the specified values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewModelCapacitiesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ModelCapacitiesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ModelCapacitiesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// NewListPager - List ModelCapacities. +// +// Generated from API version 2024-10-01 +// - modelFormat - The format of the Model +// - modelName - The name of the Model +// - modelVersion - The version of the Model +// - options - ModelCapacitiesClientListOptions contains the optional parameters for the ModelCapacitiesClient.NewListPager +// method. +func (client *ModelCapacitiesClient) NewListPager(modelFormat string, modelName string, modelVersion string, options *ModelCapacitiesClientListOptions) *runtime.Pager[ModelCapacitiesClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[ModelCapacitiesClientListResponse]{ + More: func(page ModelCapacitiesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ModelCapacitiesClientListResponse) (ModelCapacitiesClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ModelCapacitiesClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, modelFormat, modelName, modelVersion, options) + }, nil) + if err != nil { + return ModelCapacitiesClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *ModelCapacitiesClient) listCreateRequest(ctx context.Context, modelFormat string, modelName string, modelVersion string, options *ModelCapacitiesClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/modelCapacities" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-10-01") + reqQP.Set("modelFormat", modelFormat) + reqQP.Set("modelName", modelName) + reqQP.Set("modelVersion", modelVersion) + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *ModelCapacitiesClient) listHandleResponse(resp *http.Response) (ModelCapacitiesClientListResponse, error) { + result := ModelCapacitiesClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ModelCapacityListResult); err != nil { + return ModelCapacitiesClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/models.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/models.go index 813eec5fe..2acc95538 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/models.go @@ -115,7 +115,7 @@ type AccountListResult struct { // AccountModel - Cognitive Services account Model. type AccountModel struct { - // Base Model Identifier. + // Properties of Cognitive Services account deployment model. BaseModel *DeploymentModel // The capabilities. @@ -142,12 +142,18 @@ type AccountModel struct { // Deployment model name. Name *string + // Deployment model publisher. + Publisher *string + // The list of Model Sku. SKUs []*ModelSKU // Optional. Deployment model source ARM resource ID. Source *string + // Optional. Source of the model, another Microsoft.CognitiveServices accounts ARM resource ID. + SourceAccount *string + // Optional. Deployment model version. If version is not specified, a default version will be assigned. The default version // is different for different models and might change when there is new version // available for a model. Default version for a model could be found from list models API. @@ -175,6 +181,9 @@ type AccountProperties struct { APIProperties *APIProperties AllowedFqdnList []*string + // The user owned AML workspace properties. + AmlWorkspace *UserOwnedAmlWorkspace + // Optional subdomain name used for token-based authentication. CustomSubDomainName *string DisableLocalAuth *bool @@ -195,7 +204,10 @@ type AccountProperties struct { NetworkACLs *NetworkRuleSet // Whether or not public endpoint access is allowed for this account. - PublicNetworkAccess *PublicNetworkAccess + PublicNetworkAccess *PublicNetworkAccess + + // Cognitive Services Rai Monitor Config. + RaiMonitorConfig *RaiMonitorConfig Restore *bool RestrictOutboundNetworkAccess *bool @@ -279,6 +291,40 @@ type AzureEntityResource struct { Type *string } +type BillingMeterInfo struct { + MeterID *string + Name *string + Unit *string +} + +// CalculateModelCapacityParameter - Calculate Model Capacity parameter. +type CalculateModelCapacityParameter struct { + // Properties of Cognitive Services account deployment model. + Model *DeploymentModel + + // The name of SKU. + SKUName *string + + // List of Model Capacity Calculator Workload. + Workloads []*ModelCapacityCalculatorWorkload +} + +// CalculateModelCapacityResult - Calculate Model Capacity result. +type CalculateModelCapacityResult struct { + // Model Estimated Capacity. + EstimatedCapacity *CalculateModelCapacityResultEstimatedCapacity + + // Properties of Cognitive Services account deployment model. + Model *DeploymentModel + SKUName *string +} + +// CalculateModelCapacityResultEstimatedCapacity - Model Estimated Capacity. +type CalculateModelCapacityResultEstimatedCapacity struct { + DeployableValue *int32 + Value *int32 +} + // CallRateLimit - The call rate limit Cognitive Services account. type CallRateLimit struct { // The count value of Call Rate Limit. @@ -291,6 +337,9 @@ type CallRateLimit struct { // CapacityConfig - The capacity configuration. type CapacityConfig struct { + // The array of allowed values for capacity. + AllowedValues []*int32 + // The default capacity. Default *int32 @@ -318,7 +367,7 @@ type CheckDomainAvailabilityParameter struct { // CheckSKUAvailabilityParameter - Check SKU availability parameter. type CheckSKUAvailabilityParameter struct { - // REQUIRED; The Kind of the resource. + // REQUIRED; The kind (type) of cognitive service account. Kind *string // REQUIRED; The SKU of the resource. @@ -393,6 +442,9 @@ type CommitmentPlanAccountAssociation struct { // Properties of Cognitive Services account commitment plan association. Properties *CommitmentPlanAccountAssociationProperties + // Resource tags. + Tags map[string]*string + // READ-ONLY; Resource Etag. Etag *string @@ -518,6 +570,57 @@ type CommitmentTierListResult struct { Value []*CommitmentTier } +// CustomBlocklistConfig - Gets or sets the source to which filter applies. +type CustomBlocklistConfig struct { + // If blocking would occur. + Blocking *bool + + // Name of ContentFilter. + BlocklistName *string + + // Content source to apply the Content Filters. + Source *RaiPolicyContentSource +} + +// DefenderForAISetting - The Defender for AI resource. +type DefenderForAISetting struct { + // The Defender for AI resource properties. + Properties *DefenderForAISettingProperties + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; Resource Etag. + Etag *string + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; Metadata pertaining to creation and last modification of the resource. + SystemData *SystemData + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// DefenderForAISettingProperties - The Defender for AI resource properties. +type DefenderForAISettingProperties struct { + // Defender for AI state on the AI resource. + State *DefenderForAISettingState +} + +// DefenderForAISettingResult - The list of cognitive services Defender for AI Settings. +type DefenderForAISettingResult struct { + // The link used to get the next page of Defender for AI Settings. + NextLink *string + + // The list of Defender for AI Settings. + Value []*DefenderForAISetting +} + // Deployment - Cognitive Services account deployment. type Deployment struct { // Properties of Cognitive Services account deployment. @@ -526,6 +629,9 @@ type Deployment struct { // The resource model definition representing SKU SKU *SKU + // Resource tags. + Tags map[string]*string + // READ-ONLY; Resource Etag. Etag *string @@ -542,6 +648,15 @@ type Deployment struct { Type *string } +// DeploymentCapacitySettings - Internal use only. +type DeploymentCapacitySettings struct { + // The designated capacity. + DesignatedCapacity *int32 + + // The priority of this capacity setting. + Priority *int32 +} + // DeploymentListResult - The list of cognitive services accounts operation response. type DeploymentListResult struct { // The link used to get the next page of Deployment. @@ -559,9 +674,15 @@ type DeploymentModel struct { // Deployment model name. Name *string + // Deployment model publisher. + Publisher *string + // Optional. Deployment model source ARM resource ID. Source *string + // Optional. Source of the model, another Microsoft.CognitiveServices accounts ARM resource ID. + SourceAccount *string + // Optional. Deployment model version. If version is not specified, a default version will be assigned. The default version // is different for different models and might change when there is new version // available for a model. Default version for a model could be found from list models API. @@ -573,13 +694,22 @@ type DeploymentModel struct { // DeploymentProperties - Properties of Cognitive Services account deployment. type DeploymentProperties struct { + // Internal use only. + CapacitySettings *DeploymentCapacitySettings + + // The current capacity. + CurrentCapacity *int32 + // Properties of Cognitive Services account deployment model. Model *DeploymentModel + // The name of parent deployment. + ParentDeploymentName *string + // The name of RAI policy. RaiPolicyName *string - // Properties of Cognitive Services account deployment model. + // Properties of Cognitive Services account deployment model. (Deprecated, please use Deployment.sku instead.) ScaleSettings *DeploymentScaleSettings // Deployment model version upgrade option. @@ -591,6 +721,9 @@ type DeploymentProperties struct { // READ-ONLY; The capabilities. Capabilities map[string]*string + // READ-ONLY; If the dynamic throttling is enabled. + DynamicThrottlingEnabled *bool + // READ-ONLY; Gets the status of the resource at the time the operation was called. ProvisioningState *DeploymentProvisioningState @@ -598,7 +731,17 @@ type DeploymentProperties struct { RateLimits []*ThrottlingRule } -// DeploymentScaleSettings - Properties of Cognitive Services account deployment model. +// DeploymentSKUListResult - The list of cognitive services accounts operation response. +type DeploymentSKUListResult struct { + // The link used to get the next page of deployment skus. + NextLink *string + + // READ-ONLY; Gets the list of Cognitive Services accounts deployment skus. + Value []*SKUResource +} + +// DeploymentScaleSettings - Properties of Cognitive Services account deployment model. (Deprecated, please use Deployment.sku +// instead.) type DeploymentScaleSettings struct { // Deployment capacity. Capacity *int32 @@ -637,6 +780,54 @@ type Encryption struct { KeyVaultProperties *KeyVaultProperties } +// EncryptionScope - Cognitive Services EncryptionScope +type EncryptionScope struct { + // Properties of Cognitive Services EncryptionScope. + Properties *EncryptionScopeProperties + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; Resource Etag. + Etag *string + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; Metadata pertaining to creation and last modification of the resource. + SystemData *SystemData + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// EncryptionScopeListResult - The list of cognitive services EncryptionScopes. +type EncryptionScopeListResult struct { + // The link used to get the next page of EncryptionScope. + NextLink *string + + // The list of EncryptionScope. + Value []*EncryptionScope +} + +// EncryptionScopeProperties - Properties to EncryptionScope +type EncryptionScopeProperties struct { + // Enumerates the possible value of keySource for Encryption + KeySource *KeySource + + // Properties of KeyVault + KeyVaultProperties *KeyVaultProperties + + // The encryptionScope state. + State *EncryptionScopeState + + // READ-ONLY; Gets the status of the resource at the time the operation was called. + ProvisioningState *EncryptionScopeProvisioningState +} + // ErrorAdditionalInfo - The resource management error additional info. type ErrorAdditionalInfo struct { // READ-ONLY; The additional info. @@ -720,16 +911,63 @@ type MetricName struct { // Model - Cognitive Services Model. type Model struct { - // The Kind of the Model. + // The description of the model. + Description *string + + // The kind (type) of cognitive service account. Kind *string - // Model Metadata. + // Cognitive Services account Model. Model *AccountModel - // The SKU of the Model. + // The name of SKU. SKUName *string } +// ModelCapacityCalculatorWorkload - Model Capacity Calculator Workload. +type ModelCapacityCalculatorWorkload struct { + // Dictionary, Model Capacity Calculator Workload Parameters. + RequestParameters *ModelCapacityCalculatorWorkloadRequestParam + + // Request per minute. + RequestPerMinute *int64 +} + +// ModelCapacityCalculatorWorkloadRequestParam - Dictionary, Model Capacity Calculator Workload Parameters. +type ModelCapacityCalculatorWorkloadRequestParam struct { + // Average generated tokens. + AvgGeneratedTokens *int64 + + // Average prompt tokens. + AvgPromptTokens *int64 +} + +// ModelCapacityListResult - The list of cognitive services accounts operation response. +type ModelCapacityListResult struct { + // The link used to get the next page of ModelSkuCapacity. + NextLink *string + + // Gets the list of Cognitive Services accounts ModelSkuCapacity. + Value []*ModelCapacityListResultValueItem +} + +type ModelCapacityListResultValueItem struct { + // The location of the Model Sku Capacity. + Location *string + + // Cognitive Services account ModelSkuCapacity. + Properties *ModelSKUCapacityProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + // ModelDeprecationInfo - Cognitive Services account ModelDeprecationInfo. type ModelDeprecationInfo struct { // The datetime of deprecation of the fineTune Model. @@ -753,6 +991,9 @@ type ModelSKU struct { // The capacity configuration. Capacity *CapacityConfig + // The list of billing meter info. + Cost []*BillingMeterInfo + // The datetime of deprecation of the model SKU. DeprecationDate *time.Time @@ -766,6 +1007,19 @@ type ModelSKU struct { UsageName *string } +// ModelSKUCapacityProperties - Cognitive Services account ModelSkuCapacity. +type ModelSKUCapacityProperties struct { + // The available capacity for deployment with this model and sku. + AvailableCapacity *float32 + + // The available capacity for deployment with a fine-tune version of this model and sku. + AvailableFinetuneCapacity *float32 + + // Properties of Cognitive Services account deployment model. + Model *DeploymentModel + SKUName *string +} + // MultiRegionSettings - The multiregion settings Cognitive Services account. type MultiRegionSettings struct { Regions []*RegionSetting @@ -776,6 +1030,9 @@ type MultiRegionSettings struct { // NetworkRuleSet - A set of rules governing the network accessibility. type NetworkRuleSet struct { + // Setting for trusted services. + Bypass *ByPassSelection + // The default action when no rule from ipRules and from virtualNetworkRules match. This is only used after the bypass property // has been evaluated. DefaultAction *NetworkRuleAction @@ -787,6 +1044,119 @@ type NetworkRuleSet struct { VirtualNetworkRules []*VirtualNetworkRule } +// NetworkSecurityPerimeter - Information about a linked Network Security Perimeter +type NetworkSecurityPerimeter struct { + // Fully qualified identifier of the resource + ID *string + + // Location of the resource + Location *string + + // Guid of the resource + PerimeterGUID *string +} + +// NetworkSecurityPerimeterAccessRule - Network Security Perimeter Access Rule +type NetworkSecurityPerimeterAccessRule struct { + // Network Security Perimeter Access Rule Name + Name *string + + // Properties of Network Security Perimeter Access Rule + Properties *NetworkSecurityPerimeterAccessRuleProperties +} + +// NetworkSecurityPerimeterAccessRuleProperties - The Properties of Network Security Perimeter Rule +type NetworkSecurityPerimeterAccessRuleProperties struct { + // Address prefixes for inbound rules + AddressPrefixes []*string + + // Direction of Access Rule + Direction *NspAccessRuleDirection + + // Fully qualified domain name for outbound rules + FullyQualifiedDomainNames []*string + + // NetworkSecurityPerimeters for inbound rules + NetworkSecurityPerimeters []*NetworkSecurityPerimeter + + // Subscriptions for inbound rules + Subscriptions []*NetworkSecurityPerimeterAccessRulePropertiesSubscriptionsItem +} + +// NetworkSecurityPerimeterAccessRulePropertiesSubscriptionsItem - Subscription for inbound rule +type NetworkSecurityPerimeterAccessRulePropertiesSubscriptionsItem struct { + // Fully qualified identifier of subscription + ID *string +} + +// NetworkSecurityPerimeterConfiguration - NSP Configuration for an Cognitive Services account. +type NetworkSecurityPerimeterConfiguration struct { + // NSP Configuration properties. + Properties *NetworkSecurityPerimeterConfigurationProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// NetworkSecurityPerimeterConfigurationAssociationInfo - Network Security Perimeter Configuration Association Information +type NetworkSecurityPerimeterConfigurationAssociationInfo struct { + // Access Mode of the resource association + AccessMode *string + + // Name of the resource association + Name *string +} + +// NetworkSecurityPerimeterConfigurationList - A list of NSP configurations for an Cognitive Services account. +type NetworkSecurityPerimeterConfigurationList struct { + // Link to retrieve next page of results. + NextLink *string + + // Array of NSP configurations List Result for an Cognitive Services account. + Value []*NetworkSecurityPerimeterConfiguration +} + +// NetworkSecurityPerimeterConfigurationProperties - The properties of an NSP Configuration. +type NetworkSecurityPerimeterConfigurationProperties struct { + // Information about a linked Network Security Perimeter + NetworkSecurityPerimeter *NetworkSecurityPerimeter + + // Network Security Perimeter Profile Information + Profile *NetworkSecurityPerimeterProfileInfo + + // List of Provisioning Issues + ProvisioningIssues []*ProvisioningIssue + + // Network Security Perimeter Configuration Association Information + ResourceAssociation *NetworkSecurityPerimeterConfigurationAssociationInfo + + // READ-ONLY; Provisioning state of NetworkSecurityPerimeter configuration + ProvisioningState *string +} + +// NetworkSecurityPerimeterProfileInfo - Network Security Perimeter Profile Information +type NetworkSecurityPerimeterProfileInfo struct { + AccessRules []*NetworkSecurityPerimeterAccessRule + + // Access rules version of the resource profile + AccessRulesVersion *int64 + + // Current diagnostic settings version + DiagnosticSettingsVersion *int64 + + // List of enabled log categories + EnabledLogCategories []*string + + // Name of the resource profile + Name *string +} + // Operation - Details of a REST API operation, returned from the Resource Provider Operations API type Operation struct { // Localized display information for this particular operation. @@ -951,6 +1321,32 @@ type PrivateLinkServiceConnectionState struct { Status *PrivateEndpointServiceConnectionStatus } +type ProvisioningIssue struct { + // Name of the NSP provisioning issue + Name *string + + // Properties of Provisioning Issue + Properties *ProvisioningIssueProperties +} + +// ProvisioningIssueProperties - Properties of Provisioning Issue +type ProvisioningIssueProperties struct { + // Description of the issue + Description *string + + // Type of Issue + IssueType *string + + // Severity of the issue + Severity *string + + // Optional array, suggested access rules + SuggestedAccessRules []*NetworkSecurityPerimeterAccessRule + + // IDs of resources that can be associated to the same perimeter to remediate the issue. + SuggestedResourceIDs []*string +} + // ProxyResource - The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a // location type ProxyResource struct { @@ -970,6 +1366,220 @@ type QuotaLimit struct { Rules []*ThrottlingRule } +// RaiBlockListItemsResult - The list of cognitive services RAI Blocklist Items. +type RaiBlockListItemsResult struct { + // The link used to get the next page of RaiBlocklistItems. + NextLink *string + + // The list of RaiBlocklistItems. + Value []*RaiBlocklistItem +} + +// RaiBlockListResult - The list of cognitive services RAI Blocklists. +type RaiBlockListResult struct { + // The link used to get the next page of RaiBlocklists. + NextLink *string + + // The list of RaiBlocklist. + Value []*RaiBlocklist +} + +// RaiBlocklist - Cognitive Services RaiBlocklist. +type RaiBlocklist struct { + // Properties of Cognitive Services RaiBlocklist. + Properties *RaiBlocklistProperties + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; Resource Etag. + Etag *string + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; Metadata pertaining to creation and last modification of the resource. + SystemData *SystemData + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// RaiBlocklistConfig - Azure OpenAI blocklist config. +type RaiBlocklistConfig struct { + // If blocking would occur. + Blocking *bool + + // Name of ContentFilter. + BlocklistName *string +} + +// RaiBlocklistItem - Cognitive Services RaiBlocklist Item. +type RaiBlocklistItem struct { + // Properties of Cognitive Services RaiBlocklist Item. + Properties *RaiBlocklistItemProperties + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; Resource Etag. + Etag *string + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; Metadata pertaining to creation and last modification of the resource. + SystemData *SystemData + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// RaiBlocklistItemBulkRequest - The Cognitive Services RaiBlocklist Item request body. +type RaiBlocklistItemBulkRequest struct { + Name *string + + // Properties of Cognitive Services RaiBlocklist Item. + Properties *RaiBlocklistItemProperties +} + +// RaiBlocklistItemProperties - RAI Custom Blocklist Item properties. +type RaiBlocklistItemProperties struct { + // If the pattern is a regex pattern. + IsRegex *bool + + // Pattern to match against. + Pattern *string +} + +// RaiBlocklistProperties - RAI Custom Blocklist properties. +type RaiBlocklistProperties struct { + // Description of the block list. + Description *string +} + +// RaiContentFilter - Azure OpenAI Content Filter. +type RaiContentFilter struct { + // Azure OpenAI Content Filter Properties. + Properties *RaiContentFilterProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// RaiContentFilterListResult - The list of Content Filters. +type RaiContentFilterListResult struct { + // The link used to get the next page of Content Filters. + NextLink *string + + // The list of RaiContentFilter. + Value []*RaiContentFilter +} + +// RaiContentFilterProperties - Azure OpenAI Content Filter Properties. +type RaiContentFilterProperties struct { + // If the Content Filter has multi severity levels(Low, Medium, or High). + IsMultiLevelFilter *bool + + // Name of Content Filter. + Name *string + + // Content source to apply the Content Filters. + Source *RaiPolicyContentSource +} + +// RaiMonitorConfig - Cognitive Services Rai Monitor Config. +type RaiMonitorConfig struct { + // The storage resource Id. + AdxStorageResourceID *string + + // The identity client Id to access the storage. + IdentityClientID *string +} + +// RaiPolicy - Cognitive Services RaiPolicy. +type RaiPolicy struct { + // Properties of Cognitive Services RaiPolicy. + Properties *RaiPolicyProperties + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; Resource Etag. + Etag *string + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; Metadata pertaining to creation and last modification of the resource. + SystemData *SystemData + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// RaiPolicyContentFilter - Azure OpenAI Content Filter. +type RaiPolicyContentFilter struct { + // If blocking would occur. + Blocking *bool + + // If the ContentFilter is enabled. + Enabled *bool + + // Name of ContentFilter. + Name *string + + // Level at which content is filtered. + SeverityThreshold *ContentLevel + + // Content source to apply the Content Filters. + Source *RaiPolicyContentSource +} + +// RaiPolicyListResult - The list of cognitive services RaiPolicies. +type RaiPolicyListResult struct { + // The link used to get the next page of RaiPolicy. + NextLink *string + + // The list of RaiPolicy. + Value []*RaiPolicy +} + +// RaiPolicyProperties - Azure OpenAI Content Filters properties. +type RaiPolicyProperties struct { + // Name of Rai policy. + BasePolicyName *string + + // The list of Content Filters. + ContentFilters []*RaiPolicyContentFilter + + // The list of custom Blocklist. + CustomBlocklists []*CustomBlocklistConfig + + // Rai policy mode. The enum value mapping is as below: Default = 0, Deferred=1, Blocking=2, Asynchronousfilter =3. Please + // use 'Asynchronousfilter' after 2024-10-01. It is the same as 'Deferred' in + // previous version. + Mode *RaiPolicyMode + + // READ-ONLY; Content Filters policy type. + Type *RaiPolicyType +} + // RegenerateKeyParameters - Regenerate key parameters. type RegenerateKeyParameters struct { // REQUIRED; key name to generate (Key1|Key2) @@ -1127,6 +1737,18 @@ type SKUChangeInfo struct { LastChangeDate *string } +// SKUResource - Properties of Cognitive Services account resource sku resource properties. +type SKUResource struct { + // The capacity configuration. + Capacity *CapacityConfig + + // The resource type name. + ResourceType *string + + // The resource model definition representing SKU + SKU *SKU +} + // SystemData - Metadata pertaining to creation and last modification of the resource. type SystemData struct { // The timestamp of resource creation (UTC). @@ -1199,6 +1821,15 @@ type UserAssignedIdentity struct { PrincipalID *string } +// UserOwnedAmlWorkspace - The user owned AML workspace for Cognitive Services account. +type UserOwnedAmlWorkspace struct { + // Identity Client id of a AML workspace resource. + IdentityClientID *string + + // Full resource id of a AML workspace resource. + ResourceID *string +} + // UserOwnedStorage - The user owned storage for Cognitive Services account. type UserOwnedStorage struct { IdentityClientID *string diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/models_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/models_client.go index 820c1ced0..ccebf9f86 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/models_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/models_client.go @@ -45,7 +45,7 @@ func NewModelsClient(subscriptionID string, credential azcore.TokenCredential, o // NewListPager - List Models. // -// Generated from API version 2023-05-01 +// Generated from API version 2024-10-01 // - location - Resource location. // - options - ModelsClientListOptions contains the optional parameters for the ModelsClient.NewListPager method. func (client *ModelsClient) NewListPager(location string, options *ModelsClientListOptions) *runtime.Pager[ModelsClientListResponse] { @@ -87,7 +87,7 @@ func (client *ModelsClient) listCreateRequest(ctx context.Context, location stri return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/models_serde.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/models_serde.go index 91ad242e7..8f2ab6234 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/models_serde.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/models_serde.go @@ -270,8 +270,10 @@ func (a AccountModel) MarshalJSON() ([]byte, error) { populate(objectMap, "lifecycleStatus", a.LifecycleStatus) populate(objectMap, "maxCapacity", a.MaxCapacity) populate(objectMap, "name", a.Name) + populate(objectMap, "publisher", a.Publisher) populate(objectMap, "skus", a.SKUs) populate(objectMap, "source", a.Source) + populate(objectMap, "sourceAccount", a.SourceAccount) populate(objectMap, "systemData", a.SystemData) populate(objectMap, "version", a.Version) return json.Marshal(objectMap) @@ -316,12 +318,18 @@ func (a *AccountModel) UnmarshalJSON(data []byte) error { case "name": err = unpopulate(val, "Name", &a.Name) delete(rawMsg, key) + case "publisher": + err = unpopulate(val, "Publisher", &a.Publisher) + delete(rawMsg, key) case "skus": err = unpopulate(val, "SKUs", &a.SKUs) delete(rawMsg, key) case "source": err = unpopulate(val, "Source", &a.Source) delete(rawMsg, key) + case "sourceAccount": + err = unpopulate(val, "SourceAccount", &a.SourceAccount) + delete(rawMsg, key) case "systemData": err = unpopulate(val, "SystemData", &a.SystemData) delete(rawMsg, key) @@ -373,6 +381,7 @@ func (a AccountProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "apiProperties", a.APIProperties) populate(objectMap, "abusePenalty", a.AbusePenalty) populate(objectMap, "allowedFqdnList", a.AllowedFqdnList) + populate(objectMap, "amlWorkspace", a.AmlWorkspace) populate(objectMap, "callRateLimit", a.CallRateLimit) populate(objectMap, "capabilities", a.Capabilities) populate(objectMap, "commitmentPlanAssociations", a.CommitmentPlanAssociations) @@ -393,6 +402,7 @@ func (a AccountProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "provisioningState", a.ProvisioningState) populate(objectMap, "publicNetworkAccess", a.PublicNetworkAccess) populate(objectMap, "quotaLimit", a.QuotaLimit) + populate(objectMap, "raiMonitorConfig", a.RaiMonitorConfig) populate(objectMap, "restore", a.Restore) populate(objectMap, "restrictOutboundNetworkAccess", a.RestrictOutboundNetworkAccess) populate(objectMap, "skuChangeInfo", a.SKUChangeInfo) @@ -419,6 +429,9 @@ func (a *AccountProperties) UnmarshalJSON(data []byte) error { case "allowedFqdnList": err = unpopulate(val, "AllowedFqdnList", &a.AllowedFqdnList) delete(rawMsg, key) + case "amlWorkspace": + err = unpopulate(val, "AmlWorkspace", &a.AmlWorkspace) + delete(rawMsg, key) case "callRateLimit": err = unpopulate(val, "CallRateLimit", &a.CallRateLimit) delete(rawMsg, key) @@ -479,6 +492,9 @@ func (a *AccountProperties) UnmarshalJSON(data []byte) error { case "quotaLimit": err = unpopulate(val, "QuotaLimit", &a.QuotaLimit) delete(rawMsg, key) + case "raiMonitorConfig": + err = unpopulate(val, "RaiMonitorConfig", &a.RaiMonitorConfig) + delete(rawMsg, key) case "restore": err = unpopulate(val, "Restore", &a.Restore) delete(rawMsg, key) @@ -599,6 +615,142 @@ func (a *AzureEntityResource) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type BillingMeterInfo. +func (b BillingMeterInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "meterId", b.MeterID) + populate(objectMap, "name", b.Name) + populate(objectMap, "unit", b.Unit) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BillingMeterInfo. +func (b *BillingMeterInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "meterId": + err = unpopulate(val, "MeterID", &b.MeterID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &b.Name) + delete(rawMsg, key) + case "unit": + err = unpopulate(val, "Unit", &b.Unit) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CalculateModelCapacityParameter. +func (c CalculateModelCapacityParameter) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "model", c.Model) + populate(objectMap, "skuName", c.SKUName) + populate(objectMap, "workloads", c.Workloads) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CalculateModelCapacityParameter. +func (c *CalculateModelCapacityParameter) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "model": + err = unpopulate(val, "Model", &c.Model) + delete(rawMsg, key) + case "skuName": + err = unpopulate(val, "SKUName", &c.SKUName) + delete(rawMsg, key) + case "workloads": + err = unpopulate(val, "Workloads", &c.Workloads) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CalculateModelCapacityResult. +func (c CalculateModelCapacityResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "estimatedCapacity", c.EstimatedCapacity) + populate(objectMap, "model", c.Model) + populate(objectMap, "skuName", c.SKUName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CalculateModelCapacityResult. +func (c *CalculateModelCapacityResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "estimatedCapacity": + err = unpopulate(val, "EstimatedCapacity", &c.EstimatedCapacity) + delete(rawMsg, key) + case "model": + err = unpopulate(val, "Model", &c.Model) + delete(rawMsg, key) + case "skuName": + err = unpopulate(val, "SKUName", &c.SKUName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CalculateModelCapacityResultEstimatedCapacity. +func (c CalculateModelCapacityResultEstimatedCapacity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "deployableValue", c.DeployableValue) + populate(objectMap, "value", c.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CalculateModelCapacityResultEstimatedCapacity. +func (c *CalculateModelCapacityResultEstimatedCapacity) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "deployableValue": + err = unpopulate(val, "DeployableValue", &c.DeployableValue) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &c.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type CallRateLimit. func (c CallRateLimit) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -637,6 +789,7 @@ func (c *CallRateLimit) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type CapacityConfig. func (c CapacityConfig) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) + populate(objectMap, "allowedValues", c.AllowedValues) populate(objectMap, "default", c.Default) populate(objectMap, "maximum", c.Maximum) populate(objectMap, "minimum", c.Minimum) @@ -653,6 +806,9 @@ func (c *CapacityConfig) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { + case "allowedValues": + err = unpopulate(val, "AllowedValues", &c.AllowedValues) + delete(rawMsg, key) case "default": err = unpopulate(val, "Default", &c.Default) delete(rawMsg, key) @@ -888,6 +1044,7 @@ func (c CommitmentPlanAccountAssociation) MarshalJSON() ([]byte, error) { populate(objectMap, "name", c.Name) populate(objectMap, "properties", c.Properties) populate(objectMap, "systemData", c.SystemData) + populate(objectMap, "tags", c.Tags) populate(objectMap, "type", c.Type) return json.Marshal(objectMap) } @@ -916,6 +1073,9 @@ func (c *CommitmentPlanAccountAssociation) UnmarshalJSON(data []byte) error { case "systemData": err = unpopulate(val, "SystemData", &c.SystemData) delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &c.Tags) + delete(rawMsg, key) case "type": err = unpopulate(val, "Type", &c.Type) delete(rawMsg, key) @@ -1223,6 +1383,150 @@ func (c *CommitmentTierListResult) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type CustomBlocklistConfig. +func (c CustomBlocklistConfig) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "blocking", c.Blocking) + populate(objectMap, "blocklistName", c.BlocklistName) + populate(objectMap, "source", c.Source) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CustomBlocklistConfig. +func (c *CustomBlocklistConfig) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "blocking": + err = unpopulate(val, "Blocking", &c.Blocking) + delete(rawMsg, key) + case "blocklistName": + err = unpopulate(val, "BlocklistName", &c.BlocklistName) + delete(rawMsg, key) + case "source": + err = unpopulate(val, "Source", &c.Source) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DefenderForAISetting. +func (d DefenderForAISetting) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", d.Etag) + populate(objectMap, "id", d.ID) + populate(objectMap, "name", d.Name) + populate(objectMap, "properties", d.Properties) + populate(objectMap, "systemData", d.SystemData) + populate(objectMap, "tags", d.Tags) + populate(objectMap, "type", d.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DefenderForAISetting. +func (d *DefenderForAISetting) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &d.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &d.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &d.SystemData) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &d.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DefenderForAISettingProperties. +func (d DefenderForAISettingProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "state", d.State) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DefenderForAISettingProperties. +func (d *DefenderForAISettingProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "state": + err = unpopulate(val, "State", &d.State) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DefenderForAISettingResult. +func (d DefenderForAISettingResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", d.NextLink) + populate(objectMap, "value", d.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DefenderForAISettingResult. +func (d *DefenderForAISettingResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &d.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &d.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type Deployment. func (d Deployment) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -1232,6 +1536,7 @@ func (d Deployment) MarshalJSON() ([]byte, error) { populate(objectMap, "properties", d.Properties) populate(objectMap, "sku", d.SKU) populate(objectMap, "systemData", d.SystemData) + populate(objectMap, "tags", d.Tags) populate(objectMap, "type", d.Type) return json.Marshal(objectMap) } @@ -1263,6 +1568,9 @@ func (d *Deployment) UnmarshalJSON(data []byte) error { case "systemData": err = unpopulate(val, "SystemData", &d.SystemData) delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &d.Tags) + delete(rawMsg, key) case "type": err = unpopulate(val, "Type", &d.Type) delete(rawMsg, key) @@ -1274,6 +1582,37 @@ func (d *Deployment) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type DeploymentCapacitySettings. +func (d DeploymentCapacitySettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "designatedCapacity", d.DesignatedCapacity) + populate(objectMap, "priority", d.Priority) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DeploymentCapacitySettings. +func (d *DeploymentCapacitySettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "designatedCapacity": + err = unpopulate(val, "DesignatedCapacity", &d.DesignatedCapacity) + delete(rawMsg, key) + case "priority": + err = unpopulate(val, "Priority", &d.Priority) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type DeploymentListResult. func (d DeploymentListResult) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -1311,7 +1650,9 @@ func (d DeploymentModel) MarshalJSON() ([]byte, error) { populate(objectMap, "callRateLimit", d.CallRateLimit) populate(objectMap, "format", d.Format) populate(objectMap, "name", d.Name) + populate(objectMap, "publisher", d.Publisher) populate(objectMap, "source", d.Source) + populate(objectMap, "sourceAccount", d.SourceAccount) populate(objectMap, "version", d.Version) return json.Marshal(objectMap) } @@ -1334,9 +1675,15 @@ func (d *DeploymentModel) UnmarshalJSON(data []byte) error { case "name": err = unpopulate(val, "Name", &d.Name) delete(rawMsg, key) + case "publisher": + err = unpopulate(val, "Publisher", &d.Publisher) + delete(rawMsg, key) case "source": err = unpopulate(val, "Source", &d.Source) delete(rawMsg, key) + case "sourceAccount": + err = unpopulate(val, "SourceAccount", &d.SourceAccount) + delete(rawMsg, key) case "version": err = unpopulate(val, "Version", &d.Version) delete(rawMsg, key) @@ -1353,7 +1700,11 @@ func (d DeploymentProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "callRateLimit", d.CallRateLimit) populate(objectMap, "capabilities", d.Capabilities) + populate(objectMap, "capacitySettings", d.CapacitySettings) + populate(objectMap, "currentCapacity", d.CurrentCapacity) + populate(objectMap, "dynamicThrottlingEnabled", d.DynamicThrottlingEnabled) populate(objectMap, "model", d.Model) + populate(objectMap, "parentDeploymentName", d.ParentDeploymentName) populate(objectMap, "provisioningState", d.ProvisioningState) populate(objectMap, "raiPolicyName", d.RaiPolicyName) populate(objectMap, "rateLimits", d.RateLimits) @@ -1377,9 +1728,21 @@ func (d *DeploymentProperties) UnmarshalJSON(data []byte) error { case "capabilities": err = unpopulate(val, "Capabilities", &d.Capabilities) delete(rawMsg, key) + case "capacitySettings": + err = unpopulate(val, "CapacitySettings", &d.CapacitySettings) + delete(rawMsg, key) + case "currentCapacity": + err = unpopulate(val, "CurrentCapacity", &d.CurrentCapacity) + delete(rawMsg, key) + case "dynamicThrottlingEnabled": + err = unpopulate(val, "DynamicThrottlingEnabled", &d.DynamicThrottlingEnabled) + delete(rawMsg, key) case "model": err = unpopulate(val, "Model", &d.Model) delete(rawMsg, key) + case "parentDeploymentName": + err = unpopulate(val, "ParentDeploymentName", &d.ParentDeploymentName) + delete(rawMsg, key) case "provisioningState": err = unpopulate(val, "ProvisioningState", &d.ProvisioningState) delete(rawMsg, key) @@ -1403,10 +1766,41 @@ func (d *DeploymentProperties) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type DeploymentScaleSettings. -func (d DeploymentScaleSettings) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type DeploymentSKUListResult. +func (d DeploymentSKUListResult) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "activeCapacity", d.ActiveCapacity) + populate(objectMap, "nextLink", d.NextLink) + populate(objectMap, "value", d.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DeploymentSKUListResult. +func (d *DeploymentSKUListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &d.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &d.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DeploymentScaleSettings. +func (d DeploymentScaleSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "activeCapacity", d.ActiveCapacity) populate(objectMap, "capacity", d.Capacity) populate(objectMap, "scaleType", d.ScaleType) return json.Marshal(objectMap) @@ -1512,6 +1906,127 @@ func (e *Encryption) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type EncryptionScope. +func (e EncryptionScope) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", e.Etag) + populate(objectMap, "id", e.ID) + populate(objectMap, "name", e.Name) + populate(objectMap, "properties", e.Properties) + populate(objectMap, "systemData", e.SystemData) + populate(objectMap, "tags", e.Tags) + populate(objectMap, "type", e.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EncryptionScope. +func (e *EncryptionScope) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &e.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &e.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &e.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &e.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &e.SystemData) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &e.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &e.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EncryptionScopeListResult. +func (e EncryptionScopeListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", e.NextLink) + populate(objectMap, "value", e.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EncryptionScopeListResult. +func (e *EncryptionScopeListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &e.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &e.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EncryptionScopeProperties. +func (e EncryptionScopeProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "keySource", e.KeySource) + populate(objectMap, "keyVaultProperties", e.KeyVaultProperties) + populate(objectMap, "provisioningState", e.ProvisioningState) + populate(objectMap, "state", e.State) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EncryptionScopeProperties. +func (e *EncryptionScopeProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "keySource": + err = unpopulate(val, "KeySource", &e.KeySource) + delete(rawMsg, key) + case "keyVaultProperties": + err = unpopulate(val, "KeyVaultProperties", &e.KeyVaultProperties) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &e.ProvisioningState) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &e.State) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type ErrorAdditionalInfo. func (e ErrorAdditionalInfo) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -1752,6 +2267,7 @@ func (m *MetricName) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type Model. func (m Model) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) + populate(objectMap, "description", m.Description) populate(objectMap, "kind", m.Kind) populate(objectMap, "model", m.Model) populate(objectMap, "skuName", m.SKUName) @@ -1767,6 +2283,9 @@ func (m *Model) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { + case "description": + err = unpopulate(val, "Description", &m.Description) + delete(rawMsg, key) case "kind": err = unpopulate(val, "Kind", &m.Kind) delete(rawMsg, key) @@ -1784,6 +2303,142 @@ func (m *Model) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type ModelCapacityCalculatorWorkload. +func (m ModelCapacityCalculatorWorkload) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "requestParameters", m.RequestParameters) + populate(objectMap, "requestPerMinute", m.RequestPerMinute) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ModelCapacityCalculatorWorkload. +func (m *ModelCapacityCalculatorWorkload) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "requestParameters": + err = unpopulate(val, "RequestParameters", &m.RequestParameters) + delete(rawMsg, key) + case "requestPerMinute": + err = unpopulate(val, "RequestPerMinute", &m.RequestPerMinute) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ModelCapacityCalculatorWorkloadRequestParam. +func (m ModelCapacityCalculatorWorkloadRequestParam) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "avgGeneratedTokens", m.AvgGeneratedTokens) + populate(objectMap, "avgPromptTokens", m.AvgPromptTokens) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ModelCapacityCalculatorWorkloadRequestParam. +func (m *ModelCapacityCalculatorWorkloadRequestParam) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "avgGeneratedTokens": + err = unpopulate(val, "AvgGeneratedTokens", &m.AvgGeneratedTokens) + delete(rawMsg, key) + case "avgPromptTokens": + err = unpopulate(val, "AvgPromptTokens", &m.AvgPromptTokens) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ModelCapacityListResult. +func (m ModelCapacityListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", m.NextLink) + populate(objectMap, "value", m.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ModelCapacityListResult. +func (m *ModelCapacityListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &m.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &m.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ModelCapacityListResultValueItem. +func (m ModelCapacityListResultValueItem) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", m.ID) + populate(objectMap, "location", m.Location) + populate(objectMap, "name", m.Name) + populate(objectMap, "properties", m.Properties) + populate(objectMap, "type", m.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ModelCapacityListResultValueItem. +func (m *ModelCapacityListResultValueItem) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &m.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &m.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type ModelDeprecationInfo. func (m ModelDeprecationInfo) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -1850,6 +2505,7 @@ func (m *ModelListResult) UnmarshalJSON(data []byte) error { func (m ModelSKU) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "capacity", m.Capacity) + populate(objectMap, "cost", m.Cost) populateDateTimeRFC3339(objectMap, "deprecationDate", m.DeprecationDate) populate(objectMap, "name", m.Name) populate(objectMap, "rateLimits", m.RateLimits) @@ -1869,6 +2525,9 @@ func (m *ModelSKU) UnmarshalJSON(data []byte) error { case "capacity": err = unpopulate(val, "Capacity", &m.Capacity) delete(rawMsg, key) + case "cost": + err = unpopulate(val, "Cost", &m.Cost) + delete(rawMsg, key) case "deprecationDate": err = unpopulateDateTimeRFC3339(val, "DeprecationDate", &m.DeprecationDate) delete(rawMsg, key) @@ -1889,6 +2548,45 @@ func (m *ModelSKU) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type ModelSKUCapacityProperties. +func (m ModelSKUCapacityProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "availableCapacity", m.AvailableCapacity) + populate(objectMap, "availableFinetuneCapacity", m.AvailableFinetuneCapacity) + populate(objectMap, "model", m.Model) + populate(objectMap, "skuName", m.SKUName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ModelSKUCapacityProperties. +func (m *ModelSKUCapacityProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "availableCapacity": + err = unpopulate(val, "AvailableCapacity", &m.AvailableCapacity) + delete(rawMsg, key) + case "availableFinetuneCapacity": + err = unpopulate(val, "AvailableFinetuneCapacity", &m.AvailableFinetuneCapacity) + delete(rawMsg, key) + case "model": + err = unpopulate(val, "Model", &m.Model) + delete(rawMsg, key) + case "skuName": + err = unpopulate(val, "SKUName", &m.SKUName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type MultiRegionSettings. func (m MultiRegionSettings) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -1923,6 +2621,7 @@ func (m *MultiRegionSettings) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type NetworkRuleSet. func (n NetworkRuleSet) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) + populate(objectMap, "bypass", n.Bypass) populate(objectMap, "defaultAction", n.DefaultAction) populate(objectMap, "ipRules", n.IPRules) populate(objectMap, "virtualNetworkRules", n.VirtualNetworkRules) @@ -1938,6 +2637,9 @@ func (n *NetworkRuleSet) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { + case "bypass": + err = unpopulate(val, "Bypass", &n.Bypass) + delete(rawMsg, key) case "defaultAction": err = unpopulate(val, "DefaultAction", &n.DefaultAction) delete(rawMsg, key) @@ -1955,10 +2657,333 @@ func (n *NetworkRuleSet) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type Operation. -func (o Operation) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type NetworkSecurityPerimeter. +func (n NetworkSecurityPerimeter) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "actionType", o.ActionType) + populate(objectMap, "id", n.ID) + populate(objectMap, "location", n.Location) + populate(objectMap, "perimeterGuid", n.PerimeterGUID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NetworkSecurityPerimeter. +func (n *NetworkSecurityPerimeter) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &n.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &n.Location) + delete(rawMsg, key) + case "perimeterGuid": + err = unpopulate(val, "PerimeterGUID", &n.PerimeterGUID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type NetworkSecurityPerimeterAccessRule. +func (n NetworkSecurityPerimeterAccessRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", n.Name) + populate(objectMap, "properties", n.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NetworkSecurityPerimeterAccessRule. +func (n *NetworkSecurityPerimeterAccessRule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &n.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &n.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type NetworkSecurityPerimeterAccessRuleProperties. +func (n NetworkSecurityPerimeterAccessRuleProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "addressPrefixes", n.AddressPrefixes) + populate(objectMap, "direction", n.Direction) + populate(objectMap, "fullyQualifiedDomainNames", n.FullyQualifiedDomainNames) + populate(objectMap, "networkSecurityPerimeters", n.NetworkSecurityPerimeters) + populate(objectMap, "subscriptions", n.Subscriptions) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NetworkSecurityPerimeterAccessRuleProperties. +func (n *NetworkSecurityPerimeterAccessRuleProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "addressPrefixes": + err = unpopulate(val, "AddressPrefixes", &n.AddressPrefixes) + delete(rawMsg, key) + case "direction": + err = unpopulate(val, "Direction", &n.Direction) + delete(rawMsg, key) + case "fullyQualifiedDomainNames": + err = unpopulate(val, "FullyQualifiedDomainNames", &n.FullyQualifiedDomainNames) + delete(rawMsg, key) + case "networkSecurityPerimeters": + err = unpopulate(val, "NetworkSecurityPerimeters", &n.NetworkSecurityPerimeters) + delete(rawMsg, key) + case "subscriptions": + err = unpopulate(val, "Subscriptions", &n.Subscriptions) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type NetworkSecurityPerimeterAccessRulePropertiesSubscriptionsItem. +func (n NetworkSecurityPerimeterAccessRulePropertiesSubscriptionsItem) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", n.ID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NetworkSecurityPerimeterAccessRulePropertiesSubscriptionsItem. +func (n *NetworkSecurityPerimeterAccessRulePropertiesSubscriptionsItem) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &n.ID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type NetworkSecurityPerimeterConfiguration. +func (n NetworkSecurityPerimeterConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", n.ID) + populate(objectMap, "name", n.Name) + populate(objectMap, "properties", n.Properties) + populate(objectMap, "type", n.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NetworkSecurityPerimeterConfiguration. +func (n *NetworkSecurityPerimeterConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &n.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &n.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &n.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &n.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type NetworkSecurityPerimeterConfigurationAssociationInfo. +func (n NetworkSecurityPerimeterConfigurationAssociationInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "accessMode", n.AccessMode) + populate(objectMap, "name", n.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NetworkSecurityPerimeterConfigurationAssociationInfo. +func (n *NetworkSecurityPerimeterConfigurationAssociationInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "accessMode": + err = unpopulate(val, "AccessMode", &n.AccessMode) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &n.Name) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type NetworkSecurityPerimeterConfigurationList. +func (n NetworkSecurityPerimeterConfigurationList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", n.NextLink) + populate(objectMap, "value", n.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NetworkSecurityPerimeterConfigurationList. +func (n *NetworkSecurityPerimeterConfigurationList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &n.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &n.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type NetworkSecurityPerimeterConfigurationProperties. +func (n NetworkSecurityPerimeterConfigurationProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "networkSecurityPerimeter", n.NetworkSecurityPerimeter) + populate(objectMap, "profile", n.Profile) + populate(objectMap, "provisioningIssues", n.ProvisioningIssues) + populate(objectMap, "provisioningState", n.ProvisioningState) + populate(objectMap, "resourceAssociation", n.ResourceAssociation) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NetworkSecurityPerimeterConfigurationProperties. +func (n *NetworkSecurityPerimeterConfigurationProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "networkSecurityPerimeter": + err = unpopulate(val, "NetworkSecurityPerimeter", &n.NetworkSecurityPerimeter) + delete(rawMsg, key) + case "profile": + err = unpopulate(val, "Profile", &n.Profile) + delete(rawMsg, key) + case "provisioningIssues": + err = unpopulate(val, "ProvisioningIssues", &n.ProvisioningIssues) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &n.ProvisioningState) + delete(rawMsg, key) + case "resourceAssociation": + err = unpopulate(val, "ResourceAssociation", &n.ResourceAssociation) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type NetworkSecurityPerimeterProfileInfo. +func (n NetworkSecurityPerimeterProfileInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "accessRules", n.AccessRules) + populate(objectMap, "accessRulesVersion", n.AccessRulesVersion) + populate(objectMap, "diagnosticSettingsVersion", n.DiagnosticSettingsVersion) + populate(objectMap, "enabledLogCategories", n.EnabledLogCategories) + populate(objectMap, "name", n.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NetworkSecurityPerimeterProfileInfo. +func (n *NetworkSecurityPerimeterProfileInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "accessRules": + err = unpopulate(val, "AccessRules", &n.AccessRules) + delete(rawMsg, key) + case "accessRulesVersion": + err = unpopulate(val, "AccessRulesVersion", &n.AccessRulesVersion) + delete(rawMsg, key) + case "diagnosticSettingsVersion": + err = unpopulate(val, "DiagnosticSettingsVersion", &n.DiagnosticSettingsVersion) + delete(rawMsg, key) + case "enabledLogCategories": + err = unpopulate(val, "EnabledLogCategories", &n.EnabledLogCategories) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &n.Name) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Operation. +func (o Operation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "actionType", o.ActionType) populate(objectMap, "display", o.Display) populate(objectMap, "isDataAction", o.IsDataAction) populate(objectMap, "name", o.Name) @@ -2198,283 +3223,945 @@ func (p *PrivateEndpointConnection) UnmarshalJSON(data []byte) error { delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionListResult. +func (p PrivateEndpointConnectionListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionListResult. +func (p *PrivateEndpointConnectionListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &p.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionProperties. +func (p PrivateEndpointConnectionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "groupIds", p.GroupIDs) + populate(objectMap, "privateEndpoint", p.PrivateEndpoint) + populate(objectMap, "privateLinkServiceConnectionState", p.PrivateLinkServiceConnectionState) + populate(objectMap, "provisioningState", p.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionProperties. +func (p *PrivateEndpointConnectionProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "groupIds": + err = unpopulate(val, "GroupIDs", &p.GroupIDs) + delete(rawMsg, key) + case "privateEndpoint": + err = unpopulate(val, "PrivateEndpoint", &p.PrivateEndpoint) + delete(rawMsg, key) + case "privateLinkServiceConnectionState": + err = unpopulate(val, "PrivateLinkServiceConnectionState", &p.PrivateLinkServiceConnectionState) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &p.ProvisioningState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateLinkResource. +func (p PrivateLinkResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", p.ID) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResource. +func (p *PrivateLinkResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourceListResult. +func (p PrivateLinkResourceListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResourceListResult. +func (p *PrivateLinkResourceListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &p.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourceProperties. +func (p PrivateLinkResourceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "displayName", p.DisplayName) + populate(objectMap, "groupId", p.GroupID) + populate(objectMap, "requiredMembers", p.RequiredMembers) + populate(objectMap, "requiredZoneNames", p.RequiredZoneNames) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResourceProperties. +func (p *PrivateLinkResourceProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "displayName": + err = unpopulate(val, "DisplayName", &p.DisplayName) + delete(rawMsg, key) + case "groupId": + err = unpopulate(val, "GroupID", &p.GroupID) + delete(rawMsg, key) + case "requiredMembers": + err = unpopulate(val, "RequiredMembers", &p.RequiredMembers) + delete(rawMsg, key) + case "requiredZoneNames": + err = unpopulate(val, "RequiredZoneNames", &p.RequiredZoneNames) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateLinkServiceConnectionState. +func (p PrivateLinkServiceConnectionState) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "actionsRequired", p.ActionsRequired) + populate(objectMap, "description", p.Description) + populate(objectMap, "status", p.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkServiceConnectionState. +func (p *PrivateLinkServiceConnectionState) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "actionsRequired": + err = unpopulate(val, "ActionsRequired", &p.ActionsRequired) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &p.Description) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &p.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProvisioningIssue. +func (p ProvisioningIssue) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProvisioningIssue. +func (p *ProvisioningIssue) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProvisioningIssueProperties. +func (p ProvisioningIssueProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", p.Description) + populate(objectMap, "issueType", p.IssueType) + populate(objectMap, "severity", p.Severity) + populate(objectMap, "suggestedAccessRules", p.SuggestedAccessRules) + populate(objectMap, "suggestedResourceIds", p.SuggestedResourceIDs) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProvisioningIssueProperties. +func (p *ProvisioningIssueProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &p.Description) + delete(rawMsg, key) + case "issueType": + err = unpopulate(val, "IssueType", &p.IssueType) + delete(rawMsg, key) + case "severity": + err = unpopulate(val, "Severity", &p.Severity) + delete(rawMsg, key) + case "suggestedAccessRules": + err = unpopulate(val, "SuggestedAccessRules", &p.SuggestedAccessRules) + delete(rawMsg, key) + case "suggestedResourceIds": + err = unpopulate(val, "SuggestedResourceIDs", &p.SuggestedResourceIDs) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProxyResource. +func (p ProxyResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", p.ID) + populate(objectMap, "name", p.Name) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProxyResource. +func (p *ProxyResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type QuotaLimit. +func (q QuotaLimit) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "count", q.Count) + populate(objectMap, "renewalPeriod", q.RenewalPeriod) + populate(objectMap, "rules", q.Rules) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type QuotaLimit. +func (q *QuotaLimit) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", q, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "count": + err = unpopulate(val, "Count", &q.Count) + delete(rawMsg, key) + case "renewalPeriod": + err = unpopulate(val, "RenewalPeriod", &q.RenewalPeriod) + delete(rawMsg, key) + case "rules": + err = unpopulate(val, "Rules", &q.Rules) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", q, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RaiBlockListItemsResult. +func (r RaiBlockListItemsResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", r.NextLink) + populate(objectMap, "value", r.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RaiBlockListItemsResult. +func (r *RaiBlockListItemsResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &r.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &r.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RaiBlockListResult. +func (r RaiBlockListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", r.NextLink) + populate(objectMap, "value", r.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RaiBlockListResult. +func (r *RaiBlockListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &r.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &r.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RaiBlocklist. +func (r RaiBlocklist) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", r.Etag) + populate(objectMap, "id", r.ID) + populate(objectMap, "name", r.Name) + populate(objectMap, "properties", r.Properties) + populate(objectMap, "systemData", r.SystemData) + populate(objectMap, "tags", r.Tags) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RaiBlocklist. +func (r *RaiBlocklist) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &r.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &r.SystemData) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &r.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RaiBlocklistConfig. +func (r RaiBlocklistConfig) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "blocking", r.Blocking) + populate(objectMap, "blocklistName", r.BlocklistName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RaiBlocklistConfig. +func (r *RaiBlocklistConfig) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "blocking": + err = unpopulate(val, "Blocking", &r.Blocking) + delete(rawMsg, key) + case "blocklistName": + err = unpopulate(val, "BlocklistName", &r.BlocklistName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RaiBlocklistItem. +func (r RaiBlocklistItem) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", r.Etag) + populate(objectMap, "id", r.ID) + populate(objectMap, "name", r.Name) + populate(objectMap, "properties", r.Properties) + populate(objectMap, "systemData", r.SystemData) + populate(objectMap, "tags", r.Tags) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RaiBlocklistItem. +func (r *RaiBlocklistItem) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &r.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &r.SystemData) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &r.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RaiBlocklistItemBulkRequest. +func (r RaiBlocklistItemBulkRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", r.Name) + populate(objectMap, "properties", r.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RaiBlocklistItemBulkRequest. +func (r *RaiBlocklistItemBulkRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RaiBlocklistItemProperties. +func (r RaiBlocklistItemProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "isRegex", r.IsRegex) + populate(objectMap, "pattern", r.Pattern) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RaiBlocklistItemProperties. +func (r *RaiBlocklistItemProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "isRegex": + err = unpopulate(val, "IsRegex", &r.IsRegex) + delete(rawMsg, key) + case "pattern": + err = unpopulate(val, "Pattern", &r.Pattern) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RaiBlocklistProperties. +func (r RaiBlocklistProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", r.Description) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RaiBlocklistProperties. +func (r *RaiBlocklistProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &r.Description) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionListResult. -func (p PrivateEndpointConnectionListResult) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type RaiContentFilter. +func (r RaiContentFilter) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "value", p.Value) + populate(objectMap, "id", r.ID) + populate(objectMap, "name", r.Name) + populate(objectMap, "properties", r.Properties) + populate(objectMap, "type", r.Type) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionListResult. -func (p *PrivateEndpointConnectionListResult) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type RaiContentFilter. +func (r *RaiContentFilter) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) + return fmt.Errorf("unmarshalling type %T: %v", r, err) } for key, val := range rawMsg { var err error switch key { - case "value": - err = unpopulate(val, "Value", &p.Value) + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) + return fmt.Errorf("unmarshalling type %T: %v", r, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionProperties. -func (p PrivateEndpointConnectionProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type RaiContentFilterListResult. +func (r RaiContentFilterListResult) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "groupIds", p.GroupIDs) - populate(objectMap, "privateEndpoint", p.PrivateEndpoint) - populate(objectMap, "privateLinkServiceConnectionState", p.PrivateLinkServiceConnectionState) - populate(objectMap, "provisioningState", p.ProvisioningState) + populate(objectMap, "nextLink", r.NextLink) + populate(objectMap, "value", r.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionProperties. -func (p *PrivateEndpointConnectionProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type RaiContentFilterListResult. +func (r *RaiContentFilterListResult) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) + return fmt.Errorf("unmarshalling type %T: %v", r, err) } for key, val := range rawMsg { var err error switch key { - case "groupIds": - err = unpopulate(val, "GroupIDs", &p.GroupIDs) - delete(rawMsg, key) - case "privateEndpoint": - err = unpopulate(val, "PrivateEndpoint", &p.PrivateEndpoint) - delete(rawMsg, key) - case "privateLinkServiceConnectionState": - err = unpopulate(val, "PrivateLinkServiceConnectionState", &p.PrivateLinkServiceConnectionState) + case "nextLink": + err = unpopulate(val, "NextLink", &r.NextLink) delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &p.ProvisioningState) + case "value": + err = unpopulate(val, "Value", &r.Value) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) + return fmt.Errorf("unmarshalling type %T: %v", r, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type PrivateLinkResource. -func (p PrivateLinkResource) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type RaiContentFilterProperties. +func (r RaiContentFilterProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "id", p.ID) - populate(objectMap, "name", p.Name) - populate(objectMap, "properties", p.Properties) - populate(objectMap, "type", p.Type) + populate(objectMap, "isMultiLevelFilter", r.IsMultiLevelFilter) + populate(objectMap, "name", r.Name) + populate(objectMap, "source", r.Source) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResource. -func (p *PrivateLinkResource) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type RaiContentFilterProperties. +func (r *RaiContentFilterProperties) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) + return fmt.Errorf("unmarshalling type %T: %v", r, err) } for key, val := range rawMsg { var err error switch key { - case "id": - err = unpopulate(val, "ID", &p.ID) + case "isMultiLevelFilter": + err = unpopulate(val, "IsMultiLevelFilter", &r.IsMultiLevelFilter) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &p.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &p.Properties) + err = unpopulate(val, "Name", &r.Name) delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &p.Type) + case "source": + err = unpopulate(val, "Source", &r.Source) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) + return fmt.Errorf("unmarshalling type %T: %v", r, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourceListResult. -func (p PrivateLinkResourceListResult) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type RaiMonitorConfig. +func (r RaiMonitorConfig) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "value", p.Value) + populate(objectMap, "adxStorageResourceId", r.AdxStorageResourceID) + populate(objectMap, "identityClientId", r.IdentityClientID) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResourceListResult. -func (p *PrivateLinkResourceListResult) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type RaiMonitorConfig. +func (r *RaiMonitorConfig) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) + return fmt.Errorf("unmarshalling type %T: %v", r, err) } for key, val := range rawMsg { var err error switch key { - case "value": - err = unpopulate(val, "Value", &p.Value) + case "adxStorageResourceId": + err = unpopulate(val, "AdxStorageResourceID", &r.AdxStorageResourceID) + delete(rawMsg, key) + case "identityClientId": + err = unpopulate(val, "IdentityClientID", &r.IdentityClientID) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) + return fmt.Errorf("unmarshalling type %T: %v", r, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourceProperties. -func (p PrivateLinkResourceProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type RaiPolicy. +func (r RaiPolicy) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "displayName", p.DisplayName) - populate(objectMap, "groupId", p.GroupID) - populate(objectMap, "requiredMembers", p.RequiredMembers) - populate(objectMap, "requiredZoneNames", p.RequiredZoneNames) + populate(objectMap, "etag", r.Etag) + populate(objectMap, "id", r.ID) + populate(objectMap, "name", r.Name) + populate(objectMap, "properties", r.Properties) + populate(objectMap, "systemData", r.SystemData) + populate(objectMap, "tags", r.Tags) + populate(objectMap, "type", r.Type) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResourceProperties. -func (p *PrivateLinkResourceProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type RaiPolicy. +func (r *RaiPolicy) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) + return fmt.Errorf("unmarshalling type %T: %v", r, err) } for key, val := range rawMsg { var err error switch key { - case "displayName": - err = unpopulate(val, "DisplayName", &p.DisplayName) + case "etag": + err = unpopulate(val, "Etag", &r.Etag) delete(rawMsg, key) - case "groupId": - err = unpopulate(val, "GroupID", &p.GroupID) + case "id": + err = unpopulate(val, "ID", &r.ID) delete(rawMsg, key) - case "requiredMembers": - err = unpopulate(val, "RequiredMembers", &p.RequiredMembers) + case "name": + err = unpopulate(val, "Name", &r.Name) delete(rawMsg, key) - case "requiredZoneNames": - err = unpopulate(val, "RequiredZoneNames", &p.RequiredZoneNames) + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &r.SystemData) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &r.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) + return fmt.Errorf("unmarshalling type %T: %v", r, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type PrivateLinkServiceConnectionState. -func (p PrivateLinkServiceConnectionState) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type RaiPolicyContentFilter. +func (r RaiPolicyContentFilter) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "actionsRequired", p.ActionsRequired) - populate(objectMap, "description", p.Description) - populate(objectMap, "status", p.Status) + populate(objectMap, "blocking", r.Blocking) + populate(objectMap, "enabled", r.Enabled) + populate(objectMap, "name", r.Name) + populate(objectMap, "severityThreshold", r.SeverityThreshold) + populate(objectMap, "source", r.Source) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkServiceConnectionState. -func (p *PrivateLinkServiceConnectionState) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type RaiPolicyContentFilter. +func (r *RaiPolicyContentFilter) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) + return fmt.Errorf("unmarshalling type %T: %v", r, err) } for key, val := range rawMsg { var err error switch key { - case "actionsRequired": - err = unpopulate(val, "ActionsRequired", &p.ActionsRequired) + case "blocking": + err = unpopulate(val, "Blocking", &r.Blocking) delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &p.Description) + case "enabled": + err = unpopulate(val, "Enabled", &r.Enabled) delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &p.Status) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "severityThreshold": + err = unpopulate(val, "SeverityThreshold", &r.SeverityThreshold) + delete(rawMsg, key) + case "source": + err = unpopulate(val, "Source", &r.Source) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) + return fmt.Errorf("unmarshalling type %T: %v", r, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ProxyResource. -func (p ProxyResource) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type RaiPolicyListResult. +func (r RaiPolicyListResult) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "id", p.ID) - populate(objectMap, "name", p.Name) - populate(objectMap, "type", p.Type) + populate(objectMap, "nextLink", r.NextLink) + populate(objectMap, "value", r.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ProxyResource. -func (p *ProxyResource) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type RaiPolicyListResult. +func (r *RaiPolicyListResult) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) + return fmt.Errorf("unmarshalling type %T: %v", r, err) } for key, val := range rawMsg { var err error switch key { - case "id": - err = unpopulate(val, "ID", &p.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &p.Name) + case "nextLink": + err = unpopulate(val, "NextLink", &r.NextLink) delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &p.Type) + case "value": + err = unpopulate(val, "Value", &r.Value) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) + return fmt.Errorf("unmarshalling type %T: %v", r, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type QuotaLimit. -func (q QuotaLimit) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type RaiPolicyProperties. +func (r RaiPolicyProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "count", q.Count) - populate(objectMap, "renewalPeriod", q.RenewalPeriod) - populate(objectMap, "rules", q.Rules) + populate(objectMap, "basePolicyName", r.BasePolicyName) + populate(objectMap, "contentFilters", r.ContentFilters) + populate(objectMap, "customBlocklists", r.CustomBlocklists) + populate(objectMap, "mode", r.Mode) + populate(objectMap, "type", r.Type) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type QuotaLimit. -func (q *QuotaLimit) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type RaiPolicyProperties. +func (r *RaiPolicyProperties) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", q, err) + return fmt.Errorf("unmarshalling type %T: %v", r, err) } for key, val := range rawMsg { var err error switch key { - case "count": - err = unpopulate(val, "Count", &q.Count) + case "basePolicyName": + err = unpopulate(val, "BasePolicyName", &r.BasePolicyName) delete(rawMsg, key) - case "renewalPeriod": - err = unpopulate(val, "RenewalPeriod", &q.RenewalPeriod) + case "contentFilters": + err = unpopulate(val, "ContentFilters", &r.ContentFilters) delete(rawMsg, key) - case "rules": - err = unpopulate(val, "Rules", &q.Rules) + case "customBlocklists": + err = unpopulate(val, "CustomBlocklists", &r.CustomBlocklists) + delete(rawMsg, key) + case "mode": + err = unpopulate(val, "Mode", &r.Mode) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", q, err) + return fmt.Errorf("unmarshalling type %T: %v", r, err) } } return nil @@ -2939,6 +4626,41 @@ func (s *SKUChangeInfo) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type SKUResource. +func (s SKUResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "capacity", s.Capacity) + populate(objectMap, "resourceType", s.ResourceType) + populate(objectMap, "sku", s.SKU) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SKUResource. +func (s *SKUResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "capacity": + err = unpopulate(val, "Capacity", &s.Capacity) + delete(rawMsg, key) + case "resourceType": + err = unpopulate(val, "ResourceType", &s.ResourceType) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &s.SKU) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type SystemData. func (s SystemData) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -3146,6 +4868,37 @@ func (u *UserAssignedIdentity) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type UserOwnedAmlWorkspace. +func (u UserOwnedAmlWorkspace) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "identityClientId", u.IdentityClientID) + populate(objectMap, "resourceId", u.ResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UserOwnedAmlWorkspace. +func (u *UserOwnedAmlWorkspace) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "identityClientId": + err = unpopulate(val, "IdentityClientID", &u.IdentityClientID) + delete(rawMsg, key) + case "resourceId": + err = unpopulate(val, "ResourceID", &u.ResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type UserOwnedStorage. func (u UserOwnedStorage) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -3233,7 +4986,7 @@ func populateAny(m map[string]any, k string, v any) { } func unpopulate(data json.RawMessage, fn string, v any) error { - if data == nil { + if data == nil || string(data) == "null" { return nil } if err := json.Unmarshal(data, v); err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/networksecurityperimeterconfigurations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/networksecurityperimeterconfigurations_client.go new file mode 100644 index 000000000..5387c0dbd --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/networksecurityperimeterconfigurations_client.go @@ -0,0 +1,261 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armcognitiveservices + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// NetworkSecurityPerimeterConfigurationsClient contains the methods for the NetworkSecurityPerimeterConfigurations group. +// Don't use this type directly, use NewNetworkSecurityPerimeterConfigurationsClient() instead. +type NetworkSecurityPerimeterConfigurationsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewNetworkSecurityPerimeterConfigurationsClient creates a new instance of NetworkSecurityPerimeterConfigurationsClient with the specified values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewNetworkSecurityPerimeterConfigurationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*NetworkSecurityPerimeterConfigurationsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &NetworkSecurityPerimeterConfigurationsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Gets the specified NSP configurations for an account. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-10-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of Cognitive Services account. +// - nspConfigurationName - The name of the NSP Configuration. +// - options - NetworkSecurityPerimeterConfigurationsClientGetOptions contains the optional parameters for the NetworkSecurityPerimeterConfigurationsClient.Get +// method. +func (client *NetworkSecurityPerimeterConfigurationsClient) Get(ctx context.Context, resourceGroupName string, accountName string, nspConfigurationName string, options *NetworkSecurityPerimeterConfigurationsClientGetOptions) (NetworkSecurityPerimeterConfigurationsClientGetResponse, error) { + var err error + const operationName = "NetworkSecurityPerimeterConfigurationsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, accountName, nspConfigurationName, options) + if err != nil { + return NetworkSecurityPerimeterConfigurationsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return NetworkSecurityPerimeterConfigurationsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return NetworkSecurityPerimeterConfigurationsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *NetworkSecurityPerimeterConfigurationsClient) getCreateRequest(ctx context.Context, resourceGroupName string, accountName string, nspConfigurationName string, options *NetworkSecurityPerimeterConfigurationsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/networkSecurityPerimeterConfigurations/{nspConfigurationName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if nspConfigurationName == "" { + return nil, errors.New("parameter nspConfigurationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{nspConfigurationName}", url.PathEscape(nspConfigurationName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-10-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *NetworkSecurityPerimeterConfigurationsClient) getHandleResponse(resp *http.Response) (NetworkSecurityPerimeterConfigurationsClientGetResponse, error) { + result := NetworkSecurityPerimeterConfigurationsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.NetworkSecurityPerimeterConfiguration); err != nil { + return NetworkSecurityPerimeterConfigurationsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Gets a list of NSP configurations for an account. +// +// Generated from API version 2024-10-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of Cognitive Services account. +// - options - NetworkSecurityPerimeterConfigurationsClientListOptions contains the optional parameters for the NetworkSecurityPerimeterConfigurationsClient.NewListPager +// method. +func (client *NetworkSecurityPerimeterConfigurationsClient) NewListPager(resourceGroupName string, accountName string, options *NetworkSecurityPerimeterConfigurationsClientListOptions) *runtime.Pager[NetworkSecurityPerimeterConfigurationsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[NetworkSecurityPerimeterConfigurationsClientListResponse]{ + More: func(page NetworkSecurityPerimeterConfigurationsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *NetworkSecurityPerimeterConfigurationsClientListResponse) (NetworkSecurityPerimeterConfigurationsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "NetworkSecurityPerimeterConfigurationsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, accountName, options) + }, nil) + if err != nil { + return NetworkSecurityPerimeterConfigurationsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *NetworkSecurityPerimeterConfigurationsClient) listCreateRequest(ctx context.Context, resourceGroupName string, accountName string, options *NetworkSecurityPerimeterConfigurationsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/networkSecurityPerimeterConfigurations" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-10-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *NetworkSecurityPerimeterConfigurationsClient) listHandleResponse(resp *http.Response) (NetworkSecurityPerimeterConfigurationsClientListResponse, error) { + result := NetworkSecurityPerimeterConfigurationsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.NetworkSecurityPerimeterConfigurationList); err != nil { + return NetworkSecurityPerimeterConfigurationsClientListResponse{}, err + } + return result, nil +} + +// BeginReconcile - Reconcile the NSP configuration for an account. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-10-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of Cognitive Services account. +// - nspConfigurationName - The name of the NSP Configuration. +// - options - NetworkSecurityPerimeterConfigurationsClientBeginReconcileOptions contains the optional parameters for the NetworkSecurityPerimeterConfigurationsClient.BeginReconcile +// method. +func (client *NetworkSecurityPerimeterConfigurationsClient) BeginReconcile(ctx context.Context, resourceGroupName string, accountName string, nspConfigurationName string, options *NetworkSecurityPerimeterConfigurationsClientBeginReconcileOptions) (*runtime.Poller[NetworkSecurityPerimeterConfigurationsClientReconcileResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.reconcile(ctx, resourceGroupName, accountName, nspConfigurationName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[NetworkSecurityPerimeterConfigurationsClientReconcileResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[NetworkSecurityPerimeterConfigurationsClientReconcileResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Reconcile - Reconcile the NSP configuration for an account. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-10-01 +func (client *NetworkSecurityPerimeterConfigurationsClient) reconcile(ctx context.Context, resourceGroupName string, accountName string, nspConfigurationName string, options *NetworkSecurityPerimeterConfigurationsClientBeginReconcileOptions) (*http.Response, error) { + var err error + const operationName = "NetworkSecurityPerimeterConfigurationsClient.BeginReconcile" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.reconcileCreateRequest(ctx, resourceGroupName, accountName, nspConfigurationName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// reconcileCreateRequest creates the Reconcile request. +func (client *NetworkSecurityPerimeterConfigurationsClient) reconcileCreateRequest(ctx context.Context, resourceGroupName string, accountName string, nspConfigurationName string, options *NetworkSecurityPerimeterConfigurationsClientBeginReconcileOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/networkSecurityPerimeterConfigurations/{nspConfigurationName}/reconcile" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if nspConfigurationName == "" { + return nil, errors.New("parameter nspConfigurationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{nspConfigurationName}", url.PathEscape(nspConfigurationName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-10-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/operations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/operations_client.go index c20be4002..48be898d0 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/operations_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/operations_client.go @@ -39,7 +39,7 @@ func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientO // NewListPager - Lists all the available Cognitive Services account operations. // -// Generated from API version 2023-05-01 +// Generated from API version 2024-10-01 // - options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[OperationsClientListResponse]{ @@ -72,7 +72,7 @@ func (client *OperationsClient) listCreateRequest(ctx context.Context, options * return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/options.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/options.go index c76660ebc..d309b9f6d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/options.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/options.go @@ -160,6 +160,28 @@ type CommitmentTiersClientListOptions struct { // placeholder for future optional parameters } +// DefenderForAISettingsClientCreateOrUpdateOptions contains the optional parameters for the DefenderForAISettingsClient.CreateOrUpdate +// method. +type DefenderForAISettingsClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// DefenderForAISettingsClientGetOptions contains the optional parameters for the DefenderForAISettingsClient.Get method. +type DefenderForAISettingsClientGetOptions struct { + // placeholder for future optional parameters +} + +// DefenderForAISettingsClientListOptions contains the optional parameters for the DefenderForAISettingsClient.NewListPager +// method. +type DefenderForAISettingsClientListOptions struct { + // placeholder for future optional parameters +} + +// DefenderForAISettingsClientUpdateOptions contains the optional parameters for the DefenderForAISettingsClient.Update method. +type DefenderForAISettingsClientUpdateOptions struct { + // placeholder for future optional parameters +} + // DeletedAccountsClientBeginPurgeOptions contains the optional parameters for the DeletedAccountsClient.BeginPurge method. type DeletedAccountsClientBeginPurgeOptions struct { // Resumes the LRO from the provided token. @@ -189,6 +211,12 @@ type DeploymentsClientBeginDeleteOptions struct { ResumeToken string } +// DeploymentsClientBeginUpdateOptions contains the optional parameters for the DeploymentsClient.BeginUpdate method. +type DeploymentsClientBeginUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + // DeploymentsClientGetOptions contains the optional parameters for the DeploymentsClient.Get method. type DeploymentsClientGetOptions struct { // placeholder for future optional parameters @@ -199,6 +227,45 @@ type DeploymentsClientListOptions struct { // placeholder for future optional parameters } +// DeploymentsClientListSKUsOptions contains the optional parameters for the DeploymentsClient.NewListSKUsPager method. +type DeploymentsClientListSKUsOptions struct { + // placeholder for future optional parameters +} + +// EncryptionScopesClientBeginDeleteOptions contains the optional parameters for the EncryptionScopesClient.BeginDelete method. +type EncryptionScopesClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// EncryptionScopesClientCreateOrUpdateOptions contains the optional parameters for the EncryptionScopesClient.CreateOrUpdate +// method. +type EncryptionScopesClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// EncryptionScopesClientGetOptions contains the optional parameters for the EncryptionScopesClient.Get method. +type EncryptionScopesClientGetOptions struct { + // placeholder for future optional parameters +} + +// EncryptionScopesClientListOptions contains the optional parameters for the EncryptionScopesClient.NewListPager method. +type EncryptionScopesClientListOptions struct { + // placeholder for future optional parameters +} + +// LocationBasedModelCapacitiesClientListOptions contains the optional parameters for the LocationBasedModelCapacitiesClient.NewListPager +// method. +type LocationBasedModelCapacitiesClientListOptions struct { + // placeholder for future optional parameters +} + +// ManagementClientCalculateModelCapacityOptions contains the optional parameters for the ManagementClient.CalculateModelCapacity +// method. +type ManagementClientCalculateModelCapacityOptions struct { + // placeholder for future optional parameters +} + // ManagementClientCheckDomainAvailabilityOptions contains the optional parameters for the ManagementClient.CheckDomainAvailability // method. type ManagementClientCheckDomainAvailabilityOptions struct { @@ -211,11 +278,35 @@ type ManagementClientCheckSKUAvailabilityOptions struct { // placeholder for future optional parameters } +// ModelCapacitiesClientListOptions contains the optional parameters for the ModelCapacitiesClient.NewListPager method. +type ModelCapacitiesClientListOptions struct { + // placeholder for future optional parameters +} + // ModelsClientListOptions contains the optional parameters for the ModelsClient.NewListPager method. type ModelsClientListOptions struct { // placeholder for future optional parameters } +// NetworkSecurityPerimeterConfigurationsClientBeginReconcileOptions contains the optional parameters for the NetworkSecurityPerimeterConfigurationsClient.BeginReconcile +// method. +type NetworkSecurityPerimeterConfigurationsClientBeginReconcileOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// NetworkSecurityPerimeterConfigurationsClientGetOptions contains the optional parameters for the NetworkSecurityPerimeterConfigurationsClient.Get +// method. +type NetworkSecurityPerimeterConfigurationsClientGetOptions struct { + // placeholder for future optional parameters +} + +// NetworkSecurityPerimeterConfigurationsClientListOptions contains the optional parameters for the NetworkSecurityPerimeterConfigurationsClient.NewListPager +// method. +type NetworkSecurityPerimeterConfigurationsClientListOptions struct { + // placeholder for future optional parameters +} + // OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. type OperationsClientListOptions struct { // placeholder for future optional parameters @@ -252,6 +343,92 @@ type PrivateLinkResourcesClientListOptions struct { // placeholder for future optional parameters } +// RaiBlocklistItemsClientBatchAddOptions contains the optional parameters for the RaiBlocklistItemsClient.BatchAdd method. +type RaiBlocklistItemsClientBatchAddOptions struct { + // placeholder for future optional parameters +} + +// RaiBlocklistItemsClientBatchDeleteOptions contains the optional parameters for the RaiBlocklistItemsClient.BatchDelete +// method. +type RaiBlocklistItemsClientBatchDeleteOptions struct { + // placeholder for future optional parameters +} + +// RaiBlocklistItemsClientBeginDeleteOptions contains the optional parameters for the RaiBlocklistItemsClient.BeginDelete +// method. +type RaiBlocklistItemsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// RaiBlocklistItemsClientCreateOrUpdateOptions contains the optional parameters for the RaiBlocklistItemsClient.CreateOrUpdate +// method. +type RaiBlocklistItemsClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// RaiBlocklistItemsClientGetOptions contains the optional parameters for the RaiBlocklistItemsClient.Get method. +type RaiBlocklistItemsClientGetOptions struct { + // placeholder for future optional parameters +} + +// RaiBlocklistItemsClientListOptions contains the optional parameters for the RaiBlocklistItemsClient.NewListPager method. +type RaiBlocklistItemsClientListOptions struct { + // placeholder for future optional parameters +} + +// RaiBlocklistsClientBeginDeleteOptions contains the optional parameters for the RaiBlocklistsClient.BeginDelete method. +type RaiBlocklistsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// RaiBlocklistsClientCreateOrUpdateOptions contains the optional parameters for the RaiBlocklistsClient.CreateOrUpdate method. +type RaiBlocklistsClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// RaiBlocklistsClientGetOptions contains the optional parameters for the RaiBlocklistsClient.Get method. +type RaiBlocklistsClientGetOptions struct { + // placeholder for future optional parameters +} + +// RaiBlocklistsClientListOptions contains the optional parameters for the RaiBlocklistsClient.NewListPager method. +type RaiBlocklistsClientListOptions struct { + // placeholder for future optional parameters +} + +// RaiContentFiltersClientGetOptions contains the optional parameters for the RaiContentFiltersClient.Get method. +type RaiContentFiltersClientGetOptions struct { + // placeholder for future optional parameters +} + +// RaiContentFiltersClientListOptions contains the optional parameters for the RaiContentFiltersClient.NewListPager method. +type RaiContentFiltersClientListOptions struct { + // placeholder for future optional parameters +} + +// RaiPoliciesClientBeginDeleteOptions contains the optional parameters for the RaiPoliciesClient.BeginDelete method. +type RaiPoliciesClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// RaiPoliciesClientCreateOrUpdateOptions contains the optional parameters for the RaiPoliciesClient.CreateOrUpdate method. +type RaiPoliciesClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// RaiPoliciesClientGetOptions contains the optional parameters for the RaiPoliciesClient.Get method. +type RaiPoliciesClientGetOptions struct { + // placeholder for future optional parameters +} + +// RaiPoliciesClientListOptions contains the optional parameters for the RaiPoliciesClient.NewListPager method. +type RaiPoliciesClientListOptions struct { + // placeholder for future optional parameters +} + // ResourceSKUsClientListOptions contains the optional parameters for the ResourceSKUsClient.NewListPager method. type ResourceSKUsClientListOptions struct { // placeholder for future optional parameters diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/privateendpointconnections_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/privateendpointconnections_client.go index 8e4b99729..e26bedfd8 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/privateendpointconnections_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/privateendpointconnections_client.go @@ -47,7 +47,7 @@ func NewPrivateEndpointConnectionsClient(subscriptionID string, credential azcor // account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of Cognitive Services account. // - privateEndpointConnectionName - The name of the private endpoint connection associated with the Cognitive Services Account @@ -74,7 +74,7 @@ func (client *PrivateEndpointConnectionsClient) BeginCreateOrUpdate(ctx context. // CreateOrUpdate - Update the state of specified private endpoint connection associated with the Cognitive Services account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2024-10-01 func (client *PrivateEndpointConnectionsClient) createOrUpdate(ctx context.Context, resourceGroupName string, accountName string, privateEndpointConnectionName string, properties PrivateEndpointConnection, options *PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "PrivateEndpointConnectionsClient.BeginCreateOrUpdate" @@ -120,7 +120,7 @@ func (client *PrivateEndpointConnectionsClient) createOrUpdateCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, properties); err != nil { @@ -132,7 +132,7 @@ func (client *PrivateEndpointConnectionsClient) createOrUpdateCreateRequest(ctx // BeginDelete - Deletes the specified private endpoint connection associated with the Cognitive Services account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of Cognitive Services account. // - privateEndpointConnectionName - The name of the private endpoint connection associated with the Cognitive Services Account @@ -158,7 +158,7 @@ func (client *PrivateEndpointConnectionsClient) BeginDelete(ctx context.Context, // Delete - Deletes the specified private endpoint connection associated with the Cognitive Services account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2024-10-01 func (client *PrivateEndpointConnectionsClient) deleteOperation(ctx context.Context, resourceGroupName string, accountName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "PrivateEndpointConnectionsClient.BeginDelete" @@ -204,7 +204,7 @@ func (client *PrivateEndpointConnectionsClient) deleteCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -213,7 +213,7 @@ func (client *PrivateEndpointConnectionsClient) deleteCreateRequest(ctx context. // Get - Gets the specified private endpoint connection associated with the Cognitive Services account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of Cognitive Services account. // - privateEndpointConnectionName - The name of the private endpoint connection associated with the Cognitive Services Account @@ -265,7 +265,7 @@ func (client *PrivateEndpointConnectionsClient) getCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -283,7 +283,7 @@ func (client *PrivateEndpointConnectionsClient) getHandleResponse(resp *http.Res // List - Gets the private endpoint connections associated with the Cognitive Services account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of Cognitive Services account. // - options - PrivateEndpointConnectionsClientListOptions contains the optional parameters for the PrivateEndpointConnectionsClient.List @@ -330,7 +330,7 @@ func (client *PrivateEndpointConnectionsClient) listCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/privatelinkresources_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/privatelinkresources_client.go index 2cb99f9cd..0284f57a3 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/privatelinkresources_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/privatelinkresources_client.go @@ -46,7 +46,7 @@ func NewPrivateLinkResourcesClient(subscriptionID string, credential azcore.Toke // List - Gets the private link resources that need to be created for a Cognitive Services account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - The name of Cognitive Services account. // - options - PrivateLinkResourcesClientListOptions contains the optional parameters for the PrivateLinkResourcesClient.List @@ -93,7 +93,7 @@ func (client *PrivateLinkResourcesClient) listCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/raiblocklistitems_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/raiblocklistitems_client.go new file mode 100644 index 000000000..add242331 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/raiblocklistitems_client.go @@ -0,0 +1,492 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armcognitiveservices + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// RaiBlocklistItemsClient contains the methods for the RaiBlocklistItems group. +// Don't use this type directly, use NewRaiBlocklistItemsClient() instead. +type RaiBlocklistItemsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewRaiBlocklistItemsClient creates a new instance of RaiBlocklistItemsClient with the specified values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewRaiBlocklistItemsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RaiBlocklistItemsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &RaiBlocklistItemsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BatchAdd - Batch operation to add blocklist items. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-10-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of Cognitive Services account. +// - raiBlocklistName - The name of the RaiBlocklist associated with the Cognitive Services Account +// - raiBlocklistItems - Properties describing the custom blocklist items. +// - options - RaiBlocklistItemsClientBatchAddOptions contains the optional parameters for the RaiBlocklistItemsClient.BatchAdd +// method. +func (client *RaiBlocklistItemsClient) BatchAdd(ctx context.Context, resourceGroupName string, accountName string, raiBlocklistName string, raiBlocklistItems []*RaiBlocklistItemBulkRequest, options *RaiBlocklistItemsClientBatchAddOptions) (RaiBlocklistItemsClientBatchAddResponse, error) { + var err error + const operationName = "RaiBlocklistItemsClient.BatchAdd" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.batchAddCreateRequest(ctx, resourceGroupName, accountName, raiBlocklistName, raiBlocklistItems, options) + if err != nil { + return RaiBlocklistItemsClientBatchAddResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return RaiBlocklistItemsClientBatchAddResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return RaiBlocklistItemsClientBatchAddResponse{}, err + } + resp, err := client.batchAddHandleResponse(httpResp) + return resp, err +} + +// batchAddCreateRequest creates the BatchAdd request. +func (client *RaiBlocklistItemsClient) batchAddCreateRequest(ctx context.Context, resourceGroupName string, accountName string, raiBlocklistName string, raiBlocklistItems []*RaiBlocklistItemBulkRequest, options *RaiBlocklistItemsClientBatchAddOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/raiBlocklists/{raiBlocklistName}/addRaiBlocklistItems" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if raiBlocklistName == "" { + return nil, errors.New("parameter raiBlocklistName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{raiBlocklistName}", url.PathEscape(raiBlocklistName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-10-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, raiBlocklistItems); err != nil { + return nil, err + } + return req, nil +} + +// batchAddHandleResponse handles the BatchAdd response. +func (client *RaiBlocklistItemsClient) batchAddHandleResponse(resp *http.Response) (RaiBlocklistItemsClientBatchAddResponse, error) { + result := RaiBlocklistItemsClientBatchAddResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RaiBlocklist); err != nil { + return RaiBlocklistItemsClientBatchAddResponse{}, err + } + return result, nil +} + +// BatchDelete - Batch operation to delete blocklist items. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-10-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of Cognitive Services account. +// - raiBlocklistName - The name of the RaiBlocklist associated with the Cognitive Services Account +// - raiBlocklistItemsNames - List of RAI Blocklist Items Names. +// - options - RaiBlocklistItemsClientBatchDeleteOptions contains the optional parameters for the RaiBlocklistItemsClient.BatchDelete +// method. +func (client *RaiBlocklistItemsClient) BatchDelete(ctx context.Context, resourceGroupName string, accountName string, raiBlocklistName string, raiBlocklistItemsNames any, options *RaiBlocklistItemsClientBatchDeleteOptions) (RaiBlocklistItemsClientBatchDeleteResponse, error) { + var err error + const operationName = "RaiBlocklistItemsClient.BatchDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.batchDeleteCreateRequest(ctx, resourceGroupName, accountName, raiBlocklistName, raiBlocklistItemsNames, options) + if err != nil { + return RaiBlocklistItemsClientBatchDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return RaiBlocklistItemsClientBatchDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return RaiBlocklistItemsClientBatchDeleteResponse{}, err + } + return RaiBlocklistItemsClientBatchDeleteResponse{}, nil +} + +// batchDeleteCreateRequest creates the BatchDelete request. +func (client *RaiBlocklistItemsClient) batchDeleteCreateRequest(ctx context.Context, resourceGroupName string, accountName string, raiBlocklistName string, raiBlocklistItemsNames any, options *RaiBlocklistItemsClientBatchDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/raiBlocklists/{raiBlocklistName}/deleteRaiBlocklistItems" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if raiBlocklistName == "" { + return nil, errors.New("parameter raiBlocklistName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{raiBlocklistName}", url.PathEscape(raiBlocklistName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-10-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, raiBlocklistItemsNames); err != nil { + return nil, err + } + return req, nil +} + +// CreateOrUpdate - Update the state of specified blocklist item associated with the Azure OpenAI account. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-10-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of Cognitive Services account. +// - raiBlocklistName - The name of the RaiBlocklist associated with the Cognitive Services Account +// - raiBlocklistItemName - The name of the RaiBlocklist Item associated with the custom blocklist +// - raiBlocklistItem - Properties describing the custom blocklist. +// - options - RaiBlocklistItemsClientCreateOrUpdateOptions contains the optional parameters for the RaiBlocklistItemsClient.CreateOrUpdate +// method. +func (client *RaiBlocklistItemsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, accountName string, raiBlocklistName string, raiBlocklistItemName string, raiBlocklistItem RaiBlocklistItem, options *RaiBlocklistItemsClientCreateOrUpdateOptions) (RaiBlocklistItemsClientCreateOrUpdateResponse, error) { + var err error + const operationName = "RaiBlocklistItemsClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, accountName, raiBlocklistName, raiBlocklistItemName, raiBlocklistItem, options) + if err != nil { + return RaiBlocklistItemsClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return RaiBlocklistItemsClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return RaiBlocklistItemsClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *RaiBlocklistItemsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, accountName string, raiBlocklistName string, raiBlocklistItemName string, raiBlocklistItem RaiBlocklistItem, options *RaiBlocklistItemsClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/raiBlocklists/{raiBlocklistName}/raiBlocklistItems/{raiBlocklistItemName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if raiBlocklistName == "" { + return nil, errors.New("parameter raiBlocklistName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{raiBlocklistName}", url.PathEscape(raiBlocklistName)) + if raiBlocklistItemName == "" { + return nil, errors.New("parameter raiBlocklistItemName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{raiBlocklistItemName}", url.PathEscape(raiBlocklistItemName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-10-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, raiBlocklistItem); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *RaiBlocklistItemsClient) createOrUpdateHandleResponse(resp *http.Response) (RaiBlocklistItemsClientCreateOrUpdateResponse, error) { + result := RaiBlocklistItemsClientCreateOrUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RaiBlocklistItem); err != nil { + return RaiBlocklistItemsClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// BeginDelete - Deletes the specified blocklist Item associated with the custom blocklist. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-10-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of Cognitive Services account. +// - raiBlocklistName - The name of the RaiBlocklist associated with the Cognitive Services Account +// - raiBlocklistItemName - The name of the RaiBlocklist Item associated with the custom blocklist +// - options - RaiBlocklistItemsClientBeginDeleteOptions contains the optional parameters for the RaiBlocklistItemsClient.BeginDelete +// method. +func (client *RaiBlocklistItemsClient) BeginDelete(ctx context.Context, resourceGroupName string, accountName string, raiBlocklistName string, raiBlocklistItemName string, options *RaiBlocklistItemsClientBeginDeleteOptions) (*runtime.Poller[RaiBlocklistItemsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, accountName, raiBlocklistName, raiBlocklistItemName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RaiBlocklistItemsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[RaiBlocklistItemsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes the specified blocklist Item associated with the custom blocklist. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-10-01 +func (client *RaiBlocklistItemsClient) deleteOperation(ctx context.Context, resourceGroupName string, accountName string, raiBlocklistName string, raiBlocklistItemName string, options *RaiBlocklistItemsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "RaiBlocklistItemsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, accountName, raiBlocklistName, raiBlocklistItemName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *RaiBlocklistItemsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, accountName string, raiBlocklistName string, raiBlocklistItemName string, options *RaiBlocklistItemsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/raiBlocklists/{raiBlocklistName}/raiBlocklistItems/{raiBlocklistItemName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if raiBlocklistName == "" { + return nil, errors.New("parameter raiBlocklistName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{raiBlocklistName}", url.PathEscape(raiBlocklistName)) + if raiBlocklistItemName == "" { + return nil, errors.New("parameter raiBlocklistItemName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{raiBlocklistItemName}", url.PathEscape(raiBlocklistItemName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-10-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets the specified custom blocklist Item associated with the custom blocklist. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-10-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of Cognitive Services account. +// - raiBlocklistName - The name of the RaiBlocklist associated with the Cognitive Services Account +// - raiBlocklistItemName - The name of the RaiBlocklist Item associated with the custom blocklist +// - options - RaiBlocklistItemsClientGetOptions contains the optional parameters for the RaiBlocklistItemsClient.Get method. +func (client *RaiBlocklistItemsClient) Get(ctx context.Context, resourceGroupName string, accountName string, raiBlocklistName string, raiBlocklistItemName string, options *RaiBlocklistItemsClientGetOptions) (RaiBlocklistItemsClientGetResponse, error) { + var err error + const operationName = "RaiBlocklistItemsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, accountName, raiBlocklistName, raiBlocklistItemName, options) + if err != nil { + return RaiBlocklistItemsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return RaiBlocklistItemsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return RaiBlocklistItemsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *RaiBlocklistItemsClient) getCreateRequest(ctx context.Context, resourceGroupName string, accountName string, raiBlocklistName string, raiBlocklistItemName string, options *RaiBlocklistItemsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/raiBlocklists/{raiBlocklistName}/raiBlocklistItems/{raiBlocklistItemName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if raiBlocklistName == "" { + return nil, errors.New("parameter raiBlocklistName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{raiBlocklistName}", url.PathEscape(raiBlocklistName)) + if raiBlocklistItemName == "" { + return nil, errors.New("parameter raiBlocklistItemName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{raiBlocklistItemName}", url.PathEscape(raiBlocklistItemName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-10-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *RaiBlocklistItemsClient) getHandleResponse(resp *http.Response) (RaiBlocklistItemsClientGetResponse, error) { + result := RaiBlocklistItemsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RaiBlocklistItem); err != nil { + return RaiBlocklistItemsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Gets the blocklist items associated with the custom blocklist. +// +// Generated from API version 2024-10-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of Cognitive Services account. +// - raiBlocklistName - The name of the RaiBlocklist associated with the Cognitive Services Account +// - options - RaiBlocklistItemsClientListOptions contains the optional parameters for the RaiBlocklistItemsClient.NewListPager +// method. +func (client *RaiBlocklistItemsClient) NewListPager(resourceGroupName string, accountName string, raiBlocklistName string, options *RaiBlocklistItemsClientListOptions) *runtime.Pager[RaiBlocklistItemsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[RaiBlocklistItemsClientListResponse]{ + More: func(page RaiBlocklistItemsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *RaiBlocklistItemsClientListResponse) (RaiBlocklistItemsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "RaiBlocklistItemsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, accountName, raiBlocklistName, options) + }, nil) + if err != nil { + return RaiBlocklistItemsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *RaiBlocklistItemsClient) listCreateRequest(ctx context.Context, resourceGroupName string, accountName string, raiBlocklistName string, options *RaiBlocklistItemsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/raiBlocklists/{raiBlocklistName}/raiBlocklistItems" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if raiBlocklistName == "" { + return nil, errors.New("parameter raiBlocklistName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{raiBlocklistName}", url.PathEscape(raiBlocklistName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-10-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *RaiBlocklistItemsClient) listHandleResponse(resp *http.Response) (RaiBlocklistItemsClientListResponse, error) { + result := RaiBlocklistItemsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RaiBlockListItemsResult); err != nil { + return RaiBlocklistItemsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/raiblocklists_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/raiblocklists_client.go new file mode 100644 index 000000000..89a321d90 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/raiblocklists_client.go @@ -0,0 +1,333 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armcognitiveservices + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// RaiBlocklistsClient contains the methods for the RaiBlocklists group. +// Don't use this type directly, use NewRaiBlocklistsClient() instead. +type RaiBlocklistsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewRaiBlocklistsClient creates a new instance of RaiBlocklistsClient with the specified values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewRaiBlocklistsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RaiBlocklistsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &RaiBlocklistsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Update the state of specified blocklist associated with the Azure OpenAI account. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-10-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of Cognitive Services account. +// - raiBlocklistName - The name of the RaiBlocklist associated with the Cognitive Services Account +// - raiBlocklist - Properties describing the custom blocklist. +// - options - RaiBlocklistsClientCreateOrUpdateOptions contains the optional parameters for the RaiBlocklistsClient.CreateOrUpdate +// method. +func (client *RaiBlocklistsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, accountName string, raiBlocklistName string, raiBlocklist RaiBlocklist, options *RaiBlocklistsClientCreateOrUpdateOptions) (RaiBlocklistsClientCreateOrUpdateResponse, error) { + var err error + const operationName = "RaiBlocklistsClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, accountName, raiBlocklistName, raiBlocklist, options) + if err != nil { + return RaiBlocklistsClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return RaiBlocklistsClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return RaiBlocklistsClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *RaiBlocklistsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, accountName string, raiBlocklistName string, raiBlocklist RaiBlocklist, options *RaiBlocklistsClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/raiBlocklists/{raiBlocklistName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if raiBlocklistName == "" { + return nil, errors.New("parameter raiBlocklistName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{raiBlocklistName}", url.PathEscape(raiBlocklistName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-10-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, raiBlocklist); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *RaiBlocklistsClient) createOrUpdateHandleResponse(resp *http.Response) (RaiBlocklistsClientCreateOrUpdateResponse, error) { + result := RaiBlocklistsClientCreateOrUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RaiBlocklist); err != nil { + return RaiBlocklistsClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// BeginDelete - Deletes the specified custom blocklist associated with the Azure OpenAI account. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-10-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of Cognitive Services account. +// - raiBlocklistName - The name of the RaiBlocklist associated with the Cognitive Services Account +// - options - RaiBlocklistsClientBeginDeleteOptions contains the optional parameters for the RaiBlocklistsClient.BeginDelete +// method. +func (client *RaiBlocklistsClient) BeginDelete(ctx context.Context, resourceGroupName string, accountName string, raiBlocklistName string, options *RaiBlocklistsClientBeginDeleteOptions) (*runtime.Poller[RaiBlocklistsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, accountName, raiBlocklistName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RaiBlocklistsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[RaiBlocklistsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes the specified custom blocklist associated with the Azure OpenAI account. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-10-01 +func (client *RaiBlocklistsClient) deleteOperation(ctx context.Context, resourceGroupName string, accountName string, raiBlocklistName string, options *RaiBlocklistsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "RaiBlocklistsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, accountName, raiBlocklistName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *RaiBlocklistsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, accountName string, raiBlocklistName string, options *RaiBlocklistsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/raiBlocklists/{raiBlocklistName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if raiBlocklistName == "" { + return nil, errors.New("parameter raiBlocklistName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{raiBlocklistName}", url.PathEscape(raiBlocklistName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-10-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets the specified custom blocklist associated with the Azure OpenAI account. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-10-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of Cognitive Services account. +// - raiBlocklistName - The name of the RaiBlocklist associated with the Cognitive Services Account +// - options - RaiBlocklistsClientGetOptions contains the optional parameters for the RaiBlocklistsClient.Get method. +func (client *RaiBlocklistsClient) Get(ctx context.Context, resourceGroupName string, accountName string, raiBlocklistName string, options *RaiBlocklistsClientGetOptions) (RaiBlocklistsClientGetResponse, error) { + var err error + const operationName = "RaiBlocklistsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, accountName, raiBlocklistName, options) + if err != nil { + return RaiBlocklistsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return RaiBlocklistsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return RaiBlocklistsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *RaiBlocklistsClient) getCreateRequest(ctx context.Context, resourceGroupName string, accountName string, raiBlocklistName string, options *RaiBlocklistsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/raiBlocklists/{raiBlocklistName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if raiBlocklistName == "" { + return nil, errors.New("parameter raiBlocklistName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{raiBlocklistName}", url.PathEscape(raiBlocklistName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-10-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *RaiBlocklistsClient) getHandleResponse(resp *http.Response) (RaiBlocklistsClientGetResponse, error) { + result := RaiBlocklistsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RaiBlocklist); err != nil { + return RaiBlocklistsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Gets the custom blocklists associated with the Azure OpenAI account. +// +// Generated from API version 2024-10-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of Cognitive Services account. +// - options - RaiBlocklistsClientListOptions contains the optional parameters for the RaiBlocklistsClient.NewListPager method. +func (client *RaiBlocklistsClient) NewListPager(resourceGroupName string, accountName string, options *RaiBlocklistsClientListOptions) *runtime.Pager[RaiBlocklistsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[RaiBlocklistsClientListResponse]{ + More: func(page RaiBlocklistsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *RaiBlocklistsClientListResponse) (RaiBlocklistsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "RaiBlocklistsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, accountName, options) + }, nil) + if err != nil { + return RaiBlocklistsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *RaiBlocklistsClient) listCreateRequest(ctx context.Context, resourceGroupName string, accountName string, options *RaiBlocklistsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/raiBlocklists" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-10-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *RaiBlocklistsClient) listHandleResponse(resp *http.Response) (RaiBlocklistsClientListResponse, error) { + result := RaiBlocklistsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RaiBlockListResult); err != nil { + return RaiBlocklistsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/raicontentfilters_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/raicontentfilters_client.go new file mode 100644 index 000000000..b6e747856 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/raicontentfilters_client.go @@ -0,0 +1,168 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armcognitiveservices + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// RaiContentFiltersClient contains the methods for the RaiContentFilters group. +// Don't use this type directly, use NewRaiContentFiltersClient() instead. +type RaiContentFiltersClient struct { + internal *arm.Client + subscriptionID string +} + +// NewRaiContentFiltersClient creates a new instance of RaiContentFiltersClient with the specified values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewRaiContentFiltersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RaiContentFiltersClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &RaiContentFiltersClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Get Content Filters by Name. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-10-01 +// - location - Resource location. +// - filterName - The name of the RAI Content Filter. +// - options - RaiContentFiltersClientGetOptions contains the optional parameters for the RaiContentFiltersClient.Get method. +func (client *RaiContentFiltersClient) Get(ctx context.Context, location string, filterName string, options *RaiContentFiltersClientGetOptions) (RaiContentFiltersClientGetResponse, error) { + var err error + const operationName = "RaiContentFiltersClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, location, filterName, options) + if err != nil { + return RaiContentFiltersClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return RaiContentFiltersClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return RaiContentFiltersClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *RaiContentFiltersClient) getCreateRequest(ctx context.Context, location string, filterName string, options *RaiContentFiltersClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/locations/{location}/raiContentFilters/{filterName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if location == "" { + return nil, errors.New("parameter location cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) + if filterName == "" { + return nil, errors.New("parameter filterName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{filterName}", url.PathEscape(filterName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-10-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *RaiContentFiltersClient) getHandleResponse(resp *http.Response) (RaiContentFiltersClientGetResponse, error) { + result := RaiContentFiltersClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RaiContentFilter); err != nil { + return RaiContentFiltersClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - List Content Filters types. +// +// Generated from API version 2024-10-01 +// - location - Resource location. +// - options - RaiContentFiltersClientListOptions contains the optional parameters for the RaiContentFiltersClient.NewListPager +// method. +func (client *RaiContentFiltersClient) NewListPager(location string, options *RaiContentFiltersClientListOptions) *runtime.Pager[RaiContentFiltersClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[RaiContentFiltersClientListResponse]{ + More: func(page RaiContentFiltersClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *RaiContentFiltersClientListResponse) (RaiContentFiltersClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "RaiContentFiltersClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, location, options) + }, nil) + if err != nil { + return RaiContentFiltersClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *RaiContentFiltersClient) listCreateRequest(ctx context.Context, location string, options *RaiContentFiltersClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/locations/{location}/raiContentFilters" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if location == "" { + return nil, errors.New("parameter location cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-10-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *RaiContentFiltersClient) listHandleResponse(resp *http.Response) (RaiContentFiltersClientListResponse, error) { + result := RaiContentFiltersClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RaiContentFilterListResult); err != nil { + return RaiContentFiltersClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/raipolicies_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/raipolicies_client.go new file mode 100644 index 000000000..5655ab83c --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/raipolicies_client.go @@ -0,0 +1,332 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armcognitiveservices + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// RaiPoliciesClient contains the methods for the RaiPolicies group. +// Don't use this type directly, use NewRaiPoliciesClient() instead. +type RaiPoliciesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewRaiPoliciesClient creates a new instance of RaiPoliciesClient with the specified values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewRaiPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RaiPoliciesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &RaiPoliciesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Update the state of specified Content Filters associated with the Azure OpenAI account. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-10-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of Cognitive Services account. +// - raiPolicyName - The name of the RaiPolicy associated with the Cognitive Services Account +// - raiPolicy - Properties describing the Content Filters. +// - options - RaiPoliciesClientCreateOrUpdateOptions contains the optional parameters for the RaiPoliciesClient.CreateOrUpdate +// method. +func (client *RaiPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, accountName string, raiPolicyName string, raiPolicy RaiPolicy, options *RaiPoliciesClientCreateOrUpdateOptions) (RaiPoliciesClientCreateOrUpdateResponse, error) { + var err error + const operationName = "RaiPoliciesClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, accountName, raiPolicyName, raiPolicy, options) + if err != nil { + return RaiPoliciesClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return RaiPoliciesClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return RaiPoliciesClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *RaiPoliciesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, accountName string, raiPolicyName string, raiPolicy RaiPolicy, options *RaiPoliciesClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/raiPolicies/{raiPolicyName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if raiPolicyName == "" { + return nil, errors.New("parameter raiPolicyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{raiPolicyName}", url.PathEscape(raiPolicyName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-10-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, raiPolicy); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *RaiPoliciesClient) createOrUpdateHandleResponse(resp *http.Response) (RaiPoliciesClientCreateOrUpdateResponse, error) { + result := RaiPoliciesClientCreateOrUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RaiPolicy); err != nil { + return RaiPoliciesClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// BeginDelete - Deletes the specified Content Filters associated with the Azure OpenAI account. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-10-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of Cognitive Services account. +// - raiPolicyName - The name of the RaiPolicy associated with the Cognitive Services Account +// - options - RaiPoliciesClientBeginDeleteOptions contains the optional parameters for the RaiPoliciesClient.BeginDelete method. +func (client *RaiPoliciesClient) BeginDelete(ctx context.Context, resourceGroupName string, accountName string, raiPolicyName string, options *RaiPoliciesClientBeginDeleteOptions) (*runtime.Poller[RaiPoliciesClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, accountName, raiPolicyName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RaiPoliciesClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[RaiPoliciesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes the specified Content Filters associated with the Azure OpenAI account. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-10-01 +func (client *RaiPoliciesClient) deleteOperation(ctx context.Context, resourceGroupName string, accountName string, raiPolicyName string, options *RaiPoliciesClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "RaiPoliciesClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, accountName, raiPolicyName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *RaiPoliciesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, accountName string, raiPolicyName string, options *RaiPoliciesClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/raiPolicies/{raiPolicyName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if raiPolicyName == "" { + return nil, errors.New("parameter raiPolicyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{raiPolicyName}", url.PathEscape(raiPolicyName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-10-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets the specified Content Filters associated with the Azure OpenAI account. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-10-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of Cognitive Services account. +// - raiPolicyName - The name of the RaiPolicy associated with the Cognitive Services Account +// - options - RaiPoliciesClientGetOptions contains the optional parameters for the RaiPoliciesClient.Get method. +func (client *RaiPoliciesClient) Get(ctx context.Context, resourceGroupName string, accountName string, raiPolicyName string, options *RaiPoliciesClientGetOptions) (RaiPoliciesClientGetResponse, error) { + var err error + const operationName = "RaiPoliciesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, accountName, raiPolicyName, options) + if err != nil { + return RaiPoliciesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return RaiPoliciesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return RaiPoliciesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *RaiPoliciesClient) getCreateRequest(ctx context.Context, resourceGroupName string, accountName string, raiPolicyName string, options *RaiPoliciesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/raiPolicies/{raiPolicyName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if raiPolicyName == "" { + return nil, errors.New("parameter raiPolicyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{raiPolicyName}", url.PathEscape(raiPolicyName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-10-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *RaiPoliciesClient) getHandleResponse(resp *http.Response) (RaiPoliciesClientGetResponse, error) { + result := RaiPoliciesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RaiPolicy); err != nil { + return RaiPoliciesClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Gets the content filters associated with the Azure OpenAI account. +// +// Generated from API version 2024-10-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of Cognitive Services account. +// - options - RaiPoliciesClientListOptions contains the optional parameters for the RaiPoliciesClient.NewListPager method. +func (client *RaiPoliciesClient) NewListPager(resourceGroupName string, accountName string, options *RaiPoliciesClientListOptions) *runtime.Pager[RaiPoliciesClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[RaiPoliciesClientListResponse]{ + More: func(page RaiPoliciesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *RaiPoliciesClientListResponse) (RaiPoliciesClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "RaiPoliciesClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, accountName, options) + }, nil) + if err != nil { + return RaiPoliciesClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *RaiPoliciesClient) listCreateRequest(ctx context.Context, resourceGroupName string, accountName string, options *RaiPoliciesClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/raiPolicies" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-10-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *RaiPoliciesClient) listHandleResponse(resp *http.Response) (RaiPoliciesClientListResponse, error) { + result := RaiPoliciesClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RaiPolicyListResult); err != nil { + return RaiPoliciesClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/resourceskus_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/resourceskus_client.go index 78a95040a..bc5b832ca 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/resourceskus_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/resourceskus_client.go @@ -45,7 +45,7 @@ func NewResourceSKUsClient(subscriptionID string, credential azcore.TokenCredent // NewListPager - Gets the list of Microsoft.CognitiveServices SKUs available for your Subscription. // -// Generated from API version 2023-05-01 +// Generated from API version 2024-10-01 // - options - ResourceSKUsClientListOptions contains the optional parameters for the ResourceSKUsClient.NewListPager method. func (client *ResourceSKUsClient) NewListPager(options *ResourceSKUsClientListOptions) *runtime.Pager[ResourceSKUsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[ResourceSKUsClientListResponse]{ @@ -82,7 +82,7 @@ func (client *ResourceSKUsClient) listCreateRequest(ctx context.Context, options return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/response_types.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/responses.go similarity index 59% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/response_types.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/responses.go index bbfb22564..2f41b58b7 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/response_types.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/responses.go @@ -160,6 +160,30 @@ type CommitmentTiersClientListResponse struct { CommitmentTierListResult } +// DefenderForAISettingsClientCreateOrUpdateResponse contains the response from method DefenderForAISettingsClient.CreateOrUpdate. +type DefenderForAISettingsClientCreateOrUpdateResponse struct { + // The Defender for AI resource. + DefenderForAISetting +} + +// DefenderForAISettingsClientGetResponse contains the response from method DefenderForAISettingsClient.Get. +type DefenderForAISettingsClientGetResponse struct { + // The Defender for AI resource. + DefenderForAISetting +} + +// DefenderForAISettingsClientListResponse contains the response from method DefenderForAISettingsClient.NewListPager. +type DefenderForAISettingsClientListResponse struct { + // The list of cognitive services Defender for AI Settings. + DefenderForAISettingResult +} + +// DefenderForAISettingsClientUpdateResponse contains the response from method DefenderForAISettingsClient.Update. +type DefenderForAISettingsClientUpdateResponse struct { + // The Defender for AI resource. + DefenderForAISetting +} + // DeletedAccountsClientGetResponse contains the response from method DeletedAccountsClient.Get. type DeletedAccountsClientGetResponse struct { // Cognitive Services account is an Azure resource representing the provisioned account, it's type, location and SKU. @@ -200,6 +224,53 @@ type DeploymentsClientListResponse struct { DeploymentListResult } +// DeploymentsClientListSKUsResponse contains the response from method DeploymentsClient.NewListSKUsPager. +type DeploymentsClientListSKUsResponse struct { + // The list of cognitive services accounts operation response. + DeploymentSKUListResult +} + +// DeploymentsClientUpdateResponse contains the response from method DeploymentsClient.BeginUpdate. +type DeploymentsClientUpdateResponse struct { + // Cognitive Services account deployment. + Deployment +} + +// EncryptionScopesClientCreateOrUpdateResponse contains the response from method EncryptionScopesClient.CreateOrUpdate. +type EncryptionScopesClientCreateOrUpdateResponse struct { + // Cognitive Services EncryptionScope + EncryptionScope +} + +// EncryptionScopesClientDeleteResponse contains the response from method EncryptionScopesClient.BeginDelete. +type EncryptionScopesClientDeleteResponse struct { + // placeholder for future response values +} + +// EncryptionScopesClientGetResponse contains the response from method EncryptionScopesClient.Get. +type EncryptionScopesClientGetResponse struct { + // Cognitive Services EncryptionScope + EncryptionScope +} + +// EncryptionScopesClientListResponse contains the response from method EncryptionScopesClient.NewListPager. +type EncryptionScopesClientListResponse struct { + // The list of cognitive services EncryptionScopes. + EncryptionScopeListResult +} + +// LocationBasedModelCapacitiesClientListResponse contains the response from method LocationBasedModelCapacitiesClient.NewListPager. +type LocationBasedModelCapacitiesClientListResponse struct { + // The list of cognitive services accounts operation response. + ModelCapacityListResult +} + +// ManagementClientCalculateModelCapacityResponse contains the response from method ManagementClient.CalculateModelCapacity. +type ManagementClientCalculateModelCapacityResponse struct { + // Calculate Model Capacity result. + CalculateModelCapacityResult +} + // ManagementClientCheckDomainAvailabilityResponse contains the response from method ManagementClient.CheckDomainAvailability. type ManagementClientCheckDomainAvailabilityResponse struct { // Domain availability. @@ -212,12 +283,36 @@ type ManagementClientCheckSKUAvailabilityResponse struct { SKUAvailabilityListResult } +// ModelCapacitiesClientListResponse contains the response from method ModelCapacitiesClient.NewListPager. +type ModelCapacitiesClientListResponse struct { + // The list of cognitive services accounts operation response. + ModelCapacityListResult +} + // ModelsClientListResponse contains the response from method ModelsClient.NewListPager. type ModelsClientListResponse struct { // The list of cognitive services models. ModelListResult } +// NetworkSecurityPerimeterConfigurationsClientGetResponse contains the response from method NetworkSecurityPerimeterConfigurationsClient.Get. +type NetworkSecurityPerimeterConfigurationsClientGetResponse struct { + // NSP Configuration for an Cognitive Services account. + NetworkSecurityPerimeterConfiguration +} + +// NetworkSecurityPerimeterConfigurationsClientListResponse contains the response from method NetworkSecurityPerimeterConfigurationsClient.NewListPager. +type NetworkSecurityPerimeterConfigurationsClientListResponse struct { + // A list of NSP configurations for an Cognitive Services account. + NetworkSecurityPerimeterConfigurationList +} + +// NetworkSecurityPerimeterConfigurationsClientReconcileResponse contains the response from method NetworkSecurityPerimeterConfigurationsClient.BeginReconcile. +type NetworkSecurityPerimeterConfigurationsClientReconcileResponse struct { + // NSP Configuration for an Cognitive Services account. + NetworkSecurityPerimeterConfiguration +} + // OperationsClientListResponse contains the response from method OperationsClient.NewListPager. type OperationsClientListResponse struct { // A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results. @@ -253,6 +348,98 @@ type PrivateLinkResourcesClientListResponse struct { PrivateLinkResourceListResult } +// RaiBlocklistItemsClientBatchAddResponse contains the response from method RaiBlocklistItemsClient.BatchAdd. +type RaiBlocklistItemsClientBatchAddResponse struct { + // Cognitive Services RaiBlocklist. + RaiBlocklist +} + +// RaiBlocklistItemsClientBatchDeleteResponse contains the response from method RaiBlocklistItemsClient.BatchDelete. +type RaiBlocklistItemsClientBatchDeleteResponse struct { + // placeholder for future response values +} + +// RaiBlocklistItemsClientCreateOrUpdateResponse contains the response from method RaiBlocklistItemsClient.CreateOrUpdate. +type RaiBlocklistItemsClientCreateOrUpdateResponse struct { + // Cognitive Services RaiBlocklist Item. + RaiBlocklistItem +} + +// RaiBlocklistItemsClientDeleteResponse contains the response from method RaiBlocklistItemsClient.BeginDelete. +type RaiBlocklistItemsClientDeleteResponse struct { + // placeholder for future response values +} + +// RaiBlocklistItemsClientGetResponse contains the response from method RaiBlocklistItemsClient.Get. +type RaiBlocklistItemsClientGetResponse struct { + // Cognitive Services RaiBlocklist Item. + RaiBlocklistItem +} + +// RaiBlocklistItemsClientListResponse contains the response from method RaiBlocklistItemsClient.NewListPager. +type RaiBlocklistItemsClientListResponse struct { + // The list of cognitive services RAI Blocklist Items. + RaiBlockListItemsResult +} + +// RaiBlocklistsClientCreateOrUpdateResponse contains the response from method RaiBlocklistsClient.CreateOrUpdate. +type RaiBlocklistsClientCreateOrUpdateResponse struct { + // Cognitive Services RaiBlocklist. + RaiBlocklist +} + +// RaiBlocklistsClientDeleteResponse contains the response from method RaiBlocklistsClient.BeginDelete. +type RaiBlocklistsClientDeleteResponse struct { + // placeholder for future response values +} + +// RaiBlocklistsClientGetResponse contains the response from method RaiBlocklistsClient.Get. +type RaiBlocklistsClientGetResponse struct { + // Cognitive Services RaiBlocklist. + RaiBlocklist +} + +// RaiBlocklistsClientListResponse contains the response from method RaiBlocklistsClient.NewListPager. +type RaiBlocklistsClientListResponse struct { + // The list of cognitive services RAI Blocklists. + RaiBlockListResult +} + +// RaiContentFiltersClientGetResponse contains the response from method RaiContentFiltersClient.Get. +type RaiContentFiltersClientGetResponse struct { + // Azure OpenAI Content Filter. + RaiContentFilter +} + +// RaiContentFiltersClientListResponse contains the response from method RaiContentFiltersClient.NewListPager. +type RaiContentFiltersClientListResponse struct { + // The list of Content Filters. + RaiContentFilterListResult +} + +// RaiPoliciesClientCreateOrUpdateResponse contains the response from method RaiPoliciesClient.CreateOrUpdate. +type RaiPoliciesClientCreateOrUpdateResponse struct { + // Cognitive Services RaiPolicy. + RaiPolicy +} + +// RaiPoliciesClientDeleteResponse contains the response from method RaiPoliciesClient.BeginDelete. +type RaiPoliciesClientDeleteResponse struct { + // placeholder for future response values +} + +// RaiPoliciesClientGetResponse contains the response from method RaiPoliciesClient.Get. +type RaiPoliciesClientGetResponse struct { + // Cognitive Services RaiPolicy. + RaiPolicy +} + +// RaiPoliciesClientListResponse contains the response from method RaiPoliciesClient.NewListPager. +type RaiPoliciesClientListResponse struct { + // The list of cognitive services RaiPolicies. + RaiPolicyListResult +} + // ResourceSKUsClientListResponse contains the response from method ResourceSKUsClient.NewListPager. type ResourceSKUsClientListResponse struct { // The Get Skus operation response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/time_rfc3339.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/time_rfc3339.go index 8e31b6f3b..9024c258f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/time_rfc3339.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/time_rfc3339.go @@ -19,12 +19,16 @@ import ( ) // Azure reports time in UTC but it doesn't include the 'Z' time zone suffix in some cases. -var tzOffsetRegex = regexp.MustCompile(`(Z|z|\+|-)(\d+:\d+)*"*$`) +var tzOffsetRegex = regexp.MustCompile(`(?:Z|z|\+|-)(?:\d+:\d+)*"*$`) const ( - utcDateTimeJSON = `"2006-01-02T15:04:05.999999999"` - utcDateTime = "2006-01-02T15:04:05.999999999" - dateTimeJSON = `"` + time.RFC3339Nano + `"` + utcDateTime = "2006-01-02T15:04:05.999999999" + utcDateTimeJSON = `"` + utcDateTime + `"` + utcDateTimeNoT = "2006-01-02 15:04:05.999999999" + utcDateTimeJSONNoT = `"` + utcDateTimeNoT + `"` + dateTimeNoT = `2006-01-02 15:04:05.999999999Z07:00` + dateTimeJSON = `"` + time.RFC3339Nano + `"` + dateTimeJSONNoT = `"` + dateTimeNoT + `"` ) type dateTimeRFC3339 time.Time @@ -40,17 +44,33 @@ func (t dateTimeRFC3339) MarshalText() ([]byte, error) { } func (t *dateTimeRFC3339) UnmarshalJSON(data []byte) error { - layout := utcDateTimeJSON - if tzOffsetRegex.Match(data) { + tzOffset := tzOffsetRegex.Match(data) + hasT := strings.Contains(string(data), "T") || strings.Contains(string(data), "t") + var layout string + if tzOffset && hasT { layout = dateTimeJSON + } else if tzOffset { + layout = dateTimeJSONNoT + } else if hasT { + layout = utcDateTimeJSON + } else { + layout = utcDateTimeJSONNoT } return t.Parse(layout, string(data)) } func (t *dateTimeRFC3339) UnmarshalText(data []byte) error { - layout := utcDateTime - if tzOffsetRegex.Match(data) { + tzOffset := tzOffsetRegex.Match(data) + hasT := strings.Contains(string(data), "T") || strings.Contains(string(data), "t") + var layout string + if tzOffset && hasT { layout = time.RFC3339Nano + } else if tzOffset { + layout = dateTimeNoT + } else if hasT { + layout = utcDateTime + } else { + layout = utcDateTimeNoT } return t.Parse(layout, string(data)) } @@ -61,6 +81,10 @@ func (t *dateTimeRFC3339) Parse(layout, value string) error { return err } +func (t dateTimeRFC3339) String() string { + return time.Time(t).Format(time.RFC3339Nano) +} + func populateDateTimeRFC3339(m map[string]any, k string, t *time.Time) { if t == nil { return @@ -74,7 +98,7 @@ func populateDateTimeRFC3339(m map[string]any, k string, t *time.Time) { } func unpopulateDateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { - if data == nil || strings.EqualFold(string(data), "null") { + if data == nil || string(data) == "null" { return nil } var aux dateTimeRFC3339 diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/usages_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/usages_client.go index 429bc67df..efc7a4dbb 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/usages_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/usages_client.go @@ -45,7 +45,7 @@ func NewUsagesClient(subscriptionID string, credential azcore.TokenCredential, o // NewListPager - Get usages for the requested subscription // -// Generated from API version 2023-05-01 +// Generated from API version 2024-10-01 // - location - Resource location. // - options - UsagesClientListOptions contains the optional parameters for the UsagesClient.NewListPager method. func (client *UsagesClient) NewListPager(location string, options *UsagesClientListOptions) *runtime.Pager[UsagesClientListResponse] { @@ -87,10 +87,10 @@ func (client *UsagesClient) listCreateRequest(ctx context.Context, location stri return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridkubernetes/armhybridkubernetes/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridkubernetes/armhybridkubernetes/CHANGELOG.md new file mode 100644 index 000000000..510fd5927 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridkubernetes/armhybridkubernetes/CHANGELOG.md @@ -0,0 +1,27 @@ +# Release History + +## 1.2.0 (2023-11-24) +### Features Added + +- Support for test fakes and OpenTelemetry trace spans. + + +## 1.1.1 (2023-04-14) +### Bug Fixes + +- Fix serialization bug of empty value of `any` type. + + +## 1.1.0 (2023-03-31) +### Features Added + +- New struct `ClientFactory` which is a client factory used to create any client in this module + + +## 1.0.0 (2022-05-18) + +The package of `github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridkubernetes/armhybridkubernetes` is using our [next generation design principles](https://azure.github.io/azure-sdk/general_introduction.html) since version 1.0.0, which contains breaking changes. + +To migrate the existing applications to the latest version, please refer to [Migration Guide](https://aka.ms/azsdk/go/mgmt/migration). + +To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/go/mgmt). \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/LICENSE.txt b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridkubernetes/armhybridkubernetes/LICENSE.txt similarity index 100% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/LICENSE.txt rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridkubernetes/armhybridkubernetes/LICENSE.txt diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridkubernetes/armhybridkubernetes/README.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridkubernetes/armhybridkubernetes/README.md new file mode 100644 index 000000000..70e36a328 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridkubernetes/armhybridkubernetes/README.md @@ -0,0 +1,92 @@ +# Azure Kubernetes Connect Service Module for Go + +[![PkgGoDev](https://pkg.go.dev/badge/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridkubernetes/armhybridkubernetes)](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridkubernetes/armhybridkubernetes) + +The `armhybridkubernetes` module provides operations for working with Azure Kubernetes Connect Service. + +[Source code](https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/resourcemanager/hybridkubernetes/armhybridkubernetes) + +# Getting started + +## Prerequisites + +- an [Azure subscription](https://azure.microsoft.com/free/) +- Go 1.18 or above (You could download and install the latest version of Go from [here](https://go.dev/doc/install). It will replace the existing Go on your machine. If you want to install multiple Go versions on the same machine, you could refer this [doc](https://go.dev/doc/manage-install).) + +## Install the package + +This project uses [Go modules](https://github.com/golang/go/wiki/Modules) for versioning and dependency management. + +Install the Azure Kubernetes Connect Service module: + +```sh +go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridkubernetes/armhybridkubernetes +``` + +## Authorization + +When creating a client, you will need to provide a credential for authenticating with Azure Kubernetes Connect Service. The `azidentity` module provides facilities for various ways of authenticating with Azure including client/secret, certificate, managed identity, and more. + +```go +cred, err := azidentity.NewDefaultAzureCredential(nil) +``` + +For more information on authentication, please see the documentation for `azidentity` at [pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity). + +## Client Factory + +Azure Kubernetes Connect Service module consists of one or more clients. We provide a client factory which could be used to create any client in this module. + +```go +clientFactory, err := armhybridkubernetes.NewClientFactory(, cred, nil) +``` + +You can use `ClientOptions` in package `github.com/Azure/azure-sdk-for-go/sdk/azcore/arm` to set endpoint to connect with public and sovereign clouds as well as Azure Stack. For more information, please see the documentation for `azcore` at [pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore). + +```go +options := arm.ClientOptions { + ClientOptions: azcore.ClientOptions { + Cloud: cloud.AzureChina, + }, +} +clientFactory, err := armhybridkubernetes.NewClientFactory(, cred, &options) +``` + +## Clients + +A client groups a set of related APIs, providing access to its functionality. Create one or more clients to access the APIs you require using client factory. + +```go +client := clientFactory.NewConnectedClusterClient() +``` + +## Fakes + +The fake package contains types used for constructing in-memory fake servers used in unit tests. +This allows writing tests to cover various success/error conditions without the need for connecting to a live service. + +Please see https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/samples/fakes for details and examples on how to use fakes. + +## Provide Feedback + +If you encounter bugs or have suggestions, please +[open an issue](https://github.com/Azure/azure-sdk-for-go/issues) and assign the `Kubernetes Connect Service` label. + +# Contributing + +This project welcomes contributions and suggestions. Most contributions require +you to agree to a Contributor License Agreement (CLA) declaring that you have +the right to, and actually do, grant us the rights to use your contribution. +For details, visit [https://cla.microsoft.com](https://cla.microsoft.com). + +When you submit a pull request, a CLA-bot will automatically determine whether +you need to provide a CLA and decorate the PR appropriately (e.g., label, +comment). Simply follow the instructions provided by the bot. You will only +need to do this once across all repos using our CLA. + +This project has adopted the +[Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). +For more information, see the +[Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) +or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any +additional questions or comments. \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridkubernetes/armhybridkubernetes/autorest.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridkubernetes/armhybridkubernetes/autorest.md new file mode 100644 index 000000000..887789e94 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridkubernetes/armhybridkubernetes/autorest.md @@ -0,0 +1,13 @@ +### AutoRest Configuration + +> see https://aka.ms/autorest + +``` yaml +azure-arm: true +require: +- https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/hybridkubernetes/resource-manager/readme.md +- https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/hybridkubernetes/resource-manager/readme.go.md +license-header: MICROSOFT_MIT_NO_VERSION +module-version: 1.2.0 + +``` \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridkubernetes/armhybridkubernetes/build.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridkubernetes/armhybridkubernetes/build.go new file mode 100644 index 000000000..232aa5f94 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridkubernetes/armhybridkubernetes/build.go @@ -0,0 +1,7 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +// This file enables 'go generate' to regenerate this specific SDK +//go:generate pwsh ../../../../eng/scripts/build.ps1 -skipBuild -cleanGenerated -format -tidy -generate resourcemanager/hybridkubernetes/armhybridkubernetes + +package armhybridkubernetes diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridkubernetes/armhybridkubernetes/ci.yml b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridkubernetes/armhybridkubernetes/ci.yml new file mode 100644 index 000000000..27a438082 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridkubernetes/armhybridkubernetes/ci.yml @@ -0,0 +1,28 @@ +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. +trigger: + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/resourcemanager/hybridkubernetes/armhybridkubernetes/ + +pr: + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/resourcemanager/hybridkubernetes/armhybridkubernetes/ + +stages: +- template: /eng/pipelines/templates/jobs/archetype-sdk-client.yml + parameters: + IncludeRelease: true + ServiceDirectory: 'resourcemanager/hybridkubernetes/armhybridkubernetes' diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridkubernetes/armhybridkubernetes/client_factory.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridkubernetes/armhybridkubernetes/client_factory.go new file mode 100644 index 000000000..44162d5d9 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridkubernetes/armhybridkubernetes/client_factory.go @@ -0,0 +1,50 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armhybridkubernetes + +import ( + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" +) + +// ClientFactory is a client factory used to create any client in this module. +// Don't use this type directly, use NewClientFactory instead. +type ClientFactory struct { + subscriptionID string + credential azcore.TokenCredential + options *arm.ClientOptions +} + +// NewClientFactory creates a new instance of ClientFactory with the specified values. +// The parameter values will be propagated to any client created from this factory. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error) { + _, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + return &ClientFactory{ + subscriptionID: subscriptionID, credential: credential, + options: options.Clone(), + }, nil +} + +// NewConnectedClusterClient creates a new instance of ConnectedClusterClient. +func (c *ClientFactory) NewConnectedClusterClient() *ConnectedClusterClient { + subClient, _ := NewConnectedClusterClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewOperationsClient creates a new instance of OperationsClient. +func (c *ClientFactory) NewOperationsClient() *OperationsClient { + subClient, _ := NewOperationsClient(c.credential, c.options) + return subClient +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridkubernetes/armhybridkubernetes/connectedcluster_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridkubernetes/armhybridkubernetes/connectedcluster_client.go new file mode 100644 index 000000000..a1747abb9 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridkubernetes/armhybridkubernetes/connectedcluster_client.go @@ -0,0 +1,520 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armhybridkubernetes + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ConnectedClusterClient contains the methods for the ConnectedCluster group. +// Don't use this type directly, use NewConnectedClusterClient() instead. +type ConnectedClusterClient struct { + internal *arm.Client + subscriptionID string +} + +// NewConnectedClusterClient creates a new instance of ConnectedClusterClient with the specified values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewConnectedClusterClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ConnectedClusterClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ConnectedClusterClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreate - API to register a new Kubernetes cluster and create a tracked resource in Azure Resource Manager (ARM). +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-10-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - clusterName - The name of the Kubernetes cluster on which get is called. +// - connectedCluster - Parameters supplied to Create a Connected Cluster. +// - options - ConnectedClusterClientBeginCreateOptions contains the optional parameters for the ConnectedClusterClient.BeginCreate +// method. +func (client *ConnectedClusterClient) BeginCreate(ctx context.Context, resourceGroupName string, clusterName string, connectedCluster ConnectedCluster, options *ConnectedClusterClientBeginCreateOptions) (*runtime.Poller[ConnectedClusterClientCreateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.create(ctx, resourceGroupName, clusterName, connectedCluster, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ConnectedClusterClientCreateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ConnectedClusterClientCreateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Create - API to register a new Kubernetes cluster and create a tracked resource in Azure Resource Manager (ARM). +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-10-01 +func (client *ConnectedClusterClient) create(ctx context.Context, resourceGroupName string, clusterName string, connectedCluster ConnectedCluster, options *ConnectedClusterClientBeginCreateOptions) (*http.Response, error) { + var err error + const operationName = "ConnectedClusterClient.BeginCreate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createCreateRequest(ctx, resourceGroupName, clusterName, connectedCluster, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createCreateRequest creates the Create request. +func (client *ConnectedClusterClient) createCreateRequest(ctx context.Context, resourceGroupName string, clusterName string, connectedCluster ConnectedCluster, options *ConnectedClusterClientBeginCreateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters/{clusterName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if clusterName == "" { + return nil, errors.New("parameter clusterName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{clusterName}", url.PathEscape(clusterName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-10-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, connectedCluster); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Delete a connected cluster, removing the tracked resource in Azure Resource Manager (ARM). +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-10-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - clusterName - The name of the Kubernetes cluster on which get is called. +// - options - ConnectedClusterClientBeginDeleteOptions contains the optional parameters for the ConnectedClusterClient.BeginDelete +// method. +func (client *ConnectedClusterClient) BeginDelete(ctx context.Context, resourceGroupName string, clusterName string, options *ConnectedClusterClientBeginDeleteOptions) (*runtime.Poller[ConnectedClusterClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, clusterName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ConnectedClusterClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ConnectedClusterClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Delete a connected cluster, removing the tracked resource in Azure Resource Manager (ARM). +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-10-01 +func (client *ConnectedClusterClient) deleteOperation(ctx context.Context, resourceGroupName string, clusterName string, options *ConnectedClusterClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "ConnectedClusterClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, clusterName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *ConnectedClusterClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, clusterName string, options *ConnectedClusterClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters/{clusterName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if clusterName == "" { + return nil, errors.New("parameter clusterName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{clusterName}", url.PathEscape(clusterName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-10-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Returns the properties of the specified connected cluster, including name, identity, properties, and additional cluster +// details. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-10-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - clusterName - The name of the Kubernetes cluster on which get is called. +// - options - ConnectedClusterClientGetOptions contains the optional parameters for the ConnectedClusterClient.Get method. +func (client *ConnectedClusterClient) Get(ctx context.Context, resourceGroupName string, clusterName string, options *ConnectedClusterClientGetOptions) (ConnectedClusterClientGetResponse, error) { + var err error + const operationName = "ConnectedClusterClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, clusterName, options) + if err != nil { + return ConnectedClusterClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ConnectedClusterClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ConnectedClusterClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ConnectedClusterClient) getCreateRequest(ctx context.Context, resourceGroupName string, clusterName string, options *ConnectedClusterClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters/{clusterName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if clusterName == "" { + return nil, errors.New("parameter clusterName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{clusterName}", url.PathEscape(clusterName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-10-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ConnectedClusterClient) getHandleResponse(resp *http.Response) (ConnectedClusterClientGetResponse, error) { + result := ConnectedClusterClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ConnectedCluster); err != nil { + return ConnectedClusterClientGetResponse{}, err + } + return result, nil +} + +// NewListByResourceGroupPager - API to enumerate registered connected K8s clusters under a Resource Group +// +// Generated from API version 2021-10-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - options - ConnectedClusterClientListByResourceGroupOptions contains the optional parameters for the ConnectedClusterClient.NewListByResourceGroupPager +// method. +func (client *ConnectedClusterClient) NewListByResourceGroupPager(resourceGroupName string, options *ConnectedClusterClientListByResourceGroupOptions) *runtime.Pager[ConnectedClusterClientListByResourceGroupResponse] { + return runtime.NewPager(runtime.PagingHandler[ConnectedClusterClientListByResourceGroupResponse]{ + More: func(page ConnectedClusterClientListByResourceGroupResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ConnectedClusterClientListByResourceGroupResponse) (ConnectedClusterClientListByResourceGroupResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ConnectedClusterClient.NewListByResourceGroupPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + }, nil) + if err != nil { + return ConnectedClusterClientListByResourceGroupResponse{}, err + } + return client.listByResourceGroupHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByResourceGroupCreateRequest creates the ListByResourceGroup request. +func (client *ConnectedClusterClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *ConnectedClusterClientListByResourceGroupOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-10-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByResourceGroupHandleResponse handles the ListByResourceGroup response. +func (client *ConnectedClusterClient) listByResourceGroupHandleResponse(resp *http.Response) (ConnectedClusterClientListByResourceGroupResponse, error) { + result := ConnectedClusterClientListByResourceGroupResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ConnectedClusterList); err != nil { + return ConnectedClusterClientListByResourceGroupResponse{}, err + } + return result, nil +} + +// NewListBySubscriptionPager - API to enumerate registered connected K8s clusters under a Subscription +// +// Generated from API version 2021-10-01 +// - options - ConnectedClusterClientListBySubscriptionOptions contains the optional parameters for the ConnectedClusterClient.NewListBySubscriptionPager +// method. +func (client *ConnectedClusterClient) NewListBySubscriptionPager(options *ConnectedClusterClientListBySubscriptionOptions) *runtime.Pager[ConnectedClusterClientListBySubscriptionResponse] { + return runtime.NewPager(runtime.PagingHandler[ConnectedClusterClientListBySubscriptionResponse]{ + More: func(page ConnectedClusterClientListBySubscriptionResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ConnectedClusterClientListBySubscriptionResponse) (ConnectedClusterClientListBySubscriptionResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ConnectedClusterClient.NewListBySubscriptionPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listBySubscriptionCreateRequest(ctx, options) + }, nil) + if err != nil { + return ConnectedClusterClientListBySubscriptionResponse{}, err + } + return client.listBySubscriptionHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listBySubscriptionCreateRequest creates the ListBySubscription request. +func (client *ConnectedClusterClient) listBySubscriptionCreateRequest(ctx context.Context, options *ConnectedClusterClientListBySubscriptionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Kubernetes/connectedClusters" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-10-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listBySubscriptionHandleResponse handles the ListBySubscription response. +func (client *ConnectedClusterClient) listBySubscriptionHandleResponse(resp *http.Response) (ConnectedClusterClientListBySubscriptionResponse, error) { + result := ConnectedClusterClientListBySubscriptionResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ConnectedClusterList); err != nil { + return ConnectedClusterClientListBySubscriptionResponse{}, err + } + return result, nil +} + +// ListClusterUserCredential - Gets cluster user credentials of the connected cluster with a specified resource group and +// name. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-10-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - clusterName - The name of the Kubernetes cluster on which get is called. +// - properties - ListClusterUserCredential properties +// - options - ConnectedClusterClientListClusterUserCredentialOptions contains the optional parameters for the ConnectedClusterClient.ListClusterUserCredential +// method. +func (client *ConnectedClusterClient) ListClusterUserCredential(ctx context.Context, resourceGroupName string, clusterName string, properties ListClusterUserCredentialProperties, options *ConnectedClusterClientListClusterUserCredentialOptions) (ConnectedClusterClientListClusterUserCredentialResponse, error) { + var err error + const operationName = "ConnectedClusterClient.ListClusterUserCredential" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listClusterUserCredentialCreateRequest(ctx, resourceGroupName, clusterName, properties, options) + if err != nil { + return ConnectedClusterClientListClusterUserCredentialResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ConnectedClusterClientListClusterUserCredentialResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ConnectedClusterClientListClusterUserCredentialResponse{}, err + } + resp, err := client.listClusterUserCredentialHandleResponse(httpResp) + return resp, err +} + +// listClusterUserCredentialCreateRequest creates the ListClusterUserCredential request. +func (client *ConnectedClusterClient) listClusterUserCredentialCreateRequest(ctx context.Context, resourceGroupName string, clusterName string, properties ListClusterUserCredentialProperties, options *ConnectedClusterClientListClusterUserCredentialOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters/{clusterName}/listClusterUserCredential" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if clusterName == "" { + return nil, errors.New("parameter clusterName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{clusterName}", url.PathEscape(clusterName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-10-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, properties); err != nil { + return nil, err + } + return req, nil +} + +// listClusterUserCredentialHandleResponse handles the ListClusterUserCredential response. +func (client *ConnectedClusterClient) listClusterUserCredentialHandleResponse(resp *http.Response) (ConnectedClusterClientListClusterUserCredentialResponse, error) { + result := ConnectedClusterClientListClusterUserCredentialResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.CredentialResults); err != nil { + return ConnectedClusterClientListClusterUserCredentialResponse{}, err + } + return result, nil +} + +// Update - API to update certain properties of the connected cluster resource +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-10-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - clusterName - The name of the Kubernetes cluster on which get is called. +// - connectedClusterPatch - Parameters supplied to update Connected Cluster. +// - options - ConnectedClusterClientUpdateOptions contains the optional parameters for the ConnectedClusterClient.Update method. +func (client *ConnectedClusterClient) Update(ctx context.Context, resourceGroupName string, clusterName string, connectedClusterPatch ConnectedClusterPatch, options *ConnectedClusterClientUpdateOptions) (ConnectedClusterClientUpdateResponse, error) { + var err error + const operationName = "ConnectedClusterClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, clusterName, connectedClusterPatch, options) + if err != nil { + return ConnectedClusterClientUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ConnectedClusterClientUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ConnectedClusterClientUpdateResponse{}, err + } + resp, err := client.updateHandleResponse(httpResp) + return resp, err +} + +// updateCreateRequest creates the Update request. +func (client *ConnectedClusterClient) updateCreateRequest(ctx context.Context, resourceGroupName string, clusterName string, connectedClusterPatch ConnectedClusterPatch, options *ConnectedClusterClientUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters/{clusterName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if clusterName == "" { + return nil, errors.New("parameter clusterName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{clusterName}", url.PathEscape(clusterName)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-10-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, connectedClusterPatch); err != nil { + return nil, err + } + return req, nil +} + +// updateHandleResponse handles the Update response. +func (client *ConnectedClusterClient) updateHandleResponse(resp *http.Response) (ConnectedClusterClientUpdateResponse, error) { + result := ConnectedClusterClientUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ConnectedCluster); err != nil { + return ConnectedClusterClientUpdateResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridkubernetes/armhybridkubernetes/constants.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridkubernetes/armhybridkubernetes/constants.go new file mode 100644 index 000000000..f1052db6c --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridkubernetes/armhybridkubernetes/constants.go @@ -0,0 +1,133 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armhybridkubernetes + +const ( + moduleName = "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridkubernetes/armhybridkubernetes" + moduleVersion = "v1.2.0" +) + +// AuthenticationMethod - The mode of client authentication. +type AuthenticationMethod string + +const ( + AuthenticationMethodAAD AuthenticationMethod = "AAD" + AuthenticationMethodToken AuthenticationMethod = "Token" +) + +// PossibleAuthenticationMethodValues returns the possible values for the AuthenticationMethod const type. +func PossibleAuthenticationMethodValues() []AuthenticationMethod { + return []AuthenticationMethod{ + AuthenticationMethodAAD, + AuthenticationMethodToken, + } +} + +// ConnectivityStatus - Represents the connectivity status of the connected cluster. +type ConnectivityStatus string + +const ( + ConnectivityStatusConnected ConnectivityStatus = "Connected" + ConnectivityStatusConnecting ConnectivityStatus = "Connecting" + ConnectivityStatusExpired ConnectivityStatus = "Expired" + ConnectivityStatusOffline ConnectivityStatus = "Offline" +) + +// PossibleConnectivityStatusValues returns the possible values for the ConnectivityStatus const type. +func PossibleConnectivityStatusValues() []ConnectivityStatus { + return []ConnectivityStatus{ + ConnectivityStatusConnected, + ConnectivityStatusConnecting, + ConnectivityStatusExpired, + ConnectivityStatusOffline, + } +} + +// CreatedByType - The type of identity that created the resource. +type CreatedByType string + +const ( + CreatedByTypeApplication CreatedByType = "Application" + CreatedByTypeKey CreatedByType = "Key" + CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity" + CreatedByTypeUser CreatedByType = "User" +) + +// PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type. +func PossibleCreatedByTypeValues() []CreatedByType { + return []CreatedByType{ + CreatedByTypeApplication, + CreatedByTypeKey, + CreatedByTypeManagedIdentity, + CreatedByTypeUser, + } +} + +// LastModifiedByType - The type of identity that last modified the resource. +type LastModifiedByType string + +const ( + LastModifiedByTypeApplication LastModifiedByType = "Application" + LastModifiedByTypeKey LastModifiedByType = "Key" + LastModifiedByTypeManagedIdentity LastModifiedByType = "ManagedIdentity" + LastModifiedByTypeUser LastModifiedByType = "User" +) + +// PossibleLastModifiedByTypeValues returns the possible values for the LastModifiedByType const type. +func PossibleLastModifiedByTypeValues() []LastModifiedByType { + return []LastModifiedByType{ + LastModifiedByTypeApplication, + LastModifiedByTypeKey, + LastModifiedByTypeManagedIdentity, + LastModifiedByTypeUser, + } +} + +// ProvisioningState - The current deployment state of connectedClusters. +type ProvisioningState string + +const ( + ProvisioningStateAccepted ProvisioningState = "Accepted" + ProvisioningStateCanceled ProvisioningState = "Canceled" + ProvisioningStateDeleting ProvisioningState = "Deleting" + ProvisioningStateFailed ProvisioningState = "Failed" + ProvisioningStateProvisioning ProvisioningState = "Provisioning" + ProvisioningStateSucceeded ProvisioningState = "Succeeded" + ProvisioningStateUpdating ProvisioningState = "Updating" +) + +// PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type. +func PossibleProvisioningStateValues() []ProvisioningState { + return []ProvisioningState{ + ProvisioningStateAccepted, + ProvisioningStateCanceled, + ProvisioningStateDeleting, + ProvisioningStateFailed, + ProvisioningStateProvisioning, + ProvisioningStateSucceeded, + ProvisioningStateUpdating, + } +} + +// ResourceIdentityType - The type of identity used for the connected cluster. The type 'SystemAssigned, includes a system +// created identity. The type 'None' means no identity is assigned to the connected cluster. +type ResourceIdentityType string + +const ( + ResourceIdentityTypeNone ResourceIdentityType = "None" + ResourceIdentityTypeSystemAssigned ResourceIdentityType = "SystemAssigned" +) + +// PossibleResourceIdentityTypeValues returns the possible values for the ResourceIdentityType const type. +func PossibleResourceIdentityTypeValues() []ResourceIdentityType { + return []ResourceIdentityType{ + ResourceIdentityTypeNone, + ResourceIdentityTypeSystemAssigned, + } +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridkubernetes/armhybridkubernetes/models.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridkubernetes/armhybridkubernetes/models.go new file mode 100644 index 000000000..c1e0f8eaf --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridkubernetes/armhybridkubernetes/models.go @@ -0,0 +1,269 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armhybridkubernetes + +import "time" + +// ConnectedCluster - Represents a connected cluster. +type ConnectedCluster struct { + // REQUIRED; The identity of the connected cluster. + Identity *ConnectedClusterIdentity + + // REQUIRED; The geo-location where the resource lives + Location *string + + // REQUIRED; Describes the connected cluster resource properties. + Properties *ConnectedClusterProperties + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; Metadata pertaining to creation and last modification of the resource + SystemData *SystemData + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// ConnectedClusterIdentity - Identity for the connected cluster. +type ConnectedClusterIdentity struct { + // REQUIRED; The type of identity used for the connected cluster. The type 'SystemAssigned, includes a system created identity. + // The type 'None' means no identity is assigned to the connected cluster. + Type *ResourceIdentityType + + // READ-ONLY; The principal id of connected cluster identity. This property will only be provided for a system assigned identity. + PrincipalID *string + + // READ-ONLY; The tenant id associated with the connected cluster. This property will only be provided for a system assigned + // identity. + TenantID *string +} + +// ConnectedClusterList - The paginated list of connected Clusters +type ConnectedClusterList struct { + // The link to fetch the next page of connected cluster + NextLink *string + + // The list of connected clusters + Value []*ConnectedCluster +} + +// ConnectedClusterPatch - Object containing updates for patch operations. +type ConnectedClusterPatch struct { + // Describes the connected cluster resource properties that can be updated during PATCH operation. + Properties any + + // Resource tags. + Tags map[string]*string +} + +// ConnectedClusterProperties - Properties of the connected cluster. +type ConnectedClusterProperties struct { + // REQUIRED; Base64 encoded public certificate used by the agent to do the initial handshake to the backend services in Azure. + AgentPublicKeyCertificate *string + + // The Kubernetes distribution running on this connected cluster. + Distribution *string + + // The infrastructure on which the Kubernetes cluster represented by this connected cluster is running on. + Infrastructure *string + + // Provisioning state of the connected cluster resource. + ProvisioningState *ProvisioningState + + // READ-ONLY; Version of the agent running on the connected cluster resource + AgentVersion *string + + // READ-ONLY; Represents the connectivity status of the connected cluster. + ConnectivityStatus *ConnectivityStatus + + // READ-ONLY; The Kubernetes version of the connected cluster resource + KubernetesVersion *string + + // READ-ONLY; Time representing the last instance when heart beat was received from the cluster + LastConnectivityTime *time.Time + + // READ-ONLY; Expiration time of the managed identity certificate + ManagedIdentityCertificateExpirationTime *time.Time + + // READ-ONLY; Connected cluster offering + Offering *string + + // READ-ONLY; Number of CPU cores present in the connected cluster resource + TotalCoreCount *int32 + + // READ-ONLY; Number of nodes present in the connected cluster resource + TotalNodeCount *int32 +} + +// CredentialResult - The credential result response. +type CredentialResult struct { + // READ-ONLY; The name of the credential. + Name *string + + // READ-ONLY; Base64-encoded Kubernetes configuration file. + Value []byte +} + +// CredentialResults - The list of credential result response. +type CredentialResults struct { + // READ-ONLY; Contains the REP (rendezvous endpoint) and “Sender” access token. + HybridConnectionConfig *HybridConnectionConfig + + // READ-ONLY; Base64-encoded Kubernetes configuration file. + Kubeconfigs []*CredentialResult +} + +// ErrorAdditionalInfo - The resource management error additional info. +type ErrorAdditionalInfo struct { + // READ-ONLY; The additional info. + Info any + + // READ-ONLY; The additional info type. + Type *string +} + +// ErrorDetail - The error detail. +type ErrorDetail struct { + // READ-ONLY; The error additional info. + AdditionalInfo []*ErrorAdditionalInfo + + // READ-ONLY; The error code. + Code *string + + // READ-ONLY; The error details. + Details []*ErrorDetail + + // READ-ONLY; The error message. + Message *string + + // READ-ONLY; The error target. + Target *string +} + +// ErrorResponse - Common error response for all Azure Resource Manager APIs to return error details for failed operations. +// (This also follows the OData error response format.). +type ErrorResponse struct { + // The error object. + Error *ErrorDetail +} + +// HybridConnectionConfig - Contains the REP (rendezvous endpoint) and “Sender” access token. +type HybridConnectionConfig struct { + // READ-ONLY; Timestamp when this token will be expired. + ExpirationTime *int64 + + // READ-ONLY; Name of the connection + HybridConnectionName *string + + // READ-ONLY; Name of the relay. + Relay *string + + // READ-ONLY; Sender access token + Token *string +} + +type ListClusterUserCredentialProperties struct { + // REQUIRED; The mode of client authentication. + AuthenticationMethod *AuthenticationMethod + + // REQUIRED; Boolean value to indicate whether the request is for client side proxy or not + ClientProxy *bool +} + +// Operation - The Connected cluster API operation +type Operation struct { + // READ-ONLY; The object that represents the operation. + Display *OperationDisplay + + // READ-ONLY; Operation name: {Microsoft.Kubernetes}/{resource}/{operation} + Name *string +} + +// OperationDisplay - The object that represents the operation. +type OperationDisplay struct { + // Description of the operation. + Description *string + + // Operation type: Read, write, delete, etc. + Operation *string + + // Service provider: Microsoft.connectedClusters + Provider *string + + // Connected Cluster Resource on which the operation is performed + Resource *string +} + +// OperationList - The paginated list of connected cluster API operations. +type OperationList struct { + // The link to fetch the next page of connected cluster API operations. + NextLink *string + + // READ-ONLY; The list of connected cluster API operations. + Value []*Operation +} + +// Resource - Common fields that are returned in the response for all Azure Resource Manager resources +type Resource struct { + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// SystemData - Metadata pertaining to creation and last modification of the resource. +type SystemData struct { + // The timestamp of resource creation (UTC). + CreatedAt *time.Time + + // The identity that created the resource. + CreatedBy *string + + // The type of identity that created the resource. + CreatedByType *CreatedByType + + // The timestamp of resource modification (UTC). + LastModifiedAt *time.Time + + // The identity that last modified the resource. + LastModifiedBy *string + + // The type of identity that last modified the resource. + LastModifiedByType *LastModifiedByType +} + +// TrackedResource - The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' +// and a 'location' +type TrackedResource struct { + // REQUIRED; The geo-location where the resource lives + Location *string + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridkubernetes/armhybridkubernetes/models_serde.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridkubernetes/armhybridkubernetes/models_serde.go new file mode 100644 index 000000000..6e9ac1e9d --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridkubernetes/armhybridkubernetes/models_serde.go @@ -0,0 +1,739 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armhybridkubernetes + +import ( + "encoding/json" + "fmt" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "reflect" +) + +// MarshalJSON implements the json.Marshaller interface for type ConnectedCluster. +func (c ConnectedCluster) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", c.ID) + populate(objectMap, "identity", c.Identity) + populate(objectMap, "location", c.Location) + populate(objectMap, "name", c.Name) + populate(objectMap, "properties", c.Properties) + populate(objectMap, "systemData", c.SystemData) + populate(objectMap, "tags", c.Tags) + populate(objectMap, "type", c.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectedCluster. +func (c *ConnectedCluster) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &c.ID) + delete(rawMsg, key) + case "identity": + err = unpopulate(val, "Identity", &c.Identity) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &c.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &c.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &c.SystemData) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &c.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ConnectedClusterIdentity. +func (c ConnectedClusterIdentity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "principalId", c.PrincipalID) + populate(objectMap, "tenantId", c.TenantID) + populate(objectMap, "type", c.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectedClusterIdentity. +func (c *ConnectedClusterIdentity) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "principalId": + err = unpopulate(val, "PrincipalID", &c.PrincipalID) + delete(rawMsg, key) + case "tenantId": + err = unpopulate(val, "TenantID", &c.TenantID) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ConnectedClusterList. +func (c ConnectedClusterList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", c.NextLink) + populate(objectMap, "value", c.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectedClusterList. +func (c *ConnectedClusterList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &c.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &c.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ConnectedClusterPatch. +func (c ConnectedClusterPatch) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateAny(objectMap, "properties", c.Properties) + populate(objectMap, "tags", c.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectedClusterPatch. +func (c *ConnectedClusterPatch) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &c.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &c.Tags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ConnectedClusterProperties. +func (c ConnectedClusterProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "agentPublicKeyCertificate", c.AgentPublicKeyCertificate) + populate(objectMap, "agentVersion", c.AgentVersion) + populate(objectMap, "connectivityStatus", c.ConnectivityStatus) + populate(objectMap, "distribution", c.Distribution) + populate(objectMap, "infrastructure", c.Infrastructure) + populate(objectMap, "kubernetesVersion", c.KubernetesVersion) + populateDateTimeRFC3339(objectMap, "lastConnectivityTime", c.LastConnectivityTime) + populateDateTimeRFC3339(objectMap, "managedIdentityCertificateExpirationTime", c.ManagedIdentityCertificateExpirationTime) + populate(objectMap, "offering", c.Offering) + populate(objectMap, "provisioningState", c.ProvisioningState) + populate(objectMap, "totalCoreCount", c.TotalCoreCount) + populate(objectMap, "totalNodeCount", c.TotalNodeCount) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectedClusterProperties. +func (c *ConnectedClusterProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "agentPublicKeyCertificate": + err = unpopulate(val, "AgentPublicKeyCertificate", &c.AgentPublicKeyCertificate) + delete(rawMsg, key) + case "agentVersion": + err = unpopulate(val, "AgentVersion", &c.AgentVersion) + delete(rawMsg, key) + case "connectivityStatus": + err = unpopulate(val, "ConnectivityStatus", &c.ConnectivityStatus) + delete(rawMsg, key) + case "distribution": + err = unpopulate(val, "Distribution", &c.Distribution) + delete(rawMsg, key) + case "infrastructure": + err = unpopulate(val, "Infrastructure", &c.Infrastructure) + delete(rawMsg, key) + case "kubernetesVersion": + err = unpopulate(val, "KubernetesVersion", &c.KubernetesVersion) + delete(rawMsg, key) + case "lastConnectivityTime": + err = unpopulateDateTimeRFC3339(val, "LastConnectivityTime", &c.LastConnectivityTime) + delete(rawMsg, key) + case "managedIdentityCertificateExpirationTime": + err = unpopulateDateTimeRFC3339(val, "ManagedIdentityCertificateExpirationTime", &c.ManagedIdentityCertificateExpirationTime) + delete(rawMsg, key) + case "offering": + err = unpopulate(val, "Offering", &c.Offering) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) + delete(rawMsg, key) + case "totalCoreCount": + err = unpopulate(val, "TotalCoreCount", &c.TotalCoreCount) + delete(rawMsg, key) + case "totalNodeCount": + err = unpopulate(val, "TotalNodeCount", &c.TotalNodeCount) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CredentialResult. +func (c CredentialResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", c.Name) + populateByteArray(objectMap, "value", c.Value, runtime.Base64StdFormat) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CredentialResult. +func (c *CredentialResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "value": + err = runtime.DecodeByteArray(string(val), &c.Value, runtime.Base64StdFormat) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CredentialResults. +func (c CredentialResults) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "hybridConnectionConfig", c.HybridConnectionConfig) + populate(objectMap, "kubeconfigs", c.Kubeconfigs) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CredentialResults. +func (c *CredentialResults) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "hybridConnectionConfig": + err = unpopulate(val, "HybridConnectionConfig", &c.HybridConnectionConfig) + delete(rawMsg, key) + case "kubeconfigs": + err = unpopulate(val, "Kubeconfigs", &c.Kubeconfigs) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ErrorAdditionalInfo. +func (e ErrorAdditionalInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateAny(objectMap, "info", e.Info) + populate(objectMap, "type", e.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ErrorAdditionalInfo. +func (e *ErrorAdditionalInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "info": + err = unpopulate(val, "Info", &e.Info) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &e.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ErrorDetail. +func (e ErrorDetail) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "additionalInfo", e.AdditionalInfo) + populate(objectMap, "code", e.Code) + populate(objectMap, "details", e.Details) + populate(objectMap, "message", e.Message) + populate(objectMap, "target", e.Target) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ErrorDetail. +func (e *ErrorDetail) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "additionalInfo": + err = unpopulate(val, "AdditionalInfo", &e.AdditionalInfo) + delete(rawMsg, key) + case "code": + err = unpopulate(val, "Code", &e.Code) + delete(rawMsg, key) + case "details": + err = unpopulate(val, "Details", &e.Details) + delete(rawMsg, key) + case "message": + err = unpopulate(val, "Message", &e.Message) + delete(rawMsg, key) + case "target": + err = unpopulate(val, "Target", &e.Target) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ErrorResponse. +func (e ErrorResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "error", e.Error) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ErrorResponse. +func (e *ErrorResponse) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "error": + err = unpopulate(val, "Error", &e.Error) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HybridConnectionConfig. +func (h HybridConnectionConfig) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "expirationTime", h.ExpirationTime) + populate(objectMap, "hybridConnectionName", h.HybridConnectionName) + populate(objectMap, "relay", h.Relay) + populate(objectMap, "token", h.Token) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HybridConnectionConfig. +func (h *HybridConnectionConfig) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "expirationTime": + err = unpopulate(val, "ExpirationTime", &h.ExpirationTime) + delete(rawMsg, key) + case "hybridConnectionName": + err = unpopulate(val, "HybridConnectionName", &h.HybridConnectionName) + delete(rawMsg, key) + case "relay": + err = unpopulate(val, "Relay", &h.Relay) + delete(rawMsg, key) + case "token": + err = unpopulate(val, "Token", &h.Token) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ListClusterUserCredentialProperties. +func (l ListClusterUserCredentialProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "authenticationMethod", l.AuthenticationMethod) + populate(objectMap, "clientProxy", l.ClientProxy) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ListClusterUserCredentialProperties. +func (l *ListClusterUserCredentialProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "authenticationMethod": + err = unpopulate(val, "AuthenticationMethod", &l.AuthenticationMethod) + delete(rawMsg, key) + case "clientProxy": + err = unpopulate(val, "ClientProxy", &l.ClientProxy) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Operation. +func (o Operation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "display", o.Display) + populate(objectMap, "name", o.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Operation. +func (o *Operation) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "display": + err = unpopulate(val, "Display", &o.Display) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &o.Name) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OperationDisplay. +func (o OperationDisplay) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", o.Description) + populate(objectMap, "operation", o.Operation) + populate(objectMap, "provider", o.Provider) + populate(objectMap, "resource", o.Resource) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplay. +func (o *OperationDisplay) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &o.Description) + delete(rawMsg, key) + case "operation": + err = unpopulate(val, "Operation", &o.Operation) + delete(rawMsg, key) + case "provider": + err = unpopulate(val, "Provider", &o.Provider) + delete(rawMsg, key) + case "resource": + err = unpopulate(val, "Resource", &o.Resource) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OperationList. +func (o OperationList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", o.NextLink) + populate(objectMap, "value", o.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OperationList. +func (o *OperationList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &o.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &o.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Resource. +func (r Resource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", r.ID) + populate(objectMap, "name", r.Name) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Resource. +func (r *Resource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SystemData. +func (s SystemData) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "createdAt", s.CreatedAt) + populate(objectMap, "createdBy", s.CreatedBy) + populate(objectMap, "createdByType", s.CreatedByType) + populateDateTimeRFC3339(objectMap, "lastModifiedAt", s.LastModifiedAt) + populate(objectMap, "lastModifiedBy", s.LastModifiedBy) + populate(objectMap, "lastModifiedByType", s.LastModifiedByType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SystemData. +func (s *SystemData) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "createdAt": + err = unpopulateDateTimeRFC3339(val, "CreatedAt", &s.CreatedAt) + delete(rawMsg, key) + case "createdBy": + err = unpopulate(val, "CreatedBy", &s.CreatedBy) + delete(rawMsg, key) + case "createdByType": + err = unpopulate(val, "CreatedByType", &s.CreatedByType) + delete(rawMsg, key) + case "lastModifiedAt": + err = unpopulateDateTimeRFC3339(val, "LastModifiedAt", &s.LastModifiedAt) + delete(rawMsg, key) + case "lastModifiedBy": + err = unpopulate(val, "LastModifiedBy", &s.LastModifiedBy) + delete(rawMsg, key) + case "lastModifiedByType": + err = unpopulate(val, "LastModifiedByType", &s.LastModifiedByType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TrackedResource. +func (t TrackedResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", t.ID) + populate(objectMap, "location", t.Location) + populate(objectMap, "name", t.Name) + populate(objectMap, "tags", t.Tags) + populate(objectMap, "type", t.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TrackedResource. +func (t *TrackedResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &t.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &t.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &t.Name) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &t.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &t.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +func populate(m map[string]any, k string, v any) { + if v == nil { + return + } else if azcore.IsNullValue(v) { + m[k] = nil + } else if !reflect.ValueOf(v).IsNil() { + m[k] = v + } +} + +func populateAny(m map[string]any, k string, v any) { + if v == nil { + return + } else if azcore.IsNullValue(v) { + m[k] = nil + } else { + m[k] = v + } +} + +func populateByteArray(m map[string]any, k string, b []byte, f runtime.Base64Encoding) { + if azcore.IsNullValue(b) { + m[k] = nil + } else if len(b) == 0 { + return + } else { + m[k] = runtime.EncodeByteArray(b, f) + } +} + +func unpopulate(data json.RawMessage, fn string, v any) error { + if data == nil { + return nil + } + if err := json.Unmarshal(data, v); err != nil { + return fmt.Errorf("struct field %s: %v", fn, err) + } + return nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridkubernetes/armhybridkubernetes/operations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridkubernetes/armhybridkubernetes/operations_client.go new file mode 100644 index 000000000..ccc31448d --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridkubernetes/armhybridkubernetes/operations_client.go @@ -0,0 +1,88 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armhybridkubernetes + +import ( + "context" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" +) + +// OperationsClient contains the methods for the Operations group. +// Don't use this type directly, use NewOperationsClient() instead. +type OperationsClient struct { + internal *arm.Client +} + +// NewOperationsClient creates a new instance of OperationsClient with the specified values. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &OperationsClient{ + internal: cl, + } + return client, nil +} + +// NewGetPager - Lists all of the available API operations for Connected Cluster resource. +// +// Generated from API version 2021-10-01 +// - options - OperationsClientGetOptions contains the optional parameters for the OperationsClient.NewGetPager method. +func (client *OperationsClient) NewGetPager(options *OperationsClientGetOptions) *runtime.Pager[OperationsClientGetResponse] { + return runtime.NewPager(runtime.PagingHandler[OperationsClientGetResponse]{ + More: func(page OperationsClientGetResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *OperationsClientGetResponse) (OperationsClientGetResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "OperationsClient.NewGetPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.getCreateRequest(ctx, options) + }, nil) + if err != nil { + return OperationsClientGetResponse{}, err + } + return client.getHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// getCreateRequest creates the Get request. +func (client *OperationsClient) getCreateRequest(ctx context.Context, options *OperationsClientGetOptions) (*policy.Request, error) { + urlPath := "/providers/Microsoft.Kubernetes/operations" + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-10-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *OperationsClient) getHandleResponse(resp *http.Response) (OperationsClientGetResponse, error) { + result := OperationsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.OperationList); err != nil { + return OperationsClientGetResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridkubernetes/armhybridkubernetes/options.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridkubernetes/armhybridkubernetes/options.go new file mode 100644 index 000000000..47ad7f339 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridkubernetes/armhybridkubernetes/options.go @@ -0,0 +1,54 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armhybridkubernetes + +// ConnectedClusterClientBeginCreateOptions contains the optional parameters for the ConnectedClusterClient.BeginCreate method. +type ConnectedClusterClientBeginCreateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ConnectedClusterClientBeginDeleteOptions contains the optional parameters for the ConnectedClusterClient.BeginDelete method. +type ConnectedClusterClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ConnectedClusterClientGetOptions contains the optional parameters for the ConnectedClusterClient.Get method. +type ConnectedClusterClientGetOptions struct { + // placeholder for future optional parameters +} + +// ConnectedClusterClientListByResourceGroupOptions contains the optional parameters for the ConnectedClusterClient.NewListByResourceGroupPager +// method. +type ConnectedClusterClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// ConnectedClusterClientListBySubscriptionOptions contains the optional parameters for the ConnectedClusterClient.NewListBySubscriptionPager +// method. +type ConnectedClusterClientListBySubscriptionOptions struct { + // placeholder for future optional parameters +} + +// ConnectedClusterClientListClusterUserCredentialOptions contains the optional parameters for the ConnectedClusterClient.ListClusterUserCredential +// method. +type ConnectedClusterClientListClusterUserCredentialOptions struct { + // placeholder for future optional parameters +} + +// ConnectedClusterClientUpdateOptions contains the optional parameters for the ConnectedClusterClient.Update method. +type ConnectedClusterClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// OperationsClientGetOptions contains the optional parameters for the OperationsClient.NewGetPager method. +type OperationsClientGetOptions struct { + // placeholder for future optional parameters +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridkubernetes/armhybridkubernetes/response_types.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridkubernetes/armhybridkubernetes/response_types.go new file mode 100644 index 000000000..cdf4b8080 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridkubernetes/armhybridkubernetes/response_types.go @@ -0,0 +1,56 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armhybridkubernetes + +// ConnectedClusterClientCreateResponse contains the response from method ConnectedClusterClient.BeginCreate. +type ConnectedClusterClientCreateResponse struct { + // Represents a connected cluster. + ConnectedCluster +} + +// ConnectedClusterClientDeleteResponse contains the response from method ConnectedClusterClient.BeginDelete. +type ConnectedClusterClientDeleteResponse struct { + // placeholder for future response values +} + +// ConnectedClusterClientGetResponse contains the response from method ConnectedClusterClient.Get. +type ConnectedClusterClientGetResponse struct { + // Represents a connected cluster. + ConnectedCluster +} + +// ConnectedClusterClientListByResourceGroupResponse contains the response from method ConnectedClusterClient.NewListByResourceGroupPager. +type ConnectedClusterClientListByResourceGroupResponse struct { + // The paginated list of connected Clusters + ConnectedClusterList +} + +// ConnectedClusterClientListBySubscriptionResponse contains the response from method ConnectedClusterClient.NewListBySubscriptionPager. +type ConnectedClusterClientListBySubscriptionResponse struct { + // The paginated list of connected Clusters + ConnectedClusterList +} + +// ConnectedClusterClientListClusterUserCredentialResponse contains the response from method ConnectedClusterClient.ListClusterUserCredential. +type ConnectedClusterClientListClusterUserCredentialResponse struct { + // The list of credential result response. + CredentialResults +} + +// ConnectedClusterClientUpdateResponse contains the response from method ConnectedClusterClient.Update. +type ConnectedClusterClientUpdateResponse struct { + // Represents a connected cluster. + ConnectedCluster +} + +// OperationsClientGetResponse contains the response from method OperationsClient.NewGetPager. +type OperationsClientGetResponse struct { + // The paginated list of connected cluster API operations. + OperationList +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridkubernetes/armhybridkubernetes/time_rfc3339.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridkubernetes/armhybridkubernetes/time_rfc3339.go new file mode 100644 index 000000000..bb6f0affc --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridkubernetes/armhybridkubernetes/time_rfc3339.go @@ -0,0 +1,86 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armhybridkubernetes + +import ( + "encoding/json" + "fmt" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "reflect" + "regexp" + "strings" + "time" +) + +// Azure reports time in UTC but it doesn't include the 'Z' time zone suffix in some cases. +var tzOffsetRegex = regexp.MustCompile(`(Z|z|\+|-)(\d+:\d+)*"*$`) + +const ( + utcDateTimeJSON = `"2006-01-02T15:04:05.999999999"` + utcDateTime = "2006-01-02T15:04:05.999999999" + dateTimeJSON = `"` + time.RFC3339Nano + `"` +) + +type dateTimeRFC3339 time.Time + +func (t dateTimeRFC3339) MarshalJSON() ([]byte, error) { + tt := time.Time(t) + return tt.MarshalJSON() +} + +func (t dateTimeRFC3339) MarshalText() ([]byte, error) { + tt := time.Time(t) + return tt.MarshalText() +} + +func (t *dateTimeRFC3339) UnmarshalJSON(data []byte) error { + layout := utcDateTimeJSON + if tzOffsetRegex.Match(data) { + layout = dateTimeJSON + } + return t.Parse(layout, string(data)) +} + +func (t *dateTimeRFC3339) UnmarshalText(data []byte) error { + layout := utcDateTime + if tzOffsetRegex.Match(data) { + layout = time.RFC3339Nano + } + return t.Parse(layout, string(data)) +} + +func (t *dateTimeRFC3339) Parse(layout, value string) error { + p, err := time.Parse(layout, strings.ToUpper(value)) + *t = dateTimeRFC3339(p) + return err +} + +func populateDateTimeRFC3339(m map[string]any, k string, t *time.Time) { + if t == nil { + return + } else if azcore.IsNullValue(t) { + m[k] = nil + return + } else if reflect.ValueOf(t).IsNil() { + return + } + m[k] = (*dateTimeRFC3339)(t) +} + +func unpopulateDateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { + if data == nil || strings.EqualFold(string(data), "null") { + return nil + } + var aux dateTimeRFC3339 + if err := json.Unmarshal(data, &aux); err != nil { + return fmt.Errorf("struct field %s: %v", fn, err) + } + *t = (*time.Time)(&aux) + return nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/autorest.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/autorest.md deleted file mode 100644 index 143ccd851..000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/autorest.md +++ /dev/null @@ -1,12 +0,0 @@ -### AutoRest Configuration - -> see https://aka.ms/autorest - -``` yaml -azure-arm: true -require: -- https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/readme.go.md -license-header: MICROSOFT_MIT_NO_VERSION -module-version: 3.2.0 -``` \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/client_factory.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/client_factory.go deleted file mode 100644 index c476d99de..000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/client_factory.go +++ /dev/null @@ -1,200 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armmachinelearning - -import ( - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" -) - -// ClientFactory is a client factory used to create any client in this module. -// Don't use this type directly, use NewClientFactory instead. -type ClientFactory struct { - subscriptionID string - credential azcore.TokenCredential - options *arm.ClientOptions -} - -// NewClientFactory creates a new instance of ClientFactory with the specified values. -// The parameter values will be propagated to any client created from this factory. -// - subscriptionID - The ID of the target subscription. -// - credential - used to authorize requests. Usually a credential from azidentity. -// - options - pass nil to accept the default values. -func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error) { - _, err := arm.NewClient(moduleName, moduleVersion, credential, options) - if err != nil { - return nil, err - } - return &ClientFactory{ - subscriptionID: subscriptionID, credential: credential, - options: options.Clone(), - }, nil -} - -// NewBatchDeploymentsClient creates a new instance of BatchDeploymentsClient. -func (c *ClientFactory) NewBatchDeploymentsClient() *BatchDeploymentsClient { - subClient, _ := NewBatchDeploymentsClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -// NewBatchEndpointsClient creates a new instance of BatchEndpointsClient. -func (c *ClientFactory) NewBatchEndpointsClient() *BatchEndpointsClient { - subClient, _ := NewBatchEndpointsClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -// NewCodeContainersClient creates a new instance of CodeContainersClient. -func (c *ClientFactory) NewCodeContainersClient() *CodeContainersClient { - subClient, _ := NewCodeContainersClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -// NewCodeVersionsClient creates a new instance of CodeVersionsClient. -func (c *ClientFactory) NewCodeVersionsClient() *CodeVersionsClient { - subClient, _ := NewCodeVersionsClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -// NewComponentContainersClient creates a new instance of ComponentContainersClient. -func (c *ClientFactory) NewComponentContainersClient() *ComponentContainersClient { - subClient, _ := NewComponentContainersClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -// NewComponentVersionsClient creates a new instance of ComponentVersionsClient. -func (c *ClientFactory) NewComponentVersionsClient() *ComponentVersionsClient { - subClient, _ := NewComponentVersionsClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -// NewComputeClient creates a new instance of ComputeClient. -func (c *ClientFactory) NewComputeClient() *ComputeClient { - subClient, _ := NewComputeClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -// NewDataContainersClient creates a new instance of DataContainersClient. -func (c *ClientFactory) NewDataContainersClient() *DataContainersClient { - subClient, _ := NewDataContainersClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -// NewDataVersionsClient creates a new instance of DataVersionsClient. -func (c *ClientFactory) NewDataVersionsClient() *DataVersionsClient { - subClient, _ := NewDataVersionsClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -// NewDatastoresClient creates a new instance of DatastoresClient. -func (c *ClientFactory) NewDatastoresClient() *DatastoresClient { - subClient, _ := NewDatastoresClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -// NewEnvironmentContainersClient creates a new instance of EnvironmentContainersClient. -func (c *ClientFactory) NewEnvironmentContainersClient() *EnvironmentContainersClient { - subClient, _ := NewEnvironmentContainersClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -// NewEnvironmentVersionsClient creates a new instance of EnvironmentVersionsClient. -func (c *ClientFactory) NewEnvironmentVersionsClient() *EnvironmentVersionsClient { - subClient, _ := NewEnvironmentVersionsClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -// NewJobsClient creates a new instance of JobsClient. -func (c *ClientFactory) NewJobsClient() *JobsClient { - subClient, _ := NewJobsClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -// NewModelContainersClient creates a new instance of ModelContainersClient. -func (c *ClientFactory) NewModelContainersClient() *ModelContainersClient { - subClient, _ := NewModelContainersClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -// NewModelVersionsClient creates a new instance of ModelVersionsClient. -func (c *ClientFactory) NewModelVersionsClient() *ModelVersionsClient { - subClient, _ := NewModelVersionsClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -// NewOnlineDeploymentsClient creates a new instance of OnlineDeploymentsClient. -func (c *ClientFactory) NewOnlineDeploymentsClient() *OnlineDeploymentsClient { - subClient, _ := NewOnlineDeploymentsClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -// NewOnlineEndpointsClient creates a new instance of OnlineEndpointsClient. -func (c *ClientFactory) NewOnlineEndpointsClient() *OnlineEndpointsClient { - subClient, _ := NewOnlineEndpointsClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -// NewOperationsClient creates a new instance of OperationsClient. -func (c *ClientFactory) NewOperationsClient() *OperationsClient { - subClient, _ := NewOperationsClient(c.credential, c.options) - return subClient -} - -// NewPrivateEndpointConnectionsClient creates a new instance of PrivateEndpointConnectionsClient. -func (c *ClientFactory) NewPrivateEndpointConnectionsClient() *PrivateEndpointConnectionsClient { - subClient, _ := NewPrivateEndpointConnectionsClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -// NewPrivateLinkResourcesClient creates a new instance of PrivateLinkResourcesClient. -func (c *ClientFactory) NewPrivateLinkResourcesClient() *PrivateLinkResourcesClient { - subClient, _ := NewPrivateLinkResourcesClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -// NewQuotasClient creates a new instance of QuotasClient. -func (c *ClientFactory) NewQuotasClient() *QuotasClient { - subClient, _ := NewQuotasClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -// NewSchedulesClient creates a new instance of SchedulesClient. -func (c *ClientFactory) NewSchedulesClient() *SchedulesClient { - subClient, _ := NewSchedulesClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -// NewUsagesClient creates a new instance of UsagesClient. -func (c *ClientFactory) NewUsagesClient() *UsagesClient { - subClient, _ := NewUsagesClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -// NewVirtualMachineSizesClient creates a new instance of VirtualMachineSizesClient. -func (c *ClientFactory) NewVirtualMachineSizesClient() *VirtualMachineSizesClient { - subClient, _ := NewVirtualMachineSizesClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -// NewWorkspaceConnectionsClient creates a new instance of WorkspaceConnectionsClient. -func (c *ClientFactory) NewWorkspaceConnectionsClient() *WorkspaceConnectionsClient { - subClient, _ := NewWorkspaceConnectionsClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -// NewWorkspaceFeaturesClient creates a new instance of WorkspaceFeaturesClient. -func (c *ClientFactory) NewWorkspaceFeaturesClient() *WorkspaceFeaturesClient { - subClient, _ := NewWorkspaceFeaturesClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -// NewWorkspacesClient creates a new instance of WorkspacesClient. -func (c *ClientFactory) NewWorkspacesClient() *WorkspacesClient { - subClient, _ := NewWorkspacesClient(c.subscriptionID, c.credential, c.options) - return subClient -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/CHANGELOG.md similarity index 61% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/CHANGELOG.md rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/CHANGELOG.md index 01fdecafb..b9ee8a76a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/CHANGELOG.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/CHANGELOG.md @@ -1,5 +1,465 @@ # Release History +## 4.0.0 (2024-08-23) +### Breaking Changes + +- Type of `ComputeStartStopSchedule.Cron` has been changed from `*CronTrigger` to `*Cron` +- Type of `ComputeStartStopSchedule.Recurrence` has been changed from `*RecurrenceTrigger` to `*Recurrence` +- Type of `ComputeStartStopSchedule.TriggerType` has been changed from `*TriggerType` to `*ComputeTriggerType` +- Struct `AmlOperation` has been removed +- Struct `AmlOperationDisplay` has been removed +- Struct `AmlOperationListResult` has been removed +- Field `AmlOperationListResult` of struct `OperationsClientListResponse` has been removed +- Field `SubnetArmID` of struct `PrivateEndpoint` has been removed + +### Features Added + +- New value `ConnectionAuthTypeAAD`, `ConnectionAuthTypeAPIKey`, `ConnectionAuthTypeAccessKey`, `ConnectionAuthTypeAccountKey`, `ConnectionAuthTypeCustomKeys`, `ConnectionAuthTypeOAuth2`, `ConnectionAuthTypeServicePrincipal` added to enum type `ConnectionAuthType` +- New value `ConnectionCategoryADLSGen2`, `ConnectionCategoryAIServices`, `ConnectionCategoryAPIKey`, `ConnectionCategoryAmazonMws`, `ConnectionCategoryAmazonRdsForOracle`, `ConnectionCategoryAmazonRdsForSQLServer`, `ConnectionCategoryAmazonRedshift`, `ConnectionCategoryAmazonS3Compatible`, `ConnectionCategoryAzureBlob`, `ConnectionCategoryAzureDataExplorer`, `ConnectionCategoryAzureDatabricksDeltaLake`, `ConnectionCategoryAzureMariaDb`, `ConnectionCategoryAzureMySQLDb`, `ConnectionCategoryAzureOneLake`, `ConnectionCategoryAzureOpenAI`, `ConnectionCategoryAzurePostgresDb`, `ConnectionCategoryAzureSQLDb`, `ConnectionCategoryAzureSQLMi`, `ConnectionCategoryAzureSynapseAnalytics`, `ConnectionCategoryAzureTableStorage`, `ConnectionCategoryBingLLMSearch`, `ConnectionCategoryCassandra`, `ConnectionCategoryCognitiveSearch`, `ConnectionCategoryCognitiveService`, `ConnectionCategoryConcur`, `ConnectionCategoryCosmosDb`, `ConnectionCategoryCosmosDbMongoDbAPI`, `ConnectionCategoryCouchbase`, `ConnectionCategoryCustomKeys`, `ConnectionCategoryDb2`, `ConnectionCategoryDrill`, `ConnectionCategoryDynamics`, `ConnectionCategoryDynamicsAx`, `ConnectionCategoryDynamicsCrm`, `ConnectionCategoryEloqua`, `ConnectionCategoryFileServer`, `ConnectionCategoryFtpServer`, `ConnectionCategoryGenericContainerRegistry`, `ConnectionCategoryGenericHTTP`, `ConnectionCategoryGenericRest`, `ConnectionCategoryGoogleAdWords`, `ConnectionCategoryGoogleBigQuery`, `ConnectionCategoryGoogleCloudStorage`, `ConnectionCategoryGreenplum`, `ConnectionCategoryHbase`, `ConnectionCategoryHdfs`, `ConnectionCategoryHive`, `ConnectionCategoryHubspot`, `ConnectionCategoryImpala`, `ConnectionCategoryInformix`, `ConnectionCategoryJira`, `ConnectionCategoryMagento`, `ConnectionCategoryMariaDb`, `ConnectionCategoryMarketo`, `ConnectionCategoryMicrosoftAccess`, `ConnectionCategoryMongoDbAtlas`, `ConnectionCategoryMongoDbV2`, `ConnectionCategoryMySQL`, `ConnectionCategoryNetezza`, `ConnectionCategoryODataRest`, `ConnectionCategoryOdbc`, `ConnectionCategoryOffice365`, `ConnectionCategoryOpenAI`, `ConnectionCategoryOracle`, `ConnectionCategoryOracleCloudStorage`, `ConnectionCategoryOracleServiceCloud`, `ConnectionCategoryPayPal`, `ConnectionCategoryPhoenix`, `ConnectionCategoryPostgreSQL`, `ConnectionCategoryPresto`, `ConnectionCategoryQuickBooks`, `ConnectionCategoryRedis`, `ConnectionCategoryResponsys`, `ConnectionCategoryS3`, `ConnectionCategorySQLServer`, `ConnectionCategorySalesforce`, `ConnectionCategorySalesforceMarketingCloud`, `ConnectionCategorySalesforceServiceCloud`, `ConnectionCategorySapBw`, `ConnectionCategorySapCloudForCustomer`, `ConnectionCategorySapEcc`, `ConnectionCategorySapHana`, `ConnectionCategorySapOpenHub`, `ConnectionCategorySapTable`, `ConnectionCategorySerp`, `ConnectionCategoryServerless`, `ConnectionCategoryServiceNow`, `ConnectionCategorySftp`, `ConnectionCategorySharePointOnlineList`, `ConnectionCategoryShopify`, `ConnectionCategorySnowflake`, `ConnectionCategorySpark`, `ConnectionCategorySquare`, `ConnectionCategorySybase`, `ConnectionCategoryTeradata`, `ConnectionCategoryVertica`, `ConnectionCategoryWebTable`, `ConnectionCategoryXero`, `ConnectionCategoryZoho` added to enum type `ConnectionCategory` +- New value `DatastoreTypeOneLake` added to enum type `DatastoreType` +- New value `JobTypeSpark` added to enum type `JobType` +- New value `OutputDeliveryModeDirect` added to enum type `OutputDeliveryMode` +- New value `ScheduleActionTypeCreateMonitor` added to enum type `ScheduleActionType` +- New enum type `ActionType` with values `ActionTypeInternal` +- New enum type `AssetProvisioningState` with values `AssetProvisioningStateCanceled`, `AssetProvisioningStateCreating`, `AssetProvisioningStateDeleting`, `AssetProvisioningStateFailed`, `AssetProvisioningStateSucceeded`, `AssetProvisioningStateUpdating` +- New enum type `BatchDeploymentConfigurationType` with values `BatchDeploymentConfigurationTypeModel`, `BatchDeploymentConfigurationTypePipelineComponent` +- New enum type `CategoricalDataDriftMetric` with values `CategoricalDataDriftMetricJensenShannonDistance`, `CategoricalDataDriftMetricPearsonsChiSquaredTest`, `CategoricalDataDriftMetricPopulationStabilityIndex` +- New enum type `CategoricalDataQualityMetric` with values `CategoricalDataQualityMetricDataTypeErrorRate`, `CategoricalDataQualityMetricNullValueRate`, `CategoricalDataQualityMetricOutOfBoundsRate` +- New enum type `CategoricalPredictionDriftMetric` with values `CategoricalPredictionDriftMetricJensenShannonDistance`, `CategoricalPredictionDriftMetricPearsonsChiSquaredTest`, `CategoricalPredictionDriftMetricPopulationStabilityIndex` +- New enum type `ComputeRecurrenceFrequency` with values `ComputeRecurrenceFrequencyDay`, `ComputeRecurrenceFrequencyHour`, `ComputeRecurrenceFrequencyMinute`, `ComputeRecurrenceFrequencyMonth`, `ComputeRecurrenceFrequencyWeek` +- New enum type `ComputeTriggerType` with values `ComputeTriggerTypeCron`, `ComputeTriggerTypeRecurrence` +- New enum type `ComputeWeekDay` with values `ComputeWeekDayFriday`, `ComputeWeekDayMonday`, `ComputeWeekDaySaturday`, `ComputeWeekDaySunday`, `ComputeWeekDayThursday`, `ComputeWeekDayTuesday`, `ComputeWeekDayWednesday` +- New enum type `ConnectionGroup` with values `ConnectionGroupAzure`, `ConnectionGroupAzureAI`, `ConnectionGroupDatabase`, `ConnectionGroupFile`, `ConnectionGroupGenericProtocol`, `ConnectionGroupNoSQL`, `ConnectionGroupServicesAndApps` +- New enum type `ContentSafetyStatus` with values `ContentSafetyStatusDisabled`, `ContentSafetyStatusEnabled` +- New enum type `DataAvailabilityStatus` with values `DataAvailabilityStatusComplete`, `DataAvailabilityStatusIncomplete`, `DataAvailabilityStatusNone`, `DataAvailabilityStatusPending` +- New enum type `DataCollectionMode` with values `DataCollectionModeDisabled`, `DataCollectionModeEnabled` +- New enum type `DataReferenceCredentialType` with values `DataReferenceCredentialTypeDockerCredentials`, `DataReferenceCredentialTypeManagedIdentity`, `DataReferenceCredentialTypeNoCredentials`, `DataReferenceCredentialTypeSAS` +- New enum type `EmailNotificationEnableType` with values `EmailNotificationEnableTypeJobCancelled`, `EmailNotificationEnableTypeJobCompleted`, `EmailNotificationEnableTypeJobFailed` +- New enum type `EndpointServiceConnectionStatus` with values `EndpointServiceConnectionStatusApproved`, `EndpointServiceConnectionStatusDisconnected`, `EndpointServiceConnectionStatusPending`, `EndpointServiceConnectionStatusRejected` +- New enum type `EnvironmentVariableType` with values `EnvironmentVariableTypeLocal` +- New enum type `FeatureAttributionMetric` with values `FeatureAttributionMetricNormalizedDiscountedCumulativeGain` +- New enum type `FeatureDataType` with values `FeatureDataTypeBinary`, `FeatureDataTypeBoolean`, `FeatureDataTypeDatetime`, `FeatureDataTypeDouble`, `FeatureDataTypeFloat`, `FeatureDataTypeInteger`, `FeatureDataTypeLong`, `FeatureDataTypeString` +- New enum type `FeatureImportanceMode` with values `FeatureImportanceModeDisabled`, `FeatureImportanceModeEnabled` +- New enum type `ImageType` with values `ImageTypeAzureml`, `ImageTypeDocker` +- New enum type `IsolationMode` with values `IsolationModeAllowInternetOutbound`, `IsolationModeAllowOnlyApprovedOutbound`, `IsolationModeDisabled` +- New enum type `JobTier` with values `JobTierBasic`, `JobTierNull`, `JobTierPremium`, `JobTierSpot`, `JobTierStandard` +- New enum type `ManagedNetworkStatus` with values `ManagedNetworkStatusActive`, `ManagedNetworkStatusInactive` +- New enum type `MarketplaceSubscriptionProvisioningState` with values `MarketplaceSubscriptionProvisioningStateCanceled`, `MarketplaceSubscriptionProvisioningStateCreating`, `MarketplaceSubscriptionProvisioningStateDeleting`, `MarketplaceSubscriptionProvisioningStateFailed`, `MarketplaceSubscriptionProvisioningStateSucceeded`, `MarketplaceSubscriptionProvisioningStateUpdating` +- New enum type `MarketplaceSubscriptionStatus` with values `MarketplaceSubscriptionStatusSubscribed`, `MarketplaceSubscriptionStatusSuspended`, `MarketplaceSubscriptionStatusUnsubscribed` +- New enum type `MaterializationStoreType` with values `MaterializationStoreTypeNone`, `MaterializationStoreTypeOffline`, `MaterializationStoreTypeOnline`, `MaterializationStoreTypeOnlineAndOffline` +- New enum type `ModelTaskType` with values `ModelTaskTypeClassification`, `ModelTaskTypeRegression` +- New enum type `MonitorComputeIdentityType` with values `MonitorComputeIdentityTypeAmlToken`, `MonitorComputeIdentityTypeManagedIdentity` +- New enum type `MonitorComputeType` with values `MonitorComputeTypeServerlessSpark` +- New enum type `MonitoringFeatureDataType` with values `MonitoringFeatureDataTypeCategorical`, `MonitoringFeatureDataTypeNumerical` +- New enum type `MonitoringFeatureFilterType` with values `MonitoringFeatureFilterTypeAllFeatures`, `MonitoringFeatureFilterTypeFeatureSubset`, `MonitoringFeatureFilterTypeTopNByAttribution` +- New enum type `MonitoringInputDataType` with values `MonitoringInputDataTypeFixed`, `MonitoringInputDataTypeRolling`, `MonitoringInputDataTypeStatic` +- New enum type `MonitoringNotificationType` with values `MonitoringNotificationTypeAmlNotification` +- New enum type `MonitoringSignalType` with values `MonitoringSignalTypeCustom`, `MonitoringSignalTypeDataDrift`, `MonitoringSignalTypeDataQuality`, `MonitoringSignalTypeFeatureAttributionDrift`, `MonitoringSignalTypePredictionDrift` +- New enum type `NodesValueType` with values `NodesValueTypeAll` +- New enum type `NumericalDataDriftMetric` with values `NumericalDataDriftMetricJensenShannonDistance`, `NumericalDataDriftMetricNormalizedWassersteinDistance`, `NumericalDataDriftMetricPopulationStabilityIndex`, `NumericalDataDriftMetricTwoSampleKolmogorovSmirnovTest` +- New enum type `NumericalDataQualityMetric` with values `NumericalDataQualityMetricDataTypeErrorRate`, `NumericalDataQualityMetricNullValueRate`, `NumericalDataQualityMetricOutOfBoundsRate` +- New enum type `NumericalPredictionDriftMetric` with values `NumericalPredictionDriftMetricJensenShannonDistance`, `NumericalPredictionDriftMetricNormalizedWassersteinDistance`, `NumericalPredictionDriftMetricPopulationStabilityIndex`, `NumericalPredictionDriftMetricTwoSampleKolmogorovSmirnovTest` +- New enum type `OneLakeArtifactType` with values `OneLakeArtifactTypeLakeHouse` +- New enum type `Origin` with values `OriginSystem`, `OriginUser`, `OriginUserSystem` +- New enum type `PendingUploadCredentialType` with values `PendingUploadCredentialTypeSAS` +- New enum type `PendingUploadType` with values `PendingUploadTypeNone`, `PendingUploadTypeTemporaryBlobReference` +- New enum type `Protocol` with values `ProtocolHTTP`, `ProtocolTCP`, `ProtocolUDP` +- New enum type `RollingRateType` with values `RollingRateTypeDay`, `RollingRateTypeHour`, `RollingRateTypeMinute`, `RollingRateTypeMonth`, `RollingRateTypeYear` +- New enum type `RuleAction` with values `RuleActionAllow`, `RuleActionDeny` +- New enum type `RuleCategory` with values `RuleCategoryDependency`, `RuleCategoryRecommended`, `RuleCategoryRequired`, `RuleCategoryUserDefined` +- New enum type `RuleStatus` with values `RuleStatusActive`, `RuleStatusInactive` +- New enum type `RuleType` with values `RuleTypeFQDN`, `RuleTypePrivateEndpoint`, `RuleTypeServiceTag` +- New enum type `ServerlessEndpointState` with values `ServerlessEndpointStateCreating`, `ServerlessEndpointStateCreationFailed`, `ServerlessEndpointStateDeleting`, `ServerlessEndpointStateDeletionFailed`, `ServerlessEndpointStateOnline`, `ServerlessEndpointStateReinstating`, `ServerlessEndpointStateSuspended`, `ServerlessEndpointStateSuspending`, `ServerlessEndpointStateUnknown` +- New enum type `ServerlessInferenceEndpointAuthMode` with values `ServerlessInferenceEndpointAuthModeKey` +- New enum type `SparkJobEntryType` with values `SparkJobEntryTypeSparkJobPythonEntry`, `SparkJobEntryTypeSparkJobScalaEntry` +- New enum type `VolumeDefinitionType` with values `VolumeDefinitionTypeBind`, `VolumeDefinitionTypeNpipe`, `VolumeDefinitionTypeTmpfs`, `VolumeDefinitionTypeVolume` +- New enum type `WebhookType` with values `WebhookTypeAzureDevOps` +- New function `*AADAuthTypeWorkspaceConnectionProperties.GetWorkspaceConnectionPropertiesV2() *WorkspaceConnectionPropertiesV2` +- New function `*APIKeyAuthWorkspaceConnectionProperties.GetWorkspaceConnectionPropertiesV2() *WorkspaceConnectionPropertiesV2` +- New function `*AccessKeyAuthTypeWorkspaceConnectionProperties.GetWorkspaceConnectionPropertiesV2() *WorkspaceConnectionPropertiesV2` +- New function `*AccountKeyAuthTypeWorkspaceConnectionProperties.GetWorkspaceConnectionPropertiesV2() *WorkspaceConnectionPropertiesV2` +- New function `*AllFeatures.GetMonitoringFeatureFilterBase() *MonitoringFeatureFilterBase` +- New function `*AllNodes.GetNodes() *Nodes` +- New function `*AmlTokenComputeIdentity.GetMonitorComputeIdentityBase() *MonitorComputeIdentityBase` +- New function `*AnonymousAccessCredential.GetDataReferenceCredential() *DataReferenceCredential` +- New function `*AzureDevOpsWebhook.GetWebhook() *Webhook` +- New function `*BatchDeploymentConfiguration.GetBatchDeploymentConfiguration() *BatchDeploymentConfiguration` +- New function `*BatchPipelineComponentDeploymentConfiguration.GetBatchDeploymentConfiguration() *BatchDeploymentConfiguration` +- New function `*CategoricalDataDriftMetricThreshold.GetDataDriftMetricThresholdBase() *DataDriftMetricThresholdBase` +- New function `*CategoricalDataQualityMetricThreshold.GetDataQualityMetricThresholdBase() *DataQualityMetricThresholdBase` +- New function `*CategoricalPredictionDriftMetricThreshold.GetPredictionDriftMetricThresholdBase() *PredictionDriftMetricThresholdBase` +- New function `*ClientFactory.NewFeaturesClient() *FeaturesClient` +- New function `*ClientFactory.NewFeaturesetContainersClient() *FeaturesetContainersClient` +- New function `*ClientFactory.NewFeaturesetVersionsClient() *FeaturesetVersionsClient` +- New function `*ClientFactory.NewFeaturestoreEntityContainersClient() *FeaturestoreEntityContainersClient` +- New function `*ClientFactory.NewFeaturestoreEntityVersionsClient() *FeaturestoreEntityVersionsClient` +- New function `*ClientFactory.NewManagedNetworkProvisionsClient() *ManagedNetworkProvisionsClient` +- New function `*ClientFactory.NewManagedNetworkSettingsRuleClient() *ManagedNetworkSettingsRuleClient` +- New function `*ClientFactory.NewMarketplaceSubscriptionsClient() *MarketplaceSubscriptionsClient` +- New function `*ClientFactory.NewRegistriesClient() *RegistriesClient` +- New function `*ClientFactory.NewRegistryCodeContainersClient() *RegistryCodeContainersClient` +- New function `*ClientFactory.NewRegistryCodeVersionsClient() *RegistryCodeVersionsClient` +- New function `*ClientFactory.NewRegistryComponentContainersClient() *RegistryComponentContainersClient` +- New function `*ClientFactory.NewRegistryComponentVersionsClient() *RegistryComponentVersionsClient` +- New function `*ClientFactory.NewRegistryDataContainersClient() *RegistryDataContainersClient` +- New function `*ClientFactory.NewRegistryDataReferencesClient() *RegistryDataReferencesClient` +- New function `*ClientFactory.NewRegistryDataVersionsClient() *RegistryDataVersionsClient` +- New function `*ClientFactory.NewRegistryEnvironmentContainersClient() *RegistryEnvironmentContainersClient` +- New function `*ClientFactory.NewRegistryEnvironmentVersionsClient() *RegistryEnvironmentVersionsClient` +- New function `*ClientFactory.NewRegistryModelContainersClient() *RegistryModelContainersClient` +- New function `*ClientFactory.NewRegistryModelVersionsClient() *RegistryModelVersionsClient` +- New function `*ClientFactory.NewServerlessEndpointsClient() *ServerlessEndpointsClient` +- New function `*CodeVersionsClient.CreateOrGetStartPendingUpload(context.Context, string, string, string, string, PendingUploadRequestDto, *CodeVersionsClientCreateOrGetStartPendingUploadOptions) (CodeVersionsClientCreateOrGetStartPendingUploadResponse, error)` +- New function `*CodeVersionsClient.BeginPublish(context.Context, string, string, string, string, DestinationAsset, *CodeVersionsClientBeginPublishOptions) (*runtime.Poller[CodeVersionsClientPublishResponse], error)` +- New function `*ComponentVersionsClient.BeginPublish(context.Context, string, string, string, string, DestinationAsset, *ComponentVersionsClientBeginPublishOptions) (*runtime.Poller[ComponentVersionsClientPublishResponse], error)` +- New function `*CreateMonitorAction.GetScheduleActionBase() *ScheduleActionBase` +- New function `*CustomKeysWorkspaceConnectionProperties.GetWorkspaceConnectionPropertiesV2() *WorkspaceConnectionPropertiesV2` +- New function `*CustomMonitoringSignal.GetMonitoringSignalBase() *MonitoringSignalBase` +- New function `*DataDriftMetricThresholdBase.GetDataDriftMetricThresholdBase() *DataDriftMetricThresholdBase` +- New function `*DataDriftMonitoringSignal.GetMonitoringSignalBase() *MonitoringSignalBase` +- New function `*DataQualityMetricThresholdBase.GetDataQualityMetricThresholdBase() *DataQualityMetricThresholdBase` +- New function `*DataQualityMonitoringSignal.GetMonitoringSignalBase() *MonitoringSignalBase` +- New function `*DataReferenceCredential.GetDataReferenceCredential() *DataReferenceCredential` +- New function `*DataVersionsClient.BeginPublish(context.Context, string, string, string, string, DestinationAsset, *DataVersionsClientBeginPublishOptions) (*runtime.Poller[DataVersionsClientPublishResponse], error)` +- New function `*DockerCredential.GetDataReferenceCredential() *DataReferenceCredential` +- New function `*EnvironmentVersionsClient.BeginPublish(context.Context, string, string, string, string, DestinationAsset, *EnvironmentVersionsClientBeginPublishOptions) (*runtime.Poller[EnvironmentVersionsClientPublishResponse], error)` +- New function `*FeatureAttributionDriftMonitoringSignal.GetMonitoringSignalBase() *MonitoringSignalBase` +- New function `*FeatureSubset.GetMonitoringFeatureFilterBase() *MonitoringFeatureFilterBase` +- New function `NewFeaturesClient(string, azcore.TokenCredential, *arm.ClientOptions) (*FeaturesClient, error)` +- New function `*FeaturesClient.Get(context.Context, string, string, string, string, string, *FeaturesClientGetOptions) (FeaturesClientGetResponse, error)` +- New function `*FeaturesClient.NewListPager(string, string, string, string, *FeaturesClientListOptions) *runtime.Pager[FeaturesClientListResponse]` +- New function `NewFeaturesetContainersClient(string, azcore.TokenCredential, *arm.ClientOptions) (*FeaturesetContainersClient, error)` +- New function `*FeaturesetContainersClient.BeginCreateOrUpdate(context.Context, string, string, string, FeaturesetContainer, *FeaturesetContainersClientBeginCreateOrUpdateOptions) (*runtime.Poller[FeaturesetContainersClientCreateOrUpdateResponse], error)` +- New function `*FeaturesetContainersClient.BeginDelete(context.Context, string, string, string, *FeaturesetContainersClientBeginDeleteOptions) (*runtime.Poller[FeaturesetContainersClientDeleteResponse], error)` +- New function `*FeaturesetContainersClient.GetEntity(context.Context, string, string, string, *FeaturesetContainersClientGetEntityOptions) (FeaturesetContainersClientGetEntityResponse, error)` +- New function `*FeaturesetContainersClient.NewListPager(string, string, *FeaturesetContainersClientListOptions) *runtime.Pager[FeaturesetContainersClientListResponse]` +- New function `NewFeaturesetVersionsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*FeaturesetVersionsClient, error)` +- New function `*FeaturesetVersionsClient.BeginCreateOrUpdate(context.Context, string, string, string, string, FeaturesetVersion, *FeaturesetVersionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[FeaturesetVersionsClientCreateOrUpdateResponse], error)` +- New function `*FeaturesetVersionsClient.BeginDelete(context.Context, string, string, string, string, *FeaturesetVersionsClientBeginDeleteOptions) (*runtime.Poller[FeaturesetVersionsClientDeleteResponse], error)` +- New function `*FeaturesetVersionsClient.Get(context.Context, string, string, string, string, *FeaturesetVersionsClientGetOptions) (FeaturesetVersionsClientGetResponse, error)` +- New function `*FeaturesetVersionsClient.NewListPager(string, string, string, *FeaturesetVersionsClientListOptions) *runtime.Pager[FeaturesetVersionsClientListResponse]` +- New function `*FeaturesetVersionsClient.BeginBackfill(context.Context, string, string, string, string, FeaturesetVersionBackfillRequest, *FeaturesetVersionsClientBeginBackfillOptions) (*runtime.Poller[FeaturesetVersionsClientBackfillResponse], error)` +- New function `NewFeaturestoreEntityContainersClient(string, azcore.TokenCredential, *arm.ClientOptions) (*FeaturestoreEntityContainersClient, error)` +- New function `*FeaturestoreEntityContainersClient.BeginCreateOrUpdate(context.Context, string, string, string, FeaturestoreEntityContainer, *FeaturestoreEntityContainersClientBeginCreateOrUpdateOptions) (*runtime.Poller[FeaturestoreEntityContainersClientCreateOrUpdateResponse], error)` +- New function `*FeaturestoreEntityContainersClient.BeginDelete(context.Context, string, string, string, *FeaturestoreEntityContainersClientBeginDeleteOptions) (*runtime.Poller[FeaturestoreEntityContainersClientDeleteResponse], error)` +- New function `*FeaturestoreEntityContainersClient.GetEntity(context.Context, string, string, string, *FeaturestoreEntityContainersClientGetEntityOptions) (FeaturestoreEntityContainersClientGetEntityResponse, error)` +- New function `*FeaturestoreEntityContainersClient.NewListPager(string, string, *FeaturestoreEntityContainersClientListOptions) *runtime.Pager[FeaturestoreEntityContainersClientListResponse]` +- New function `NewFeaturestoreEntityVersionsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*FeaturestoreEntityVersionsClient, error)` +- New function `*FeaturestoreEntityVersionsClient.BeginCreateOrUpdate(context.Context, string, string, string, string, FeaturestoreEntityVersion, *FeaturestoreEntityVersionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[FeaturestoreEntityVersionsClientCreateOrUpdateResponse], error)` +- New function `*FeaturestoreEntityVersionsClient.BeginDelete(context.Context, string, string, string, string, *FeaturestoreEntityVersionsClientBeginDeleteOptions) (*runtime.Poller[FeaturestoreEntityVersionsClientDeleteResponse], error)` +- New function `*FeaturestoreEntityVersionsClient.Get(context.Context, string, string, string, string, *FeaturestoreEntityVersionsClientGetOptions) (FeaturestoreEntityVersionsClientGetResponse, error)` +- New function `*FeaturestoreEntityVersionsClient.NewListPager(string, string, string, *FeaturestoreEntityVersionsClientListOptions) *runtime.Pager[FeaturestoreEntityVersionsClientListResponse]` +- New function `*FixedInputData.GetMonitoringInputDataBase() *MonitoringInputDataBase` +- New function `*FqdnOutboundRule.GetOutboundRule() *OutboundRule` +- New function `*LakeHouseArtifact.GetOneLakeArtifact() *OneLakeArtifact` +- New function `*ManagedComputeIdentity.GetMonitorComputeIdentityBase() *MonitorComputeIdentityBase` +- New function `*ManagedIdentityCredential.GetDataReferenceCredential() *DataReferenceCredential` +- New function `NewManagedNetworkProvisionsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*ManagedNetworkProvisionsClient, error)` +- New function `*ManagedNetworkProvisionsClient.BeginProvisionManagedNetwork(context.Context, string, string, *ManagedNetworkProvisionsClientBeginProvisionManagedNetworkOptions) (*runtime.Poller[ManagedNetworkProvisionsClientProvisionManagedNetworkResponse], error)` +- New function `NewManagedNetworkSettingsRuleClient(string, azcore.TokenCredential, *arm.ClientOptions) (*ManagedNetworkSettingsRuleClient, error)` +- New function `*ManagedNetworkSettingsRuleClient.BeginCreateOrUpdate(context.Context, string, string, string, OutboundRuleBasicResource, *ManagedNetworkSettingsRuleClientBeginCreateOrUpdateOptions) (*runtime.Poller[ManagedNetworkSettingsRuleClientCreateOrUpdateResponse], error)` +- New function `*ManagedNetworkSettingsRuleClient.BeginDelete(context.Context, string, string, string, *ManagedNetworkSettingsRuleClientBeginDeleteOptions) (*runtime.Poller[ManagedNetworkSettingsRuleClientDeleteResponse], error)` +- New function `*ManagedNetworkSettingsRuleClient.Get(context.Context, string, string, string, *ManagedNetworkSettingsRuleClientGetOptions) (ManagedNetworkSettingsRuleClientGetResponse, error)` +- New function `*ManagedNetworkSettingsRuleClient.NewListPager(string, string, *ManagedNetworkSettingsRuleClientListOptions) *runtime.Pager[ManagedNetworkSettingsRuleClientListResponse]` +- New function `NewMarketplaceSubscriptionsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*MarketplaceSubscriptionsClient, error)` +- New function `*MarketplaceSubscriptionsClient.BeginCreateOrUpdate(context.Context, string, string, string, MarketplaceSubscription, *MarketplaceSubscriptionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[MarketplaceSubscriptionsClientCreateOrUpdateResponse], error)` +- New function `*MarketplaceSubscriptionsClient.BeginDelete(context.Context, string, string, string, *MarketplaceSubscriptionsClientBeginDeleteOptions) (*runtime.Poller[MarketplaceSubscriptionsClientDeleteResponse], error)` +- New function `*MarketplaceSubscriptionsClient.Get(context.Context, string, string, string, *MarketplaceSubscriptionsClientGetOptions) (MarketplaceSubscriptionsClientGetResponse, error)` +- New function `*MarketplaceSubscriptionsClient.NewListPager(string, string, *MarketplaceSubscriptionsClientListOptions) *runtime.Pager[MarketplaceSubscriptionsClientListResponse]` +- New function `*ModelVersionsClient.BeginPublish(context.Context, string, string, string, string, DestinationAsset, *ModelVersionsClientBeginPublishOptions) (*runtime.Poller[ModelVersionsClientPublishResponse], error)` +- New function `*MonitorComputeConfigurationBase.GetMonitorComputeConfigurationBase() *MonitorComputeConfigurationBase` +- New function `*MonitorComputeIdentityBase.GetMonitorComputeIdentityBase() *MonitorComputeIdentityBase` +- New function `*MonitorServerlessSparkCompute.GetMonitorComputeConfigurationBase() *MonitorComputeConfigurationBase` +- New function `*MonitoringFeatureFilterBase.GetMonitoringFeatureFilterBase() *MonitoringFeatureFilterBase` +- New function `*MonitoringInputDataBase.GetMonitoringInputDataBase() *MonitoringInputDataBase` +- New function `*MonitoringSignalBase.GetMonitoringSignalBase() *MonitoringSignalBase` +- New function `*OAuth2AuthTypeWorkspaceConnectionProperties.GetWorkspaceConnectionPropertiesV2() *WorkspaceConnectionPropertiesV2` +- New function `*OneLakeArtifact.GetOneLakeArtifact() *OneLakeArtifact` +- New function `*OneLakeDatastore.GetDatastoreProperties() *DatastoreProperties` +- New function `*OutboundRule.GetOutboundRule() *OutboundRule` +- New function `*PendingUploadCredentialDto.GetPendingUploadCredentialDto() *PendingUploadCredentialDto` +- New function `*PredictionDriftMetricThresholdBase.GetPredictionDriftMetricThresholdBase() *PredictionDriftMetricThresholdBase` +- New function `*PredictionDriftMonitoringSignal.GetMonitoringSignalBase() *MonitoringSignalBase` +- New function `*PrivateEndpointOutboundRule.GetOutboundRule() *OutboundRule` +- New function `NewRegistriesClient(string, azcore.TokenCredential, *arm.ClientOptions) (*RegistriesClient, error)` +- New function `*RegistriesClient.BeginCreateOrUpdate(context.Context, string, string, Registry, *RegistriesClientBeginCreateOrUpdateOptions) (*runtime.Poller[RegistriesClientCreateOrUpdateResponse], error)` +- New function `*RegistriesClient.BeginDelete(context.Context, string, string, *RegistriesClientBeginDeleteOptions) (*runtime.Poller[RegistriesClientDeleteResponse], error)` +- New function `*RegistriesClient.Get(context.Context, string, string, *RegistriesClientGetOptions) (RegistriesClientGetResponse, error)` +- New function `*RegistriesClient.NewListBySubscriptionPager(*RegistriesClientListBySubscriptionOptions) *runtime.Pager[RegistriesClientListBySubscriptionResponse]` +- New function `*RegistriesClient.NewListPager(string, *RegistriesClientListOptions) *runtime.Pager[RegistriesClientListResponse]` +- New function `*RegistriesClient.BeginRemoveRegions(context.Context, string, string, Registry, *RegistriesClientBeginRemoveRegionsOptions) (*runtime.Poller[RegistriesClientRemoveRegionsResponse], error)` +- New function `*RegistriesClient.Update(context.Context, string, string, PartialRegistryPartialTrackedResource, *RegistriesClientUpdateOptions) (RegistriesClientUpdateResponse, error)` +- New function `NewRegistryCodeContainersClient(string, azcore.TokenCredential, *arm.ClientOptions) (*RegistryCodeContainersClient, error)` +- New function `*RegistryCodeContainersClient.BeginCreateOrUpdate(context.Context, string, string, string, CodeContainer, *RegistryCodeContainersClientBeginCreateOrUpdateOptions) (*runtime.Poller[RegistryCodeContainersClientCreateOrUpdateResponse], error)` +- New function `*RegistryCodeContainersClient.BeginDelete(context.Context, string, string, string, *RegistryCodeContainersClientBeginDeleteOptions) (*runtime.Poller[RegistryCodeContainersClientDeleteResponse], error)` +- New function `*RegistryCodeContainersClient.Get(context.Context, string, string, string, *RegistryCodeContainersClientGetOptions) (RegistryCodeContainersClientGetResponse, error)` +- New function `*RegistryCodeContainersClient.NewListPager(string, string, *RegistryCodeContainersClientListOptions) *runtime.Pager[RegistryCodeContainersClientListResponse]` +- New function `NewRegistryCodeVersionsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*RegistryCodeVersionsClient, error)` +- New function `*RegistryCodeVersionsClient.CreateOrGetStartPendingUpload(context.Context, string, string, string, string, PendingUploadRequestDto, *RegistryCodeVersionsClientCreateOrGetStartPendingUploadOptions) (RegistryCodeVersionsClientCreateOrGetStartPendingUploadResponse, error)` +- New function `*RegistryCodeVersionsClient.BeginCreateOrUpdate(context.Context, string, string, string, string, CodeVersion, *RegistryCodeVersionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[RegistryCodeVersionsClientCreateOrUpdateResponse], error)` +- New function `*RegistryCodeVersionsClient.BeginDelete(context.Context, string, string, string, string, *RegistryCodeVersionsClientBeginDeleteOptions) (*runtime.Poller[RegistryCodeVersionsClientDeleteResponse], error)` +- New function `*RegistryCodeVersionsClient.Get(context.Context, string, string, string, string, *RegistryCodeVersionsClientGetOptions) (RegistryCodeVersionsClientGetResponse, error)` +- New function `*RegistryCodeVersionsClient.NewListPager(string, string, string, *RegistryCodeVersionsClientListOptions) *runtime.Pager[RegistryCodeVersionsClientListResponse]` +- New function `NewRegistryComponentContainersClient(string, azcore.TokenCredential, *arm.ClientOptions) (*RegistryComponentContainersClient, error)` +- New function `*RegistryComponentContainersClient.BeginCreateOrUpdate(context.Context, string, string, string, ComponentContainer, *RegistryComponentContainersClientBeginCreateOrUpdateOptions) (*runtime.Poller[RegistryComponentContainersClientCreateOrUpdateResponse], error)` +- New function `*RegistryComponentContainersClient.BeginDelete(context.Context, string, string, string, *RegistryComponentContainersClientBeginDeleteOptions) (*runtime.Poller[RegistryComponentContainersClientDeleteResponse], error)` +- New function `*RegistryComponentContainersClient.Get(context.Context, string, string, string, *RegistryComponentContainersClientGetOptions) (RegistryComponentContainersClientGetResponse, error)` +- New function `*RegistryComponentContainersClient.NewListPager(string, string, *RegistryComponentContainersClientListOptions) *runtime.Pager[RegistryComponentContainersClientListResponse]` +- New function `NewRegistryComponentVersionsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*RegistryComponentVersionsClient, error)` +- New function `*RegistryComponentVersionsClient.BeginCreateOrUpdate(context.Context, string, string, string, string, ComponentVersion, *RegistryComponentVersionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[RegistryComponentVersionsClientCreateOrUpdateResponse], error)` +- New function `*RegistryComponentVersionsClient.BeginDelete(context.Context, string, string, string, string, *RegistryComponentVersionsClientBeginDeleteOptions) (*runtime.Poller[RegistryComponentVersionsClientDeleteResponse], error)` +- New function `*RegistryComponentVersionsClient.Get(context.Context, string, string, string, string, *RegistryComponentVersionsClientGetOptions) (RegistryComponentVersionsClientGetResponse, error)` +- New function `*RegistryComponentVersionsClient.NewListPager(string, string, string, *RegistryComponentVersionsClientListOptions) *runtime.Pager[RegistryComponentVersionsClientListResponse]` +- New function `NewRegistryDataContainersClient(string, azcore.TokenCredential, *arm.ClientOptions) (*RegistryDataContainersClient, error)` +- New function `*RegistryDataContainersClient.BeginCreateOrUpdate(context.Context, string, string, string, DataContainer, *RegistryDataContainersClientBeginCreateOrUpdateOptions) (*runtime.Poller[RegistryDataContainersClientCreateOrUpdateResponse], error)` +- New function `*RegistryDataContainersClient.BeginDelete(context.Context, string, string, string, *RegistryDataContainersClientBeginDeleteOptions) (*runtime.Poller[RegistryDataContainersClientDeleteResponse], error)` +- New function `*RegistryDataContainersClient.Get(context.Context, string, string, string, *RegistryDataContainersClientGetOptions) (RegistryDataContainersClientGetResponse, error)` +- New function `*RegistryDataContainersClient.NewListPager(string, string, *RegistryDataContainersClientListOptions) *runtime.Pager[RegistryDataContainersClientListResponse]` +- New function `NewRegistryDataReferencesClient(string, azcore.TokenCredential, *arm.ClientOptions) (*RegistryDataReferencesClient, error)` +- New function `*RegistryDataReferencesClient.GetBlobReferenceSAS(context.Context, string, string, string, string, GetBlobReferenceSASRequestDto, *RegistryDataReferencesClientGetBlobReferenceSASOptions) (RegistryDataReferencesClientGetBlobReferenceSASResponse, error)` +- New function `NewRegistryDataVersionsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*RegistryDataVersionsClient, error)` +- New function `*RegistryDataVersionsClient.CreateOrGetStartPendingUpload(context.Context, string, string, string, string, PendingUploadRequestDto, *RegistryDataVersionsClientCreateOrGetStartPendingUploadOptions) (RegistryDataVersionsClientCreateOrGetStartPendingUploadResponse, error)` +- New function `*RegistryDataVersionsClient.BeginCreateOrUpdate(context.Context, string, string, string, string, DataVersionBase, *RegistryDataVersionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[RegistryDataVersionsClientCreateOrUpdateResponse], error)` +- New function `*RegistryDataVersionsClient.BeginDelete(context.Context, string, string, string, string, *RegistryDataVersionsClientBeginDeleteOptions) (*runtime.Poller[RegistryDataVersionsClientDeleteResponse], error)` +- New function `*RegistryDataVersionsClient.Get(context.Context, string, string, string, string, *RegistryDataVersionsClientGetOptions) (RegistryDataVersionsClientGetResponse, error)` +- New function `*RegistryDataVersionsClient.NewListPager(string, string, string, *RegistryDataVersionsClientListOptions) *runtime.Pager[RegistryDataVersionsClientListResponse]` +- New function `NewRegistryEnvironmentContainersClient(string, azcore.TokenCredential, *arm.ClientOptions) (*RegistryEnvironmentContainersClient, error)` +- New function `*RegistryEnvironmentContainersClient.BeginCreateOrUpdate(context.Context, string, string, string, EnvironmentContainer, *RegistryEnvironmentContainersClientBeginCreateOrUpdateOptions) (*runtime.Poller[RegistryEnvironmentContainersClientCreateOrUpdateResponse], error)` +- New function `*RegistryEnvironmentContainersClient.BeginDelete(context.Context, string, string, string, *RegistryEnvironmentContainersClientBeginDeleteOptions) (*runtime.Poller[RegistryEnvironmentContainersClientDeleteResponse], error)` +- New function `*RegistryEnvironmentContainersClient.Get(context.Context, string, string, string, *RegistryEnvironmentContainersClientGetOptions) (RegistryEnvironmentContainersClientGetResponse, error)` +- New function `*RegistryEnvironmentContainersClient.NewListPager(string, string, *RegistryEnvironmentContainersClientListOptions) *runtime.Pager[RegistryEnvironmentContainersClientListResponse]` +- New function `NewRegistryEnvironmentVersionsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*RegistryEnvironmentVersionsClient, error)` +- New function `*RegistryEnvironmentVersionsClient.BeginCreateOrUpdate(context.Context, string, string, string, string, EnvironmentVersion, *RegistryEnvironmentVersionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[RegistryEnvironmentVersionsClientCreateOrUpdateResponse], error)` +- New function `*RegistryEnvironmentVersionsClient.BeginDelete(context.Context, string, string, string, string, *RegistryEnvironmentVersionsClientBeginDeleteOptions) (*runtime.Poller[RegistryEnvironmentVersionsClientDeleteResponse], error)` +- New function `*RegistryEnvironmentVersionsClient.Get(context.Context, string, string, string, string, *RegistryEnvironmentVersionsClientGetOptions) (RegistryEnvironmentVersionsClientGetResponse, error)` +- New function `*RegistryEnvironmentVersionsClient.NewListPager(string, string, string, *RegistryEnvironmentVersionsClientListOptions) *runtime.Pager[RegistryEnvironmentVersionsClientListResponse]` +- New function `NewRegistryModelContainersClient(string, azcore.TokenCredential, *arm.ClientOptions) (*RegistryModelContainersClient, error)` +- New function `*RegistryModelContainersClient.BeginCreateOrUpdate(context.Context, string, string, string, ModelContainer, *RegistryModelContainersClientBeginCreateOrUpdateOptions) (*runtime.Poller[RegistryModelContainersClientCreateOrUpdateResponse], error)` +- New function `*RegistryModelContainersClient.BeginDelete(context.Context, string, string, string, *RegistryModelContainersClientBeginDeleteOptions) (*runtime.Poller[RegistryModelContainersClientDeleteResponse], error)` +- New function `*RegistryModelContainersClient.Get(context.Context, string, string, string, *RegistryModelContainersClientGetOptions) (RegistryModelContainersClientGetResponse, error)` +- New function `*RegistryModelContainersClient.NewListPager(string, string, *RegistryModelContainersClientListOptions) *runtime.Pager[RegistryModelContainersClientListResponse]` +- New function `NewRegistryModelVersionsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*RegistryModelVersionsClient, error)` +- New function `*RegistryModelVersionsClient.CreateOrGetStartPendingUpload(context.Context, string, string, string, string, PendingUploadRequestDto, *RegistryModelVersionsClientCreateOrGetStartPendingUploadOptions) (RegistryModelVersionsClientCreateOrGetStartPendingUploadResponse, error)` +- New function `*RegistryModelVersionsClient.BeginCreateOrUpdate(context.Context, string, string, string, string, ModelVersion, *RegistryModelVersionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[RegistryModelVersionsClientCreateOrUpdateResponse], error)` +- New function `*RegistryModelVersionsClient.BeginDelete(context.Context, string, string, string, string, *RegistryModelVersionsClientBeginDeleteOptions) (*runtime.Poller[RegistryModelVersionsClientDeleteResponse], error)` +- New function `*RegistryModelVersionsClient.Get(context.Context, string, string, string, string, *RegistryModelVersionsClientGetOptions) (RegistryModelVersionsClientGetResponse, error)` +- New function `*RegistryModelVersionsClient.NewListPager(string, string, string, *RegistryModelVersionsClientListOptions) *runtime.Pager[RegistryModelVersionsClientListResponse]` +- New function `*RollingInputData.GetMonitoringInputDataBase() *MonitoringInputDataBase` +- New function `*SASCredential.GetDataReferenceCredential() *DataReferenceCredential` +- New function `*SASCredentialDto.GetPendingUploadCredentialDto() *PendingUploadCredentialDto` +- New function `NewServerlessEndpointsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*ServerlessEndpointsClient, error)` +- New function `*ServerlessEndpointsClient.BeginCreateOrUpdate(context.Context, string, string, string, ServerlessEndpoint, *ServerlessEndpointsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ServerlessEndpointsClientCreateOrUpdateResponse], error)` +- New function `*ServerlessEndpointsClient.BeginDelete(context.Context, string, string, string, *ServerlessEndpointsClientBeginDeleteOptions) (*runtime.Poller[ServerlessEndpointsClientDeleteResponse], error)` +- New function `*ServerlessEndpointsClient.Get(context.Context, string, string, string, *ServerlessEndpointsClientGetOptions) (ServerlessEndpointsClientGetResponse, error)` +- New function `*ServerlessEndpointsClient.ListKeys(context.Context, string, string, string, *ServerlessEndpointsClientListKeysOptions) (ServerlessEndpointsClientListKeysResponse, error)` +- New function `*ServerlessEndpointsClient.NewListPager(string, string, *ServerlessEndpointsClientListOptions) *runtime.Pager[ServerlessEndpointsClientListResponse]` +- New function `*ServerlessEndpointsClient.BeginRegenerateKeys(context.Context, string, string, string, RegenerateEndpointKeysRequest, *ServerlessEndpointsClientBeginRegenerateKeysOptions) (*runtime.Poller[ServerlessEndpointsClientRegenerateKeysResponse], error)` +- New function `*ServerlessEndpointsClient.BeginUpdate(context.Context, string, string, string, PartialMinimalTrackedResourceWithSKUAndIdentity, *ServerlessEndpointsClientBeginUpdateOptions) (*runtime.Poller[ServerlessEndpointsClientUpdateResponse], error)` +- New function `*ServicePrincipalAuthTypeWorkspaceConnectionProperties.GetWorkspaceConnectionPropertiesV2() *WorkspaceConnectionPropertiesV2` +- New function `*ServiceTagOutboundRule.GetOutboundRule() *OutboundRule` +- New function `*SparkJob.GetJobBaseProperties() *JobBaseProperties` +- New function `*SparkJobEntry.GetSparkJobEntry() *SparkJobEntry` +- New function `*SparkJobPythonEntry.GetSparkJobEntry() *SparkJobEntry` +- New function `*SparkJobScalaEntry.GetSparkJobEntry() *SparkJobEntry` +- New function `*StaticInputData.GetMonitoringInputDataBase() *MonitoringInputDataBase` +- New function `*TopNFeaturesByAttribution.GetMonitoringFeatureFilterBase() *MonitoringFeatureFilterBase` +- New function `*Webhook.GetWebhook() *Webhook` +- New function `*WorkspaceConnectionsClient.ListSecrets(context.Context, string, string, string, *WorkspaceConnectionsClientListSecretsOptions) (WorkspaceConnectionsClientListSecretsResponse, error)` +- New function `*Nodes.GetNodes() *Nodes` +- New function `*NumericalDataDriftMetricThreshold.GetDataDriftMetricThresholdBase() *DataDriftMetricThresholdBase` +- New function `*NumericalDataQualityMetricThreshold.GetDataQualityMetricThresholdBase() *DataQualityMetricThresholdBase` +- New function `*NumericalPredictionDriftMetricThreshold.GetPredictionDriftMetricThresholdBase() *PredictionDriftMetricThresholdBase` +- New struct `AADAuthTypeWorkspaceConnectionProperties` +- New struct `APIKeyAuthWorkspaceConnectionProperties` +- New struct `AccessKeyAuthTypeWorkspaceConnectionProperties` +- New struct `AccountKeyAuthTypeWorkspaceConnectionProperties` +- New struct `AcrDetails` +- New struct `AllFeatures` +- New struct `AllNodes` +- New struct `AmlTokenComputeIdentity` +- New struct `AnonymousAccessCredential` +- New struct `ArmResourceID` +- New struct `AzureDatastore` +- New struct `AzureDevOpsWebhook` +- New struct `BatchPipelineComponentDeploymentConfiguration` +- New struct `BindOptions` +- New struct `BlobReferenceForConsumptionDto` +- New struct `CategoricalDataDriftMetricThreshold` +- New struct `CategoricalDataQualityMetricThreshold` +- New struct `CategoricalPredictionDriftMetricThreshold` +- New struct `Collection` +- New struct `ComputeRecurrenceSchedule` +- New struct `ComputeRuntimeDto` +- New struct `ContentSafety` +- New struct `CreateMonitorAction` +- New struct `Cron` +- New struct `CustomKeys` +- New struct `CustomKeysWorkspaceConnectionProperties` +- New struct `CustomMetricThreshold` +- New struct `CustomMonitoringSignal` +- New struct `CustomService` +- New struct `DataCollector` +- New struct `DataDriftMonitoringSignal` +- New struct `DataQualityMonitoringSignal` +- New struct `DestinationAsset` +- New struct `Docker` +- New struct `DockerCredential` +- New struct `EncryptionKeyVaultUpdateProperties` +- New struct `EncryptionUpdateProperties` +- New struct `Endpoint` +- New struct `EnvironmentVariable` +- New struct `Feature` +- New struct `FeatureAttributionDriftMonitoringSignal` +- New struct `FeatureAttributionMetricThreshold` +- New struct `FeatureImportanceSettings` +- New struct `FeatureProperties` +- New struct `FeatureResourceArmPaginatedResult` +- New struct `FeatureStoreSettings` +- New struct `FeatureSubset` +- New struct `FeatureWindow` +- New struct `FeaturesetContainer` +- New struct `FeaturesetContainerProperties` +- New struct `FeaturesetContainerResourceArmPaginatedResult` +- New struct `FeaturesetSpecification` +- New struct `FeaturesetVersion` +- New struct `FeaturesetVersionBackfillRequest` +- New struct `FeaturesetVersionBackfillResponse` +- New struct `FeaturesetVersionProperties` +- New struct `FeaturesetVersionResourceArmPaginatedResult` +- New struct `FeaturestoreEntityContainer` +- New struct `FeaturestoreEntityContainerProperties` +- New struct `FeaturestoreEntityContainerResourceArmPaginatedResult` +- New struct `FeaturestoreEntityVersion` +- New struct `FeaturestoreEntityVersionProperties` +- New struct `FeaturestoreEntityVersionResourceArmPaginatedResult` +- New struct `FixedInputData` +- New struct `FqdnOutboundRule` +- New struct `GetBlobReferenceForConsumptionDto` +- New struct `GetBlobReferenceSASRequestDto` +- New struct `GetBlobReferenceSASResponseDto` +- New struct `IdleShutdownSetting` +- New struct `Image` +- New struct `ImageMetadata` +- New struct `IndexColumn` +- New struct `LakeHouseArtifact` +- New struct `ManagedComputeIdentity` +- New struct `ManagedIdentityCredential` +- New struct `ManagedNetworkProvisionOptions` +- New struct `ManagedNetworkProvisionStatus` +- New struct `ManagedNetworkSettings` +- New struct `MarketplacePlan` +- New struct `MarketplaceSubscription` +- New struct `MarketplaceSubscriptionProperties` +- New struct `MarketplaceSubscriptionResourceArmPaginatedResult` +- New struct `MaterializationComputeResource` +- New struct `MaterializationSettings` +- New struct `ModelSettings` +- New struct `MonitorDefinition` +- New struct `MonitorEmailNotificationSettings` +- New struct `MonitorNotificationSettings` +- New struct `MonitorServerlessSparkCompute` +- New struct `MonitoringTarget` +- New struct `MonitoringThreshold` +- New struct `NotificationSetting` +- New struct `NumericalDataDriftMetricThreshold` +- New struct `NumericalDataQualityMetricThreshold` +- New struct `NumericalPredictionDriftMetricThreshold` +- New struct `OAuth2AuthTypeWorkspaceConnectionProperties` +- New struct `OneLakeDatastore` +- New struct `Operation` +- New struct `OperationDisplay` +- New struct `OperationListResult` +- New struct `OutboundRuleBasicResource` +- New struct `OutboundRuleListResult` +- New struct `PartialMinimalTrackedResourceWithSKUAndIdentity` +- New struct `PartialRegistryPartialTrackedResource` +- New struct `PendingUploadRequestDto` +- New struct `PendingUploadResponseDto` +- New struct `PredictionDriftMonitoringSignal` +- New struct `PrivateEndpointDestination` +- New struct `PrivateEndpointOutboundRule` +- New struct `PrivateEndpointResource` +- New struct `ProxyResource` +- New struct `QueueSettings` +- New struct `Recurrence` +- New struct `Registry` +- New struct `RegistryPartialManagedServiceIdentity` +- New struct `RegistryPrivateEndpointConnection` +- New struct `RegistryPrivateEndpointConnectionProperties` +- New struct `RegistryPrivateLinkServiceConnectionState` +- New struct `RegistryProperties` +- New struct `RegistryRegionArmDetails` +- New struct `RegistryTrackedResourceArmPaginatedResult` +- New struct `RequestLogging` +- New struct `RollingInputData` +- New struct `SASCredential` +- New struct `SASCredentialDto` +- New struct `ServerlessComputeSettings` +- New struct `ServerlessEndpoint` +- New struct `ServerlessEndpointProperties` +- New struct `ServerlessEndpointTrackedResourceArmPaginatedResult` +- New struct `ServerlessInferenceEndpoint` +- New struct `ServicePrincipalAuthTypeWorkspaceConnectionProperties` +- New struct `ServiceTagDestination` +- New struct `ServiceTagOutboundRule` +- New struct `SparkJob` +- New struct `SparkJobPythonEntry` +- New struct `SparkJobScalaEntry` +- New struct `SparkResourceConfiguration` +- New struct `StaticInputData` +- New struct `StorageAccountDetails` +- New struct `SystemCreatedAcrAccount` +- New struct `SystemCreatedStorageAccount` +- New struct `TmpfsOptions` +- New struct `TopNFeaturesByAttribution` +- New struct `UserCreatedAcrAccount` +- New struct `UserCreatedStorageAccount` +- New struct `VolumeDefinition` +- New struct `VolumeOptions` +- New struct `WorkspaceConnectionAPIKey` +- New struct `WorkspaceConnectionAccessKey` +- New struct `WorkspaceConnectionAccountKey` +- New struct `WorkspaceConnectionOAuth2` +- New struct `WorkspaceConnectionServicePrincipal` +- New struct `WorkspaceHubConfig` +- New field `NotificationSetting`, `QueueSettings` in struct `AutoMLJob` +- New field `ResourceGroup`, `SubscriptionID` in struct `AzureBlobDatastore` +- New field `ResourceGroup`, `SubscriptionID` in struct `AzureDataLakeGen1Datastore` +- New field `ResourceGroup`, `SubscriptionID` in struct `AzureDataLakeGen2Datastore` +- New field `ResourceGroup`, `SubscriptionID` in struct `AzureFileDatastore` +- New field `DeploymentConfiguration` in struct `BatchDeploymentProperties` +- New field `ProvisioningState` in struct `CodeContainerProperties` +- New field `ProvisioningState` in struct `CodeVersionProperties` +- New field `Hash`, `HashVersion` in struct `CodeVersionsClientListOptions` +- New field `NotificationSetting`, `QueueSettings` in struct `CommandJob` +- New field `ProvisioningState` in struct `ComponentContainerProperties` +- New field `ProvisioningState` in struct `ComponentVersionProperties` +- New field `CustomServices`, `OSImageMetadata` in struct `ComputeInstanceProperties` +- New field `ProvisioningState` in struct `EnvironmentContainerProperties` +- New field `ProvisioningState`, `Stage` in struct `EnvironmentVersionProperties` +- New field `Nodes` in struct `JobService` +- New field `Properties` in struct `JobsClientListOptions` +- New field `DataCollector` in struct `KubernetesOnlineDeployment` +- New field `CreatedByWorkspaceArmID`, `ExpiryTime`, `Group`, `IsSharedToAll`, `Metadata`, `SharedUserList` in struct `ManagedIdentityAuthTypeWorkspaceConnectionProperties` +- New field `DataCollector` in struct `ManagedOnlineDeployment` +- New field `ProvisioningState` in struct `ModelContainerProperties` +- New field `ProvisioningState`, `Stage` in struct `ModelVersionProperties` +- New field `CreatedByWorkspaceArmID`, `ExpiryTime`, `Group`, `IsSharedToAll`, `Metadata`, `SharedUserList` in struct `NoneAuthTypeWorkspaceConnectionProperties` +- New field `DataCollector` in struct `OnlineDeploymentProperties` +- New field `MirrorTraffic` in struct `OnlineEndpointProperties` +- New anonymous field `OperationListResult` in struct `OperationsClientListResponse` +- New field `CreatedByWorkspaceArmID`, `ExpiryTime`, `Group`, `IsSharedToAll`, `Metadata`, `SharedUserList` in struct `PATAuthTypeWorkspaceConnectionProperties` +- New field `NotificationSetting` in struct `PipelineJob` +- New field `CreatedByWorkspaceArmID`, `ExpiryTime`, `Group`, `IsSharedToAll`, `Metadata`, `SharedUserList` in struct `SASAuthTypeWorkspaceConnectionProperties` +- New field `NotificationSetting`, `QueueSettings` in struct `SweepJob` +- New field `CreatedByWorkspaceArmID`, `ExpiryTime`, `Group`, `IsSharedToAll`, `Metadata`, `SharedUserList` in struct `UsernamePasswordAuthTypeWorkspaceConnectionProperties` +- New field `Kind` in struct `Workspace` +- New field `SecurityToken` in struct `WorkspaceConnectionUsernamePassword` +- New field `AssociatedWorkspaces`, `EnableDataIsolation`, `FeatureStoreSettings`, `HubResourceID`, `ManagedNetwork`, `ServerlessComputeSettings`, `WorkspaceHubConfig` in struct `WorkspaceProperties` +- New field `EnableDataIsolation`, `Encryption`, `FeatureStoreSettings`, `ManagedNetwork`, `ServerlessComputeSettings`, `V1LegacyMode` in struct `WorkspacePropertiesUpdateParameters` +- New field `ForceToPurge` in struct `WorkspacesClientBeginDeleteOptions` + + ## 3.2.0 (2023-11-24) ### Features Added diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/LICENSE.txt b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/LICENSE.txt new file mode 100644 index 000000000..dc0c2ffb3 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/LICENSE.txt @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) Microsoft Corporation. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/README.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/README.md similarity index 96% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/README.md rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/README.md index 41d60c42f..06f7915a4 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/README.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/README.md @@ -1,6 +1,6 @@ # Azure Machine Learning Module for Go -[![PkgGoDev](https://pkg.go.dev/badge/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v2)](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v2) +[![PkgGoDev](https://pkg.go.dev/badge/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4)](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4) The `armmachinelearning` module provides operations for working with Azure Machine Learning. @@ -20,7 +20,7 @@ This project uses [Go modules](https://github.com/golang/go/wiki/Modules) for ve Install the Azure Machine Learning module: ```sh -go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v2 +go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4 ``` ## Authorization @@ -57,7 +57,7 @@ clientFactory, err := armmachinelearning.NewClientFactory(, cre A client groups a set of related APIs, providing access to its functionality. Create one or more clients to access the APIs you require using client factory. ```go -client := clientFactory.NewUsagesClient() +client := clientFactory.NewBatchDeploymentsClient() ``` ## Fakes diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/autorest.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/autorest.md new file mode 100644 index 000000000..49cd0e8d2 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/autorest.md @@ -0,0 +1,13 @@ +### AutoRest Configuration + +> see https://aka.ms/autorest + +``` yaml +azure-arm: true +require: +- https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/readme.md +- https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/readme.go.md +license-header: MICROSOFT_MIT_NO_VERSION +module-version: 4.0.0 +tag: package-2024-04 +``` \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/batchdeployments_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/batchdeployments_client.go similarity index 96% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/batchdeployments_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/batchdeployments_client.go index 5ca02dc47..5e4db43f1 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/batchdeployments_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/batchdeployments_client.go @@ -47,7 +47,7 @@ func NewBatchDeploymentsClient(subscriptionID string, credential azcore.TokenCre // BeginCreateOrUpdate - Creates/updates a batch inference deployment (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - endpointName - Inference endpoint name @@ -62,7 +62,8 @@ func (client *BatchDeploymentsClient) BeginCreateOrUpdate(ctx context.Context, r return nil, err } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[BatchDeploymentsClientCreateOrUpdateResponse]{ - Tracer: client.internal.Tracer(), + FinalStateVia: runtime.FinalStateViaOriginalURI, + Tracer: client.internal.Tracer(), }) return poller, err } else { @@ -75,7 +76,7 @@ func (client *BatchDeploymentsClient) BeginCreateOrUpdate(ctx context.Context, r // CreateOrUpdate - Creates/updates a batch inference deployment (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 func (client *BatchDeploymentsClient) createOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, endpointName string, deploymentName string, body BatchDeployment, options *BatchDeploymentsClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "BatchDeploymentsClient.BeginCreateOrUpdate" @@ -125,7 +126,7 @@ func (client *BatchDeploymentsClient) createOrUpdateCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -137,7 +138,7 @@ func (client *BatchDeploymentsClient) createOrUpdateCreateRequest(ctx context.Co // BeginDelete - Delete Batch Inference deployment (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - endpointName - Endpoint name @@ -151,7 +152,8 @@ func (client *BatchDeploymentsClient) BeginDelete(ctx context.Context, resourceG return nil, err } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[BatchDeploymentsClientDeleteResponse]{ - Tracer: client.internal.Tracer(), + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { @@ -164,7 +166,7 @@ func (client *BatchDeploymentsClient) BeginDelete(ctx context.Context, resourceG // Delete - Delete Batch Inference deployment (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 func (client *BatchDeploymentsClient) deleteOperation(ctx context.Context, resourceGroupName string, workspaceName string, endpointName string, deploymentName string, options *BatchDeploymentsClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "BatchDeploymentsClient.BeginDelete" @@ -214,7 +216,7 @@ func (client *BatchDeploymentsClient) deleteCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -223,7 +225,7 @@ func (client *BatchDeploymentsClient) deleteCreateRequest(ctx context.Context, r // Get - Gets a batch inference deployment by id. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - endpointName - Endpoint name @@ -279,7 +281,7 @@ func (client *BatchDeploymentsClient) getCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -296,7 +298,7 @@ func (client *BatchDeploymentsClient) getHandleResponse(resp *http.Response) (Ba // NewListPager - Lists Batch inference deployments in the workspace. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - endpointName - Endpoint name @@ -349,16 +351,16 @@ func (client *BatchDeploymentsClient) listCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") if options != nil && options.OrderBy != nil { reqQP.Set("$orderBy", *options.OrderBy) } - if options != nil && options.Top != nil { - reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) - } if options != nil && options.Skip != nil { reqQP.Set("$skip", *options.Skip) } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -376,7 +378,7 @@ func (client *BatchDeploymentsClient) listHandleResponse(resp *http.Response) (B // BeginUpdate - Update a batch inference deployment (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - endpointName - Inference endpoint name @@ -404,7 +406,7 @@ func (client *BatchDeploymentsClient) BeginUpdate(ctx context.Context, resourceG // Update - Update a batch inference deployment (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 func (client *BatchDeploymentsClient) update(ctx context.Context, resourceGroupName string, workspaceName string, endpointName string, deploymentName string, body PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties, options *BatchDeploymentsClientBeginUpdateOptions) (*http.Response, error) { var err error const operationName = "BatchDeploymentsClient.BeginUpdate" @@ -454,7 +456,7 @@ func (client *BatchDeploymentsClient) updateCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/batchendpoints_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/batchendpoints_client.go similarity index 96% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/batchendpoints_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/batchendpoints_client.go index 949d715b7..48005c20d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/batchendpoints_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/batchendpoints_client.go @@ -47,7 +47,7 @@ func NewBatchEndpointsClient(subscriptionID string, credential azcore.TokenCrede // BeginCreateOrUpdate - Creates a batch inference endpoint (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - endpointName - Name for the Batch inference endpoint. @@ -61,7 +61,8 @@ func (client *BatchEndpointsClient) BeginCreateOrUpdate(ctx context.Context, res return nil, err } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[BatchEndpointsClientCreateOrUpdateResponse]{ - Tracer: client.internal.Tracer(), + FinalStateVia: runtime.FinalStateViaOriginalURI, + Tracer: client.internal.Tracer(), }) return poller, err } else { @@ -74,7 +75,7 @@ func (client *BatchEndpointsClient) BeginCreateOrUpdate(ctx context.Context, res // CreateOrUpdate - Creates a batch inference endpoint (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 func (client *BatchEndpointsClient) createOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, endpointName string, body BatchEndpoint, options *BatchEndpointsClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "BatchEndpointsClient.BeginCreateOrUpdate" @@ -120,7 +121,7 @@ func (client *BatchEndpointsClient) createOrUpdateCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -132,7 +133,7 @@ func (client *BatchEndpointsClient) createOrUpdateCreateRequest(ctx context.Cont // BeginDelete - Delete Batch Inference Endpoint (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - endpointName - Inference Endpoint name. @@ -145,7 +146,8 @@ func (client *BatchEndpointsClient) BeginDelete(ctx context.Context, resourceGro return nil, err } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[BatchEndpointsClientDeleteResponse]{ - Tracer: client.internal.Tracer(), + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { @@ -158,7 +160,7 @@ func (client *BatchEndpointsClient) BeginDelete(ctx context.Context, resourceGro // Delete - Delete Batch Inference Endpoint (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 func (client *BatchEndpointsClient) deleteOperation(ctx context.Context, resourceGroupName string, workspaceName string, endpointName string, options *BatchEndpointsClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "BatchEndpointsClient.BeginDelete" @@ -204,7 +206,7 @@ func (client *BatchEndpointsClient) deleteCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -213,7 +215,7 @@ func (client *BatchEndpointsClient) deleteCreateRequest(ctx context.Context, res // Get - Gets a batch inference endpoint by name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - endpointName - Name for the Batch Endpoint. @@ -264,7 +266,7 @@ func (client *BatchEndpointsClient) getCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -281,7 +283,7 @@ func (client *BatchEndpointsClient) getHandleResponse(resp *http.Response) (Batc // NewListPager - Lists Batch inference endpoint in the workspace. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - options - BatchEndpointsClientListOptions contains the optional parameters for the BatchEndpointsClient.NewListPager method. @@ -328,13 +330,13 @@ func (client *BatchEndpointsClient) listCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - if options != nil && options.Count != nil { - reqQP.Set("count", strconv.FormatInt(int64(*options.Count), 10)) - } if options != nil && options.Skip != nil { reqQP.Set("$skip", *options.Skip) } + reqQP.Set("api-version", "2024-04-01") + if options != nil && options.Count != nil { + reqQP.Set("count", strconv.FormatInt(int64(*options.Count), 10)) + } req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -352,7 +354,7 @@ func (client *BatchEndpointsClient) listHandleResponse(resp *http.Response) (Bat // ListKeys - Lists batch Inference Endpoint keys. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - endpointName - Inference Endpoint name. @@ -403,7 +405,7 @@ func (client *BatchEndpointsClient) listKeysCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -421,7 +423,7 @@ func (client *BatchEndpointsClient) listKeysHandleResponse(resp *http.Response) // BeginUpdate - Update a batch inference endpoint (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - endpointName - Name for the Batch inference endpoint. @@ -448,7 +450,7 @@ func (client *BatchEndpointsClient) BeginUpdate(ctx context.Context, resourceGro // Update - Update a batch inference endpoint (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 func (client *BatchEndpointsClient) update(ctx context.Context, resourceGroupName string, workspaceName string, endpointName string, body PartialMinimalTrackedResourceWithIdentity, options *BatchEndpointsClientBeginUpdateOptions) (*http.Response, error) { var err error const operationName = "BatchEndpointsClient.BeginUpdate" @@ -494,7 +496,7 @@ func (client *BatchEndpointsClient) updateCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/build.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/build.go similarity index 100% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/build.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/build.go diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/ci.yml b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/ci.yml similarity index 88% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/ci.yml rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/ci.yml index 4117e0aff..4b7068a0e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/ci.yml +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/ci.yml @@ -21,8 +21,8 @@ pr: include: - sdk/resourcemanager/machinelearning/armmachinelearning/ -stages: -- template: /eng/pipelines/templates/jobs/archetype-sdk-client.yml +extends: + template: /eng/pipelines/templates/jobs/archetype-sdk-client.yml parameters: IncludeRelease: true ServiceDirectory: 'resourcemanager/machinelearning/armmachinelearning' diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/client_factory.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/client_factory.go new file mode 100644 index 000000000..7a105697a --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/client_factory.go @@ -0,0 +1,420 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armmachinelearning + +import ( + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" +) + +// ClientFactory is a client factory used to create any client in this module. +// Don't use this type directly, use NewClientFactory instead. +type ClientFactory struct { + subscriptionID string + internal *arm.Client +} + +// NewClientFactory creates a new instance of ClientFactory with the specified values. +// The parameter values will be propagated to any client created from this factory. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error) { + internal, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + return &ClientFactory{ + subscriptionID: subscriptionID, + internal: internal, + }, nil +} + +// NewBatchDeploymentsClient creates a new instance of BatchDeploymentsClient. +func (c *ClientFactory) NewBatchDeploymentsClient() *BatchDeploymentsClient { + return &BatchDeploymentsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewBatchEndpointsClient creates a new instance of BatchEndpointsClient. +func (c *ClientFactory) NewBatchEndpointsClient() *BatchEndpointsClient { + return &BatchEndpointsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewCodeContainersClient creates a new instance of CodeContainersClient. +func (c *ClientFactory) NewCodeContainersClient() *CodeContainersClient { + return &CodeContainersClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewCodeVersionsClient creates a new instance of CodeVersionsClient. +func (c *ClientFactory) NewCodeVersionsClient() *CodeVersionsClient { + return &CodeVersionsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewComponentContainersClient creates a new instance of ComponentContainersClient. +func (c *ClientFactory) NewComponentContainersClient() *ComponentContainersClient { + return &ComponentContainersClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewComponentVersionsClient creates a new instance of ComponentVersionsClient. +func (c *ClientFactory) NewComponentVersionsClient() *ComponentVersionsClient { + return &ComponentVersionsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewComputeClient creates a new instance of ComputeClient. +func (c *ClientFactory) NewComputeClient() *ComputeClient { + return &ComputeClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewDataContainersClient creates a new instance of DataContainersClient. +func (c *ClientFactory) NewDataContainersClient() *DataContainersClient { + return &DataContainersClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewDataVersionsClient creates a new instance of DataVersionsClient. +func (c *ClientFactory) NewDataVersionsClient() *DataVersionsClient { + return &DataVersionsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewDatastoresClient creates a new instance of DatastoresClient. +func (c *ClientFactory) NewDatastoresClient() *DatastoresClient { + return &DatastoresClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewEnvironmentContainersClient creates a new instance of EnvironmentContainersClient. +func (c *ClientFactory) NewEnvironmentContainersClient() *EnvironmentContainersClient { + return &EnvironmentContainersClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewEnvironmentVersionsClient creates a new instance of EnvironmentVersionsClient. +func (c *ClientFactory) NewEnvironmentVersionsClient() *EnvironmentVersionsClient { + return &EnvironmentVersionsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewFeaturesClient creates a new instance of FeaturesClient. +func (c *ClientFactory) NewFeaturesClient() *FeaturesClient { + return &FeaturesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewFeaturesetContainersClient creates a new instance of FeaturesetContainersClient. +func (c *ClientFactory) NewFeaturesetContainersClient() *FeaturesetContainersClient { + return &FeaturesetContainersClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewFeaturesetVersionsClient creates a new instance of FeaturesetVersionsClient. +func (c *ClientFactory) NewFeaturesetVersionsClient() *FeaturesetVersionsClient { + return &FeaturesetVersionsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewFeaturestoreEntityContainersClient creates a new instance of FeaturestoreEntityContainersClient. +func (c *ClientFactory) NewFeaturestoreEntityContainersClient() *FeaturestoreEntityContainersClient { + return &FeaturestoreEntityContainersClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewFeaturestoreEntityVersionsClient creates a new instance of FeaturestoreEntityVersionsClient. +func (c *ClientFactory) NewFeaturestoreEntityVersionsClient() *FeaturestoreEntityVersionsClient { + return &FeaturestoreEntityVersionsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewJobsClient creates a new instance of JobsClient. +func (c *ClientFactory) NewJobsClient() *JobsClient { + return &JobsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewManagedNetworkProvisionsClient creates a new instance of ManagedNetworkProvisionsClient. +func (c *ClientFactory) NewManagedNetworkProvisionsClient() *ManagedNetworkProvisionsClient { + return &ManagedNetworkProvisionsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewManagedNetworkSettingsRuleClient creates a new instance of ManagedNetworkSettingsRuleClient. +func (c *ClientFactory) NewManagedNetworkSettingsRuleClient() *ManagedNetworkSettingsRuleClient { + return &ManagedNetworkSettingsRuleClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewMarketplaceSubscriptionsClient creates a new instance of MarketplaceSubscriptionsClient. +func (c *ClientFactory) NewMarketplaceSubscriptionsClient() *MarketplaceSubscriptionsClient { + return &MarketplaceSubscriptionsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewModelContainersClient creates a new instance of ModelContainersClient. +func (c *ClientFactory) NewModelContainersClient() *ModelContainersClient { + return &ModelContainersClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewModelVersionsClient creates a new instance of ModelVersionsClient. +func (c *ClientFactory) NewModelVersionsClient() *ModelVersionsClient { + return &ModelVersionsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewOnlineDeploymentsClient creates a new instance of OnlineDeploymentsClient. +func (c *ClientFactory) NewOnlineDeploymentsClient() *OnlineDeploymentsClient { + return &OnlineDeploymentsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewOnlineEndpointsClient creates a new instance of OnlineEndpointsClient. +func (c *ClientFactory) NewOnlineEndpointsClient() *OnlineEndpointsClient { + return &OnlineEndpointsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewOperationsClient creates a new instance of OperationsClient. +func (c *ClientFactory) NewOperationsClient() *OperationsClient { + return &OperationsClient{ + internal: c.internal, + } +} + +// NewPrivateEndpointConnectionsClient creates a new instance of PrivateEndpointConnectionsClient. +func (c *ClientFactory) NewPrivateEndpointConnectionsClient() *PrivateEndpointConnectionsClient { + return &PrivateEndpointConnectionsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewPrivateLinkResourcesClient creates a new instance of PrivateLinkResourcesClient. +func (c *ClientFactory) NewPrivateLinkResourcesClient() *PrivateLinkResourcesClient { + return &PrivateLinkResourcesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewQuotasClient creates a new instance of QuotasClient. +func (c *ClientFactory) NewQuotasClient() *QuotasClient { + return &QuotasClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewRegistriesClient creates a new instance of RegistriesClient. +func (c *ClientFactory) NewRegistriesClient() *RegistriesClient { + return &RegistriesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewRegistryCodeContainersClient creates a new instance of RegistryCodeContainersClient. +func (c *ClientFactory) NewRegistryCodeContainersClient() *RegistryCodeContainersClient { + return &RegistryCodeContainersClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewRegistryCodeVersionsClient creates a new instance of RegistryCodeVersionsClient. +func (c *ClientFactory) NewRegistryCodeVersionsClient() *RegistryCodeVersionsClient { + return &RegistryCodeVersionsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewRegistryComponentContainersClient creates a new instance of RegistryComponentContainersClient. +func (c *ClientFactory) NewRegistryComponentContainersClient() *RegistryComponentContainersClient { + return &RegistryComponentContainersClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewRegistryComponentVersionsClient creates a new instance of RegistryComponentVersionsClient. +func (c *ClientFactory) NewRegistryComponentVersionsClient() *RegistryComponentVersionsClient { + return &RegistryComponentVersionsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewRegistryDataContainersClient creates a new instance of RegistryDataContainersClient. +func (c *ClientFactory) NewRegistryDataContainersClient() *RegistryDataContainersClient { + return &RegistryDataContainersClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewRegistryDataReferencesClient creates a new instance of RegistryDataReferencesClient. +func (c *ClientFactory) NewRegistryDataReferencesClient() *RegistryDataReferencesClient { + return &RegistryDataReferencesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewRegistryDataVersionsClient creates a new instance of RegistryDataVersionsClient. +func (c *ClientFactory) NewRegistryDataVersionsClient() *RegistryDataVersionsClient { + return &RegistryDataVersionsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewRegistryEnvironmentContainersClient creates a new instance of RegistryEnvironmentContainersClient. +func (c *ClientFactory) NewRegistryEnvironmentContainersClient() *RegistryEnvironmentContainersClient { + return &RegistryEnvironmentContainersClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewRegistryEnvironmentVersionsClient creates a new instance of RegistryEnvironmentVersionsClient. +func (c *ClientFactory) NewRegistryEnvironmentVersionsClient() *RegistryEnvironmentVersionsClient { + return &RegistryEnvironmentVersionsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewRegistryModelContainersClient creates a new instance of RegistryModelContainersClient. +func (c *ClientFactory) NewRegistryModelContainersClient() *RegistryModelContainersClient { + return &RegistryModelContainersClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewRegistryModelVersionsClient creates a new instance of RegistryModelVersionsClient. +func (c *ClientFactory) NewRegistryModelVersionsClient() *RegistryModelVersionsClient { + return &RegistryModelVersionsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewSchedulesClient creates a new instance of SchedulesClient. +func (c *ClientFactory) NewSchedulesClient() *SchedulesClient { + return &SchedulesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewServerlessEndpointsClient creates a new instance of ServerlessEndpointsClient. +func (c *ClientFactory) NewServerlessEndpointsClient() *ServerlessEndpointsClient { + return &ServerlessEndpointsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewUsagesClient creates a new instance of UsagesClient. +func (c *ClientFactory) NewUsagesClient() *UsagesClient { + return &UsagesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewVirtualMachineSizesClient creates a new instance of VirtualMachineSizesClient. +func (c *ClientFactory) NewVirtualMachineSizesClient() *VirtualMachineSizesClient { + return &VirtualMachineSizesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewWorkspaceConnectionsClient creates a new instance of WorkspaceConnectionsClient. +func (c *ClientFactory) NewWorkspaceConnectionsClient() *WorkspaceConnectionsClient { + return &WorkspaceConnectionsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewWorkspaceFeaturesClient creates a new instance of WorkspaceFeaturesClient. +func (c *ClientFactory) NewWorkspaceFeaturesClient() *WorkspaceFeaturesClient { + return &WorkspaceFeaturesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewWorkspacesClient creates a new instance of WorkspacesClient. +func (c *ClientFactory) NewWorkspacesClient() *WorkspacesClient { + return &WorkspacesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/codecontainers_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/codecontainers_client.go similarity index 97% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/codecontainers_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/codecontainers_client.go index 6dfb43e6a..fdbb66fe8 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/codecontainers_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/codecontainers_client.go @@ -46,7 +46,7 @@ func NewCodeContainersClient(subscriptionID string, credential azcore.TokenCrede // CreateOrUpdate - Create or update container. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Container name. This is case-sensitive. @@ -99,7 +99,7 @@ func (client *CodeContainersClient) createOrUpdateCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -120,7 +120,7 @@ func (client *CodeContainersClient) createOrUpdateHandleResponse(resp *http.Resp // Delete - Delete container. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Container name. This is case-sensitive. @@ -170,7 +170,7 @@ func (client *CodeContainersClient) deleteCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -179,7 +179,7 @@ func (client *CodeContainersClient) deleteCreateRequest(ctx context.Context, res // Get - Get container. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Container name. This is case-sensitive. @@ -230,7 +230,7 @@ func (client *CodeContainersClient) getCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -247,7 +247,7 @@ func (client *CodeContainersClient) getHandleResponse(resp *http.Response) (Code // NewListPager - List containers. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - options - CodeContainersClientListOptions contains the optional parameters for the CodeContainersClient.NewListPager method. @@ -294,10 +294,10 @@ func (client *CodeContainersClient) listCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") if options != nil && options.Skip != nil { reqQP.Set("$skip", *options.Skip) } + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/codeversions_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/codeversions_client.go similarity index 62% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/codeversions_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/codeversions_client.go index a5c524b03..cfb116d05 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/codeversions_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/codeversions_client.go @@ -44,10 +44,89 @@ func NewCodeVersionsClient(subscriptionID string, credential azcore.TokenCredent return client, nil } +// CreateOrGetStartPendingUpload - Generate a storage location and credential for the client to upload a code asset to. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - Name of Azure Machine Learning workspace. +// - name - Container name. This is case-sensitive. +// - version - Version identifier. This is case-sensitive. +// - body - Pending upload request object +// - options - CodeVersionsClientCreateOrGetStartPendingUploadOptions contains the optional parameters for the CodeVersionsClient.CreateOrGetStartPendingUpload +// method. +func (client *CodeVersionsClient) CreateOrGetStartPendingUpload(ctx context.Context, resourceGroupName string, workspaceName string, name string, version string, body PendingUploadRequestDto, options *CodeVersionsClientCreateOrGetStartPendingUploadOptions) (CodeVersionsClientCreateOrGetStartPendingUploadResponse, error) { + var err error + const operationName = "CodeVersionsClient.CreateOrGetStartPendingUpload" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrGetStartPendingUploadCreateRequest(ctx, resourceGroupName, workspaceName, name, version, body, options) + if err != nil { + return CodeVersionsClientCreateOrGetStartPendingUploadResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return CodeVersionsClientCreateOrGetStartPendingUploadResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return CodeVersionsClientCreateOrGetStartPendingUploadResponse{}, err + } + resp, err := client.createOrGetStartPendingUploadHandleResponse(httpResp) + return resp, err +} + +// createOrGetStartPendingUploadCreateRequest creates the CreateOrGetStartPendingUpload request. +func (client *CodeVersionsClient) createOrGetStartPendingUploadCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, name string, version string, body PendingUploadRequestDto, options *CodeVersionsClientCreateOrGetStartPendingUploadOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version}/startPendingUpload" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if workspaceName == "" { + return nil, errors.New("parameter workspaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceName}", url.PathEscape(workspaceName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if version == "" { + return nil, errors.New("parameter version cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{version}", url.PathEscape(version)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, body); err != nil { + return nil, err + } + return req, nil +} + +// createOrGetStartPendingUploadHandleResponse handles the CreateOrGetStartPendingUpload response. +func (client *CodeVersionsClient) createOrGetStartPendingUploadHandleResponse(resp *http.Response) (CodeVersionsClientCreateOrGetStartPendingUploadResponse, error) { + result := CodeVersionsClientCreateOrGetStartPendingUploadResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PendingUploadResponseDto); err != nil { + return CodeVersionsClientCreateOrGetStartPendingUploadResponse{}, err + } + return result, nil +} + // CreateOrUpdate - Create or update version. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Container name. This is case-sensitive. @@ -105,7 +184,7 @@ func (client *CodeVersionsClient) createOrUpdateCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -126,7 +205,7 @@ func (client *CodeVersionsClient) createOrUpdateHandleResponse(resp *http.Respon // Delete - Delete version. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Container name. This is case-sensitive. @@ -181,7 +260,7 @@ func (client *CodeVersionsClient) deleteCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -190,7 +269,7 @@ func (client *CodeVersionsClient) deleteCreateRequest(ctx context.Context, resou // Get - Get version. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Container name. This is case-sensitive. @@ -246,7 +325,7 @@ func (client *CodeVersionsClient) getCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -263,7 +342,7 @@ func (client *CodeVersionsClient) getHandleResponse(resp *http.Response) (CodeVe // NewListPager - List versions. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Container name. This is case-sensitive. @@ -315,15 +394,21 @@ func (client *CodeVersionsClient) listCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") if options != nil && options.OrderBy != nil { reqQP.Set("$orderBy", *options.OrderBy) } + if options != nil && options.Skip != nil { + reqQP.Set("$skip", *options.Skip) + } if options != nil && options.Top != nil { reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) } - if options != nil && options.Skip != nil { - reqQP.Set("$skip", *options.Skip) + reqQP.Set("api-version", "2024-04-01") + if options != nil && options.Hash != nil { + reqQP.Set("hash", *options.Hash) + } + if options != nil && options.HashVersion != nil { + reqQP.Set("hashVersion", *options.HashVersion) } req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} @@ -338,3 +423,94 @@ func (client *CodeVersionsClient) listHandleResponse(resp *http.Response) (CodeV } return result, nil } + +// BeginPublish - Publish version asset into registry. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - Name of Azure Machine Learning workspace. +// - name - Container name. +// - version - Version identifier. +// - body - Destination registry info +// - options - CodeVersionsClientBeginPublishOptions contains the optional parameters for the CodeVersionsClient.BeginPublish +// method. +func (client *CodeVersionsClient) BeginPublish(ctx context.Context, resourceGroupName string, workspaceName string, name string, version string, body DestinationAsset, options *CodeVersionsClientBeginPublishOptions) (*runtime.Poller[CodeVersionsClientPublishResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.publish(ctx, resourceGroupName, workspaceName, name, version, body, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[CodeVersionsClientPublishResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[CodeVersionsClientPublishResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Publish - Publish version asset into registry. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *CodeVersionsClient) publish(ctx context.Context, resourceGroupName string, workspaceName string, name string, version string, body DestinationAsset, options *CodeVersionsClientBeginPublishOptions) (*http.Response, error) { + var err error + const operationName = "CodeVersionsClient.BeginPublish" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.publishCreateRequest(ctx, resourceGroupName, workspaceName, name, version, body, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// publishCreateRequest creates the Publish request. +func (client *CodeVersionsClient) publishCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, name string, version string, body DestinationAsset, options *CodeVersionsClientBeginPublishOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version}/publish" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if workspaceName == "" { + return nil, errors.New("parameter workspaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceName}", url.PathEscape(workspaceName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if version == "" { + return nil, errors.New("parameter version cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{version}", url.PathEscape(version)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, body); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/componentcontainers_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/componentcontainers_client.go similarity index 97% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/componentcontainers_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/componentcontainers_client.go index d6c092165..06b5b98bb 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/componentcontainers_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/componentcontainers_client.go @@ -46,7 +46,7 @@ func NewComponentContainersClient(subscriptionID string, credential azcore.Token // CreateOrUpdate - Create or update container. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Container name. @@ -99,7 +99,7 @@ func (client *ComponentContainersClient) createOrUpdateCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -120,7 +120,7 @@ func (client *ComponentContainersClient) createOrUpdateHandleResponse(resp *http // Delete - Delete container. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Container name. @@ -171,7 +171,7 @@ func (client *ComponentContainersClient) deleteCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -180,7 +180,7 @@ func (client *ComponentContainersClient) deleteCreateRequest(ctx context.Context // Get - Get container. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Container name. @@ -231,7 +231,7 @@ func (client *ComponentContainersClient) getCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -248,7 +248,7 @@ func (client *ComponentContainersClient) getHandleResponse(resp *http.Response) // NewListPager - List component containers. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - options - ComponentContainersClientListOptions contains the optional parameters for the ComponentContainersClient.NewListPager @@ -296,10 +296,10 @@ func (client *ComponentContainersClient) listCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") if options != nil && options.Skip != nil { reqQP.Set("$skip", *options.Skip) } + reqQP.Set("api-version", "2024-04-01") if options != nil && options.ListViewType != nil { reqQP.Set("listViewType", string(*options.ListViewType)) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/componentversions_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/componentversions_client.go similarity index 76% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/componentversions_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/componentversions_client.go index 933651301..a6f1992f0 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/componentversions_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/componentversions_client.go @@ -47,7 +47,7 @@ func NewComponentVersionsClient(subscriptionID string, credential azcore.TokenCr // CreateOrUpdate - Create or update version. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Container name. @@ -105,7 +105,7 @@ func (client *ComponentVersionsClient) createOrUpdateCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -126,7 +126,7 @@ func (client *ComponentVersionsClient) createOrUpdateHandleResponse(resp *http.R // Delete - Delete version. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Container name. @@ -182,7 +182,7 @@ func (client *ComponentVersionsClient) deleteCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -191,7 +191,7 @@ func (client *ComponentVersionsClient) deleteCreateRequest(ctx context.Context, // Get - Get version. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Container name. @@ -247,7 +247,7 @@ func (client *ComponentVersionsClient) getCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -264,7 +264,7 @@ func (client *ComponentVersionsClient) getHandleResponse(resp *http.Response) (C // NewListPager - List component versions. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Component name. @@ -317,16 +317,16 @@ func (client *ComponentVersionsClient) listCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") if options != nil && options.OrderBy != nil { reqQP.Set("$orderBy", *options.OrderBy) } - if options != nil && options.Top != nil { - reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) - } if options != nil && options.Skip != nil { reqQP.Set("$skip", *options.Skip) } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-04-01") if options != nil && options.ListViewType != nil { reqQP.Set("listViewType", string(*options.ListViewType)) } @@ -343,3 +343,94 @@ func (client *ComponentVersionsClient) listHandleResponse(resp *http.Response) ( } return result, nil } + +// BeginPublish - Publish version asset into registry. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - Name of Azure Machine Learning workspace. +// - name - Container name. +// - version - Version identifier. +// - body - Destination registry info +// - options - ComponentVersionsClientBeginPublishOptions contains the optional parameters for the ComponentVersionsClient.BeginPublish +// method. +func (client *ComponentVersionsClient) BeginPublish(ctx context.Context, resourceGroupName string, workspaceName string, name string, version string, body DestinationAsset, options *ComponentVersionsClientBeginPublishOptions) (*runtime.Poller[ComponentVersionsClientPublishResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.publish(ctx, resourceGroupName, workspaceName, name, version, body, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ComponentVersionsClientPublishResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ComponentVersionsClientPublishResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Publish - Publish version asset into registry. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *ComponentVersionsClient) publish(ctx context.Context, resourceGroupName string, workspaceName string, name string, version string, body DestinationAsset, options *ComponentVersionsClientBeginPublishOptions) (*http.Response, error) { + var err error + const operationName = "ComponentVersionsClient.BeginPublish" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.publishCreateRequest(ctx, resourceGroupName, workspaceName, name, version, body, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// publishCreateRequest creates the Publish request. +func (client *ComponentVersionsClient) publishCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, name string, version string, body DestinationAsset, options *ComponentVersionsClientBeginPublishOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions/{version}/publish" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if workspaceName == "" { + return nil, errors.New("parameter workspaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceName}", url.PathEscape(workspaceName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if version == "" { + return nil, errors.New("parameter version cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{version}", url.PathEscape(version)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, body); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/compute_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/compute_client.go similarity index 97% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/compute_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/compute_client.go index 56326713a..82084f444 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/compute_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/compute_client.go @@ -48,7 +48,7 @@ func NewComputeClient(subscriptionID string, credential azcore.TokenCredential, // exist yet. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - computeName - Name of the Azure Machine Learning compute. @@ -77,7 +77,7 @@ func (client *ComputeClient) BeginCreateOrUpdate(ctx context.Context, resourceGr // exist yet. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 func (client *ComputeClient) createOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, computeName string, parameters ComputeResource, options *ComputeClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "ComputeClient.BeginCreateOrUpdate" @@ -123,7 +123,7 @@ func (client *ComputeClient) createOrUpdateCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { @@ -135,7 +135,7 @@ func (client *ComputeClient) createOrUpdateCreateRequest(ctx context.Context, re // BeginDelete - Deletes specified Machine Learning compute. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - computeName - Name of the Azure Machine Learning compute. @@ -162,7 +162,7 @@ func (client *ComputeClient) BeginDelete(ctx context.Context, resourceGroupName // Delete - Deletes specified Machine Learning compute. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 func (client *ComputeClient) deleteOperation(ctx context.Context, resourceGroupName string, workspaceName string, computeName string, underlyingResourceAction UnderlyingResourceAction, options *ComputeClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "ComputeClient.BeginDelete" @@ -208,7 +208,7 @@ func (client *ComputeClient) deleteCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") reqQP.Set("underlyingResourceAction", string(underlyingResourceAction)) req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} @@ -219,7 +219,7 @@ func (client *ComputeClient) deleteCreateRequest(ctx context.Context, resourceGr // 'keys' nested resource to get them. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - computeName - Name of the Azure Machine Learning compute. @@ -270,7 +270,7 @@ func (client *ComputeClient) getCreateRequest(ctx context.Context, resourceGroup return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -287,7 +287,7 @@ func (client *ComputeClient) getHandleResponse(resp *http.Response) (ComputeClie // NewListPager - Gets computes in specified workspace. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - options - ComputeClientListOptions contains the optional parameters for the ComputeClient.NewListPager method. @@ -334,10 +334,10 @@ func (client *ComputeClient) listCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") if options != nil && options.Skip != nil { reqQP.Set("$skip", *options.Skip) } + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -355,7 +355,7 @@ func (client *ComputeClient) listHandleResponse(resp *http.Response) (ComputeCli // ListKeys - Gets secrets related to Machine Learning compute (storage keys, service credentials, etc). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - computeName - Name of the Azure Machine Learning compute. @@ -406,7 +406,7 @@ func (client *ComputeClient) listKeysCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -423,7 +423,7 @@ func (client *ComputeClient) listKeysHandleResponse(resp *http.Response) (Comput // NewListNodesPager - Get the details (e.g IP address, port etc) of all the compute nodes in the compute. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - computeName - Name of the Azure Machine Learning compute. @@ -475,7 +475,7 @@ func (client *ComputeClient) listNodesCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -493,7 +493,7 @@ func (client *ComputeClient) listNodesHandleResponse(resp *http.Response) (Compu // BeginRestart - Posts a restart action to a compute instance // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - computeName - Name of the Azure Machine Learning compute. @@ -518,7 +518,7 @@ func (client *ComputeClient) BeginRestart(ctx context.Context, resourceGroupName // Restart - Posts a restart action to a compute instance // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 func (client *ComputeClient) restart(ctx context.Context, resourceGroupName string, workspaceName string, computeName string, options *ComputeClientBeginRestartOptions) (*http.Response, error) { var err error const operationName = "ComputeClient.BeginRestart" @@ -564,7 +564,7 @@ func (client *ComputeClient) restartCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -573,7 +573,7 @@ func (client *ComputeClient) restartCreateRequest(ctx context.Context, resourceG // BeginStart - Posts a start action to a compute instance // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - computeName - Name of the Azure Machine Learning compute. @@ -598,7 +598,7 @@ func (client *ComputeClient) BeginStart(ctx context.Context, resourceGroupName s // Start - Posts a start action to a compute instance // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 func (client *ComputeClient) start(ctx context.Context, resourceGroupName string, workspaceName string, computeName string, options *ComputeClientBeginStartOptions) (*http.Response, error) { var err error const operationName = "ComputeClient.BeginStart" @@ -644,7 +644,7 @@ func (client *ComputeClient) startCreateRequest(ctx context.Context, resourceGro return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -653,7 +653,7 @@ func (client *ComputeClient) startCreateRequest(ctx context.Context, resourceGro // BeginStop - Posts a stop action to a compute instance // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - computeName - Name of the Azure Machine Learning compute. @@ -678,7 +678,7 @@ func (client *ComputeClient) BeginStop(ctx context.Context, resourceGroupName st // Stop - Posts a stop action to a compute instance // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 func (client *ComputeClient) stop(ctx context.Context, resourceGroupName string, workspaceName string, computeName string, options *ComputeClientBeginStopOptions) (*http.Response, error) { var err error const operationName = "ComputeClient.BeginStop" @@ -724,7 +724,7 @@ func (client *ComputeClient) stopCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -734,7 +734,7 @@ func (client *ComputeClient) stopCreateRequest(ctx context.Context, resourceGrou // operation. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - computeName - Name of the Azure Machine Learning compute. @@ -760,7 +760,7 @@ func (client *ComputeClient) BeginUpdate(ctx context.Context, resourceGroupName // Update - Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 func (client *ComputeClient) update(ctx context.Context, resourceGroupName string, workspaceName string, computeName string, parameters ClusterUpdateParameters, options *ComputeClientBeginUpdateOptions) (*http.Response, error) { var err error const operationName = "ComputeClient.BeginUpdate" @@ -806,7 +806,7 @@ func (client *ComputeClient) updateCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/constants.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/constants.go similarity index 66% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/constants.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/constants.go index a54f2d118..8847d835b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/constants.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/constants.go @@ -10,9 +10,23 @@ package armmachinelearning const ( moduleName = "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning" - moduleVersion = "v3.2.0" + moduleVersion = "v4.0.0" ) +// ActionType - Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. +type ActionType string + +const ( + ActionTypeInternal ActionType = "Internal" +) + +// PossibleActionTypeValues returns the possible values for the ActionType const type. +func PossibleActionTypeValues() []ActionType { + return []ActionType{ + ActionTypeInternal, + } +} + // AllocationState - Allocation state of the compute. Possible values are: steady - Indicates that the compute is not resizing. // There are no changes to the number of compute nodes in the compute in progress. A compute // enters this state when it is created and when no operations are being performed on the compute to change the number of @@ -51,6 +65,30 @@ func PossibleApplicationSharingPolicyValues() []ApplicationSharingPolicy { } } +// AssetProvisioningState - Provisioning state of registry asset. +type AssetProvisioningState string + +const ( + AssetProvisioningStateCanceled AssetProvisioningState = "Canceled" + AssetProvisioningStateCreating AssetProvisioningState = "Creating" + AssetProvisioningStateDeleting AssetProvisioningState = "Deleting" + AssetProvisioningStateFailed AssetProvisioningState = "Failed" + AssetProvisioningStateSucceeded AssetProvisioningState = "Succeeded" + AssetProvisioningStateUpdating AssetProvisioningState = "Updating" +) + +// PossibleAssetProvisioningStateValues returns the possible values for the AssetProvisioningState const type. +func PossibleAssetProvisioningStateValues() []AssetProvisioningState { + return []AssetProvisioningState{ + AssetProvisioningStateCanceled, + AssetProvisioningStateCreating, + AssetProvisioningStateDeleting, + AssetProvisioningStateFailed, + AssetProvisioningStateSucceeded, + AssetProvisioningStateUpdating, + } +} + // AutoRebuildSetting - AutoRebuild setting for the derived image type AutoRebuildSetting string @@ -85,6 +123,22 @@ func PossibleAutosaveValues() []Autosave { } } +// BatchDeploymentConfigurationType - The enumerated property types for batch deployments. +type BatchDeploymentConfigurationType string + +const ( + BatchDeploymentConfigurationTypeModel BatchDeploymentConfigurationType = "Model" + BatchDeploymentConfigurationTypePipelineComponent BatchDeploymentConfigurationType = "PipelineComponent" +) + +// PossibleBatchDeploymentConfigurationTypeValues returns the possible values for the BatchDeploymentConfigurationType const type. +func PossibleBatchDeploymentConfigurationTypeValues() []BatchDeploymentConfigurationType { + return []BatchDeploymentConfigurationType{ + BatchDeploymentConfigurationTypeModel, + BatchDeploymentConfigurationTypePipelineComponent, + } +} + // BatchLoggingLevel - Log verbosity for batch inferencing. Increasing verbosity order for logging is : Warning, Info and // Debug. The default value is Info. type BatchLoggingLevel string @@ -198,6 +252,66 @@ func PossibleCachingValues() []Caching { } } +type CategoricalDataDriftMetric string + +const ( + // CategoricalDataDriftMetricJensenShannonDistance - The Jensen Shannon Distance (JSD) metric. + CategoricalDataDriftMetricJensenShannonDistance CategoricalDataDriftMetric = "JensenShannonDistance" + // CategoricalDataDriftMetricPearsonsChiSquaredTest - The Pearsons Chi Squared Test metric. + CategoricalDataDriftMetricPearsonsChiSquaredTest CategoricalDataDriftMetric = "PearsonsChiSquaredTest" + // CategoricalDataDriftMetricPopulationStabilityIndex - The Population Stability Index (PSI) metric. + CategoricalDataDriftMetricPopulationStabilityIndex CategoricalDataDriftMetric = "PopulationStabilityIndex" +) + +// PossibleCategoricalDataDriftMetricValues returns the possible values for the CategoricalDataDriftMetric const type. +func PossibleCategoricalDataDriftMetricValues() []CategoricalDataDriftMetric { + return []CategoricalDataDriftMetric{ + CategoricalDataDriftMetricJensenShannonDistance, + CategoricalDataDriftMetricPearsonsChiSquaredTest, + CategoricalDataDriftMetricPopulationStabilityIndex, + } +} + +type CategoricalDataQualityMetric string + +const ( + // CategoricalDataQualityMetricDataTypeErrorRate - Calculates the rate of data type errors. + CategoricalDataQualityMetricDataTypeErrorRate CategoricalDataQualityMetric = "DataTypeErrorRate" + // CategoricalDataQualityMetricNullValueRate - Calculates the rate of null values. + CategoricalDataQualityMetricNullValueRate CategoricalDataQualityMetric = "NullValueRate" + // CategoricalDataQualityMetricOutOfBoundsRate - Calculates the rate values are out of bounds. + CategoricalDataQualityMetricOutOfBoundsRate CategoricalDataQualityMetric = "OutOfBoundsRate" +) + +// PossibleCategoricalDataQualityMetricValues returns the possible values for the CategoricalDataQualityMetric const type. +func PossibleCategoricalDataQualityMetricValues() []CategoricalDataQualityMetric { + return []CategoricalDataQualityMetric{ + CategoricalDataQualityMetricDataTypeErrorRate, + CategoricalDataQualityMetricNullValueRate, + CategoricalDataQualityMetricOutOfBoundsRate, + } +} + +type CategoricalPredictionDriftMetric string + +const ( + // CategoricalPredictionDriftMetricJensenShannonDistance - The Jensen Shannon Distance (JSD) metric. + CategoricalPredictionDriftMetricJensenShannonDistance CategoricalPredictionDriftMetric = "JensenShannonDistance" + // CategoricalPredictionDriftMetricPearsonsChiSquaredTest - The Pearsons Chi Squared Test metric. + CategoricalPredictionDriftMetricPearsonsChiSquaredTest CategoricalPredictionDriftMetric = "PearsonsChiSquaredTest" + // CategoricalPredictionDriftMetricPopulationStabilityIndex - The Population Stability Index (PSI) metric. + CategoricalPredictionDriftMetricPopulationStabilityIndex CategoricalPredictionDriftMetric = "PopulationStabilityIndex" +) + +// PossibleCategoricalPredictionDriftMetricValues returns the possible values for the CategoricalPredictionDriftMetric const type. +func PossibleCategoricalPredictionDriftMetricValues() []CategoricalPredictionDriftMetric { + return []CategoricalPredictionDriftMetric{ + CategoricalPredictionDriftMetricJensenShannonDistance, + CategoricalPredictionDriftMetricPearsonsChiSquaredTest, + CategoricalPredictionDriftMetricPopulationStabilityIndex, + } +} + // ClassificationModels - Enum for all classification models supported by AutoML. type ClassificationModels string @@ -435,6 +549,49 @@ func PossibleComputePowerActionValues() []ComputePowerAction { } } +// ComputeRecurrenceFrequency - Enum to describe the frequency of a compute recurrence schedule +type ComputeRecurrenceFrequency string + +const ( + // ComputeRecurrenceFrequencyDay - Day frequency + ComputeRecurrenceFrequencyDay ComputeRecurrenceFrequency = "Day" + // ComputeRecurrenceFrequencyHour - Hour frequency + ComputeRecurrenceFrequencyHour ComputeRecurrenceFrequency = "Hour" + // ComputeRecurrenceFrequencyMinute - Minute frequency + ComputeRecurrenceFrequencyMinute ComputeRecurrenceFrequency = "Minute" + // ComputeRecurrenceFrequencyMonth - Month frequency + ComputeRecurrenceFrequencyMonth ComputeRecurrenceFrequency = "Month" + // ComputeRecurrenceFrequencyWeek - Week frequency + ComputeRecurrenceFrequencyWeek ComputeRecurrenceFrequency = "Week" +) + +// PossibleComputeRecurrenceFrequencyValues returns the possible values for the ComputeRecurrenceFrequency const type. +func PossibleComputeRecurrenceFrequencyValues() []ComputeRecurrenceFrequency { + return []ComputeRecurrenceFrequency{ + ComputeRecurrenceFrequencyDay, + ComputeRecurrenceFrequencyHour, + ComputeRecurrenceFrequencyMinute, + ComputeRecurrenceFrequencyMonth, + ComputeRecurrenceFrequencyWeek, + } +} + +// ComputeTriggerType - Is the trigger type recurrence or cron. +type ComputeTriggerType string + +const ( + ComputeTriggerTypeCron ComputeTriggerType = "Cron" + ComputeTriggerTypeRecurrence ComputeTriggerType = "Recurrence" +) + +// PossibleComputeTriggerTypeValues returns the possible values for the ComputeTriggerType const type. +func PossibleComputeTriggerTypeValues() []ComputeTriggerType { + return []ComputeTriggerType{ + ComputeTriggerTypeCron, + ComputeTriggerTypeRecurrence, + } +} + // ComputeType - The type of compute type ComputeType string @@ -467,24 +624,71 @@ func PossibleComputeTypeValues() []ComputeType { } } +// ComputeWeekDay - Enum of weekday +type ComputeWeekDay string + +const ( + // ComputeWeekDayFriday - Friday weekday + ComputeWeekDayFriday ComputeWeekDay = "Friday" + // ComputeWeekDayMonday - Monday weekday + ComputeWeekDayMonday ComputeWeekDay = "Monday" + // ComputeWeekDaySaturday - Saturday weekday + ComputeWeekDaySaturday ComputeWeekDay = "Saturday" + // ComputeWeekDaySunday - Sunday weekday + ComputeWeekDaySunday ComputeWeekDay = "Sunday" + // ComputeWeekDayThursday - Thursday weekday + ComputeWeekDayThursday ComputeWeekDay = "Thursday" + // ComputeWeekDayTuesday - Tuesday weekday + ComputeWeekDayTuesday ComputeWeekDay = "Tuesday" + // ComputeWeekDayWednesday - Wednesday weekday + ComputeWeekDayWednesday ComputeWeekDay = "Wednesday" +) + +// PossibleComputeWeekDayValues returns the possible values for the ComputeWeekDay const type. +func PossibleComputeWeekDayValues() []ComputeWeekDay { + return []ComputeWeekDay{ + ComputeWeekDayFriday, + ComputeWeekDayMonday, + ComputeWeekDaySaturday, + ComputeWeekDaySunday, + ComputeWeekDayThursday, + ComputeWeekDayTuesday, + ComputeWeekDayWednesday, + } +} + // ConnectionAuthType - Authentication type of the connection target type ConnectionAuthType string const ( + ConnectionAuthTypeAAD ConnectionAuthType = "AAD" + ConnectionAuthTypeAPIKey ConnectionAuthType = "ApiKey" + ConnectionAuthTypeAccessKey ConnectionAuthType = "AccessKey" + ConnectionAuthTypeAccountKey ConnectionAuthType = "AccountKey" + ConnectionAuthTypeCustomKeys ConnectionAuthType = "CustomKeys" ConnectionAuthTypeManagedIdentity ConnectionAuthType = "ManagedIdentity" ConnectionAuthTypeNone ConnectionAuthType = "None" + ConnectionAuthTypeOAuth2 ConnectionAuthType = "OAuth2" ConnectionAuthTypePAT ConnectionAuthType = "PAT" ConnectionAuthTypeSAS ConnectionAuthType = "SAS" + ConnectionAuthTypeServicePrincipal ConnectionAuthType = "ServicePrincipal" ConnectionAuthTypeUsernamePassword ConnectionAuthType = "UsernamePassword" ) // PossibleConnectionAuthTypeValues returns the possible values for the ConnectionAuthType const type. func PossibleConnectionAuthTypeValues() []ConnectionAuthType { return []ConnectionAuthType{ + ConnectionAuthTypeAAD, + ConnectionAuthTypeAPIKey, + ConnectionAuthTypeAccessKey, + ConnectionAuthTypeAccountKey, + ConnectionAuthTypeCustomKeys, ConnectionAuthTypeManagedIdentity, ConnectionAuthTypeNone, + ConnectionAuthTypeOAuth2, ConnectionAuthTypePAT, ConnectionAuthTypeSAS, + ConnectionAuthTypeServicePrincipal, ConnectionAuthTypeUsernamePassword, } } @@ -493,17 +697,241 @@ func PossibleConnectionAuthTypeValues() []ConnectionAuthType { type ConnectionCategory string const ( - ConnectionCategoryContainerRegistry ConnectionCategory = "ContainerRegistry" - ConnectionCategoryGit ConnectionCategory = "Git" - ConnectionCategoryPythonFeed ConnectionCategory = "PythonFeed" + ConnectionCategoryADLSGen2 ConnectionCategory = "ADLSGen2" + ConnectionCategoryAIServices ConnectionCategory = "AIServices" + ConnectionCategoryAPIKey ConnectionCategory = "ApiKey" + ConnectionCategoryAmazonMws ConnectionCategory = "AmazonMws" + ConnectionCategoryAmazonRdsForOracle ConnectionCategory = "AmazonRdsForOracle" + ConnectionCategoryAmazonRdsForSQLServer ConnectionCategory = "AmazonRdsForSqlServer" + ConnectionCategoryAmazonRedshift ConnectionCategory = "AmazonRedshift" + ConnectionCategoryAmazonS3Compatible ConnectionCategory = "AmazonS3Compatible" + ConnectionCategoryAzureBlob ConnectionCategory = "AzureBlob" + ConnectionCategoryAzureDataExplorer ConnectionCategory = "AzureDataExplorer" + ConnectionCategoryAzureDatabricksDeltaLake ConnectionCategory = "AzureDatabricksDeltaLake" + ConnectionCategoryAzureMariaDb ConnectionCategory = "AzureMariaDb" + ConnectionCategoryAzureMySQLDb ConnectionCategory = "AzureMySqlDb" + ConnectionCategoryAzureOneLake ConnectionCategory = "AzureOneLake" + ConnectionCategoryAzureOpenAI ConnectionCategory = "AzureOpenAI" + ConnectionCategoryAzurePostgresDb ConnectionCategory = "AzurePostgresDb" + ConnectionCategoryAzureSQLDb ConnectionCategory = "AzureSqlDb" + ConnectionCategoryAzureSQLMi ConnectionCategory = "AzureSqlMi" + ConnectionCategoryAzureSynapseAnalytics ConnectionCategory = "AzureSynapseAnalytics" + ConnectionCategoryAzureTableStorage ConnectionCategory = "AzureTableStorage" + ConnectionCategoryBingLLMSearch ConnectionCategory = "BingLLMSearch" + ConnectionCategoryCassandra ConnectionCategory = "Cassandra" + ConnectionCategoryCognitiveSearch ConnectionCategory = "CognitiveSearch" + ConnectionCategoryCognitiveService ConnectionCategory = "CognitiveService" + ConnectionCategoryConcur ConnectionCategory = "Concur" + ConnectionCategoryContainerRegistry ConnectionCategory = "ContainerRegistry" + ConnectionCategoryCosmosDb ConnectionCategory = "CosmosDb" + ConnectionCategoryCosmosDbMongoDbAPI ConnectionCategory = "CosmosDbMongoDbApi" + ConnectionCategoryCouchbase ConnectionCategory = "Couchbase" + ConnectionCategoryCustomKeys ConnectionCategory = "CustomKeys" + ConnectionCategoryDb2 ConnectionCategory = "Db2" + ConnectionCategoryDrill ConnectionCategory = "Drill" + ConnectionCategoryDynamics ConnectionCategory = "Dynamics" + ConnectionCategoryDynamicsAx ConnectionCategory = "DynamicsAx" + ConnectionCategoryDynamicsCrm ConnectionCategory = "DynamicsCrm" + ConnectionCategoryEloqua ConnectionCategory = "Eloqua" + ConnectionCategoryFileServer ConnectionCategory = "FileServer" + ConnectionCategoryFtpServer ConnectionCategory = "FtpServer" + ConnectionCategoryGenericContainerRegistry ConnectionCategory = "GenericContainerRegistry" + ConnectionCategoryGenericHTTP ConnectionCategory = "GenericHttp" + ConnectionCategoryGenericRest ConnectionCategory = "GenericRest" + ConnectionCategoryGit ConnectionCategory = "Git" + ConnectionCategoryGoogleAdWords ConnectionCategory = "GoogleAdWords" + ConnectionCategoryGoogleBigQuery ConnectionCategory = "GoogleBigQuery" + ConnectionCategoryGoogleCloudStorage ConnectionCategory = "GoogleCloudStorage" + ConnectionCategoryGreenplum ConnectionCategory = "Greenplum" + ConnectionCategoryHbase ConnectionCategory = "Hbase" + ConnectionCategoryHdfs ConnectionCategory = "Hdfs" + ConnectionCategoryHive ConnectionCategory = "Hive" + ConnectionCategoryHubspot ConnectionCategory = "Hubspot" + ConnectionCategoryImpala ConnectionCategory = "Impala" + ConnectionCategoryInformix ConnectionCategory = "Informix" + ConnectionCategoryJira ConnectionCategory = "Jira" + ConnectionCategoryMagento ConnectionCategory = "Magento" + ConnectionCategoryMariaDb ConnectionCategory = "MariaDb" + ConnectionCategoryMarketo ConnectionCategory = "Marketo" + ConnectionCategoryMicrosoftAccess ConnectionCategory = "MicrosoftAccess" + ConnectionCategoryMongoDbAtlas ConnectionCategory = "MongoDbAtlas" + ConnectionCategoryMongoDbV2 ConnectionCategory = "MongoDbV2" + ConnectionCategoryMySQL ConnectionCategory = "MySql" + ConnectionCategoryNetezza ConnectionCategory = "Netezza" + ConnectionCategoryODataRest ConnectionCategory = "ODataRest" + ConnectionCategoryOdbc ConnectionCategory = "Odbc" + ConnectionCategoryOffice365 ConnectionCategory = "Office365" + ConnectionCategoryOpenAI ConnectionCategory = "OpenAI" + ConnectionCategoryOracle ConnectionCategory = "Oracle" + ConnectionCategoryOracleCloudStorage ConnectionCategory = "OracleCloudStorage" + ConnectionCategoryOracleServiceCloud ConnectionCategory = "OracleServiceCloud" + ConnectionCategoryPayPal ConnectionCategory = "PayPal" + ConnectionCategoryPhoenix ConnectionCategory = "Phoenix" + ConnectionCategoryPostgreSQL ConnectionCategory = "PostgreSql" + ConnectionCategoryPresto ConnectionCategory = "Presto" + ConnectionCategoryPythonFeed ConnectionCategory = "PythonFeed" + ConnectionCategoryQuickBooks ConnectionCategory = "QuickBooks" + ConnectionCategoryRedis ConnectionCategory = "Redis" + ConnectionCategoryResponsys ConnectionCategory = "Responsys" + ConnectionCategoryS3 ConnectionCategory = "S3" + ConnectionCategorySQLServer ConnectionCategory = "SqlServer" + ConnectionCategorySalesforce ConnectionCategory = "Salesforce" + ConnectionCategorySalesforceMarketingCloud ConnectionCategory = "SalesforceMarketingCloud" + ConnectionCategorySalesforceServiceCloud ConnectionCategory = "SalesforceServiceCloud" + ConnectionCategorySapBw ConnectionCategory = "SapBw" + ConnectionCategorySapCloudForCustomer ConnectionCategory = "SapCloudForCustomer" + ConnectionCategorySapEcc ConnectionCategory = "SapEcc" + ConnectionCategorySapHana ConnectionCategory = "SapHana" + ConnectionCategorySapOpenHub ConnectionCategory = "SapOpenHub" + ConnectionCategorySapTable ConnectionCategory = "SapTable" + ConnectionCategorySerp ConnectionCategory = "Serp" + ConnectionCategoryServerless ConnectionCategory = "Serverless" + ConnectionCategoryServiceNow ConnectionCategory = "ServiceNow" + ConnectionCategorySftp ConnectionCategory = "Sftp" + ConnectionCategorySharePointOnlineList ConnectionCategory = "SharePointOnlineList" + ConnectionCategoryShopify ConnectionCategory = "Shopify" + ConnectionCategorySnowflake ConnectionCategory = "Snowflake" + ConnectionCategorySpark ConnectionCategory = "Spark" + ConnectionCategorySquare ConnectionCategory = "Square" + ConnectionCategorySybase ConnectionCategory = "Sybase" + ConnectionCategoryTeradata ConnectionCategory = "Teradata" + ConnectionCategoryVertica ConnectionCategory = "Vertica" + ConnectionCategoryWebTable ConnectionCategory = "WebTable" + ConnectionCategoryXero ConnectionCategory = "Xero" + ConnectionCategoryZoho ConnectionCategory = "Zoho" ) // PossibleConnectionCategoryValues returns the possible values for the ConnectionCategory const type. func PossibleConnectionCategoryValues() []ConnectionCategory { return []ConnectionCategory{ + ConnectionCategoryADLSGen2, + ConnectionCategoryAIServices, + ConnectionCategoryAPIKey, + ConnectionCategoryAmazonMws, + ConnectionCategoryAmazonRdsForOracle, + ConnectionCategoryAmazonRdsForSQLServer, + ConnectionCategoryAmazonRedshift, + ConnectionCategoryAmazonS3Compatible, + ConnectionCategoryAzureBlob, + ConnectionCategoryAzureDataExplorer, + ConnectionCategoryAzureDatabricksDeltaLake, + ConnectionCategoryAzureMariaDb, + ConnectionCategoryAzureMySQLDb, + ConnectionCategoryAzureOneLake, + ConnectionCategoryAzureOpenAI, + ConnectionCategoryAzurePostgresDb, + ConnectionCategoryAzureSQLDb, + ConnectionCategoryAzureSQLMi, + ConnectionCategoryAzureSynapseAnalytics, + ConnectionCategoryAzureTableStorage, + ConnectionCategoryBingLLMSearch, + ConnectionCategoryCassandra, + ConnectionCategoryCognitiveSearch, + ConnectionCategoryCognitiveService, + ConnectionCategoryConcur, ConnectionCategoryContainerRegistry, + ConnectionCategoryCosmosDb, + ConnectionCategoryCosmosDbMongoDbAPI, + ConnectionCategoryCouchbase, + ConnectionCategoryCustomKeys, + ConnectionCategoryDb2, + ConnectionCategoryDrill, + ConnectionCategoryDynamics, + ConnectionCategoryDynamicsAx, + ConnectionCategoryDynamicsCrm, + ConnectionCategoryEloqua, + ConnectionCategoryFileServer, + ConnectionCategoryFtpServer, + ConnectionCategoryGenericContainerRegistry, + ConnectionCategoryGenericHTTP, + ConnectionCategoryGenericRest, ConnectionCategoryGit, + ConnectionCategoryGoogleAdWords, + ConnectionCategoryGoogleBigQuery, + ConnectionCategoryGoogleCloudStorage, + ConnectionCategoryGreenplum, + ConnectionCategoryHbase, + ConnectionCategoryHdfs, + ConnectionCategoryHive, + ConnectionCategoryHubspot, + ConnectionCategoryImpala, + ConnectionCategoryInformix, + ConnectionCategoryJira, + ConnectionCategoryMagento, + ConnectionCategoryMariaDb, + ConnectionCategoryMarketo, + ConnectionCategoryMicrosoftAccess, + ConnectionCategoryMongoDbAtlas, + ConnectionCategoryMongoDbV2, + ConnectionCategoryMySQL, + ConnectionCategoryNetezza, + ConnectionCategoryODataRest, + ConnectionCategoryOdbc, + ConnectionCategoryOffice365, + ConnectionCategoryOpenAI, + ConnectionCategoryOracle, + ConnectionCategoryOracleCloudStorage, + ConnectionCategoryOracleServiceCloud, + ConnectionCategoryPayPal, + ConnectionCategoryPhoenix, + ConnectionCategoryPostgreSQL, + ConnectionCategoryPresto, ConnectionCategoryPythonFeed, + ConnectionCategoryQuickBooks, + ConnectionCategoryRedis, + ConnectionCategoryResponsys, + ConnectionCategoryS3, + ConnectionCategorySQLServer, + ConnectionCategorySalesforce, + ConnectionCategorySalesforceMarketingCloud, + ConnectionCategorySalesforceServiceCloud, + ConnectionCategorySapBw, + ConnectionCategorySapCloudForCustomer, + ConnectionCategorySapEcc, + ConnectionCategorySapHana, + ConnectionCategorySapOpenHub, + ConnectionCategorySapTable, + ConnectionCategorySerp, + ConnectionCategoryServerless, + ConnectionCategoryServiceNow, + ConnectionCategorySftp, + ConnectionCategorySharePointOnlineList, + ConnectionCategoryShopify, + ConnectionCategorySnowflake, + ConnectionCategorySpark, + ConnectionCategorySquare, + ConnectionCategorySybase, + ConnectionCategoryTeradata, + ConnectionCategoryVertica, + ConnectionCategoryWebTable, + ConnectionCategoryXero, + ConnectionCategoryZoho, + } +} + +// ConnectionGroup - Group based on connection category +type ConnectionGroup string + +const ( + ConnectionGroupAzure ConnectionGroup = "Azure" + ConnectionGroupAzureAI ConnectionGroup = "AzureAI" + ConnectionGroupDatabase ConnectionGroup = "Database" + ConnectionGroupFile ConnectionGroup = "File" + ConnectionGroupGenericProtocol ConnectionGroup = "GenericProtocol" + ConnectionGroupNoSQL ConnectionGroup = "NoSQL" + ConnectionGroupServicesAndApps ConnectionGroup = "ServicesAndApps" +) + +// PossibleConnectionGroupValues returns the possible values for the ConnectionGroup const type. +func PossibleConnectionGroupValues() []ConnectionGroup { + return []ConnectionGroup{ + ConnectionGroupAzure, + ConnectionGroupAzureAI, + ConnectionGroupDatabase, + ConnectionGroupFile, + ConnectionGroupGenericProtocol, + ConnectionGroupNoSQL, + ConnectionGroupServicesAndApps, } } @@ -522,6 +950,22 @@ func PossibleContainerTypeValues() []ContainerType { } } +// ContentSafetyStatus - Specifies the status of content safety. +type ContentSafetyStatus string + +const ( + ContentSafetyStatusDisabled ContentSafetyStatus = "Disabled" + ContentSafetyStatusEnabled ContentSafetyStatus = "Enabled" +) + +// PossibleContentSafetyStatusValues returns the possible values for the ContentSafetyStatus const type. +func PossibleContentSafetyStatusValues() []ContentSafetyStatus { + return []ContentSafetyStatus{ + ContentSafetyStatusDisabled, + ContentSafetyStatusEnabled, + } +} + // CreatedByType - The type of identity that created the resource. type CreatedByType string @@ -564,6 +1008,60 @@ func PossibleCredentialsTypeValues() []CredentialsType { } } +type DataAvailabilityStatus string + +const ( + DataAvailabilityStatusComplete DataAvailabilityStatus = "Complete" + DataAvailabilityStatusIncomplete DataAvailabilityStatus = "Incomplete" + DataAvailabilityStatusNone DataAvailabilityStatus = "None" + DataAvailabilityStatusPending DataAvailabilityStatus = "Pending" +) + +// PossibleDataAvailabilityStatusValues returns the possible values for the DataAvailabilityStatus const type. +func PossibleDataAvailabilityStatusValues() []DataAvailabilityStatus { + return []DataAvailabilityStatus{ + DataAvailabilityStatusComplete, + DataAvailabilityStatusIncomplete, + DataAvailabilityStatusNone, + DataAvailabilityStatusPending, + } +} + +type DataCollectionMode string + +const ( + DataCollectionModeDisabled DataCollectionMode = "Disabled" + DataCollectionModeEnabled DataCollectionMode = "Enabled" +) + +// PossibleDataCollectionModeValues returns the possible values for the DataCollectionMode const type. +func PossibleDataCollectionModeValues() []DataCollectionMode { + return []DataCollectionMode{ + DataCollectionModeDisabled, + DataCollectionModeEnabled, + } +} + +// DataReferenceCredentialType - Enum to determine the DataReference credentials type. +type DataReferenceCredentialType string + +const ( + DataReferenceCredentialTypeDockerCredentials DataReferenceCredentialType = "DockerCredentials" + DataReferenceCredentialTypeManagedIdentity DataReferenceCredentialType = "ManagedIdentity" + DataReferenceCredentialTypeNoCredentials DataReferenceCredentialType = "NoCredentials" + DataReferenceCredentialTypeSAS DataReferenceCredentialType = "SAS" +) + +// PossibleDataReferenceCredentialTypeValues returns the possible values for the DataReferenceCredentialType const type. +func PossibleDataReferenceCredentialTypeValues() []DataReferenceCredentialType { + return []DataReferenceCredentialType{ + DataReferenceCredentialTypeDockerCredentials, + DataReferenceCredentialTypeManagedIdentity, + DataReferenceCredentialTypeNoCredentials, + DataReferenceCredentialTypeSAS, + } +} + // DataType - Enum to determine the type of data. type DataType string @@ -590,6 +1088,7 @@ const ( DatastoreTypeAzureDataLakeGen1 DatastoreType = "AzureDataLakeGen1" DatastoreTypeAzureDataLakeGen2 DatastoreType = "AzureDataLakeGen2" DatastoreTypeAzureFile DatastoreType = "AzureFile" + DatastoreTypeOneLake DatastoreType = "OneLake" ) // PossibleDatastoreTypeValues returns the possible values for the DatastoreType const type. @@ -599,6 +1098,7 @@ func PossibleDatastoreTypeValues() []DatastoreType { DatastoreTypeAzureDataLakeGen1, DatastoreTypeAzureDataLakeGen2, DatastoreTypeAzureFile, + DatastoreTypeOneLake, } } @@ -697,6 +1197,24 @@ func PossibleEgressPublicNetworkAccessTypeValues() []EgressPublicNetworkAccessTy } } +// EmailNotificationEnableType - Enum to determine the email notification type. +type EmailNotificationEnableType string + +const ( + EmailNotificationEnableTypeJobCancelled EmailNotificationEnableType = "JobCancelled" + EmailNotificationEnableTypeJobCompleted EmailNotificationEnableType = "JobCompleted" + EmailNotificationEnableTypeJobFailed EmailNotificationEnableType = "JobFailed" +) + +// PossibleEmailNotificationEnableTypeValues returns the possible values for the EmailNotificationEnableType const type. +func PossibleEmailNotificationEnableTypeValues() []EmailNotificationEnableType { + return []EmailNotificationEnableType{ + EmailNotificationEnableTypeJobCancelled, + EmailNotificationEnableTypeJobCompleted, + EmailNotificationEnableTypeJobFailed, + } +} + // EncryptionStatus - Indicates whether or not the encryption is enabled for the workspace. type EncryptionStatus string @@ -773,6 +1291,26 @@ func PossibleEndpointProvisioningStateValues() []EndpointProvisioningState { } } +// EndpointServiceConnectionStatus - Connection status of the service consumer with the service provider +type EndpointServiceConnectionStatus string + +const ( + EndpointServiceConnectionStatusApproved EndpointServiceConnectionStatus = "Approved" + EndpointServiceConnectionStatusDisconnected EndpointServiceConnectionStatus = "Disconnected" + EndpointServiceConnectionStatusPending EndpointServiceConnectionStatus = "Pending" + EndpointServiceConnectionStatusRejected EndpointServiceConnectionStatus = "Rejected" +) + +// PossibleEndpointServiceConnectionStatusValues returns the possible values for the EndpointServiceConnectionStatus const type. +func PossibleEndpointServiceConnectionStatusValues() []EndpointServiceConnectionStatus { + return []EndpointServiceConnectionStatus{ + EndpointServiceConnectionStatusApproved, + EndpointServiceConnectionStatusDisconnected, + EndpointServiceConnectionStatusPending, + EndpointServiceConnectionStatusRejected, + } +} + // EnvironmentType - Environment type is either user created or curated by Azure ML service type EnvironmentType string @@ -789,6 +1327,79 @@ func PossibleEnvironmentTypeValues() []EnvironmentType { } } +// EnvironmentVariableType - Type of the Environment Variable. Possible values are: local - For local variable +type EnvironmentVariableType string + +const ( + EnvironmentVariableTypeLocal EnvironmentVariableType = "local" +) + +// PossibleEnvironmentVariableTypeValues returns the possible values for the EnvironmentVariableType const type. +func PossibleEnvironmentVariableTypeValues() []EnvironmentVariableType { + return []EnvironmentVariableType{ + EnvironmentVariableTypeLocal, + } +} + +type FeatureAttributionMetric string + +const ( + // FeatureAttributionMetricNormalizedDiscountedCumulativeGain - The Normalized Discounted Cumulative Gain metric. + FeatureAttributionMetricNormalizedDiscountedCumulativeGain FeatureAttributionMetric = "NormalizedDiscountedCumulativeGain" +) + +// PossibleFeatureAttributionMetricValues returns the possible values for the FeatureAttributionMetric const type. +func PossibleFeatureAttributionMetricValues() []FeatureAttributionMetric { + return []FeatureAttributionMetric{ + FeatureAttributionMetricNormalizedDiscountedCumulativeGain, + } +} + +type FeatureDataType string + +const ( + FeatureDataTypeBinary FeatureDataType = "Binary" + FeatureDataTypeBoolean FeatureDataType = "Boolean" + FeatureDataTypeDatetime FeatureDataType = "Datetime" + FeatureDataTypeDouble FeatureDataType = "Double" + FeatureDataTypeFloat FeatureDataType = "Float" + FeatureDataTypeInteger FeatureDataType = "Integer" + FeatureDataTypeLong FeatureDataType = "Long" + FeatureDataTypeString FeatureDataType = "String" +) + +// PossibleFeatureDataTypeValues returns the possible values for the FeatureDataType const type. +func PossibleFeatureDataTypeValues() []FeatureDataType { + return []FeatureDataType{ + FeatureDataTypeBinary, + FeatureDataTypeBoolean, + FeatureDataTypeDatetime, + FeatureDataTypeDouble, + FeatureDataTypeFloat, + FeatureDataTypeInteger, + FeatureDataTypeLong, + FeatureDataTypeString, + } +} + +// FeatureImportanceMode - The mode of operation for computing feature importance. +type FeatureImportanceMode string + +const ( + // FeatureImportanceModeDisabled - Disables computing feature importance within a signal. + FeatureImportanceModeDisabled FeatureImportanceMode = "Disabled" + // FeatureImportanceModeEnabled - Enables computing feature importance within a signal. + FeatureImportanceModeEnabled FeatureImportanceMode = "Enabled" +) + +// PossibleFeatureImportanceModeValues returns the possible values for the FeatureImportanceMode const type. +func PossibleFeatureImportanceModeValues() []FeatureImportanceMode { + return []FeatureImportanceMode{ + FeatureImportanceModeDisabled, + FeatureImportanceModeEnabled, + } +} + // FeatureLags - Flag for generating lags for the numeric features. type FeatureLags string @@ -1005,6 +1616,22 @@ func PossibleIdentityConfigurationTypeValues() []IdentityConfigurationType { } } +// ImageType - Type of the image. Possible values are: docker - For docker images. azureml - For AzureML images +type ImageType string + +const ( + ImageTypeAzureml ImageType = "azureml" + ImageTypeDocker ImageType = "docker" +) + +// PossibleImageTypeValues returns the possible values for the ImageType const type. +func PossibleImageTypeValues() []ImageType { + return []ImageType{ + ImageTypeAzureml, + ImageTypeDocker, + } +} + // InputDeliveryMode - Enum to determine the input data delivery mode. type InputDeliveryMode string @@ -1045,6 +1672,24 @@ func PossibleInstanceSegmentationPrimaryMetricsValues() []InstanceSegmentationPr } } +// IsolationMode - Isolation mode for the managed network of a machine learning workspace. +type IsolationMode string + +const ( + IsolationModeAllowInternetOutbound IsolationMode = "AllowInternetOutbound" + IsolationModeAllowOnlyApprovedOutbound IsolationMode = "AllowOnlyApprovedOutbound" + IsolationModeDisabled IsolationMode = "Disabled" +) + +// PossibleIsolationModeValues returns the possible values for the IsolationMode const type. +func PossibleIsolationModeValues() []IsolationMode { + return []IsolationMode{ + IsolationModeAllowInternetOutbound, + IsolationModeAllowOnlyApprovedOutbound, + IsolationModeDisabled, + } +} + // JobInputType - Enum to determine the Job Input Type. type JobInputType string @@ -1169,6 +1814,28 @@ func PossibleJobStatusValues() []JobStatus { } } +// JobTier - Enum to determine the job tier. +type JobTier string + +const ( + JobTierBasic JobTier = "Basic" + JobTierNull JobTier = "Null" + JobTierPremium JobTier = "Premium" + JobTierSpot JobTier = "Spot" + JobTierStandard JobTier = "Standard" +) + +// PossibleJobTierValues returns the possible values for the JobTier const type. +func PossibleJobTierValues() []JobTier { + return []JobTier{ + JobTierBasic, + JobTierNull, + JobTierPremium, + JobTierSpot, + JobTierStandard, + } +} + // JobType - Enum to determine the type of job. type JobType string @@ -1176,6 +1843,7 @@ const ( JobTypeAutoML JobType = "AutoML" JobTypeCommand JobType = "Command" JobTypePipeline JobType = "Pipeline" + JobTypeSpark JobType = "Spark" JobTypeSweep JobType = "Sweep" ) @@ -1185,6 +1853,7 @@ func PossibleJobTypeValues() []JobType { JobTypeAutoML, JobTypeCommand, JobTypePipeline, + JobTypeSpark, JobTypeSweep, } } @@ -1288,6 +1957,22 @@ func PossibleLogVerbosityValues() []LogVerbosity { } } +// ManagedNetworkStatus - Status for the managed network of a machine learning workspace. +type ManagedNetworkStatus string + +const ( + ManagedNetworkStatusActive ManagedNetworkStatus = "Active" + ManagedNetworkStatusInactive ManagedNetworkStatus = "Inactive" +) + +// PossibleManagedNetworkStatusValues returns the possible values for the ManagedNetworkStatus const type. +func PossibleManagedNetworkStatusValues() []ManagedNetworkStatus { + return []ManagedNetworkStatus{ + ManagedNetworkStatusActive, + ManagedNetworkStatusInactive, + } +} + // ManagedServiceIdentityType - Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). type ManagedServiceIdentityType string @@ -1308,6 +1993,78 @@ func PossibleManagedServiceIdentityTypeValues() []ManagedServiceIdentityType { } } +type MarketplaceSubscriptionProvisioningState string + +const ( + MarketplaceSubscriptionProvisioningStateCanceled MarketplaceSubscriptionProvisioningState = "Canceled" + // MarketplaceSubscriptionProvisioningStateCreating - MarketplaceSubscription is being created. + MarketplaceSubscriptionProvisioningStateCreating MarketplaceSubscriptionProvisioningState = "Creating" + // MarketplaceSubscriptionProvisioningStateDeleting - MarketplaceSubscription is being deleted. + MarketplaceSubscriptionProvisioningStateDeleting MarketplaceSubscriptionProvisioningState = "Deleting" + // MarketplaceSubscriptionProvisioningStateFailed - MarketplaceSubscription provisioning failed. + MarketplaceSubscriptionProvisioningStateFailed MarketplaceSubscriptionProvisioningState = "Failed" + // MarketplaceSubscriptionProvisioningStateSucceeded - MarketplaceSubscription is successfully provisioned. + MarketplaceSubscriptionProvisioningStateSucceeded MarketplaceSubscriptionProvisioningState = "Succeeded" + // MarketplaceSubscriptionProvisioningStateUpdating - MarketplaceSubscription is being updated. + MarketplaceSubscriptionProvisioningStateUpdating MarketplaceSubscriptionProvisioningState = "Updating" +) + +// PossibleMarketplaceSubscriptionProvisioningStateValues returns the possible values for the MarketplaceSubscriptionProvisioningState const type. +func PossibleMarketplaceSubscriptionProvisioningStateValues() []MarketplaceSubscriptionProvisioningState { + return []MarketplaceSubscriptionProvisioningState{ + MarketplaceSubscriptionProvisioningStateCanceled, + MarketplaceSubscriptionProvisioningStateCreating, + MarketplaceSubscriptionProvisioningStateDeleting, + MarketplaceSubscriptionProvisioningStateFailed, + MarketplaceSubscriptionProvisioningStateSucceeded, + MarketplaceSubscriptionProvisioningStateUpdating, + } +} + +type MarketplaceSubscriptionStatus string + +const ( + // MarketplaceSubscriptionStatusSubscribed - The customer can now use the Marketplace Subscription's + // model and will be billed. + MarketplaceSubscriptionStatusSubscribed MarketplaceSubscriptionStatus = "Subscribed" + // MarketplaceSubscriptionStatusSuspended - The customer could not be billed for the Marketplace Subscription. + // The customer will not be able to access the model. + MarketplaceSubscriptionStatusSuspended MarketplaceSubscriptionStatus = "Suspended" + // MarketplaceSubscriptionStatusUnsubscribed - Marketplace Subscriptions reach this state in response to an explicit customer + // or CSP action. + // A Marketplace Subscription can also be canceled implicitly, as a result of nonpayment of dues, + // after being in the Suspended state for some time. + MarketplaceSubscriptionStatusUnsubscribed MarketplaceSubscriptionStatus = "Unsubscribed" +) + +// PossibleMarketplaceSubscriptionStatusValues returns the possible values for the MarketplaceSubscriptionStatus const type. +func PossibleMarketplaceSubscriptionStatusValues() []MarketplaceSubscriptionStatus { + return []MarketplaceSubscriptionStatus{ + MarketplaceSubscriptionStatusSubscribed, + MarketplaceSubscriptionStatusSuspended, + MarketplaceSubscriptionStatusUnsubscribed, + } +} + +type MaterializationStoreType string + +const ( + MaterializationStoreTypeNone MaterializationStoreType = "None" + MaterializationStoreTypeOffline MaterializationStoreType = "Offline" + MaterializationStoreTypeOnline MaterializationStoreType = "Online" + MaterializationStoreTypeOnlineAndOffline MaterializationStoreType = "OnlineAndOffline" +) + +// PossibleMaterializationStoreTypeValues returns the possible values for the MaterializationStoreType const type. +func PossibleMaterializationStoreTypeValues() []MaterializationStoreType { + return []MaterializationStoreType{ + MaterializationStoreTypeNone, + MaterializationStoreTypeOffline, + MaterializationStoreTypeOnline, + MaterializationStoreTypeOnlineAndOffline, + } +} + // ModelSize - Image model size. type ModelSize string @@ -1335,6 +2092,156 @@ func PossibleModelSizeValues() []ModelSize { } } +// ModelTaskType - Model task type enum. +type ModelTaskType string + +const ( + ModelTaskTypeClassification ModelTaskType = "Classification" + ModelTaskTypeRegression ModelTaskType = "Regression" +) + +// PossibleModelTaskTypeValues returns the possible values for the ModelTaskType const type. +func PossibleModelTaskTypeValues() []ModelTaskType { + return []ModelTaskType{ + ModelTaskTypeClassification, + ModelTaskTypeRegression, + } +} + +// MonitorComputeIdentityType - Monitor compute identity type enum. +type MonitorComputeIdentityType string + +const ( + // MonitorComputeIdentityTypeAmlToken - Authenticates through user's AML token. + MonitorComputeIdentityTypeAmlToken MonitorComputeIdentityType = "AmlToken" + // MonitorComputeIdentityTypeManagedIdentity - Authenticates through a user-provided managed identity. + MonitorComputeIdentityTypeManagedIdentity MonitorComputeIdentityType = "ManagedIdentity" +) + +// PossibleMonitorComputeIdentityTypeValues returns the possible values for the MonitorComputeIdentityType const type. +func PossibleMonitorComputeIdentityTypeValues() []MonitorComputeIdentityType { + return []MonitorComputeIdentityType{ + MonitorComputeIdentityTypeAmlToken, + MonitorComputeIdentityTypeManagedIdentity, + } +} + +// MonitorComputeType - Monitor compute type enum. +type MonitorComputeType string + +const ( + // MonitorComputeTypeServerlessSpark - Serverless Spark compute. + MonitorComputeTypeServerlessSpark MonitorComputeType = "ServerlessSpark" +) + +// PossibleMonitorComputeTypeValues returns the possible values for the MonitorComputeType const type. +func PossibleMonitorComputeTypeValues() []MonitorComputeType { + return []MonitorComputeType{ + MonitorComputeTypeServerlessSpark, + } +} + +type MonitoringFeatureDataType string + +const ( + // MonitoringFeatureDataTypeCategorical - Used for features of categorical data type. + MonitoringFeatureDataTypeCategorical MonitoringFeatureDataType = "Categorical" + // MonitoringFeatureDataTypeNumerical - Used for features of numerical data type. + MonitoringFeatureDataTypeNumerical MonitoringFeatureDataType = "Numerical" +) + +// PossibleMonitoringFeatureDataTypeValues returns the possible values for the MonitoringFeatureDataType const type. +func PossibleMonitoringFeatureDataTypeValues() []MonitoringFeatureDataType { + return []MonitoringFeatureDataType{ + MonitoringFeatureDataTypeCategorical, + MonitoringFeatureDataTypeNumerical, + } +} + +type MonitoringFeatureFilterType string + +const ( + // MonitoringFeatureFilterTypeAllFeatures - Includes all features. + MonitoringFeatureFilterTypeAllFeatures MonitoringFeatureFilterType = "AllFeatures" + // MonitoringFeatureFilterTypeFeatureSubset - Includes a user-defined subset of features. + MonitoringFeatureFilterTypeFeatureSubset MonitoringFeatureFilterType = "FeatureSubset" + // MonitoringFeatureFilterTypeTopNByAttribution - Only includes the top contributing features, measured by feature attribution. + MonitoringFeatureFilterTypeTopNByAttribution MonitoringFeatureFilterType = "TopNByAttribution" +) + +// PossibleMonitoringFeatureFilterTypeValues returns the possible values for the MonitoringFeatureFilterType const type. +func PossibleMonitoringFeatureFilterTypeValues() []MonitoringFeatureFilterType { + return []MonitoringFeatureFilterType{ + MonitoringFeatureFilterTypeAllFeatures, + MonitoringFeatureFilterTypeFeatureSubset, + MonitoringFeatureFilterTypeTopNByAttribution, + } +} + +// MonitoringInputDataType - Monitoring input data type enum. +type MonitoringInputDataType string + +const ( + // MonitoringInputDataTypeFixed - An input data with tabular format which doesn't require preprocessing. + MonitoringInputDataTypeFixed MonitoringInputDataType = "Fixed" + // MonitoringInputDataTypeRolling - An input data which rolls relatively to the monitor's current run time. + MonitoringInputDataTypeRolling MonitoringInputDataType = "Rolling" + // MonitoringInputDataTypeStatic - An input data with a fixed window size. + MonitoringInputDataTypeStatic MonitoringInputDataType = "Static" +) + +// PossibleMonitoringInputDataTypeValues returns the possible values for the MonitoringInputDataType const type. +func PossibleMonitoringInputDataTypeValues() []MonitoringInputDataType { + return []MonitoringInputDataType{ + MonitoringInputDataTypeFixed, + MonitoringInputDataTypeRolling, + MonitoringInputDataTypeStatic, + } +} + +type MonitoringNotificationType string + +const ( + // MonitoringNotificationTypeAmlNotification - Enables email notifications through AML notifications. + MonitoringNotificationTypeAmlNotification MonitoringNotificationType = "AmlNotification" +) + +// PossibleMonitoringNotificationTypeValues returns the possible values for the MonitoringNotificationType const type. +func PossibleMonitoringNotificationTypeValues() []MonitoringNotificationType { + return []MonitoringNotificationType{ + MonitoringNotificationTypeAmlNotification, + } +} + +type MonitoringSignalType string + +const ( + // MonitoringSignalTypeCustom - Tracks a custom signal provided by users. + MonitoringSignalTypeCustom MonitoringSignalType = "Custom" + // MonitoringSignalTypeDataDrift - Tracks model input data distribution change, comparing against training data or past production + // data. + MonitoringSignalTypeDataDrift MonitoringSignalType = "DataDrift" + // MonitoringSignalTypeDataQuality - Tracks model input data integrity. + MonitoringSignalTypeDataQuality MonitoringSignalType = "DataQuality" + // MonitoringSignalTypeFeatureAttributionDrift - Tracks feature importance change in production, comparing against feature + // importance at training time. + MonitoringSignalTypeFeatureAttributionDrift MonitoringSignalType = "FeatureAttributionDrift" + // MonitoringSignalTypePredictionDrift - Tracks prediction result data distribution change, comparing against validation/test + // label data or past production data. + MonitoringSignalTypePredictionDrift MonitoringSignalType = "PredictionDrift" +) + +// PossibleMonitoringSignalTypeValues returns the possible values for the MonitoringSignalType const type. +func PossibleMonitoringSignalTypeValues() []MonitoringSignalType { + return []MonitoringSignalType{ + MonitoringSignalTypeCustom, + MonitoringSignalTypeDataDrift, + MonitoringSignalTypeDataQuality, + MonitoringSignalTypeFeatureAttributionDrift, + MonitoringSignalTypePredictionDrift, + } +} + // MountAction - Mount Action. type MountAction string @@ -1434,6 +2341,87 @@ func PossibleNodeStateValues() []NodeState { } } +// NodesValueType - The enumerated types for the nodes value +type NodesValueType string + +const ( + NodesValueTypeAll NodesValueType = "All" +) + +// PossibleNodesValueTypeValues returns the possible values for the NodesValueType const type. +func PossibleNodesValueTypeValues() []NodesValueType { + return []NodesValueType{ + NodesValueTypeAll, + } +} + +type NumericalDataDriftMetric string + +const ( + // NumericalDataDriftMetricJensenShannonDistance - The Jensen Shannon Distance (JSD) metric. + NumericalDataDriftMetricJensenShannonDistance NumericalDataDriftMetric = "JensenShannonDistance" + // NumericalDataDriftMetricNormalizedWassersteinDistance - The Normalized Wasserstein Distance metric. + NumericalDataDriftMetricNormalizedWassersteinDistance NumericalDataDriftMetric = "NormalizedWassersteinDistance" + // NumericalDataDriftMetricPopulationStabilityIndex - The Population Stability Index (PSI) metric. + NumericalDataDriftMetricPopulationStabilityIndex NumericalDataDriftMetric = "PopulationStabilityIndex" + // NumericalDataDriftMetricTwoSampleKolmogorovSmirnovTest - The Two Sample Kolmogorov-Smirnov Test (two-sample K–S) metric. + NumericalDataDriftMetricTwoSampleKolmogorovSmirnovTest NumericalDataDriftMetric = "TwoSampleKolmogorovSmirnovTest" +) + +// PossibleNumericalDataDriftMetricValues returns the possible values for the NumericalDataDriftMetric const type. +func PossibleNumericalDataDriftMetricValues() []NumericalDataDriftMetric { + return []NumericalDataDriftMetric{ + NumericalDataDriftMetricJensenShannonDistance, + NumericalDataDriftMetricNormalizedWassersteinDistance, + NumericalDataDriftMetricPopulationStabilityIndex, + NumericalDataDriftMetricTwoSampleKolmogorovSmirnovTest, + } +} + +type NumericalDataQualityMetric string + +const ( + // NumericalDataQualityMetricDataTypeErrorRate - Calculates the rate of data type errors. + NumericalDataQualityMetricDataTypeErrorRate NumericalDataQualityMetric = "DataTypeErrorRate" + // NumericalDataQualityMetricNullValueRate - Calculates the rate of null values. + NumericalDataQualityMetricNullValueRate NumericalDataQualityMetric = "NullValueRate" + // NumericalDataQualityMetricOutOfBoundsRate - Calculates the rate values are out of bounds. + NumericalDataQualityMetricOutOfBoundsRate NumericalDataQualityMetric = "OutOfBoundsRate" +) + +// PossibleNumericalDataQualityMetricValues returns the possible values for the NumericalDataQualityMetric const type. +func PossibleNumericalDataQualityMetricValues() []NumericalDataQualityMetric { + return []NumericalDataQualityMetric{ + NumericalDataQualityMetricDataTypeErrorRate, + NumericalDataQualityMetricNullValueRate, + NumericalDataQualityMetricOutOfBoundsRate, + } +} + +type NumericalPredictionDriftMetric string + +const ( + // NumericalPredictionDriftMetricJensenShannonDistance - The Jensen Shannon Distance (JSD) metric. + NumericalPredictionDriftMetricJensenShannonDistance NumericalPredictionDriftMetric = "JensenShannonDistance" + // NumericalPredictionDriftMetricNormalizedWassersteinDistance - The Normalized Wasserstein Distance metric. + NumericalPredictionDriftMetricNormalizedWassersteinDistance NumericalPredictionDriftMetric = "NormalizedWassersteinDistance" + // NumericalPredictionDriftMetricPopulationStabilityIndex - The Population Stability Index (PSI) metric. + NumericalPredictionDriftMetricPopulationStabilityIndex NumericalPredictionDriftMetric = "PopulationStabilityIndex" + // NumericalPredictionDriftMetricTwoSampleKolmogorovSmirnovTest - The Two Sample Kolmogorov-Smirnov Test (two-sample K–S) + // metric. + NumericalPredictionDriftMetricTwoSampleKolmogorovSmirnovTest NumericalPredictionDriftMetric = "TwoSampleKolmogorovSmirnovTest" +) + +// PossibleNumericalPredictionDriftMetricValues returns the possible values for the NumericalPredictionDriftMetric const type. +func PossibleNumericalPredictionDriftMetricValues() []NumericalPredictionDriftMetric { + return []NumericalPredictionDriftMetric{ + NumericalPredictionDriftMetricJensenShannonDistance, + NumericalPredictionDriftMetricNormalizedWassersteinDistance, + NumericalPredictionDriftMetricPopulationStabilityIndex, + NumericalPredictionDriftMetricTwoSampleKolmogorovSmirnovTest, + } +} + // ObjectDetectionPrimaryMetrics - Primary metrics for Image ObjectDetection task. type ObjectDetectionPrimaryMetrics string @@ -1450,6 +2438,20 @@ func PossibleObjectDetectionPrimaryMetricsValues() []ObjectDetectionPrimaryMetri } } +// OneLakeArtifactType - Enum to determine OneLake artifact type. +type OneLakeArtifactType string + +const ( + OneLakeArtifactTypeLakeHouse OneLakeArtifactType = "LakeHouse" +) + +// PossibleOneLakeArtifactTypeValues returns the possible values for the OneLakeArtifactType const type. +func PossibleOneLakeArtifactTypeValues() []OneLakeArtifactType { + return []OneLakeArtifactType{ + OneLakeArtifactTypeLakeHouse, + } +} + // OperatingSystemType - The type of operating system. type OperatingSystemType string @@ -1555,6 +2557,25 @@ func PossibleOrderStringValues() []OrderString { } } +// Origin - The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default +// value is "user,system" +type Origin string + +const ( + OriginSystem Origin = "system" + OriginUser Origin = "user" + OriginUserSystem Origin = "user,system" +) + +// PossibleOriginValues returns the possible values for the Origin const type. +func PossibleOriginValues() []Origin { + return []Origin{ + OriginSystem, + OriginUser, + OriginUserSystem, + } +} + // OsType - Compute OS Type type OsType string @@ -1575,6 +2596,7 @@ func PossibleOsTypeValues() []OsType { type OutputDeliveryMode string const ( + OutputDeliveryModeDirect OutputDeliveryMode = "Direct" OutputDeliveryModeReadWriteMount OutputDeliveryMode = "ReadWriteMount" OutputDeliveryModeUpload OutputDeliveryMode = "Upload" ) @@ -1582,11 +2604,42 @@ const ( // PossibleOutputDeliveryModeValues returns the possible values for the OutputDeliveryMode const type. func PossibleOutputDeliveryModeValues() []OutputDeliveryMode { return []OutputDeliveryMode{ + OutputDeliveryModeDirect, OutputDeliveryModeReadWriteMount, OutputDeliveryModeUpload, } } +// PendingUploadCredentialType - Enum to determine the PendingUpload credentials type. +type PendingUploadCredentialType string + +const ( + PendingUploadCredentialTypeSAS PendingUploadCredentialType = "SAS" +) + +// PossiblePendingUploadCredentialTypeValues returns the possible values for the PendingUploadCredentialType const type. +func PossiblePendingUploadCredentialTypeValues() []PendingUploadCredentialType { + return []PendingUploadCredentialType{ + PendingUploadCredentialTypeSAS, + } +} + +// PendingUploadType - Type of storage to use for the pending upload location +type PendingUploadType string + +const ( + PendingUploadTypeNone PendingUploadType = "None" + PendingUploadTypeTemporaryBlobReference PendingUploadType = "TemporaryBlobReference" +) + +// PossiblePendingUploadTypeValues returns the possible values for the PendingUploadType const type. +func PossiblePendingUploadTypeValues() []PendingUploadType { + return []PendingUploadType{ + PendingUploadTypeNone, + PendingUploadTypeTemporaryBlobReference, + } +} + // PrivateEndpointConnectionProvisioningState - The current provisioning state. type PrivateEndpointConnectionProvisioningState string @@ -1629,6 +2682,24 @@ func PossiblePrivateEndpointServiceConnectionStatusValues() []PrivateEndpointSer } } +// Protocol - Protocol over which communication will happen over this endpoint +type Protocol string + +const ( + ProtocolHTTP Protocol = "http" + ProtocolTCP Protocol = "tcp" + ProtocolUDP Protocol = "udp" +) + +// PossibleProtocolValues returns the possible values for the Protocol const type. +func PossibleProtocolValues() []Protocol { + return []Protocol{ + ProtocolHTTP, + ProtocolTCP, + ProtocolUDP, + } +} + // ProvisioningState - The current deployment state of workspace resource. The provisioningState is to indicate states for // resource provisioning. type ProvisioningState string @@ -1887,6 +2958,97 @@ func PossibleRemoteLoginPortPublicAccessValues() []RemoteLoginPortPublicAccess { } } +type RollingRateType string + +const ( + RollingRateTypeDay RollingRateType = "Day" + RollingRateTypeHour RollingRateType = "Hour" + RollingRateTypeMinute RollingRateType = "Minute" + RollingRateTypeMonth RollingRateType = "Month" + RollingRateTypeYear RollingRateType = "Year" +) + +// PossibleRollingRateTypeValues returns the possible values for the RollingRateType const type. +func PossibleRollingRateTypeValues() []RollingRateType { + return []RollingRateType{ + RollingRateTypeDay, + RollingRateTypeHour, + RollingRateTypeMinute, + RollingRateTypeMonth, + RollingRateTypeYear, + } +} + +// RuleAction - The action enum for networking rule. +type RuleAction string + +const ( + RuleActionAllow RuleAction = "Allow" + RuleActionDeny RuleAction = "Deny" +) + +// PossibleRuleActionValues returns the possible values for the RuleAction const type. +func PossibleRuleActionValues() []RuleAction { + return []RuleAction{ + RuleActionAllow, + RuleActionDeny, + } +} + +// RuleCategory - Category of a managed network Outbound Rule of a machine learning workspace. +type RuleCategory string + +const ( + RuleCategoryDependency RuleCategory = "Dependency" + RuleCategoryRecommended RuleCategory = "Recommended" + RuleCategoryRequired RuleCategory = "Required" + RuleCategoryUserDefined RuleCategory = "UserDefined" +) + +// PossibleRuleCategoryValues returns the possible values for the RuleCategory const type. +func PossibleRuleCategoryValues() []RuleCategory { + return []RuleCategory{ + RuleCategoryDependency, + RuleCategoryRecommended, + RuleCategoryRequired, + RuleCategoryUserDefined, + } +} + +// RuleStatus - Type of a managed network Outbound Rule of a machine learning workspace. +type RuleStatus string + +const ( + RuleStatusActive RuleStatus = "Active" + RuleStatusInactive RuleStatus = "Inactive" +) + +// PossibleRuleStatusValues returns the possible values for the RuleStatus const type. +func PossibleRuleStatusValues() []RuleStatus { + return []RuleStatus{ + RuleStatusActive, + RuleStatusInactive, + } +} + +// RuleType - Type of a managed network Outbound Rule of a machine learning workspace. +type RuleType string + +const ( + RuleTypeFQDN RuleType = "FQDN" + RuleTypePrivateEndpoint RuleType = "PrivateEndpoint" + RuleTypeServiceTag RuleType = "ServiceTag" +) + +// PossibleRuleTypeValues returns the possible values for the RuleType const type. +func PossibleRuleTypeValues() []RuleType { + return []RuleType{ + RuleTypeFQDN, + RuleTypePrivateEndpoint, + RuleTypeServiceTag, + } +} + // SKUScaleType - Node scaling setting for the compute sku. type SKUScaleType string @@ -2001,6 +3163,7 @@ type ScheduleActionType string const ( ScheduleActionTypeCreateJob ScheduleActionType = "CreateJob" + ScheduleActionTypeCreateMonitor ScheduleActionType = "CreateMonitor" ScheduleActionTypeInvokeBatchEndpoint ScheduleActionType = "InvokeBatchEndpoint" ) @@ -2008,6 +3171,7 @@ const ( func PossibleScheduleActionTypeValues() []ScheduleActionType { return []ScheduleActionType{ ScheduleActionTypeCreateJob, + ScheduleActionTypeCreateMonitor, ScheduleActionTypeInvokeBatchEndpoint, } } @@ -2124,6 +3288,49 @@ func PossibleSecretsTypeValues() []SecretsType { } } +// ServerlessEndpointState - State of the Serverless Endpoint. +type ServerlessEndpointState string + +const ( + ServerlessEndpointStateCreating ServerlessEndpointState = "Creating" + ServerlessEndpointStateCreationFailed ServerlessEndpointState = "CreationFailed" + ServerlessEndpointStateDeleting ServerlessEndpointState = "Deleting" + ServerlessEndpointStateDeletionFailed ServerlessEndpointState = "DeletionFailed" + ServerlessEndpointStateOnline ServerlessEndpointState = "Online" + ServerlessEndpointStateReinstating ServerlessEndpointState = "Reinstating" + ServerlessEndpointStateSuspended ServerlessEndpointState = "Suspended" + ServerlessEndpointStateSuspending ServerlessEndpointState = "Suspending" + ServerlessEndpointStateUnknown ServerlessEndpointState = "Unknown" +) + +// PossibleServerlessEndpointStateValues returns the possible values for the ServerlessEndpointState const type. +func PossibleServerlessEndpointStateValues() []ServerlessEndpointState { + return []ServerlessEndpointState{ + ServerlessEndpointStateCreating, + ServerlessEndpointStateCreationFailed, + ServerlessEndpointStateDeleting, + ServerlessEndpointStateDeletionFailed, + ServerlessEndpointStateOnline, + ServerlessEndpointStateReinstating, + ServerlessEndpointStateSuspended, + ServerlessEndpointStateSuspending, + ServerlessEndpointStateUnknown, + } +} + +type ServerlessInferenceEndpointAuthMode string + +const ( + ServerlessInferenceEndpointAuthModeKey ServerlessInferenceEndpointAuthMode = "Key" +) + +// PossibleServerlessInferenceEndpointAuthModeValues returns the possible values for the ServerlessInferenceEndpointAuthMode const type. +func PossibleServerlessInferenceEndpointAuthModeValues() []ServerlessInferenceEndpointAuthMode { + return []ServerlessInferenceEndpointAuthMode{ + ServerlessInferenceEndpointAuthModeKey, + } +} + type ServiceDataAccessAuthIdentity string const ( @@ -2189,6 +3396,21 @@ func PossibleSourceTypeValues() []SourceType { } } +type SparkJobEntryType string + +const ( + SparkJobEntryTypeSparkJobPythonEntry SparkJobEntryType = "SparkJobPythonEntry" + SparkJobEntryTypeSparkJobScalaEntry SparkJobEntryType = "SparkJobScalaEntry" +) + +// PossibleSparkJobEntryTypeValues returns the possible values for the SparkJobEntryType const type. +func PossibleSparkJobEntryTypeValues() []SparkJobEntryType { + return []SparkJobEntryType{ + SparkJobEntryTypeSparkJobPythonEntry, + SparkJobEntryTypeSparkJobScalaEntry, + } +} + // StackMetaLearnerType - The meta-learner is a model trained on the output of the individual heterogeneous models. Default // meta-learners are LogisticRegression for classification tasks (or LogisticRegressionCV if // cross-validation is enabled) and ElasticNet for regression/forecasting tasks (or ElasticNetCV if cross-validation is enabled). @@ -2578,6 +3800,40 @@ func PossibleValueFormatValues() []ValueFormat { } } +// VolumeDefinitionType - Type of Volume Definition. Possible Values: bind,volume,tmpfs,npipe +type VolumeDefinitionType string + +const ( + VolumeDefinitionTypeBind VolumeDefinitionType = "bind" + VolumeDefinitionTypeNpipe VolumeDefinitionType = "npipe" + VolumeDefinitionTypeTmpfs VolumeDefinitionType = "tmpfs" + VolumeDefinitionTypeVolume VolumeDefinitionType = "volume" +) + +// PossibleVolumeDefinitionTypeValues returns the possible values for the VolumeDefinitionType const type. +func PossibleVolumeDefinitionTypeValues() []VolumeDefinitionType { + return []VolumeDefinitionType{ + VolumeDefinitionTypeBind, + VolumeDefinitionTypeNpipe, + VolumeDefinitionTypeTmpfs, + VolumeDefinitionTypeVolume, + } +} + +// WebhookType - Enum to determine the webhook callback service type. +type WebhookType string + +const ( + WebhookTypeAzureDevOps WebhookType = "AzureDevOps" +) + +// PossibleWebhookTypeValues returns the possible values for the WebhookType const type. +func PossibleWebhookTypeValues() []WebhookType { + return []WebhookType{ + WebhookTypeAzureDevOps, + } +} + // WeekDay - Enum of weekday type WeekDay string diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/datacontainers_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/datacontainers_client.go similarity index 97% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/datacontainers_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/datacontainers_client.go index c3defc8f0..515a1533d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/datacontainers_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/datacontainers_client.go @@ -46,7 +46,7 @@ func NewDataContainersClient(subscriptionID string, credential azcore.TokenCrede // CreateOrUpdate - Create or update container. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Container name. @@ -99,7 +99,7 @@ func (client *DataContainersClient) createOrUpdateCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -120,7 +120,7 @@ func (client *DataContainersClient) createOrUpdateHandleResponse(resp *http.Resp // Delete - Delete container. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Container name. @@ -170,7 +170,7 @@ func (client *DataContainersClient) deleteCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -179,7 +179,7 @@ func (client *DataContainersClient) deleteCreateRequest(ctx context.Context, res // Get - Get container. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Container name. @@ -230,7 +230,7 @@ func (client *DataContainersClient) getCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -247,7 +247,7 @@ func (client *DataContainersClient) getHandleResponse(resp *http.Response) (Data // NewListPager - List data containers. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - options - DataContainersClientListOptions contains the optional parameters for the DataContainersClient.NewListPager method. @@ -294,10 +294,10 @@ func (client *DataContainersClient) listCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") if options != nil && options.Skip != nil { reqQP.Set("$skip", *options.Skip) } + reqQP.Set("api-version", "2024-04-01") if options != nil && options.ListViewType != nil { reqQP.Set("listViewType", string(*options.ListViewType)) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/datastores_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/datastores_client.go similarity index 97% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/datastores_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/datastores_client.go index be785df97..5a896dffd 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/datastores_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/datastores_client.go @@ -47,7 +47,7 @@ func NewDatastoresClient(subscriptionID string, credential azcore.TokenCredentia // CreateOrUpdate - Create or update datastore. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Datastore name. @@ -100,7 +100,7 @@ func (client *DatastoresClient) createOrUpdateCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") if options != nil && options.SkipValidation != nil { reqQP.Set("skipValidation", strconv.FormatBool(*options.SkipValidation)) } @@ -124,7 +124,7 @@ func (client *DatastoresClient) createOrUpdateHandleResponse(resp *http.Response // Delete - Delete datastore. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Datastore name. @@ -174,7 +174,7 @@ func (client *DatastoresClient) deleteCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -183,7 +183,7 @@ func (client *DatastoresClient) deleteCreateRequest(ctx context.Context, resourc // Get - Get datastore. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Datastore name. @@ -234,7 +234,7 @@ func (client *DatastoresClient) getCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -251,7 +251,7 @@ func (client *DatastoresClient) getHandleResponse(resp *http.Response) (Datastor // NewListPager - List datastores. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - options - DatastoresClientListOptions contains the optional parameters for the DatastoresClient.NewListPager method. @@ -298,10 +298,10 @@ func (client *DatastoresClient) listCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") if options != nil && options.Skip != nil { reqQP.Set("$skip", *options.Skip) } + reqQP.Set("api-version", "2024-04-01") if options != nil && options.Count != nil { reqQP.Set("count", strconv.FormatInt(int64(*options.Count), 10)) } @@ -311,15 +311,15 @@ func (client *DatastoresClient) listCreateRequest(ctx context.Context, resourceG if options != nil && options.Names != nil { reqQP.Set("names", strings.Join(options.Names, ",")) } - if options != nil && options.SearchText != nil { - reqQP.Set("searchText", *options.SearchText) - } if options != nil && options.OrderBy != nil { reqQP.Set("orderBy", *options.OrderBy) } if options != nil && options.OrderByAsc != nil { reqQP.Set("orderByAsc", strconv.FormatBool(*options.OrderByAsc)) } + if options != nil && options.SearchText != nil { + reqQP.Set("searchText", *options.SearchText) + } req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -337,7 +337,7 @@ func (client *DatastoresClient) listHandleResponse(resp *http.Response) (Datasto // ListSecrets - Get datastore secrets. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Datastore name. @@ -388,7 +388,7 @@ func (client *DatastoresClient) listSecretsCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/dataversions_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/dataversions_client.go similarity index 76% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/dataversions_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/dataversions_client.go index beb79038f..3f62c6cfd 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/dataversions_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/dataversions_client.go @@ -47,7 +47,7 @@ func NewDataVersionsClient(subscriptionID string, credential azcore.TokenCredent // CreateOrUpdate - Create or update version. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Container name. @@ -105,7 +105,7 @@ func (client *DataVersionsClient) createOrUpdateCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -126,7 +126,7 @@ func (client *DataVersionsClient) createOrUpdateHandleResponse(resp *http.Respon // Delete - Delete version. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Container name. @@ -181,7 +181,7 @@ func (client *DataVersionsClient) deleteCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -190,7 +190,7 @@ func (client *DataVersionsClient) deleteCreateRequest(ctx context.Context, resou // Get - Get version. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Container name. @@ -246,7 +246,7 @@ func (client *DataVersionsClient) getCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -263,7 +263,7 @@ func (client *DataVersionsClient) getHandleResponse(resp *http.Response) (DataVe // NewListPager - List data versions in the data container // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Data container's name @@ -315,19 +315,19 @@ func (client *DataVersionsClient) listCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") if options != nil && options.OrderBy != nil { reqQP.Set("$orderBy", *options.OrderBy) } - if options != nil && options.Top != nil { - reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) - } if options != nil && options.Skip != nil { reqQP.Set("$skip", *options.Skip) } if options != nil && options.Tags != nil { reqQP.Set("$tags", *options.Tags) } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-04-01") if options != nil && options.ListViewType != nil { reqQP.Set("listViewType", string(*options.ListViewType)) } @@ -344,3 +344,94 @@ func (client *DataVersionsClient) listHandleResponse(resp *http.Response) (DataV } return result, nil } + +// BeginPublish - Publish version asset into registry. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - Name of Azure Machine Learning workspace. +// - name - Container name. +// - version - Version identifier. +// - body - Destination registry info +// - options - DataVersionsClientBeginPublishOptions contains the optional parameters for the DataVersionsClient.BeginPublish +// method. +func (client *DataVersionsClient) BeginPublish(ctx context.Context, resourceGroupName string, workspaceName string, name string, version string, body DestinationAsset, options *DataVersionsClientBeginPublishOptions) (*runtime.Poller[DataVersionsClientPublishResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.publish(ctx, resourceGroupName, workspaceName, name, version, body, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DataVersionsClientPublishResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DataVersionsClientPublishResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Publish - Publish version asset into registry. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *DataVersionsClient) publish(ctx context.Context, resourceGroupName string, workspaceName string, name string, version string, body DestinationAsset, options *DataVersionsClientBeginPublishOptions) (*http.Response, error) { + var err error + const operationName = "DataVersionsClient.BeginPublish" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.publishCreateRequest(ctx, resourceGroupName, workspaceName, name, version, body, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// publishCreateRequest creates the Publish request. +func (client *DataVersionsClient) publishCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, name string, version string, body DestinationAsset, options *DataVersionsClientBeginPublishOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version}/publish" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if workspaceName == "" { + return nil, errors.New("parameter workspaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceName}", url.PathEscape(workspaceName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if version == "" { + return nil, errors.New("parameter version cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{version}", url.PathEscape(version)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, body); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/environmentcontainers_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/environmentcontainers_client.go similarity index 97% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/environmentcontainers_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/environmentcontainers_client.go index fe9b6533e..426569849 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/environmentcontainers_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/environmentcontainers_client.go @@ -46,7 +46,7 @@ func NewEnvironmentContainersClient(subscriptionID string, credential azcore.Tok // CreateOrUpdate - Create or update container. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Container name. This is case-sensitive. @@ -99,7 +99,7 @@ func (client *EnvironmentContainersClient) createOrUpdateCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -120,7 +120,7 @@ func (client *EnvironmentContainersClient) createOrUpdateHandleResponse(resp *ht // Delete - Delete container. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Container name. This is case-sensitive. @@ -171,7 +171,7 @@ func (client *EnvironmentContainersClient) deleteCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -180,7 +180,7 @@ func (client *EnvironmentContainersClient) deleteCreateRequest(ctx context.Conte // Get - Get container. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Container name. This is case-sensitive. @@ -232,7 +232,7 @@ func (client *EnvironmentContainersClient) getCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -249,7 +249,7 @@ func (client *EnvironmentContainersClient) getHandleResponse(resp *http.Response // NewListPager - List environment containers. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - options - EnvironmentContainersClientListOptions contains the optional parameters for the EnvironmentContainersClient.NewListPager @@ -297,10 +297,10 @@ func (client *EnvironmentContainersClient) listCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") if options != nil && options.Skip != nil { reqQP.Set("$skip", *options.Skip) } + reqQP.Set("api-version", "2024-04-01") if options != nil && options.ListViewType != nil { reqQP.Set("listViewType", string(*options.ListViewType)) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/environmentversions_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/environmentversions_client.go similarity index 77% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/environmentversions_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/environmentversions_client.go index 1b6d775fb..05e1ad72c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/environmentversions_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/environmentversions_client.go @@ -47,7 +47,7 @@ func NewEnvironmentVersionsClient(subscriptionID string, credential azcore.Token // CreateOrUpdate - Creates or updates an EnvironmentVersion. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Name of EnvironmentVersion. This is case-sensitive. @@ -105,7 +105,7 @@ func (client *EnvironmentVersionsClient) createOrUpdateCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -126,7 +126,7 @@ func (client *EnvironmentVersionsClient) createOrUpdateHandleResponse(resp *http // Delete - Delete version. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Container name. This is case-sensitive. @@ -182,7 +182,7 @@ func (client *EnvironmentVersionsClient) deleteCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -191,7 +191,7 @@ func (client *EnvironmentVersionsClient) deleteCreateRequest(ctx context.Context // Get - Get version. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Container name. This is case-sensitive. @@ -247,7 +247,7 @@ func (client *EnvironmentVersionsClient) getCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -264,7 +264,7 @@ func (client *EnvironmentVersionsClient) getHandleResponse(resp *http.Response) // NewListPager - List versions. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Container name. This is case-sensitive. @@ -317,16 +317,16 @@ func (client *EnvironmentVersionsClient) listCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") if options != nil && options.OrderBy != nil { reqQP.Set("$orderBy", *options.OrderBy) } - if options != nil && options.Top != nil { - reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) - } if options != nil && options.Skip != nil { reqQP.Set("$skip", *options.Skip) } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-04-01") if options != nil && options.ListViewType != nil { reqQP.Set("listViewType", string(*options.ListViewType)) } @@ -343,3 +343,94 @@ func (client *EnvironmentVersionsClient) listHandleResponse(resp *http.Response) } return result, nil } + +// BeginPublish - Publish version asset into registry. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - Name of Azure Machine Learning workspace. +// - name - Container name. +// - version - Version identifier. +// - body - Destination registry info +// - options - EnvironmentVersionsClientBeginPublishOptions contains the optional parameters for the EnvironmentVersionsClient.BeginPublish +// method. +func (client *EnvironmentVersionsClient) BeginPublish(ctx context.Context, resourceGroupName string, workspaceName string, name string, version string, body DestinationAsset, options *EnvironmentVersionsClientBeginPublishOptions) (*runtime.Poller[EnvironmentVersionsClientPublishResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.publish(ctx, resourceGroupName, workspaceName, name, version, body, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[EnvironmentVersionsClientPublishResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[EnvironmentVersionsClientPublishResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Publish - Publish version asset into registry. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *EnvironmentVersionsClient) publish(ctx context.Context, resourceGroupName string, workspaceName string, name string, version string, body DestinationAsset, options *EnvironmentVersionsClientBeginPublishOptions) (*http.Response, error) { + var err error + const operationName = "EnvironmentVersionsClient.BeginPublish" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.publishCreateRequest(ctx, resourceGroupName, workspaceName, name, version, body, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// publishCreateRequest creates the Publish request. +func (client *EnvironmentVersionsClient) publishCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, name string, version string, body DestinationAsset, options *EnvironmentVersionsClientBeginPublishOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions/{version}/publish" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if workspaceName == "" { + return nil, errors.New("parameter workspaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceName}", url.PathEscape(workspaceName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if version == "" { + return nil, errors.New("parameter version cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{version}", url.PathEscape(version)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, body); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/features_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/features_client.go new file mode 100644 index 000000000..77c41418a --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/features_client.go @@ -0,0 +1,216 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armmachinelearning + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// FeaturesClient contains the methods for the Features group. +// Don't use this type directly, use NewFeaturesClient() instead. +type FeaturesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewFeaturesClient creates a new instance of FeaturesClient with the specified values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewFeaturesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*FeaturesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &FeaturesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Get feature. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - Name of Azure Machine Learning workspace. +// - featuresetName - Feature set name. This is case-sensitive. +// - featuresetVersion - Feature set version identifier. This is case-sensitive. +// - featureName - Feature Name. This is case-sensitive. +// - options - FeaturesClientGetOptions contains the optional parameters for the FeaturesClient.Get method. +func (client *FeaturesClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, featuresetName string, featuresetVersion string, featureName string, options *FeaturesClientGetOptions) (FeaturesClientGetResponse, error) { + var err error + const operationName = "FeaturesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, workspaceName, featuresetName, featuresetVersion, featureName, options) + if err != nil { + return FeaturesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return FeaturesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return FeaturesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *FeaturesClient) getCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, featuresetName string, featuresetVersion string, featureName string, options *FeaturesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{featuresetName}/versions/{featuresetVersion}/features/{featureName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if workspaceName == "" { + return nil, errors.New("parameter workspaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceName}", url.PathEscape(workspaceName)) + if featuresetName == "" { + return nil, errors.New("parameter featuresetName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{featuresetName}", url.PathEscape(featuresetName)) + if featuresetVersion == "" { + return nil, errors.New("parameter featuresetVersion cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{featuresetVersion}", url.PathEscape(featuresetVersion)) + if featureName == "" { + return nil, errors.New("parameter featureName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{featureName}", url.PathEscape(featureName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *FeaturesClient) getHandleResponse(resp *http.Response) (FeaturesClientGetResponse, error) { + result := FeaturesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Feature); err != nil { + return FeaturesClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - List Features. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - Name of Azure Machine Learning workspace. +// - featuresetName - Featureset name. This is case-sensitive. +// - featuresetVersion - Featureset Version identifier. This is case-sensitive. +// - options - FeaturesClientListOptions contains the optional parameters for the FeaturesClient.NewListPager method. +func (client *FeaturesClient) NewListPager(resourceGroupName string, workspaceName string, featuresetName string, featuresetVersion string, options *FeaturesClientListOptions) *runtime.Pager[FeaturesClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[FeaturesClientListResponse]{ + More: func(page FeaturesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *FeaturesClientListResponse) (FeaturesClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "FeaturesClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, workspaceName, featuresetName, featuresetVersion, options) + }, nil) + if err != nil { + return FeaturesClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *FeaturesClient) listCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, featuresetName string, featuresetVersion string, options *FeaturesClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{featuresetName}/versions/{featuresetVersion}/features" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if workspaceName == "" { + return nil, errors.New("parameter workspaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceName}", url.PathEscape(workspaceName)) + if featuresetName == "" { + return nil, errors.New("parameter featuresetName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{featuresetName}", url.PathEscape(featuresetName)) + if featuresetVersion == "" { + return nil, errors.New("parameter featuresetVersion cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{featuresetVersion}", url.PathEscape(featuresetVersion)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Skip != nil { + reqQP.Set("$skip", *options.Skip) + } + reqQP.Set("api-version", "2024-04-01") + if options != nil && options.Description != nil { + reqQP.Set("description", *options.Description) + } + if options != nil && options.FeatureName != nil { + reqQP.Set("featureName", *options.FeatureName) + } + if options != nil && options.ListViewType != nil { + reqQP.Set("listViewType", string(*options.ListViewType)) + } + if options != nil && options.PageSize != nil { + reqQP.Set("pageSize", strconv.FormatInt(int64(*options.PageSize), 10)) + } + if options != nil && options.Tags != nil { + reqQP.Set("tags", *options.Tags) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *FeaturesClient) listHandleResponse(resp *http.Response) (FeaturesClientListResponse, error) { + result := FeaturesClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.FeatureResourceArmPaginatedResult); err != nil { + return FeaturesClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/featuresetcontainers_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/featuresetcontainers_client.go new file mode 100644 index 000000000..25c2370e4 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/featuresetcontainers_client.go @@ -0,0 +1,369 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armmachinelearning + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// FeaturesetContainersClient contains the methods for the FeaturesetContainers group. +// Don't use this type directly, use NewFeaturesetContainersClient() instead. +type FeaturesetContainersClient struct { + internal *arm.Client + subscriptionID string +} + +// NewFeaturesetContainersClient creates a new instance of FeaturesetContainersClient with the specified values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewFeaturesetContainersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*FeaturesetContainersClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &FeaturesetContainersClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Create or update container. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - Name of Azure Machine Learning workspace. +// - name - Container name. This is case-sensitive. +// - body - Container entity to create or update. +// - options - FeaturesetContainersClientBeginCreateOrUpdateOptions contains the optional parameters for the FeaturesetContainersClient.BeginCreateOrUpdate +// method. +func (client *FeaturesetContainersClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, name string, body FeaturesetContainer, options *FeaturesetContainersClientBeginCreateOrUpdateOptions) (*runtime.Poller[FeaturesetContainersClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, workspaceName, name, body, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[FeaturesetContainersClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaOriginalURI, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[FeaturesetContainersClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Create or update container. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *FeaturesetContainersClient) createOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, name string, body FeaturesetContainer, options *FeaturesetContainersClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "FeaturesetContainersClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, workspaceName, name, body, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *FeaturesetContainersClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, name string, body FeaturesetContainer, options *FeaturesetContainersClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if workspaceName == "" { + return nil, errors.New("parameter workspaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceName}", url.PathEscape(workspaceName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, body); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Delete container. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - Name of Azure Machine Learning workspace. +// - name - Container name. This is case-sensitive. +// - options - FeaturesetContainersClientBeginDeleteOptions contains the optional parameters for the FeaturesetContainersClient.BeginDelete +// method. +func (client *FeaturesetContainersClient) BeginDelete(ctx context.Context, resourceGroupName string, workspaceName string, name string, options *FeaturesetContainersClientBeginDeleteOptions) (*runtime.Poller[FeaturesetContainersClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, workspaceName, name, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[FeaturesetContainersClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[FeaturesetContainersClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Delete container. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *FeaturesetContainersClient) deleteOperation(ctx context.Context, resourceGroupName string, workspaceName string, name string, options *FeaturesetContainersClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "FeaturesetContainersClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, workspaceName, name, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *FeaturesetContainersClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, name string, options *FeaturesetContainersClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if workspaceName == "" { + return nil, errors.New("parameter workspaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceName}", url.PathEscape(workspaceName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// GetEntity - Get container. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - Name of Azure Machine Learning workspace. +// - name - Container name. This is case-sensitive. +// - options - FeaturesetContainersClientGetEntityOptions contains the optional parameters for the FeaturesetContainersClient.GetEntity +// method. +func (client *FeaturesetContainersClient) GetEntity(ctx context.Context, resourceGroupName string, workspaceName string, name string, options *FeaturesetContainersClientGetEntityOptions) (FeaturesetContainersClientGetEntityResponse, error) { + var err error + const operationName = "FeaturesetContainersClient.GetEntity" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getEntityCreateRequest(ctx, resourceGroupName, workspaceName, name, options) + if err != nil { + return FeaturesetContainersClientGetEntityResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return FeaturesetContainersClientGetEntityResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return FeaturesetContainersClientGetEntityResponse{}, err + } + resp, err := client.getEntityHandleResponse(httpResp) + return resp, err +} + +// getEntityCreateRequest creates the GetEntity request. +func (client *FeaturesetContainersClient) getEntityCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, name string, options *FeaturesetContainersClientGetEntityOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if workspaceName == "" { + return nil, errors.New("parameter workspaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceName}", url.PathEscape(workspaceName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getEntityHandleResponse handles the GetEntity response. +func (client *FeaturesetContainersClient) getEntityHandleResponse(resp *http.Response) (FeaturesetContainersClientGetEntityResponse, error) { + result := FeaturesetContainersClientGetEntityResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.FeaturesetContainer); err != nil { + return FeaturesetContainersClientGetEntityResponse{}, err + } + return result, nil +} + +// NewListPager - List featurestore entity containers. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - Name of Azure Machine Learning workspace. +// - options - FeaturesetContainersClientListOptions contains the optional parameters for the FeaturesetContainersClient.NewListPager +// method. +func (client *FeaturesetContainersClient) NewListPager(resourceGroupName string, workspaceName string, options *FeaturesetContainersClientListOptions) *runtime.Pager[FeaturesetContainersClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[FeaturesetContainersClientListResponse]{ + More: func(page FeaturesetContainersClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *FeaturesetContainersClientListResponse) (FeaturesetContainersClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "FeaturesetContainersClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, workspaceName, options) + }, nil) + if err != nil { + return FeaturesetContainersClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *FeaturesetContainersClient) listCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, options *FeaturesetContainersClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if workspaceName == "" { + return nil, errors.New("parameter workspaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceName}", url.PathEscape(workspaceName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Skip != nil { + reqQP.Set("$skip", *options.Skip) + } + reqQP.Set("api-version", "2024-04-01") + if options != nil && options.CreatedBy != nil { + reqQP.Set("createdBy", *options.CreatedBy) + } + if options != nil && options.Description != nil { + reqQP.Set("description", *options.Description) + } + if options != nil && options.ListViewType != nil { + reqQP.Set("listViewType", string(*options.ListViewType)) + } + if options != nil && options.Name != nil { + reqQP.Set("name", *options.Name) + } + if options != nil && options.PageSize != nil { + reqQP.Set("pageSize", strconv.FormatInt(int64(*options.PageSize), 10)) + } + if options != nil && options.Tags != nil { + reqQP.Set("tags", *options.Tags) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *FeaturesetContainersClient) listHandleResponse(resp *http.Response) (FeaturesetContainersClientListResponse, error) { + result := FeaturesetContainersClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.FeaturesetContainerResourceArmPaginatedResult); err != nil { + return FeaturesetContainersClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/featuresetversions_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/featuresetversions_client.go new file mode 100644 index 000000000..0e3e56aee --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/featuresetversions_client.go @@ -0,0 +1,485 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armmachinelearning + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// FeaturesetVersionsClient contains the methods for the FeaturesetVersions group. +// Don't use this type directly, use NewFeaturesetVersionsClient() instead. +type FeaturesetVersionsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewFeaturesetVersionsClient creates a new instance of FeaturesetVersionsClient with the specified values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewFeaturesetVersionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*FeaturesetVersionsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &FeaturesetVersionsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginBackfill - Backfill. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - Name of Azure Machine Learning workspace. +// - name - Container name. This is case-sensitive. +// - version - Version identifier. This is case-sensitive. +// - body - Feature set version backfill request entity. +// - options - FeaturesetVersionsClientBeginBackfillOptions contains the optional parameters for the FeaturesetVersionsClient.BeginBackfill +// method. +func (client *FeaturesetVersionsClient) BeginBackfill(ctx context.Context, resourceGroupName string, workspaceName string, name string, version string, body FeaturesetVersionBackfillRequest, options *FeaturesetVersionsClientBeginBackfillOptions) (*runtime.Poller[FeaturesetVersionsClientBackfillResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.backfill(ctx, resourceGroupName, workspaceName, name, version, body, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[FeaturesetVersionsClientBackfillResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[FeaturesetVersionsClientBackfillResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Backfill - Backfill. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *FeaturesetVersionsClient) backfill(ctx context.Context, resourceGroupName string, workspaceName string, name string, version string, body FeaturesetVersionBackfillRequest, options *FeaturesetVersionsClientBeginBackfillOptions) (*http.Response, error) { + var err error + const operationName = "FeaturesetVersionsClient.BeginBackfill" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.backfillCreateRequest(ctx, resourceGroupName, workspaceName, name, version, body, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// backfillCreateRequest creates the Backfill request. +func (client *FeaturesetVersionsClient) backfillCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, name string, version string, body FeaturesetVersionBackfillRequest, options *FeaturesetVersionsClientBeginBackfillOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}/versions/{version}/backfill" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if workspaceName == "" { + return nil, errors.New("parameter workspaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceName}", url.PathEscape(workspaceName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if version == "" { + return nil, errors.New("parameter version cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{version}", url.PathEscape(version)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, body); err != nil { + return nil, err + } + return req, nil +} + +// BeginCreateOrUpdate - Create or update version. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - Name of Azure Machine Learning workspace. +// - name - Container name. This is case-sensitive. +// - version - Version identifier. This is case-sensitive. +// - body - Version entity to create or update. +// - options - FeaturesetVersionsClientBeginCreateOrUpdateOptions contains the optional parameters for the FeaturesetVersionsClient.BeginCreateOrUpdate +// method. +func (client *FeaturesetVersionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, name string, version string, body FeaturesetVersion, options *FeaturesetVersionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[FeaturesetVersionsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, workspaceName, name, version, body, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[FeaturesetVersionsClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaOriginalURI, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[FeaturesetVersionsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Create or update version. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *FeaturesetVersionsClient) createOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, name string, version string, body FeaturesetVersion, options *FeaturesetVersionsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "FeaturesetVersionsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, workspaceName, name, version, body, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *FeaturesetVersionsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, name string, version string, body FeaturesetVersion, options *FeaturesetVersionsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}/versions/{version}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if workspaceName == "" { + return nil, errors.New("parameter workspaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceName}", url.PathEscape(workspaceName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if version == "" { + return nil, errors.New("parameter version cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{version}", url.PathEscape(version)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, body); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Delete version. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - Name of Azure Machine Learning workspace. +// - name - Container name. This is case-sensitive. +// - version - Version identifier. This is case-sensitive. +// - options - FeaturesetVersionsClientBeginDeleteOptions contains the optional parameters for the FeaturesetVersionsClient.BeginDelete +// method. +func (client *FeaturesetVersionsClient) BeginDelete(ctx context.Context, resourceGroupName string, workspaceName string, name string, version string, options *FeaturesetVersionsClientBeginDeleteOptions) (*runtime.Poller[FeaturesetVersionsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, workspaceName, name, version, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[FeaturesetVersionsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[FeaturesetVersionsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Delete version. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *FeaturesetVersionsClient) deleteOperation(ctx context.Context, resourceGroupName string, workspaceName string, name string, version string, options *FeaturesetVersionsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "FeaturesetVersionsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, workspaceName, name, version, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *FeaturesetVersionsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, name string, version string, options *FeaturesetVersionsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}/versions/{version}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if workspaceName == "" { + return nil, errors.New("parameter workspaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceName}", url.PathEscape(workspaceName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if version == "" { + return nil, errors.New("parameter version cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{version}", url.PathEscape(version)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get version. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - Name of Azure Machine Learning workspace. +// - name - Container name. This is case-sensitive. +// - version - Version identifier. This is case-sensitive. +// - options - FeaturesetVersionsClientGetOptions contains the optional parameters for the FeaturesetVersionsClient.Get method. +func (client *FeaturesetVersionsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, name string, version string, options *FeaturesetVersionsClientGetOptions) (FeaturesetVersionsClientGetResponse, error) { + var err error + const operationName = "FeaturesetVersionsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, workspaceName, name, version, options) + if err != nil { + return FeaturesetVersionsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return FeaturesetVersionsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return FeaturesetVersionsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *FeaturesetVersionsClient) getCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, name string, version string, options *FeaturesetVersionsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}/versions/{version}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if workspaceName == "" { + return nil, errors.New("parameter workspaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceName}", url.PathEscape(workspaceName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if version == "" { + return nil, errors.New("parameter version cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{version}", url.PathEscape(version)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *FeaturesetVersionsClient) getHandleResponse(resp *http.Response) (FeaturesetVersionsClientGetResponse, error) { + result := FeaturesetVersionsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.FeaturesetVersion); err != nil { + return FeaturesetVersionsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - List versions. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - Name of Azure Machine Learning workspace. +// - name - Featureset name. This is case-sensitive. +// - options - FeaturesetVersionsClientListOptions contains the optional parameters for the FeaturesetVersionsClient.NewListPager +// method. +func (client *FeaturesetVersionsClient) NewListPager(resourceGroupName string, workspaceName string, name string, options *FeaturesetVersionsClientListOptions) *runtime.Pager[FeaturesetVersionsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[FeaturesetVersionsClientListResponse]{ + More: func(page FeaturesetVersionsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *FeaturesetVersionsClientListResponse) (FeaturesetVersionsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "FeaturesetVersionsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, workspaceName, name, options) + }, nil) + if err != nil { + return FeaturesetVersionsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *FeaturesetVersionsClient) listCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, name string, options *FeaturesetVersionsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}/versions" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if workspaceName == "" { + return nil, errors.New("parameter workspaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceName}", url.PathEscape(workspaceName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Skip != nil { + reqQP.Set("$skip", *options.Skip) + } + reqQP.Set("api-version", "2024-04-01") + if options != nil && options.CreatedBy != nil { + reqQP.Set("createdBy", *options.CreatedBy) + } + if options != nil && options.Description != nil { + reqQP.Set("description", *options.Description) + } + if options != nil && options.ListViewType != nil { + reqQP.Set("listViewType", string(*options.ListViewType)) + } + if options != nil && options.PageSize != nil { + reqQP.Set("pageSize", strconv.FormatInt(int64(*options.PageSize), 10)) + } + if options != nil && options.Stage != nil { + reqQP.Set("stage", *options.Stage) + } + if options != nil && options.Tags != nil { + reqQP.Set("tags", *options.Tags) + } + if options != nil && options.Version != nil { + reqQP.Set("version", *options.Version) + } + if options != nil && options.VersionName != nil { + reqQP.Set("versionName", *options.VersionName) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *FeaturesetVersionsClient) listHandleResponse(resp *http.Response) (FeaturesetVersionsClientListResponse, error) { + result := FeaturesetVersionsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.FeaturesetVersionResourceArmPaginatedResult); err != nil { + return FeaturesetVersionsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/featurestoreentitycontainers_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/featurestoreentitycontainers_client.go new file mode 100644 index 000000000..a009ebc71 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/featurestoreentitycontainers_client.go @@ -0,0 +1,369 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armmachinelearning + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// FeaturestoreEntityContainersClient contains the methods for the FeaturestoreEntityContainers group. +// Don't use this type directly, use NewFeaturestoreEntityContainersClient() instead. +type FeaturestoreEntityContainersClient struct { + internal *arm.Client + subscriptionID string +} + +// NewFeaturestoreEntityContainersClient creates a new instance of FeaturestoreEntityContainersClient with the specified values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewFeaturestoreEntityContainersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*FeaturestoreEntityContainersClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &FeaturestoreEntityContainersClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Create or update container. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - Name of Azure Machine Learning workspace. +// - name - Container name. This is case-sensitive. +// - body - Container entity to create or update. +// - options - FeaturestoreEntityContainersClientBeginCreateOrUpdateOptions contains the optional parameters for the FeaturestoreEntityContainersClient.BeginCreateOrUpdate +// method. +func (client *FeaturestoreEntityContainersClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, name string, body FeaturestoreEntityContainer, options *FeaturestoreEntityContainersClientBeginCreateOrUpdateOptions) (*runtime.Poller[FeaturestoreEntityContainersClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, workspaceName, name, body, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[FeaturestoreEntityContainersClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaOriginalURI, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[FeaturestoreEntityContainersClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Create or update container. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *FeaturestoreEntityContainersClient) createOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, name string, body FeaturestoreEntityContainer, options *FeaturestoreEntityContainersClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "FeaturestoreEntityContainersClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, workspaceName, name, body, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *FeaturestoreEntityContainersClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, name string, body FeaturestoreEntityContainer, options *FeaturestoreEntityContainersClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if workspaceName == "" { + return nil, errors.New("parameter workspaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceName}", url.PathEscape(workspaceName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, body); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Delete container. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - Name of Azure Machine Learning workspace. +// - name - Container name. This is case-sensitive. +// - options - FeaturestoreEntityContainersClientBeginDeleteOptions contains the optional parameters for the FeaturestoreEntityContainersClient.BeginDelete +// method. +func (client *FeaturestoreEntityContainersClient) BeginDelete(ctx context.Context, resourceGroupName string, workspaceName string, name string, options *FeaturestoreEntityContainersClientBeginDeleteOptions) (*runtime.Poller[FeaturestoreEntityContainersClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, workspaceName, name, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[FeaturestoreEntityContainersClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[FeaturestoreEntityContainersClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Delete container. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *FeaturestoreEntityContainersClient) deleteOperation(ctx context.Context, resourceGroupName string, workspaceName string, name string, options *FeaturestoreEntityContainersClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "FeaturestoreEntityContainersClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, workspaceName, name, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *FeaturestoreEntityContainersClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, name string, options *FeaturestoreEntityContainersClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if workspaceName == "" { + return nil, errors.New("parameter workspaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceName}", url.PathEscape(workspaceName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// GetEntity - Get container. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - Name of Azure Machine Learning workspace. +// - name - Container name. This is case-sensitive. +// - options - FeaturestoreEntityContainersClientGetEntityOptions contains the optional parameters for the FeaturestoreEntityContainersClient.GetEntity +// method. +func (client *FeaturestoreEntityContainersClient) GetEntity(ctx context.Context, resourceGroupName string, workspaceName string, name string, options *FeaturestoreEntityContainersClientGetEntityOptions) (FeaturestoreEntityContainersClientGetEntityResponse, error) { + var err error + const operationName = "FeaturestoreEntityContainersClient.GetEntity" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getEntityCreateRequest(ctx, resourceGroupName, workspaceName, name, options) + if err != nil { + return FeaturestoreEntityContainersClientGetEntityResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return FeaturestoreEntityContainersClientGetEntityResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return FeaturestoreEntityContainersClientGetEntityResponse{}, err + } + resp, err := client.getEntityHandleResponse(httpResp) + return resp, err +} + +// getEntityCreateRequest creates the GetEntity request. +func (client *FeaturestoreEntityContainersClient) getEntityCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, name string, options *FeaturestoreEntityContainersClientGetEntityOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if workspaceName == "" { + return nil, errors.New("parameter workspaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceName}", url.PathEscape(workspaceName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getEntityHandleResponse handles the GetEntity response. +func (client *FeaturestoreEntityContainersClient) getEntityHandleResponse(resp *http.Response) (FeaturestoreEntityContainersClientGetEntityResponse, error) { + result := FeaturestoreEntityContainersClientGetEntityResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.FeaturestoreEntityContainer); err != nil { + return FeaturestoreEntityContainersClientGetEntityResponse{}, err + } + return result, nil +} + +// NewListPager - List featurestore entity containers. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - Name of Azure Machine Learning workspace. +// - options - FeaturestoreEntityContainersClientListOptions contains the optional parameters for the FeaturestoreEntityContainersClient.NewListPager +// method. +func (client *FeaturestoreEntityContainersClient) NewListPager(resourceGroupName string, workspaceName string, options *FeaturestoreEntityContainersClientListOptions) *runtime.Pager[FeaturestoreEntityContainersClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[FeaturestoreEntityContainersClientListResponse]{ + More: func(page FeaturestoreEntityContainersClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *FeaturestoreEntityContainersClientListResponse) (FeaturestoreEntityContainersClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "FeaturestoreEntityContainersClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, workspaceName, options) + }, nil) + if err != nil { + return FeaturestoreEntityContainersClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *FeaturestoreEntityContainersClient) listCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, options *FeaturestoreEntityContainersClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if workspaceName == "" { + return nil, errors.New("parameter workspaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceName}", url.PathEscape(workspaceName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Skip != nil { + reqQP.Set("$skip", *options.Skip) + } + reqQP.Set("api-version", "2024-04-01") + if options != nil && options.CreatedBy != nil { + reqQP.Set("createdBy", *options.CreatedBy) + } + if options != nil && options.Description != nil { + reqQP.Set("description", *options.Description) + } + if options != nil && options.ListViewType != nil { + reqQP.Set("listViewType", string(*options.ListViewType)) + } + if options != nil && options.Name != nil { + reqQP.Set("name", *options.Name) + } + if options != nil && options.PageSize != nil { + reqQP.Set("pageSize", strconv.FormatInt(int64(*options.PageSize), 10)) + } + if options != nil && options.Tags != nil { + reqQP.Set("tags", *options.Tags) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *FeaturestoreEntityContainersClient) listHandleResponse(resp *http.Response) (FeaturestoreEntityContainersClientListResponse, error) { + result := FeaturestoreEntityContainersClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.FeaturestoreEntityContainerResourceArmPaginatedResult); err != nil { + return FeaturestoreEntityContainersClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/featurestoreentityversions_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/featurestoreentityversions_client.go new file mode 100644 index 000000000..80cec4025 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/featurestoreentityversions_client.go @@ -0,0 +1,395 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armmachinelearning + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// FeaturestoreEntityVersionsClient contains the methods for the FeaturestoreEntityVersions group. +// Don't use this type directly, use NewFeaturestoreEntityVersionsClient() instead. +type FeaturestoreEntityVersionsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewFeaturestoreEntityVersionsClient creates a new instance of FeaturestoreEntityVersionsClient with the specified values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewFeaturestoreEntityVersionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*FeaturestoreEntityVersionsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &FeaturestoreEntityVersionsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Create or update version. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - Name of Azure Machine Learning workspace. +// - name - Container name. This is case-sensitive. +// - version - Version identifier. This is case-sensitive. +// - body - Version entity to create or update. +// - options - FeaturestoreEntityVersionsClientBeginCreateOrUpdateOptions contains the optional parameters for the FeaturestoreEntityVersionsClient.BeginCreateOrUpdate +// method. +func (client *FeaturestoreEntityVersionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, name string, version string, body FeaturestoreEntityVersion, options *FeaturestoreEntityVersionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[FeaturestoreEntityVersionsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, workspaceName, name, version, body, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[FeaturestoreEntityVersionsClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaOriginalURI, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[FeaturestoreEntityVersionsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Create or update version. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *FeaturestoreEntityVersionsClient) createOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, name string, version string, body FeaturestoreEntityVersion, options *FeaturestoreEntityVersionsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "FeaturestoreEntityVersionsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, workspaceName, name, version, body, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *FeaturestoreEntityVersionsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, name string, version string, body FeaturestoreEntityVersion, options *FeaturestoreEntityVersionsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name}/versions/{version}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if workspaceName == "" { + return nil, errors.New("parameter workspaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceName}", url.PathEscape(workspaceName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if version == "" { + return nil, errors.New("parameter version cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{version}", url.PathEscape(version)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, body); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Delete version. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - Name of Azure Machine Learning workspace. +// - name - Container name. This is case-sensitive. +// - version - Version identifier. This is case-sensitive. +// - options - FeaturestoreEntityVersionsClientBeginDeleteOptions contains the optional parameters for the FeaturestoreEntityVersionsClient.BeginDelete +// method. +func (client *FeaturestoreEntityVersionsClient) BeginDelete(ctx context.Context, resourceGroupName string, workspaceName string, name string, version string, options *FeaturestoreEntityVersionsClientBeginDeleteOptions) (*runtime.Poller[FeaturestoreEntityVersionsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, workspaceName, name, version, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[FeaturestoreEntityVersionsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[FeaturestoreEntityVersionsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Delete version. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *FeaturestoreEntityVersionsClient) deleteOperation(ctx context.Context, resourceGroupName string, workspaceName string, name string, version string, options *FeaturestoreEntityVersionsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "FeaturestoreEntityVersionsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, workspaceName, name, version, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *FeaturestoreEntityVersionsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, name string, version string, options *FeaturestoreEntityVersionsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name}/versions/{version}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if workspaceName == "" { + return nil, errors.New("parameter workspaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceName}", url.PathEscape(workspaceName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if version == "" { + return nil, errors.New("parameter version cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{version}", url.PathEscape(version)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get version. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - Name of Azure Machine Learning workspace. +// - name - Container name. This is case-sensitive. +// - version - Version identifier. This is case-sensitive. +// - options - FeaturestoreEntityVersionsClientGetOptions contains the optional parameters for the FeaturestoreEntityVersionsClient.Get +// method. +func (client *FeaturestoreEntityVersionsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, name string, version string, options *FeaturestoreEntityVersionsClientGetOptions) (FeaturestoreEntityVersionsClientGetResponse, error) { + var err error + const operationName = "FeaturestoreEntityVersionsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, workspaceName, name, version, options) + if err != nil { + return FeaturestoreEntityVersionsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return FeaturestoreEntityVersionsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return FeaturestoreEntityVersionsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *FeaturestoreEntityVersionsClient) getCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, name string, version string, options *FeaturestoreEntityVersionsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name}/versions/{version}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if workspaceName == "" { + return nil, errors.New("parameter workspaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceName}", url.PathEscape(workspaceName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if version == "" { + return nil, errors.New("parameter version cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{version}", url.PathEscape(version)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *FeaturestoreEntityVersionsClient) getHandleResponse(resp *http.Response) (FeaturestoreEntityVersionsClientGetResponse, error) { + result := FeaturestoreEntityVersionsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.FeaturestoreEntityVersion); err != nil { + return FeaturestoreEntityVersionsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - List versions. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - Name of Azure Machine Learning workspace. +// - name - Feature entity name. This is case-sensitive. +// - options - FeaturestoreEntityVersionsClientListOptions contains the optional parameters for the FeaturestoreEntityVersionsClient.NewListPager +// method. +func (client *FeaturestoreEntityVersionsClient) NewListPager(resourceGroupName string, workspaceName string, name string, options *FeaturestoreEntityVersionsClientListOptions) *runtime.Pager[FeaturestoreEntityVersionsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[FeaturestoreEntityVersionsClientListResponse]{ + More: func(page FeaturestoreEntityVersionsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *FeaturestoreEntityVersionsClientListResponse) (FeaturestoreEntityVersionsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "FeaturestoreEntityVersionsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, workspaceName, name, options) + }, nil) + if err != nil { + return FeaturestoreEntityVersionsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *FeaturestoreEntityVersionsClient) listCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, name string, options *FeaturestoreEntityVersionsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name}/versions" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if workspaceName == "" { + return nil, errors.New("parameter workspaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceName}", url.PathEscape(workspaceName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Skip != nil { + reqQP.Set("$skip", *options.Skip) + } + reqQP.Set("api-version", "2024-04-01") + if options != nil && options.CreatedBy != nil { + reqQP.Set("createdBy", *options.CreatedBy) + } + if options != nil && options.Description != nil { + reqQP.Set("description", *options.Description) + } + if options != nil && options.ListViewType != nil { + reqQP.Set("listViewType", string(*options.ListViewType)) + } + if options != nil && options.PageSize != nil { + reqQP.Set("pageSize", strconv.FormatInt(int64(*options.PageSize), 10)) + } + if options != nil && options.Stage != nil { + reqQP.Set("stage", *options.Stage) + } + if options != nil && options.Tags != nil { + reqQP.Set("tags", *options.Tags) + } + if options != nil && options.Version != nil { + reqQP.Set("version", *options.Version) + } + if options != nil && options.VersionName != nil { + reqQP.Set("versionName", *options.VersionName) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *FeaturestoreEntityVersionsClient) listHandleResponse(resp *http.Response) (FeaturestoreEntityVersionsClientListResponse, error) { + result := FeaturestoreEntityVersionsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.FeaturestoreEntityVersionResourceArmPaginatedResult); err != nil { + return FeaturestoreEntityVersionsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/interfaces.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/interfaces.go similarity index 59% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/interfaces.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/interfaces.go index 149a1ae9b..e9f57c877 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/interfaces.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/interfaces.go @@ -27,6 +27,15 @@ type AutoMLVerticalClassification interface { GetAutoMLVertical() *AutoMLVertical } +// BatchDeploymentConfigurationClassification provides polymorphic access to related types. +// Call the interface's GetBatchDeploymentConfiguration() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *BatchDeploymentConfiguration, *BatchPipelineComponentDeploymentConfiguration +type BatchDeploymentConfigurationClassification interface { + // GetBatchDeploymentConfiguration returns the BatchDeploymentConfiguration content of the underlying type. + GetBatchDeploymentConfiguration() *BatchDeploymentConfiguration +} + // ComputeClassification provides polymorphic access to related types. // Call the interface's GetCompute() method to access the common type. // Use a type switch to determine the concrete type. The possible types are: @@ -46,6 +55,33 @@ type ComputeSecretsClassification interface { GetComputeSecrets() *ComputeSecrets } +// DataDriftMetricThresholdBaseClassification provides polymorphic access to related types. +// Call the interface's GetDataDriftMetricThresholdBase() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *CategoricalDataDriftMetricThreshold, *DataDriftMetricThresholdBase, *NumericalDataDriftMetricThreshold +type DataDriftMetricThresholdBaseClassification interface { + // GetDataDriftMetricThresholdBase returns the DataDriftMetricThresholdBase content of the underlying type. + GetDataDriftMetricThresholdBase() *DataDriftMetricThresholdBase +} + +// DataQualityMetricThresholdBaseClassification provides polymorphic access to related types. +// Call the interface's GetDataQualityMetricThresholdBase() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *CategoricalDataQualityMetricThreshold, *DataQualityMetricThresholdBase, *NumericalDataQualityMetricThreshold +type DataQualityMetricThresholdBaseClassification interface { + // GetDataQualityMetricThresholdBase returns the DataQualityMetricThresholdBase content of the underlying type. + GetDataQualityMetricThresholdBase() *DataQualityMetricThresholdBase +} + +// DataReferenceCredentialClassification provides polymorphic access to related types. +// Call the interface's GetDataReferenceCredential() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AnonymousAccessCredential, *DataReferenceCredential, *DockerCredential, *ManagedIdentityCredential, *SASCredential +type DataReferenceCredentialClassification interface { + // GetDataReferenceCredential returns the DataReferenceCredential content of the underlying type. + GetDataReferenceCredential() *DataReferenceCredential +} + // DataVersionBasePropertiesClassification provides polymorphic access to related types. // Call the interface's GetDataVersionBaseProperties() method to access the common type. // Use a type switch to determine the concrete type. The possible types are: @@ -68,7 +104,8 @@ type DatastoreCredentialsClassification interface { // DatastorePropertiesClassification provides polymorphic access to related types. // Call the interface's GetDatastoreProperties() method to access the common type. // Use a type switch to determine the concrete type. The possible types are: -// - *AzureBlobDatastore, *AzureDataLakeGen1Datastore, *AzureDataLakeGen2Datastore, *AzureFileDatastore, *DatastoreProperties +// - *AzureBlobDatastore, *AzureDataLakeGen1Datastore, *AzureDataLakeGen2Datastore, *AzureFileDatastore, *DatastoreProperties, +// - *OneLakeDatastore type DatastorePropertiesClassification interface { // GetDatastoreProperties returns the DatastoreProperties content of the underlying type. GetDatastoreProperties() *DatastoreProperties @@ -122,7 +159,7 @@ type IdentityConfigurationClassification interface { // JobBasePropertiesClassification provides polymorphic access to related types. // Call the interface's GetJobBaseProperties() method to access the common type. // Use a type switch to determine the concrete type. The possible types are: -// - *AutoMLJob, *CommandJob, *JobBaseProperties, *PipelineJob, *SweepJob +// - *AutoMLJob, *CommandJob, *JobBaseProperties, *PipelineJob, *SparkJob, *SweepJob type JobBasePropertiesClassification interface { // GetJobBaseProperties returns the JobBaseProperties content of the underlying type. GetJobBaseProperties() *JobBaseProperties @@ -157,6 +194,52 @@ type JobOutputClassification interface { GetJobOutput() *JobOutput } +// MonitorComputeConfigurationBaseClassification provides polymorphic access to related types. +// Call the interface's GetMonitorComputeConfigurationBase() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *MonitorComputeConfigurationBase, *MonitorServerlessSparkCompute +type MonitorComputeConfigurationBaseClassification interface { + // GetMonitorComputeConfigurationBase returns the MonitorComputeConfigurationBase content of the underlying type. + GetMonitorComputeConfigurationBase() *MonitorComputeConfigurationBase +} + +// MonitorComputeIdentityBaseClassification provides polymorphic access to related types. +// Call the interface's GetMonitorComputeIdentityBase() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AmlTokenComputeIdentity, *ManagedComputeIdentity, *MonitorComputeIdentityBase +type MonitorComputeIdentityBaseClassification interface { + // GetMonitorComputeIdentityBase returns the MonitorComputeIdentityBase content of the underlying type. + GetMonitorComputeIdentityBase() *MonitorComputeIdentityBase +} + +// MonitoringFeatureFilterBaseClassification provides polymorphic access to related types. +// Call the interface's GetMonitoringFeatureFilterBase() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AllFeatures, *FeatureSubset, *MonitoringFeatureFilterBase, *TopNFeaturesByAttribution +type MonitoringFeatureFilterBaseClassification interface { + // GetMonitoringFeatureFilterBase returns the MonitoringFeatureFilterBase content of the underlying type. + GetMonitoringFeatureFilterBase() *MonitoringFeatureFilterBase +} + +// MonitoringInputDataBaseClassification provides polymorphic access to related types. +// Call the interface's GetMonitoringInputDataBase() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *FixedInputData, *MonitoringInputDataBase, *RollingInputData, *StaticInputData +type MonitoringInputDataBaseClassification interface { + // GetMonitoringInputDataBase returns the MonitoringInputDataBase content of the underlying type. + GetMonitoringInputDataBase() *MonitoringInputDataBase +} + +// MonitoringSignalBaseClassification provides polymorphic access to related types. +// Call the interface's GetMonitoringSignalBase() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *CustomMonitoringSignal, *DataDriftMonitoringSignal, *DataQualityMonitoringSignal, *FeatureAttributionDriftMonitoringSignal, +// - *MonitoringSignalBase, *PredictionDriftMonitoringSignal +type MonitoringSignalBaseClassification interface { + // GetMonitoringSignalBase returns the MonitoringSignalBase content of the underlying type. + GetMonitoringSignalBase() *MonitoringSignalBase +} + // NCrossValidationsClassification provides polymorphic access to related types. // Call the interface's GetNCrossValidations() method to access the common type. // Use a type switch to determine the concrete type. The possible types are: @@ -166,6 +249,24 @@ type NCrossValidationsClassification interface { GetNCrossValidations() *NCrossValidations } +// NodesClassification provides polymorphic access to related types. +// Call the interface's GetNodes() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AllNodes, *Nodes +type NodesClassification interface { + // GetNodes returns the Nodes content of the underlying type. + GetNodes() *Nodes +} + +// OneLakeArtifactClassification provides polymorphic access to related types. +// Call the interface's GetOneLakeArtifact() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *LakeHouseArtifact, *OneLakeArtifact +type OneLakeArtifactClassification interface { + // GetOneLakeArtifact returns the OneLakeArtifact content of the underlying type. + GetOneLakeArtifact() *OneLakeArtifact +} + // OnlineDeploymentPropertiesClassification provides polymorphic access to related types. // Call the interface's GetOnlineDeploymentProperties() method to access the common type. // Use a type switch to determine the concrete type. The possible types are: @@ -184,6 +285,33 @@ type OnlineScaleSettingsClassification interface { GetOnlineScaleSettings() *OnlineScaleSettings } +// OutboundRuleClassification provides polymorphic access to related types. +// Call the interface's GetOutboundRule() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *FqdnOutboundRule, *OutboundRule, *PrivateEndpointOutboundRule, *ServiceTagOutboundRule +type OutboundRuleClassification interface { + // GetOutboundRule returns the OutboundRule content of the underlying type. + GetOutboundRule() *OutboundRule +} + +// PendingUploadCredentialDtoClassification provides polymorphic access to related types. +// Call the interface's GetPendingUploadCredentialDto() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *PendingUploadCredentialDto, *SASCredentialDto +type PendingUploadCredentialDtoClassification interface { + // GetPendingUploadCredentialDto returns the PendingUploadCredentialDto content of the underlying type. + GetPendingUploadCredentialDto() *PendingUploadCredentialDto +} + +// PredictionDriftMetricThresholdBaseClassification provides polymorphic access to related types. +// Call the interface's GetPredictionDriftMetricThresholdBase() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *CategoricalPredictionDriftMetricThreshold, *NumericalPredictionDriftMetricThreshold, *PredictionDriftMetricThresholdBase +type PredictionDriftMetricThresholdBaseClassification interface { + // GetPredictionDriftMetricThresholdBase returns the PredictionDriftMetricThresholdBase content of the underlying type. + GetPredictionDriftMetricThresholdBase() *PredictionDriftMetricThresholdBase +} + // SamplingAlgorithmClassification provides polymorphic access to related types. // Call the interface's GetSamplingAlgorithm() method to access the common type. // Use a type switch to determine the concrete type. The possible types are: @@ -196,7 +324,7 @@ type SamplingAlgorithmClassification interface { // ScheduleActionBaseClassification provides polymorphic access to related types. // Call the interface's GetScheduleActionBase() method to access the common type. // Use a type switch to determine the concrete type. The possible types are: -// - *EndpointScheduleAction, *JobScheduleAction, *ScheduleActionBase +// - *CreateMonitorAction, *EndpointScheduleAction, *JobScheduleAction, *ScheduleActionBase type ScheduleActionBaseClassification interface { // GetScheduleActionBase returns the ScheduleActionBase content of the underlying type. GetScheduleActionBase() *ScheduleActionBase @@ -211,6 +339,15 @@ type SeasonalityClassification interface { GetSeasonality() *Seasonality } +// SparkJobEntryClassification provides polymorphic access to related types. +// Call the interface's GetSparkJobEntry() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *SparkJobEntry, *SparkJobPythonEntry, *SparkJobScalaEntry +type SparkJobEntryClassification interface { + // GetSparkJobEntry returns the SparkJobEntry content of the underlying type. + GetSparkJobEntry() *SparkJobEntry +} + // TargetLagsClassification provides polymorphic access to related types. // Call the interface's GetTargetLags() method to access the common type. // Use a type switch to determine the concrete type. The possible types are: @@ -238,11 +375,23 @@ type TriggerBaseClassification interface { GetTriggerBase() *TriggerBase } +// WebhookClassification provides polymorphic access to related types. +// Call the interface's GetWebhook() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AzureDevOpsWebhook, *Webhook +type WebhookClassification interface { + // GetWebhook returns the Webhook content of the underlying type. + GetWebhook() *Webhook +} + // WorkspaceConnectionPropertiesV2Classification provides polymorphic access to related types. // Call the interface's GetWorkspaceConnectionPropertiesV2() method to access the common type. // Use a type switch to determine the concrete type. The possible types are: -// - *ManagedIdentityAuthTypeWorkspaceConnectionProperties, *NoneAuthTypeWorkspaceConnectionProperties, *PATAuthTypeWorkspaceConnectionProperties, -// - *SASAuthTypeWorkspaceConnectionProperties, *UsernamePasswordAuthTypeWorkspaceConnectionProperties, *WorkspaceConnectionPropertiesV2 +// - *AADAuthTypeWorkspaceConnectionProperties, *APIKeyAuthWorkspaceConnectionProperties, *AccessKeyAuthTypeWorkspaceConnectionProperties, +// - *AccountKeyAuthTypeWorkspaceConnectionProperties, *CustomKeysWorkspaceConnectionProperties, *ManagedIdentityAuthTypeWorkspaceConnectionProperties, +// - *NoneAuthTypeWorkspaceConnectionProperties, *OAuth2AuthTypeWorkspaceConnectionProperties, *PATAuthTypeWorkspaceConnectionProperties, +// - *SASAuthTypeWorkspaceConnectionProperties, *ServicePrincipalAuthTypeWorkspaceConnectionProperties, *UsernamePasswordAuthTypeWorkspaceConnectionProperties, +// - *WorkspaceConnectionPropertiesV2 type WorkspaceConnectionPropertiesV2Classification interface { // GetWorkspaceConnectionPropertiesV2 returns the WorkspaceConnectionPropertiesV2 content of the underlying type. GetWorkspaceConnectionPropertiesV2() *WorkspaceConnectionPropertiesV2 diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/jobs_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/jobs_client.go similarity index 95% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/jobs_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/jobs_client.go index 96d041587..36dd2ca93 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/jobs_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/jobs_client.go @@ -46,7 +46,7 @@ func NewJobsClient(subscriptionID string, credential azcore.TokenCredential, opt // BeginCancel - Cancels a Job (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - id - The name and identifier for the Job. This is case-sensitive. @@ -72,7 +72,7 @@ func (client *JobsClient) BeginCancel(ctx context.Context, resourceGroupName str // Cancel - Cancels a Job (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 func (client *JobsClient) cancel(ctx context.Context, resourceGroupName string, workspaceName string, id string, options *JobsClientBeginCancelOptions) (*http.Response, error) { var err error const operationName = "JobsClient.BeginCancel" @@ -118,16 +118,17 @@ func (client *JobsClient) cancelCreateRequest(ctx context.Context, resourceGroup return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// CreateOrUpdate - Creates and executes a Job. +// CreateOrUpdate - Creates and executes a Job. For update case, the Tags in the definition passed in will replace Tags in +// the existing job. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - id - The name and identifier for the Job. This is case-sensitive. @@ -179,7 +180,7 @@ func (client *JobsClient) createOrUpdateCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -200,7 +201,7 @@ func (client *JobsClient) createOrUpdateHandleResponse(resp *http.Response) (Job // BeginDelete - Deletes a Job (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - id - The name and identifier for the Job. This is case-sensitive. @@ -212,7 +213,8 @@ func (client *JobsClient) BeginDelete(ctx context.Context, resourceGroupName str return nil, err } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[JobsClientDeleteResponse]{ - Tracer: client.internal.Tracer(), + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { @@ -225,7 +227,7 @@ func (client *JobsClient) BeginDelete(ctx context.Context, resourceGroupName str // Delete - Deletes a Job (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 func (client *JobsClient) deleteOperation(ctx context.Context, resourceGroupName string, workspaceName string, id string, options *JobsClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "JobsClient.BeginDelete" @@ -271,7 +273,7 @@ func (client *JobsClient) deleteCreateRequest(ctx context.Context, resourceGroup return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -280,7 +282,7 @@ func (client *JobsClient) deleteCreateRequest(ctx context.Context, resourceGroup // Get - Gets a Job by name/id. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - id - The name and identifier for the Job. This is case-sensitive. @@ -331,7 +333,7 @@ func (client *JobsClient) getCreateRequest(ctx context.Context, resourceGroupNam return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -348,7 +350,7 @@ func (client *JobsClient) getHandleResponse(resp *http.Response) (JobsClientGetR // NewListPager - Lists Jobs in the workspace. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - options - JobsClientListOptions contains the optional parameters for the JobsClient.NewListPager method. @@ -395,19 +397,22 @@ func (client *JobsClient) listCreateRequest(ctx context.Context, resourceGroupNa return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") if options != nil && options.Skip != nil { reqQP.Set("$skip", *options.Skip) } + reqQP.Set("api-version", "2024-04-01") if options != nil && options.JobType != nil { reqQP.Set("jobType", *options.JobType) } - if options != nil && options.Tag != nil { - reqQP.Set("tag", *options.Tag) - } if options != nil && options.ListViewType != nil { reqQP.Set("listViewType", string(*options.ListViewType)) } + if options != nil && options.Properties != nil { + reqQP.Set("properties", *options.Properties) + } + if options != nil && options.Tag != nil { + reqQP.Set("tag", *options.Tag) + } req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/managednetworkprovisions_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/managednetworkprovisions_client.go new file mode 100644 index 000000000..7b5567528 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/managednetworkprovisions_client.go @@ -0,0 +1,127 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armmachinelearning + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ManagedNetworkProvisionsClient contains the methods for the ManagedNetworkProvisions group. +// Don't use this type directly, use NewManagedNetworkProvisionsClient() instead. +type ManagedNetworkProvisionsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewManagedNetworkProvisionsClient creates a new instance of ManagedNetworkProvisionsClient with the specified values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewManagedNetworkProvisionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedNetworkProvisionsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ManagedNetworkProvisionsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginProvisionManagedNetwork - Provisions the managed network of a machine learning workspace. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - Name of Azure Machine Learning workspace. +// - options - ManagedNetworkProvisionsClientBeginProvisionManagedNetworkOptions contains the optional parameters for the ManagedNetworkProvisionsClient.BeginProvisionManagedNetwork +// method. +func (client *ManagedNetworkProvisionsClient) BeginProvisionManagedNetwork(ctx context.Context, resourceGroupName string, workspaceName string, options *ManagedNetworkProvisionsClientBeginProvisionManagedNetworkOptions) (*runtime.Poller[ManagedNetworkProvisionsClientProvisionManagedNetworkResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.provisionManagedNetwork(ctx, resourceGroupName, workspaceName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ManagedNetworkProvisionsClientProvisionManagedNetworkResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ManagedNetworkProvisionsClientProvisionManagedNetworkResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// ProvisionManagedNetwork - Provisions the managed network of a machine learning workspace. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *ManagedNetworkProvisionsClient) provisionManagedNetwork(ctx context.Context, resourceGroupName string, workspaceName string, options *ManagedNetworkProvisionsClientBeginProvisionManagedNetworkOptions) (*http.Response, error) { + var err error + const operationName = "ManagedNetworkProvisionsClient.BeginProvisionManagedNetwork" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.provisionManagedNetworkCreateRequest(ctx, resourceGroupName, workspaceName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// provisionManagedNetworkCreateRequest creates the ProvisionManagedNetwork request. +func (client *ManagedNetworkProvisionsClient) provisionManagedNetworkCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, options *ManagedNetworkProvisionsClientBeginProvisionManagedNetworkOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/provisionManagedNetwork" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if workspaceName == "" { + return nil, errors.New("parameter workspaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceName}", url.PathEscape(workspaceName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.Body != nil { + if err := runtime.MarshalAsJSON(req, *options.Body); err != nil { + return nil, err + } + return req, nil + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/managednetworksettingsrule_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/managednetworksettingsrule_client.go new file mode 100644 index 000000000..47a884cdd --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/managednetworksettingsrule_client.go @@ -0,0 +1,346 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armmachinelearning + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ManagedNetworkSettingsRuleClient contains the methods for the ManagedNetworkSettingsRule group. +// Don't use this type directly, use NewManagedNetworkSettingsRuleClient() instead. +type ManagedNetworkSettingsRuleClient struct { + internal *arm.Client + subscriptionID string +} + +// NewManagedNetworkSettingsRuleClient creates a new instance of ManagedNetworkSettingsRuleClient with the specified values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewManagedNetworkSettingsRuleClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedNetworkSettingsRuleClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ManagedNetworkSettingsRuleClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates or updates an outbound rule in the managed network of a machine learning workspace. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - Name of Azure Machine Learning workspace. +// - ruleName - Name of the workspace managed network outbound rule +// - body - Outbound Rule to be created or updated in the managed network of a machine learning workspace. +// - options - ManagedNetworkSettingsRuleClientBeginCreateOrUpdateOptions contains the optional parameters for the ManagedNetworkSettingsRuleClient.BeginCreateOrUpdate +// method. +func (client *ManagedNetworkSettingsRuleClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, ruleName string, body OutboundRuleBasicResource, options *ManagedNetworkSettingsRuleClientBeginCreateOrUpdateOptions) (*runtime.Poller[ManagedNetworkSettingsRuleClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, workspaceName, ruleName, body, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ManagedNetworkSettingsRuleClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ManagedNetworkSettingsRuleClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates or updates an outbound rule in the managed network of a machine learning workspace. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *ManagedNetworkSettingsRuleClient) createOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, ruleName string, body OutboundRuleBasicResource, options *ManagedNetworkSettingsRuleClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ManagedNetworkSettingsRuleClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, workspaceName, ruleName, body, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *ManagedNetworkSettingsRuleClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, ruleName string, body OutboundRuleBasicResource, options *ManagedNetworkSettingsRuleClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/outboundRules/{ruleName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if workspaceName == "" { + return nil, errors.New("parameter workspaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceName}", url.PathEscape(workspaceName)) + if ruleName == "" { + return nil, errors.New("parameter ruleName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{ruleName}", url.PathEscape(ruleName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, body); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes an outbound rule from the managed network of a machine learning workspace. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - Name of Azure Machine Learning workspace. +// - ruleName - Name of the workspace managed network outbound rule +// - options - ManagedNetworkSettingsRuleClientBeginDeleteOptions contains the optional parameters for the ManagedNetworkSettingsRuleClient.BeginDelete +// method. +func (client *ManagedNetworkSettingsRuleClient) BeginDelete(ctx context.Context, resourceGroupName string, workspaceName string, ruleName string, options *ManagedNetworkSettingsRuleClientBeginDeleteOptions) (*runtime.Poller[ManagedNetworkSettingsRuleClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, workspaceName, ruleName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ManagedNetworkSettingsRuleClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ManagedNetworkSettingsRuleClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes an outbound rule from the managed network of a machine learning workspace. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *ManagedNetworkSettingsRuleClient) deleteOperation(ctx context.Context, resourceGroupName string, workspaceName string, ruleName string, options *ManagedNetworkSettingsRuleClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "ManagedNetworkSettingsRuleClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, workspaceName, ruleName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *ManagedNetworkSettingsRuleClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, ruleName string, options *ManagedNetworkSettingsRuleClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/outboundRules/{ruleName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if workspaceName == "" { + return nil, errors.New("parameter workspaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceName}", url.PathEscape(workspaceName)) + if ruleName == "" { + return nil, errors.New("parameter ruleName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{ruleName}", url.PathEscape(ruleName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets an outbound rule from the managed network of a machine learning workspace. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - Name of Azure Machine Learning workspace. +// - ruleName - Name of the workspace managed network outbound rule +// - options - ManagedNetworkSettingsRuleClientGetOptions contains the optional parameters for the ManagedNetworkSettingsRuleClient.Get +// method. +func (client *ManagedNetworkSettingsRuleClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, ruleName string, options *ManagedNetworkSettingsRuleClientGetOptions) (ManagedNetworkSettingsRuleClientGetResponse, error) { + var err error + const operationName = "ManagedNetworkSettingsRuleClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, workspaceName, ruleName, options) + if err != nil { + return ManagedNetworkSettingsRuleClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ManagedNetworkSettingsRuleClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ManagedNetworkSettingsRuleClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ManagedNetworkSettingsRuleClient) getCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, ruleName string, options *ManagedNetworkSettingsRuleClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/outboundRules/{ruleName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if workspaceName == "" { + return nil, errors.New("parameter workspaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceName}", url.PathEscape(workspaceName)) + if ruleName == "" { + return nil, errors.New("parameter ruleName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{ruleName}", url.PathEscape(ruleName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ManagedNetworkSettingsRuleClient) getHandleResponse(resp *http.Response) (ManagedNetworkSettingsRuleClientGetResponse, error) { + result := ManagedNetworkSettingsRuleClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.OutboundRuleBasicResource); err != nil { + return ManagedNetworkSettingsRuleClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Lists the managed network outbound rules for a machine learning workspace. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - Name of Azure Machine Learning workspace. +// - options - ManagedNetworkSettingsRuleClientListOptions contains the optional parameters for the ManagedNetworkSettingsRuleClient.NewListPager +// method. +func (client *ManagedNetworkSettingsRuleClient) NewListPager(resourceGroupName string, workspaceName string, options *ManagedNetworkSettingsRuleClientListOptions) *runtime.Pager[ManagedNetworkSettingsRuleClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[ManagedNetworkSettingsRuleClientListResponse]{ + More: func(page ManagedNetworkSettingsRuleClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ManagedNetworkSettingsRuleClientListResponse) (ManagedNetworkSettingsRuleClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ManagedNetworkSettingsRuleClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, workspaceName, options) + }, nil) + if err != nil { + return ManagedNetworkSettingsRuleClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *ManagedNetworkSettingsRuleClient) listCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, options *ManagedNetworkSettingsRuleClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/outboundRules" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if workspaceName == "" { + return nil, errors.New("parameter workspaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceName}", url.PathEscape(workspaceName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *ManagedNetworkSettingsRuleClient) listHandleResponse(resp *http.Response) (ManagedNetworkSettingsRuleClientListResponse, error) { + result := ManagedNetworkSettingsRuleClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.OutboundRuleListResult); err != nil { + return ManagedNetworkSettingsRuleClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/marketplacesubscriptions_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/marketplacesubscriptions_client.go new file mode 100644 index 000000000..90abe2d5d --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/marketplacesubscriptions_client.go @@ -0,0 +1,350 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armmachinelearning + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// MarketplaceSubscriptionsClient contains the methods for the MarketplaceSubscriptions group. +// Don't use this type directly, use NewMarketplaceSubscriptionsClient() instead. +type MarketplaceSubscriptionsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewMarketplaceSubscriptionsClient creates a new instance of MarketplaceSubscriptionsClient with the specified values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewMarketplaceSubscriptionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*MarketplaceSubscriptionsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &MarketplaceSubscriptionsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Create or update Marketplace Subscription (asynchronous). +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - Name of Azure Machine Learning workspace. +// - name - Marketplace Subscription name. +// - body - Marketplace Subscription entity to apply during operation. +// - options - MarketplaceSubscriptionsClientBeginCreateOrUpdateOptions contains the optional parameters for the MarketplaceSubscriptionsClient.BeginCreateOrUpdate +// method. +func (client *MarketplaceSubscriptionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, name string, body MarketplaceSubscription, options *MarketplaceSubscriptionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[MarketplaceSubscriptionsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, workspaceName, name, body, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[MarketplaceSubscriptionsClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaOriginalURI, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[MarketplaceSubscriptionsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Create or update Marketplace Subscription (asynchronous). +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *MarketplaceSubscriptionsClient) createOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, name string, body MarketplaceSubscription, options *MarketplaceSubscriptionsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "MarketplaceSubscriptionsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, workspaceName, name, body, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *MarketplaceSubscriptionsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, name string, body MarketplaceSubscription, options *MarketplaceSubscriptionsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/marketplaceSubscriptions/{name}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if workspaceName == "" { + return nil, errors.New("parameter workspaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceName}", url.PathEscape(workspaceName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, body); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Delete Marketplace Subscription (asynchronous). +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - Name of Azure Machine Learning workspace. +// - name - Marketplace Subscription name. +// - options - MarketplaceSubscriptionsClientBeginDeleteOptions contains the optional parameters for the MarketplaceSubscriptionsClient.BeginDelete +// method. +func (client *MarketplaceSubscriptionsClient) BeginDelete(ctx context.Context, resourceGroupName string, workspaceName string, name string, options *MarketplaceSubscriptionsClientBeginDeleteOptions) (*runtime.Poller[MarketplaceSubscriptionsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, workspaceName, name, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[MarketplaceSubscriptionsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[MarketplaceSubscriptionsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Delete Marketplace Subscription (asynchronous). +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *MarketplaceSubscriptionsClient) deleteOperation(ctx context.Context, resourceGroupName string, workspaceName string, name string, options *MarketplaceSubscriptionsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "MarketplaceSubscriptionsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, workspaceName, name, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *MarketplaceSubscriptionsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, name string, options *MarketplaceSubscriptionsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/marketplaceSubscriptions/{name}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if workspaceName == "" { + return nil, errors.New("parameter workspaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceName}", url.PathEscape(workspaceName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get container. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - Name of Azure Machine Learning workspace. +// - name - Container name. +// - options - MarketplaceSubscriptionsClientGetOptions contains the optional parameters for the MarketplaceSubscriptionsClient.Get +// method. +func (client *MarketplaceSubscriptionsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, name string, options *MarketplaceSubscriptionsClientGetOptions) (MarketplaceSubscriptionsClientGetResponse, error) { + var err error + const operationName = "MarketplaceSubscriptionsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, workspaceName, name, options) + if err != nil { + return MarketplaceSubscriptionsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return MarketplaceSubscriptionsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return MarketplaceSubscriptionsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *MarketplaceSubscriptionsClient) getCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, name string, options *MarketplaceSubscriptionsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/marketplaceSubscriptions/{name}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if workspaceName == "" { + return nil, errors.New("parameter workspaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceName}", url.PathEscape(workspaceName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *MarketplaceSubscriptionsClient) getHandleResponse(resp *http.Response) (MarketplaceSubscriptionsClientGetResponse, error) { + result := MarketplaceSubscriptionsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.MarketplaceSubscription); err != nil { + return MarketplaceSubscriptionsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - List containers. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - Name of Azure Machine Learning workspace. +// - options - MarketplaceSubscriptionsClientListOptions contains the optional parameters for the MarketplaceSubscriptionsClient.NewListPager +// method. +func (client *MarketplaceSubscriptionsClient) NewListPager(resourceGroupName string, workspaceName string, options *MarketplaceSubscriptionsClientListOptions) *runtime.Pager[MarketplaceSubscriptionsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[MarketplaceSubscriptionsClientListResponse]{ + More: func(page MarketplaceSubscriptionsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *MarketplaceSubscriptionsClientListResponse) (MarketplaceSubscriptionsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "MarketplaceSubscriptionsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, workspaceName, options) + }, nil) + if err != nil { + return MarketplaceSubscriptionsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *MarketplaceSubscriptionsClient) listCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, options *MarketplaceSubscriptionsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/marketplaceSubscriptions" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if workspaceName == "" { + return nil, errors.New("parameter workspaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceName}", url.PathEscape(workspaceName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Skip != nil { + reqQP.Set("$skip", *options.Skip) + } + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *MarketplaceSubscriptionsClient) listHandleResponse(resp *http.Response) (MarketplaceSubscriptionsClientListResponse, error) { + result := MarketplaceSubscriptionsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.MarketplaceSubscriptionResourceArmPaginatedResult); err != nil { + return MarketplaceSubscriptionsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/modelcontainers_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/modelcontainers_client.go similarity index 97% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/modelcontainers_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/modelcontainers_client.go index 7ead9acd7..e3f2bb752 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/modelcontainers_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/modelcontainers_client.go @@ -47,7 +47,7 @@ func NewModelContainersClient(subscriptionID string, credential azcore.TokenCred // CreateOrUpdate - Create or update container. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Container name. This is case-sensitive. @@ -100,7 +100,7 @@ func (client *ModelContainersClient) createOrUpdateCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -121,7 +121,7 @@ func (client *ModelContainersClient) createOrUpdateHandleResponse(resp *http.Res // Delete - Delete container. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Container name. This is case-sensitive. @@ -171,7 +171,7 @@ func (client *ModelContainersClient) deleteCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -180,7 +180,7 @@ func (client *ModelContainersClient) deleteCreateRequest(ctx context.Context, re // Get - Get container. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Container name. This is case-sensitive. @@ -231,7 +231,7 @@ func (client *ModelContainersClient) getCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -248,7 +248,7 @@ func (client *ModelContainersClient) getHandleResponse(resp *http.Response) (Mod // NewListPager - List model containers. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - options - ModelContainersClientListOptions contains the optional parameters for the ModelContainersClient.NewListPager @@ -296,10 +296,10 @@ func (client *ModelContainersClient) listCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") if options != nil && options.Skip != nil { reqQP.Set("$skip", *options.Skip) } + reqQP.Set("api-version", "2024-04-01") if options != nil && options.Count != nil { reqQP.Set("count", strconv.FormatInt(int64(*options.Count), 10)) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/models.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/models.go similarity index 69% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/models.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/models.go index fc2be571e..eeb3df765 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/models.go @@ -10,6 +10,51 @@ package armmachinelearning import "time" +// AADAuthTypeWorkspaceConnectionProperties - This connection type covers the AAD auth for any applicable Azure service +type AADAuthTypeWorkspaceConnectionProperties struct { + // REQUIRED; Authentication type of the connection target + AuthType *ConnectionAuthType + + // Category of the connection + Category *ConnectionCategory + ExpiryTime *time.Time + IsSharedToAll *bool + + // Store user metadata for this connection + Metadata map[string]*string + SharedUserList []*string + Target *string + + // Value details of the workspace connection. + Value *string + + // format for the workspace connection value + ValueFormat *ValueFormat + + // READ-ONLY + CreatedByWorkspaceArmID *string + + // READ-ONLY; Group based on connection category + Group *ConnectionGroup +} + +// GetWorkspaceConnectionPropertiesV2 implements the WorkspaceConnectionPropertiesV2Classification interface for type AADAuthTypeWorkspaceConnectionProperties. +func (a *AADAuthTypeWorkspaceConnectionProperties) GetWorkspaceConnectionPropertiesV2() *WorkspaceConnectionPropertiesV2 { + return &WorkspaceConnectionPropertiesV2{ + AuthType: a.AuthType, + Category: a.Category, + CreatedByWorkspaceArmID: a.CreatedByWorkspaceArmID, + ExpiryTime: a.ExpiryTime, + Group: a.Group, + IsSharedToAll: a.IsSharedToAll, + Metadata: a.Metadata, + SharedUserList: a.SharedUserList, + Target: a.Target, + Value: a.Value, + ValueFormat: a.ValueFormat, + } +} + // AKS - A Machine Learning compute based on AKS. type AKS struct { // REQUIRED; The type of compute @@ -98,6 +143,154 @@ type AKSSchemaProperties struct { SystemServices []*SystemService } +// APIKeyAuthWorkspaceConnectionProperties - This connection type covers the generic ApiKey auth connection categories, for +// examples: AzureOpenAI: Category:= AzureOpenAI AuthType:= ApiKey (as type discriminator) Credentials:= {ApiKey} as +// Microsoft.MachineLearning.AccountRP.Contracts.WorkspaceConnection.ApiKey Target:= {ApiBase} +// CognitiveService: Category:= CognitiveService AuthType:= ApiKey (as type discriminator) Credentials:= {SubscriptionKey} +// as Microsoft.MachineLearning.AccountRP.Contracts.WorkspaceConnection.ApiKey +// Target:= ServiceRegion={serviceRegion} +// CognitiveSearch: Category:= CognitiveSearch AuthType:= ApiKey (as type discriminator) Credentials:= {Key} as Microsoft.MachineLearning.AccountRP.Contracts.WorkspaceConnection.ApiKey +// Target:= +// {Endpoint} +// Use Metadata property bag for ApiType, ApiVersion, Kind and other metadata fields +type APIKeyAuthWorkspaceConnectionProperties struct { + // REQUIRED; Authentication type of the connection target + AuthType *ConnectionAuthType + + // Category of the connection + Category *ConnectionCategory + + // Api key object for workspace connection credential. + Credentials *WorkspaceConnectionAPIKey + ExpiryTime *time.Time + IsSharedToAll *bool + + // Store user metadata for this connection + Metadata map[string]*string + SharedUserList []*string + Target *string + + // Value details of the workspace connection. + Value *string + + // format for the workspace connection value + ValueFormat *ValueFormat + + // READ-ONLY + CreatedByWorkspaceArmID *string + + // READ-ONLY; Group based on connection category + Group *ConnectionGroup +} + +// GetWorkspaceConnectionPropertiesV2 implements the WorkspaceConnectionPropertiesV2Classification interface for type APIKeyAuthWorkspaceConnectionProperties. +func (a *APIKeyAuthWorkspaceConnectionProperties) GetWorkspaceConnectionPropertiesV2() *WorkspaceConnectionPropertiesV2 { + return &WorkspaceConnectionPropertiesV2{ + AuthType: a.AuthType, + Category: a.Category, + CreatedByWorkspaceArmID: a.CreatedByWorkspaceArmID, + ExpiryTime: a.ExpiryTime, + Group: a.Group, + IsSharedToAll: a.IsSharedToAll, + Metadata: a.Metadata, + SharedUserList: a.SharedUserList, + Target: a.Target, + Value: a.Value, + ValueFormat: a.ValueFormat, + } +} + +type AccessKeyAuthTypeWorkspaceConnectionProperties struct { + // REQUIRED; Authentication type of the connection target + AuthType *ConnectionAuthType + + // Category of the connection + Category *ConnectionCategory + Credentials *WorkspaceConnectionAccessKey + ExpiryTime *time.Time + IsSharedToAll *bool + + // Store user metadata for this connection + Metadata map[string]*string + SharedUserList []*string + Target *string + + // Value details of the workspace connection. + Value *string + + // format for the workspace connection value + ValueFormat *ValueFormat + + // READ-ONLY + CreatedByWorkspaceArmID *string + + // READ-ONLY; Group based on connection category + Group *ConnectionGroup +} + +// GetWorkspaceConnectionPropertiesV2 implements the WorkspaceConnectionPropertiesV2Classification interface for type AccessKeyAuthTypeWorkspaceConnectionProperties. +func (a *AccessKeyAuthTypeWorkspaceConnectionProperties) GetWorkspaceConnectionPropertiesV2() *WorkspaceConnectionPropertiesV2 { + return &WorkspaceConnectionPropertiesV2{ + AuthType: a.AuthType, + Category: a.Category, + CreatedByWorkspaceArmID: a.CreatedByWorkspaceArmID, + ExpiryTime: a.ExpiryTime, + Group: a.Group, + IsSharedToAll: a.IsSharedToAll, + Metadata: a.Metadata, + SharedUserList: a.SharedUserList, + Target: a.Target, + Value: a.Value, + ValueFormat: a.ValueFormat, + } +} + +// AccountKeyAuthTypeWorkspaceConnectionProperties - This connection type covers the account key connection for Azure storage +type AccountKeyAuthTypeWorkspaceConnectionProperties struct { + // REQUIRED; Authentication type of the connection target + AuthType *ConnectionAuthType + + // Category of the connection + Category *ConnectionCategory + Credentials *WorkspaceConnectionAccountKey + ExpiryTime *time.Time + IsSharedToAll *bool + + // Store user metadata for this connection + Metadata map[string]*string + SharedUserList []*string + Target *string + + // Value details of the workspace connection. + Value *string + + // format for the workspace connection value + ValueFormat *ValueFormat + + // READ-ONLY + CreatedByWorkspaceArmID *string + + // READ-ONLY; Group based on connection category + Group *ConnectionGroup +} + +// GetWorkspaceConnectionPropertiesV2 implements the WorkspaceConnectionPropertiesV2Classification interface for type AccountKeyAuthTypeWorkspaceConnectionProperties. +func (a *AccountKeyAuthTypeWorkspaceConnectionProperties) GetWorkspaceConnectionPropertiesV2() *WorkspaceConnectionPropertiesV2 { + return &WorkspaceConnectionPropertiesV2{ + AuthType: a.AuthType, + Category: a.Category, + CreatedByWorkspaceArmID: a.CreatedByWorkspaceArmID, + ExpiryTime: a.ExpiryTime, + Group: a.Group, + IsSharedToAll: a.IsSharedToAll, + Metadata: a.Metadata, + SharedUserList: a.SharedUserList, + Target: a.Target, + Value: a.Value, + ValueFormat: a.ValueFormat, + } +} + // AccountKeyDatastoreCredentials - Account key datastore credentials configuration. type AccountKeyDatastoreCredentials struct { // REQUIRED; [Required] Credential type used to authentication with storage. @@ -130,6 +323,15 @@ func (a *AccountKeyDatastoreSecrets) GetDatastoreSecrets() *DatastoreSecrets { } } +// AcrDetails - Details of ACR account to be used for the Registry +type AcrDetails struct { + // Details of system created ACR account to be used for the Registry + SystemCreatedAcrAccount *SystemCreatedAcrAccount + + // Details of user created ACR account to be used for the Registry + UserCreatedAcrAccount *UserCreatedAcrAccount +} + // AksComputeSecrets - Secrets related to a Machine Learning compute based on AKS. type AksComputeSecrets struct { // REQUIRED; The type of compute @@ -181,6 +383,31 @@ type AksNetworkingConfiguration struct { SubnetID *string } +type AllFeatures struct { + // REQUIRED; [Required] Specifies the feature filter to leverage when selecting features to calculate metrics over. + FilterType *MonitoringFeatureFilterType +} + +// GetMonitoringFeatureFilterBase implements the MonitoringFeatureFilterBaseClassification interface for type AllFeatures. +func (a *AllFeatures) GetMonitoringFeatureFilterBase() *MonitoringFeatureFilterBase { + return &MonitoringFeatureFilterBase{ + FilterType: a.FilterType, + } +} + +// AllNodes - All nodes means the service will be running on all of the nodes of the job +type AllNodes struct { + // REQUIRED; [Required] Type of the Nodes value + NodesValueType *NodesValueType +} + +// GetNodes implements the NodesClassification interface for type AllNodes. +func (a *AllNodes) GetNodes() *Nodes { + return &Nodes{ + NodesValueType: a.NodesValueType, + } +} + // AmlCompute - An Azure Machine Learning compute. type AmlCompute struct { // REQUIRED; The type of compute @@ -336,39 +563,6 @@ type AmlComputeSchema struct { Properties *AmlComputeProperties } -// AmlOperation - Azure Machine Learning workspace REST API operation -type AmlOperation struct { - // Display name of operation - Display *AmlOperationDisplay - - // Indicates whether the operation applies to data-plane - IsDataAction *bool - - // Operation name: {provider}/{resource}/{operation} - Name *string -} - -// AmlOperationDisplay - Display name of operation -type AmlOperationDisplay struct { - // The description for the operation. - Description *string - - // The operation that users can perform. - Operation *string - - // The resource provider name: Microsoft.MachineLearningExperimentation - Provider *string - - // The resource on which the operation is performed. - Resource *string -} - -// AmlOperationListResult - An array of operations supported by the resource provider. -type AmlOperationListResult struct { - // List of AML workspace operations supported by the AML workspace resource provider. - Value []*AmlOperation -} - // AmlToken - AML Token identity configuration. type AmlToken struct { // REQUIRED; [Required] Specifies the type of identity framework. @@ -382,6 +576,19 @@ func (a *AmlToken) GetIdentityConfiguration() *IdentityConfiguration { } } +// AmlTokenComputeIdentity - AML token compute identity definition. +type AmlTokenComputeIdentity struct { + // REQUIRED; [Required] Specifies the type of identity to use within the monitoring jobs. + ComputeIdentityType *MonitorComputeIdentityType +} + +// GetMonitorComputeIdentityBase implements the MonitorComputeIdentityBaseClassification interface for type AmlTokenComputeIdentity. +func (a *AmlTokenComputeIdentity) GetMonitorComputeIdentityBase() *MonitorComputeIdentityBase { + return &MonitorComputeIdentityBase{ + ComputeIdentityType: a.ComputeIdentityType, + } +} + // AmlUserFeature - Features enabled for a workspace type AmlUserFeature struct { // Describes the feature for user experience @@ -394,6 +601,27 @@ type AmlUserFeature struct { ID *string } +// AnonymousAccessCredential - Access credential with no credentials +type AnonymousAccessCredential struct { + // REQUIRED; [Required] Credential type used to authentication with storage. + CredentialType *DataReferenceCredentialType +} + +// GetDataReferenceCredential implements the DataReferenceCredentialClassification interface for type AnonymousAccessCredential. +func (a *AnonymousAccessCredential) GetDataReferenceCredential() *DataReferenceCredential { + return &DataReferenceCredential{ + CredentialType: a.CredentialType, + } +} + +// ArmResourceID - ARM ResourceId of a resource +type ArmResourceID struct { + // Arm ResourceId is in the format "/subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Storage/storageAccounts/{StorageAccountName}" + // or + // "/subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{AcrName}" + ResourceID *string +} + type AssetBase struct { // The asset description text. Description *string @@ -519,12 +747,18 @@ type AutoMLJob struct { // Is the asset archived? IsArchived *bool + // Notification setting for the job + NotificationSetting *NotificationSetting + // Mapping of output data bindings used in the job. Outputs map[string]JobOutputClassification // The asset property dictionary. Properties map[string]*string + // Queue settings for the job + QueueSettings *QueueSettings + // Compute Resource configuration for the job. Resources *JobResourceConfiguration @@ -541,18 +775,19 @@ type AutoMLJob struct { // GetJobBaseProperties implements the JobBasePropertiesClassification interface for type AutoMLJob. func (a *AutoMLJob) GetJobBaseProperties() *JobBaseProperties { return &JobBaseProperties{ - ComponentID: a.ComponentID, - ComputeID: a.ComputeID, - Description: a.Description, - DisplayName: a.DisplayName, - ExperimentName: a.ExperimentName, - Identity: a.Identity, - IsArchived: a.IsArchived, - JobType: a.JobType, - Properties: a.Properties, - Services: a.Services, - Status: a.Status, - Tags: a.Tags, + ComponentID: a.ComponentID, + ComputeID: a.ComputeID, + Description: a.Description, + DisplayName: a.DisplayName, + ExperimentName: a.ExperimentName, + Identity: a.Identity, + IsArchived: a.IsArchived, + JobType: a.JobType, + NotificationSetting: a.NotificationSetting, + Properties: a.Properties, + Services: a.Services, + Status: a.Status, + Tags: a.Tags, } } @@ -663,9 +898,15 @@ type AzureBlobDatastore struct { // Protocol used to communicate with the storage account. Protocol *string + // Azure Resource Group name + ResourceGroup *string + // Indicates which identity to use to authenticate service data access to customer's storage. ServiceDataAccessAuthIdentity *ServiceDataAccessAuthIdentity + // Azure Subscription Id + SubscriptionID *string + // Tag dictionary. Tags can be added, removed, and updated. Tags map[string]*string @@ -702,9 +943,15 @@ type AzureDataLakeGen1Datastore struct { // The asset property dictionary. Properties map[string]*string + // Azure Resource Group name + ResourceGroup *string + // Indicates which identity to use to authenticate service data access to customer's storage. ServiceDataAccessAuthIdentity *ServiceDataAccessAuthIdentity + // Azure Subscription Id + SubscriptionID *string + // Tag dictionary. Tags can be added, removed, and updated. Tags map[string]*string @@ -750,9 +997,15 @@ type AzureDataLakeGen2Datastore struct { // Protocol used to communicate with the storage account. Protocol *string + // Azure Resource Group name + ResourceGroup *string + // Indicates which identity to use to authenticate service data access to customer's storage. ServiceDataAccessAuthIdentity *ServiceDataAccessAuthIdentity + // Azure Subscription Id + SubscriptionID *string + // Tag dictionary. Tags can be added, removed, and updated. Tags map[string]*string @@ -772,6 +1025,32 @@ func (a *AzureDataLakeGen2Datastore) GetDatastoreProperties() *DatastoreProperti } } +// AzureDatastore - Base definition for Azure datastore contents configuration. +type AzureDatastore struct { + // Azure Resource Group name + ResourceGroup *string + + // Azure Subscription Id + SubscriptionID *string +} + +// AzureDevOpsWebhook - Webhook details specific for Azure DevOps +type AzureDevOpsWebhook struct { + // REQUIRED; [Required] Specifies the type of service to send a callback + WebhookType *WebhookType + + // Send callback on a specified notification event + EventType *string +} + +// GetWebhook implements the WebhookClassification interface for type AzureDevOpsWebhook. +func (a *AzureDevOpsWebhook) GetWebhook() *Webhook { + return &Webhook{ + EventType: a.EventType, + WebhookType: a.WebhookType, + } +} + // AzureFileDatastore - Azure File datastore configuration. type AzureFileDatastore struct { // REQUIRED; [Required] Storage account name. @@ -798,9 +1077,15 @@ type AzureFileDatastore struct { // Protocol used to communicate with the storage account. Protocol *string + // Azure Resource Group name + ResourceGroup *string + // Indicates which identity to use to authenticate service data access to customer's storage. ServiceDataAccessAuthIdentity *ServiceDataAccessAuthIdentity + // Azure Subscription Id + SubscriptionID *string + // Tag dictionary. Tags can be added, removed, and updated. Tags map[string]*string @@ -879,6 +1164,17 @@ type BatchDeployment struct { Type *string } +// BatchDeploymentConfiguration - Properties relevant to different deployment types. +type BatchDeploymentConfiguration struct { + // REQUIRED; [Required] The type of the deployment + DeploymentConfigurationType *BatchDeploymentConfigurationType +} + +// GetBatchDeploymentConfiguration implements the BatchDeploymentConfigurationClassification interface for type BatchDeploymentConfiguration. +func (b *BatchDeploymentConfiguration) GetBatchDeploymentConfiguration() *BatchDeploymentConfiguration { + return b +} + // BatchDeploymentProperties - Batch inference settings per deployment. type BatchDeploymentProperties struct { // Code configuration for the endpoint deployment. @@ -887,6 +1183,9 @@ type BatchDeploymentProperties struct { // Compute target for batch inference operation. Compute *string + // Properties relevant to different deployment types. + DeploymentConfiguration BatchDeploymentConfigurationClassification + // Description of the endpoint deployment. Description *string @@ -1020,6 +1319,31 @@ type BatchEndpointTrackedResourceArmPaginatedResult struct { Value []*BatchEndpoint } +// BatchPipelineComponentDeploymentConfiguration - Properties for a Batch Pipeline Component Deployment. +type BatchPipelineComponentDeploymentConfiguration struct { + // REQUIRED; [Required] The type of the deployment + DeploymentConfigurationType *BatchDeploymentConfigurationType + + // The ARM id of the component to be run. + ComponentID *IDAssetReference + + // The description which will be applied to the job. + Description *string + + // Run-time settings for the pipeline job. + Settings map[string]*string + + // The tags which will be applied to the job. + Tags map[string]*string +} + +// GetBatchDeploymentConfiguration implements the BatchDeploymentConfigurationClassification interface for type BatchPipelineComponentDeploymentConfiguration. +func (b *BatchPipelineComponentDeploymentConfiguration) GetBatchDeploymentConfiguration() *BatchDeploymentConfiguration { + return &BatchDeploymentConfiguration{ + DeploymentConfigurationType: b.DeploymentConfigurationType, + } +} + // BatchRetrySettings - Retry settings for a batch inference operation. type BatchRetrySettings struct { // Maximum retry count for a mini-batch @@ -1042,6 +1366,29 @@ func (b *BayesianSamplingAlgorithm) GetSamplingAlgorithm() *SamplingAlgorithm { } } +// BindOptions - Describes the bind options for the container +type BindOptions struct { + // Indicate whether to create host path. + CreateHostPath *bool + + // Type of Bind Option + Propagation *string + + // Mention the selinux options. + Selinux *string +} + +type BlobReferenceForConsumptionDto struct { + // Blob URI path for client to upload data. Example: https://blob.windows.core.net/Container/Path + BlobURI *string + + // Credential info to access storage account + Credential PendingUploadCredentialDtoClassification + + // Arm ID of the storage account to use + StorageAccountArmID *string +} + // BuildContext - Configuration settings for Docker build context type BuildContext struct { // REQUIRED; [Required] URI of the Docker build context used to build the image. Supports blob URIs on environment creation @@ -1052,6 +1399,64 @@ type BuildContext struct { DockerfilePath *string } +type CategoricalDataDriftMetricThreshold struct { + // REQUIRED; [Required] Specifies the data type of the metric threshold. + DataType *MonitoringFeatureDataType + + // REQUIRED; [Required] The categorical data drift metric to calculate. + Metric *CategoricalDataDriftMetric + + // The threshold value. If null, a default value will be set depending on the selected metric. + Threshold *MonitoringThreshold +} + +// GetDataDriftMetricThresholdBase implements the DataDriftMetricThresholdBaseClassification interface for type CategoricalDataDriftMetricThreshold. +func (c *CategoricalDataDriftMetricThreshold) GetDataDriftMetricThresholdBase() *DataDriftMetricThresholdBase { + return &DataDriftMetricThresholdBase{ + DataType: c.DataType, + Threshold: c.Threshold, + } +} + +type CategoricalDataQualityMetricThreshold struct { + // REQUIRED; [Required] Specifies the data type of the metric threshold. + DataType *MonitoringFeatureDataType + + // REQUIRED; [Required] The categorical data quality metric to calculate. + Metric *CategoricalDataQualityMetric + + // The threshold value. If null, a default value will be set depending on the selected metric. + Threshold *MonitoringThreshold +} + +// GetDataQualityMetricThresholdBase implements the DataQualityMetricThresholdBaseClassification interface for type CategoricalDataQualityMetricThreshold. +func (c *CategoricalDataQualityMetricThreshold) GetDataQualityMetricThresholdBase() *DataQualityMetricThresholdBase { + return &DataQualityMetricThresholdBase{ + DataType: c.DataType, + Threshold: c.Threshold, + } +} + +type CategoricalPredictionDriftMetricThreshold struct { + // REQUIRED; [Required] Specifies the data type of the metric threshold. + DataType *MonitoringFeatureDataType + + // REQUIRED; [Required] The categorical prediction drift metric to calculate. + Metric *CategoricalPredictionDriftMetric + + // The threshold value. If null, a default value will be set depending on the selected metric. + Threshold *MonitoringThreshold +} + +// GetPredictionDriftMetricThresholdBase implements the PredictionDriftMetricThresholdBaseClassification interface for type +// CategoricalPredictionDriftMetricThreshold. +func (c *CategoricalPredictionDriftMetricThreshold) GetPredictionDriftMetricThresholdBase() *PredictionDriftMetricThresholdBase { + return &PredictionDriftMetricThresholdBase{ + DataType: c.DataType, + Threshold: c.Threshold, + } +} + // CertificateDatastoreCredentials - Certificate datastore credentials configuration. type CertificateDatastoreCredentials struct { // REQUIRED; [Required] Service principal client ID. @@ -1253,6 +1658,9 @@ type CodeContainerProperties struct { // READ-ONLY; The next auto incremental version NextVersion *string + + // READ-ONLY; Provisioning state for the code container. + ProvisioningState *AssetProvisioningState } // CodeContainerResourceArmPaginatedResult - A paginated list of CodeContainer entities. @@ -1301,6 +1709,9 @@ type CodeVersionProperties struct { // Tag dictionary. Tags can be added, removed, and updated. Tags map[string]*string + + // READ-ONLY; Provisioning state for the code version. + ProvisioningState *AssetProvisioningState } // CodeVersionResourceArmPaginatedResult - A paginated list of CodeVersion entities. @@ -1312,6 +1723,22 @@ type CodeVersionResourceArmPaginatedResult struct { Value []*CodeVersion } +type Collection struct { + // The msi client id used to collect logging to blob storage. If it's null,backend will pick a registered endpoint identity + // to auth. + ClientID *string + + // Enable or disable data collection. + DataCollectionMode *DataCollectionMode + + // The data asset arm resource id. Client side will ensure data asset is pointing to the blob storage, and backend will collect + // data to the blob storage. + DataID *string + + // The sampling rate for collection. Sampling rate 1.0 means we collect 100% of data by default. + SamplingRate *float64 +} + // ColumnTransformer - Column transformer parameters. type ColumnTransformer struct { // Fields to apply transformer logic on. @@ -1369,12 +1796,18 @@ type CommandJob struct { // Command Job limit. Limits *CommandJobLimits + // Notification setting for the job + NotificationSetting *NotificationSetting + // Mapping of output data bindings used in the job. Outputs map[string]JobOutputClassification // The asset property dictionary. Properties map[string]*string + // Queue settings for the job + QueueSettings *QueueSettings + // Compute Resource configuration for the job. Resources *JobResourceConfiguration @@ -1394,18 +1827,19 @@ type CommandJob struct { // GetJobBaseProperties implements the JobBasePropertiesClassification interface for type CommandJob. func (c *CommandJob) GetJobBaseProperties() *JobBaseProperties { return &JobBaseProperties{ - ComponentID: c.ComponentID, - ComputeID: c.ComputeID, - Description: c.Description, - DisplayName: c.DisplayName, - ExperimentName: c.ExperimentName, - Identity: c.Identity, - IsArchived: c.IsArchived, - JobType: c.JobType, - Properties: c.Properties, - Services: c.Services, - Status: c.Status, - Tags: c.Tags, + ComponentID: c.ComponentID, + ComputeID: c.ComputeID, + Description: c.Description, + DisplayName: c.DisplayName, + ExperimentName: c.ExperimentName, + Identity: c.Identity, + IsArchived: c.IsArchived, + JobType: c.JobType, + NotificationSetting: c.NotificationSetting, + Properties: c.Properties, + Services: c.Services, + Status: c.Status, + Tags: c.Tags, } } @@ -1464,6 +1898,9 @@ type ComponentContainerProperties struct { // READ-ONLY; The next auto incremental version NextVersion *string + + // READ-ONLY; Provisioning state for the component container. + ProvisioningState *AssetProvisioningState } // ComponentContainerResourceArmPaginatedResult - A paginated list of ComponentContainer entities. @@ -1512,6 +1949,9 @@ type ComponentVersionProperties struct { // Tag dictionary. Tags can be added, removed, and updated. Tags map[string]*string + + // READ-ONLY; Provisioning state for the component version. + ProvisioningState *AssetProvisioningState } // ComponentVersionResourceArmPaginatedResult - A paginated list of ComponentVersion entities. @@ -1743,6 +2183,9 @@ type ComputeInstanceProperties struct { // The Compute Instance Authorization type. Available values are personal (default). ComputeInstanceAuthorizationType *ComputeInstanceAuthorizationType + // List of Custom Services added to the compute. + CustomServices []*CustomService + // Enable or disable node public IP address provisioning. Possible values are: Possible values are: true - Indicates that // the compute nodes will have public IPs provisioned. false - Indicates that the // compute nodes will have a private endpoint and no public IPs. @@ -1754,6 +2197,9 @@ type ComputeInstanceProperties struct { // Specifies policy and settings for SSH access. SSHSettings *ComputeInstanceSSHSettings + // The list of schedules to be applied on the computes. + Schedules *ComputeSchedules + // Details of customized scripts to execute for setting up the cluster. SetupScripts *SetupScripts @@ -1787,8 +2233,8 @@ type ComputeInstanceProperties struct { // READ-ONLY; The last operation on ComputeInstance. LastOperation *ComputeInstanceLastOperation - // READ-ONLY; The list of schedules to be applied on the computes. - Schedules *ComputeSchedules + // READ-ONLY; Returns metadata about the operating system image for this compute instance. + OSImageMetadata *ImageMetadata // READ-ONLY; The current state of this ComputeInstance. State *ComputeInstanceState @@ -1826,6 +2272,20 @@ type ComputeInstanceVersion struct { Runtime *string } +type ComputeRecurrenceSchedule struct { + // REQUIRED; [Required] List of hours for the schedule. + Hours []*int32 + + // REQUIRED; [Required] List of minutes for the schedule. + Minutes []*int32 + + // List of month days for the schedule + MonthDays []*int32 + + // List of days for the schedule. + WeekDays []*ComputeWeekDay +} + // ComputeResource - Machine Learning compute object wrapped into ARM resource envelope. type ComputeResource struct { // The identity of the resource. @@ -1861,6 +2321,11 @@ type ComputeResourceSchema struct { Properties ComputeClassification } +// ComputeRuntimeDto - Compute runtime config for feature store type workspace. +type ComputeRuntimeDto struct { + SparkRuntimeVersion *string +} + // ComputeSchedules - The list of schedules to be applied on the computes type ComputeSchedules struct { // The list of compute start stop schedules to be applied. @@ -1882,10 +2347,10 @@ type ComputeStartStopSchedule struct { Action *ComputePowerAction // Required if triggerType is Cron. - Cron *CronTrigger + Cron *Cron // Required if triggerType is Recurrence. - Recurrence *RecurrenceTrigger + Recurrence *Recurrence // [Deprecated] Not used any more. Schedule *ScheduleBase @@ -1894,7 +2359,7 @@ type ComputeStartStopSchedule struct { Status *ScheduleStatus // [Required] The schedule trigger type. - TriggerType *TriggerType + TriggerType *ComputeTriggerType // READ-ONLY; A system assigned id for the schedule. ID *string @@ -1923,11 +2388,44 @@ type ContainerResourceSettings struct { Memory *string } +type ContentSafety struct { + // REQUIRED; [Required] Specifies the status of content safety. + ContentSafetyStatus *ContentSafetyStatus +} + type CosmosDbSettings struct { // The throughput of the collections in cosmosdb database CollectionsThroughput *int32 } +type CreateMonitorAction struct { + // REQUIRED; [Required] Specifies the action type of the schedule + ActionType *ScheduleActionType + + // REQUIRED; [Required] Defines the monitor. + MonitorDefinition *MonitorDefinition +} + +// GetScheduleActionBase implements the ScheduleActionBaseClassification interface for type CreateMonitorAction. +func (c *CreateMonitorAction) GetScheduleActionBase() *ScheduleActionBase { + return &ScheduleActionBase{ + ActionType: c.ActionType, + } +} + +// Cron - The workflow trigger cron for ComputeStartStop schedule type. +type Cron struct { + // [Required] Specifies cron expression of schedule. The expression should follow NCronTab format. + Expression *string + + // The start time in yyyy-MM-ddTHH:mm:ss format. + StartTime *string + + // Specifies time zone in which the schedule runs. TimeZone should follow Windows time zone format. Refer: + // https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/default-time-zones?view=windows-11 + TimeZone *string +} + type CronTrigger struct { // REQUIRED; [Required] Specifies cron expression of schedule. The expression should follow NCronTab format. Expression *string @@ -1974,11 +2472,75 @@ func (c *CustomForecastHorizon) GetForecastHorizon() *ForecastHorizon { } } -type CustomModelJobInput struct { - // REQUIRED; [Required] Specifies the type of job. - JobInputType *JobInputType +// CustomKeys - Custom Keys credential object +type CustomKeys struct { + // Dictionary of + Keys map[string]*string +} - // REQUIRED; [Required] Input Asset URI. +// CustomKeysWorkspaceConnectionProperties - Category:= CustomKeys AuthType:= CustomKeys (as type discriminator) Credentials:= +// {CustomKeys} as Microsoft.MachineLearning.AccountRP.Contracts.WorkspaceConnection.CustomKeys Target:= {any value} Use +// Metadata property bag for ApiVersion and other metadata fields +type CustomKeysWorkspaceConnectionProperties struct { + // REQUIRED; Authentication type of the connection target + AuthType *ConnectionAuthType + + // Category of the connection + Category *ConnectionCategory + + // Custom Keys credential object + Credentials *CustomKeys + ExpiryTime *time.Time + IsSharedToAll *bool + + // Store user metadata for this connection + Metadata map[string]*string + SharedUserList []*string + Target *string + + // Value details of the workspace connection. + Value *string + + // format for the workspace connection value + ValueFormat *ValueFormat + + // READ-ONLY + CreatedByWorkspaceArmID *string + + // READ-ONLY; Group based on connection category + Group *ConnectionGroup +} + +// GetWorkspaceConnectionPropertiesV2 implements the WorkspaceConnectionPropertiesV2Classification interface for type CustomKeysWorkspaceConnectionProperties. +func (c *CustomKeysWorkspaceConnectionProperties) GetWorkspaceConnectionPropertiesV2() *WorkspaceConnectionPropertiesV2 { + return &WorkspaceConnectionPropertiesV2{ + AuthType: c.AuthType, + Category: c.Category, + CreatedByWorkspaceArmID: c.CreatedByWorkspaceArmID, + ExpiryTime: c.ExpiryTime, + Group: c.Group, + IsSharedToAll: c.IsSharedToAll, + Metadata: c.Metadata, + SharedUserList: c.SharedUserList, + Target: c.Target, + Value: c.Value, + ValueFormat: c.ValueFormat, + } +} + +type CustomMetricThreshold struct { + // REQUIRED; [Required] The user-defined metric to calculate. + Metric *string + + // The threshold value. If null, a default value will be set depending on the selected metric. + Threshold *MonitoringThreshold +} + +type CustomModelJobInput struct { + // REQUIRED; [Required] Specifies the type of job. + JobInputType *JobInputType + + // REQUIRED; [Required] Input Asset URI. URI *string // Description for the input. @@ -2018,6 +2580,38 @@ func (c *CustomModelJobOutput) GetJobOutput() *JobOutput { } } +type CustomMonitoringSignal struct { + // REQUIRED; [Required] Reference to the component asset used to calculate the custom metrics. + ComponentID *string + + // REQUIRED; [Required] A list of metrics to calculate and their associated thresholds. + MetricThresholds []*CustomMetricThreshold + + // REQUIRED; [Required] Specifies the type of signal to monitor. + SignalType *MonitoringSignalType + + // Monitoring assets to take as input. Key is the component input port name, value is the data asset. + InputAssets map[string]MonitoringInputDataBaseClassification + + // Extra component parameters to take as input. Key is the component literal input port name, value is the parameter value. + Inputs map[string]JobInputClassification + + // The current notification mode for this signal. + NotificationTypes []*MonitoringNotificationType + + // Property dictionary. Properties can be added, but not removed or altered. + Properties map[string]*string +} + +// GetMonitoringSignalBase implements the MonitoringSignalBaseClassification interface for type CustomMonitoringSignal. +func (c *CustomMonitoringSignal) GetMonitoringSignalBase() *MonitoringSignalBase { + return &MonitoringSignalBase{ + NotificationTypes: c.NotificationTypes, + Properties: c.Properties, + SignalType: c.SignalType, + } +} + // CustomNCrossValidations - N-Cross validations are specified by user. type CustomNCrossValidations struct { // REQUIRED; [Required] Mode for determining N-Cross validations. @@ -2049,6 +2643,30 @@ func (c *CustomSeasonality) GetSeasonality() *Seasonality { } } +// CustomService - Specifies the custom service configuration +type CustomService struct { + // OPTIONAL; Contains additional key/value pairs not defined in the schema. + AdditionalProperties map[string]any + + // Describes the docker settings for the image + Docker *Docker + + // Configuring the endpoints for the container + Endpoints []*Endpoint + + // Environment Variable for the container + EnvironmentVariables map[string]*EnvironmentVariable + + // Describes the Image Specifications + Image *Image + + // Name of the Custom Service + Name *string + + // Configuring the volumes for the container + Volumes []*VolumeDefinition +} + type CustomTargetLags struct { // REQUIRED; [Required] Set target lags mode - Auto/Custom Mode *TargetLagsMode @@ -2079,6 +2697,24 @@ func (c *CustomTargetRollingWindowSize) GetTargetRollingWindowSize() *TargetRoll } } +type DataCollector struct { + // REQUIRED; [Required] The collection configuration. Each collection has it own configuration to collect model data and the + // name of collection can be arbitrary string. Model data collector can be used for either + // payload logging or custom logging or both of them. Collection request and response are reserved for payload logging, others + // are for custom logging. + Collections map[string]*Collection + + // The request logging configuration for mdc, it includes advanced logging settings for all collections. It's optional. + RequestLogging *RequestLogging + + // When model data is collected to blob storage, we need to roll the data to different path to avoid logging all of them in + // a single blob file. If the rolling rate is hour, all data will be collected in + // the blob path /yyyy/MM/dd/HH/. If it's day, all data will be collected in blob path /yyyy/MM/dd/. The other benefit of + // rolling path is that model monitoring ui is able to select a time range of data + // very quickly. + RollingRate *RollingRateType +} + // DataContainer - Azure Resource Manager resource envelope. type DataContainer struct { // REQUIRED; [Required] Additional attributes of the entity. @@ -2130,6 +2766,57 @@ type DataContainerResourceArmPaginatedResult struct { Value []*DataContainer } +type DataDriftMetricThresholdBase struct { + // REQUIRED; [Required] Specifies the data type of the metric threshold. + DataType *MonitoringFeatureDataType + + // The threshold value. If null, a default value will be set depending on the selected metric. + Threshold *MonitoringThreshold +} + +// GetDataDriftMetricThresholdBase implements the DataDriftMetricThresholdBaseClassification interface for type DataDriftMetricThresholdBase. +func (d *DataDriftMetricThresholdBase) GetDataDriftMetricThresholdBase() *DataDriftMetricThresholdBase { + return d +} + +type DataDriftMonitoringSignal struct { + // REQUIRED; [Required] A list of metrics to calculate and their associated thresholds. + MetricThresholds []DataDriftMetricThresholdBaseClassification + + // REQUIRED; [Required] The data which drift will be calculated for. + ProductionData MonitoringInputDataBaseClassification + + // REQUIRED; [Required] The data to calculate drift against. + ReferenceData MonitoringInputDataBaseClassification + + // REQUIRED; [Required] Specifies the type of signal to monitor. + SignalType *MonitoringSignalType + + // A dictionary that maps feature names to their respective data types. + FeatureDataTypeOverride map[string]*MonitoringFeatureDataType + + // The settings for computing feature importance. + FeatureImportanceSettings *FeatureImportanceSettings + + // The feature filter which identifies which feature to calculate drift over. + Features MonitoringFeatureFilterBaseClassification + + // The current notification mode for this signal. + NotificationTypes []*MonitoringNotificationType + + // Property dictionary. Properties can be added, but not removed or altered. + Properties map[string]*string +} + +// GetMonitoringSignalBase implements the MonitoringSignalBaseClassification interface for type DataDriftMonitoringSignal. +func (d *DataDriftMonitoringSignal) GetMonitoringSignalBase() *MonitoringSignalBase { + return &MonitoringSignalBase{ + NotificationTypes: d.NotificationTypes, + Properties: d.Properties, + SignalType: d.SignalType, + } +} + // DataFactory - A DataFactory compute. type DataFactory struct { // REQUIRED; The type of compute @@ -2259,6 +2946,66 @@ func (d *DataPathAssetReference) GetAssetReferenceBase() *AssetReferenceBase { } } +type DataQualityMetricThresholdBase struct { + // REQUIRED; [Required] Specifies the data type of the metric threshold. + DataType *MonitoringFeatureDataType + + // The threshold value. If null, a default value will be set depending on the selected metric. + Threshold *MonitoringThreshold +} + +// GetDataQualityMetricThresholdBase implements the DataQualityMetricThresholdBaseClassification interface for type DataQualityMetricThresholdBase. +func (d *DataQualityMetricThresholdBase) GetDataQualityMetricThresholdBase() *DataQualityMetricThresholdBase { + return d +} + +type DataQualityMonitoringSignal struct { + // REQUIRED; [Required] A list of metrics to calculate and their associated thresholds. + MetricThresholds []DataQualityMetricThresholdBaseClassification + + // REQUIRED; [Required] The data produced by the production service which drift will be calculated for. + ProductionData MonitoringInputDataBaseClassification + + // REQUIRED; [Required] The data to calculate drift against. + ReferenceData MonitoringInputDataBaseClassification + + // REQUIRED; [Required] Specifies the type of signal to monitor. + SignalType *MonitoringSignalType + + // A dictionary that maps feature names to their respective data types. + FeatureDataTypeOverride map[string]*MonitoringFeatureDataType + + // The settings for computing feature importance. + FeatureImportanceSettings *FeatureImportanceSettings + + // The features to calculate drift over. + Features MonitoringFeatureFilterBaseClassification + + // The current notification mode for this signal. + NotificationTypes []*MonitoringNotificationType + + // Property dictionary. Properties can be added, but not removed or altered. + Properties map[string]*string +} + +// GetMonitoringSignalBase implements the MonitoringSignalBaseClassification interface for type DataQualityMonitoringSignal. +func (d *DataQualityMonitoringSignal) GetMonitoringSignalBase() *MonitoringSignalBase { + return &MonitoringSignalBase{ + NotificationTypes: d.NotificationTypes, + Properties: d.Properties, + SignalType: d.SignalType, + } +} + +// DataReferenceCredential base class +type DataReferenceCredential struct { + // REQUIRED; [Required] Credential type used to authentication with storage. + CredentialType *DataReferenceCredentialType +} + +// GetDataReferenceCredential implements the DataReferenceCredentialClassification interface for type DataReferenceCredential. +func (d *DataReferenceCredential) GetDataReferenceCredential() *DataReferenceCredential { return d } + // DataVersionBase - Azure Resource Manager resource envelope. type DataVersionBase struct { // REQUIRED; [Required] Additional attributes of the entity. @@ -2282,7 +3029,7 @@ type DataVersionBaseProperties struct { // REQUIRED; [Required] Specifies the type of data. DataType *DataType - // REQUIRED; [Required] Uri of the data. Usage/meaning depends on Microsoft.MachineLearning.ManagementFrontEnd.Contracts.V20221001.Assets.DataVersionBase.DataType + // REQUIRED; [Required] Uri of the data. Example: https://go.microsoft.com/fwlink/?linkid=2202330 DataURI *string // The asset description text. @@ -2509,6 +3256,18 @@ type DeploymentResourceConfiguration struct { Properties map[string]any } +// DestinationAsset - Publishing destination registry asset information +type DestinationAsset struct { + // Destination asset name + DestinationName *string + + // Destination asset version + DestinationVersion *string + + // Destination registry name + RegistryName *string +} + type DiagnoseRequestProperties struct { // Setting for diagnosing dependent application insights ApplicationInsights map[string]any @@ -2583,6 +3342,34 @@ func (d *DistributionConfiguration) GetDistributionConfiguration() *Distribution return d } +// Docker container configuration +type Docker struct { + // OPTIONAL; Contains additional key/value pairs not defined in the schema. + AdditionalProperties map[string]any + + // Indicate whether container shall run in privileged or non-privileged mode. + Privileged *bool +} + +// DockerCredential - Credential for docker with username and password +type DockerCredential struct { + // REQUIRED; [Required] Credential type used to authentication with storage. + CredentialType *DataReferenceCredentialType + + // DockerCredential user password + Password *string + + // DockerCredential user name + UserName *string +} + +// GetDataReferenceCredential implements the DataReferenceCredentialClassification interface for type DockerCredential. +func (d *DockerCredential) GetDataReferenceCredential() *DataReferenceCredential { + return &DataReferenceCredential{ + CredentialType: d.CredentialType, + } +} + // EarlyTerminationPolicy - Early termination policies enable canceling poor-performing runs before they complete type EarlyTerminationPolicy struct { // REQUIRED; [Required] Name of policy configuration @@ -2609,6 +3396,11 @@ type EncryptionKeyVaultProperties struct { IdentityClientID *string } +type EncryptionKeyVaultUpdateProperties struct { + // REQUIRED + KeyIdentifier *string +} + type EncryptionProperty struct { // REQUIRED; Customer Key vault properties. KeyVaultProperties *EncryptionKeyVaultProperties @@ -2620,6 +3412,29 @@ type EncryptionProperty struct { Identity *IdentityForCmk } +type EncryptionUpdateProperties struct { + // REQUIRED + KeyVaultProperties *EncryptionKeyVaultUpdateProperties +} + +// Endpoint - Describes the endpoint configuration for the container +type Endpoint struct { + // Host IP over which the application is exposed from the container + HostIP *string + + // Name of the Endpoint + Name *string + + // Protocol over which communication will happen over this endpoint + Protocol *Protocol + + // Port over which the application is exposed from container. + Published *int32 + + // Application port inside the container. + Target *int32 +} + // EndpointAuthKeys - Keys for endpoint authentication. type EndpointAuthKeys struct { // The primary key. @@ -2737,6 +3552,9 @@ type EnvironmentContainerProperties struct { // READ-ONLY; The next auto incremental version NextVersion *string + + // READ-ONLY; Provisioning state for the environment container. + ProvisioningState *AssetProvisioningState } // EnvironmentContainerResourceArmPaginatedResult - A paginated list of EnvironmentContainer entities. @@ -2748,6 +3566,18 @@ type EnvironmentContainerResourceArmPaginatedResult struct { Value []*EnvironmentContainer } +// EnvironmentVariable - Environment Variables for the container +type EnvironmentVariable struct { + // OPTIONAL; Contains additional key/value pairs not defined in the schema. + AdditionalProperties map[string]any + + // Type of the Environment Variable. Possible values are: local - For local variable + Type *EnvironmentVariableType + + // Value of the Environment variable + Value *string +} + // EnvironmentVersion - Azure Resource Manager resource envelope. type EnvironmentVersion struct { // REQUIRED; [Required] Additional attributes of the entity. @@ -2798,11 +3628,17 @@ type EnvironmentVersionProperties struct { // The asset property dictionary. Properties map[string]*string + // Stage in the environment lifecycle assigned to this environment + Stage *string + // Tag dictionary. Tags can be added, removed, and updated. Tags map[string]*string // READ-ONLY; Environment type is either user managed or curated by the Azure ML service EnvironmentType *EnvironmentType + + // READ-ONLY; Provisioning state for the environment version. + ProvisioningState *AssetProvisioningState } // EnvironmentVersionResourceArmPaginatedResult - A paginated list of EnvironmentVersion entities. @@ -2894,116 +3730,531 @@ type FQDNEndpointsProperties struct { Endpoints []*FQDNEndpoint } -// FeaturizationSettings - Featurization Configuration. -type FeaturizationSettings struct { - // Dataset language, useful for the text data. - DatasetLanguage *string -} +// Feature - Azure Resource Manager resource envelope. +type Feature struct { + // REQUIRED; [Required] Additional attributes of the entity. + Properties *FeatureProperties -type FlavorData struct { - // Model flavor-specific data. - Data map[string]*string -} + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string -// ForecastHorizon - The desired maximum forecast horizon in units of time-series frequency. -type ForecastHorizon struct { - // REQUIRED; [Required] Set forecast horizon value selection mode. - Mode *ForecastHorizonMode + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string } -// GetForecastHorizon implements the ForecastHorizonClassification interface for type ForecastHorizon. -func (f *ForecastHorizon) GetForecastHorizon() *ForecastHorizon { return f } +type FeatureAttributionDriftMonitoringSignal struct { + // REQUIRED; [Required] The settings for computing feature importance. + FeatureImportanceSettings *FeatureImportanceSettings -// Forecasting task in AutoML Table vertical. -type Forecasting struct { - // REQUIRED; [Required] Task type for AutoMLJob. - TaskType *TaskType + // REQUIRED; [Required] A list of metrics to calculate and their associated thresholds. + MetricThreshold *FeatureAttributionMetricThreshold - // REQUIRED; [Required] Training data input. - TrainingData *MLTableJobInput + // REQUIRED; [Required] The data which drift will be calculated for. + ProductionData []MonitoringInputDataBaseClassification - // Columns to use for CVSplit data. - CvSplitColumnNames []*string + // REQUIRED; [Required] The data to calculate drift against. + ReferenceData MonitoringInputDataBaseClassification - // Featurization inputs needed for AutoML job. - FeaturizationSettings *TableVerticalFeaturizationSettings + // REQUIRED; [Required] Specifies the type of signal to monitor. + SignalType *MonitoringSignalType - // Forecasting task specific inputs. - ForecastingSettings *ForecastingSettings + // A dictionary that maps feature names to their respective data types. + FeatureDataTypeOverride map[string]*MonitoringFeatureDataType - // Execution constraints for AutoMLJob. - LimitSettings *TableVerticalLimitSettings + // The current notification mode for this signal. + NotificationTypes []*MonitoringNotificationType - // Log verbosity for the job. - LogVerbosity *LogVerbosity + // Property dictionary. Properties can be added, but not removed or altered. + Properties map[string]*string +} - // Number of cross validation folds to be applied on training dataset when validation dataset is not provided. - NCrossValidations NCrossValidationsClassification +// GetMonitoringSignalBase implements the MonitoringSignalBaseClassification interface for type FeatureAttributionDriftMonitoringSignal. +func (f *FeatureAttributionDriftMonitoringSignal) GetMonitoringSignalBase() *MonitoringSignalBase { + return &MonitoringSignalBase{ + NotificationTypes: f.NotificationTypes, + Properties: f.Properties, + SignalType: f.SignalType, + } +} - // Primary metric for forecasting task. - PrimaryMetric *ForecastingPrimaryMetrics +type FeatureAttributionMetricThreshold struct { + // REQUIRED; [Required] The feature attribution metric to calculate. + Metric *FeatureAttributionMetric - // Target column name: This is prediction values column. Also known as label column name in context of classification tasks. - TargetColumnName *string + // The threshold value. If null, a default value will be set depending on the selected metric. + Threshold *MonitoringThreshold +} - // Test data input. - TestData *MLTableJobInput +type FeatureImportanceSettings struct { + // The mode of operation for computing feature importance. + Mode *FeatureImportanceMode - // The fraction of test dataset that needs to be set aside for validation purpose. Values between (0.0 , 1.0) Applied when - // validation dataset is not provided. - TestDataSize *float64 + // The name of the target column within the input data asset. + TargetColumn *string +} - // Inputs for training phase for an AutoML Job. - TrainingSettings *ForecastingTrainingSettings +// FeatureProperties - DTO object representing feature +type FeatureProperties struct { + // Specifies type + DataType *FeatureDataType - // Validation data inputs. - ValidationData *MLTableJobInput + // The asset description text. + Description *string - // The fraction of training dataset that needs to be set aside for validation purpose. Values between (0.0 , 1.0) Applied - // when validation dataset is not provided. - ValidationDataSize *float64 + // Specifies name + FeatureName *string - // The name of the sample weight column. Automated ML supports a weighted column as an input, causing rows in the data to - // be weighted up or down. - WeightColumnName *string + // The asset property dictionary. + Properties map[string]*string + + // Tag dictionary. Tags can be added, removed, and updated. + Tags map[string]*string } -// GetAutoMLVertical implements the AutoMLVerticalClassification interface for type Forecasting. -func (f *Forecasting) GetAutoMLVertical() *AutoMLVertical { - return &AutoMLVertical{ - LogVerbosity: f.LogVerbosity, - TargetColumnName: f.TargetColumnName, - TaskType: f.TaskType, - TrainingData: f.TrainingData, - } +// FeatureResourceArmPaginatedResult - A paginated list of Feature entities. +type FeatureResourceArmPaginatedResult struct { + // The link to the next page of Feature objects. If null, there are no additional pages. + NextLink *string + + // An array of objects of type Feature. + Value []*Feature } -// ForecastingSettings - Forecasting specific parameters. -type ForecastingSettings struct { - // Country or region for holidays for forecasting tasks. These should be ISO 3166 two-letter country/region codes, for example - // 'US' or 'GB'. - CountryOrRegionForHolidays *string +// FeatureStoreSettings - Settings for feature store type workspace. +type FeatureStoreSettings struct { + // Compute runtime config for feature store type workspace. + ComputeRuntime *ComputeRuntimeDto + OfflineStoreConnectionName *string + OnlineStoreConnectionName *string +} - // Number of periods between the origin time of one CV fold and the next fold. For example, if CVStepSize = 3 for daily data, - // the origin time for each fold will be three days apart. - CvStepSize *int32 +type FeatureSubset struct { + // REQUIRED; [Required] The list of features to include. + Features []*string - // Flag for generating lags for the numeric features with 'auto' or null. - FeatureLags *FeatureLags + // REQUIRED; [Required] Specifies the feature filter to leverage when selecting features to calculate metrics over. + FilterType *MonitoringFeatureFilterType +} - // The desired maximum forecast horizon in units of time-series frequency. - ForecastHorizon ForecastHorizonClassification +// GetMonitoringFeatureFilterBase implements the MonitoringFeatureFilterBaseClassification interface for type FeatureSubset. +func (f *FeatureSubset) GetMonitoringFeatureFilterBase() *MonitoringFeatureFilterBase { + return &MonitoringFeatureFilterBase{ + FilterType: f.FilterType, + } +} - // When forecasting, this parameter represents the period with which the forecast is desired, for example daily, weekly, yearly, - // etc. The forecast frequency is dataset frequency by default. - Frequency *string +// FeatureWindow - Specifies the feature window +type FeatureWindow struct { + // Specifies the feature window end time + FeatureWindowEnd *time.Time - // Set time series seasonality as an integer multiple of the series frequency. If seasonality is set to 'auto', it will be - // inferred. - Seasonality SeasonalityClassification + // Specifies the feature window start time + FeatureWindowStart *time.Time +} - // The parameter defining how if AutoML should handle short time series. - ShortSeriesHandlingConfig *ShortSeriesHandlingConfiguration +// FeaturesetContainer - Azure Resource Manager resource envelope. +type FeaturesetContainer struct { + // REQUIRED; [Required] Additional attributes of the entity. + Properties *FeaturesetContainerProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// FeaturesetContainerProperties - DTO object representing feature set +type FeaturesetContainerProperties struct { + // The asset description text. + Description *string + + // Is the asset archived? + IsArchived *bool + + // The asset property dictionary. + Properties map[string]*string + + // Tag dictionary. Tags can be added, removed, and updated. + Tags map[string]*string + + // READ-ONLY; The latest version inside this container. + LatestVersion *string + + // READ-ONLY; The next auto incremental version + NextVersion *string + + // READ-ONLY; Provisioning state for the featureset container. + ProvisioningState *AssetProvisioningState +} + +// FeaturesetContainerResourceArmPaginatedResult - A paginated list of FeaturesetContainer entities. +type FeaturesetContainerResourceArmPaginatedResult struct { + // The link to the next page of FeaturesetContainer objects. If null, there are no additional pages. + NextLink *string + + // An array of objects of type FeaturesetContainer. + Value []*FeaturesetContainer +} + +// FeaturesetSpecification - DTO object representing specification +type FeaturesetSpecification struct { + // Specifies the spec path + Path *string +} + +// FeaturesetVersion - Azure Resource Manager resource envelope. +type FeaturesetVersion struct { + // REQUIRED; [Required] Additional attributes of the entity. + Properties *FeaturesetVersionProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// FeaturesetVersionBackfillRequest - Request payload for creating a backfill request for a given feature set version +type FeaturesetVersionBackfillRequest struct { + // Specified the data availability status that you want to backfill + DataAvailabilityStatus []*DataAvailabilityStatus + + // Specifies description + Description *string + + // Specifies description + DisplayName *string + + // Specifies the backfill feature window to be materialized + FeatureWindow *FeatureWindow + + // Specify the jobId to retry the failed materialization + JobID *string + + // Specifies the properties + Properties map[string]*string + + // Specifies the compute resource settings + Resource *MaterializationComputeResource + + // Specifies the spark compute settings + SparkConfiguration map[string]*string + + // Specifies the tags + Tags map[string]*string +} + +// FeaturesetVersionBackfillResponse - Response payload for creating a backfill request for a given feature set version +type FeaturesetVersionBackfillResponse struct { + // List of jobs submitted as part of the backfill request. + JobIDs []*string +} + +// FeaturesetVersionProperties - DTO object representing feature set version +type FeaturesetVersionProperties struct { + // The asset description text. + Description *string + + // Specifies list of entities + Entities []*string + + // If the name version are system generated (anonymous registration). + IsAnonymous *bool + + // Is the asset archived? + IsArchived *bool + + // Specifies the materialization settings + MaterializationSettings *MaterializationSettings + + // The asset property dictionary. + Properties map[string]*string + + // Specifies the feature spec details + Specification *FeaturesetSpecification + + // Specifies the asset stage + Stage *string + + // Tag dictionary. Tags can be added, removed, and updated. + Tags map[string]*string + + // READ-ONLY; Provisioning state for the featureset version container. + ProvisioningState *AssetProvisioningState +} + +// FeaturesetVersionResourceArmPaginatedResult - A paginated list of FeaturesetVersion entities. +type FeaturesetVersionResourceArmPaginatedResult struct { + // The link to the next page of FeaturesetVersion objects. If null, there are no additional pages. + NextLink *string + + // An array of objects of type FeaturesetVersion. + Value []*FeaturesetVersion +} + +// FeaturestoreEntityContainer - Azure Resource Manager resource envelope. +type FeaturestoreEntityContainer struct { + // REQUIRED; [Required] Additional attributes of the entity. + Properties *FeaturestoreEntityContainerProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// FeaturestoreEntityContainerProperties - DTO object representing feature entity +type FeaturestoreEntityContainerProperties struct { + // The asset description text. + Description *string + + // Is the asset archived? + IsArchived *bool + + // The asset property dictionary. + Properties map[string]*string + + // Tag dictionary. Tags can be added, removed, and updated. + Tags map[string]*string + + // READ-ONLY; The latest version inside this container. + LatestVersion *string + + // READ-ONLY; The next auto incremental version + NextVersion *string + + // READ-ONLY; Provisioning state for the featurestore entity container. + ProvisioningState *AssetProvisioningState +} + +// FeaturestoreEntityContainerResourceArmPaginatedResult - A paginated list of FeaturestoreEntityContainer entities. +type FeaturestoreEntityContainerResourceArmPaginatedResult struct { + // The link to the next page of FeaturestoreEntityContainer objects. If null, there are no additional pages. + NextLink *string + + // An array of objects of type FeaturestoreEntityContainer. + Value []*FeaturestoreEntityContainer +} + +// FeaturestoreEntityVersion - Azure Resource Manager resource envelope. +type FeaturestoreEntityVersion struct { + // REQUIRED; [Required] Additional attributes of the entity. + Properties *FeaturestoreEntityVersionProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// FeaturestoreEntityVersionProperties - DTO object representing feature entity version +type FeaturestoreEntityVersionProperties struct { + // The asset description text. + Description *string + + // Specifies index columns + IndexColumns []*IndexColumn + + // If the name version are system generated (anonymous registration). + IsAnonymous *bool + + // Is the asset archived? + IsArchived *bool + + // The asset property dictionary. + Properties map[string]*string + + // Specifies the asset stage + Stage *string + + // Tag dictionary. Tags can be added, removed, and updated. + Tags map[string]*string + + // READ-ONLY; Provisioning state for the featurestore entity version. + ProvisioningState *AssetProvisioningState +} + +// FeaturestoreEntityVersionResourceArmPaginatedResult - A paginated list of FeaturestoreEntityVersion entities. +type FeaturestoreEntityVersionResourceArmPaginatedResult struct { + // The link to the next page of FeaturestoreEntityVersion objects. If null, there are no additional pages. + NextLink *string + + // An array of objects of type FeaturestoreEntityVersion. + Value []*FeaturestoreEntityVersion +} + +// FeaturizationSettings - Featurization Configuration. +type FeaturizationSettings struct { + // Dataset language, useful for the text data. + DatasetLanguage *string +} + +// FixedInputData - Fixed input data definition. +type FixedInputData struct { + // REQUIRED; [Required] Specifies the type of signal to monitor. + InputDataType *MonitoringInputDataType + + // REQUIRED; [Required] Specifies the type of job. + JobInputType *JobInputType + + // REQUIRED; [Required] Input Asset URI. + URI *string + + // Mapping of column names to special uses. + Columns map[string]*string + + // The context metadata of the data source. + DataContext *string +} + +// GetMonitoringInputDataBase implements the MonitoringInputDataBaseClassification interface for type FixedInputData. +func (f *FixedInputData) GetMonitoringInputDataBase() *MonitoringInputDataBase { + return &MonitoringInputDataBase{ + Columns: f.Columns, + DataContext: f.DataContext, + InputDataType: f.InputDataType, + JobInputType: f.JobInputType, + URI: f.URI, + } +} + +type FlavorData struct { + // Model flavor-specific data. + Data map[string]*string +} + +// ForecastHorizon - The desired maximum forecast horizon in units of time-series frequency. +type ForecastHorizon struct { + // REQUIRED; [Required] Set forecast horizon value selection mode. + Mode *ForecastHorizonMode +} + +// GetForecastHorizon implements the ForecastHorizonClassification interface for type ForecastHorizon. +func (f *ForecastHorizon) GetForecastHorizon() *ForecastHorizon { return f } + +// Forecasting task in AutoML Table vertical. +type Forecasting struct { + // REQUIRED; [Required] Task type for AutoMLJob. + TaskType *TaskType + + // REQUIRED; [Required] Training data input. + TrainingData *MLTableJobInput + + // Columns to use for CVSplit data. + CvSplitColumnNames []*string + + // Featurization inputs needed for AutoML job. + FeaturizationSettings *TableVerticalFeaturizationSettings + + // Forecasting task specific inputs. + ForecastingSettings *ForecastingSettings + + // Execution constraints for AutoMLJob. + LimitSettings *TableVerticalLimitSettings + + // Log verbosity for the job. + LogVerbosity *LogVerbosity + + // Number of cross validation folds to be applied on training dataset when validation dataset is not provided. + NCrossValidations NCrossValidationsClassification + + // Primary metric for forecasting task. + PrimaryMetric *ForecastingPrimaryMetrics + + // Target column name: This is prediction values column. Also known as label column name in context of classification tasks. + TargetColumnName *string + + // Test data input. + TestData *MLTableJobInput + + // The fraction of test dataset that needs to be set aside for validation purpose. Values between (0.0 , 1.0) Applied when + // validation dataset is not provided. + TestDataSize *float64 + + // Inputs for training phase for an AutoML Job. + TrainingSettings *ForecastingTrainingSettings + + // Validation data inputs. + ValidationData *MLTableJobInput + + // The fraction of training dataset that needs to be set aside for validation purpose. Values between (0.0 , 1.0) Applied + // when validation dataset is not provided. + ValidationDataSize *float64 + + // The name of the sample weight column. Automated ML supports a weighted column as an input, causing rows in the data to + // be weighted up or down. + WeightColumnName *string +} + +// GetAutoMLVertical implements the AutoMLVerticalClassification interface for type Forecasting. +func (f *Forecasting) GetAutoMLVertical() *AutoMLVertical { + return &AutoMLVertical{ + LogVerbosity: f.LogVerbosity, + TargetColumnName: f.TargetColumnName, + TaskType: f.TaskType, + TrainingData: f.TrainingData, + } +} + +// ForecastingSettings - Forecasting specific parameters. +type ForecastingSettings struct { + // Country or region for holidays for forecasting tasks. These should be ISO 3166 two-letter country/region codes, for example + // 'US' or 'GB'. + CountryOrRegionForHolidays *string + + // Number of periods between the origin time of one CV fold and the next fold. For example, if CVStepSize = 3 for daily data, + // the origin time for each fold will be three days apart. + CvStepSize *int32 + + // Flag for generating lags for the numeric features with 'auto' or null. + FeatureLags *FeatureLags + + // The desired maximum forecast horizon in units of time-series frequency. + ForecastHorizon ForecastHorizonClassification + + // When forecasting, this parameter represents the period with which the forecast is desired, for example daily, weekly, yearly, + // etc. The forecast frequency is dataset frequency by default. + Frequency *string + + // Set time series seasonality as an integer multiple of the series frequency. If seasonality is set to 'auto', it will be + // inferred. + Seasonality SeasonalityClassification + + // The parameter defining how if AutoML should handle short time series. + ShortSeriesHandlingConfig *ShortSeriesHandlingConfiguration // The function to be used to aggregate the time series target column to conform to a user specified frequency. If the TargetAggregateFunction // is set i.e. not 'None', but the freq parameter is not set, @@ -3061,6 +4312,54 @@ type ForecastingTrainingSettings struct { StackEnsembleSettings *StackEnsembleSettings } +// FqdnOutboundRule - FQDN Outbound Rule for the managed network of a machine learning workspace. +type FqdnOutboundRule struct { + // REQUIRED; Type of a managed network Outbound Rule of a machine learning workspace. + Type *RuleType + + // Category of a managed network Outbound Rule of a machine learning workspace. + Category *RuleCategory + Destination *string + + // Type of a managed network Outbound Rule of a machine learning workspace. + Status *RuleStatus +} + +// GetOutboundRule implements the OutboundRuleClassification interface for type FqdnOutboundRule. +func (f *FqdnOutboundRule) GetOutboundRule() *OutboundRule { + return &OutboundRule{ + Category: f.Category, + Status: f.Status, + Type: f.Type, + } +} + +type GetBlobReferenceForConsumptionDto struct { + // Blob uri, example: https://blob.windows.core.net/Container/Path + BlobURI *string + + // Credential info to access storage account + Credential DataReferenceCredentialClassification + + // The ARM id of the storage account + StorageAccountArmID *string +} + +// GetBlobReferenceSASRequestDto - BlobReferenceSASRequest for getBlobReferenceSAS API +type GetBlobReferenceSASRequestDto struct { + // Id of the asset to be accessed + AssetID *string + + // Blob uri of the asset to be accessed + BlobURI *string +} + +// GetBlobReferenceSASResponseDto - BlobReferenceSASResponse for getBlobReferenceSAS API +type GetBlobReferenceSASResponseDto struct { + // Blob reference for consumption details + BlobReferenceForConsumption *GetBlobReferenceForConsumptionDto +} + // GridSamplingAlgorithm - Defines a Sampling Algorithm that exhaustively generates every value combination in the space type GridSamplingAlgorithm struct { // REQUIRED; [Required] The algorithm used for generating hyperparameter values, along with configuration properties @@ -3175,6 +4474,24 @@ type IdentityForCmk struct { UserAssignedIdentity *string } +// IdleShutdownSetting - Stops compute instance after user defined period of inactivity. +type IdleShutdownSetting struct { + // Time is defined in ISO8601 format. Minimum is 15 min, maximum is 3 days. + IdleTimeBeforeShutdown *string +} + +// Image - Describes the Image Specifications +type Image struct { + // OPTIONAL; Contains additional key/value pairs not defined in the schema. + AdditionalProperties map[string]any + + // Image reference + Reference *string + + // Type of the image. Possible values are: docker - For docker images. azureml - For AzureML images + Type *ImageType +} + // ImageClassification - Image Classification. Multi-class image classification is used when an image is classified with only // a single label from a set of classes - e.g. each image is classified as either an image of a 'cat' // or a 'dog' or a 'duck'. @@ -3353,13 +4670,27 @@ type ImageLimitSettings struct { Timeout *string } -// ImageModelDistributionSettings - Distribution expressions to sweep over values of model settings.Some examples are:ModelName -// = "choice('seresnext', 'resnest50')"; LearningRate = "uniform(0.001, 0.01)"; LayersToFreeze = "choice(0, -// 2)";All distributions can be specified as distribution_name(min, max) or choice(val1, val2, …, valn) where distribution -// name can be: uniform, quniform, loguniform, etc For more details on how to -// compose distribution expressions please check the documentation: https://docs.microsoft.com/en-us/azure/machine-learning/how-to-tune-hyperparameters -// For more information on the available settings -// please visit the official documentation: https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. +// ImageMetadata - Returns metadata about the operating system image for this compute instance. +type ImageMetadata struct { + // Specifies the current operating system image version this compute instance is running on. + CurrentImageVersion *string + + // Specifies whether this compute instance is running on the latest operating system image. + IsLatestOsImageVersion *bool + + // Specifies the latest available operating system image version. + LatestImageVersion *string +} + +// ImageModelDistributionSettings - Distribution expressions to sweep over values of model settings.Some examples are: +// ModelName = "choice('seresnext', 'resnest50')"; +// LearningRate = "uniform(0.001, 0.01)"; +// LayersToFreeze = "choice(0, 2)"; +// All distributions can be specified as distribution_name(min, max) or choice(val1, val2, …, valn) where distribution name +// can be: uniform, quniform, loguniform, etc For more details on how to compose +// distribution expressions please check the documentation: https://docs.microsoft.com/en-us/azure/machine-learning/how-to-tune-hyperparameters +// For more information on the available settings please visit +// the official documentation: https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. type ImageModelDistributionSettings struct { // Enable AMSGrad when optimizer is 'adam' or 'adamw'. AmsGradient *string @@ -3454,10 +4785,13 @@ type ImageModelDistributionSettings struct { } // ImageModelDistributionSettingsClassification - Distribution expressions to sweep over values of model settings.Some examples -// are:ModelName = "choice('seresnext', 'resnest50')"; LearningRate = "uniform(0.001, 0.01)"; LayersToFreeze = "choice(0, -// 2)";For more details on how to compose distribution expressions please check the documentation: https://docs.microsoft.com/en-us/azure/machine-learning/how-to-tune-hyperparameters -// For more information -// on the available settings please visit the official documentation: https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. +// are: +// ModelName = "choice('seresnext', 'resnest50')"; +// LearningRate = "uniform(0.001, 0.01)"; +// LayersToFreeze = "choice(0, 2)"; +// For more details on how to compose distribution expressions please check the documentation: https://docs.microsoft.com/en-us/azure/machine-learning/how-to-tune-hyperparameters +// For more information on +// the available settings please visit the official documentation: https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. type ImageModelDistributionSettingsClassification struct { // Enable AMSGrad when optimizer is 'adam' or 'adamw'. AmsGradient *string @@ -3565,10 +4899,13 @@ type ImageModelDistributionSettingsClassification struct { } // ImageModelDistributionSettingsObjectDetection - Distribution expressions to sweep over values of model settings.Some examples -// are:ModelName = "choice('seresnext', 'resnest50')"; LearningRate = "uniform(0.001, 0.01)"; LayersToFreeze = "choice(0, -// 2)";For more details on how to compose distribution expressions please check the documentation: https://docs.microsoft.com/en-us/azure/machine-learning/how-to-tune-hyperparameters -// For more information -// on the available settings please visit the official documentation: https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. +// are: +// ModelName = "choice('seresnext', 'resnest50')"; +// LearningRate = "uniform(0.001, 0.01)"; +// LayersToFreeze = "choice(0, 2)"; +// For more details on how to compose distribution expressions please check the documentation: https://docs.microsoft.com/en-us/azure/machine-learning/how-to-tune-hyperparameters +// For more information on +// the available settings please visit the official documentation: https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. type ImageModelDistributionSettingsObjectDetection struct { // Enable AMSGrad when optimizer is 'adam' or 'adamw'. AmsGradient *string @@ -4201,6 +5538,15 @@ type ImageVertical struct { ValidationDataSize *float64 } +// IndexColumn - DTO object representing index column +type IndexColumn struct { + // Specifies the column name + ColumnName *string + + // Specifies the data type + DataType *FeatureDataType +} + type InferenceContainerProperties struct { // The route to check the liveness of the inference server container. LivenessRoute *Route @@ -4275,6 +5621,9 @@ type JobBaseProperties struct { // Is the asset archived? IsArchived *bool + // Notification setting for the job + NotificationSetting *NotificationSetting + // The asset property dictionary. Properties map[string]*string @@ -4380,6 +5729,10 @@ type JobService struct { // Endpoint type. JobServiceType *string + // Nodes that user would like to start the service on. If Nodes is not set or set to null, the service will only be started + // on leader node. + Nodes NodesClassification + // Port for endpoint. Port *int32 @@ -4460,6 +5813,9 @@ type KubernetesOnlineDeployment struct { // The resource requirements for the container (cpu and memory). ContainerResourceRequirements *ContainerResourceRequirements + // The mdc configuration, we disable mdc when it's null. + DataCollector *DataCollector + // Description of the endpoint deployment. Description *string @@ -4507,6 +5863,7 @@ func (k *KubernetesOnlineDeployment) GetOnlineDeploymentProperties() *OnlineDepl return &OnlineDeploymentProperties{ AppInsightsEnabled: k.AppInsightsEnabled, CodeConfiguration: k.CodeConfiguration, + DataCollector: k.DataCollector, Description: k.Description, EgressPublicNetworkAccess: k.EgressPublicNetworkAccess, EndpointComputeType: k.EndpointComputeType, @@ -4557,6 +5914,22 @@ type KubernetesSchema struct { Properties *KubernetesProperties } +type LakeHouseArtifact struct { + // REQUIRED; [Required] OneLake artifact name + ArtifactName *string + + // REQUIRED; [Required] OneLake artifact type + ArtifactType *OneLakeArtifactType +} + +// GetOneLakeArtifact implements the OneLakeArtifactClassification interface for type LakeHouseArtifact. +func (l *LakeHouseArtifact) GetOneLakeArtifact() *OneLakeArtifact { + return &OneLakeArtifact{ + ArtifactName: l.ArtifactName, + ArtifactType: l.ArtifactType, + } +} + // ListAmlUserFeatureResult - The List Aml user feature operation response. type ListAmlUserFeatureResult struct { // READ-ONLY; The URI to fetch the next page of AML user features information. Call ListNext() with this to fetch the next @@ -4686,7 +6059,7 @@ type MLTableData struct { // REQUIRED; [Required] Specifies the type of data. DataType *DataType - // REQUIRED; [Required] Uri of the data. Usage/meaning depends on Microsoft.MachineLearning.ManagementFrontEnd.Contracts.V20221001.Assets.DataVersionBase.DataType + // REQUIRED; [Required] Uri of the data. Example: https://go.microsoft.com/fwlink/?linkid=2202330 DataURI *string // The asset description text. @@ -4765,6 +6138,22 @@ func (m *MLTableJobOutput) GetJobOutput() *JobOutput { } } +// ManagedComputeIdentity - Managed compute identity definition. +type ManagedComputeIdentity struct { + // REQUIRED; [Required] Specifies the type of identity to use within the monitoring jobs. + ComputeIdentityType *MonitorComputeIdentityType + + // The identity which will be leveraged by the monitoring jobs. + Identity *ManagedServiceIdentity +} + +// GetMonitorComputeIdentityBase implements the MonitorComputeIdentityBaseClassification interface for type ManagedComputeIdentity. +func (m *ManagedComputeIdentity) GetMonitorComputeIdentityBase() *MonitorComputeIdentityBase { + return &MonitorComputeIdentityBase{ + ComputeIdentityType: m.ComputeIdentityType, + } +} + // ManagedIdentity - Managed identity configuration. type ManagedIdentity struct { // REQUIRED; [Required] Specifies the type of identity framework. @@ -4792,28 +6181,102 @@ type ManagedIdentityAuthTypeWorkspaceConnectionProperties struct { AuthType *ConnectionAuthType // Category of the connection - Category *ConnectionCategory - Credentials *WorkspaceConnectionManagedIdentity - Target *string + Category *ConnectionCategory + Credentials *WorkspaceConnectionManagedIdentity + ExpiryTime *time.Time + IsSharedToAll *bool + + // Store user metadata for this connection + Metadata map[string]*string + SharedUserList []*string + Target *string // Value details of the workspace connection. Value *string // format for the workspace connection value ValueFormat *ValueFormat + + // READ-ONLY + CreatedByWorkspaceArmID *string + + // READ-ONLY; Group based on connection category + Group *ConnectionGroup } // GetWorkspaceConnectionPropertiesV2 implements the WorkspaceConnectionPropertiesV2Classification interface for type ManagedIdentityAuthTypeWorkspaceConnectionProperties. func (m *ManagedIdentityAuthTypeWorkspaceConnectionProperties) GetWorkspaceConnectionPropertiesV2() *WorkspaceConnectionPropertiesV2 { return &WorkspaceConnectionPropertiesV2{ - AuthType: m.AuthType, - Category: m.Category, - Target: m.Target, - Value: m.Value, - ValueFormat: m.ValueFormat, + AuthType: m.AuthType, + Category: m.Category, + CreatedByWorkspaceArmID: m.CreatedByWorkspaceArmID, + ExpiryTime: m.ExpiryTime, + Group: m.Group, + IsSharedToAll: m.IsSharedToAll, + Metadata: m.Metadata, + SharedUserList: m.SharedUserList, + Target: m.Target, + Value: m.Value, + ValueFormat: m.ValueFormat, + } +} + +// ManagedIdentityCredential - Credential for user managed identity +type ManagedIdentityCredential struct { + // REQUIRED; [Required] Credential type used to authentication with storage. + CredentialType *DataReferenceCredentialType + + // ManagedIdentityCredential identity type + ManagedIdentityType *string + + // ClientId for the UAMI. For ManagedIdentityType = SystemManaged, this field is null. + UserManagedIdentityClientID *string + + // PrincipalId for the UAMI. For ManagedIdentityType = SystemManaged, this field is null. + UserManagedIdentityPrincipalID *string + + // Full arm scope for the Id. For ManagedIdentityType = SystemManaged, this field is null. + UserManagedIdentityResourceID *string + + // TenantId for the UAMI. For ManagedIdentityType = SystemManaged, this field is null. + UserManagedIdentityTenantID *string +} + +// GetDataReferenceCredential implements the DataReferenceCredentialClassification interface for type ManagedIdentityCredential. +func (m *ManagedIdentityCredential) GetDataReferenceCredential() *DataReferenceCredential { + return &DataReferenceCredential{ + CredentialType: m.CredentialType, } } +// ManagedNetworkProvisionOptions - Managed Network Provisioning options for managed network of a machine learning workspace. +type ManagedNetworkProvisionOptions struct { + IncludeSpark *bool +} + +// ManagedNetworkProvisionStatus - Status of the Provisioning for the managed network of a machine learning workspace. +type ManagedNetworkProvisionStatus struct { + SparkReady *bool + + // Status for the managed network of a machine learning workspace. + Status *ManagedNetworkStatus +} + +// ManagedNetworkSettings - Managed Network settings for a machine learning workspace. +type ManagedNetworkSettings struct { + // Isolation mode for the managed network of a machine learning workspace. + IsolationMode *IsolationMode + + // Dictionary of + OutboundRules map[string]OutboundRuleClassification + + // Status of the Provisioning for the managed network of a machine learning workspace. + Status *ManagedNetworkProvisionStatus + + // READ-ONLY + NetworkID *string +} + // ManagedOnlineDeployment - Properties specific to a ManagedOnlineDeployment. type ManagedOnlineDeployment struct { // REQUIRED; [Required] The compute type of the endpoint. @@ -4825,6 +6288,9 @@ type ManagedOnlineDeployment struct { // Code configuration for the endpoint deployment. CodeConfiguration *CodeConfiguration + // The mdc configuration, we disable mdc when it's null. + DataCollector *DataCollector + // Description of the endpoint deployment. Description *string @@ -4872,6 +6338,7 @@ func (m *ManagedOnlineDeployment) GetOnlineDeploymentProperties() *OnlineDeploym return &OnlineDeploymentProperties{ AppInsightsEnabled: m.AppInsightsEnabled, CodeConfiguration: m.CodeConfiguration, + DataCollector: m.DataCollector, Description: m.Description, EgressPublicNetworkAccess: m.EgressPublicNetworkAccess, EndpointComputeType: m.EndpointComputeType, @@ -4889,24 +6356,99 @@ func (m *ManagedOnlineDeployment) GetOnlineDeploymentProperties() *OnlineDeploym } } -// ManagedServiceIdentity - Managed service identity (system assigned and/or user assigned identities) -type ManagedServiceIdentity struct { - // REQUIRED; Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). - Type *ManagedServiceIdentityType +// ManagedServiceIdentity - Managed service identity (system assigned and/or user assigned identities) +type ManagedServiceIdentity struct { + // REQUIRED; Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). + Type *ManagedServiceIdentityType + + // The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM + // resource ids in the form: + // '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. + // The dictionary values can be empty objects ({}) in + // requests. + UserAssignedIdentities map[string]*UserAssignedIdentity + + // READ-ONLY; The service principal ID of the system assigned identity. This property will only be provided for a system assigned + // identity. + PrincipalID *string + + // READ-ONLY; The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity. + TenantID *string +} + +type MarketplacePlan struct { + // READ-ONLY; The identifying name of the Offer of the Marketplace Plan. + OfferID *string + + // READ-ONLY; The identifying name of the Plan of the Marketplace Plan. + PlanID *string + + // READ-ONLY; The identifying name of the Publisher of the Marketplace Plan. + PublisherID *string +} + +// MarketplaceSubscription - Azure Resource Manager resource envelope. +type MarketplaceSubscription struct { + // REQUIRED; [Required] Additional attributes of the entity. + Properties *MarketplaceSubscriptionProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +type MarketplaceSubscriptionProperties struct { + // REQUIRED; [Required] Target Marketplace Model ID to create a Marketplace Subscription for. + ModelID *string + + // READ-ONLY; Marketplace Plan associated with the Marketplace Subscription. + MarketplacePlan *MarketplacePlan + + // READ-ONLY; Current status of the Marketplace Subscription. + MarketplaceSubscriptionStatus *MarketplaceSubscriptionStatus + + // READ-ONLY; Provisioning State of the Marketplace Subscription. + ProvisioningState *MarketplaceSubscriptionProvisioningState +} + +// MarketplaceSubscriptionResourceArmPaginatedResult - A paginated list of MarketplaceSubscription entities. +type MarketplaceSubscriptionResourceArmPaginatedResult struct { + // The link to the next page of MarketplaceSubscription objects. If null, there are no additional pages. + NextLink *string + + // An array of objects of type MarketplaceSubscription. + Value []*MarketplaceSubscription +} + +// MaterializationComputeResource - DTO object representing compute resource +type MaterializationComputeResource struct { + // Specifies the instance type + InstanceType *string +} - // The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM - // resource ids in the form: - // '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. - // The dictionary values can be empty objects ({}) in - // requests. - UserAssignedIdentities map[string]*UserAssignedIdentity +type MaterializationSettings struct { + // Specifies the notification details + Notification *NotificationSetting - // READ-ONLY; The service principal ID of the system assigned identity. This property will only be provided for a system assigned - // identity. - PrincipalID *string + // Specifies the compute resource settings + Resource *MaterializationComputeResource - // READ-ONLY; The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity. - TenantID *string + // Specifies the schedule details + Schedule *RecurrenceTrigger + + // Specifies the spark compute settings + SparkConfiguration map[string]*string + + // Specifies the stores to which materialization should happen + StoreType *MaterializationStoreType } // MedianStoppingPolicy - Defines an early termination policy based on running averages of the primary metric of all runs @@ -4966,6 +6508,9 @@ type ModelContainerProperties struct { // READ-ONLY; The next auto incremental version NextVersion *string + + // READ-ONLY; Provisioning state for the model container. + ProvisioningState *AssetProvisioningState } // ModelContainerResourceArmPaginatedResult - A paginated list of ModelContainer entities. @@ -4977,6 +6522,11 @@ type ModelContainerResourceArmPaginatedResult struct { Value []*ModelContainer } +type ModelSettings struct { + // The unique model identifier that this ServerlessEndpoint should provision. + ModelID *string +} + // ModelVersion - Azure Resource Manager resource envelope. type ModelVersion struct { // REQUIRED; [Required] Additional attributes of the entity. @@ -5021,8 +6571,14 @@ type ModelVersionProperties struct { // The asset property dictionary. Properties map[string]*string + // Stage in the model lifecycle assigned to this model + Stage *string + // Tag dictionary. Tags can be added, removed, and updated. Tags map[string]*string + + // READ-ONLY; Provisioning state for the model version. + ProvisioningState *AssetProvisioningState } // ModelVersionResourceArmPaginatedResult - A paginated list of ModelVersion entities. @@ -5034,6 +6590,136 @@ type ModelVersionResourceArmPaginatedResult struct { Value []*ModelVersion } +// MonitorComputeConfigurationBase - Monitor compute configuration base definition. +type MonitorComputeConfigurationBase struct { + // REQUIRED; [Required] Specifies the type of signal to monitor. + ComputeType *MonitorComputeType +} + +// GetMonitorComputeConfigurationBase implements the MonitorComputeConfigurationBaseClassification interface for type MonitorComputeConfigurationBase. +func (m *MonitorComputeConfigurationBase) GetMonitorComputeConfigurationBase() *MonitorComputeConfigurationBase { + return m +} + +// MonitorComputeIdentityBase - Monitor compute identity base definition. +type MonitorComputeIdentityBase struct { + // REQUIRED; [Required] Specifies the type of identity to use within the monitoring jobs. + ComputeIdentityType *MonitorComputeIdentityType +} + +// GetMonitorComputeIdentityBase implements the MonitorComputeIdentityBaseClassification interface for type MonitorComputeIdentityBase. +func (m *MonitorComputeIdentityBase) GetMonitorComputeIdentityBase() *MonitorComputeIdentityBase { + return m +} + +type MonitorDefinition struct { + // REQUIRED; [Required] The ARM resource ID of the compute resource to run the monitoring job on. + ComputeConfiguration MonitorComputeConfigurationBaseClassification + + // REQUIRED; [Required] The signals to monitor. + Signals map[string]MonitoringSignalBaseClassification + + // The monitor's notification settings. + AlertNotificationSettings *MonitorNotificationSettings + + // The entities targeted by the monitor. + MonitoringTarget *MonitoringTarget +} + +type MonitorEmailNotificationSettings struct { + // The email recipient list which has a limitation of 499 characters in total. + Emails []*string +} + +type MonitorNotificationSettings struct { + // The AML notification email settings. + EmailNotificationSettings *MonitorEmailNotificationSettings +} + +// MonitorServerlessSparkCompute - Monitor serverless spark compute definition. +type MonitorServerlessSparkCompute struct { + // REQUIRED; [Required] The identity scheme leveraged to by the spark jobs running on serverless Spark. + ComputeIdentity MonitorComputeIdentityBaseClassification + + // REQUIRED; [Required] Specifies the type of signal to monitor. + ComputeType *MonitorComputeType + + // REQUIRED; [Required] The instance type running the Spark job. + InstanceType *string + + // REQUIRED; [Required] The Spark runtime version. + RuntimeVersion *string +} + +// GetMonitorComputeConfigurationBase implements the MonitorComputeConfigurationBaseClassification interface for type MonitorServerlessSparkCompute. +func (m *MonitorServerlessSparkCompute) GetMonitorComputeConfigurationBase() *MonitorComputeConfigurationBase { + return &MonitorComputeConfigurationBase{ + ComputeType: m.ComputeType, + } +} + +type MonitoringFeatureFilterBase struct { + // REQUIRED; [Required] Specifies the feature filter to leverage when selecting features to calculate metrics over. + FilterType *MonitoringFeatureFilterType +} + +// GetMonitoringFeatureFilterBase implements the MonitoringFeatureFilterBaseClassification interface for type MonitoringFeatureFilterBase. +func (m *MonitoringFeatureFilterBase) GetMonitoringFeatureFilterBase() *MonitoringFeatureFilterBase { + return m +} + +// MonitoringInputDataBase - Monitoring input data base definition. +type MonitoringInputDataBase struct { + // REQUIRED; [Required] Specifies the type of signal to monitor. + InputDataType *MonitoringInputDataType + + // REQUIRED; [Required] Specifies the type of job. + JobInputType *JobInputType + + // REQUIRED; [Required] Input Asset URI. + URI *string + + // Mapping of column names to special uses. + Columns map[string]*string + + // The context metadata of the data source. + DataContext *string +} + +// GetMonitoringInputDataBase implements the MonitoringInputDataBaseClassification interface for type MonitoringInputDataBase. +func (m *MonitoringInputDataBase) GetMonitoringInputDataBase() *MonitoringInputDataBase { return m } + +type MonitoringSignalBase struct { + // REQUIRED; [Required] Specifies the type of signal to monitor. + SignalType *MonitoringSignalType + + // The current notification mode for this signal. + NotificationTypes []*MonitoringNotificationType + + // Property dictionary. Properties can be added, but not removed or altered. + Properties map[string]*string +} + +// GetMonitoringSignalBase implements the MonitoringSignalBaseClassification interface for type MonitoringSignalBase. +func (m *MonitoringSignalBase) GetMonitoringSignalBase() *MonitoringSignalBase { return m } + +// MonitoringTarget - Monitoring target definition. +type MonitoringTarget struct { + // REQUIRED; [Required] The machine learning task type of the monitored model. + TaskType *ModelTaskType + + // Reference to the deployment asset targeted by this monitor. + DeploymentID *string + + // Reference to the model asset targeted by this monitor. + ModelID *string +} + +type MonitoringThreshold struct { + // The threshold value. If null, the set default is dependent on the metric type. + Value *float64 +} + // Mpi - MPI distribution configuration. type Mpi struct { // REQUIRED; [Required] Specifies the type of distribution framework. @@ -5109,29 +6795,56 @@ type NodeStateCounts struct { UnusableNodeCount *int32 } +// Nodes - Abstract Nodes definition +type Nodes struct { + // REQUIRED; [Required] Type of the Nodes value + NodesValueType *NodesValueType +} + +// GetNodes implements the NodesClassification interface for type Nodes. +func (n *Nodes) GetNodes() *Nodes { return n } + type NoneAuthTypeWorkspaceConnectionProperties struct { // REQUIRED; Authentication type of the connection target AuthType *ConnectionAuthType // Category of the connection - Category *ConnectionCategory - Target *string + Category *ConnectionCategory + ExpiryTime *time.Time + IsSharedToAll *bool + + // Store user metadata for this connection + Metadata map[string]*string + SharedUserList []*string + Target *string // Value details of the workspace connection. Value *string // format for the workspace connection value ValueFormat *ValueFormat + + // READ-ONLY + CreatedByWorkspaceArmID *string + + // READ-ONLY; Group based on connection category + Group *ConnectionGroup } // GetWorkspaceConnectionPropertiesV2 implements the WorkspaceConnectionPropertiesV2Classification interface for type NoneAuthTypeWorkspaceConnectionProperties. func (n *NoneAuthTypeWorkspaceConnectionProperties) GetWorkspaceConnectionPropertiesV2() *WorkspaceConnectionPropertiesV2 { return &WorkspaceConnectionPropertiesV2{ - AuthType: n.AuthType, - Category: n.Category, - Target: n.Target, - Value: n.Value, - ValueFormat: n.ValueFormat, + AuthType: n.AuthType, + Category: n.Category, + CreatedByWorkspaceArmID: n.CreatedByWorkspaceArmID, + ExpiryTime: n.ExpiryTime, + Group: n.Group, + IsSharedToAll: n.IsSharedToAll, + Metadata: n.Metadata, + SharedUserList: n.SharedUserList, + Target: n.Target, + Value: n.Value, + ValueFormat: n.ValueFormat, } } @@ -5189,6 +6902,123 @@ type NotebookResourceInfo struct { ResourceID *string } +// NotificationSetting - Configuration for notification. +type NotificationSetting struct { + // Send email notification to user on specified notification type + EmailOn []*EmailNotificationEnableType + + // This is the email recipient list which has a limitation of 499 characters in total concat with comma separator + Emails []*string + + // Send webhook callback to a service. Key is a user-provided name for the webhook. + Webhooks map[string]WebhookClassification +} + +type NumericalDataDriftMetricThreshold struct { + // REQUIRED; [Required] Specifies the data type of the metric threshold. + DataType *MonitoringFeatureDataType + + // REQUIRED; [Required] The numerical data drift metric to calculate. + Metric *NumericalDataDriftMetric + + // The threshold value. If null, a default value will be set depending on the selected metric. + Threshold *MonitoringThreshold +} + +// GetDataDriftMetricThresholdBase implements the DataDriftMetricThresholdBaseClassification interface for type NumericalDataDriftMetricThreshold. +func (n *NumericalDataDriftMetricThreshold) GetDataDriftMetricThresholdBase() *DataDriftMetricThresholdBase { + return &DataDriftMetricThresholdBase{ + DataType: n.DataType, + Threshold: n.Threshold, + } +} + +type NumericalDataQualityMetricThreshold struct { + // REQUIRED; [Required] Specifies the data type of the metric threshold. + DataType *MonitoringFeatureDataType + + // REQUIRED; [Required] The numerical data quality metric to calculate. + Metric *NumericalDataQualityMetric + + // The threshold value. If null, a default value will be set depending on the selected metric. + Threshold *MonitoringThreshold +} + +// GetDataQualityMetricThresholdBase implements the DataQualityMetricThresholdBaseClassification interface for type NumericalDataQualityMetricThreshold. +func (n *NumericalDataQualityMetricThreshold) GetDataQualityMetricThresholdBase() *DataQualityMetricThresholdBase { + return &DataQualityMetricThresholdBase{ + DataType: n.DataType, + Threshold: n.Threshold, + } +} + +type NumericalPredictionDriftMetricThreshold struct { + // REQUIRED; [Required] Specifies the data type of the metric threshold. + DataType *MonitoringFeatureDataType + + // REQUIRED; [Required] The numerical prediction drift metric to calculate. + Metric *NumericalPredictionDriftMetric + + // The threshold value. If null, a default value will be set depending on the selected metric. + Threshold *MonitoringThreshold +} + +// GetPredictionDriftMetricThresholdBase implements the PredictionDriftMetricThresholdBaseClassification interface for type +// NumericalPredictionDriftMetricThreshold. +func (n *NumericalPredictionDriftMetricThreshold) GetPredictionDriftMetricThresholdBase() *PredictionDriftMetricThresholdBase { + return &PredictionDriftMetricThresholdBase{ + DataType: n.DataType, + Threshold: n.Threshold, + } +} + +type OAuth2AuthTypeWorkspaceConnectionProperties struct { + // REQUIRED; Authentication type of the connection target + AuthType *ConnectionAuthType + + // Category of the connection + Category *ConnectionCategory + + // ClientId and ClientSecret are required. Other properties are optional depending on each OAuth2 provider's implementation. + Credentials *WorkspaceConnectionOAuth2 + ExpiryTime *time.Time + IsSharedToAll *bool + + // Store user metadata for this connection + Metadata map[string]*string + SharedUserList []*string + Target *string + + // Value details of the workspace connection. + Value *string + + // format for the workspace connection value + ValueFormat *ValueFormat + + // READ-ONLY + CreatedByWorkspaceArmID *string + + // READ-ONLY; Group based on connection category + Group *ConnectionGroup +} + +// GetWorkspaceConnectionPropertiesV2 implements the WorkspaceConnectionPropertiesV2Classification interface for type OAuth2AuthTypeWorkspaceConnectionProperties. +func (o *OAuth2AuthTypeWorkspaceConnectionProperties) GetWorkspaceConnectionPropertiesV2() *WorkspaceConnectionPropertiesV2 { + return &WorkspaceConnectionPropertiesV2{ + AuthType: o.AuthType, + Category: o.Category, + CreatedByWorkspaceArmID: o.CreatedByWorkspaceArmID, + ExpiryTime: o.ExpiryTime, + Group: o.Group, + IsSharedToAll: o.IsSharedToAll, + Metadata: o.Metadata, + SharedUserList: o.SharedUserList, + Target: o.Target, + Value: o.Value, + ValueFormat: o.ValueFormat, + } +} + // Objective - Optimization objective. type Objective struct { // REQUIRED; [Required] Defines supported metric goals for hyperparameter tuning @@ -5198,6 +7028,63 @@ type Objective struct { PrimaryMetric *string } +// OneLakeArtifact - OneLake artifact (data source) configuration. +type OneLakeArtifact struct { + // REQUIRED; [Required] OneLake artifact name + ArtifactName *string + + // REQUIRED; [Required] OneLake artifact type + ArtifactType *OneLakeArtifactType +} + +// GetOneLakeArtifact implements the OneLakeArtifactClassification interface for type OneLakeArtifact. +func (o *OneLakeArtifact) GetOneLakeArtifact() *OneLakeArtifact { return o } + +// OneLakeDatastore - OneLake (Trident) datastore configuration. +type OneLakeDatastore struct { + // REQUIRED; [Required] OneLake artifact backing the datastore. + Artifact OneLakeArtifactClassification + + // REQUIRED; [Required] Account credentials. + Credentials DatastoreCredentialsClassification + + // REQUIRED; [Required] Storage type backing the datastore. + DatastoreType *DatastoreType + + // REQUIRED; [Required] OneLake workspace name. + OneLakeWorkspaceName *string + + // The asset description text. + Description *string + + // OneLake endpoint to use for the datastore. + Endpoint *string + + // The asset property dictionary. + Properties map[string]*string + + // Indicates which identity to use to authenticate service data access to customer's storage. + ServiceDataAccessAuthIdentity *ServiceDataAccessAuthIdentity + + // Tag dictionary. Tags can be added, removed, and updated. + Tags map[string]*string + + // READ-ONLY; Readonly property to indicate if datastore is the workspace default datastore + IsDefault *bool +} + +// GetDatastoreProperties implements the DatastorePropertiesClassification interface for type OneLakeDatastore. +func (o *OneLakeDatastore) GetDatastoreProperties() *DatastoreProperties { + return &DatastoreProperties{ + Credentials: o.Credentials, + DatastoreType: o.DatastoreType, + Description: o.Description, + IsDefault: o.IsDefault, + Properties: o.Properties, + Tags: o.Tags, + } +} + type OnlineDeployment struct { // REQUIRED; The geo-location where the resource lives Location *string @@ -5240,6 +7127,9 @@ type OnlineDeploymentProperties struct { // Code configuration for the endpoint deployment. CodeConfiguration *CodeConfiguration + // The mdc configuration, we disable mdc when it's null. + DataCollector *DataCollector + // Description of the endpoint deployment. Description *string @@ -5344,6 +7234,10 @@ type OnlineEndpointProperties struct { // retrieved using the ListKeys API. Keys *EndpointAuthKeys + // Percentage of traffic to be mirrored to each deployment without using returned scoring. Traffic values need to sum to utmost + // 50. + MirrorTraffic map[string]*int32 + // Property dictionary. Properties can be added, but not removed or altered. Properties map[string]*string @@ -5377,7 +7271,9 @@ type OnlineRequestSettings struct { // The number of maximum concurrent requests per node allowed per deployment. Defaults to 1. MaxConcurrentRequestsPerInstance *int32 - // The maximum amount of time a request will stay in the queue in ISO 8601 format. Defaults to 500ms. + // (Deprecated for Managed Online Endpoints) The maximum amount of time a request will stay in the queue in ISO 8601 format. + // Defaults to 500ms. (Now increase request_timeout_ms to account for any + // networking/queue delays) MaxQueueWait *string // The scoring timeout in ISO 8601 format. Defaults to 5000ms. @@ -5393,6 +7289,98 @@ type OnlineScaleSettings struct { // GetOnlineScaleSettings implements the OnlineScaleSettingsClassification interface for type OnlineScaleSettings. func (o *OnlineScaleSettings) GetOnlineScaleSettings() *OnlineScaleSettings { return o } +// Operation - Details of a REST API operation, returned from the Resource Provider Operations API +type Operation struct { + // Localized display information for this particular operation. + Display *OperationDisplay + + // READ-ONLY; Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + ActionType *ActionType + + // READ-ONLY; Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane + // operations. + IsDataAction *bool + + // READ-ONLY; The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", + // "Microsoft.Compute/virtualMachines/capture/action" + Name *string + + // READ-ONLY; The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default + // value is "user,system" + Origin *Origin +} + +// OperationDisplay - Localized display information for this particular operation. +type OperationDisplay struct { + // READ-ONLY; The short, localized friendly description of the operation; suitable for tool tips and detailed views. + Description *string + + // READ-ONLY; The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual + // Machine", "Restart Virtual Machine". + Operation *string + + // READ-ONLY; The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft + // Compute". + Provider *string + + // READ-ONLY; The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job + // Schedule Collections". + Resource *string +} + +// OperationListResult - A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to +// get the next set of results. +type OperationListResult struct { + // READ-ONLY; URL to get the next set of operation list results (if there are any). + NextLink *string + + // READ-ONLY; List of operations supported by the resource provider + Value []*Operation +} + +// OutboundRule - Outbound Rule for the managed network of a machine learning workspace. +type OutboundRule struct { + // REQUIRED; Type of a managed network Outbound Rule of a machine learning workspace. + Type *RuleType + + // Category of a managed network Outbound Rule of a machine learning workspace. + Category *RuleCategory + + // Type of a managed network Outbound Rule of a machine learning workspace. + Status *RuleStatus +} + +// GetOutboundRule implements the OutboundRuleClassification interface for type OutboundRule. +func (o *OutboundRule) GetOutboundRule() *OutboundRule { return o } + +// OutboundRuleBasicResource - Outbound Rule Basic Resource for the managed network of a machine learning workspace. +type OutboundRuleBasicResource struct { + // REQUIRED; Outbound Rule for the managed network of a machine learning workspace. + Properties OutboundRuleClassification + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// OutboundRuleListResult - List of outbound rules for the managed network of a machine learning workspace. +type OutboundRuleListResult struct { + // The link to the next page constructed using the continuationToken. If null, there are no additional pages. + NextLink *string + + // The list of machine learning workspaces. Since this list may be incomplete, the nextLink field should be used to request + // the next list of machine learning workspaces. + Value []*OutboundRuleBasicResource +} + // OutputPathAssetReference - Reference to an asset via its path in a job output. type OutputPathAssetReference struct { // REQUIRED; [Required] Specifies the type of asset reference. @@ -5417,25 +7405,43 @@ type PATAuthTypeWorkspaceConnectionProperties struct { AuthType *ConnectionAuthType // Category of the connection - Category *ConnectionCategory - Credentials *WorkspaceConnectionPersonalAccessToken - Target *string + Category *ConnectionCategory + Credentials *WorkspaceConnectionPersonalAccessToken + ExpiryTime *time.Time + IsSharedToAll *bool + + // Store user metadata for this connection + Metadata map[string]*string + SharedUserList []*string + Target *string // Value details of the workspace connection. Value *string // format for the workspace connection value ValueFormat *ValueFormat + + // READ-ONLY + CreatedByWorkspaceArmID *string + + // READ-ONLY; Group based on connection category + Group *ConnectionGroup } // GetWorkspaceConnectionPropertiesV2 implements the WorkspaceConnectionPropertiesV2Classification interface for type PATAuthTypeWorkspaceConnectionProperties. func (p *PATAuthTypeWorkspaceConnectionProperties) GetWorkspaceConnectionPropertiesV2() *WorkspaceConnectionPropertiesV2 { return &WorkspaceConnectionPropertiesV2{ - AuthType: p.AuthType, - Category: p.Category, - Target: p.Target, - Value: p.Value, - ValueFormat: p.ValueFormat, + AuthType: p.AuthType, + Category: p.Category, + CreatedByWorkspaceArmID: p.CreatedByWorkspaceArmID, + ExpiryTime: p.ExpiryTime, + Group: p.Group, + IsSharedToAll: p.IsSharedToAll, + Metadata: p.Metadata, + SharedUserList: p.SharedUserList, + Target: p.Target, + Value: p.Value, + ValueFormat: p.ValueFormat, } } @@ -5500,6 +7506,30 @@ type PartialMinimalTrackedResourceWithSKU struct { Tags map[string]*string } +// PartialMinimalTrackedResourceWithSKUAndIdentity - Strictly used in update requests. +type PartialMinimalTrackedResourceWithSKUAndIdentity struct { + // Managed service identity (system assigned and/or user assigned identities) + Identity *PartialManagedServiceIdentity + + // Sku details required for ARM contract for Autoscaling. + SKU *PartialSKU + + // Resource tags. + Tags map[string]*string +} + +// PartialRegistryPartialTrackedResource - Strictly used in update requests. +type PartialRegistryPartialTrackedResource struct { + // Managed service identity (system assigned and/or user assigned identities) + Identity *RegistryPartialManagedServiceIdentity + + // Sku details required for ARM contract for Autoscaling. + SKU *PartialSKU + + // Resource tags. + Tags map[string]*string +} + // PartialSKU - Common SKU definition. type PartialSKU struct { // If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the @@ -5520,12 +7550,41 @@ type PartialSKU struct { Tier *SKUTier } -type Password struct { - // READ-ONLY - Name *string +type Password struct { + // READ-ONLY + Name *string + + // READ-ONLY + Value *string +} + +type PendingUploadCredentialDto struct { + // REQUIRED; [Required] Credential type used to authentication with storage. + CredentialType *PendingUploadCredentialType +} + +// GetPendingUploadCredentialDto implements the PendingUploadCredentialDtoClassification interface for type PendingUploadCredentialDto. +func (p *PendingUploadCredentialDto) GetPendingUploadCredentialDto() *PendingUploadCredentialDto { + return p +} + +type PendingUploadRequestDto struct { + // If PendingUploadId = null then random guid will be used. + PendingUploadID *string + + // TemporaryBlobReference is the only supported type + PendingUploadType *PendingUploadType +} + +type PendingUploadResponseDto struct { + // Container level read, write, list SAS + BlobReferenceForConsumption *BlobReferenceForConsumptionDto - // READ-ONLY - Value *string + // ID for this upload request + PendingUploadID *string + + // TemporaryBlobReference is the only supported type + PendingUploadType *PendingUploadType } // PersonalComputeInstanceSettings - Settings for a personal compute instance. @@ -5567,6 +7626,9 @@ type PipelineJob struct { // Jobs construct the Pipeline Job. Jobs map[string]any + // Notification setting for the job + NotificationSetting *NotificationSetting + // Outputs for the pipeline job Outputs map[string]JobOutputClassification @@ -5592,18 +7654,65 @@ type PipelineJob struct { // GetJobBaseProperties implements the JobBasePropertiesClassification interface for type PipelineJob. func (p *PipelineJob) GetJobBaseProperties() *JobBaseProperties { return &JobBaseProperties{ - ComponentID: p.ComponentID, - ComputeID: p.ComputeID, - Description: p.Description, - DisplayName: p.DisplayName, - ExperimentName: p.ExperimentName, - Identity: p.Identity, - IsArchived: p.IsArchived, - JobType: p.JobType, - Properties: p.Properties, - Services: p.Services, - Status: p.Status, - Tags: p.Tags, + ComponentID: p.ComponentID, + ComputeID: p.ComputeID, + Description: p.Description, + DisplayName: p.DisplayName, + ExperimentName: p.ExperimentName, + Identity: p.Identity, + IsArchived: p.IsArchived, + JobType: p.JobType, + NotificationSetting: p.NotificationSetting, + Properties: p.Properties, + Services: p.Services, + Status: p.Status, + Tags: p.Tags, + } +} + +type PredictionDriftMetricThresholdBase struct { + // REQUIRED; [Required] Specifies the data type of the metric threshold. + DataType *MonitoringFeatureDataType + + // The threshold value. If null, a default value will be set depending on the selected metric. + Threshold *MonitoringThreshold +} + +// GetPredictionDriftMetricThresholdBase implements the PredictionDriftMetricThresholdBaseClassification interface for type +// PredictionDriftMetricThresholdBase. +func (p *PredictionDriftMetricThresholdBase) GetPredictionDriftMetricThresholdBase() *PredictionDriftMetricThresholdBase { + return p +} + +type PredictionDriftMonitoringSignal struct { + // REQUIRED; [Required] A list of metrics to calculate and their associated thresholds. + MetricThresholds []PredictionDriftMetricThresholdBaseClassification + + // REQUIRED; [Required] The data which drift will be calculated for. + ProductionData MonitoringInputDataBaseClassification + + // REQUIRED; [Required] The data to calculate drift against. + ReferenceData MonitoringInputDataBaseClassification + + // REQUIRED; [Required] Specifies the type of signal to monitor. + SignalType *MonitoringSignalType + + // A dictionary that maps feature names to their respective data types. + FeatureDataTypeOverride map[string]*MonitoringFeatureDataType + + // The current notification mode for this signal. + NotificationTypes []*MonitoringNotificationType + + // Property dictionary. Properties can be added, but not removed or altered. + Properties map[string]*string +} + +// GetMonitoringSignalBase implements the MonitoringSignalBaseClassification interface for type PredictionDriftMonitoringSignal. +func (p *PredictionDriftMonitoringSignal) GetMonitoringSignalBase() *MonitoringSignalBase { + return &MonitoringSignalBase{ + NotificationTypes: p.NotificationTypes, + Properties: p.Properties, + SignalType: p.SignalType, } } @@ -5611,9 +7720,6 @@ func (p *PipelineJob) GetJobBaseProperties() *JobBaseProperties { type PrivateEndpoint struct { // READ-ONLY; The ARM identifier for Private Endpoint ID *string - - // READ-ONLY; The ARM identifier for Subnet resource that private endpoint links to - SubnetArmID *string } // PrivateEndpointConnection - The Private Endpoint Connection resource. @@ -5664,6 +7770,50 @@ type PrivateEndpointConnectionProperties struct { ProvisioningState *PrivateEndpointConnectionProvisioningState } +// PrivateEndpointDestination - Private Endpoint destination for a Private Endpoint Outbound Rule for the managed network +// of a machine learning workspace. +type PrivateEndpointDestination struct { + ServiceResourceID *string + SparkEnabled *bool + + // Type of a managed network Outbound Rule of a machine learning workspace. + SparkStatus *RuleStatus + SubresourceTarget *string +} + +// PrivateEndpointOutboundRule - Private Endpoint Outbound Rule for the managed network of a machine learning workspace. +type PrivateEndpointOutboundRule struct { + // REQUIRED; Type of a managed network Outbound Rule of a machine learning workspace. + Type *RuleType + + // Category of a managed network Outbound Rule of a machine learning workspace. + Category *RuleCategory + + // Private Endpoint destination for a Private Endpoint Outbound Rule for the managed network of a machine learning workspace. + Destination *PrivateEndpointDestination + + // Type of a managed network Outbound Rule of a machine learning workspace. + Status *RuleStatus +} + +// GetOutboundRule implements the OutboundRuleClassification interface for type PrivateEndpointOutboundRule. +func (p *PrivateEndpointOutboundRule) GetOutboundRule() *OutboundRule { + return &OutboundRule{ + Category: p.Category, + Status: p.Status, + Type: p.Type, + } +} + +// PrivateEndpointResource - The PE network resource that is linked to this PE connection. +type PrivateEndpointResource struct { + // The subnetId that the private endpoint is connected to. + SubnetArmID *string + + // READ-ONLY; The ARM identifier for Private Endpoint + ID *string +} + // PrivateLinkResource - A private link resource type PrivateLinkResource struct { // The identity of the resource. @@ -5743,6 +7893,22 @@ type ProbeSettings struct { Timeout *string } +// ProxyResource - The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a +// location +type ProxyResource struct { + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + // PyTorch distribution configuration. type PyTorch struct { // REQUIRED; [Required] Specifies the type of distribution framework. @@ -5759,6 +7925,11 @@ func (p *PyTorch) GetDistributionConfiguration() *DistributionConfiguration { } } +type QueueSettings struct { + // Controls the compute job tier + JobTier *JobTier +} + // QuotaBaseProperties - The properties for Quota update or retrieval. type QuotaBaseProperties struct { // Specifies the resource ID. @@ -5802,6 +7973,25 @@ func (r *RandomSamplingAlgorithm) GetSamplingAlgorithm() *SamplingAlgorithm { } } +// Recurrence - The workflow trigger recurrence for ComputeStartStop schedule type. +type Recurrence struct { + // [Required] The frequency to trigger schedule. + Frequency *ComputeRecurrenceFrequency + + // [Required] Specifies schedule interval in conjunction with frequency + Interval *int32 + + // [Required] The recurrence schedule. + Schedule *ComputeRecurrenceSchedule + + // The start time in yyyy-MM-ddTHH:mm:ss format. + StartTime *string + + // Specifies time zone in which the schedule runs. TimeZone should follow Windows time zone format. Refer: + // https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/default-time-zones?view=windows-11 + TimeZone *string +} + type RecurrenceSchedule struct { // REQUIRED; [Required] List of hours for the schedule. Hours []*int32 @@ -5860,6 +8050,38 @@ type RegenerateEndpointKeysRequest struct { KeyValue *string } +type Registry struct { + // REQUIRED; The geo-location where the resource lives + Location *string + + // REQUIRED; [Required] Additional attributes of the entity. + Properties *RegistryProperties + + // Managed service identity (system assigned and/or user assigned identities) + Identity *ManagedServiceIdentity + + // Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. + Kind *string + + // Sku details required for ARM contract for Autoscaling. + SKU *SKU + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + type RegistryListCredentialsResult struct { Passwords []*Password @@ -5870,6 +8092,111 @@ type RegistryListCredentialsResult struct { Username *string } +// RegistryPartialManagedServiceIdentity - Managed service identity (system assigned and/or user assigned identities) +type RegistryPartialManagedServiceIdentity struct { + // REQUIRED; Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). + Type *ManagedServiceIdentityType + + // The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM + // resource ids in the form: + // '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. + // The dictionary values can be empty objects ({}) in + // requests. + UserAssignedIdentities map[string]*UserAssignedIdentity + + // READ-ONLY; The service principal ID of the system assigned identity. This property will only be provided for a system assigned + // identity. + PrincipalID *string + + // READ-ONLY; The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity. + TenantID *string +} + +// RegistryPrivateEndpointConnection - Private endpoint connection definition. +type RegistryPrivateEndpointConnection struct { + // This is the private endpoint connection name created on SRP Full resource id: + // /subscriptions/{subId}/resourceGroups/{rgName}/providers/Microsoft.MachineLearningServices/{resourceType}/{resourceName}/registryPrivateEndpointConnections/{peConnectionName} + ID *string + + // Same as workspace location. + Location *string + + // Properties of the Private Endpoint Connection + Properties *RegistryPrivateEndpointConnectionProperties +} + +// RegistryPrivateEndpointConnectionProperties - Properties of the Private Endpoint Connection +type RegistryPrivateEndpointConnectionProperties struct { + // The group ids + GroupIDs []*string + + // The PE network resource that is linked to this PE connection. + PrivateEndpoint *PrivateEndpointResource + + // One of null, "Succeeded", "Provisioning", "Failed". While not approved, it's null. + ProvisioningState *string + + // The connection state. + RegistryPrivateLinkServiceConnectionState *RegistryPrivateLinkServiceConnectionState +} + +// RegistryPrivateLinkServiceConnectionState - The connection state. +type RegistryPrivateLinkServiceConnectionState struct { + // Some RP chose "None". Other RPs use this for region expansion. + ActionsRequired *string + + // User-defined message that, per NRP doc, may be used for approval-related message. + Description *string + + // Connection status of the service consumer with the service provider + Status *EndpointServiceConnectionStatus +} + +// RegistryProperties - Details of the Registry +type RegistryProperties struct { + // Discovery URL for the Registry + DiscoveryURL *string + + // IntellectualPropertyPublisher for the registry + IntellectualPropertyPublisher *string + + // ResourceId of the managed RG if the registry has system created resources + ManagedResourceGroup *ArmResourceID + + // MLFlow Registry URI for the Registry + MlFlowRegistryURI *string + + // Is the Registry accessible from the internet? Possible values: "Enabled" or "Disabled" + PublicNetworkAccess *string + + // Details of each region the registry is in + RegionDetails []*RegistryRegionArmDetails + + // Private endpoint connections info used for pending connections in private link portal + RegistryPrivateEndpointConnections []*RegistryPrivateEndpointConnection +} + +// RegistryRegionArmDetails - Details for each region the registry is in +type RegistryRegionArmDetails struct { + // List of ACR accounts + AcrDetails []*AcrDetails + + // The location where the registry exists + Location *string + + // List of storage accounts + StorageAccountDetails []*StorageAccountDetails +} + +// RegistryTrackedResourceArmPaginatedResult - A paginated list of Registry entities. +type RegistryTrackedResourceArmPaginatedResult struct { + // The link to the next page of Registry objects. If null, there are no additional pages. + NextLink *string + + // An array of objects of type Registry. + Value []*Registry +} + // Regression task in AutoML Table vertical. type Regression struct { // REQUIRED; [Required] Task type for AutoMLJob. @@ -5963,6 +8290,13 @@ type RegressionTrainingSettings struct { StackEnsembleSettings *StackEnsembleSettings } +type RequestLogging struct { + // For payload logging, we only collect payload by default. If customers also want to collect the specified headers, they + // can set them in captureHeaders so that backend will collect those headers along + // with payload. + CaptureHeaders []*string +} + // Resource - Common fields that are returned in the response for all Azure Resource Manager resources type Resource struct { // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} @@ -6036,6 +8370,44 @@ type ResourceQuota struct { Unit *QuotaUnit } +// RollingInputData - Rolling input data definition. +type RollingInputData struct { + // REQUIRED; [Required] Specifies the type of signal to monitor. + InputDataType *MonitoringInputDataType + + // REQUIRED; [Required] Specifies the type of job. + JobInputType *JobInputType + + // REQUIRED; [Required] Input Asset URI. + URI *string + + // REQUIRED; [Required] The time offset between the end of the data window and the monitor's current run time. + WindowOffset *string + + // REQUIRED; [Required] The size of the rolling data window. + WindowSize *string + + // Mapping of column names to special uses. + Columns map[string]*string + + // The context metadata of the data source. + DataContext *string + + // Reference to the component asset used to preprocess the data. + PreprocessingComponentID *string +} + +// GetMonitoringInputDataBase implements the MonitoringInputDataBaseClassification interface for type RollingInputData. +func (r *RollingInputData) GetMonitoringInputDataBase() *MonitoringInputDataBase { + return &MonitoringInputDataBase{ + Columns: r.Columns, + DataContext: r.DataContext, + InputDataType: r.InputDataType, + JobInputType: r.JobInputType, + URI: r.URI, + } +} + type Route struct { // REQUIRED; [Required] The path for the route. Path *string @@ -6049,25 +8421,74 @@ type SASAuthTypeWorkspaceConnectionProperties struct { AuthType *ConnectionAuthType // Category of the connection - Category *ConnectionCategory - Credentials *WorkspaceConnectionSharedAccessSignature - Target *string + Category *ConnectionCategory + Credentials *WorkspaceConnectionSharedAccessSignature + ExpiryTime *time.Time + IsSharedToAll *bool + + // Store user metadata for this connection + Metadata map[string]*string + SharedUserList []*string + Target *string // Value details of the workspace connection. Value *string // format for the workspace connection value ValueFormat *ValueFormat + + // READ-ONLY + CreatedByWorkspaceArmID *string + + // READ-ONLY; Group based on connection category + Group *ConnectionGroup } // GetWorkspaceConnectionPropertiesV2 implements the WorkspaceConnectionPropertiesV2Classification interface for type SASAuthTypeWorkspaceConnectionProperties. func (s *SASAuthTypeWorkspaceConnectionProperties) GetWorkspaceConnectionPropertiesV2() *WorkspaceConnectionPropertiesV2 { return &WorkspaceConnectionPropertiesV2{ - AuthType: s.AuthType, - Category: s.Category, - Target: s.Target, - Value: s.Value, - ValueFormat: s.ValueFormat, + AuthType: s.AuthType, + Category: s.Category, + CreatedByWorkspaceArmID: s.CreatedByWorkspaceArmID, + ExpiryTime: s.ExpiryTime, + Group: s.Group, + IsSharedToAll: s.IsSharedToAll, + Metadata: s.Metadata, + SharedUserList: s.SharedUserList, + Target: s.Target, + Value: s.Value, + ValueFormat: s.ValueFormat, + } +} + +// SASCredential - Access with full SAS uri +type SASCredential struct { + // REQUIRED; [Required] Credential type used to authentication with storage. + CredentialType *DataReferenceCredentialType + + // Full SAS Uri, including the storage, container/blob path and SAS token + SasURI *string +} + +// GetDataReferenceCredential implements the DataReferenceCredentialClassification interface for type SASCredential. +func (s *SASCredential) GetDataReferenceCredential() *DataReferenceCredential { + return &DataReferenceCredential{ + CredentialType: s.CredentialType, + } +} + +type SASCredentialDto struct { + // REQUIRED; [Required] Credential type used to authentication with storage. + CredentialType *PendingUploadCredentialType + + // Full SAS Uri, including the storage, container/blob path and SAS token + SasURI *string +} + +// GetPendingUploadCredentialDto implements the PendingUploadCredentialDtoClassification interface for type SASCredentialDto. +func (s *SASCredentialDto) GetPendingUploadCredentialDto() *PendingUploadCredentialDto { + return &PendingUploadCredentialDto{ + CredentialType: s.CredentialType, } } @@ -6291,44 +8712,170 @@ type ScheduleResourceArmPaginatedResult struct { Value []*Schedule } -// ScriptReference - Script reference -type ScriptReference struct { - // Optional command line arguments passed to the script to run. - ScriptArguments *string +// ScriptReference - Script reference +type ScriptReference struct { + // Optional command line arguments passed to the script to run. + ScriptArguments *string + + // The location of scripts in the mounted volume. + ScriptData *string + + // The storage source of the script: workspace. + ScriptSource *string + + // Optional time period passed to timeout command. + Timeout *string +} + +// ScriptsToExecute - Customized setup scripts +type ScriptsToExecute struct { + // Script that's run only once during provision of the compute. + CreationScript *ScriptReference + + // Script that's run every time the machine starts. + StartupScript *ScriptReference +} + +// Seasonality - Forecasting seasonality. +type Seasonality struct { + // REQUIRED; [Required] Seasonality mode. + Mode *SeasonalityMode +} + +// GetSeasonality implements the SeasonalityClassification interface for type Seasonality. +func (s *Seasonality) GetSeasonality() *Seasonality { return s } + +type ServerlessComputeSettings struct { + // The resource ID of an existing virtual network subnet in which serverless compute nodes should be deployed + ServerlessComputeCustomSubnet *string + + // The flag to signal if serverless compute nodes deployed in custom vNet would have no public IP addresses for a workspace + // with private endpoint + ServerlessComputeNoPublicIP *bool +} + +type ServerlessEndpoint struct { + // REQUIRED; The geo-location where the resource lives + Location *string + + // REQUIRED; [Required] Additional attributes of the entity. + Properties *ServerlessEndpointProperties + + // Managed service identity (system assigned and/or user assigned identities) + Identity *ManagedServiceIdentity + + // Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. + Kind *string + + // Sku details required for ARM contract for Autoscaling. + SKU *SKU + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +type ServerlessEndpointProperties struct { + // REQUIRED; [Required] Specifies the authentication mode for the Serverless endpoint. + AuthMode *ServerlessInferenceEndpointAuthMode - // The location of scripts in the mounted volume. - ScriptData *string + // Specifies the content safety options. If omitted, the default content safety settings will be configured + ContentSafety *ContentSafety - // The storage source of the script: workspace. - ScriptSource *string + // The model settings (model id) for the model being serviced on the ServerlessEndpoint. + ModelSettings *ModelSettings - // Optional time period passed to timeout command. - Timeout *string -} + // READ-ONLY; The current state of the ServerlessEndpoint. + EndpointState *ServerlessEndpointState -// ScriptsToExecute - Customized setup scripts -type ScriptsToExecute struct { - // Script that's run only once during provision of the compute. - CreationScript *ScriptReference + // READ-ONLY; The inference uri to target when making requests against the serverless endpoint + InferenceEndpoint *ServerlessInferenceEndpoint - // Script that's run every time the machine starts. - StartupScript *ScriptReference + // READ-ONLY; The MarketplaceSubscription Azure ID associated to this ServerlessEndpoint. + MarketplaceSubscriptionID *string + + // READ-ONLY; Provisioning state for the endpoint. + ProvisioningState *EndpointProvisioningState } -// Seasonality - Forecasting seasonality. -type Seasonality struct { - // REQUIRED; [Required] Seasonality mode. - Mode *SeasonalityMode +// ServerlessEndpointTrackedResourceArmPaginatedResult - A paginated list of ServerlessEndpoint entities. +type ServerlessEndpointTrackedResourceArmPaginatedResult struct { + // The link to the next page of ServerlessEndpoint objects. If null, there are no additional pages. + NextLink *string + + // An array of objects of type ServerlessEndpoint. + Value []*ServerlessEndpoint } -// GetSeasonality implements the SeasonalityClassification interface for type Seasonality. -func (s *Seasonality) GetSeasonality() *Seasonality { return s } +type ServerlessInferenceEndpoint struct { + // REQUIRED; [Required] The inference uri to target when making requests against the Serverless Endpoint. + URI *string + + // READ-ONLY; Specifies any required headers to target this serverless endpoint. + Headers map[string]*string +} type ServiceManagedResourcesSettings struct { // The settings for the service managed cosmosdb account. CosmosDb *CosmosDbSettings } +type ServicePrincipalAuthTypeWorkspaceConnectionProperties struct { + // REQUIRED; Authentication type of the connection target + AuthType *ConnectionAuthType + + // Category of the connection + Category *ConnectionCategory + Credentials *WorkspaceConnectionServicePrincipal + ExpiryTime *time.Time + IsSharedToAll *bool + + // Store user metadata for this connection + Metadata map[string]*string + SharedUserList []*string + Target *string + + // Value details of the workspace connection. + Value *string + + // format for the workspace connection value + ValueFormat *ValueFormat + + // READ-ONLY + CreatedByWorkspaceArmID *string + + // READ-ONLY; Group based on connection category + Group *ConnectionGroup +} + +// GetWorkspaceConnectionPropertiesV2 implements the WorkspaceConnectionPropertiesV2Classification interface for type ServicePrincipalAuthTypeWorkspaceConnectionProperties. +func (s *ServicePrincipalAuthTypeWorkspaceConnectionProperties) GetWorkspaceConnectionPropertiesV2() *WorkspaceConnectionPropertiesV2 { + return &WorkspaceConnectionPropertiesV2{ + AuthType: s.AuthType, + Category: s.Category, + CreatedByWorkspaceArmID: s.CreatedByWorkspaceArmID, + ExpiryTime: s.ExpiryTime, + Group: s.Group, + IsSharedToAll: s.IsSharedToAll, + Metadata: s.Metadata, + SharedUserList: s.SharedUserList, + Target: s.Target, + Value: s.Value, + ValueFormat: s.ValueFormat, + } +} + // ServicePrincipalDatastoreCredentials - Service Principal datastore credentials configuration. type ServicePrincipalDatastoreCredentials struct { // REQUIRED; [Required] Service principal client ID. @@ -6373,6 +8920,43 @@ func (s *ServicePrincipalDatastoreSecrets) GetDatastoreSecrets() *DatastoreSecre } } +// ServiceTagDestination - Service Tag destination for a Service Tag Outbound Rule for the managed network of a machine learning +// workspace. +type ServiceTagDestination struct { + // The action enum for networking rule. + Action *RuleAction + PortRanges *string + Protocol *string + ServiceTag *string + + // READ-ONLY; Optional, if provided, the ServiceTag property will be ignored. + AddressPrefixes []*string +} + +// ServiceTagOutboundRule - Service Tag Outbound Rule for the managed network of a machine learning workspace. +type ServiceTagOutboundRule struct { + // REQUIRED; Type of a managed network Outbound Rule of a machine learning workspace. + Type *RuleType + + // Category of a managed network Outbound Rule of a machine learning workspace. + Category *RuleCategory + + // Service Tag destination for a Service Tag Outbound Rule for the managed network of a machine learning workspace. + Destination *ServiceTagDestination + + // Type of a managed network Outbound Rule of a machine learning workspace. + Status *RuleStatus +} + +// GetOutboundRule implements the OutboundRuleClassification interface for type ServiceTagOutboundRule. +func (s *ServiceTagOutboundRule) GetOutboundRule() *OutboundRule { + return &OutboundRule{ + Category: s.Category, + Status: s.Status, + Type: s.Type, + } +} + // SetupScripts - Details of customized scripts to execute for setting up the cluster. type SetupScripts struct { // Customized setup scripts @@ -6402,6 +8986,157 @@ type SharedPrivateLinkResourceProperty struct { Status *PrivateEndpointServiceConnectionStatus } +// SparkJob - Spark job definition. +type SparkJob struct { + // REQUIRED; [Required] arm-id of the code asset. + CodeID *string + + // REQUIRED; [Required] The entry to execute on startup of the job. + Entry SparkJobEntryClassification + + // REQUIRED; [Required] Specifies the type of job. + JobType *JobType + + // Archive files used in the job. + Archives []*string + + // Arguments for the job. + Args *string + + // ARM resource ID of the component resource. + ComponentID *string + + // ARM resource ID of the compute resource. + ComputeID *string + + // Spark configured properties. + Conf map[string]*string + + // The asset description text. + Description *string + + // Display name of job. + DisplayName *string + + // The ARM resource ID of the Environment specification for the job. + EnvironmentID *string + + // Environment variables included in the job. + EnvironmentVariables map[string]*string + + // The name of the experiment the job belongs to. If not set, the job is placed in the "Default" experiment. + ExperimentName *string + + // Files used in the job. + Files []*string + + // Identity configuration. If set, this should be one of AmlToken, ManagedIdentity, UserIdentity or null. Defaults to AmlToken + // if null. + Identity IdentityConfigurationClassification + + // Mapping of input data bindings used in the job. + Inputs map[string]JobInputClassification + + // Is the asset archived? + IsArchived *bool + + // Jar files used in the job. + Jars []*string + + // Notification setting for the job + NotificationSetting *NotificationSetting + + // Mapping of output data bindings used in the job. + Outputs map[string]JobOutputClassification + + // The asset property dictionary. + Properties map[string]*string + + // Python files used in the job. + PyFiles []*string + + // Queue settings for the job + QueueSettings *QueueSettings + + // Compute Resource configuration for the job. + Resources *SparkResourceConfiguration + + // List of JobEndpoints. For local jobs, a job endpoint will have an endpoint value of FileStreamObject. + Services map[string]*JobService + + // Tag dictionary. Tags can be added, removed, and updated. + Tags map[string]*string + + // READ-ONLY; Status of the job. + Status *JobStatus +} + +// GetJobBaseProperties implements the JobBasePropertiesClassification interface for type SparkJob. +func (s *SparkJob) GetJobBaseProperties() *JobBaseProperties { + return &JobBaseProperties{ + ComponentID: s.ComponentID, + ComputeID: s.ComputeID, + Description: s.Description, + DisplayName: s.DisplayName, + ExperimentName: s.ExperimentName, + Identity: s.Identity, + IsArchived: s.IsArchived, + JobType: s.JobType, + NotificationSetting: s.NotificationSetting, + Properties: s.Properties, + Services: s.Services, + Status: s.Status, + Tags: s.Tags, + } +} + +// SparkJobEntry - Spark job entry point definition. +type SparkJobEntry struct { + // REQUIRED; [Required] Type of the job's entry point. + SparkJobEntryType *SparkJobEntryType +} + +// GetSparkJobEntry implements the SparkJobEntryClassification interface for type SparkJobEntry. +func (s *SparkJobEntry) GetSparkJobEntry() *SparkJobEntry { return s } + +type SparkJobPythonEntry struct { + // REQUIRED; [Required] Relative python file path for job entry point. + File *string + + // REQUIRED; [Required] Type of the job's entry point. + SparkJobEntryType *SparkJobEntryType +} + +// GetSparkJobEntry implements the SparkJobEntryClassification interface for type SparkJobPythonEntry. +func (s *SparkJobPythonEntry) GetSparkJobEntry() *SparkJobEntry { + return &SparkJobEntry{ + SparkJobEntryType: s.SparkJobEntryType, + } +} + +type SparkJobScalaEntry struct { + // REQUIRED; [Required] Scala class name used as entry point. + ClassName *string + + // REQUIRED; [Required] Type of the job's entry point. + SparkJobEntryType *SparkJobEntryType +} + +// GetSparkJobEntry implements the SparkJobEntryClassification interface for type SparkJobScalaEntry. +func (s *SparkJobScalaEntry) GetSparkJobEntry() *SparkJobEntry { + return &SparkJobEntry{ + SparkJobEntryType: s.SparkJobEntryType, + } +} + +type SparkResourceConfiguration struct { + // Optional type of VM used as supported by the compute target. + InstanceType *string + + // Version of spark runtime used for the job. + RuntimeVersion *string +} + // StackEnsembleSettings - Advances setting to customize StackEnsemble run. type StackEnsembleSettings struct { // Optional parameters to pass to the initializer of the meta-learner. @@ -6415,6 +9150,53 @@ type StackEnsembleSettings struct { StackMetaLearnerType *StackMetaLearnerType } +// StaticInputData - Static input data definition. +type StaticInputData struct { + // REQUIRED; [Required] Specifies the type of signal to monitor. + InputDataType *MonitoringInputDataType + + // REQUIRED; [Required] Specifies the type of job. + JobInputType *JobInputType + + // REQUIRED; [Required] Input Asset URI. + URI *string + + // REQUIRED; [Required] The end date of the data window. + WindowEnd *time.Time + + // REQUIRED; [Required] The start date of the data window. + WindowStart *time.Time + + // Mapping of column names to special uses. + Columns map[string]*string + + // The context metadata of the data source. + DataContext *string + + // Reference to the component asset used to preprocess the data. + PreprocessingComponentID *string +} + +// GetMonitoringInputDataBase implements the MonitoringInputDataBaseClassification interface for type StaticInputData. +func (s *StaticInputData) GetMonitoringInputDataBase() *MonitoringInputDataBase { + return &MonitoringInputDataBase{ + Columns: s.Columns, + DataContext: s.DataContext, + InputDataType: s.InputDataType, + JobInputType: s.JobInputType, + URI: s.URI, + } +} + +// StorageAccountDetails - Details of storage account to be used for the Registry +type StorageAccountDetails struct { + // Details of system created storage account to be used for the registry + SystemCreatedStorageAccount *SystemCreatedStorageAccount + + // Details of user created storage account to be used for the registry + UserCreatedStorageAccount *UserCreatedStorageAccount +} + // SweepJob - Sweep job definition. type SweepJob struct { // REQUIRED; [Required] Specifies the type of job. @@ -6464,12 +9246,18 @@ type SweepJob struct { // Sweep Job limit. Limits *SweepJobLimits + // Notification setting for the job + NotificationSetting *NotificationSetting + // Mapping of output data bindings used in the job. Outputs map[string]JobOutputClassification // The asset property dictionary. Properties map[string]*string + // Queue settings for the job + QueueSettings *QueueSettings + // List of JobEndpoints. For local jobs, a job endpoint will have an endpoint value of FileStreamObject. Services map[string]*JobService @@ -6483,18 +9271,19 @@ type SweepJob struct { // GetJobBaseProperties implements the JobBasePropertiesClassification interface for type SweepJob. func (s *SweepJob) GetJobBaseProperties() *JobBaseProperties { return &JobBaseProperties{ - ComponentID: s.ComponentID, - ComputeID: s.ComputeID, - Description: s.Description, - DisplayName: s.DisplayName, - ExperimentName: s.ExperimentName, - Identity: s.Identity, - IsArchived: s.IsArchived, - JobType: s.JobType, - Properties: s.Properties, - Services: s.Services, - Status: s.Status, - Tags: s.Tags, + ComponentID: s.ComponentID, + ComputeID: s.ComputeID, + Description: s.Description, + DisplayName: s.DisplayName, + ExperimentName: s.ExperimentName, + Identity: s.Identity, + IsArchived: s.IsArchived, + JobType: s.JobType, + NotificationSetting: s.NotificationSetting, + Properties: s.Properties, + Services: s.Services, + Status: s.Status, + Tags: s.Tags, } } @@ -6608,6 +9397,35 @@ type SynapseSparkProperties struct { WorkspaceName *string } +type SystemCreatedAcrAccount struct { + // Name of the ACR account + AcrAccountName *string + + // SKU of the ACR account + AcrAccountSKU *string + + // This is populated once the ACR account is created. + ArmResourceID *ArmResourceID +} + +type SystemCreatedStorageAccount struct { + // Public blob access allowed + AllowBlobPublicAccess *bool + + // This is populated once the storage account is created. + ArmResourceID *ArmResourceID + + // HNS enabled for storage account + StorageAccountHnsEnabled *bool + + // Name of the storage account + StorageAccountName *string + + // Allowed values: "StandardLRS", "StandardGRS", "StandardRAGRS", "StandardZRS", "StandardGZRS", "StandardRAGZRS", "PremiumLRS", + // "PremiumZRS" + StorageAccountType *string +} + // SystemData - Metadata pertaining to creation and last modification of the resource. type SystemData struct { // The timestamp of resource creation (UTC). @@ -6896,6 +9714,27 @@ func (t *TextNer) GetAutoMLVertical() *AutoMLVertical { } } +// TmpfsOptions - Describes the tmpfs options for the container +type TmpfsOptions struct { + // Mention the Tmpfs size + Size *int32 +} + +type TopNFeaturesByAttribution struct { + // REQUIRED; [Required] Specifies the feature filter to leverage when selecting features to calculate metrics over. + FilterType *MonitoringFeatureFilterType + + // The number of top features to include. + Top *int32 +} + +// GetMonitoringFeatureFilterBase implements the MonitoringFeatureFilterBaseClassification interface for type TopNFeaturesByAttribution. +func (t *TopNFeaturesByAttribution) GetMonitoringFeatureFilterBase() *MonitoringFeatureFilterBase { + return &MonitoringFeatureFilterBase{ + FilterType: t.FilterType, + } +} + // TrackedResource - The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' // and a 'location' type TrackedResource struct { @@ -7059,7 +9898,7 @@ type URIFileDataVersion struct { // REQUIRED; [Required] Specifies the type of data. DataType *DataType - // REQUIRED; [Required] Uri of the data. Usage/meaning depends on Microsoft.MachineLearning.ManagementFrontEnd.Contracts.V20221001.Assets.DataVersionBase.DataType + // REQUIRED; [Required] Uri of the data. Example: https://go.microsoft.com/fwlink/?linkid=2202330 DataURI *string // The asset description text. @@ -7140,7 +9979,7 @@ type URIFolderDataVersion struct { // REQUIRED; [Required] Specifies the type of data. DataType *DataType - // REQUIRED; [Required] Uri of the data. Usage/meaning depends on Microsoft.MachineLearning.ManagementFrontEnd.Contracts.V20221001.Assets.DataVersionBase.DataType + // REQUIRED; [Required] Uri of the data. Example: https://go.microsoft.com/fwlink/?linkid=2202330 DataURI *string // The asset description text. @@ -7298,6 +10137,16 @@ type UserAssignedIdentity struct { PrincipalID *string } +type UserCreatedAcrAccount struct { + // ARM ResourceId of a resource + ArmResourceID *ArmResourceID +} + +type UserCreatedStorageAccount struct { + // ARM ResourceId of a resource + ArmResourceID *ArmResourceID +} + // UserIdentity - User identity configuration. type UserIdentity struct { // REQUIRED; [Required] Specifies the type of identity framework. @@ -7316,25 +10165,43 @@ type UsernamePasswordAuthTypeWorkspaceConnectionProperties struct { AuthType *ConnectionAuthType // Category of the connection - Category *ConnectionCategory - Credentials *WorkspaceConnectionUsernamePassword - Target *string + Category *ConnectionCategory + Credentials *WorkspaceConnectionUsernamePassword + ExpiryTime *time.Time + IsSharedToAll *bool + + // Store user metadata for this connection + Metadata map[string]*string + SharedUserList []*string + Target *string // Value details of the workspace connection. Value *string // format for the workspace connection value ValueFormat *ValueFormat + + // READ-ONLY + CreatedByWorkspaceArmID *string + + // READ-ONLY; Group based on connection category + Group *ConnectionGroup } // GetWorkspaceConnectionPropertiesV2 implements the WorkspaceConnectionPropertiesV2Classification interface for type UsernamePasswordAuthTypeWorkspaceConnectionProperties. func (u *UsernamePasswordAuthTypeWorkspaceConnectionProperties) GetWorkspaceConnectionPropertiesV2() *WorkspaceConnectionPropertiesV2 { return &WorkspaceConnectionPropertiesV2{ - AuthType: u.AuthType, - Category: u.Category, - Target: u.Target, - Value: u.Value, - ValueFormat: u.ValueFormat, + AuthType: u.AuthType, + Category: u.Category, + CreatedByWorkspaceArmID: u.CreatedByWorkspaceArmID, + ExpiryTime: u.ExpiryTime, + Group: u.Group, + IsSharedToAll: u.IsSharedToAll, + Metadata: u.Metadata, + SharedUserList: u.SharedUserList, + Target: u.Target, + Value: u.Value, + ValueFormat: u.ValueFormat, } } @@ -7497,10 +10364,56 @@ type VirtualMachineSizeListResult struct { Value []*VirtualMachineSize } +// VolumeDefinition - Describes the volume configuration for the container +type VolumeDefinition struct { + // Bind Options of the mount + Bind *BindOptions + + // Consistency of the volume + Consistency *string + + // Indicate whether to mount volume as readOnly. Default value for this is false. + ReadOnly *bool + + // Source of the mount. For bind mounts this is the host path. + Source *string + + // Target of the mount. For bind mounts this is the path in the container. + Target *string + + // tmpfs option of the mount + Tmpfs *TmpfsOptions + + // Type of Volume Definition. Possible Values: bind,volume,tmpfs,npipe + Type *VolumeDefinitionType + + // Volume Options of the mount + Volume *VolumeOptions +} + +// VolumeOptions - Describes the volume options for the container +type VolumeOptions struct { + // Indicate whether volume is nocopy + Nocopy *bool +} + +// Webhook base +type Webhook struct { + // REQUIRED; [Required] Specifies the type of service to send a callback + WebhookType *WebhookType + + // Send callback on a specified notification event + EventType *string +} + +// GetWebhook implements the WebhookClassification interface for type Webhook. +func (w *Webhook) GetWebhook() *Webhook { return w } + // Workspace - An object that represents a machine learning workspace. type Workspace struct { // The identity of the resource. Identity *ManagedServiceIdentity + Kind *string // Specifies the location of the resource. Location *string @@ -7527,11 +10440,50 @@ type Workspace struct { Type *string } +// WorkspaceConnectionAPIKey - Api key object for workspace connection credential. +type WorkspaceConnectionAPIKey struct { + Key *string +} + +type WorkspaceConnectionAccessKey struct { + AccessKeyID *string + SecretAccessKey *string +} + +type WorkspaceConnectionAccountKey struct { + Key *string +} + type WorkspaceConnectionManagedIdentity struct { ClientID *string ResourceID *string } +// WorkspaceConnectionOAuth2 - ClientId and ClientSecret are required. Other properties are optional depending on each OAuth2 +// provider's implementation. +type WorkspaceConnectionOAuth2 struct { + // Required by Concur connection category + AuthURL *string + + // Client id in the format of UUID + ClientID *string + ClientSecret *string + + // Required by GoogleAdWords connection category + DeveloperToken *string + Password *string + + // Required by GoogleBigQuery, GoogleAdWords, Hubspot, QuickBooks, Square, Xero, Zoho where user needs to get RefreshToken + // offline + RefreshToken *string + + // Required by QuickBooks and Xero connection categories + TenantID *string + + // Concur, ServiceNow auth server AccessToken grant type is 'Password' which requires UsernamePassword + Username *string +} + type WorkspaceConnectionPersonalAccessToken struct { Pat *string } @@ -7541,14 +10493,26 @@ type WorkspaceConnectionPropertiesV2 struct { AuthType *ConnectionAuthType // Category of the connection - Category *ConnectionCategory - Target *string + Category *ConnectionCategory + ExpiryTime *time.Time + IsSharedToAll *bool + + // Store user metadata for this connection + Metadata map[string]*string + SharedUserList []*string + Target *string // Value details of the workspace connection. Value *string // format for the workspace connection value ValueFormat *ValueFormat + + // READ-ONLY + CreatedByWorkspaceArmID *string + + // READ-ONLY; Group based on connection category + Group *ConnectionGroup } // GetWorkspaceConnectionPropertiesV2 implements the WorkspaceConnectionPropertiesV2Classification interface for type WorkspaceConnectionPropertiesV2. @@ -7580,13 +10544,28 @@ type WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult struct { NextLink *string } +type WorkspaceConnectionServicePrincipal struct { + ClientID *string + ClientSecret *string + TenantID *string +} + type WorkspaceConnectionSharedAccessSignature struct { Sas *string } type WorkspaceConnectionUsernamePassword struct { Password *string - Username *string + + // Optional, required by connections like SalesForce for extra security in addition to UsernamePassword + SecurityToken *string + Username *string +} + +// WorkspaceHubConfig - WorkspaceHub's configuration object. +type WorkspaceHubConfig struct { + AdditionalWorkspaceStorageAccounts []*string + DefaultWorkspaceResourceGroup *string } // WorkspaceListResult - The result of a request to list machine learning workspaces. @@ -7605,7 +10584,8 @@ type WorkspaceProperties struct { AllowPublicAccessWhenBehindVnet *bool // ARM id of the application insights associated with this workspace. - ApplicationInsights *string + ApplicationInsights *string + AssociatedWorkspaces []*string // ARM id of the container registry associated with this workspace. ContainerRegistry *string @@ -7614,16 +10594,21 @@ type WorkspaceProperties struct { Description *string // Url for the discovery service to identify regional endpoints for machine learning experimentation services - DiscoveryURL *string + DiscoveryURL *string + EnableDataIsolation *bool // The encryption settings of Azure ML workspace. Encryption *EncryptionProperty + // Settings for feature store type workspace. + FeatureStoreSettings *FeatureStoreSettings + // The friendly name for this workspace. This name in mutable FriendlyName *string // The flag to signal HBI data in the workspace and reduce diagnostic data collected by the service - HbiWorkspace *bool + HbiWorkspace *bool + HubResourceID *string // The compute name for image build ImageBuildCompute *string @@ -7631,12 +10616,18 @@ type WorkspaceProperties struct { // ARM id of the key vault associated with this workspace. This cannot be changed once the workspace has been created KeyVault *string + // Managed Network settings for a machine learning workspace. + ManagedNetwork *ManagedNetworkSettings + // The user assigned identity resource id that represents the workspace identity. PrimaryUserAssignedIdentity *string // Whether requests from Public Network are allowed. PublicNetworkAccess *PublicNetworkAccess + // Settings for serverless compute created in the workspace + ServerlessComputeSettings *ServerlessComputeSettings + // The service managed resource settings. ServiceManagedResourcesSettings *ServiceManagedResourcesSettings @@ -7649,6 +10640,9 @@ type WorkspaceProperties struct { // Enabling v1legacymode may prevent you from using features provided by the v2 API. V1LegacyMode *bool + // WorkspaceHub's configuration object. + WorkspaceHubConfig *WorkspaceHubConfig + // READ-ONLY; The URI associated with this workspace that machine learning flow must point at to set up tracking. MlFlowTrackingURI *string @@ -7688,7 +10682,12 @@ type WorkspacePropertiesUpdateParameters struct { ContainerRegistry *string // The description of this workspace. - Description *string + Description *string + EnableDataIsolation *bool + Encryption *EncryptionUpdateProperties + + // Settings for feature store type workspace. + FeatureStoreSettings *FeatureStoreSettings // The friendly name for this workspace. FriendlyName *string @@ -7696,14 +10695,23 @@ type WorkspacePropertiesUpdateParameters struct { // The compute name for image build ImageBuildCompute *string + // Managed Network settings for a machine learning workspace. + ManagedNetwork *ManagedNetworkSettings + // The user assigned identity resource id that represents the workspace identity. PrimaryUserAssignedIdentity *string // Whether requests from Public Network are allowed. PublicNetworkAccess *PublicNetworkAccess + // Settings for serverless compute created in the workspace + ServerlessComputeSettings *ServerlessComputeSettings + // The service managed resource settings. ServiceManagedResourcesSettings *ServiceManagedResourcesSettings + + // Enabling v1legacymode may prevent you from using features provided by the v2 API. + V1LegacyMode *bool } // WorkspaceUpdateParameters - The parameters for updating a machine learning workspace. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/models_serde.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/models_serde.go similarity index 70% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/models_serde.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/models_serde.go index b9a04c115..7ddbe4061 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/models_serde.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/models_serde.go @@ -15,6 +15,73 @@ import ( "reflect" ) +// MarshalJSON implements the json.Marshaller interface for type AADAuthTypeWorkspaceConnectionProperties. +func (a AADAuthTypeWorkspaceConnectionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["authType"] = ConnectionAuthTypeAAD + populate(objectMap, "category", a.Category) + populate(objectMap, "createdByWorkspaceArmId", a.CreatedByWorkspaceArmID) + populateDateTimeRFC3339(objectMap, "expiryTime", a.ExpiryTime) + populate(objectMap, "group", a.Group) + populate(objectMap, "isSharedToAll", a.IsSharedToAll) + populate(objectMap, "metadata", a.Metadata) + populate(objectMap, "sharedUserList", a.SharedUserList) + populate(objectMap, "target", a.Target) + populate(objectMap, "value", a.Value) + populate(objectMap, "valueFormat", a.ValueFormat) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AADAuthTypeWorkspaceConnectionProperties. +func (a *AADAuthTypeWorkspaceConnectionProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "authType": + err = unpopulate(val, "AuthType", &a.AuthType) + delete(rawMsg, key) + case "category": + err = unpopulate(val, "Category", &a.Category) + delete(rawMsg, key) + case "createdByWorkspaceArmId": + err = unpopulate(val, "CreatedByWorkspaceArmID", &a.CreatedByWorkspaceArmID) + delete(rawMsg, key) + case "expiryTime": + err = unpopulateDateTimeRFC3339(val, "ExpiryTime", &a.ExpiryTime) + delete(rawMsg, key) + case "group": + err = unpopulate(val, "Group", &a.Group) + delete(rawMsg, key) + case "isSharedToAll": + err = unpopulate(val, "IsSharedToAll", &a.IsSharedToAll) + delete(rawMsg, key) + case "metadata": + err = unpopulate(val, "Metadata", &a.Metadata) + delete(rawMsg, key) + case "sharedUserList": + err = unpopulate(val, "SharedUserList", &a.SharedUserList) + delete(rawMsg, key) + case "target": + err = unpopulate(val, "Target", &a.Target) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &a.Value) + delete(rawMsg, key) + case "valueFormat": + err = unpopulate(val, "ValueFormat", &a.ValueFormat) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type AKS. func (a AKS) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -168,6 +235,219 @@ func (a *AKSSchemaProperties) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type APIKeyAuthWorkspaceConnectionProperties. +func (a APIKeyAuthWorkspaceConnectionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["authType"] = ConnectionAuthTypeAPIKey + populate(objectMap, "category", a.Category) + populate(objectMap, "createdByWorkspaceArmId", a.CreatedByWorkspaceArmID) + populate(objectMap, "credentials", a.Credentials) + populateDateTimeRFC3339(objectMap, "expiryTime", a.ExpiryTime) + populate(objectMap, "group", a.Group) + populate(objectMap, "isSharedToAll", a.IsSharedToAll) + populate(objectMap, "metadata", a.Metadata) + populate(objectMap, "sharedUserList", a.SharedUserList) + populate(objectMap, "target", a.Target) + populate(objectMap, "value", a.Value) + populate(objectMap, "valueFormat", a.ValueFormat) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type APIKeyAuthWorkspaceConnectionProperties. +func (a *APIKeyAuthWorkspaceConnectionProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "authType": + err = unpopulate(val, "AuthType", &a.AuthType) + delete(rawMsg, key) + case "category": + err = unpopulate(val, "Category", &a.Category) + delete(rawMsg, key) + case "createdByWorkspaceArmId": + err = unpopulate(val, "CreatedByWorkspaceArmID", &a.CreatedByWorkspaceArmID) + delete(rawMsg, key) + case "credentials": + err = unpopulate(val, "Credentials", &a.Credentials) + delete(rawMsg, key) + case "expiryTime": + err = unpopulateDateTimeRFC3339(val, "ExpiryTime", &a.ExpiryTime) + delete(rawMsg, key) + case "group": + err = unpopulate(val, "Group", &a.Group) + delete(rawMsg, key) + case "isSharedToAll": + err = unpopulate(val, "IsSharedToAll", &a.IsSharedToAll) + delete(rawMsg, key) + case "metadata": + err = unpopulate(val, "Metadata", &a.Metadata) + delete(rawMsg, key) + case "sharedUserList": + err = unpopulate(val, "SharedUserList", &a.SharedUserList) + delete(rawMsg, key) + case "target": + err = unpopulate(val, "Target", &a.Target) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &a.Value) + delete(rawMsg, key) + case "valueFormat": + err = unpopulate(val, "ValueFormat", &a.ValueFormat) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AccessKeyAuthTypeWorkspaceConnectionProperties. +func (a AccessKeyAuthTypeWorkspaceConnectionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["authType"] = ConnectionAuthTypeAccessKey + populate(objectMap, "category", a.Category) + populate(objectMap, "createdByWorkspaceArmId", a.CreatedByWorkspaceArmID) + populate(objectMap, "credentials", a.Credentials) + populateDateTimeRFC3339(objectMap, "expiryTime", a.ExpiryTime) + populate(objectMap, "group", a.Group) + populate(objectMap, "isSharedToAll", a.IsSharedToAll) + populate(objectMap, "metadata", a.Metadata) + populate(objectMap, "sharedUserList", a.SharedUserList) + populate(objectMap, "target", a.Target) + populate(objectMap, "value", a.Value) + populate(objectMap, "valueFormat", a.ValueFormat) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AccessKeyAuthTypeWorkspaceConnectionProperties. +func (a *AccessKeyAuthTypeWorkspaceConnectionProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "authType": + err = unpopulate(val, "AuthType", &a.AuthType) + delete(rawMsg, key) + case "category": + err = unpopulate(val, "Category", &a.Category) + delete(rawMsg, key) + case "createdByWorkspaceArmId": + err = unpopulate(val, "CreatedByWorkspaceArmID", &a.CreatedByWorkspaceArmID) + delete(rawMsg, key) + case "credentials": + err = unpopulate(val, "Credentials", &a.Credentials) + delete(rawMsg, key) + case "expiryTime": + err = unpopulateDateTimeRFC3339(val, "ExpiryTime", &a.ExpiryTime) + delete(rawMsg, key) + case "group": + err = unpopulate(val, "Group", &a.Group) + delete(rawMsg, key) + case "isSharedToAll": + err = unpopulate(val, "IsSharedToAll", &a.IsSharedToAll) + delete(rawMsg, key) + case "metadata": + err = unpopulate(val, "Metadata", &a.Metadata) + delete(rawMsg, key) + case "sharedUserList": + err = unpopulate(val, "SharedUserList", &a.SharedUserList) + delete(rawMsg, key) + case "target": + err = unpopulate(val, "Target", &a.Target) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &a.Value) + delete(rawMsg, key) + case "valueFormat": + err = unpopulate(val, "ValueFormat", &a.ValueFormat) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AccountKeyAuthTypeWorkspaceConnectionProperties. +func (a AccountKeyAuthTypeWorkspaceConnectionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["authType"] = ConnectionAuthTypeAccountKey + populate(objectMap, "category", a.Category) + populate(objectMap, "createdByWorkspaceArmId", a.CreatedByWorkspaceArmID) + populate(objectMap, "credentials", a.Credentials) + populateDateTimeRFC3339(objectMap, "expiryTime", a.ExpiryTime) + populate(objectMap, "group", a.Group) + populate(objectMap, "isSharedToAll", a.IsSharedToAll) + populate(objectMap, "metadata", a.Metadata) + populate(objectMap, "sharedUserList", a.SharedUserList) + populate(objectMap, "target", a.Target) + populate(objectMap, "value", a.Value) + populate(objectMap, "valueFormat", a.ValueFormat) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AccountKeyAuthTypeWorkspaceConnectionProperties. +func (a *AccountKeyAuthTypeWorkspaceConnectionProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "authType": + err = unpopulate(val, "AuthType", &a.AuthType) + delete(rawMsg, key) + case "category": + err = unpopulate(val, "Category", &a.Category) + delete(rawMsg, key) + case "createdByWorkspaceArmId": + err = unpopulate(val, "CreatedByWorkspaceArmID", &a.CreatedByWorkspaceArmID) + delete(rawMsg, key) + case "credentials": + err = unpopulate(val, "Credentials", &a.Credentials) + delete(rawMsg, key) + case "expiryTime": + err = unpopulateDateTimeRFC3339(val, "ExpiryTime", &a.ExpiryTime) + delete(rawMsg, key) + case "group": + err = unpopulate(val, "Group", &a.Group) + delete(rawMsg, key) + case "isSharedToAll": + err = unpopulate(val, "IsSharedToAll", &a.IsSharedToAll) + delete(rawMsg, key) + case "metadata": + err = unpopulate(val, "Metadata", &a.Metadata) + delete(rawMsg, key) + case "sharedUserList": + err = unpopulate(val, "SharedUserList", &a.SharedUserList) + delete(rawMsg, key) + case "target": + err = unpopulate(val, "Target", &a.Target) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &a.Value) + delete(rawMsg, key) + case "valueFormat": + err = unpopulate(val, "ValueFormat", &a.ValueFormat) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type AccountKeyDatastoreCredentials. func (a AccountKeyDatastoreCredentials) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -230,6 +510,37 @@ func (a *AccountKeyDatastoreSecrets) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type AcrDetails. +func (a AcrDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "systemCreatedAcrAccount", a.SystemCreatedAcrAccount) + populate(objectMap, "userCreatedAcrAccount", a.UserCreatedAcrAccount) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AcrDetails. +func (a *AcrDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "systemCreatedAcrAccount": + err = unpopulate(val, "SystemCreatedAcrAccount", &a.SystemCreatedAcrAccount) + delete(rawMsg, key) + case "userCreatedAcrAccount": + err = unpopulate(val, "UserCreatedAcrAccount", &a.UserCreatedAcrAccount) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type AksComputeSecrets. func (a AksComputeSecrets) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -343,6 +654,60 @@ func (a *AksNetworkingConfiguration) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type AllFeatures. +func (a AllFeatures) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["filterType"] = MonitoringFeatureFilterTypeAllFeatures + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AllFeatures. +func (a *AllFeatures) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "filterType": + err = unpopulate(val, "FilterType", &a.FilterType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AllNodes. +func (a AllNodes) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["nodesValueType"] = NodesValueTypeAll + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AllNodes. +func (a *AllNodes) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nodesValueType": + err = unpopulate(val, "NodesValueType", &a.NodesValueType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type AmlCompute. func (a AmlCompute) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -606,17 +971,15 @@ func (a *AmlComputeSchema) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type AmlOperation. -func (a AmlOperation) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type AmlToken. +func (a AmlToken) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "display", a.Display) - populate(objectMap, "isDataAction", a.IsDataAction) - populate(objectMap, "name", a.Name) + objectMap["identityType"] = IdentityConfigurationTypeAMLToken return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type AmlOperation. -func (a *AmlOperation) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type AmlToken. +func (a *AmlToken) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", a, err) @@ -624,14 +987,8 @@ func (a *AmlOperation) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "display": - err = unpopulate(val, "Display", &a.Display) - delete(rawMsg, key) - case "isDataAction": - err = unpopulate(val, "IsDataAction", &a.IsDataAction) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &a.Name) + case "identityType": + err = unpopulate(val, "IdentityType", &a.IdentityType) delete(rawMsg, key) } if err != nil { @@ -641,18 +998,15 @@ func (a *AmlOperation) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type AmlOperationDisplay. -func (a AmlOperationDisplay) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type AmlTokenComputeIdentity. +func (a AmlTokenComputeIdentity) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "description", a.Description) - populate(objectMap, "operation", a.Operation) - populate(objectMap, "provider", a.Provider) - populate(objectMap, "resource", a.Resource) + objectMap["computeIdentityType"] = MonitorComputeIdentityTypeAmlToken return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type AmlOperationDisplay. -func (a *AmlOperationDisplay) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type AmlTokenComputeIdentity. +func (a *AmlTokenComputeIdentity) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", a, err) @@ -660,17 +1014,8 @@ func (a *AmlOperationDisplay) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "description": - err = unpopulate(val, "Description", &a.Description) - delete(rawMsg, key) - case "operation": - err = unpopulate(val, "Operation", &a.Operation) - delete(rawMsg, key) - case "provider": - err = unpopulate(val, "Provider", &a.Provider) - delete(rawMsg, key) - case "resource": - err = unpopulate(val, "Resource", &a.Resource) + case "computeIdentityType": + err = unpopulate(val, "ComputeIdentityType", &a.ComputeIdentityType) delete(rawMsg, key) } if err != nil { @@ -680,15 +1025,17 @@ func (a *AmlOperationDisplay) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type AmlOperationListResult. -func (a AmlOperationListResult) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type AmlUserFeature. +func (a AmlUserFeature) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "value", a.Value) + populate(objectMap, "description", a.Description) + populate(objectMap, "displayName", a.DisplayName) + populate(objectMap, "id", a.ID) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type AmlOperationListResult. -func (a *AmlOperationListResult) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type AmlUserFeature. +func (a *AmlUserFeature) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", a, err) @@ -696,8 +1043,14 @@ func (a *AmlOperationListResult) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "value": - err = unpopulate(val, "Value", &a.Value) + case "description": + err = unpopulate(val, "Description", &a.Description) + delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &a.DisplayName) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &a.ID) delete(rawMsg, key) } if err != nil { @@ -707,15 +1060,15 @@ func (a *AmlOperationListResult) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type AmlToken. -func (a AmlToken) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type AnonymousAccessCredential. +func (a AnonymousAccessCredential) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - objectMap["identityType"] = IdentityConfigurationTypeAMLToken + objectMap["credentialType"] = DataReferenceCredentialTypeNoCredentials return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type AmlToken. -func (a *AmlToken) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type AnonymousAccessCredential. +func (a *AnonymousAccessCredential) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", a, err) @@ -723,8 +1076,8 @@ func (a *AmlToken) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "identityType": - err = unpopulate(val, "IdentityType", &a.IdentityType) + case "credentialType": + err = unpopulate(val, "CredentialType", &a.CredentialType) delete(rawMsg, key) } if err != nil { @@ -734,17 +1087,15 @@ func (a *AmlToken) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type AmlUserFeature. -func (a AmlUserFeature) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ArmResourceID. +func (a ArmResourceID) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "description", a.Description) - populate(objectMap, "displayName", a.DisplayName) - populate(objectMap, "id", a.ID) + populate(objectMap, "resourceId", a.ResourceID) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type AmlUserFeature. -func (a *AmlUserFeature) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ArmResourceID. +func (a *ArmResourceID) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", a, err) @@ -752,14 +1103,8 @@ func (a *AmlUserFeature) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "description": - err = unpopulate(val, "Description", &a.Description) - delete(rawMsg, key) - case "displayName": - err = unpopulate(val, "DisplayName", &a.DisplayName) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &a.ID) + case "resourceId": + err = unpopulate(val, "ResourceID", &a.ResourceID) delete(rawMsg, key) } if err != nil { @@ -1019,8 +1364,10 @@ func (a AutoMLJob) MarshalJSON() ([]byte, error) { populate(objectMap, "identity", a.Identity) populate(objectMap, "isArchived", a.IsArchived) objectMap["jobType"] = JobTypeAutoML + populate(objectMap, "notificationSetting", a.NotificationSetting) populate(objectMap, "outputs", a.Outputs) populate(objectMap, "properties", a.Properties) + populate(objectMap, "queueSettings", a.QueueSettings) populate(objectMap, "resources", a.Resources) populate(objectMap, "services", a.Services) populate(objectMap, "status", a.Status) @@ -1068,12 +1415,18 @@ func (a *AutoMLJob) UnmarshalJSON(data []byte) error { case "jobType": err = unpopulate(val, "JobType", &a.JobType) delete(rawMsg, key) + case "notificationSetting": + err = unpopulate(val, "NotificationSetting", &a.NotificationSetting) + delete(rawMsg, key) case "outputs": a.Outputs, err = unmarshalJobOutputClassificationMap(val) delete(rawMsg, key) case "properties": err = unpopulate(val, "Properties", &a.Properties) delete(rawMsg, key) + case "queueSettings": + err = unpopulate(val, "QueueSettings", &a.QueueSettings) + delete(rawMsg, key) case "resources": err = unpopulate(val, "Resources", &a.Resources) delete(rawMsg, key) @@ -1322,7 +1675,9 @@ func (a AzureBlobDatastore) MarshalJSON() ([]byte, error) { populate(objectMap, "isDefault", a.IsDefault) populate(objectMap, "properties", a.Properties) populate(objectMap, "protocol", a.Protocol) + populate(objectMap, "resourceGroup", a.ResourceGroup) populate(objectMap, "serviceDataAccessAuthIdentity", a.ServiceDataAccessAuthIdentity) + populate(objectMap, "subscriptionId", a.SubscriptionID) populate(objectMap, "tags", a.Tags) return json.Marshal(objectMap) } @@ -1363,9 +1718,15 @@ func (a *AzureBlobDatastore) UnmarshalJSON(data []byte) error { case "protocol": err = unpopulate(val, "Protocol", &a.Protocol) delete(rawMsg, key) + case "resourceGroup": + err = unpopulate(val, "ResourceGroup", &a.ResourceGroup) + delete(rawMsg, key) case "serviceDataAccessAuthIdentity": err = unpopulate(val, "ServiceDataAccessAuthIdentity", &a.ServiceDataAccessAuthIdentity) delete(rawMsg, key) + case "subscriptionId": + err = unpopulate(val, "SubscriptionID", &a.SubscriptionID) + delete(rawMsg, key) case "tags": err = unpopulate(val, "Tags", &a.Tags) delete(rawMsg, key) @@ -1385,8 +1746,10 @@ func (a AzureDataLakeGen1Datastore) MarshalJSON() ([]byte, error) { populate(objectMap, "description", a.Description) populate(objectMap, "isDefault", a.IsDefault) populate(objectMap, "properties", a.Properties) + populate(objectMap, "resourceGroup", a.ResourceGroup) populate(objectMap, "serviceDataAccessAuthIdentity", a.ServiceDataAccessAuthIdentity) populate(objectMap, "storeName", a.StoreName) + populate(objectMap, "subscriptionId", a.SubscriptionID) populate(objectMap, "tags", a.Tags) return json.Marshal(objectMap) } @@ -1415,12 +1778,18 @@ func (a *AzureDataLakeGen1Datastore) UnmarshalJSON(data []byte) error { case "properties": err = unpopulate(val, "Properties", &a.Properties) delete(rawMsg, key) + case "resourceGroup": + err = unpopulate(val, "ResourceGroup", &a.ResourceGroup) + delete(rawMsg, key) case "serviceDataAccessAuthIdentity": err = unpopulate(val, "ServiceDataAccessAuthIdentity", &a.ServiceDataAccessAuthIdentity) delete(rawMsg, key) case "storeName": err = unpopulate(val, "StoreName", &a.StoreName) delete(rawMsg, key) + case "subscriptionId": + err = unpopulate(val, "SubscriptionID", &a.SubscriptionID) + delete(rawMsg, key) case "tags": err = unpopulate(val, "Tags", &a.Tags) delete(rawMsg, key) @@ -1444,7 +1813,9 @@ func (a AzureDataLakeGen2Datastore) MarshalJSON() ([]byte, error) { populate(objectMap, "isDefault", a.IsDefault) populate(objectMap, "properties", a.Properties) populate(objectMap, "protocol", a.Protocol) + populate(objectMap, "resourceGroup", a.ResourceGroup) populate(objectMap, "serviceDataAccessAuthIdentity", a.ServiceDataAccessAuthIdentity) + populate(objectMap, "subscriptionId", a.SubscriptionID) populate(objectMap, "tags", a.Tags) return json.Marshal(objectMap) } @@ -1485,9 +1856,15 @@ func (a *AzureDataLakeGen2Datastore) UnmarshalJSON(data []byte) error { case "protocol": err = unpopulate(val, "Protocol", &a.Protocol) delete(rawMsg, key) + case "resourceGroup": + err = unpopulate(val, "ResourceGroup", &a.ResourceGroup) + delete(rawMsg, key) case "serviceDataAccessAuthIdentity": err = unpopulate(val, "ServiceDataAccessAuthIdentity", &a.ServiceDataAccessAuthIdentity) delete(rawMsg, key) + case "subscriptionId": + err = unpopulate(val, "SubscriptionID", &a.SubscriptionID) + delete(rawMsg, key) case "tags": err = unpopulate(val, "Tags", &a.Tags) delete(rawMsg, key) @@ -1499,6 +1876,68 @@ func (a *AzureDataLakeGen2Datastore) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type AzureDatastore. +func (a AzureDatastore) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "resourceGroup", a.ResourceGroup) + populate(objectMap, "subscriptionId", a.SubscriptionID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureDatastore. +func (a *AzureDatastore) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "resourceGroup": + err = unpopulate(val, "ResourceGroup", &a.ResourceGroup) + delete(rawMsg, key) + case "subscriptionId": + err = unpopulate(val, "SubscriptionID", &a.SubscriptionID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureDevOpsWebhook. +func (a AzureDevOpsWebhook) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "eventType", a.EventType) + objectMap["webhookType"] = WebhookTypeAzureDevOps + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureDevOpsWebhook. +func (a *AzureDevOpsWebhook) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "eventType": + err = unpopulate(val, "EventType", &a.EventType) + delete(rawMsg, key) + case "webhookType": + err = unpopulate(val, "WebhookType", &a.WebhookType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type AzureFileDatastore. func (a AzureFileDatastore) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -1511,7 +1950,9 @@ func (a AzureFileDatastore) MarshalJSON() ([]byte, error) { populate(objectMap, "isDefault", a.IsDefault) populate(objectMap, "properties", a.Properties) populate(objectMap, "protocol", a.Protocol) + populate(objectMap, "resourceGroup", a.ResourceGroup) populate(objectMap, "serviceDataAccessAuthIdentity", a.ServiceDataAccessAuthIdentity) + populate(objectMap, "subscriptionId", a.SubscriptionID) populate(objectMap, "tags", a.Tags) return json.Marshal(objectMap) } @@ -1552,9 +1993,15 @@ func (a *AzureFileDatastore) UnmarshalJSON(data []byte) error { case "protocol": err = unpopulate(val, "Protocol", &a.Protocol) delete(rawMsg, key) + case "resourceGroup": + err = unpopulate(val, "ResourceGroup", &a.ResourceGroup) + delete(rawMsg, key) case "serviceDataAccessAuthIdentity": err = unpopulate(val, "ServiceDataAccessAuthIdentity", &a.ServiceDataAccessAuthIdentity) delete(rawMsg, key) + case "subscriptionId": + err = unpopulate(val, "SubscriptionID", &a.SubscriptionID) + delete(rawMsg, key) case "tags": err = unpopulate(val, "Tags", &a.Tags) delete(rawMsg, key) @@ -1672,11 +2119,39 @@ func (b *BatchDeployment) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type BatchDeploymentConfiguration. +func (b BatchDeploymentConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["deploymentConfigurationType"] = b.DeploymentConfigurationType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BatchDeploymentConfiguration. +func (b *BatchDeploymentConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "deploymentConfigurationType": + err = unpopulate(val, "DeploymentConfigurationType", &b.DeploymentConfigurationType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type BatchDeploymentProperties. func (b BatchDeploymentProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "codeConfiguration", b.CodeConfiguration) populate(objectMap, "compute", b.Compute) + populate(objectMap, "deploymentConfiguration", b.DeploymentConfiguration) populate(objectMap, "description", b.Description) populate(objectMap, "environmentId", b.EnvironmentID) populate(objectMap, "environmentVariables", b.EnvironmentVariables) @@ -1709,6 +2184,9 @@ func (b *BatchDeploymentProperties) UnmarshalJSON(data []byte) error { case "compute": err = unpopulate(val, "Compute", &b.Compute) delete(rawMsg, key) + case "deploymentConfiguration": + b.DeploymentConfiguration, err = unmarshalBatchDeploymentConfigurationClassification(val) + delete(rawMsg, key) case "description": err = unpopulate(val, "Description", &b.Description) delete(rawMsg, key) @@ -1966,6 +2444,49 @@ func (b *BatchEndpointTrackedResourceArmPaginatedResult) UnmarshalJSON(data []by return nil } +// MarshalJSON implements the json.Marshaller interface for type BatchPipelineComponentDeploymentConfiguration. +func (b BatchPipelineComponentDeploymentConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "componentId", b.ComponentID) + objectMap["deploymentConfigurationType"] = BatchDeploymentConfigurationTypePipelineComponent + populate(objectMap, "description", b.Description) + populate(objectMap, "settings", b.Settings) + populate(objectMap, "tags", b.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BatchPipelineComponentDeploymentConfiguration. +func (b *BatchPipelineComponentDeploymentConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "componentId": + err = unpopulate(val, "ComponentID", &b.ComponentID) + delete(rawMsg, key) + case "deploymentConfigurationType": + err = unpopulate(val, "DeploymentConfigurationType", &b.DeploymentConfigurationType) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &b.Description) + delete(rawMsg, key) + case "settings": + err = unpopulate(val, "Settings", &b.Settings) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &b.Tags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type BatchRetrySettings. func (b BatchRetrySettings) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -2024,6 +2545,76 @@ func (b *BayesianSamplingAlgorithm) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type BindOptions. +func (b BindOptions) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "createHostPath", b.CreateHostPath) + populate(objectMap, "propagation", b.Propagation) + populate(objectMap, "selinux", b.Selinux) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BindOptions. +func (b *BindOptions) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "createHostPath": + err = unpopulate(val, "CreateHostPath", &b.CreateHostPath) + delete(rawMsg, key) + case "propagation": + err = unpopulate(val, "Propagation", &b.Propagation) + delete(rawMsg, key) + case "selinux": + err = unpopulate(val, "Selinux", &b.Selinux) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BlobReferenceForConsumptionDto. +func (b BlobReferenceForConsumptionDto) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "blobUri", b.BlobURI) + populate(objectMap, "credential", b.Credential) + populate(objectMap, "storageAccountArmId", b.StorageAccountArmID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BlobReferenceForConsumptionDto. +func (b *BlobReferenceForConsumptionDto) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "blobUri": + err = unpopulate(val, "BlobURI", &b.BlobURI) + delete(rawMsg, key) + case "credential": + b.Credential, err = unmarshalPendingUploadCredentialDtoClassification(val) + delete(rawMsg, key) + case "storageAccountArmId": + err = unpopulate(val, "StorageAccountArmID", &b.StorageAccountArmID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type BuildContext. func (b BuildContext) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -2055,6 +2646,111 @@ func (b *BuildContext) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type CategoricalDataDriftMetricThreshold. +func (c CategoricalDataDriftMetricThreshold) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["dataType"] = MonitoringFeatureDataTypeCategorical + populate(objectMap, "metric", c.Metric) + populate(objectMap, "threshold", c.Threshold) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CategoricalDataDriftMetricThreshold. +func (c *CategoricalDataDriftMetricThreshold) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "dataType": + err = unpopulate(val, "DataType", &c.DataType) + delete(rawMsg, key) + case "metric": + err = unpopulate(val, "Metric", &c.Metric) + delete(rawMsg, key) + case "threshold": + err = unpopulate(val, "Threshold", &c.Threshold) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CategoricalDataQualityMetricThreshold. +func (c CategoricalDataQualityMetricThreshold) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["dataType"] = MonitoringFeatureDataTypeCategorical + populate(objectMap, "metric", c.Metric) + populate(objectMap, "threshold", c.Threshold) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CategoricalDataQualityMetricThreshold. +func (c *CategoricalDataQualityMetricThreshold) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "dataType": + err = unpopulate(val, "DataType", &c.DataType) + delete(rawMsg, key) + case "metric": + err = unpopulate(val, "Metric", &c.Metric) + delete(rawMsg, key) + case "threshold": + err = unpopulate(val, "Threshold", &c.Threshold) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CategoricalPredictionDriftMetricThreshold. +func (c CategoricalPredictionDriftMetricThreshold) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["dataType"] = MonitoringFeatureDataTypeCategorical + populate(objectMap, "metric", c.Metric) + populate(objectMap, "threshold", c.Threshold) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CategoricalPredictionDriftMetricThreshold. +func (c *CategoricalPredictionDriftMetricThreshold) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "dataType": + err = unpopulate(val, "DataType", &c.DataType) + delete(rawMsg, key) + case "metric": + err = unpopulate(val, "Metric", &c.Metric) + delete(rawMsg, key) + case "threshold": + err = unpopulate(val, "Threshold", &c.Threshold) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type CertificateDatastoreCredentials. func (c CertificateDatastoreCredentials) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -2419,6 +3115,7 @@ func (c CodeContainerProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "latestVersion", c.LatestVersion) populate(objectMap, "nextVersion", c.NextVersion) populate(objectMap, "properties", c.Properties) + populate(objectMap, "provisioningState", c.ProvisioningState) populate(objectMap, "tags", c.Tags) return json.Marshal(objectMap) } @@ -2447,8 +3144,11 @@ func (c *CodeContainerProperties) UnmarshalJSON(data []byte) error { case "properties": err = unpopulate(val, "Properties", &c.Properties) delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &c.Tags) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &c.Tags) delete(rawMsg, key) } if err != nil { @@ -2540,6 +3240,7 @@ func (c CodeVersionProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "isAnonymous", c.IsAnonymous) populate(objectMap, "isArchived", c.IsArchived) populate(objectMap, "properties", c.Properties) + populate(objectMap, "provisioningState", c.ProvisioningState) populate(objectMap, "tags", c.Tags) return json.Marshal(objectMap) } @@ -2568,6 +3269,9 @@ func (c *CodeVersionProperties) UnmarshalJSON(data []byte) error { case "properties": err = unpopulate(val, "Properties", &c.Properties) delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) + delete(rawMsg, key) case "tags": err = unpopulate(val, "Tags", &c.Tags) delete(rawMsg, key) @@ -2610,6 +3314,45 @@ func (c *CodeVersionResourceArmPaginatedResult) UnmarshalJSON(data []byte) error return nil } +// MarshalJSON implements the json.Marshaller interface for type Collection. +func (c Collection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "clientId", c.ClientID) + populate(objectMap, "dataCollectionMode", c.DataCollectionMode) + populate(objectMap, "dataId", c.DataID) + populate(objectMap, "samplingRate", c.SamplingRate) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Collection. +func (c *Collection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "clientId": + err = unpopulate(val, "ClientID", &c.ClientID) + delete(rawMsg, key) + case "dataCollectionMode": + err = unpopulate(val, "DataCollectionMode", &c.DataCollectionMode) + delete(rawMsg, key) + case "dataId": + err = unpopulate(val, "DataID", &c.DataID) + delete(rawMsg, key) + case "samplingRate": + err = unpopulate(val, "SamplingRate", &c.SamplingRate) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type ColumnTransformer. func (c ColumnTransformer) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -2659,9 +3402,11 @@ func (c CommandJob) MarshalJSON() ([]byte, error) { populate(objectMap, "isArchived", c.IsArchived) objectMap["jobType"] = JobTypeCommand populate(objectMap, "limits", c.Limits) + populate(objectMap, "notificationSetting", c.NotificationSetting) populate(objectMap, "outputs", c.Outputs) populateAny(objectMap, "parameters", c.Parameters) populate(objectMap, "properties", c.Properties) + populate(objectMap, "queueSettings", c.QueueSettings) populate(objectMap, "resources", c.Resources) populate(objectMap, "services", c.Services) populate(objectMap, "status", c.Status) @@ -2723,6 +3468,9 @@ func (c *CommandJob) UnmarshalJSON(data []byte) error { case "limits": err = unpopulate(val, "Limits", &c.Limits) delete(rawMsg, key) + case "notificationSetting": + err = unpopulate(val, "NotificationSetting", &c.NotificationSetting) + delete(rawMsg, key) case "outputs": c.Outputs, err = unmarshalJobOutputClassificationMap(val) delete(rawMsg, key) @@ -2732,6 +3480,9 @@ func (c *CommandJob) UnmarshalJSON(data []byte) error { case "properties": err = unpopulate(val, "Properties", &c.Properties) delete(rawMsg, key) + case "queueSettings": + err = unpopulate(val, "QueueSettings", &c.QueueSettings) + delete(rawMsg, key) case "resources": err = unpopulate(val, "Resources", &c.Resources) delete(rawMsg, key) @@ -2834,6 +3585,7 @@ func (c ComponentContainerProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "latestVersion", c.LatestVersion) populate(objectMap, "nextVersion", c.NextVersion) populate(objectMap, "properties", c.Properties) + populate(objectMap, "provisioningState", c.ProvisioningState) populate(objectMap, "tags", c.Tags) return json.Marshal(objectMap) } @@ -2862,6 +3614,9 @@ func (c *ComponentContainerProperties) UnmarshalJSON(data []byte) error { case "properties": err = unpopulate(val, "Properties", &c.Properties) delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) + delete(rawMsg, key) case "tags": err = unpopulate(val, "Tags", &c.Tags) delete(rawMsg, key) @@ -2955,6 +3710,7 @@ func (c ComponentVersionProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "isAnonymous", c.IsAnonymous) populate(objectMap, "isArchived", c.IsArchived) populate(objectMap, "properties", c.Properties) + populate(objectMap, "provisioningState", c.ProvisioningState) populate(objectMap, "tags", c.Tags) return json.Marshal(objectMap) } @@ -2983,6 +3739,9 @@ func (c *ComponentVersionProperties) UnmarshalJSON(data []byte) error { case "properties": err = unpopulate(val, "Properties", &c.Properties) delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) + delete(rawMsg, key) case "tags": err = unpopulate(val, "Tags", &c.Tags) delete(rawMsg, key) @@ -3476,11 +4235,13 @@ func (c ComputeInstanceProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "connectivityEndpoints", c.ConnectivityEndpoints) populate(objectMap, "containers", c.Containers) populate(objectMap, "createdBy", c.CreatedBy) + populate(objectMap, "customServices", c.CustomServices) populate(objectMap, "dataDisks", c.DataDisks) populate(objectMap, "dataMounts", c.DataMounts) populate(objectMap, "enableNodePublicIp", c.EnableNodePublicIP) populate(objectMap, "errors", c.Errors) populate(objectMap, "lastOperation", c.LastOperation) + populate(objectMap, "osImageMetadata", c.OSImageMetadata) populate(objectMap, "personalComputeInstanceSettings", c.PersonalComputeInstanceSettings) populate(objectMap, "sshSettings", c.SSHSettings) populate(objectMap, "schedules", c.Schedules) @@ -3519,6 +4280,9 @@ func (c *ComputeInstanceProperties) UnmarshalJSON(data []byte) error { case "createdBy": err = unpopulate(val, "CreatedBy", &c.CreatedBy) delete(rawMsg, key) + case "customServices": + err = unpopulate(val, "CustomServices", &c.CustomServices) + delete(rawMsg, key) case "dataDisks": err = unpopulate(val, "DataDisks", &c.DataDisks) delete(rawMsg, key) @@ -3534,6 +4298,9 @@ func (c *ComputeInstanceProperties) UnmarshalJSON(data []byte) error { case "lastOperation": err = unpopulate(val, "LastOperation", &c.LastOperation) delete(rawMsg, key) + case "osImageMetadata": + err = unpopulate(val, "OSImageMetadata", &c.OSImageMetadata) + delete(rawMsg, key) case "personalComputeInstanceSettings": err = unpopulate(val, "PersonalComputeInstanceSettings", &c.PersonalComputeInstanceSettings) delete(rawMsg, key) @@ -3659,6 +4426,45 @@ func (c *ComputeInstanceVersion) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type ComputeRecurrenceSchedule. +func (c ComputeRecurrenceSchedule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "hours", c.Hours) + populate(objectMap, "minutes", c.Minutes) + populate(objectMap, "monthDays", c.MonthDays) + populate(objectMap, "weekDays", c.WeekDays) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ComputeRecurrenceSchedule. +func (c *ComputeRecurrenceSchedule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "hours": + err = unpopulate(val, "Hours", &c.Hours) + delete(rawMsg, key) + case "minutes": + err = unpopulate(val, "Minutes", &c.Minutes) + delete(rawMsg, key) + case "monthDays": + err = unpopulate(val, "MonthDays", &c.MonthDays) + delete(rawMsg, key) + case "weekDays": + err = unpopulate(val, "WeekDays", &c.WeekDays) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type ComputeResource. func (c ComputeResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -3745,6 +4551,33 @@ func (c *ComputeResourceSchema) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type ComputeRuntimeDto. +func (c ComputeRuntimeDto) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "sparkRuntimeVersion", c.SparkRuntimeVersion) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ComputeRuntimeDto. +func (c *ComputeRuntimeDto) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "sparkRuntimeVersion": + err = unpopulate(val, "SparkRuntimeVersion", &c.SparkRuntimeVersion) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type ComputeSchedules. func (c ComputeSchedules) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -3920,6 +4753,33 @@ func (c *ContainerResourceSettings) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type ContentSafety. +func (c ContentSafety) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "contentSafetyStatus", c.ContentSafetyStatus) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ContentSafety. +func (c *ContentSafety) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "contentSafetyStatus": + err = unpopulate(val, "ContentSafetyStatus", &c.ContentSafetyStatus) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type CosmosDbSettings. func (c CosmosDbSettings) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -3947,6 +4807,72 @@ func (c *CosmosDbSettings) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type CreateMonitorAction. +func (c CreateMonitorAction) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["actionType"] = ScheduleActionTypeCreateMonitor + populate(objectMap, "monitorDefinition", c.MonitorDefinition) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CreateMonitorAction. +func (c *CreateMonitorAction) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "actionType": + err = unpopulate(val, "ActionType", &c.ActionType) + delete(rawMsg, key) + case "monitorDefinition": + err = unpopulate(val, "MonitorDefinition", &c.MonitorDefinition) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Cron. +func (c Cron) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "expression", c.Expression) + populate(objectMap, "startTime", c.StartTime) + populate(objectMap, "timeZone", c.TimeZone) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Cron. +func (c *Cron) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "expression": + err = unpopulate(val, "Expression", &c.Expression) + delete(rawMsg, key) + case "startTime": + err = unpopulate(val, "StartTime", &c.StartTime) + delete(rawMsg, key) + case "timeZone": + err = unpopulate(val, "TimeZone", &c.TimeZone) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type CronTrigger. func (c CronTrigger) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -4021,18 +4947,15 @@ func (c *CustomForecastHorizon) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type CustomModelJobInput. -func (c CustomModelJobInput) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type CustomKeys. +func (c CustomKeys) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "description", c.Description) - objectMap["jobInputType"] = JobInputTypeCustomModel - populate(objectMap, "mode", c.Mode) - populate(objectMap, "uri", c.URI) + populate(objectMap, "keys", c.Keys) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type CustomModelJobInput. -func (c *CustomModelJobInput) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type CustomKeys. +func (c *CustomKeys) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", c, err) @@ -4040,17 +4963,8 @@ func (c *CustomModelJobInput) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "description": - err = unpopulate(val, "Description", &c.Description) - delete(rawMsg, key) - case "jobInputType": - err = unpopulate(val, "JobInputType", &c.JobInputType) - delete(rawMsg, key) - case "mode": - err = unpopulate(val, "Mode", &c.Mode) - delete(rawMsg, key) - case "uri": - err = unpopulate(val, "URI", &c.URI) + case "keys": + err = unpopulate(val, "Keys", &c.Keys) delete(rawMsg, key) } if err != nil { @@ -4060,18 +4974,26 @@ func (c *CustomModelJobInput) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type CustomModelJobOutput. -func (c CustomModelJobOutput) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type CustomKeysWorkspaceConnectionProperties. +func (c CustomKeysWorkspaceConnectionProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "description", c.Description) - objectMap["jobOutputType"] = JobOutputTypeCustomModel - populate(objectMap, "mode", c.Mode) - populate(objectMap, "uri", c.URI) + objectMap["authType"] = ConnectionAuthTypeCustomKeys + populate(objectMap, "category", c.Category) + populate(objectMap, "createdByWorkspaceArmId", c.CreatedByWorkspaceArmID) + populate(objectMap, "credentials", c.Credentials) + populateDateTimeRFC3339(objectMap, "expiryTime", c.ExpiryTime) + populate(objectMap, "group", c.Group) + populate(objectMap, "isSharedToAll", c.IsSharedToAll) + populate(objectMap, "metadata", c.Metadata) + populate(objectMap, "sharedUserList", c.SharedUserList) + populate(objectMap, "target", c.Target) + populate(objectMap, "value", c.Value) + populate(objectMap, "valueFormat", c.ValueFormat) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type CustomModelJobOutput. -func (c *CustomModelJobOutput) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type CustomKeysWorkspaceConnectionProperties. +func (c *CustomKeysWorkspaceConnectionProperties) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", c, err) @@ -4079,17 +5001,41 @@ func (c *CustomModelJobOutput) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "description": - err = unpopulate(val, "Description", &c.Description) + case "authType": + err = unpopulate(val, "AuthType", &c.AuthType) delete(rawMsg, key) - case "jobOutputType": - err = unpopulate(val, "JobOutputType", &c.JobOutputType) + case "category": + err = unpopulate(val, "Category", &c.Category) delete(rawMsg, key) - case "mode": - err = unpopulate(val, "Mode", &c.Mode) + case "createdByWorkspaceArmId": + err = unpopulate(val, "CreatedByWorkspaceArmID", &c.CreatedByWorkspaceArmID) delete(rawMsg, key) - case "uri": - err = unpopulate(val, "URI", &c.URI) + case "credentials": + err = unpopulate(val, "Credentials", &c.Credentials) + delete(rawMsg, key) + case "expiryTime": + err = unpopulateDateTimeRFC3339(val, "ExpiryTime", &c.ExpiryTime) + delete(rawMsg, key) + case "group": + err = unpopulate(val, "Group", &c.Group) + delete(rawMsg, key) + case "isSharedToAll": + err = unpopulate(val, "IsSharedToAll", &c.IsSharedToAll) + delete(rawMsg, key) + case "metadata": + err = unpopulate(val, "Metadata", &c.Metadata) + delete(rawMsg, key) + case "sharedUserList": + err = unpopulate(val, "SharedUserList", &c.SharedUserList) + delete(rawMsg, key) + case "target": + err = unpopulate(val, "Target", &c.Target) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &c.Value) + delete(rawMsg, key) + case "valueFormat": + err = unpopulate(val, "ValueFormat", &c.ValueFormat) delete(rawMsg, key) } if err != nil { @@ -4099,16 +5045,16 @@ func (c *CustomModelJobOutput) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type CustomNCrossValidations. -func (c CustomNCrossValidations) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type CustomMetricThreshold. +func (c CustomMetricThreshold) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - objectMap["mode"] = NCrossValidationsModeCustom - populate(objectMap, "value", c.Value) + populate(objectMap, "metric", c.Metric) + populate(objectMap, "threshold", c.Threshold) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type CustomNCrossValidations. -func (c *CustomNCrossValidations) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type CustomMetricThreshold. +func (c *CustomMetricThreshold) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", c, err) @@ -4116,11 +5062,11 @@ func (c *CustomNCrossValidations) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "mode": - err = unpopulate(val, "Mode", &c.Mode) + case "metric": + err = unpopulate(val, "Metric", &c.Metric) delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &c.Value) + case "threshold": + err = unpopulate(val, "Threshold", &c.Threshold) delete(rawMsg, key) } if err != nil { @@ -4130,16 +5076,18 @@ func (c *CustomNCrossValidations) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type CustomSeasonality. -func (c CustomSeasonality) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type CustomModelJobInput. +func (c CustomModelJobInput) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - objectMap["mode"] = SeasonalityModeCustom - populate(objectMap, "value", c.Value) + populate(objectMap, "description", c.Description) + objectMap["jobInputType"] = JobInputTypeCustomModel + populate(objectMap, "mode", c.Mode) + populate(objectMap, "uri", c.URI) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type CustomSeasonality. -func (c *CustomSeasonality) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type CustomModelJobInput. +func (c *CustomModelJobInput) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", c, err) @@ -4147,11 +5095,17 @@ func (c *CustomSeasonality) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { + case "description": + err = unpopulate(val, "Description", &c.Description) + delete(rawMsg, key) + case "jobInputType": + err = unpopulate(val, "JobInputType", &c.JobInputType) + delete(rawMsg, key) case "mode": err = unpopulate(val, "Mode", &c.Mode) delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &c.Value) + case "uri": + err = unpopulate(val, "URI", &c.URI) delete(rawMsg, key) } if err != nil { @@ -4161,9 +5115,223 @@ func (c *CustomSeasonality) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type CustomTargetLags. -func (c CustomTargetLags) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) +// MarshalJSON implements the json.Marshaller interface for type CustomModelJobOutput. +func (c CustomModelJobOutput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", c.Description) + objectMap["jobOutputType"] = JobOutputTypeCustomModel + populate(objectMap, "mode", c.Mode) + populate(objectMap, "uri", c.URI) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CustomModelJobOutput. +func (c *CustomModelJobOutput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &c.Description) + delete(rawMsg, key) + case "jobOutputType": + err = unpopulate(val, "JobOutputType", &c.JobOutputType) + delete(rawMsg, key) + case "mode": + err = unpopulate(val, "Mode", &c.Mode) + delete(rawMsg, key) + case "uri": + err = unpopulate(val, "URI", &c.URI) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CustomMonitoringSignal. +func (c CustomMonitoringSignal) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "componentId", c.ComponentID) + populate(objectMap, "inputAssets", c.InputAssets) + populate(objectMap, "inputs", c.Inputs) + populate(objectMap, "metricThresholds", c.MetricThresholds) + populate(objectMap, "notificationTypes", c.NotificationTypes) + populate(objectMap, "properties", c.Properties) + objectMap["signalType"] = MonitoringSignalTypeCustom + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CustomMonitoringSignal. +func (c *CustomMonitoringSignal) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "componentId": + err = unpopulate(val, "ComponentID", &c.ComponentID) + delete(rawMsg, key) + case "inputAssets": + c.InputAssets, err = unmarshalMonitoringInputDataBaseClassificationMap(val) + delete(rawMsg, key) + case "inputs": + c.Inputs, err = unmarshalJobInputClassificationMap(val) + delete(rawMsg, key) + case "metricThresholds": + err = unpopulate(val, "MetricThresholds", &c.MetricThresholds) + delete(rawMsg, key) + case "notificationTypes": + err = unpopulate(val, "NotificationTypes", &c.NotificationTypes) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &c.Properties) + delete(rawMsg, key) + case "signalType": + err = unpopulate(val, "SignalType", &c.SignalType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CustomNCrossValidations. +func (c CustomNCrossValidations) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["mode"] = NCrossValidationsModeCustom + populate(objectMap, "value", c.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CustomNCrossValidations. +func (c *CustomNCrossValidations) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "mode": + err = unpopulate(val, "Mode", &c.Mode) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &c.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CustomSeasonality. +func (c CustomSeasonality) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["mode"] = SeasonalityModeCustom + populate(objectMap, "value", c.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CustomSeasonality. +func (c *CustomSeasonality) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "mode": + err = unpopulate(val, "Mode", &c.Mode) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &c.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CustomService. +func (c CustomService) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "docker", c.Docker) + populate(objectMap, "endpoints", c.Endpoints) + populate(objectMap, "environmentVariables", c.EnvironmentVariables) + populate(objectMap, "image", c.Image) + populate(objectMap, "name", c.Name) + populate(objectMap, "volumes", c.Volumes) + if c.AdditionalProperties != nil { + for key, val := range c.AdditionalProperties { + objectMap[key] = val + } + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CustomService. +func (c *CustomService) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "docker": + err = unpopulate(val, "Docker", &c.Docker) + delete(rawMsg, key) + case "endpoints": + err = unpopulate(val, "Endpoints", &c.Endpoints) + delete(rawMsg, key) + case "environmentVariables": + err = unpopulate(val, "EnvironmentVariables", &c.EnvironmentVariables) + delete(rawMsg, key) + case "image": + err = unpopulate(val, "Image", &c.Image) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "volumes": + err = unpopulate(val, "Volumes", &c.Volumes) + delete(rawMsg, key) + default: + if c.AdditionalProperties == nil { + c.AdditionalProperties = map[string]any{} + } + if val != nil { + var aux any + err = json.Unmarshal(val, &aux) + c.AdditionalProperties[key] = aux + } + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CustomTargetLags. +func (c CustomTargetLags) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) objectMap["mode"] = TargetLagsModeCustom populate(objectMap, "values", c.Values) return json.Marshal(objectMap) @@ -4223,6 +5391,41 @@ func (c *CustomTargetRollingWindowSize) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type DataCollector. +func (d DataCollector) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "collections", d.Collections) + populate(objectMap, "requestLogging", d.RequestLogging) + populate(objectMap, "rollingRate", d.RollingRate) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DataCollector. +func (d *DataCollector) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "collections": + err = unpopulate(val, "Collections", &d.Collections) + delete(rawMsg, key) + case "requestLogging": + err = unpopulate(val, "RequestLogging", &d.RequestLogging) + delete(rawMsg, key) + case "rollingRate": + err = unpopulate(val, "RollingRate", &d.RollingRate) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type DataContainer. func (d DataContainer) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -4348,6 +5551,96 @@ func (d *DataContainerResourceArmPaginatedResult) UnmarshalJSON(data []byte) err return nil } +// MarshalJSON implements the json.Marshaller interface for type DataDriftMetricThresholdBase. +func (d DataDriftMetricThresholdBase) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["dataType"] = d.DataType + populate(objectMap, "threshold", d.Threshold) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DataDriftMetricThresholdBase. +func (d *DataDriftMetricThresholdBase) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "dataType": + err = unpopulate(val, "DataType", &d.DataType) + delete(rawMsg, key) + case "threshold": + err = unpopulate(val, "Threshold", &d.Threshold) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DataDriftMonitoringSignal. +func (d DataDriftMonitoringSignal) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "featureDataTypeOverride", d.FeatureDataTypeOverride) + populate(objectMap, "featureImportanceSettings", d.FeatureImportanceSettings) + populate(objectMap, "features", d.Features) + populate(objectMap, "metricThresholds", d.MetricThresholds) + populate(objectMap, "notificationTypes", d.NotificationTypes) + populate(objectMap, "productionData", d.ProductionData) + populate(objectMap, "properties", d.Properties) + populate(objectMap, "referenceData", d.ReferenceData) + objectMap["signalType"] = MonitoringSignalTypeDataDrift + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DataDriftMonitoringSignal. +func (d *DataDriftMonitoringSignal) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "featureDataTypeOverride": + err = unpopulate(val, "FeatureDataTypeOverride", &d.FeatureDataTypeOverride) + delete(rawMsg, key) + case "featureImportanceSettings": + err = unpopulate(val, "FeatureImportanceSettings", &d.FeatureImportanceSettings) + delete(rawMsg, key) + case "features": + d.Features, err = unmarshalMonitoringFeatureFilterBaseClassification(val) + delete(rawMsg, key) + case "metricThresholds": + d.MetricThresholds, err = unmarshalDataDriftMetricThresholdBaseClassificationArray(val) + delete(rawMsg, key) + case "notificationTypes": + err = unpopulate(val, "NotificationTypes", &d.NotificationTypes) + delete(rawMsg, key) + case "productionData": + d.ProductionData, err = unmarshalMonitoringInputDataBaseClassification(val) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + case "referenceData": + d.ReferenceData, err = unmarshalMonitoringInputDataBaseClassification(val) + delete(rawMsg, key) + case "signalType": + err = unpopulate(val, "SignalType", &d.SignalType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type DataFactory. func (d DataFactory) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -4567,11 +5860,128 @@ func (d *DataPathAssetReference) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type DataVersionBase. -func (d DataVersionBase) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type DataQualityMetricThresholdBase. +func (d DataQualityMetricThresholdBase) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "id", d.ID) - populate(objectMap, "name", d.Name) + objectMap["dataType"] = d.DataType + populate(objectMap, "threshold", d.Threshold) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DataQualityMetricThresholdBase. +func (d *DataQualityMetricThresholdBase) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "dataType": + err = unpopulate(val, "DataType", &d.DataType) + delete(rawMsg, key) + case "threshold": + err = unpopulate(val, "Threshold", &d.Threshold) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DataQualityMonitoringSignal. +func (d DataQualityMonitoringSignal) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "featureDataTypeOverride", d.FeatureDataTypeOverride) + populate(objectMap, "featureImportanceSettings", d.FeatureImportanceSettings) + populate(objectMap, "features", d.Features) + populate(objectMap, "metricThresholds", d.MetricThresholds) + populate(objectMap, "notificationTypes", d.NotificationTypes) + populate(objectMap, "productionData", d.ProductionData) + populate(objectMap, "properties", d.Properties) + populate(objectMap, "referenceData", d.ReferenceData) + objectMap["signalType"] = MonitoringSignalTypeDataQuality + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DataQualityMonitoringSignal. +func (d *DataQualityMonitoringSignal) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "featureDataTypeOverride": + err = unpopulate(val, "FeatureDataTypeOverride", &d.FeatureDataTypeOverride) + delete(rawMsg, key) + case "featureImportanceSettings": + err = unpopulate(val, "FeatureImportanceSettings", &d.FeatureImportanceSettings) + delete(rawMsg, key) + case "features": + d.Features, err = unmarshalMonitoringFeatureFilterBaseClassification(val) + delete(rawMsg, key) + case "metricThresholds": + d.MetricThresholds, err = unmarshalDataQualityMetricThresholdBaseClassificationArray(val) + delete(rawMsg, key) + case "notificationTypes": + err = unpopulate(val, "NotificationTypes", &d.NotificationTypes) + delete(rawMsg, key) + case "productionData": + d.ProductionData, err = unmarshalMonitoringInputDataBaseClassification(val) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + case "referenceData": + d.ReferenceData, err = unmarshalMonitoringInputDataBaseClassification(val) + delete(rawMsg, key) + case "signalType": + err = unpopulate(val, "SignalType", &d.SignalType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DataReferenceCredential. +func (d DataReferenceCredential) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["credentialType"] = d.CredentialType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DataReferenceCredential. +func (d *DataReferenceCredential) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "credentialType": + err = unpopulate(val, "CredentialType", &d.CredentialType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DataVersionBase. +func (d DataVersionBase) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", d.ID) + populate(objectMap, "name", d.Name) populate(objectMap, "properties", d.Properties) populate(objectMap, "systemData", d.SystemData) populate(objectMap, "type", d.Type) @@ -5170,6 +6580,41 @@ func (d *DeploymentResourceConfiguration) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type DestinationAsset. +func (d DestinationAsset) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "destinationName", d.DestinationName) + populate(objectMap, "destinationVersion", d.DestinationVersion) + populate(objectMap, "registryName", d.RegistryName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DestinationAsset. +func (d *DestinationAsset) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "destinationName": + err = unpopulate(val, "DestinationName", &d.DestinationName) + delete(rawMsg, key) + case "destinationVersion": + err = unpopulate(val, "DestinationVersion", &d.DestinationVersion) + delete(rawMsg, key) + case "registryName": + err = unpopulate(val, "RegistryName", &d.RegistryName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type DiagnoseRequestProperties. func (d DiagnoseRequestProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -5404,6 +6849,83 @@ func (d *DistributionConfiguration) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type Docker. +func (d Docker) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "privileged", d.Privileged) + if d.AdditionalProperties != nil { + for key, val := range d.AdditionalProperties { + objectMap[key] = val + } + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Docker. +func (d *Docker) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "privileged": + err = unpopulate(val, "Privileged", &d.Privileged) + delete(rawMsg, key) + default: + if d.AdditionalProperties == nil { + d.AdditionalProperties = map[string]any{} + } + if val != nil { + var aux any + err = json.Unmarshal(val, &aux) + d.AdditionalProperties[key] = aux + } + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DockerCredential. +func (d DockerCredential) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["credentialType"] = DataReferenceCredentialTypeDockerCredentials + populate(objectMap, "password", d.Password) + populate(objectMap, "userName", d.UserName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DockerCredential. +func (d *DockerCredential) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "credentialType": + err = unpopulate(val, "CredentialType", &d.CredentialType) + delete(rawMsg, key) + case "password": + err = unpopulate(val, "Password", &d.Password) + delete(rawMsg, key) + case "userName": + err = unpopulate(val, "UserName", &d.UserName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type EarlyTerminationPolicy. func (e EarlyTerminationPolicy) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -5474,6 +6996,33 @@ func (e *EncryptionKeyVaultProperties) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type EncryptionKeyVaultUpdateProperties. +func (e EncryptionKeyVaultUpdateProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "keyIdentifier", e.KeyIdentifier) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EncryptionKeyVaultUpdateProperties. +func (e *EncryptionKeyVaultUpdateProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "keyIdentifier": + err = unpopulate(val, "KeyIdentifier", &e.KeyIdentifier) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type EncryptionProperty. func (e EncryptionProperty) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -5509,6 +7058,76 @@ func (e *EncryptionProperty) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type EncryptionUpdateProperties. +func (e EncryptionUpdateProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "keyVaultProperties", e.KeyVaultProperties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EncryptionUpdateProperties. +func (e *EncryptionUpdateProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "keyVaultProperties": + err = unpopulate(val, "KeyVaultProperties", &e.KeyVaultProperties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Endpoint. +func (e Endpoint) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "hostIp", e.HostIP) + populate(objectMap, "name", e.Name) + populate(objectMap, "protocol", e.Protocol) + populate(objectMap, "published", e.Published) + populate(objectMap, "target", e.Target) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Endpoint. +func (e *Endpoint) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "hostIp": + err = unpopulate(val, "HostIP", &e.HostIP) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &e.Name) + delete(rawMsg, key) + case "protocol": + err = unpopulate(val, "Protocol", &e.Protocol) + delete(rawMsg, key) + case "published": + err = unpopulate(val, "Published", &e.Published) + delete(rawMsg, key) + case "target": + err = unpopulate(val, "Target", &e.Target) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type EndpointAuthKeys. func (e EndpointAuthKeys) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -5751,6 +7370,7 @@ func (e EnvironmentContainerProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "latestVersion", e.LatestVersion) populate(objectMap, "nextVersion", e.NextVersion) populate(objectMap, "properties", e.Properties) + populate(objectMap, "provisioningState", e.ProvisioningState) populate(objectMap, "tags", e.Tags) return json.Marshal(objectMap) } @@ -5779,6 +7399,9 @@ func (e *EnvironmentContainerProperties) UnmarshalJSON(data []byte) error { case "properties": err = unpopulate(val, "Properties", &e.Properties) delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &e.ProvisioningState) + delete(rawMsg, key) case "tags": err = unpopulate(val, "Tags", &e.Tags) delete(rawMsg, key) @@ -5821,19 +7444,21 @@ func (e *EnvironmentContainerResourceArmPaginatedResult) UnmarshalJSON(data []by return nil } -// MarshalJSON implements the json.Marshaller interface for type EnvironmentVersion. -func (e EnvironmentVersion) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type EnvironmentVariable. +func (e EnvironmentVariable) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "id", e.ID) - populate(objectMap, "name", e.Name) - populate(objectMap, "properties", e.Properties) - populate(objectMap, "systemData", e.SystemData) populate(objectMap, "type", e.Type) + populate(objectMap, "value", e.Value) + if e.AdditionalProperties != nil { + for key, val := range e.AdditionalProperties { + objectMap[key] = val + } + } return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type EnvironmentVersion. -func (e *EnvironmentVersion) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type EnvironmentVariable. +func (e *EnvironmentVariable) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", e, err) @@ -5841,21 +7466,22 @@ func (e *EnvironmentVersion) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "id": - err = unpopulate(val, "ID", &e.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &e.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &e.Properties) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &e.SystemData) - delete(rawMsg, key) case "type": err = unpopulate(val, "Type", &e.Type) delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &e.Value) + delete(rawMsg, key) + default: + if e.AdditionalProperties == nil { + e.AdditionalProperties = map[string]any{} + } + if val != nil { + var aux any + err = json.Unmarshal(val, &aux) + e.AdditionalProperties[key] = aux + } + delete(rawMsg, key) } if err != nil { return fmt.Errorf("unmarshalling type %T: %v", e, err) @@ -5864,8 +7490,51 @@ func (e *EnvironmentVersion) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type EnvironmentVersionProperties. -func (e EnvironmentVersionProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type EnvironmentVersion. +func (e EnvironmentVersion) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", e.ID) + populate(objectMap, "name", e.Name) + populate(objectMap, "properties", e.Properties) + populate(objectMap, "systemData", e.SystemData) + populate(objectMap, "type", e.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EnvironmentVersion. +func (e *EnvironmentVersion) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &e.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &e.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &e.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &e.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &e.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EnvironmentVersionProperties. +func (e EnvironmentVersionProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "autoRebuild", e.AutoRebuild) populate(objectMap, "build", e.Build) @@ -5878,6 +7547,8 @@ func (e EnvironmentVersionProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "isArchived", e.IsArchived) populate(objectMap, "osType", e.OSType) populate(objectMap, "properties", e.Properties) + populate(objectMap, "provisioningState", e.ProvisioningState) + populate(objectMap, "stage", e.Stage) populate(objectMap, "tags", e.Tags) return json.Marshal(objectMap) } @@ -5924,6 +7595,12 @@ func (e *EnvironmentVersionProperties) UnmarshalJSON(data []byte) error { case "properties": err = unpopulate(val, "Properties", &e.Properties) delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &e.ProvisioningState) + delete(rawMsg, key) + case "stage": + err = unpopulate(val, "Stage", &e.Stage) + delete(rawMsg, key) case "tags": err = unpopulate(val, "Tags", &e.Tags) delete(rawMsg, key) @@ -6280,15 +7957,19 @@ func (f *FQDNEndpointsProperties) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type FeaturizationSettings. -func (f FeaturizationSettings) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type Feature. +func (f Feature) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "datasetLanguage", f.DatasetLanguage) + populate(objectMap, "id", f.ID) + populate(objectMap, "name", f.Name) + populate(objectMap, "properties", f.Properties) + populate(objectMap, "systemData", f.SystemData) + populate(objectMap, "type", f.Type) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type FeaturizationSettings. -func (f *FeaturizationSettings) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type Feature. +func (f *Feature) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", f, err) @@ -6296,8 +7977,20 @@ func (f *FeaturizationSettings) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "datasetLanguage": - err = unpopulate(val, "DatasetLanguage", &f.DatasetLanguage) + case "id": + err = unpopulate(val, "ID", &f.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &f.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &f.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &f.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &f.Type) delete(rawMsg, key) } if err != nil { @@ -6307,15 +8000,22 @@ func (f *FeaturizationSettings) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type FlavorData. -func (f FlavorData) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type FeatureAttributionDriftMonitoringSignal. +func (f FeatureAttributionDriftMonitoringSignal) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "data", f.Data) + populate(objectMap, "featureDataTypeOverride", f.FeatureDataTypeOverride) + populate(objectMap, "featureImportanceSettings", f.FeatureImportanceSettings) + populate(objectMap, "metricThreshold", f.MetricThreshold) + populate(objectMap, "notificationTypes", f.NotificationTypes) + populate(objectMap, "productionData", f.ProductionData) + populate(objectMap, "properties", f.Properties) + populate(objectMap, "referenceData", f.ReferenceData) + objectMap["signalType"] = MonitoringSignalTypeFeatureAttributionDrift return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type FlavorData. -func (f *FlavorData) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type FeatureAttributionDriftMonitoringSignal. +func (f *FeatureAttributionDriftMonitoringSignal) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", f, err) @@ -6323,8 +8023,29 @@ func (f *FlavorData) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "data": - err = unpopulate(val, "Data", &f.Data) + case "featureDataTypeOverride": + err = unpopulate(val, "FeatureDataTypeOverride", &f.FeatureDataTypeOverride) + delete(rawMsg, key) + case "featureImportanceSettings": + err = unpopulate(val, "FeatureImportanceSettings", &f.FeatureImportanceSettings) + delete(rawMsg, key) + case "metricThreshold": + err = unpopulate(val, "MetricThreshold", &f.MetricThreshold) + delete(rawMsg, key) + case "notificationTypes": + err = unpopulate(val, "NotificationTypes", &f.NotificationTypes) + delete(rawMsg, key) + case "productionData": + f.ProductionData, err = unmarshalMonitoringInputDataBaseClassificationArray(val) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &f.Properties) + delete(rawMsg, key) + case "referenceData": + f.ReferenceData, err = unmarshalMonitoringInputDataBaseClassification(val) + delete(rawMsg, key) + case "signalType": + err = unpopulate(val, "SignalType", &f.SignalType) delete(rawMsg, key) } if err != nil { @@ -6334,15 +8055,16 @@ func (f *FlavorData) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ForecastHorizon. -func (f ForecastHorizon) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type FeatureAttributionMetricThreshold. +func (f FeatureAttributionMetricThreshold) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - objectMap["mode"] = f.Mode + populate(objectMap, "metric", f.Metric) + populate(objectMap, "threshold", f.Threshold) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ForecastHorizon. -func (f *ForecastHorizon) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type FeatureAttributionMetricThreshold. +func (f *FeatureAttributionMetricThreshold) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", f, err) @@ -6350,8 +8072,11 @@ func (f *ForecastHorizon) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "mode": - err = unpopulate(val, "Mode", &f.Mode) + case "metric": + err = unpopulate(val, "Metric", &f.Metric) + delete(rawMsg, key) + case "threshold": + err = unpopulate(val, "Threshold", &f.Threshold) delete(rawMsg, key) } if err != nil { @@ -6361,30 +8086,16 @@ func (f *ForecastHorizon) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type Forecasting. -func (f Forecasting) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type FeatureImportanceSettings. +func (f FeatureImportanceSettings) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "cvSplitColumnNames", f.CvSplitColumnNames) - populate(objectMap, "featurizationSettings", f.FeaturizationSettings) - populate(objectMap, "forecastingSettings", f.ForecastingSettings) - populate(objectMap, "limitSettings", f.LimitSettings) - populate(objectMap, "logVerbosity", f.LogVerbosity) - populate(objectMap, "nCrossValidations", f.NCrossValidations) - populate(objectMap, "primaryMetric", f.PrimaryMetric) - populate(objectMap, "targetColumnName", f.TargetColumnName) - objectMap["taskType"] = TaskTypeForecasting - populate(objectMap, "testData", f.TestData) - populate(objectMap, "testDataSize", f.TestDataSize) - populate(objectMap, "trainingData", f.TrainingData) - populate(objectMap, "trainingSettings", f.TrainingSettings) - populate(objectMap, "validationData", f.ValidationData) - populate(objectMap, "validationDataSize", f.ValidationDataSize) - populate(objectMap, "weightColumnName", f.WeightColumnName) + populate(objectMap, "mode", f.Mode) + populate(objectMap, "targetColumn", f.TargetColumn) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type Forecasting. -func (f *Forecasting) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type FeatureImportanceSettings. +func (f *FeatureImportanceSettings) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", f, err) @@ -6392,53 +8103,11 @@ func (f *Forecasting) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "cvSplitColumnNames": - err = unpopulate(val, "CvSplitColumnNames", &f.CvSplitColumnNames) - delete(rawMsg, key) - case "featurizationSettings": - err = unpopulate(val, "FeaturizationSettings", &f.FeaturizationSettings) - delete(rawMsg, key) - case "forecastingSettings": - err = unpopulate(val, "ForecastingSettings", &f.ForecastingSettings) - delete(rawMsg, key) - case "limitSettings": - err = unpopulate(val, "LimitSettings", &f.LimitSettings) - delete(rawMsg, key) - case "logVerbosity": - err = unpopulate(val, "LogVerbosity", &f.LogVerbosity) - delete(rawMsg, key) - case "nCrossValidations": - f.NCrossValidations, err = unmarshalNCrossValidationsClassification(val) - delete(rawMsg, key) - case "primaryMetric": - err = unpopulate(val, "PrimaryMetric", &f.PrimaryMetric) - delete(rawMsg, key) - case "targetColumnName": - err = unpopulate(val, "TargetColumnName", &f.TargetColumnName) - delete(rawMsg, key) - case "taskType": - err = unpopulate(val, "TaskType", &f.TaskType) - delete(rawMsg, key) - case "testData": - err = unpopulate(val, "TestData", &f.TestData) - delete(rawMsg, key) - case "testDataSize": - err = unpopulate(val, "TestDataSize", &f.TestDataSize) - delete(rawMsg, key) - case "trainingData": - err = unpopulate(val, "TrainingData", &f.TrainingData) - delete(rawMsg, key) - case "trainingSettings": - err = unpopulate(val, "TrainingSettings", &f.TrainingSettings) - delete(rawMsg, key) - case "validationData": - err = unpopulate(val, "ValidationData", &f.ValidationData) - delete(rawMsg, key) - case "validationDataSize": - err = unpopulate(val, "ValidationDataSize", &f.ValidationDataSize) + case "mode": + err = unpopulate(val, "Mode", &f.Mode) delete(rawMsg, key) - case "weightColumnName": - err = unpopulate(val, "WeightColumnName", &f.WeightColumnName) + case "targetColumn": + err = unpopulate(val, "TargetColumn", &f.TargetColumn) delete(rawMsg, key) } if err != nil { @@ -6448,27 +8117,19 @@ func (f *Forecasting) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ForecastingSettings. -func (f ForecastingSettings) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type FeatureProperties. +func (f FeatureProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "countryOrRegionForHolidays", f.CountryOrRegionForHolidays) - populate(objectMap, "cvStepSize", f.CvStepSize) - populate(objectMap, "featureLags", f.FeatureLags) - populate(objectMap, "forecastHorizon", f.ForecastHorizon) - populate(objectMap, "frequency", f.Frequency) - populate(objectMap, "seasonality", f.Seasonality) - populate(objectMap, "shortSeriesHandlingConfig", f.ShortSeriesHandlingConfig) - populate(objectMap, "targetAggregateFunction", f.TargetAggregateFunction) - populate(objectMap, "targetLags", f.TargetLags) - populate(objectMap, "targetRollingWindowSize", f.TargetRollingWindowSize) - populate(objectMap, "timeColumnName", f.TimeColumnName) - populate(objectMap, "timeSeriesIdColumnNames", f.TimeSeriesIDColumnNames) - populate(objectMap, "useStl", f.UseStl) + populate(objectMap, "dataType", f.DataType) + populate(objectMap, "description", f.Description) + populate(objectMap, "featureName", f.FeatureName) + populate(objectMap, "properties", f.Properties) + populate(objectMap, "tags", f.Tags) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ForecastingSettings. -func (f *ForecastingSettings) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type FeatureProperties. +func (f *FeatureProperties) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", f, err) @@ -6476,44 +8137,20 @@ func (f *ForecastingSettings) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "countryOrRegionForHolidays": - err = unpopulate(val, "CountryOrRegionForHolidays", &f.CountryOrRegionForHolidays) - delete(rawMsg, key) - case "cvStepSize": - err = unpopulate(val, "CvStepSize", &f.CvStepSize) - delete(rawMsg, key) - case "featureLags": - err = unpopulate(val, "FeatureLags", &f.FeatureLags) - delete(rawMsg, key) - case "forecastHorizon": - f.ForecastHorizon, err = unmarshalForecastHorizonClassification(val) - delete(rawMsg, key) - case "frequency": - err = unpopulate(val, "Frequency", &f.Frequency) - delete(rawMsg, key) - case "seasonality": - f.Seasonality, err = unmarshalSeasonalityClassification(val) - delete(rawMsg, key) - case "shortSeriesHandlingConfig": - err = unpopulate(val, "ShortSeriesHandlingConfig", &f.ShortSeriesHandlingConfig) - delete(rawMsg, key) - case "targetAggregateFunction": - err = unpopulate(val, "TargetAggregateFunction", &f.TargetAggregateFunction) - delete(rawMsg, key) - case "targetLags": - f.TargetLags, err = unmarshalTargetLagsClassification(val) + case "dataType": + err = unpopulate(val, "DataType", &f.DataType) delete(rawMsg, key) - case "targetRollingWindowSize": - f.TargetRollingWindowSize, err = unmarshalTargetRollingWindowSizeClassification(val) + case "description": + err = unpopulate(val, "Description", &f.Description) delete(rawMsg, key) - case "timeColumnName": - err = unpopulate(val, "TimeColumnName", &f.TimeColumnName) + case "featureName": + err = unpopulate(val, "FeatureName", &f.FeatureName) delete(rawMsg, key) - case "timeSeriesIdColumnNames": - err = unpopulate(val, "TimeSeriesIDColumnNames", &f.TimeSeriesIDColumnNames) + case "properties": + err = unpopulate(val, "Properties", &f.Properties) delete(rawMsg, key) - case "useStl": - err = unpopulate(val, "UseStl", &f.UseStl) + case "tags": + err = unpopulate(val, "Tags", &f.Tags) delete(rawMsg, key) } if err != nil { @@ -6523,23 +8160,16 @@ func (f *ForecastingSettings) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ForecastingTrainingSettings. -func (f ForecastingTrainingSettings) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type FeatureResourceArmPaginatedResult. +func (f FeatureResourceArmPaginatedResult) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "allowedTrainingAlgorithms", f.AllowedTrainingAlgorithms) - populate(objectMap, "blockedTrainingAlgorithms", f.BlockedTrainingAlgorithms) - populate(objectMap, "enableDnnTraining", f.EnableDnnTraining) - populate(objectMap, "enableModelExplainability", f.EnableModelExplainability) - populate(objectMap, "enableOnnxCompatibleModels", f.EnableOnnxCompatibleModels) - populate(objectMap, "enableStackEnsemble", f.EnableStackEnsemble) - populate(objectMap, "enableVoteEnsemble", f.EnableVoteEnsemble) - populate(objectMap, "ensembleModelDownloadTimeout", f.EnsembleModelDownloadTimeout) - populate(objectMap, "stackEnsembleSettings", f.StackEnsembleSettings) + populate(objectMap, "nextLink", f.NextLink) + populate(objectMap, "value", f.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ForecastingTrainingSettings. -func (f *ForecastingTrainingSettings) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type FeatureResourceArmPaginatedResult. +func (f *FeatureResourceArmPaginatedResult) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", f, err) @@ -6547,32 +8177,11 @@ func (f *ForecastingTrainingSettings) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "allowedTrainingAlgorithms": - err = unpopulate(val, "AllowedTrainingAlgorithms", &f.AllowedTrainingAlgorithms) - delete(rawMsg, key) - case "blockedTrainingAlgorithms": - err = unpopulate(val, "BlockedTrainingAlgorithms", &f.BlockedTrainingAlgorithms) - delete(rawMsg, key) - case "enableDnnTraining": - err = unpopulate(val, "EnableDnnTraining", &f.EnableDnnTraining) - delete(rawMsg, key) - case "enableModelExplainability": - err = unpopulate(val, "EnableModelExplainability", &f.EnableModelExplainability) - delete(rawMsg, key) - case "enableOnnxCompatibleModels": - err = unpopulate(val, "EnableOnnxCompatibleModels", &f.EnableOnnxCompatibleModels) - delete(rawMsg, key) - case "enableStackEnsemble": - err = unpopulate(val, "EnableStackEnsemble", &f.EnableStackEnsemble) - delete(rawMsg, key) - case "enableVoteEnsemble": - err = unpopulate(val, "EnableVoteEnsemble", &f.EnableVoteEnsemble) - delete(rawMsg, key) - case "ensembleModelDownloadTimeout": - err = unpopulate(val, "EnsembleModelDownloadTimeout", &f.EnsembleModelDownloadTimeout) + case "nextLink": + err = unpopulate(val, "NextLink", &f.NextLink) delete(rawMsg, key) - case "stackEnsembleSettings": - err = unpopulate(val, "StackEnsembleSettings", &f.StackEnsembleSettings) + case "value": + err = unpopulate(val, "Value", &f.Value) delete(rawMsg, key) } if err != nil { @@ -6582,5696 +8191,9994 @@ func (f *ForecastingTrainingSettings) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type GridSamplingAlgorithm. -func (g GridSamplingAlgorithm) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type FeatureStoreSettings. +func (f FeatureStoreSettings) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - objectMap["samplingAlgorithmType"] = SamplingAlgorithmTypeGrid + populate(objectMap, "computeRuntime", f.ComputeRuntime) + populate(objectMap, "offlineStoreConnectionName", f.OfflineStoreConnectionName) + populate(objectMap, "onlineStoreConnectionName", f.OnlineStoreConnectionName) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type GridSamplingAlgorithm. -func (g *GridSamplingAlgorithm) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type FeatureStoreSettings. +func (f *FeatureStoreSettings) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) + return fmt.Errorf("unmarshalling type %T: %v", f, err) } for key, val := range rawMsg { var err error switch key { - case "samplingAlgorithmType": - err = unpopulate(val, "SamplingAlgorithmType", &g.SamplingAlgorithmType) + case "computeRuntime": + err = unpopulate(val, "ComputeRuntime", &f.ComputeRuntime) + delete(rawMsg, key) + case "offlineStoreConnectionName": + err = unpopulate(val, "OfflineStoreConnectionName", &f.OfflineStoreConnectionName) + delete(rawMsg, key) + case "onlineStoreConnectionName": + err = unpopulate(val, "OnlineStoreConnectionName", &f.OnlineStoreConnectionName) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) + return fmt.Errorf("unmarshalling type %T: %v", f, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type HDInsight. -func (h HDInsight) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type FeatureSubset. +func (f FeatureSubset) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "computeLocation", h.ComputeLocation) - objectMap["computeType"] = ComputeTypeHDInsight - populateDateTimeRFC3339(objectMap, "createdOn", h.CreatedOn) - populate(objectMap, "description", h.Description) - populate(objectMap, "disableLocalAuth", h.DisableLocalAuth) - populate(objectMap, "isAttachedCompute", h.IsAttachedCompute) - populateDateTimeRFC3339(objectMap, "modifiedOn", h.ModifiedOn) - populate(objectMap, "properties", h.Properties) - populate(objectMap, "provisioningErrors", h.ProvisioningErrors) - populate(objectMap, "provisioningState", h.ProvisioningState) - populate(objectMap, "resourceId", h.ResourceID) + populate(objectMap, "features", f.Features) + objectMap["filterType"] = MonitoringFeatureFilterTypeFeatureSubset return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type HDInsight. -func (h *HDInsight) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type FeatureSubset. +func (f *FeatureSubset) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) + return fmt.Errorf("unmarshalling type %T: %v", f, err) } for key, val := range rawMsg { var err error switch key { - case "computeLocation": - err = unpopulate(val, "ComputeLocation", &h.ComputeLocation) + case "features": + err = unpopulate(val, "Features", &f.Features) delete(rawMsg, key) - case "computeType": - err = unpopulate(val, "ComputeType", &h.ComputeType) - delete(rawMsg, key) - case "createdOn": - err = unpopulateDateTimeRFC3339(val, "CreatedOn", &h.CreatedOn) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &h.Description) - delete(rawMsg, key) - case "disableLocalAuth": - err = unpopulate(val, "DisableLocalAuth", &h.DisableLocalAuth) - delete(rawMsg, key) - case "isAttachedCompute": - err = unpopulate(val, "IsAttachedCompute", &h.IsAttachedCompute) - delete(rawMsg, key) - case "modifiedOn": - err = unpopulateDateTimeRFC3339(val, "ModifiedOn", &h.ModifiedOn) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &h.Properties) - delete(rawMsg, key) - case "provisioningErrors": - err = unpopulate(val, "ProvisioningErrors", &h.ProvisioningErrors) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &h.ProvisioningState) - delete(rawMsg, key) - case "resourceId": - err = unpopulate(val, "ResourceID", &h.ResourceID) + case "filterType": + err = unpopulate(val, "FilterType", &f.FilterType) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) + return fmt.Errorf("unmarshalling type %T: %v", f, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type HDInsightProperties. -func (h HDInsightProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type FeatureWindow. +func (f FeatureWindow) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "address", h.Address) - populate(objectMap, "administratorAccount", h.AdministratorAccount) - populate(objectMap, "sshPort", h.SSHPort) + populateDateTimeRFC3339(objectMap, "featureWindowEnd", f.FeatureWindowEnd) + populateDateTimeRFC3339(objectMap, "featureWindowStart", f.FeatureWindowStart) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type HDInsightProperties. -func (h *HDInsightProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type FeatureWindow. +func (f *FeatureWindow) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) + return fmt.Errorf("unmarshalling type %T: %v", f, err) } for key, val := range rawMsg { var err error switch key { - case "address": - err = unpopulate(val, "Address", &h.Address) - delete(rawMsg, key) - case "administratorAccount": - err = unpopulate(val, "AdministratorAccount", &h.AdministratorAccount) + case "featureWindowEnd": + err = unpopulateDateTimeRFC3339(val, "FeatureWindowEnd", &f.FeatureWindowEnd) delete(rawMsg, key) - case "sshPort": - err = unpopulate(val, "SSHPort", &h.SSHPort) + case "featureWindowStart": + err = unpopulateDateTimeRFC3339(val, "FeatureWindowStart", &f.FeatureWindowStart) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) + return fmt.Errorf("unmarshalling type %T: %v", f, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type HDInsightSchema. -func (h HDInsightSchema) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type FeaturesetContainer. +func (f FeaturesetContainer) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "properties", h.Properties) + populate(objectMap, "id", f.ID) + populate(objectMap, "name", f.Name) + populate(objectMap, "properties", f.Properties) + populate(objectMap, "systemData", f.SystemData) + populate(objectMap, "type", f.Type) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type HDInsightSchema. -func (h *HDInsightSchema) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type FeaturesetContainer. +func (f *FeaturesetContainer) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) + return fmt.Errorf("unmarshalling type %T: %v", f, err) } for key, val := range rawMsg { var err error switch key { + case "id": + err = unpopulate(val, "ID", &f.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &f.Name) + delete(rawMsg, key) case "properties": - err = unpopulate(val, "Properties", &h.Properties) + err = unpopulate(val, "Properties", &f.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &f.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &f.Type) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) + return fmt.Errorf("unmarshalling type %T: %v", f, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type IDAssetReference. -func (i IDAssetReference) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type FeaturesetContainerProperties. +func (f FeaturesetContainerProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "assetId", i.AssetID) - objectMap["referenceType"] = ReferenceTypeID + populate(objectMap, "description", f.Description) + populate(objectMap, "isArchived", f.IsArchived) + populate(objectMap, "latestVersion", f.LatestVersion) + populate(objectMap, "nextVersion", f.NextVersion) + populate(objectMap, "properties", f.Properties) + populate(objectMap, "provisioningState", f.ProvisioningState) + populate(objectMap, "tags", f.Tags) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type IDAssetReference. -func (i *IDAssetReference) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type FeaturesetContainerProperties. +func (f *FeaturesetContainerProperties) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) + return fmt.Errorf("unmarshalling type %T: %v", f, err) } for key, val := range rawMsg { var err error switch key { - case "assetId": - err = unpopulate(val, "AssetID", &i.AssetID) + case "description": + err = unpopulate(val, "Description", &f.Description) delete(rawMsg, key) - case "referenceType": - err = unpopulate(val, "ReferenceType", &i.ReferenceType) + case "isArchived": + err = unpopulate(val, "IsArchived", &f.IsArchived) + delete(rawMsg, key) + case "latestVersion": + err = unpopulate(val, "LatestVersion", &f.LatestVersion) + delete(rawMsg, key) + case "nextVersion": + err = unpopulate(val, "NextVersion", &f.NextVersion) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &f.Properties) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &f.ProvisioningState) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &f.Tags) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) + return fmt.Errorf("unmarshalling type %T: %v", f, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type IdentityConfiguration. -func (i IdentityConfiguration) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type FeaturesetContainerResourceArmPaginatedResult. +func (f FeaturesetContainerResourceArmPaginatedResult) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - objectMap["identityType"] = i.IdentityType + populate(objectMap, "nextLink", f.NextLink) + populate(objectMap, "value", f.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type IdentityConfiguration. -func (i *IdentityConfiguration) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type FeaturesetContainerResourceArmPaginatedResult. +func (f *FeaturesetContainerResourceArmPaginatedResult) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) + return fmt.Errorf("unmarshalling type %T: %v", f, err) } for key, val := range rawMsg { var err error switch key { - case "identityType": - err = unpopulate(val, "IdentityType", &i.IdentityType) + case "nextLink": + err = unpopulate(val, "NextLink", &f.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &f.Value) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) + return fmt.Errorf("unmarshalling type %T: %v", f, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type IdentityForCmk. -func (i IdentityForCmk) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type FeaturesetSpecification. +func (f FeaturesetSpecification) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "userAssignedIdentity", i.UserAssignedIdentity) + populate(objectMap, "path", f.Path) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type IdentityForCmk. -func (i *IdentityForCmk) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type FeaturesetSpecification. +func (f *FeaturesetSpecification) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) + return fmt.Errorf("unmarshalling type %T: %v", f, err) } for key, val := range rawMsg { var err error switch key { - case "userAssignedIdentity": - err = unpopulate(val, "UserAssignedIdentity", &i.UserAssignedIdentity) + case "path": + err = unpopulate(val, "Path", &f.Path) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) + return fmt.Errorf("unmarshalling type %T: %v", f, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ImageClassification. -func (i ImageClassification) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type FeaturesetVersion. +func (f FeaturesetVersion) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "limitSettings", i.LimitSettings) - populate(objectMap, "logVerbosity", i.LogVerbosity) - populate(objectMap, "modelSettings", i.ModelSettings) - populate(objectMap, "primaryMetric", i.PrimaryMetric) - populate(objectMap, "searchSpace", i.SearchSpace) - populate(objectMap, "sweepSettings", i.SweepSettings) - populate(objectMap, "targetColumnName", i.TargetColumnName) - objectMap["taskType"] = TaskTypeImageClassification - populate(objectMap, "trainingData", i.TrainingData) - populate(objectMap, "validationData", i.ValidationData) - populate(objectMap, "validationDataSize", i.ValidationDataSize) + populate(objectMap, "id", f.ID) + populate(objectMap, "name", f.Name) + populate(objectMap, "properties", f.Properties) + populate(objectMap, "systemData", f.SystemData) + populate(objectMap, "type", f.Type) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ImageClassification. -func (i *ImageClassification) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type FeaturesetVersion. +func (f *FeaturesetVersion) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) + return fmt.Errorf("unmarshalling type %T: %v", f, err) } for key, val := range rawMsg { var err error switch key { - case "limitSettings": - err = unpopulate(val, "LimitSettings", &i.LimitSettings) - delete(rawMsg, key) - case "logVerbosity": - err = unpopulate(val, "LogVerbosity", &i.LogVerbosity) - delete(rawMsg, key) - case "modelSettings": - err = unpopulate(val, "ModelSettings", &i.ModelSettings) - delete(rawMsg, key) - case "primaryMetric": - err = unpopulate(val, "PrimaryMetric", &i.PrimaryMetric) - delete(rawMsg, key) - case "searchSpace": - err = unpopulate(val, "SearchSpace", &i.SearchSpace) - delete(rawMsg, key) - case "sweepSettings": - err = unpopulate(val, "SweepSettings", &i.SweepSettings) - delete(rawMsg, key) - case "targetColumnName": - err = unpopulate(val, "TargetColumnName", &i.TargetColumnName) + case "id": + err = unpopulate(val, "ID", &f.ID) delete(rawMsg, key) - case "taskType": - err = unpopulate(val, "TaskType", &i.TaskType) + case "name": + err = unpopulate(val, "Name", &f.Name) delete(rawMsg, key) - case "trainingData": - err = unpopulate(val, "TrainingData", &i.TrainingData) + case "properties": + err = unpopulate(val, "Properties", &f.Properties) delete(rawMsg, key) - case "validationData": - err = unpopulate(val, "ValidationData", &i.ValidationData) + case "systemData": + err = unpopulate(val, "SystemData", &f.SystemData) delete(rawMsg, key) - case "validationDataSize": - err = unpopulate(val, "ValidationDataSize", &i.ValidationDataSize) + case "type": + err = unpopulate(val, "Type", &f.Type) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) + return fmt.Errorf("unmarshalling type %T: %v", f, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ImageClassificationBase. -func (i ImageClassificationBase) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type FeaturesetVersionBackfillRequest. +func (f FeaturesetVersionBackfillRequest) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "limitSettings", i.LimitSettings) - populate(objectMap, "modelSettings", i.ModelSettings) - populate(objectMap, "searchSpace", i.SearchSpace) - populate(objectMap, "sweepSettings", i.SweepSettings) - populate(objectMap, "validationData", i.ValidationData) - populate(objectMap, "validationDataSize", i.ValidationDataSize) + populate(objectMap, "dataAvailabilityStatus", f.DataAvailabilityStatus) + populate(objectMap, "description", f.Description) + populate(objectMap, "displayName", f.DisplayName) + populate(objectMap, "featureWindow", f.FeatureWindow) + populate(objectMap, "jobId", f.JobID) + populate(objectMap, "properties", f.Properties) + populate(objectMap, "resource", f.Resource) + populate(objectMap, "sparkConfiguration", f.SparkConfiguration) + populate(objectMap, "tags", f.Tags) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ImageClassificationBase. -func (i *ImageClassificationBase) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type FeaturesetVersionBackfillRequest. +func (f *FeaturesetVersionBackfillRequest) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) + return fmt.Errorf("unmarshalling type %T: %v", f, err) } for key, val := range rawMsg { var err error switch key { - case "limitSettings": - err = unpopulate(val, "LimitSettings", &i.LimitSettings) + case "dataAvailabilityStatus": + err = unpopulate(val, "DataAvailabilityStatus", &f.DataAvailabilityStatus) delete(rawMsg, key) - case "modelSettings": - err = unpopulate(val, "ModelSettings", &i.ModelSettings) + case "description": + err = unpopulate(val, "Description", &f.Description) delete(rawMsg, key) - case "searchSpace": - err = unpopulate(val, "SearchSpace", &i.SearchSpace) + case "displayName": + err = unpopulate(val, "DisplayName", &f.DisplayName) delete(rawMsg, key) - case "sweepSettings": - err = unpopulate(val, "SweepSettings", &i.SweepSettings) + case "featureWindow": + err = unpopulate(val, "FeatureWindow", &f.FeatureWindow) delete(rawMsg, key) - case "validationData": - err = unpopulate(val, "ValidationData", &i.ValidationData) + case "jobId": + err = unpopulate(val, "JobID", &f.JobID) delete(rawMsg, key) - case "validationDataSize": - err = unpopulate(val, "ValidationDataSize", &i.ValidationDataSize) + case "properties": + err = unpopulate(val, "Properties", &f.Properties) + delete(rawMsg, key) + case "resource": + err = unpopulate(val, "Resource", &f.Resource) + delete(rawMsg, key) + case "sparkConfiguration": + err = unpopulate(val, "SparkConfiguration", &f.SparkConfiguration) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &f.Tags) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) + return fmt.Errorf("unmarshalling type %T: %v", f, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ImageClassificationMultilabel. -func (i ImageClassificationMultilabel) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type FeaturesetVersionBackfillResponse. +func (f FeaturesetVersionBackfillResponse) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "limitSettings", i.LimitSettings) - populate(objectMap, "logVerbosity", i.LogVerbosity) - populate(objectMap, "modelSettings", i.ModelSettings) - populate(objectMap, "primaryMetric", i.PrimaryMetric) - populate(objectMap, "searchSpace", i.SearchSpace) - populate(objectMap, "sweepSettings", i.SweepSettings) - populate(objectMap, "targetColumnName", i.TargetColumnName) - objectMap["taskType"] = TaskTypeImageClassificationMultilabel - populate(objectMap, "trainingData", i.TrainingData) - populate(objectMap, "validationData", i.ValidationData) - populate(objectMap, "validationDataSize", i.ValidationDataSize) + populate(objectMap, "jobIds", f.JobIDs) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ImageClassificationMultilabel. -func (i *ImageClassificationMultilabel) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type FeaturesetVersionBackfillResponse. +func (f *FeaturesetVersionBackfillResponse) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) + return fmt.Errorf("unmarshalling type %T: %v", f, err) } for key, val := range rawMsg { var err error switch key { - case "limitSettings": - err = unpopulate(val, "LimitSettings", &i.LimitSettings) - delete(rawMsg, key) - case "logVerbosity": - err = unpopulate(val, "LogVerbosity", &i.LogVerbosity) - delete(rawMsg, key) - case "modelSettings": - err = unpopulate(val, "ModelSettings", &i.ModelSettings) - delete(rawMsg, key) - case "primaryMetric": - err = unpopulate(val, "PrimaryMetric", &i.PrimaryMetric) - delete(rawMsg, key) - case "searchSpace": - err = unpopulate(val, "SearchSpace", &i.SearchSpace) - delete(rawMsg, key) - case "sweepSettings": - err = unpopulate(val, "SweepSettings", &i.SweepSettings) - delete(rawMsg, key) - case "targetColumnName": - err = unpopulate(val, "TargetColumnName", &i.TargetColumnName) - delete(rawMsg, key) - case "taskType": - err = unpopulate(val, "TaskType", &i.TaskType) - delete(rawMsg, key) - case "trainingData": - err = unpopulate(val, "TrainingData", &i.TrainingData) - delete(rawMsg, key) - case "validationData": - err = unpopulate(val, "ValidationData", &i.ValidationData) - delete(rawMsg, key) - case "validationDataSize": - err = unpopulate(val, "ValidationDataSize", &i.ValidationDataSize) + case "jobIds": + err = unpopulate(val, "JobIDs", &f.JobIDs) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) + return fmt.Errorf("unmarshalling type %T: %v", f, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ImageInstanceSegmentation. -func (i ImageInstanceSegmentation) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type FeaturesetVersionProperties. +func (f FeaturesetVersionProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "limitSettings", i.LimitSettings) - populate(objectMap, "logVerbosity", i.LogVerbosity) - populate(objectMap, "modelSettings", i.ModelSettings) - populate(objectMap, "primaryMetric", i.PrimaryMetric) - populate(objectMap, "searchSpace", i.SearchSpace) - populate(objectMap, "sweepSettings", i.SweepSettings) - populate(objectMap, "targetColumnName", i.TargetColumnName) - objectMap["taskType"] = TaskTypeImageInstanceSegmentation - populate(objectMap, "trainingData", i.TrainingData) - populate(objectMap, "validationData", i.ValidationData) - populate(objectMap, "validationDataSize", i.ValidationDataSize) + populate(objectMap, "description", f.Description) + populate(objectMap, "entities", f.Entities) + populate(objectMap, "isAnonymous", f.IsAnonymous) + populate(objectMap, "isArchived", f.IsArchived) + populate(objectMap, "materializationSettings", f.MaterializationSettings) + populate(objectMap, "properties", f.Properties) + populate(objectMap, "provisioningState", f.ProvisioningState) + populate(objectMap, "specification", f.Specification) + populate(objectMap, "stage", f.Stage) + populate(objectMap, "tags", f.Tags) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ImageInstanceSegmentation. -func (i *ImageInstanceSegmentation) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type FeaturesetVersionProperties. +func (f *FeaturesetVersionProperties) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) + return fmt.Errorf("unmarshalling type %T: %v", f, err) } for key, val := range rawMsg { var err error switch key { - case "limitSettings": - err = unpopulate(val, "LimitSettings", &i.LimitSettings) - delete(rawMsg, key) - case "logVerbosity": - err = unpopulate(val, "LogVerbosity", &i.LogVerbosity) + case "description": + err = unpopulate(val, "Description", &f.Description) delete(rawMsg, key) - case "modelSettings": - err = unpopulate(val, "ModelSettings", &i.ModelSettings) + case "entities": + err = unpopulate(val, "Entities", &f.Entities) delete(rawMsg, key) - case "primaryMetric": - err = unpopulate(val, "PrimaryMetric", &i.PrimaryMetric) + case "isAnonymous": + err = unpopulate(val, "IsAnonymous", &f.IsAnonymous) delete(rawMsg, key) - case "searchSpace": - err = unpopulate(val, "SearchSpace", &i.SearchSpace) + case "isArchived": + err = unpopulate(val, "IsArchived", &f.IsArchived) delete(rawMsg, key) - case "sweepSettings": - err = unpopulate(val, "SweepSettings", &i.SweepSettings) + case "materializationSettings": + err = unpopulate(val, "MaterializationSettings", &f.MaterializationSettings) delete(rawMsg, key) - case "targetColumnName": - err = unpopulate(val, "TargetColumnName", &i.TargetColumnName) + case "properties": + err = unpopulate(val, "Properties", &f.Properties) delete(rawMsg, key) - case "taskType": - err = unpopulate(val, "TaskType", &i.TaskType) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &f.ProvisioningState) delete(rawMsg, key) - case "trainingData": - err = unpopulate(val, "TrainingData", &i.TrainingData) + case "specification": + err = unpopulate(val, "Specification", &f.Specification) delete(rawMsg, key) - case "validationData": - err = unpopulate(val, "ValidationData", &i.ValidationData) + case "stage": + err = unpopulate(val, "Stage", &f.Stage) delete(rawMsg, key) - case "validationDataSize": - err = unpopulate(val, "ValidationDataSize", &i.ValidationDataSize) + case "tags": + err = unpopulate(val, "Tags", &f.Tags) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) + return fmt.Errorf("unmarshalling type %T: %v", f, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ImageLimitSettings. -func (i ImageLimitSettings) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type FeaturesetVersionResourceArmPaginatedResult. +func (f FeaturesetVersionResourceArmPaginatedResult) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "maxConcurrentTrials", i.MaxConcurrentTrials) - populate(objectMap, "maxTrials", i.MaxTrials) - populate(objectMap, "timeout", i.Timeout) + populate(objectMap, "nextLink", f.NextLink) + populate(objectMap, "value", f.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ImageLimitSettings. -func (i *ImageLimitSettings) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type FeaturesetVersionResourceArmPaginatedResult. +func (f *FeaturesetVersionResourceArmPaginatedResult) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) + return fmt.Errorf("unmarshalling type %T: %v", f, err) } for key, val := range rawMsg { var err error switch key { - case "maxConcurrentTrials": - err = unpopulate(val, "MaxConcurrentTrials", &i.MaxConcurrentTrials) - delete(rawMsg, key) - case "maxTrials": - err = unpopulate(val, "MaxTrials", &i.MaxTrials) + case "nextLink": + err = unpopulate(val, "NextLink", &f.NextLink) delete(rawMsg, key) - case "timeout": - err = unpopulate(val, "Timeout", &i.Timeout) + case "value": + err = unpopulate(val, "Value", &f.Value) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) + return fmt.Errorf("unmarshalling type %T: %v", f, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ImageModelDistributionSettings. -func (i ImageModelDistributionSettings) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type FeaturestoreEntityContainer. +func (f FeaturestoreEntityContainer) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "amsGradient", i.AmsGradient) - populate(objectMap, "augmentations", i.Augmentations) - populate(objectMap, "beta1", i.Beta1) - populate(objectMap, "beta2", i.Beta2) - populate(objectMap, "distributed", i.Distributed) - populate(objectMap, "earlyStopping", i.EarlyStopping) - populate(objectMap, "earlyStoppingDelay", i.EarlyStoppingDelay) - populate(objectMap, "earlyStoppingPatience", i.EarlyStoppingPatience) - populate(objectMap, "enableOnnxNormalization", i.EnableOnnxNormalization) - populate(objectMap, "evaluationFrequency", i.EvaluationFrequency) - populate(objectMap, "gradientAccumulationStep", i.GradientAccumulationStep) - populate(objectMap, "layersToFreeze", i.LayersToFreeze) - populate(objectMap, "learningRate", i.LearningRate) - populate(objectMap, "learningRateScheduler", i.LearningRateScheduler) - populate(objectMap, "modelName", i.ModelName) - populate(objectMap, "momentum", i.Momentum) - populate(objectMap, "nesterov", i.Nesterov) - populate(objectMap, "numberOfEpochs", i.NumberOfEpochs) - populate(objectMap, "numberOfWorkers", i.NumberOfWorkers) - populate(objectMap, "optimizer", i.Optimizer) - populate(objectMap, "randomSeed", i.RandomSeed) - populate(objectMap, "stepLRGamma", i.StepLRGamma) - populate(objectMap, "stepLRStepSize", i.StepLRStepSize) - populate(objectMap, "trainingBatchSize", i.TrainingBatchSize) - populate(objectMap, "validationBatchSize", i.ValidationBatchSize) - populate(objectMap, "warmupCosineLRCycles", i.WarmupCosineLRCycles) - populate(objectMap, "warmupCosineLRWarmupEpochs", i.WarmupCosineLRWarmupEpochs) - populate(objectMap, "weightDecay", i.WeightDecay) + populate(objectMap, "id", f.ID) + populate(objectMap, "name", f.Name) + populate(objectMap, "properties", f.Properties) + populate(objectMap, "systemData", f.SystemData) + populate(objectMap, "type", f.Type) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ImageModelDistributionSettings. -func (i *ImageModelDistributionSettings) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type FeaturestoreEntityContainer. +func (f *FeaturestoreEntityContainer) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) + return fmt.Errorf("unmarshalling type %T: %v", f, err) } for key, val := range rawMsg { var err error switch key { - case "amsGradient": - err = unpopulate(val, "AmsGradient", &i.AmsGradient) - delete(rawMsg, key) - case "augmentations": - err = unpopulate(val, "Augmentations", &i.Augmentations) - delete(rawMsg, key) - case "beta1": - err = unpopulate(val, "Beta1", &i.Beta1) - delete(rawMsg, key) - case "beta2": - err = unpopulate(val, "Beta2", &i.Beta2) - delete(rawMsg, key) - case "distributed": - err = unpopulate(val, "Distributed", &i.Distributed) - delete(rawMsg, key) - case "earlyStopping": - err = unpopulate(val, "EarlyStopping", &i.EarlyStopping) - delete(rawMsg, key) - case "earlyStoppingDelay": - err = unpopulate(val, "EarlyStoppingDelay", &i.EarlyStoppingDelay) - delete(rawMsg, key) - case "earlyStoppingPatience": - err = unpopulate(val, "EarlyStoppingPatience", &i.EarlyStoppingPatience) - delete(rawMsg, key) - case "enableOnnxNormalization": - err = unpopulate(val, "EnableOnnxNormalization", &i.EnableOnnxNormalization) - delete(rawMsg, key) - case "evaluationFrequency": - err = unpopulate(val, "EvaluationFrequency", &i.EvaluationFrequency) - delete(rawMsg, key) - case "gradientAccumulationStep": - err = unpopulate(val, "GradientAccumulationStep", &i.GradientAccumulationStep) - delete(rawMsg, key) - case "layersToFreeze": - err = unpopulate(val, "LayersToFreeze", &i.LayersToFreeze) - delete(rawMsg, key) - case "learningRate": - err = unpopulate(val, "LearningRate", &i.LearningRate) - delete(rawMsg, key) - case "learningRateScheduler": - err = unpopulate(val, "LearningRateScheduler", &i.LearningRateScheduler) - delete(rawMsg, key) - case "modelName": - err = unpopulate(val, "ModelName", &i.ModelName) - delete(rawMsg, key) - case "momentum": - err = unpopulate(val, "Momentum", &i.Momentum) - delete(rawMsg, key) - case "nesterov": - err = unpopulate(val, "Nesterov", &i.Nesterov) + case "id": + err = unpopulate(val, "ID", &f.ID) delete(rawMsg, key) - case "numberOfEpochs": - err = unpopulate(val, "NumberOfEpochs", &i.NumberOfEpochs) + case "name": + err = unpopulate(val, "Name", &f.Name) delete(rawMsg, key) - case "numberOfWorkers": - err = unpopulate(val, "NumberOfWorkers", &i.NumberOfWorkers) + case "properties": + err = unpopulate(val, "Properties", &f.Properties) delete(rawMsg, key) - case "optimizer": - err = unpopulate(val, "Optimizer", &i.Optimizer) + case "systemData": + err = unpopulate(val, "SystemData", &f.SystemData) delete(rawMsg, key) - case "randomSeed": - err = unpopulate(val, "RandomSeed", &i.RandomSeed) + case "type": + err = unpopulate(val, "Type", &f.Type) delete(rawMsg, key) - case "stepLRGamma": - err = unpopulate(val, "StepLRGamma", &i.StepLRGamma) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FeaturestoreEntityContainerProperties. +func (f FeaturestoreEntityContainerProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", f.Description) + populate(objectMap, "isArchived", f.IsArchived) + populate(objectMap, "latestVersion", f.LatestVersion) + populate(objectMap, "nextVersion", f.NextVersion) + populate(objectMap, "properties", f.Properties) + populate(objectMap, "provisioningState", f.ProvisioningState) + populate(objectMap, "tags", f.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FeaturestoreEntityContainerProperties. +func (f *FeaturestoreEntityContainerProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &f.Description) delete(rawMsg, key) - case "stepLRStepSize": - err = unpopulate(val, "StepLRStepSize", &i.StepLRStepSize) + case "isArchived": + err = unpopulate(val, "IsArchived", &f.IsArchived) delete(rawMsg, key) - case "trainingBatchSize": - err = unpopulate(val, "TrainingBatchSize", &i.TrainingBatchSize) + case "latestVersion": + err = unpopulate(val, "LatestVersion", &f.LatestVersion) delete(rawMsg, key) - case "validationBatchSize": - err = unpopulate(val, "ValidationBatchSize", &i.ValidationBatchSize) + case "nextVersion": + err = unpopulate(val, "NextVersion", &f.NextVersion) delete(rawMsg, key) - case "warmupCosineLRCycles": - err = unpopulate(val, "WarmupCosineLRCycles", &i.WarmupCosineLRCycles) + case "properties": + err = unpopulate(val, "Properties", &f.Properties) delete(rawMsg, key) - case "warmupCosineLRWarmupEpochs": - err = unpopulate(val, "WarmupCosineLRWarmupEpochs", &i.WarmupCosineLRWarmupEpochs) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &f.ProvisioningState) delete(rawMsg, key) - case "weightDecay": - err = unpopulate(val, "WeightDecay", &i.WeightDecay) + case "tags": + err = unpopulate(val, "Tags", &f.Tags) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) + return fmt.Errorf("unmarshalling type %T: %v", f, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ImageModelDistributionSettingsClassification. -func (i ImageModelDistributionSettingsClassification) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type FeaturestoreEntityContainerResourceArmPaginatedResult. +func (f FeaturestoreEntityContainerResourceArmPaginatedResult) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "amsGradient", i.AmsGradient) - populate(objectMap, "augmentations", i.Augmentations) - populate(objectMap, "beta1", i.Beta1) - populate(objectMap, "beta2", i.Beta2) - populate(objectMap, "distributed", i.Distributed) - populate(objectMap, "earlyStopping", i.EarlyStopping) - populate(objectMap, "earlyStoppingDelay", i.EarlyStoppingDelay) - populate(objectMap, "earlyStoppingPatience", i.EarlyStoppingPatience) - populate(objectMap, "enableOnnxNormalization", i.EnableOnnxNormalization) - populate(objectMap, "evaluationFrequency", i.EvaluationFrequency) - populate(objectMap, "gradientAccumulationStep", i.GradientAccumulationStep) - populate(objectMap, "layersToFreeze", i.LayersToFreeze) - populate(objectMap, "learningRate", i.LearningRate) - populate(objectMap, "learningRateScheduler", i.LearningRateScheduler) - populate(objectMap, "modelName", i.ModelName) - populate(objectMap, "momentum", i.Momentum) - populate(objectMap, "nesterov", i.Nesterov) - populate(objectMap, "numberOfEpochs", i.NumberOfEpochs) - populate(objectMap, "numberOfWorkers", i.NumberOfWorkers) - populate(objectMap, "optimizer", i.Optimizer) - populate(objectMap, "randomSeed", i.RandomSeed) - populate(objectMap, "stepLRGamma", i.StepLRGamma) - populate(objectMap, "stepLRStepSize", i.StepLRStepSize) - populate(objectMap, "trainingBatchSize", i.TrainingBatchSize) - populate(objectMap, "trainingCropSize", i.TrainingCropSize) - populate(objectMap, "validationBatchSize", i.ValidationBatchSize) - populate(objectMap, "validationCropSize", i.ValidationCropSize) - populate(objectMap, "validationResizeSize", i.ValidationResizeSize) - populate(objectMap, "warmupCosineLRCycles", i.WarmupCosineLRCycles) - populate(objectMap, "warmupCosineLRWarmupEpochs", i.WarmupCosineLRWarmupEpochs) - populate(objectMap, "weightDecay", i.WeightDecay) - populate(objectMap, "weightedLoss", i.WeightedLoss) + populate(objectMap, "nextLink", f.NextLink) + populate(objectMap, "value", f.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ImageModelDistributionSettingsClassification. -func (i *ImageModelDistributionSettingsClassification) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type FeaturestoreEntityContainerResourceArmPaginatedResult. +func (f *FeaturestoreEntityContainerResourceArmPaginatedResult) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) + return fmt.Errorf("unmarshalling type %T: %v", f, err) } for key, val := range rawMsg { var err error switch key { - case "amsGradient": - err = unpopulate(val, "AmsGradient", &i.AmsGradient) - delete(rawMsg, key) - case "augmentations": - err = unpopulate(val, "Augmentations", &i.Augmentations) - delete(rawMsg, key) - case "beta1": - err = unpopulate(val, "Beta1", &i.Beta1) - delete(rawMsg, key) - case "beta2": - err = unpopulate(val, "Beta2", &i.Beta2) - delete(rawMsg, key) - case "distributed": - err = unpopulate(val, "Distributed", &i.Distributed) - delete(rawMsg, key) - case "earlyStopping": - err = unpopulate(val, "EarlyStopping", &i.EarlyStopping) - delete(rawMsg, key) - case "earlyStoppingDelay": - err = unpopulate(val, "EarlyStoppingDelay", &i.EarlyStoppingDelay) - delete(rawMsg, key) - case "earlyStoppingPatience": - err = unpopulate(val, "EarlyStoppingPatience", &i.EarlyStoppingPatience) - delete(rawMsg, key) - case "enableOnnxNormalization": - err = unpopulate(val, "EnableOnnxNormalization", &i.EnableOnnxNormalization) - delete(rawMsg, key) - case "evaluationFrequency": - err = unpopulate(val, "EvaluationFrequency", &i.EvaluationFrequency) - delete(rawMsg, key) - case "gradientAccumulationStep": - err = unpopulate(val, "GradientAccumulationStep", &i.GradientAccumulationStep) - delete(rawMsg, key) - case "layersToFreeze": - err = unpopulate(val, "LayersToFreeze", &i.LayersToFreeze) - delete(rawMsg, key) - case "learningRate": - err = unpopulate(val, "LearningRate", &i.LearningRate) - delete(rawMsg, key) - case "learningRateScheduler": - err = unpopulate(val, "LearningRateScheduler", &i.LearningRateScheduler) - delete(rawMsg, key) - case "modelName": - err = unpopulate(val, "ModelName", &i.ModelName) - delete(rawMsg, key) - case "momentum": - err = unpopulate(val, "Momentum", &i.Momentum) - delete(rawMsg, key) - case "nesterov": - err = unpopulate(val, "Nesterov", &i.Nesterov) - delete(rawMsg, key) - case "numberOfEpochs": - err = unpopulate(val, "NumberOfEpochs", &i.NumberOfEpochs) + case "nextLink": + err = unpopulate(val, "NextLink", &f.NextLink) delete(rawMsg, key) - case "numberOfWorkers": - err = unpopulate(val, "NumberOfWorkers", &i.NumberOfWorkers) + case "value": + err = unpopulate(val, "Value", &f.Value) delete(rawMsg, key) - case "optimizer": - err = unpopulate(val, "Optimizer", &i.Optimizer) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FeaturestoreEntityVersion. +func (f FeaturestoreEntityVersion) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", f.ID) + populate(objectMap, "name", f.Name) + populate(objectMap, "properties", f.Properties) + populate(objectMap, "systemData", f.SystemData) + populate(objectMap, "type", f.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FeaturestoreEntityVersion. +func (f *FeaturestoreEntityVersion) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &f.ID) delete(rawMsg, key) - case "randomSeed": - err = unpopulate(val, "RandomSeed", &i.RandomSeed) + case "name": + err = unpopulate(val, "Name", &f.Name) delete(rawMsg, key) - case "stepLRGamma": - err = unpopulate(val, "StepLRGamma", &i.StepLRGamma) + case "properties": + err = unpopulate(val, "Properties", &f.Properties) delete(rawMsg, key) - case "stepLRStepSize": - err = unpopulate(val, "StepLRStepSize", &i.StepLRStepSize) + case "systemData": + err = unpopulate(val, "SystemData", &f.SystemData) delete(rawMsg, key) - case "trainingBatchSize": - err = unpopulate(val, "TrainingBatchSize", &i.TrainingBatchSize) + case "type": + err = unpopulate(val, "Type", &f.Type) delete(rawMsg, key) - case "trainingCropSize": - err = unpopulate(val, "TrainingCropSize", &i.TrainingCropSize) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FeaturestoreEntityVersionProperties. +func (f FeaturestoreEntityVersionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", f.Description) + populate(objectMap, "indexColumns", f.IndexColumns) + populate(objectMap, "isAnonymous", f.IsAnonymous) + populate(objectMap, "isArchived", f.IsArchived) + populate(objectMap, "properties", f.Properties) + populate(objectMap, "provisioningState", f.ProvisioningState) + populate(objectMap, "stage", f.Stage) + populate(objectMap, "tags", f.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FeaturestoreEntityVersionProperties. +func (f *FeaturestoreEntityVersionProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &f.Description) delete(rawMsg, key) - case "validationBatchSize": - err = unpopulate(val, "ValidationBatchSize", &i.ValidationBatchSize) + case "indexColumns": + err = unpopulate(val, "IndexColumns", &f.IndexColumns) delete(rawMsg, key) - case "validationCropSize": - err = unpopulate(val, "ValidationCropSize", &i.ValidationCropSize) + case "isAnonymous": + err = unpopulate(val, "IsAnonymous", &f.IsAnonymous) delete(rawMsg, key) - case "validationResizeSize": - err = unpopulate(val, "ValidationResizeSize", &i.ValidationResizeSize) + case "isArchived": + err = unpopulate(val, "IsArchived", &f.IsArchived) delete(rawMsg, key) - case "warmupCosineLRCycles": - err = unpopulate(val, "WarmupCosineLRCycles", &i.WarmupCosineLRCycles) + case "properties": + err = unpopulate(val, "Properties", &f.Properties) delete(rawMsg, key) - case "warmupCosineLRWarmupEpochs": - err = unpopulate(val, "WarmupCosineLRWarmupEpochs", &i.WarmupCosineLRWarmupEpochs) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &f.ProvisioningState) delete(rawMsg, key) - case "weightDecay": - err = unpopulate(val, "WeightDecay", &i.WeightDecay) + case "stage": + err = unpopulate(val, "Stage", &f.Stage) delete(rawMsg, key) - case "weightedLoss": - err = unpopulate(val, "WeightedLoss", &i.WeightedLoss) + case "tags": + err = unpopulate(val, "Tags", &f.Tags) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) + return fmt.Errorf("unmarshalling type %T: %v", f, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ImageModelDistributionSettingsObjectDetection. -func (i ImageModelDistributionSettingsObjectDetection) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type FeaturestoreEntityVersionResourceArmPaginatedResult. +func (f FeaturestoreEntityVersionResourceArmPaginatedResult) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "amsGradient", i.AmsGradient) - populate(objectMap, "augmentations", i.Augmentations) - populate(objectMap, "beta1", i.Beta1) - populate(objectMap, "beta2", i.Beta2) - populate(objectMap, "boxDetectionsPerImage", i.BoxDetectionsPerImage) - populate(objectMap, "boxScoreThreshold", i.BoxScoreThreshold) - populate(objectMap, "distributed", i.Distributed) - populate(objectMap, "earlyStopping", i.EarlyStopping) - populate(objectMap, "earlyStoppingDelay", i.EarlyStoppingDelay) - populate(objectMap, "earlyStoppingPatience", i.EarlyStoppingPatience) - populate(objectMap, "enableOnnxNormalization", i.EnableOnnxNormalization) - populate(objectMap, "evaluationFrequency", i.EvaluationFrequency) - populate(objectMap, "gradientAccumulationStep", i.GradientAccumulationStep) - populate(objectMap, "imageSize", i.ImageSize) - populate(objectMap, "layersToFreeze", i.LayersToFreeze) - populate(objectMap, "learningRate", i.LearningRate) - populate(objectMap, "learningRateScheduler", i.LearningRateScheduler) - populate(objectMap, "maxSize", i.MaxSize) - populate(objectMap, "minSize", i.MinSize) - populate(objectMap, "modelName", i.ModelName) - populate(objectMap, "modelSize", i.ModelSize) - populate(objectMap, "momentum", i.Momentum) - populate(objectMap, "multiScale", i.MultiScale) - populate(objectMap, "nesterov", i.Nesterov) - populate(objectMap, "nmsIouThreshold", i.NmsIouThreshold) - populate(objectMap, "numberOfEpochs", i.NumberOfEpochs) - populate(objectMap, "numberOfWorkers", i.NumberOfWorkers) - populate(objectMap, "optimizer", i.Optimizer) - populate(objectMap, "randomSeed", i.RandomSeed) - populate(objectMap, "stepLRGamma", i.StepLRGamma) - populate(objectMap, "stepLRStepSize", i.StepLRStepSize) - populate(objectMap, "tileGridSize", i.TileGridSize) - populate(objectMap, "tileOverlapRatio", i.TileOverlapRatio) - populate(objectMap, "tilePredictionsNmsThreshold", i.TilePredictionsNmsThreshold) - populate(objectMap, "trainingBatchSize", i.TrainingBatchSize) - populate(objectMap, "validationBatchSize", i.ValidationBatchSize) - populate(objectMap, "validationIouThreshold", i.ValidationIouThreshold) - populate(objectMap, "validationMetricType", i.ValidationMetricType) - populate(objectMap, "warmupCosineLRCycles", i.WarmupCosineLRCycles) - populate(objectMap, "warmupCosineLRWarmupEpochs", i.WarmupCosineLRWarmupEpochs) - populate(objectMap, "weightDecay", i.WeightDecay) + populate(objectMap, "nextLink", f.NextLink) + populate(objectMap, "value", f.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ImageModelDistributionSettingsObjectDetection. -func (i *ImageModelDistributionSettingsObjectDetection) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type FeaturestoreEntityVersionResourceArmPaginatedResult. +func (f *FeaturestoreEntityVersionResourceArmPaginatedResult) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) + return fmt.Errorf("unmarshalling type %T: %v", f, err) } for key, val := range rawMsg { var err error switch key { - case "amsGradient": - err = unpopulate(val, "AmsGradient", &i.AmsGradient) + case "nextLink": + err = unpopulate(val, "NextLink", &f.NextLink) delete(rawMsg, key) - case "augmentations": - err = unpopulate(val, "Augmentations", &i.Augmentations) + case "value": + err = unpopulate(val, "Value", &f.Value) delete(rawMsg, key) - case "beta1": - err = unpopulate(val, "Beta1", &i.Beta1) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FeaturizationSettings. +func (f FeaturizationSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "datasetLanguage", f.DatasetLanguage) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FeaturizationSettings. +func (f *FeaturizationSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "datasetLanguage": + err = unpopulate(val, "DatasetLanguage", &f.DatasetLanguage) delete(rawMsg, key) - case "beta2": - err = unpopulate(val, "Beta2", &i.Beta2) - delete(rawMsg, key) - case "boxDetectionsPerImage": - err = unpopulate(val, "BoxDetectionsPerImage", &i.BoxDetectionsPerImage) - delete(rawMsg, key) - case "boxScoreThreshold": - err = unpopulate(val, "BoxScoreThreshold", &i.BoxScoreThreshold) - delete(rawMsg, key) - case "distributed": - err = unpopulate(val, "Distributed", &i.Distributed) - delete(rawMsg, key) - case "earlyStopping": - err = unpopulate(val, "EarlyStopping", &i.EarlyStopping) - delete(rawMsg, key) - case "earlyStoppingDelay": - err = unpopulate(val, "EarlyStoppingDelay", &i.EarlyStoppingDelay) - delete(rawMsg, key) - case "earlyStoppingPatience": - err = unpopulate(val, "EarlyStoppingPatience", &i.EarlyStoppingPatience) - delete(rawMsg, key) - case "enableOnnxNormalization": - err = unpopulate(val, "EnableOnnxNormalization", &i.EnableOnnxNormalization) - delete(rawMsg, key) - case "evaluationFrequency": - err = unpopulate(val, "EvaluationFrequency", &i.EvaluationFrequency) - delete(rawMsg, key) - case "gradientAccumulationStep": - err = unpopulate(val, "GradientAccumulationStep", &i.GradientAccumulationStep) - delete(rawMsg, key) - case "imageSize": - err = unpopulate(val, "ImageSize", &i.ImageSize) - delete(rawMsg, key) - case "layersToFreeze": - err = unpopulate(val, "LayersToFreeze", &i.LayersToFreeze) - delete(rawMsg, key) - case "learningRate": - err = unpopulate(val, "LearningRate", &i.LearningRate) - delete(rawMsg, key) - case "learningRateScheduler": - err = unpopulate(val, "LearningRateScheduler", &i.LearningRateScheduler) - delete(rawMsg, key) - case "maxSize": - err = unpopulate(val, "MaxSize", &i.MaxSize) - delete(rawMsg, key) - case "minSize": - err = unpopulate(val, "MinSize", &i.MinSize) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FixedInputData. +func (f FixedInputData) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "columns", f.Columns) + populate(objectMap, "dataContext", f.DataContext) + objectMap["inputDataType"] = MonitoringInputDataTypeFixed + populate(objectMap, "jobInputType", f.JobInputType) + populate(objectMap, "uri", f.URI) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FixedInputData. +func (f *FixedInputData) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "columns": + err = unpopulate(val, "Columns", &f.Columns) delete(rawMsg, key) - case "modelName": - err = unpopulate(val, "ModelName", &i.ModelName) + case "dataContext": + err = unpopulate(val, "DataContext", &f.DataContext) delete(rawMsg, key) - case "modelSize": - err = unpopulate(val, "ModelSize", &i.ModelSize) + case "inputDataType": + err = unpopulate(val, "InputDataType", &f.InputDataType) delete(rawMsg, key) - case "momentum": - err = unpopulate(val, "Momentum", &i.Momentum) + case "jobInputType": + err = unpopulate(val, "JobInputType", &f.JobInputType) delete(rawMsg, key) - case "multiScale": - err = unpopulate(val, "MultiScale", &i.MultiScale) + case "uri": + err = unpopulate(val, "URI", &f.URI) delete(rawMsg, key) - case "nesterov": - err = unpopulate(val, "Nesterov", &i.Nesterov) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FlavorData. +func (f FlavorData) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "data", f.Data) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FlavorData. +func (f *FlavorData) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "data": + err = unpopulate(val, "Data", &f.Data) delete(rawMsg, key) - case "nmsIouThreshold": - err = unpopulate(val, "NmsIouThreshold", &i.NmsIouThreshold) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ForecastHorizon. +func (f ForecastHorizon) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["mode"] = f.Mode + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ForecastHorizon. +func (f *ForecastHorizon) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "mode": + err = unpopulate(val, "Mode", &f.Mode) delete(rawMsg, key) - case "numberOfEpochs": - err = unpopulate(val, "NumberOfEpochs", &i.NumberOfEpochs) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Forecasting. +func (f Forecasting) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "cvSplitColumnNames", f.CvSplitColumnNames) + populate(objectMap, "featurizationSettings", f.FeaturizationSettings) + populate(objectMap, "forecastingSettings", f.ForecastingSettings) + populate(objectMap, "limitSettings", f.LimitSettings) + populate(objectMap, "logVerbosity", f.LogVerbosity) + populate(objectMap, "nCrossValidations", f.NCrossValidations) + populate(objectMap, "primaryMetric", f.PrimaryMetric) + populate(objectMap, "targetColumnName", f.TargetColumnName) + objectMap["taskType"] = TaskTypeForecasting + populate(objectMap, "testData", f.TestData) + populate(objectMap, "testDataSize", f.TestDataSize) + populate(objectMap, "trainingData", f.TrainingData) + populate(objectMap, "trainingSettings", f.TrainingSettings) + populate(objectMap, "validationData", f.ValidationData) + populate(objectMap, "validationDataSize", f.ValidationDataSize) + populate(objectMap, "weightColumnName", f.WeightColumnName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Forecasting. +func (f *Forecasting) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "cvSplitColumnNames": + err = unpopulate(val, "CvSplitColumnNames", &f.CvSplitColumnNames) delete(rawMsg, key) - case "numberOfWorkers": - err = unpopulate(val, "NumberOfWorkers", &i.NumberOfWorkers) + case "featurizationSettings": + err = unpopulate(val, "FeaturizationSettings", &f.FeaturizationSettings) delete(rawMsg, key) - case "optimizer": - err = unpopulate(val, "Optimizer", &i.Optimizer) + case "forecastingSettings": + err = unpopulate(val, "ForecastingSettings", &f.ForecastingSettings) delete(rawMsg, key) - case "randomSeed": - err = unpopulate(val, "RandomSeed", &i.RandomSeed) + case "limitSettings": + err = unpopulate(val, "LimitSettings", &f.LimitSettings) delete(rawMsg, key) - case "stepLRGamma": - err = unpopulate(val, "StepLRGamma", &i.StepLRGamma) + case "logVerbosity": + err = unpopulate(val, "LogVerbosity", &f.LogVerbosity) delete(rawMsg, key) - case "stepLRStepSize": - err = unpopulate(val, "StepLRStepSize", &i.StepLRStepSize) + case "nCrossValidations": + f.NCrossValidations, err = unmarshalNCrossValidationsClassification(val) delete(rawMsg, key) - case "tileGridSize": - err = unpopulate(val, "TileGridSize", &i.TileGridSize) + case "primaryMetric": + err = unpopulate(val, "PrimaryMetric", &f.PrimaryMetric) delete(rawMsg, key) - case "tileOverlapRatio": - err = unpopulate(val, "TileOverlapRatio", &i.TileOverlapRatio) + case "targetColumnName": + err = unpopulate(val, "TargetColumnName", &f.TargetColumnName) delete(rawMsg, key) - case "tilePredictionsNmsThreshold": - err = unpopulate(val, "TilePredictionsNmsThreshold", &i.TilePredictionsNmsThreshold) + case "taskType": + err = unpopulate(val, "TaskType", &f.TaskType) delete(rawMsg, key) - case "trainingBatchSize": - err = unpopulate(val, "TrainingBatchSize", &i.TrainingBatchSize) + case "testData": + err = unpopulate(val, "TestData", &f.TestData) delete(rawMsg, key) - case "validationBatchSize": - err = unpopulate(val, "ValidationBatchSize", &i.ValidationBatchSize) + case "testDataSize": + err = unpopulate(val, "TestDataSize", &f.TestDataSize) delete(rawMsg, key) - case "validationIouThreshold": - err = unpopulate(val, "ValidationIouThreshold", &i.ValidationIouThreshold) + case "trainingData": + err = unpopulate(val, "TrainingData", &f.TrainingData) delete(rawMsg, key) - case "validationMetricType": - err = unpopulate(val, "ValidationMetricType", &i.ValidationMetricType) + case "trainingSettings": + err = unpopulate(val, "TrainingSettings", &f.TrainingSettings) delete(rawMsg, key) - case "warmupCosineLRCycles": - err = unpopulate(val, "WarmupCosineLRCycles", &i.WarmupCosineLRCycles) + case "validationData": + err = unpopulate(val, "ValidationData", &f.ValidationData) delete(rawMsg, key) - case "warmupCosineLRWarmupEpochs": - err = unpopulate(val, "WarmupCosineLRWarmupEpochs", &i.WarmupCosineLRWarmupEpochs) + case "validationDataSize": + err = unpopulate(val, "ValidationDataSize", &f.ValidationDataSize) delete(rawMsg, key) - case "weightDecay": - err = unpopulate(val, "WeightDecay", &i.WeightDecay) + case "weightColumnName": + err = unpopulate(val, "WeightColumnName", &f.WeightColumnName) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) + return fmt.Errorf("unmarshalling type %T: %v", f, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ImageModelSettings. -func (i ImageModelSettings) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ForecastingSettings. +func (f ForecastingSettings) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "advancedSettings", i.AdvancedSettings) - populate(objectMap, "amsGradient", i.AmsGradient) - populate(objectMap, "augmentations", i.Augmentations) - populate(objectMap, "beta1", i.Beta1) - populate(objectMap, "beta2", i.Beta2) - populate(objectMap, "checkpointFrequency", i.CheckpointFrequency) - populate(objectMap, "checkpointModel", i.CheckpointModel) - populate(objectMap, "checkpointRunId", i.CheckpointRunID) - populate(objectMap, "distributed", i.Distributed) - populate(objectMap, "earlyStopping", i.EarlyStopping) - populate(objectMap, "earlyStoppingDelay", i.EarlyStoppingDelay) - populate(objectMap, "earlyStoppingPatience", i.EarlyStoppingPatience) - populate(objectMap, "enableOnnxNormalization", i.EnableOnnxNormalization) - populate(objectMap, "evaluationFrequency", i.EvaluationFrequency) - populate(objectMap, "gradientAccumulationStep", i.GradientAccumulationStep) - populate(objectMap, "layersToFreeze", i.LayersToFreeze) - populate(objectMap, "learningRate", i.LearningRate) - populate(objectMap, "learningRateScheduler", i.LearningRateScheduler) - populate(objectMap, "modelName", i.ModelName) - populate(objectMap, "momentum", i.Momentum) - populate(objectMap, "nesterov", i.Nesterov) - populate(objectMap, "numberOfEpochs", i.NumberOfEpochs) - populate(objectMap, "numberOfWorkers", i.NumberOfWorkers) - populate(objectMap, "optimizer", i.Optimizer) - populate(objectMap, "randomSeed", i.RandomSeed) - populate(objectMap, "stepLRGamma", i.StepLRGamma) - populate(objectMap, "stepLRStepSize", i.StepLRStepSize) - populate(objectMap, "trainingBatchSize", i.TrainingBatchSize) - populate(objectMap, "validationBatchSize", i.ValidationBatchSize) - populate(objectMap, "warmupCosineLRCycles", i.WarmupCosineLRCycles) - populate(objectMap, "warmupCosineLRWarmupEpochs", i.WarmupCosineLRWarmupEpochs) - populate(objectMap, "weightDecay", i.WeightDecay) + populate(objectMap, "countryOrRegionForHolidays", f.CountryOrRegionForHolidays) + populate(objectMap, "cvStepSize", f.CvStepSize) + populate(objectMap, "featureLags", f.FeatureLags) + populate(objectMap, "forecastHorizon", f.ForecastHorizon) + populate(objectMap, "frequency", f.Frequency) + populate(objectMap, "seasonality", f.Seasonality) + populate(objectMap, "shortSeriesHandlingConfig", f.ShortSeriesHandlingConfig) + populate(objectMap, "targetAggregateFunction", f.TargetAggregateFunction) + populate(objectMap, "targetLags", f.TargetLags) + populate(objectMap, "targetRollingWindowSize", f.TargetRollingWindowSize) + populate(objectMap, "timeColumnName", f.TimeColumnName) + populate(objectMap, "timeSeriesIdColumnNames", f.TimeSeriesIDColumnNames) + populate(objectMap, "useStl", f.UseStl) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ImageModelSettings. -func (i *ImageModelSettings) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ForecastingSettings. +func (f *ForecastingSettings) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) + return fmt.Errorf("unmarshalling type %T: %v", f, err) } for key, val := range rawMsg { var err error switch key { - case "advancedSettings": - err = unpopulate(val, "AdvancedSettings", &i.AdvancedSettings) - delete(rawMsg, key) - case "amsGradient": - err = unpopulate(val, "AmsGradient", &i.AmsGradient) - delete(rawMsg, key) - case "augmentations": - err = unpopulate(val, "Augmentations", &i.Augmentations) - delete(rawMsg, key) - case "beta1": - err = unpopulate(val, "Beta1", &i.Beta1) - delete(rawMsg, key) - case "beta2": - err = unpopulate(val, "Beta2", &i.Beta2) - delete(rawMsg, key) - case "checkpointFrequency": - err = unpopulate(val, "CheckpointFrequency", &i.CheckpointFrequency) - delete(rawMsg, key) - case "checkpointModel": - err = unpopulate(val, "CheckpointModel", &i.CheckpointModel) + case "countryOrRegionForHolidays": + err = unpopulate(val, "CountryOrRegionForHolidays", &f.CountryOrRegionForHolidays) delete(rawMsg, key) - case "checkpointRunId": - err = unpopulate(val, "CheckpointRunID", &i.CheckpointRunID) + case "cvStepSize": + err = unpopulate(val, "CvStepSize", &f.CvStepSize) delete(rawMsg, key) - case "distributed": - err = unpopulate(val, "Distributed", &i.Distributed) + case "featureLags": + err = unpopulate(val, "FeatureLags", &f.FeatureLags) delete(rawMsg, key) - case "earlyStopping": - err = unpopulate(val, "EarlyStopping", &i.EarlyStopping) + case "forecastHorizon": + f.ForecastHorizon, err = unmarshalForecastHorizonClassification(val) delete(rawMsg, key) - case "earlyStoppingDelay": - err = unpopulate(val, "EarlyStoppingDelay", &i.EarlyStoppingDelay) + case "frequency": + err = unpopulate(val, "Frequency", &f.Frequency) delete(rawMsg, key) - case "earlyStoppingPatience": - err = unpopulate(val, "EarlyStoppingPatience", &i.EarlyStoppingPatience) + case "seasonality": + f.Seasonality, err = unmarshalSeasonalityClassification(val) delete(rawMsg, key) - case "enableOnnxNormalization": - err = unpopulate(val, "EnableOnnxNormalization", &i.EnableOnnxNormalization) + case "shortSeriesHandlingConfig": + err = unpopulate(val, "ShortSeriesHandlingConfig", &f.ShortSeriesHandlingConfig) delete(rawMsg, key) - case "evaluationFrequency": - err = unpopulate(val, "EvaluationFrequency", &i.EvaluationFrequency) + case "targetAggregateFunction": + err = unpopulate(val, "TargetAggregateFunction", &f.TargetAggregateFunction) delete(rawMsg, key) - case "gradientAccumulationStep": - err = unpopulate(val, "GradientAccumulationStep", &i.GradientAccumulationStep) + case "targetLags": + f.TargetLags, err = unmarshalTargetLagsClassification(val) delete(rawMsg, key) - case "layersToFreeze": - err = unpopulate(val, "LayersToFreeze", &i.LayersToFreeze) + case "targetRollingWindowSize": + f.TargetRollingWindowSize, err = unmarshalTargetRollingWindowSizeClassification(val) delete(rawMsg, key) - case "learningRate": - err = unpopulate(val, "LearningRate", &i.LearningRate) + case "timeColumnName": + err = unpopulate(val, "TimeColumnName", &f.TimeColumnName) delete(rawMsg, key) - case "learningRateScheduler": - err = unpopulate(val, "LearningRateScheduler", &i.LearningRateScheduler) + case "timeSeriesIdColumnNames": + err = unpopulate(val, "TimeSeriesIDColumnNames", &f.TimeSeriesIDColumnNames) delete(rawMsg, key) - case "modelName": - err = unpopulate(val, "ModelName", &i.ModelName) + case "useStl": + err = unpopulate(val, "UseStl", &f.UseStl) delete(rawMsg, key) - case "momentum": - err = unpopulate(val, "Momentum", &i.Momentum) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ForecastingTrainingSettings. +func (f ForecastingTrainingSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "allowedTrainingAlgorithms", f.AllowedTrainingAlgorithms) + populate(objectMap, "blockedTrainingAlgorithms", f.BlockedTrainingAlgorithms) + populate(objectMap, "enableDnnTraining", f.EnableDnnTraining) + populate(objectMap, "enableModelExplainability", f.EnableModelExplainability) + populate(objectMap, "enableOnnxCompatibleModels", f.EnableOnnxCompatibleModels) + populate(objectMap, "enableStackEnsemble", f.EnableStackEnsemble) + populate(objectMap, "enableVoteEnsemble", f.EnableVoteEnsemble) + populate(objectMap, "ensembleModelDownloadTimeout", f.EnsembleModelDownloadTimeout) + populate(objectMap, "stackEnsembleSettings", f.StackEnsembleSettings) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ForecastingTrainingSettings. +func (f *ForecastingTrainingSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "allowedTrainingAlgorithms": + err = unpopulate(val, "AllowedTrainingAlgorithms", &f.AllowedTrainingAlgorithms) delete(rawMsg, key) - case "nesterov": - err = unpopulate(val, "Nesterov", &i.Nesterov) + case "blockedTrainingAlgorithms": + err = unpopulate(val, "BlockedTrainingAlgorithms", &f.BlockedTrainingAlgorithms) delete(rawMsg, key) - case "numberOfEpochs": - err = unpopulate(val, "NumberOfEpochs", &i.NumberOfEpochs) + case "enableDnnTraining": + err = unpopulate(val, "EnableDnnTraining", &f.EnableDnnTraining) delete(rawMsg, key) - case "numberOfWorkers": - err = unpopulate(val, "NumberOfWorkers", &i.NumberOfWorkers) + case "enableModelExplainability": + err = unpopulate(val, "EnableModelExplainability", &f.EnableModelExplainability) delete(rawMsg, key) - case "optimizer": - err = unpopulate(val, "Optimizer", &i.Optimizer) + case "enableOnnxCompatibleModels": + err = unpopulate(val, "EnableOnnxCompatibleModels", &f.EnableOnnxCompatibleModels) delete(rawMsg, key) - case "randomSeed": - err = unpopulate(val, "RandomSeed", &i.RandomSeed) + case "enableStackEnsemble": + err = unpopulate(val, "EnableStackEnsemble", &f.EnableStackEnsemble) delete(rawMsg, key) - case "stepLRGamma": - err = unpopulate(val, "StepLRGamma", &i.StepLRGamma) + case "enableVoteEnsemble": + err = unpopulate(val, "EnableVoteEnsemble", &f.EnableVoteEnsemble) delete(rawMsg, key) - case "stepLRStepSize": - err = unpopulate(val, "StepLRStepSize", &i.StepLRStepSize) + case "ensembleModelDownloadTimeout": + err = unpopulate(val, "EnsembleModelDownloadTimeout", &f.EnsembleModelDownloadTimeout) delete(rawMsg, key) - case "trainingBatchSize": - err = unpopulate(val, "TrainingBatchSize", &i.TrainingBatchSize) + case "stackEnsembleSettings": + err = unpopulate(val, "StackEnsembleSettings", &f.StackEnsembleSettings) delete(rawMsg, key) - case "validationBatchSize": - err = unpopulate(val, "ValidationBatchSize", &i.ValidationBatchSize) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FqdnOutboundRule. +func (f FqdnOutboundRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "category", f.Category) + populate(objectMap, "destination", f.Destination) + populate(objectMap, "status", f.Status) + objectMap["type"] = RuleTypeFQDN + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FqdnOutboundRule. +func (f *FqdnOutboundRule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "category": + err = unpopulate(val, "Category", &f.Category) delete(rawMsg, key) - case "warmupCosineLRCycles": - err = unpopulate(val, "WarmupCosineLRCycles", &i.WarmupCosineLRCycles) + case "destination": + err = unpopulate(val, "Destination", &f.Destination) delete(rawMsg, key) - case "warmupCosineLRWarmupEpochs": - err = unpopulate(val, "WarmupCosineLRWarmupEpochs", &i.WarmupCosineLRWarmupEpochs) + case "status": + err = unpopulate(val, "Status", &f.Status) delete(rawMsg, key) - case "weightDecay": - err = unpopulate(val, "WeightDecay", &i.WeightDecay) + case "type": + err = unpopulate(val, "Type", &f.Type) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) + return fmt.Errorf("unmarshalling type %T: %v", f, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ImageModelSettingsClassification. -func (i ImageModelSettingsClassification) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type GetBlobReferenceForConsumptionDto. +func (g GetBlobReferenceForConsumptionDto) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "advancedSettings", i.AdvancedSettings) - populate(objectMap, "amsGradient", i.AmsGradient) - populate(objectMap, "augmentations", i.Augmentations) - populate(objectMap, "beta1", i.Beta1) - populate(objectMap, "beta2", i.Beta2) - populate(objectMap, "checkpointFrequency", i.CheckpointFrequency) - populate(objectMap, "checkpointModel", i.CheckpointModel) - populate(objectMap, "checkpointRunId", i.CheckpointRunID) - populate(objectMap, "distributed", i.Distributed) - populate(objectMap, "earlyStopping", i.EarlyStopping) - populate(objectMap, "earlyStoppingDelay", i.EarlyStoppingDelay) - populate(objectMap, "earlyStoppingPatience", i.EarlyStoppingPatience) - populate(objectMap, "enableOnnxNormalization", i.EnableOnnxNormalization) - populate(objectMap, "evaluationFrequency", i.EvaluationFrequency) - populate(objectMap, "gradientAccumulationStep", i.GradientAccumulationStep) - populate(objectMap, "layersToFreeze", i.LayersToFreeze) - populate(objectMap, "learningRate", i.LearningRate) - populate(objectMap, "learningRateScheduler", i.LearningRateScheduler) - populate(objectMap, "modelName", i.ModelName) - populate(objectMap, "momentum", i.Momentum) - populate(objectMap, "nesterov", i.Nesterov) - populate(objectMap, "numberOfEpochs", i.NumberOfEpochs) - populate(objectMap, "numberOfWorkers", i.NumberOfWorkers) - populate(objectMap, "optimizer", i.Optimizer) - populate(objectMap, "randomSeed", i.RandomSeed) - populate(objectMap, "stepLRGamma", i.StepLRGamma) - populate(objectMap, "stepLRStepSize", i.StepLRStepSize) - populate(objectMap, "trainingBatchSize", i.TrainingBatchSize) - populate(objectMap, "trainingCropSize", i.TrainingCropSize) - populate(objectMap, "validationBatchSize", i.ValidationBatchSize) - populate(objectMap, "validationCropSize", i.ValidationCropSize) - populate(objectMap, "validationResizeSize", i.ValidationResizeSize) - populate(objectMap, "warmupCosineLRCycles", i.WarmupCosineLRCycles) - populate(objectMap, "warmupCosineLRWarmupEpochs", i.WarmupCosineLRWarmupEpochs) - populate(objectMap, "weightDecay", i.WeightDecay) - populate(objectMap, "weightedLoss", i.WeightedLoss) + populate(objectMap, "blobUri", g.BlobURI) + populate(objectMap, "credential", g.Credential) + populate(objectMap, "storageAccountArmId", g.StorageAccountArmID) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ImageModelSettingsClassification. -func (i *ImageModelSettingsClassification) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type GetBlobReferenceForConsumptionDto. +func (g *GetBlobReferenceForConsumptionDto) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) + return fmt.Errorf("unmarshalling type %T: %v", g, err) } for key, val := range rawMsg { var err error switch key { - case "advancedSettings": - err = unpopulate(val, "AdvancedSettings", &i.AdvancedSettings) + case "blobUri": + err = unpopulate(val, "BlobURI", &g.BlobURI) delete(rawMsg, key) - case "amsGradient": - err = unpopulate(val, "AmsGradient", &i.AmsGradient) + case "credential": + g.Credential, err = unmarshalDataReferenceCredentialClassification(val) delete(rawMsg, key) - case "augmentations": - err = unpopulate(val, "Augmentations", &i.Augmentations) + case "storageAccountArmId": + err = unpopulate(val, "StorageAccountArmID", &g.StorageAccountArmID) delete(rawMsg, key) - case "beta1": - err = unpopulate(val, "Beta1", &i.Beta1) - delete(rawMsg, key) - case "beta2": - err = unpopulate(val, "Beta2", &i.Beta2) - delete(rawMsg, key) - case "checkpointFrequency": - err = unpopulate(val, "CheckpointFrequency", &i.CheckpointFrequency) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GetBlobReferenceSASRequestDto. +func (g GetBlobReferenceSASRequestDto) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "assetId", g.AssetID) + populate(objectMap, "blobUri", g.BlobURI) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GetBlobReferenceSASRequestDto. +func (g *GetBlobReferenceSASRequestDto) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "assetId": + err = unpopulate(val, "AssetID", &g.AssetID) delete(rawMsg, key) - case "checkpointModel": - err = unpopulate(val, "CheckpointModel", &i.CheckpointModel) + case "blobUri": + err = unpopulate(val, "BlobURI", &g.BlobURI) delete(rawMsg, key) - case "checkpointRunId": - err = unpopulate(val, "CheckpointRunID", &i.CheckpointRunID) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GetBlobReferenceSASResponseDto. +func (g GetBlobReferenceSASResponseDto) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "blobReferenceForConsumption", g.BlobReferenceForConsumption) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GetBlobReferenceSASResponseDto. +func (g *GetBlobReferenceSASResponseDto) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "blobReferenceForConsumption": + err = unpopulate(val, "BlobReferenceForConsumption", &g.BlobReferenceForConsumption) delete(rawMsg, key) - case "distributed": - err = unpopulate(val, "Distributed", &i.Distributed) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GridSamplingAlgorithm. +func (g GridSamplingAlgorithm) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["samplingAlgorithmType"] = SamplingAlgorithmTypeGrid + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GridSamplingAlgorithm. +func (g *GridSamplingAlgorithm) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "samplingAlgorithmType": + err = unpopulate(val, "SamplingAlgorithmType", &g.SamplingAlgorithmType) delete(rawMsg, key) - case "earlyStopping": - err = unpopulate(val, "EarlyStopping", &i.EarlyStopping) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HDInsight. +func (h HDInsight) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "computeLocation", h.ComputeLocation) + objectMap["computeType"] = ComputeTypeHDInsight + populateDateTimeRFC3339(objectMap, "createdOn", h.CreatedOn) + populate(objectMap, "description", h.Description) + populate(objectMap, "disableLocalAuth", h.DisableLocalAuth) + populate(objectMap, "isAttachedCompute", h.IsAttachedCompute) + populateDateTimeRFC3339(objectMap, "modifiedOn", h.ModifiedOn) + populate(objectMap, "properties", h.Properties) + populate(objectMap, "provisioningErrors", h.ProvisioningErrors) + populate(objectMap, "provisioningState", h.ProvisioningState) + populate(objectMap, "resourceId", h.ResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HDInsight. +func (h *HDInsight) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "computeLocation": + err = unpopulate(val, "ComputeLocation", &h.ComputeLocation) delete(rawMsg, key) - case "earlyStoppingDelay": - err = unpopulate(val, "EarlyStoppingDelay", &i.EarlyStoppingDelay) + case "computeType": + err = unpopulate(val, "ComputeType", &h.ComputeType) delete(rawMsg, key) - case "earlyStoppingPatience": - err = unpopulate(val, "EarlyStoppingPatience", &i.EarlyStoppingPatience) + case "createdOn": + err = unpopulateDateTimeRFC3339(val, "CreatedOn", &h.CreatedOn) delete(rawMsg, key) - case "enableOnnxNormalization": - err = unpopulate(val, "EnableOnnxNormalization", &i.EnableOnnxNormalization) + case "description": + err = unpopulate(val, "Description", &h.Description) delete(rawMsg, key) - case "evaluationFrequency": - err = unpopulate(val, "EvaluationFrequency", &i.EvaluationFrequency) + case "disableLocalAuth": + err = unpopulate(val, "DisableLocalAuth", &h.DisableLocalAuth) delete(rawMsg, key) - case "gradientAccumulationStep": - err = unpopulate(val, "GradientAccumulationStep", &i.GradientAccumulationStep) + case "isAttachedCompute": + err = unpopulate(val, "IsAttachedCompute", &h.IsAttachedCompute) delete(rawMsg, key) - case "layersToFreeze": - err = unpopulate(val, "LayersToFreeze", &i.LayersToFreeze) + case "modifiedOn": + err = unpopulateDateTimeRFC3339(val, "ModifiedOn", &h.ModifiedOn) delete(rawMsg, key) - case "learningRate": - err = unpopulate(val, "LearningRate", &i.LearningRate) + case "properties": + err = unpopulate(val, "Properties", &h.Properties) delete(rawMsg, key) - case "learningRateScheduler": - err = unpopulate(val, "LearningRateScheduler", &i.LearningRateScheduler) + case "provisioningErrors": + err = unpopulate(val, "ProvisioningErrors", &h.ProvisioningErrors) delete(rawMsg, key) - case "modelName": - err = unpopulate(val, "ModelName", &i.ModelName) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &h.ProvisioningState) delete(rawMsg, key) - case "momentum": - err = unpopulate(val, "Momentum", &i.Momentum) + case "resourceId": + err = unpopulate(val, "ResourceID", &h.ResourceID) delete(rawMsg, key) - case "nesterov": - err = unpopulate(val, "Nesterov", &i.Nesterov) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HDInsightProperties. +func (h HDInsightProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "address", h.Address) + populate(objectMap, "administratorAccount", h.AdministratorAccount) + populate(objectMap, "sshPort", h.SSHPort) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HDInsightProperties. +func (h *HDInsightProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "address": + err = unpopulate(val, "Address", &h.Address) delete(rawMsg, key) - case "numberOfEpochs": - err = unpopulate(val, "NumberOfEpochs", &i.NumberOfEpochs) + case "administratorAccount": + err = unpopulate(val, "AdministratorAccount", &h.AdministratorAccount) delete(rawMsg, key) - case "numberOfWorkers": - err = unpopulate(val, "NumberOfWorkers", &i.NumberOfWorkers) + case "sshPort": + err = unpopulate(val, "SSHPort", &h.SSHPort) delete(rawMsg, key) - case "optimizer": - err = unpopulate(val, "Optimizer", &i.Optimizer) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HDInsightSchema. +func (h HDInsightSchema) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", h.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HDInsightSchema. +func (h *HDInsightSchema) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &h.Properties) delete(rawMsg, key) - case "randomSeed": - err = unpopulate(val, "RandomSeed", &i.RandomSeed) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IDAssetReference. +func (i IDAssetReference) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "assetId", i.AssetID) + objectMap["referenceType"] = ReferenceTypeID + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IDAssetReference. +func (i *IDAssetReference) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "assetId": + err = unpopulate(val, "AssetID", &i.AssetID) delete(rawMsg, key) - case "stepLRGamma": - err = unpopulate(val, "StepLRGamma", &i.StepLRGamma) + case "referenceType": + err = unpopulate(val, "ReferenceType", &i.ReferenceType) delete(rawMsg, key) - case "stepLRStepSize": + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IdentityConfiguration. +func (i IdentityConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["identityType"] = i.IdentityType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IdentityConfiguration. +func (i *IdentityConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "identityType": + err = unpopulate(val, "IdentityType", &i.IdentityType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IdentityForCmk. +func (i IdentityForCmk) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "userAssignedIdentity", i.UserAssignedIdentity) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IdentityForCmk. +func (i *IdentityForCmk) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "userAssignedIdentity": + err = unpopulate(val, "UserAssignedIdentity", &i.UserAssignedIdentity) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IdleShutdownSetting. +func (i IdleShutdownSetting) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "idleTimeBeforeShutdown", i.IdleTimeBeforeShutdown) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IdleShutdownSetting. +func (i *IdleShutdownSetting) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "idleTimeBeforeShutdown": + err = unpopulate(val, "IdleTimeBeforeShutdown", &i.IdleTimeBeforeShutdown) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Image. +func (i Image) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "reference", i.Reference) + populate(objectMap, "type", i.Type) + if i.AdditionalProperties != nil { + for key, val := range i.AdditionalProperties { + objectMap[key] = val + } + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Image. +func (i *Image) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "reference": + err = unpopulate(val, "Reference", &i.Reference) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &i.Type) + delete(rawMsg, key) + default: + if i.AdditionalProperties == nil { + i.AdditionalProperties = map[string]any{} + } + if val != nil { + var aux any + err = json.Unmarshal(val, &aux) + i.AdditionalProperties[key] = aux + } + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ImageClassification. +func (i ImageClassification) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "limitSettings", i.LimitSettings) + populate(objectMap, "logVerbosity", i.LogVerbosity) + populate(objectMap, "modelSettings", i.ModelSettings) + populate(objectMap, "primaryMetric", i.PrimaryMetric) + populate(objectMap, "searchSpace", i.SearchSpace) + populate(objectMap, "sweepSettings", i.SweepSettings) + populate(objectMap, "targetColumnName", i.TargetColumnName) + objectMap["taskType"] = TaskTypeImageClassification + populate(objectMap, "trainingData", i.TrainingData) + populate(objectMap, "validationData", i.ValidationData) + populate(objectMap, "validationDataSize", i.ValidationDataSize) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ImageClassification. +func (i *ImageClassification) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "limitSettings": + err = unpopulate(val, "LimitSettings", &i.LimitSettings) + delete(rawMsg, key) + case "logVerbosity": + err = unpopulate(val, "LogVerbosity", &i.LogVerbosity) + delete(rawMsg, key) + case "modelSettings": + err = unpopulate(val, "ModelSettings", &i.ModelSettings) + delete(rawMsg, key) + case "primaryMetric": + err = unpopulate(val, "PrimaryMetric", &i.PrimaryMetric) + delete(rawMsg, key) + case "searchSpace": + err = unpopulate(val, "SearchSpace", &i.SearchSpace) + delete(rawMsg, key) + case "sweepSettings": + err = unpopulate(val, "SweepSettings", &i.SweepSettings) + delete(rawMsg, key) + case "targetColumnName": + err = unpopulate(val, "TargetColumnName", &i.TargetColumnName) + delete(rawMsg, key) + case "taskType": + err = unpopulate(val, "TaskType", &i.TaskType) + delete(rawMsg, key) + case "trainingData": + err = unpopulate(val, "TrainingData", &i.TrainingData) + delete(rawMsg, key) + case "validationData": + err = unpopulate(val, "ValidationData", &i.ValidationData) + delete(rawMsg, key) + case "validationDataSize": + err = unpopulate(val, "ValidationDataSize", &i.ValidationDataSize) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ImageClassificationBase. +func (i ImageClassificationBase) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "limitSettings", i.LimitSettings) + populate(objectMap, "modelSettings", i.ModelSettings) + populate(objectMap, "searchSpace", i.SearchSpace) + populate(objectMap, "sweepSettings", i.SweepSettings) + populate(objectMap, "validationData", i.ValidationData) + populate(objectMap, "validationDataSize", i.ValidationDataSize) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ImageClassificationBase. +func (i *ImageClassificationBase) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "limitSettings": + err = unpopulate(val, "LimitSettings", &i.LimitSettings) + delete(rawMsg, key) + case "modelSettings": + err = unpopulate(val, "ModelSettings", &i.ModelSettings) + delete(rawMsg, key) + case "searchSpace": + err = unpopulate(val, "SearchSpace", &i.SearchSpace) + delete(rawMsg, key) + case "sweepSettings": + err = unpopulate(val, "SweepSettings", &i.SweepSettings) + delete(rawMsg, key) + case "validationData": + err = unpopulate(val, "ValidationData", &i.ValidationData) + delete(rawMsg, key) + case "validationDataSize": + err = unpopulate(val, "ValidationDataSize", &i.ValidationDataSize) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ImageClassificationMultilabel. +func (i ImageClassificationMultilabel) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "limitSettings", i.LimitSettings) + populate(objectMap, "logVerbosity", i.LogVerbosity) + populate(objectMap, "modelSettings", i.ModelSettings) + populate(objectMap, "primaryMetric", i.PrimaryMetric) + populate(objectMap, "searchSpace", i.SearchSpace) + populate(objectMap, "sweepSettings", i.SweepSettings) + populate(objectMap, "targetColumnName", i.TargetColumnName) + objectMap["taskType"] = TaskTypeImageClassificationMultilabel + populate(objectMap, "trainingData", i.TrainingData) + populate(objectMap, "validationData", i.ValidationData) + populate(objectMap, "validationDataSize", i.ValidationDataSize) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ImageClassificationMultilabel. +func (i *ImageClassificationMultilabel) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "limitSettings": + err = unpopulate(val, "LimitSettings", &i.LimitSettings) + delete(rawMsg, key) + case "logVerbosity": + err = unpopulate(val, "LogVerbosity", &i.LogVerbosity) + delete(rawMsg, key) + case "modelSettings": + err = unpopulate(val, "ModelSettings", &i.ModelSettings) + delete(rawMsg, key) + case "primaryMetric": + err = unpopulate(val, "PrimaryMetric", &i.PrimaryMetric) + delete(rawMsg, key) + case "searchSpace": + err = unpopulate(val, "SearchSpace", &i.SearchSpace) + delete(rawMsg, key) + case "sweepSettings": + err = unpopulate(val, "SweepSettings", &i.SweepSettings) + delete(rawMsg, key) + case "targetColumnName": + err = unpopulate(val, "TargetColumnName", &i.TargetColumnName) + delete(rawMsg, key) + case "taskType": + err = unpopulate(val, "TaskType", &i.TaskType) + delete(rawMsg, key) + case "trainingData": + err = unpopulate(val, "TrainingData", &i.TrainingData) + delete(rawMsg, key) + case "validationData": + err = unpopulate(val, "ValidationData", &i.ValidationData) + delete(rawMsg, key) + case "validationDataSize": + err = unpopulate(val, "ValidationDataSize", &i.ValidationDataSize) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ImageInstanceSegmentation. +func (i ImageInstanceSegmentation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "limitSettings", i.LimitSettings) + populate(objectMap, "logVerbosity", i.LogVerbosity) + populate(objectMap, "modelSettings", i.ModelSettings) + populate(objectMap, "primaryMetric", i.PrimaryMetric) + populate(objectMap, "searchSpace", i.SearchSpace) + populate(objectMap, "sweepSettings", i.SweepSettings) + populate(objectMap, "targetColumnName", i.TargetColumnName) + objectMap["taskType"] = TaskTypeImageInstanceSegmentation + populate(objectMap, "trainingData", i.TrainingData) + populate(objectMap, "validationData", i.ValidationData) + populate(objectMap, "validationDataSize", i.ValidationDataSize) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ImageInstanceSegmentation. +func (i *ImageInstanceSegmentation) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "limitSettings": + err = unpopulate(val, "LimitSettings", &i.LimitSettings) + delete(rawMsg, key) + case "logVerbosity": + err = unpopulate(val, "LogVerbosity", &i.LogVerbosity) + delete(rawMsg, key) + case "modelSettings": + err = unpopulate(val, "ModelSettings", &i.ModelSettings) + delete(rawMsg, key) + case "primaryMetric": + err = unpopulate(val, "PrimaryMetric", &i.PrimaryMetric) + delete(rawMsg, key) + case "searchSpace": + err = unpopulate(val, "SearchSpace", &i.SearchSpace) + delete(rawMsg, key) + case "sweepSettings": + err = unpopulate(val, "SweepSettings", &i.SweepSettings) + delete(rawMsg, key) + case "targetColumnName": + err = unpopulate(val, "TargetColumnName", &i.TargetColumnName) + delete(rawMsg, key) + case "taskType": + err = unpopulate(val, "TaskType", &i.TaskType) + delete(rawMsg, key) + case "trainingData": + err = unpopulate(val, "TrainingData", &i.TrainingData) + delete(rawMsg, key) + case "validationData": + err = unpopulate(val, "ValidationData", &i.ValidationData) + delete(rawMsg, key) + case "validationDataSize": + err = unpopulate(val, "ValidationDataSize", &i.ValidationDataSize) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ImageLimitSettings. +func (i ImageLimitSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "maxConcurrentTrials", i.MaxConcurrentTrials) + populate(objectMap, "maxTrials", i.MaxTrials) + populate(objectMap, "timeout", i.Timeout) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ImageLimitSettings. +func (i *ImageLimitSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "maxConcurrentTrials": + err = unpopulate(val, "MaxConcurrentTrials", &i.MaxConcurrentTrials) + delete(rawMsg, key) + case "maxTrials": + err = unpopulate(val, "MaxTrials", &i.MaxTrials) + delete(rawMsg, key) + case "timeout": + err = unpopulate(val, "Timeout", &i.Timeout) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ImageMetadata. +func (i ImageMetadata) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "currentImageVersion", i.CurrentImageVersion) + populate(objectMap, "isLatestOsImageVersion", i.IsLatestOsImageVersion) + populate(objectMap, "latestImageVersion", i.LatestImageVersion) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ImageMetadata. +func (i *ImageMetadata) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "currentImageVersion": + err = unpopulate(val, "CurrentImageVersion", &i.CurrentImageVersion) + delete(rawMsg, key) + case "isLatestOsImageVersion": + err = unpopulate(val, "IsLatestOsImageVersion", &i.IsLatestOsImageVersion) + delete(rawMsg, key) + case "latestImageVersion": + err = unpopulate(val, "LatestImageVersion", &i.LatestImageVersion) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ImageModelDistributionSettings. +func (i ImageModelDistributionSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "amsGradient", i.AmsGradient) + populate(objectMap, "augmentations", i.Augmentations) + populate(objectMap, "beta1", i.Beta1) + populate(objectMap, "beta2", i.Beta2) + populate(objectMap, "distributed", i.Distributed) + populate(objectMap, "earlyStopping", i.EarlyStopping) + populate(objectMap, "earlyStoppingDelay", i.EarlyStoppingDelay) + populate(objectMap, "earlyStoppingPatience", i.EarlyStoppingPatience) + populate(objectMap, "enableOnnxNormalization", i.EnableOnnxNormalization) + populate(objectMap, "evaluationFrequency", i.EvaluationFrequency) + populate(objectMap, "gradientAccumulationStep", i.GradientAccumulationStep) + populate(objectMap, "layersToFreeze", i.LayersToFreeze) + populate(objectMap, "learningRate", i.LearningRate) + populate(objectMap, "learningRateScheduler", i.LearningRateScheduler) + populate(objectMap, "modelName", i.ModelName) + populate(objectMap, "momentum", i.Momentum) + populate(objectMap, "nesterov", i.Nesterov) + populate(objectMap, "numberOfEpochs", i.NumberOfEpochs) + populate(objectMap, "numberOfWorkers", i.NumberOfWorkers) + populate(objectMap, "optimizer", i.Optimizer) + populate(objectMap, "randomSeed", i.RandomSeed) + populate(objectMap, "stepLRGamma", i.StepLRGamma) + populate(objectMap, "stepLRStepSize", i.StepLRStepSize) + populate(objectMap, "trainingBatchSize", i.TrainingBatchSize) + populate(objectMap, "validationBatchSize", i.ValidationBatchSize) + populate(objectMap, "warmupCosineLRCycles", i.WarmupCosineLRCycles) + populate(objectMap, "warmupCosineLRWarmupEpochs", i.WarmupCosineLRWarmupEpochs) + populate(objectMap, "weightDecay", i.WeightDecay) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ImageModelDistributionSettings. +func (i *ImageModelDistributionSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "amsGradient": + err = unpopulate(val, "AmsGradient", &i.AmsGradient) + delete(rawMsg, key) + case "augmentations": + err = unpopulate(val, "Augmentations", &i.Augmentations) + delete(rawMsg, key) + case "beta1": + err = unpopulate(val, "Beta1", &i.Beta1) + delete(rawMsg, key) + case "beta2": + err = unpopulate(val, "Beta2", &i.Beta2) + delete(rawMsg, key) + case "distributed": + err = unpopulate(val, "Distributed", &i.Distributed) + delete(rawMsg, key) + case "earlyStopping": + err = unpopulate(val, "EarlyStopping", &i.EarlyStopping) + delete(rawMsg, key) + case "earlyStoppingDelay": + err = unpopulate(val, "EarlyStoppingDelay", &i.EarlyStoppingDelay) + delete(rawMsg, key) + case "earlyStoppingPatience": + err = unpopulate(val, "EarlyStoppingPatience", &i.EarlyStoppingPatience) + delete(rawMsg, key) + case "enableOnnxNormalization": + err = unpopulate(val, "EnableOnnxNormalization", &i.EnableOnnxNormalization) + delete(rawMsg, key) + case "evaluationFrequency": + err = unpopulate(val, "EvaluationFrequency", &i.EvaluationFrequency) + delete(rawMsg, key) + case "gradientAccumulationStep": + err = unpopulate(val, "GradientAccumulationStep", &i.GradientAccumulationStep) + delete(rawMsg, key) + case "layersToFreeze": + err = unpopulate(val, "LayersToFreeze", &i.LayersToFreeze) + delete(rawMsg, key) + case "learningRate": + err = unpopulate(val, "LearningRate", &i.LearningRate) + delete(rawMsg, key) + case "learningRateScheduler": + err = unpopulate(val, "LearningRateScheduler", &i.LearningRateScheduler) + delete(rawMsg, key) + case "modelName": + err = unpopulate(val, "ModelName", &i.ModelName) + delete(rawMsg, key) + case "momentum": + err = unpopulate(val, "Momentum", &i.Momentum) + delete(rawMsg, key) + case "nesterov": + err = unpopulate(val, "Nesterov", &i.Nesterov) + delete(rawMsg, key) + case "numberOfEpochs": + err = unpopulate(val, "NumberOfEpochs", &i.NumberOfEpochs) + delete(rawMsg, key) + case "numberOfWorkers": + err = unpopulate(val, "NumberOfWorkers", &i.NumberOfWorkers) + delete(rawMsg, key) + case "optimizer": + err = unpopulate(val, "Optimizer", &i.Optimizer) + delete(rawMsg, key) + case "randomSeed": + err = unpopulate(val, "RandomSeed", &i.RandomSeed) + delete(rawMsg, key) + case "stepLRGamma": + err = unpopulate(val, "StepLRGamma", &i.StepLRGamma) + delete(rawMsg, key) + case "stepLRStepSize": + err = unpopulate(val, "StepLRStepSize", &i.StepLRStepSize) + delete(rawMsg, key) + case "trainingBatchSize": + err = unpopulate(val, "TrainingBatchSize", &i.TrainingBatchSize) + delete(rawMsg, key) + case "validationBatchSize": + err = unpopulate(val, "ValidationBatchSize", &i.ValidationBatchSize) + delete(rawMsg, key) + case "warmupCosineLRCycles": + err = unpopulate(val, "WarmupCosineLRCycles", &i.WarmupCosineLRCycles) + delete(rawMsg, key) + case "warmupCosineLRWarmupEpochs": + err = unpopulate(val, "WarmupCosineLRWarmupEpochs", &i.WarmupCosineLRWarmupEpochs) + delete(rawMsg, key) + case "weightDecay": + err = unpopulate(val, "WeightDecay", &i.WeightDecay) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ImageModelDistributionSettingsClassification. +func (i ImageModelDistributionSettingsClassification) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "amsGradient", i.AmsGradient) + populate(objectMap, "augmentations", i.Augmentations) + populate(objectMap, "beta1", i.Beta1) + populate(objectMap, "beta2", i.Beta2) + populate(objectMap, "distributed", i.Distributed) + populate(objectMap, "earlyStopping", i.EarlyStopping) + populate(objectMap, "earlyStoppingDelay", i.EarlyStoppingDelay) + populate(objectMap, "earlyStoppingPatience", i.EarlyStoppingPatience) + populate(objectMap, "enableOnnxNormalization", i.EnableOnnxNormalization) + populate(objectMap, "evaluationFrequency", i.EvaluationFrequency) + populate(objectMap, "gradientAccumulationStep", i.GradientAccumulationStep) + populate(objectMap, "layersToFreeze", i.LayersToFreeze) + populate(objectMap, "learningRate", i.LearningRate) + populate(objectMap, "learningRateScheduler", i.LearningRateScheduler) + populate(objectMap, "modelName", i.ModelName) + populate(objectMap, "momentum", i.Momentum) + populate(objectMap, "nesterov", i.Nesterov) + populate(objectMap, "numberOfEpochs", i.NumberOfEpochs) + populate(objectMap, "numberOfWorkers", i.NumberOfWorkers) + populate(objectMap, "optimizer", i.Optimizer) + populate(objectMap, "randomSeed", i.RandomSeed) + populate(objectMap, "stepLRGamma", i.StepLRGamma) + populate(objectMap, "stepLRStepSize", i.StepLRStepSize) + populate(objectMap, "trainingBatchSize", i.TrainingBatchSize) + populate(objectMap, "trainingCropSize", i.TrainingCropSize) + populate(objectMap, "validationBatchSize", i.ValidationBatchSize) + populate(objectMap, "validationCropSize", i.ValidationCropSize) + populate(objectMap, "validationResizeSize", i.ValidationResizeSize) + populate(objectMap, "warmupCosineLRCycles", i.WarmupCosineLRCycles) + populate(objectMap, "warmupCosineLRWarmupEpochs", i.WarmupCosineLRWarmupEpochs) + populate(objectMap, "weightDecay", i.WeightDecay) + populate(objectMap, "weightedLoss", i.WeightedLoss) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ImageModelDistributionSettingsClassification. +func (i *ImageModelDistributionSettingsClassification) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "amsGradient": + err = unpopulate(val, "AmsGradient", &i.AmsGradient) + delete(rawMsg, key) + case "augmentations": + err = unpopulate(val, "Augmentations", &i.Augmentations) + delete(rawMsg, key) + case "beta1": + err = unpopulate(val, "Beta1", &i.Beta1) + delete(rawMsg, key) + case "beta2": + err = unpopulate(val, "Beta2", &i.Beta2) + delete(rawMsg, key) + case "distributed": + err = unpopulate(val, "Distributed", &i.Distributed) + delete(rawMsg, key) + case "earlyStopping": + err = unpopulate(val, "EarlyStopping", &i.EarlyStopping) + delete(rawMsg, key) + case "earlyStoppingDelay": + err = unpopulate(val, "EarlyStoppingDelay", &i.EarlyStoppingDelay) + delete(rawMsg, key) + case "earlyStoppingPatience": + err = unpopulate(val, "EarlyStoppingPatience", &i.EarlyStoppingPatience) + delete(rawMsg, key) + case "enableOnnxNormalization": + err = unpopulate(val, "EnableOnnxNormalization", &i.EnableOnnxNormalization) + delete(rawMsg, key) + case "evaluationFrequency": + err = unpopulate(val, "EvaluationFrequency", &i.EvaluationFrequency) + delete(rawMsg, key) + case "gradientAccumulationStep": + err = unpopulate(val, "GradientAccumulationStep", &i.GradientAccumulationStep) + delete(rawMsg, key) + case "layersToFreeze": + err = unpopulate(val, "LayersToFreeze", &i.LayersToFreeze) + delete(rawMsg, key) + case "learningRate": + err = unpopulate(val, "LearningRate", &i.LearningRate) + delete(rawMsg, key) + case "learningRateScheduler": + err = unpopulate(val, "LearningRateScheduler", &i.LearningRateScheduler) + delete(rawMsg, key) + case "modelName": + err = unpopulate(val, "ModelName", &i.ModelName) + delete(rawMsg, key) + case "momentum": + err = unpopulate(val, "Momentum", &i.Momentum) + delete(rawMsg, key) + case "nesterov": + err = unpopulate(val, "Nesterov", &i.Nesterov) + delete(rawMsg, key) + case "numberOfEpochs": + err = unpopulate(val, "NumberOfEpochs", &i.NumberOfEpochs) + delete(rawMsg, key) + case "numberOfWorkers": + err = unpopulate(val, "NumberOfWorkers", &i.NumberOfWorkers) + delete(rawMsg, key) + case "optimizer": + err = unpopulate(val, "Optimizer", &i.Optimizer) + delete(rawMsg, key) + case "randomSeed": + err = unpopulate(val, "RandomSeed", &i.RandomSeed) + delete(rawMsg, key) + case "stepLRGamma": + err = unpopulate(val, "StepLRGamma", &i.StepLRGamma) + delete(rawMsg, key) + case "stepLRStepSize": + err = unpopulate(val, "StepLRStepSize", &i.StepLRStepSize) + delete(rawMsg, key) + case "trainingBatchSize": + err = unpopulate(val, "TrainingBatchSize", &i.TrainingBatchSize) + delete(rawMsg, key) + case "trainingCropSize": + err = unpopulate(val, "TrainingCropSize", &i.TrainingCropSize) + delete(rawMsg, key) + case "validationBatchSize": + err = unpopulate(val, "ValidationBatchSize", &i.ValidationBatchSize) + delete(rawMsg, key) + case "validationCropSize": + err = unpopulate(val, "ValidationCropSize", &i.ValidationCropSize) + delete(rawMsg, key) + case "validationResizeSize": + err = unpopulate(val, "ValidationResizeSize", &i.ValidationResizeSize) + delete(rawMsg, key) + case "warmupCosineLRCycles": + err = unpopulate(val, "WarmupCosineLRCycles", &i.WarmupCosineLRCycles) + delete(rawMsg, key) + case "warmupCosineLRWarmupEpochs": + err = unpopulate(val, "WarmupCosineLRWarmupEpochs", &i.WarmupCosineLRWarmupEpochs) + delete(rawMsg, key) + case "weightDecay": + err = unpopulate(val, "WeightDecay", &i.WeightDecay) + delete(rawMsg, key) + case "weightedLoss": + err = unpopulate(val, "WeightedLoss", &i.WeightedLoss) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ImageModelDistributionSettingsObjectDetection. +func (i ImageModelDistributionSettingsObjectDetection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "amsGradient", i.AmsGradient) + populate(objectMap, "augmentations", i.Augmentations) + populate(objectMap, "beta1", i.Beta1) + populate(objectMap, "beta2", i.Beta2) + populate(objectMap, "boxDetectionsPerImage", i.BoxDetectionsPerImage) + populate(objectMap, "boxScoreThreshold", i.BoxScoreThreshold) + populate(objectMap, "distributed", i.Distributed) + populate(objectMap, "earlyStopping", i.EarlyStopping) + populate(objectMap, "earlyStoppingDelay", i.EarlyStoppingDelay) + populate(objectMap, "earlyStoppingPatience", i.EarlyStoppingPatience) + populate(objectMap, "enableOnnxNormalization", i.EnableOnnxNormalization) + populate(objectMap, "evaluationFrequency", i.EvaluationFrequency) + populate(objectMap, "gradientAccumulationStep", i.GradientAccumulationStep) + populate(objectMap, "imageSize", i.ImageSize) + populate(objectMap, "layersToFreeze", i.LayersToFreeze) + populate(objectMap, "learningRate", i.LearningRate) + populate(objectMap, "learningRateScheduler", i.LearningRateScheduler) + populate(objectMap, "maxSize", i.MaxSize) + populate(objectMap, "minSize", i.MinSize) + populate(objectMap, "modelName", i.ModelName) + populate(objectMap, "modelSize", i.ModelSize) + populate(objectMap, "momentum", i.Momentum) + populate(objectMap, "multiScale", i.MultiScale) + populate(objectMap, "nesterov", i.Nesterov) + populate(objectMap, "nmsIouThreshold", i.NmsIouThreshold) + populate(objectMap, "numberOfEpochs", i.NumberOfEpochs) + populate(objectMap, "numberOfWorkers", i.NumberOfWorkers) + populate(objectMap, "optimizer", i.Optimizer) + populate(objectMap, "randomSeed", i.RandomSeed) + populate(objectMap, "stepLRGamma", i.StepLRGamma) + populate(objectMap, "stepLRStepSize", i.StepLRStepSize) + populate(objectMap, "tileGridSize", i.TileGridSize) + populate(objectMap, "tileOverlapRatio", i.TileOverlapRatio) + populate(objectMap, "tilePredictionsNmsThreshold", i.TilePredictionsNmsThreshold) + populate(objectMap, "trainingBatchSize", i.TrainingBatchSize) + populate(objectMap, "validationBatchSize", i.ValidationBatchSize) + populate(objectMap, "validationIouThreshold", i.ValidationIouThreshold) + populate(objectMap, "validationMetricType", i.ValidationMetricType) + populate(objectMap, "warmupCosineLRCycles", i.WarmupCosineLRCycles) + populate(objectMap, "warmupCosineLRWarmupEpochs", i.WarmupCosineLRWarmupEpochs) + populate(objectMap, "weightDecay", i.WeightDecay) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ImageModelDistributionSettingsObjectDetection. +func (i *ImageModelDistributionSettingsObjectDetection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "amsGradient": + err = unpopulate(val, "AmsGradient", &i.AmsGradient) + delete(rawMsg, key) + case "augmentations": + err = unpopulate(val, "Augmentations", &i.Augmentations) + delete(rawMsg, key) + case "beta1": + err = unpopulate(val, "Beta1", &i.Beta1) + delete(rawMsg, key) + case "beta2": + err = unpopulate(val, "Beta2", &i.Beta2) + delete(rawMsg, key) + case "boxDetectionsPerImage": + err = unpopulate(val, "BoxDetectionsPerImage", &i.BoxDetectionsPerImage) + delete(rawMsg, key) + case "boxScoreThreshold": + err = unpopulate(val, "BoxScoreThreshold", &i.BoxScoreThreshold) + delete(rawMsg, key) + case "distributed": + err = unpopulate(val, "Distributed", &i.Distributed) + delete(rawMsg, key) + case "earlyStopping": + err = unpopulate(val, "EarlyStopping", &i.EarlyStopping) + delete(rawMsg, key) + case "earlyStoppingDelay": + err = unpopulate(val, "EarlyStoppingDelay", &i.EarlyStoppingDelay) + delete(rawMsg, key) + case "earlyStoppingPatience": + err = unpopulate(val, "EarlyStoppingPatience", &i.EarlyStoppingPatience) + delete(rawMsg, key) + case "enableOnnxNormalization": + err = unpopulate(val, "EnableOnnxNormalization", &i.EnableOnnxNormalization) + delete(rawMsg, key) + case "evaluationFrequency": + err = unpopulate(val, "EvaluationFrequency", &i.EvaluationFrequency) + delete(rawMsg, key) + case "gradientAccumulationStep": + err = unpopulate(val, "GradientAccumulationStep", &i.GradientAccumulationStep) + delete(rawMsg, key) + case "imageSize": + err = unpopulate(val, "ImageSize", &i.ImageSize) + delete(rawMsg, key) + case "layersToFreeze": + err = unpopulate(val, "LayersToFreeze", &i.LayersToFreeze) + delete(rawMsg, key) + case "learningRate": + err = unpopulate(val, "LearningRate", &i.LearningRate) + delete(rawMsg, key) + case "learningRateScheduler": + err = unpopulate(val, "LearningRateScheduler", &i.LearningRateScheduler) + delete(rawMsg, key) + case "maxSize": + err = unpopulate(val, "MaxSize", &i.MaxSize) + delete(rawMsg, key) + case "minSize": + err = unpopulate(val, "MinSize", &i.MinSize) + delete(rawMsg, key) + case "modelName": + err = unpopulate(val, "ModelName", &i.ModelName) + delete(rawMsg, key) + case "modelSize": + err = unpopulate(val, "ModelSize", &i.ModelSize) + delete(rawMsg, key) + case "momentum": + err = unpopulate(val, "Momentum", &i.Momentum) + delete(rawMsg, key) + case "multiScale": + err = unpopulate(val, "MultiScale", &i.MultiScale) + delete(rawMsg, key) + case "nesterov": + err = unpopulate(val, "Nesterov", &i.Nesterov) + delete(rawMsg, key) + case "nmsIouThreshold": + err = unpopulate(val, "NmsIouThreshold", &i.NmsIouThreshold) + delete(rawMsg, key) + case "numberOfEpochs": + err = unpopulate(val, "NumberOfEpochs", &i.NumberOfEpochs) + delete(rawMsg, key) + case "numberOfWorkers": + err = unpopulate(val, "NumberOfWorkers", &i.NumberOfWorkers) + delete(rawMsg, key) + case "optimizer": + err = unpopulate(val, "Optimizer", &i.Optimizer) + delete(rawMsg, key) + case "randomSeed": + err = unpopulate(val, "RandomSeed", &i.RandomSeed) + delete(rawMsg, key) + case "stepLRGamma": + err = unpopulate(val, "StepLRGamma", &i.StepLRGamma) + delete(rawMsg, key) + case "stepLRStepSize": + err = unpopulate(val, "StepLRStepSize", &i.StepLRStepSize) + delete(rawMsg, key) + case "tileGridSize": + err = unpopulate(val, "TileGridSize", &i.TileGridSize) + delete(rawMsg, key) + case "tileOverlapRatio": + err = unpopulate(val, "TileOverlapRatio", &i.TileOverlapRatio) + delete(rawMsg, key) + case "tilePredictionsNmsThreshold": + err = unpopulate(val, "TilePredictionsNmsThreshold", &i.TilePredictionsNmsThreshold) + delete(rawMsg, key) + case "trainingBatchSize": + err = unpopulate(val, "TrainingBatchSize", &i.TrainingBatchSize) + delete(rawMsg, key) + case "validationBatchSize": + err = unpopulate(val, "ValidationBatchSize", &i.ValidationBatchSize) + delete(rawMsg, key) + case "validationIouThreshold": + err = unpopulate(val, "ValidationIouThreshold", &i.ValidationIouThreshold) + delete(rawMsg, key) + case "validationMetricType": + err = unpopulate(val, "ValidationMetricType", &i.ValidationMetricType) + delete(rawMsg, key) + case "warmupCosineLRCycles": + err = unpopulate(val, "WarmupCosineLRCycles", &i.WarmupCosineLRCycles) + delete(rawMsg, key) + case "warmupCosineLRWarmupEpochs": + err = unpopulate(val, "WarmupCosineLRWarmupEpochs", &i.WarmupCosineLRWarmupEpochs) + delete(rawMsg, key) + case "weightDecay": + err = unpopulate(val, "WeightDecay", &i.WeightDecay) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ImageModelSettings. +func (i ImageModelSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "advancedSettings", i.AdvancedSettings) + populate(objectMap, "amsGradient", i.AmsGradient) + populate(objectMap, "augmentations", i.Augmentations) + populate(objectMap, "beta1", i.Beta1) + populate(objectMap, "beta2", i.Beta2) + populate(objectMap, "checkpointFrequency", i.CheckpointFrequency) + populate(objectMap, "checkpointModel", i.CheckpointModel) + populate(objectMap, "checkpointRunId", i.CheckpointRunID) + populate(objectMap, "distributed", i.Distributed) + populate(objectMap, "earlyStopping", i.EarlyStopping) + populate(objectMap, "earlyStoppingDelay", i.EarlyStoppingDelay) + populate(objectMap, "earlyStoppingPatience", i.EarlyStoppingPatience) + populate(objectMap, "enableOnnxNormalization", i.EnableOnnxNormalization) + populate(objectMap, "evaluationFrequency", i.EvaluationFrequency) + populate(objectMap, "gradientAccumulationStep", i.GradientAccumulationStep) + populate(objectMap, "layersToFreeze", i.LayersToFreeze) + populate(objectMap, "learningRate", i.LearningRate) + populate(objectMap, "learningRateScheduler", i.LearningRateScheduler) + populate(objectMap, "modelName", i.ModelName) + populate(objectMap, "momentum", i.Momentum) + populate(objectMap, "nesterov", i.Nesterov) + populate(objectMap, "numberOfEpochs", i.NumberOfEpochs) + populate(objectMap, "numberOfWorkers", i.NumberOfWorkers) + populate(objectMap, "optimizer", i.Optimizer) + populate(objectMap, "randomSeed", i.RandomSeed) + populate(objectMap, "stepLRGamma", i.StepLRGamma) + populate(objectMap, "stepLRStepSize", i.StepLRStepSize) + populate(objectMap, "trainingBatchSize", i.TrainingBatchSize) + populate(objectMap, "validationBatchSize", i.ValidationBatchSize) + populate(objectMap, "warmupCosineLRCycles", i.WarmupCosineLRCycles) + populate(objectMap, "warmupCosineLRWarmupEpochs", i.WarmupCosineLRWarmupEpochs) + populate(objectMap, "weightDecay", i.WeightDecay) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ImageModelSettings. +func (i *ImageModelSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "advancedSettings": + err = unpopulate(val, "AdvancedSettings", &i.AdvancedSettings) + delete(rawMsg, key) + case "amsGradient": + err = unpopulate(val, "AmsGradient", &i.AmsGradient) + delete(rawMsg, key) + case "augmentations": + err = unpopulate(val, "Augmentations", &i.Augmentations) + delete(rawMsg, key) + case "beta1": + err = unpopulate(val, "Beta1", &i.Beta1) + delete(rawMsg, key) + case "beta2": + err = unpopulate(val, "Beta2", &i.Beta2) + delete(rawMsg, key) + case "checkpointFrequency": + err = unpopulate(val, "CheckpointFrequency", &i.CheckpointFrequency) + delete(rawMsg, key) + case "checkpointModel": + err = unpopulate(val, "CheckpointModel", &i.CheckpointModel) + delete(rawMsg, key) + case "checkpointRunId": + err = unpopulate(val, "CheckpointRunID", &i.CheckpointRunID) + delete(rawMsg, key) + case "distributed": + err = unpopulate(val, "Distributed", &i.Distributed) + delete(rawMsg, key) + case "earlyStopping": + err = unpopulate(val, "EarlyStopping", &i.EarlyStopping) + delete(rawMsg, key) + case "earlyStoppingDelay": + err = unpopulate(val, "EarlyStoppingDelay", &i.EarlyStoppingDelay) + delete(rawMsg, key) + case "earlyStoppingPatience": + err = unpopulate(val, "EarlyStoppingPatience", &i.EarlyStoppingPatience) + delete(rawMsg, key) + case "enableOnnxNormalization": + err = unpopulate(val, "EnableOnnxNormalization", &i.EnableOnnxNormalization) + delete(rawMsg, key) + case "evaluationFrequency": + err = unpopulate(val, "EvaluationFrequency", &i.EvaluationFrequency) + delete(rawMsg, key) + case "gradientAccumulationStep": + err = unpopulate(val, "GradientAccumulationStep", &i.GradientAccumulationStep) + delete(rawMsg, key) + case "layersToFreeze": + err = unpopulate(val, "LayersToFreeze", &i.LayersToFreeze) + delete(rawMsg, key) + case "learningRate": + err = unpopulate(val, "LearningRate", &i.LearningRate) + delete(rawMsg, key) + case "learningRateScheduler": + err = unpopulate(val, "LearningRateScheduler", &i.LearningRateScheduler) + delete(rawMsg, key) + case "modelName": + err = unpopulate(val, "ModelName", &i.ModelName) + delete(rawMsg, key) + case "momentum": + err = unpopulate(val, "Momentum", &i.Momentum) + delete(rawMsg, key) + case "nesterov": + err = unpopulate(val, "Nesterov", &i.Nesterov) + delete(rawMsg, key) + case "numberOfEpochs": + err = unpopulate(val, "NumberOfEpochs", &i.NumberOfEpochs) + delete(rawMsg, key) + case "numberOfWorkers": + err = unpopulate(val, "NumberOfWorkers", &i.NumberOfWorkers) + delete(rawMsg, key) + case "optimizer": + err = unpopulate(val, "Optimizer", &i.Optimizer) + delete(rawMsg, key) + case "randomSeed": + err = unpopulate(val, "RandomSeed", &i.RandomSeed) + delete(rawMsg, key) + case "stepLRGamma": + err = unpopulate(val, "StepLRGamma", &i.StepLRGamma) + delete(rawMsg, key) + case "stepLRStepSize": + err = unpopulate(val, "StepLRStepSize", &i.StepLRStepSize) + delete(rawMsg, key) + case "trainingBatchSize": + err = unpopulate(val, "TrainingBatchSize", &i.TrainingBatchSize) + delete(rawMsg, key) + case "validationBatchSize": + err = unpopulate(val, "ValidationBatchSize", &i.ValidationBatchSize) + delete(rawMsg, key) + case "warmupCosineLRCycles": + err = unpopulate(val, "WarmupCosineLRCycles", &i.WarmupCosineLRCycles) + delete(rawMsg, key) + case "warmupCosineLRWarmupEpochs": + err = unpopulate(val, "WarmupCosineLRWarmupEpochs", &i.WarmupCosineLRWarmupEpochs) + delete(rawMsg, key) + case "weightDecay": + err = unpopulate(val, "WeightDecay", &i.WeightDecay) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ImageModelSettingsClassification. +func (i ImageModelSettingsClassification) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "advancedSettings", i.AdvancedSettings) + populate(objectMap, "amsGradient", i.AmsGradient) + populate(objectMap, "augmentations", i.Augmentations) + populate(objectMap, "beta1", i.Beta1) + populate(objectMap, "beta2", i.Beta2) + populate(objectMap, "checkpointFrequency", i.CheckpointFrequency) + populate(objectMap, "checkpointModel", i.CheckpointModel) + populate(objectMap, "checkpointRunId", i.CheckpointRunID) + populate(objectMap, "distributed", i.Distributed) + populate(objectMap, "earlyStopping", i.EarlyStopping) + populate(objectMap, "earlyStoppingDelay", i.EarlyStoppingDelay) + populate(objectMap, "earlyStoppingPatience", i.EarlyStoppingPatience) + populate(objectMap, "enableOnnxNormalization", i.EnableOnnxNormalization) + populate(objectMap, "evaluationFrequency", i.EvaluationFrequency) + populate(objectMap, "gradientAccumulationStep", i.GradientAccumulationStep) + populate(objectMap, "layersToFreeze", i.LayersToFreeze) + populate(objectMap, "learningRate", i.LearningRate) + populate(objectMap, "learningRateScheduler", i.LearningRateScheduler) + populate(objectMap, "modelName", i.ModelName) + populate(objectMap, "momentum", i.Momentum) + populate(objectMap, "nesterov", i.Nesterov) + populate(objectMap, "numberOfEpochs", i.NumberOfEpochs) + populate(objectMap, "numberOfWorkers", i.NumberOfWorkers) + populate(objectMap, "optimizer", i.Optimizer) + populate(objectMap, "randomSeed", i.RandomSeed) + populate(objectMap, "stepLRGamma", i.StepLRGamma) + populate(objectMap, "stepLRStepSize", i.StepLRStepSize) + populate(objectMap, "trainingBatchSize", i.TrainingBatchSize) + populate(objectMap, "trainingCropSize", i.TrainingCropSize) + populate(objectMap, "validationBatchSize", i.ValidationBatchSize) + populate(objectMap, "validationCropSize", i.ValidationCropSize) + populate(objectMap, "validationResizeSize", i.ValidationResizeSize) + populate(objectMap, "warmupCosineLRCycles", i.WarmupCosineLRCycles) + populate(objectMap, "warmupCosineLRWarmupEpochs", i.WarmupCosineLRWarmupEpochs) + populate(objectMap, "weightDecay", i.WeightDecay) + populate(objectMap, "weightedLoss", i.WeightedLoss) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ImageModelSettingsClassification. +func (i *ImageModelSettingsClassification) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "advancedSettings": + err = unpopulate(val, "AdvancedSettings", &i.AdvancedSettings) + delete(rawMsg, key) + case "amsGradient": + err = unpopulate(val, "AmsGradient", &i.AmsGradient) + delete(rawMsg, key) + case "augmentations": + err = unpopulate(val, "Augmentations", &i.Augmentations) + delete(rawMsg, key) + case "beta1": + err = unpopulate(val, "Beta1", &i.Beta1) + delete(rawMsg, key) + case "beta2": + err = unpopulate(val, "Beta2", &i.Beta2) + delete(rawMsg, key) + case "checkpointFrequency": + err = unpopulate(val, "CheckpointFrequency", &i.CheckpointFrequency) + delete(rawMsg, key) + case "checkpointModel": + err = unpopulate(val, "CheckpointModel", &i.CheckpointModel) + delete(rawMsg, key) + case "checkpointRunId": + err = unpopulate(val, "CheckpointRunID", &i.CheckpointRunID) + delete(rawMsg, key) + case "distributed": + err = unpopulate(val, "Distributed", &i.Distributed) + delete(rawMsg, key) + case "earlyStopping": + err = unpopulate(val, "EarlyStopping", &i.EarlyStopping) + delete(rawMsg, key) + case "earlyStoppingDelay": + err = unpopulate(val, "EarlyStoppingDelay", &i.EarlyStoppingDelay) + delete(rawMsg, key) + case "earlyStoppingPatience": + err = unpopulate(val, "EarlyStoppingPatience", &i.EarlyStoppingPatience) + delete(rawMsg, key) + case "enableOnnxNormalization": + err = unpopulate(val, "EnableOnnxNormalization", &i.EnableOnnxNormalization) + delete(rawMsg, key) + case "evaluationFrequency": + err = unpopulate(val, "EvaluationFrequency", &i.EvaluationFrequency) + delete(rawMsg, key) + case "gradientAccumulationStep": + err = unpopulate(val, "GradientAccumulationStep", &i.GradientAccumulationStep) + delete(rawMsg, key) + case "layersToFreeze": + err = unpopulate(val, "LayersToFreeze", &i.LayersToFreeze) + delete(rawMsg, key) + case "learningRate": + err = unpopulate(val, "LearningRate", &i.LearningRate) + delete(rawMsg, key) + case "learningRateScheduler": + err = unpopulate(val, "LearningRateScheduler", &i.LearningRateScheduler) + delete(rawMsg, key) + case "modelName": + err = unpopulate(val, "ModelName", &i.ModelName) + delete(rawMsg, key) + case "momentum": + err = unpopulate(val, "Momentum", &i.Momentum) + delete(rawMsg, key) + case "nesterov": + err = unpopulate(val, "Nesterov", &i.Nesterov) + delete(rawMsg, key) + case "numberOfEpochs": + err = unpopulate(val, "NumberOfEpochs", &i.NumberOfEpochs) + delete(rawMsg, key) + case "numberOfWorkers": + err = unpopulate(val, "NumberOfWorkers", &i.NumberOfWorkers) + delete(rawMsg, key) + case "optimizer": + err = unpopulate(val, "Optimizer", &i.Optimizer) + delete(rawMsg, key) + case "randomSeed": + err = unpopulate(val, "RandomSeed", &i.RandomSeed) + delete(rawMsg, key) + case "stepLRGamma": + err = unpopulate(val, "StepLRGamma", &i.StepLRGamma) + delete(rawMsg, key) + case "stepLRStepSize": + err = unpopulate(val, "StepLRStepSize", &i.StepLRStepSize) + delete(rawMsg, key) + case "trainingBatchSize": + err = unpopulate(val, "TrainingBatchSize", &i.TrainingBatchSize) + delete(rawMsg, key) + case "trainingCropSize": + err = unpopulate(val, "TrainingCropSize", &i.TrainingCropSize) + delete(rawMsg, key) + case "validationBatchSize": + err = unpopulate(val, "ValidationBatchSize", &i.ValidationBatchSize) + delete(rawMsg, key) + case "validationCropSize": + err = unpopulate(val, "ValidationCropSize", &i.ValidationCropSize) + delete(rawMsg, key) + case "validationResizeSize": + err = unpopulate(val, "ValidationResizeSize", &i.ValidationResizeSize) + delete(rawMsg, key) + case "warmupCosineLRCycles": + err = unpopulate(val, "WarmupCosineLRCycles", &i.WarmupCosineLRCycles) + delete(rawMsg, key) + case "warmupCosineLRWarmupEpochs": + err = unpopulate(val, "WarmupCosineLRWarmupEpochs", &i.WarmupCosineLRWarmupEpochs) + delete(rawMsg, key) + case "weightDecay": + err = unpopulate(val, "WeightDecay", &i.WeightDecay) + delete(rawMsg, key) + case "weightedLoss": + err = unpopulate(val, "WeightedLoss", &i.WeightedLoss) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ImageModelSettingsObjectDetection. +func (i ImageModelSettingsObjectDetection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "advancedSettings", i.AdvancedSettings) + populate(objectMap, "amsGradient", i.AmsGradient) + populate(objectMap, "augmentations", i.Augmentations) + populate(objectMap, "beta1", i.Beta1) + populate(objectMap, "beta2", i.Beta2) + populate(objectMap, "boxDetectionsPerImage", i.BoxDetectionsPerImage) + populate(objectMap, "boxScoreThreshold", i.BoxScoreThreshold) + populate(objectMap, "checkpointFrequency", i.CheckpointFrequency) + populate(objectMap, "checkpointModel", i.CheckpointModel) + populate(objectMap, "checkpointRunId", i.CheckpointRunID) + populate(objectMap, "distributed", i.Distributed) + populate(objectMap, "earlyStopping", i.EarlyStopping) + populate(objectMap, "earlyStoppingDelay", i.EarlyStoppingDelay) + populate(objectMap, "earlyStoppingPatience", i.EarlyStoppingPatience) + populate(objectMap, "enableOnnxNormalization", i.EnableOnnxNormalization) + populate(objectMap, "evaluationFrequency", i.EvaluationFrequency) + populate(objectMap, "gradientAccumulationStep", i.GradientAccumulationStep) + populate(objectMap, "imageSize", i.ImageSize) + populate(objectMap, "layersToFreeze", i.LayersToFreeze) + populate(objectMap, "learningRate", i.LearningRate) + populate(objectMap, "learningRateScheduler", i.LearningRateScheduler) + populate(objectMap, "maxSize", i.MaxSize) + populate(objectMap, "minSize", i.MinSize) + populate(objectMap, "modelName", i.ModelName) + populate(objectMap, "modelSize", i.ModelSize) + populate(objectMap, "momentum", i.Momentum) + populate(objectMap, "multiScale", i.MultiScale) + populate(objectMap, "nesterov", i.Nesterov) + populate(objectMap, "nmsIouThreshold", i.NmsIouThreshold) + populate(objectMap, "numberOfEpochs", i.NumberOfEpochs) + populate(objectMap, "numberOfWorkers", i.NumberOfWorkers) + populate(objectMap, "optimizer", i.Optimizer) + populate(objectMap, "randomSeed", i.RandomSeed) + populate(objectMap, "stepLRGamma", i.StepLRGamma) + populate(objectMap, "stepLRStepSize", i.StepLRStepSize) + populate(objectMap, "tileGridSize", i.TileGridSize) + populate(objectMap, "tileOverlapRatio", i.TileOverlapRatio) + populate(objectMap, "tilePredictionsNmsThreshold", i.TilePredictionsNmsThreshold) + populate(objectMap, "trainingBatchSize", i.TrainingBatchSize) + populate(objectMap, "validationBatchSize", i.ValidationBatchSize) + populate(objectMap, "validationIouThreshold", i.ValidationIouThreshold) + populate(objectMap, "validationMetricType", i.ValidationMetricType) + populate(objectMap, "warmupCosineLRCycles", i.WarmupCosineLRCycles) + populate(objectMap, "warmupCosineLRWarmupEpochs", i.WarmupCosineLRWarmupEpochs) + populate(objectMap, "weightDecay", i.WeightDecay) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ImageModelSettingsObjectDetection. +func (i *ImageModelSettingsObjectDetection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "advancedSettings": + err = unpopulate(val, "AdvancedSettings", &i.AdvancedSettings) + delete(rawMsg, key) + case "amsGradient": + err = unpopulate(val, "AmsGradient", &i.AmsGradient) + delete(rawMsg, key) + case "augmentations": + err = unpopulate(val, "Augmentations", &i.Augmentations) + delete(rawMsg, key) + case "beta1": + err = unpopulate(val, "Beta1", &i.Beta1) + delete(rawMsg, key) + case "beta2": + err = unpopulate(val, "Beta2", &i.Beta2) + delete(rawMsg, key) + case "boxDetectionsPerImage": + err = unpopulate(val, "BoxDetectionsPerImage", &i.BoxDetectionsPerImage) + delete(rawMsg, key) + case "boxScoreThreshold": + err = unpopulate(val, "BoxScoreThreshold", &i.BoxScoreThreshold) + delete(rawMsg, key) + case "checkpointFrequency": + err = unpopulate(val, "CheckpointFrequency", &i.CheckpointFrequency) + delete(rawMsg, key) + case "checkpointModel": + err = unpopulate(val, "CheckpointModel", &i.CheckpointModel) + delete(rawMsg, key) + case "checkpointRunId": + err = unpopulate(val, "CheckpointRunID", &i.CheckpointRunID) + delete(rawMsg, key) + case "distributed": + err = unpopulate(val, "Distributed", &i.Distributed) + delete(rawMsg, key) + case "earlyStopping": + err = unpopulate(val, "EarlyStopping", &i.EarlyStopping) + delete(rawMsg, key) + case "earlyStoppingDelay": + err = unpopulate(val, "EarlyStoppingDelay", &i.EarlyStoppingDelay) + delete(rawMsg, key) + case "earlyStoppingPatience": + err = unpopulate(val, "EarlyStoppingPatience", &i.EarlyStoppingPatience) + delete(rawMsg, key) + case "enableOnnxNormalization": + err = unpopulate(val, "EnableOnnxNormalization", &i.EnableOnnxNormalization) + delete(rawMsg, key) + case "evaluationFrequency": + err = unpopulate(val, "EvaluationFrequency", &i.EvaluationFrequency) + delete(rawMsg, key) + case "gradientAccumulationStep": + err = unpopulate(val, "GradientAccumulationStep", &i.GradientAccumulationStep) + delete(rawMsg, key) + case "imageSize": + err = unpopulate(val, "ImageSize", &i.ImageSize) + delete(rawMsg, key) + case "layersToFreeze": + err = unpopulate(val, "LayersToFreeze", &i.LayersToFreeze) + delete(rawMsg, key) + case "learningRate": + err = unpopulate(val, "LearningRate", &i.LearningRate) + delete(rawMsg, key) + case "learningRateScheduler": + err = unpopulate(val, "LearningRateScheduler", &i.LearningRateScheduler) + delete(rawMsg, key) + case "maxSize": + err = unpopulate(val, "MaxSize", &i.MaxSize) + delete(rawMsg, key) + case "minSize": + err = unpopulate(val, "MinSize", &i.MinSize) + delete(rawMsg, key) + case "modelName": + err = unpopulate(val, "ModelName", &i.ModelName) + delete(rawMsg, key) + case "modelSize": + err = unpopulate(val, "ModelSize", &i.ModelSize) + delete(rawMsg, key) + case "momentum": + err = unpopulate(val, "Momentum", &i.Momentum) + delete(rawMsg, key) + case "multiScale": + err = unpopulate(val, "MultiScale", &i.MultiScale) + delete(rawMsg, key) + case "nesterov": + err = unpopulate(val, "Nesterov", &i.Nesterov) + delete(rawMsg, key) + case "nmsIouThreshold": + err = unpopulate(val, "NmsIouThreshold", &i.NmsIouThreshold) + delete(rawMsg, key) + case "numberOfEpochs": + err = unpopulate(val, "NumberOfEpochs", &i.NumberOfEpochs) + delete(rawMsg, key) + case "numberOfWorkers": + err = unpopulate(val, "NumberOfWorkers", &i.NumberOfWorkers) + delete(rawMsg, key) + case "optimizer": + err = unpopulate(val, "Optimizer", &i.Optimizer) + delete(rawMsg, key) + case "randomSeed": + err = unpopulate(val, "RandomSeed", &i.RandomSeed) + delete(rawMsg, key) + case "stepLRGamma": + err = unpopulate(val, "StepLRGamma", &i.StepLRGamma) + delete(rawMsg, key) + case "stepLRStepSize": err = unpopulate(val, "StepLRStepSize", &i.StepLRStepSize) delete(rawMsg, key) - case "trainingBatchSize": - err = unpopulate(val, "TrainingBatchSize", &i.TrainingBatchSize) + case "tileGridSize": + err = unpopulate(val, "TileGridSize", &i.TileGridSize) + delete(rawMsg, key) + case "tileOverlapRatio": + err = unpopulate(val, "TileOverlapRatio", &i.TileOverlapRatio) + delete(rawMsg, key) + case "tilePredictionsNmsThreshold": + err = unpopulate(val, "TilePredictionsNmsThreshold", &i.TilePredictionsNmsThreshold) + delete(rawMsg, key) + case "trainingBatchSize": + err = unpopulate(val, "TrainingBatchSize", &i.TrainingBatchSize) + delete(rawMsg, key) + case "validationBatchSize": + err = unpopulate(val, "ValidationBatchSize", &i.ValidationBatchSize) + delete(rawMsg, key) + case "validationIouThreshold": + err = unpopulate(val, "ValidationIouThreshold", &i.ValidationIouThreshold) + delete(rawMsg, key) + case "validationMetricType": + err = unpopulate(val, "ValidationMetricType", &i.ValidationMetricType) + delete(rawMsg, key) + case "warmupCosineLRCycles": + err = unpopulate(val, "WarmupCosineLRCycles", &i.WarmupCosineLRCycles) + delete(rawMsg, key) + case "warmupCosineLRWarmupEpochs": + err = unpopulate(val, "WarmupCosineLRWarmupEpochs", &i.WarmupCosineLRWarmupEpochs) + delete(rawMsg, key) + case "weightDecay": + err = unpopulate(val, "WeightDecay", &i.WeightDecay) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ImageObjectDetection. +func (i ImageObjectDetection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "limitSettings", i.LimitSettings) + populate(objectMap, "logVerbosity", i.LogVerbosity) + populate(objectMap, "modelSettings", i.ModelSettings) + populate(objectMap, "primaryMetric", i.PrimaryMetric) + populate(objectMap, "searchSpace", i.SearchSpace) + populate(objectMap, "sweepSettings", i.SweepSettings) + populate(objectMap, "targetColumnName", i.TargetColumnName) + objectMap["taskType"] = TaskTypeImageObjectDetection + populate(objectMap, "trainingData", i.TrainingData) + populate(objectMap, "validationData", i.ValidationData) + populate(objectMap, "validationDataSize", i.ValidationDataSize) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ImageObjectDetection. +func (i *ImageObjectDetection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "limitSettings": + err = unpopulate(val, "LimitSettings", &i.LimitSettings) + delete(rawMsg, key) + case "logVerbosity": + err = unpopulate(val, "LogVerbosity", &i.LogVerbosity) + delete(rawMsg, key) + case "modelSettings": + err = unpopulate(val, "ModelSettings", &i.ModelSettings) + delete(rawMsg, key) + case "primaryMetric": + err = unpopulate(val, "PrimaryMetric", &i.PrimaryMetric) + delete(rawMsg, key) + case "searchSpace": + err = unpopulate(val, "SearchSpace", &i.SearchSpace) + delete(rawMsg, key) + case "sweepSettings": + err = unpopulate(val, "SweepSettings", &i.SweepSettings) + delete(rawMsg, key) + case "targetColumnName": + err = unpopulate(val, "TargetColumnName", &i.TargetColumnName) + delete(rawMsg, key) + case "taskType": + err = unpopulate(val, "TaskType", &i.TaskType) + delete(rawMsg, key) + case "trainingData": + err = unpopulate(val, "TrainingData", &i.TrainingData) + delete(rawMsg, key) + case "validationData": + err = unpopulate(val, "ValidationData", &i.ValidationData) + delete(rawMsg, key) + case "validationDataSize": + err = unpopulate(val, "ValidationDataSize", &i.ValidationDataSize) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ImageObjectDetectionBase. +func (i ImageObjectDetectionBase) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "limitSettings", i.LimitSettings) + populate(objectMap, "modelSettings", i.ModelSettings) + populate(objectMap, "searchSpace", i.SearchSpace) + populate(objectMap, "sweepSettings", i.SweepSettings) + populate(objectMap, "validationData", i.ValidationData) + populate(objectMap, "validationDataSize", i.ValidationDataSize) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ImageObjectDetectionBase. +func (i *ImageObjectDetectionBase) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "limitSettings": + err = unpopulate(val, "LimitSettings", &i.LimitSettings) + delete(rawMsg, key) + case "modelSettings": + err = unpopulate(val, "ModelSettings", &i.ModelSettings) + delete(rawMsg, key) + case "searchSpace": + err = unpopulate(val, "SearchSpace", &i.SearchSpace) + delete(rawMsg, key) + case "sweepSettings": + err = unpopulate(val, "SweepSettings", &i.SweepSettings) + delete(rawMsg, key) + case "validationData": + err = unpopulate(val, "ValidationData", &i.ValidationData) + delete(rawMsg, key) + case "validationDataSize": + err = unpopulate(val, "ValidationDataSize", &i.ValidationDataSize) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ImageSweepSettings. +func (i ImageSweepSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "earlyTermination", i.EarlyTermination) + populate(objectMap, "samplingAlgorithm", i.SamplingAlgorithm) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ImageSweepSettings. +func (i *ImageSweepSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "earlyTermination": + i.EarlyTermination, err = unmarshalEarlyTerminationPolicyClassification(val) + delete(rawMsg, key) + case "samplingAlgorithm": + err = unpopulate(val, "SamplingAlgorithm", &i.SamplingAlgorithm) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ImageVertical. +func (i ImageVertical) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "limitSettings", i.LimitSettings) + populate(objectMap, "sweepSettings", i.SweepSettings) + populate(objectMap, "validationData", i.ValidationData) + populate(objectMap, "validationDataSize", i.ValidationDataSize) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ImageVertical. +func (i *ImageVertical) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "limitSettings": + err = unpopulate(val, "LimitSettings", &i.LimitSettings) + delete(rawMsg, key) + case "sweepSettings": + err = unpopulate(val, "SweepSettings", &i.SweepSettings) + delete(rawMsg, key) + case "validationData": + err = unpopulate(val, "ValidationData", &i.ValidationData) + delete(rawMsg, key) + case "validationDataSize": + err = unpopulate(val, "ValidationDataSize", &i.ValidationDataSize) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IndexColumn. +func (i IndexColumn) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "columnName", i.ColumnName) + populate(objectMap, "dataType", i.DataType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IndexColumn. +func (i *IndexColumn) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "columnName": + err = unpopulate(val, "ColumnName", &i.ColumnName) + delete(rawMsg, key) + case "dataType": + err = unpopulate(val, "DataType", &i.DataType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InferenceContainerProperties. +func (i InferenceContainerProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "livenessRoute", i.LivenessRoute) + populate(objectMap, "readinessRoute", i.ReadinessRoute) + populate(objectMap, "scoringRoute", i.ScoringRoute) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InferenceContainerProperties. +func (i *InferenceContainerProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "livenessRoute": + err = unpopulate(val, "LivenessRoute", &i.LivenessRoute) + delete(rawMsg, key) + case "readinessRoute": + err = unpopulate(val, "ReadinessRoute", &i.ReadinessRoute) + delete(rawMsg, key) + case "scoringRoute": + err = unpopulate(val, "ScoringRoute", &i.ScoringRoute) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InstanceTypeSchema. +func (i InstanceTypeSchema) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nodeSelector", i.NodeSelector) + populate(objectMap, "resources", i.Resources) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InstanceTypeSchema. +func (i *InstanceTypeSchema) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nodeSelector": + err = unpopulate(val, "NodeSelector", &i.NodeSelector) + delete(rawMsg, key) + case "resources": + err = unpopulate(val, "Resources", &i.Resources) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InstanceTypeSchemaResources. +func (i InstanceTypeSchemaResources) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "limits", i.Limits) + populate(objectMap, "requests", i.Requests) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InstanceTypeSchemaResources. +func (i *InstanceTypeSchemaResources) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "limits": + err = unpopulate(val, "Limits", &i.Limits) + delete(rawMsg, key) + case "requests": + err = unpopulate(val, "Requests", &i.Requests) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type JobBase. +func (j JobBase) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", j.ID) + populate(objectMap, "name", j.Name) + populate(objectMap, "properties", j.Properties) + populate(objectMap, "systemData", j.SystemData) + populate(objectMap, "type", j.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type JobBase. +func (j *JobBase) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &j.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &j.Name) + delete(rawMsg, key) + case "properties": + j.Properties, err = unmarshalJobBasePropertiesClassification(val) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &j.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &j.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type JobBaseProperties. +func (j JobBaseProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "componentId", j.ComponentID) + populate(objectMap, "computeId", j.ComputeID) + populate(objectMap, "description", j.Description) + populate(objectMap, "displayName", j.DisplayName) + populate(objectMap, "experimentName", j.ExperimentName) + populate(objectMap, "identity", j.Identity) + populate(objectMap, "isArchived", j.IsArchived) + objectMap["jobType"] = j.JobType + populate(objectMap, "notificationSetting", j.NotificationSetting) + populate(objectMap, "properties", j.Properties) + populate(objectMap, "services", j.Services) + populate(objectMap, "status", j.Status) + populate(objectMap, "tags", j.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type JobBaseProperties. +func (j *JobBaseProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "componentId": + err = unpopulate(val, "ComponentID", &j.ComponentID) + delete(rawMsg, key) + case "computeId": + err = unpopulate(val, "ComputeID", &j.ComputeID) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &j.Description) + delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &j.DisplayName) + delete(rawMsg, key) + case "experimentName": + err = unpopulate(val, "ExperimentName", &j.ExperimentName) + delete(rawMsg, key) + case "identity": + j.Identity, err = unmarshalIdentityConfigurationClassification(val) + delete(rawMsg, key) + case "isArchived": + err = unpopulate(val, "IsArchived", &j.IsArchived) + delete(rawMsg, key) + case "jobType": + err = unpopulate(val, "JobType", &j.JobType) + delete(rawMsg, key) + case "notificationSetting": + err = unpopulate(val, "NotificationSetting", &j.NotificationSetting) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &j.Properties) + delete(rawMsg, key) + case "services": + err = unpopulate(val, "Services", &j.Services) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &j.Status) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &j.Tags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type JobBaseResourceArmPaginatedResult. +func (j JobBaseResourceArmPaginatedResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", j.NextLink) + populate(objectMap, "value", j.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type JobBaseResourceArmPaginatedResult. +func (j *JobBaseResourceArmPaginatedResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &j.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &j.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type JobInput. +func (j JobInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", j.Description) + objectMap["jobInputType"] = j.JobInputType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type JobInput. +func (j *JobInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &j.Description) + delete(rawMsg, key) + case "jobInputType": + err = unpopulate(val, "JobInputType", &j.JobInputType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type JobLimits. +func (j JobLimits) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["jobLimitsType"] = j.JobLimitsType + populate(objectMap, "timeout", j.Timeout) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type JobLimits. +func (j *JobLimits) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "jobLimitsType": + err = unpopulate(val, "JobLimitsType", &j.JobLimitsType) + delete(rawMsg, key) + case "timeout": + err = unpopulate(val, "Timeout", &j.Timeout) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type JobOutput. +func (j JobOutput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", j.Description) + objectMap["jobOutputType"] = j.JobOutputType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type JobOutput. +func (j *JobOutput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &j.Description) + delete(rawMsg, key) + case "jobOutputType": + err = unpopulate(val, "JobOutputType", &j.JobOutputType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type JobResourceConfiguration. +func (j JobResourceConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "dockerArgs", j.DockerArgs) + populate(objectMap, "instanceCount", j.InstanceCount) + populate(objectMap, "instanceType", j.InstanceType) + populate(objectMap, "properties", j.Properties) + populate(objectMap, "shmSize", j.ShmSize) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type JobResourceConfiguration. +func (j *JobResourceConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "dockerArgs": + err = unpopulate(val, "DockerArgs", &j.DockerArgs) + delete(rawMsg, key) + case "instanceCount": + err = unpopulate(val, "InstanceCount", &j.InstanceCount) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &j.InstanceType) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &j.Properties) + delete(rawMsg, key) + case "shmSize": + err = unpopulate(val, "ShmSize", &j.ShmSize) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type JobScheduleAction. +func (j JobScheduleAction) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["actionType"] = ScheduleActionTypeCreateJob + populate(objectMap, "jobDefinition", j.JobDefinition) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type JobScheduleAction. +func (j *JobScheduleAction) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "actionType": + err = unpopulate(val, "ActionType", &j.ActionType) + delete(rawMsg, key) + case "jobDefinition": + j.JobDefinition, err = unmarshalJobBasePropertiesClassification(val) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type JobService. +func (j JobService) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "endpoint", j.Endpoint) + populate(objectMap, "errorMessage", j.ErrorMessage) + populate(objectMap, "jobServiceType", j.JobServiceType) + populate(objectMap, "nodes", j.Nodes) + populate(objectMap, "port", j.Port) + populate(objectMap, "properties", j.Properties) + populate(objectMap, "status", j.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type JobService. +func (j *JobService) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "endpoint": + err = unpopulate(val, "Endpoint", &j.Endpoint) + delete(rawMsg, key) + case "errorMessage": + err = unpopulate(val, "ErrorMessage", &j.ErrorMessage) + delete(rawMsg, key) + case "jobServiceType": + err = unpopulate(val, "JobServiceType", &j.JobServiceType) + delete(rawMsg, key) + case "nodes": + j.Nodes, err = unmarshalNodesClassification(val) + delete(rawMsg, key) + case "port": + err = unpopulate(val, "Port", &j.Port) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &j.Properties) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &j.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Kubernetes. +func (k Kubernetes) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "computeLocation", k.ComputeLocation) + objectMap["computeType"] = ComputeTypeKubernetes + populateDateTimeRFC3339(objectMap, "createdOn", k.CreatedOn) + populate(objectMap, "description", k.Description) + populate(objectMap, "disableLocalAuth", k.DisableLocalAuth) + populate(objectMap, "isAttachedCompute", k.IsAttachedCompute) + populateDateTimeRFC3339(objectMap, "modifiedOn", k.ModifiedOn) + populate(objectMap, "properties", k.Properties) + populate(objectMap, "provisioningErrors", k.ProvisioningErrors) + populate(objectMap, "provisioningState", k.ProvisioningState) + populate(objectMap, "resourceId", k.ResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Kubernetes. +func (k *Kubernetes) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "computeLocation": + err = unpopulate(val, "ComputeLocation", &k.ComputeLocation) + delete(rawMsg, key) + case "computeType": + err = unpopulate(val, "ComputeType", &k.ComputeType) + delete(rawMsg, key) + case "createdOn": + err = unpopulateDateTimeRFC3339(val, "CreatedOn", &k.CreatedOn) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &k.Description) + delete(rawMsg, key) + case "disableLocalAuth": + err = unpopulate(val, "DisableLocalAuth", &k.DisableLocalAuth) + delete(rawMsg, key) + case "isAttachedCompute": + err = unpopulate(val, "IsAttachedCompute", &k.IsAttachedCompute) + delete(rawMsg, key) + case "modifiedOn": + err = unpopulateDateTimeRFC3339(val, "ModifiedOn", &k.ModifiedOn) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &k.Properties) + delete(rawMsg, key) + case "provisioningErrors": + err = unpopulate(val, "ProvisioningErrors", &k.ProvisioningErrors) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &k.ProvisioningState) + delete(rawMsg, key) + case "resourceId": + err = unpopulate(val, "ResourceID", &k.ResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type KubernetesOnlineDeployment. +func (k KubernetesOnlineDeployment) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "appInsightsEnabled", k.AppInsightsEnabled) + populate(objectMap, "codeConfiguration", k.CodeConfiguration) + populate(objectMap, "containerResourceRequirements", k.ContainerResourceRequirements) + populate(objectMap, "dataCollector", k.DataCollector) + populate(objectMap, "description", k.Description) + populate(objectMap, "egressPublicNetworkAccess", k.EgressPublicNetworkAccess) + objectMap["endpointComputeType"] = EndpointComputeTypeKubernetes + populate(objectMap, "environmentId", k.EnvironmentID) + populate(objectMap, "environmentVariables", k.EnvironmentVariables) + populate(objectMap, "instanceType", k.InstanceType) + populate(objectMap, "livenessProbe", k.LivenessProbe) + populate(objectMap, "model", k.Model) + populate(objectMap, "modelMountPath", k.ModelMountPath) + populate(objectMap, "properties", k.Properties) + populate(objectMap, "provisioningState", k.ProvisioningState) + populate(objectMap, "readinessProbe", k.ReadinessProbe) + populate(objectMap, "requestSettings", k.RequestSettings) + populate(objectMap, "scaleSettings", k.ScaleSettings) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type KubernetesOnlineDeployment. +func (k *KubernetesOnlineDeployment) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "appInsightsEnabled": + err = unpopulate(val, "AppInsightsEnabled", &k.AppInsightsEnabled) + delete(rawMsg, key) + case "codeConfiguration": + err = unpopulate(val, "CodeConfiguration", &k.CodeConfiguration) + delete(rawMsg, key) + case "containerResourceRequirements": + err = unpopulate(val, "ContainerResourceRequirements", &k.ContainerResourceRequirements) + delete(rawMsg, key) + case "dataCollector": + err = unpopulate(val, "DataCollector", &k.DataCollector) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &k.Description) + delete(rawMsg, key) + case "egressPublicNetworkAccess": + err = unpopulate(val, "EgressPublicNetworkAccess", &k.EgressPublicNetworkAccess) + delete(rawMsg, key) + case "endpointComputeType": + err = unpopulate(val, "EndpointComputeType", &k.EndpointComputeType) + delete(rawMsg, key) + case "environmentId": + err = unpopulate(val, "EnvironmentID", &k.EnvironmentID) + delete(rawMsg, key) + case "environmentVariables": + err = unpopulate(val, "EnvironmentVariables", &k.EnvironmentVariables) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &k.InstanceType) + delete(rawMsg, key) + case "livenessProbe": + err = unpopulate(val, "LivenessProbe", &k.LivenessProbe) + delete(rawMsg, key) + case "model": + err = unpopulate(val, "Model", &k.Model) + delete(rawMsg, key) + case "modelMountPath": + err = unpopulate(val, "ModelMountPath", &k.ModelMountPath) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &k.Properties) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &k.ProvisioningState) + delete(rawMsg, key) + case "readinessProbe": + err = unpopulate(val, "ReadinessProbe", &k.ReadinessProbe) + delete(rawMsg, key) + case "requestSettings": + err = unpopulate(val, "RequestSettings", &k.RequestSettings) + delete(rawMsg, key) + case "scaleSettings": + k.ScaleSettings, err = unmarshalOnlineScaleSettingsClassification(val) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type KubernetesProperties. +func (k KubernetesProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "defaultInstanceType", k.DefaultInstanceType) + populate(objectMap, "extensionInstanceReleaseTrain", k.ExtensionInstanceReleaseTrain) + populate(objectMap, "extensionPrincipalId", k.ExtensionPrincipalID) + populate(objectMap, "instanceTypes", k.InstanceTypes) + populate(objectMap, "namespace", k.Namespace) + populate(objectMap, "relayConnectionString", k.RelayConnectionString) + populate(objectMap, "serviceBusConnectionString", k.ServiceBusConnectionString) + populate(objectMap, "vcName", k.VcName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type KubernetesProperties. +func (k *KubernetesProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "defaultInstanceType": + err = unpopulate(val, "DefaultInstanceType", &k.DefaultInstanceType) + delete(rawMsg, key) + case "extensionInstanceReleaseTrain": + err = unpopulate(val, "ExtensionInstanceReleaseTrain", &k.ExtensionInstanceReleaseTrain) + delete(rawMsg, key) + case "extensionPrincipalId": + err = unpopulate(val, "ExtensionPrincipalID", &k.ExtensionPrincipalID) + delete(rawMsg, key) + case "instanceTypes": + err = unpopulate(val, "InstanceTypes", &k.InstanceTypes) + delete(rawMsg, key) + case "namespace": + err = unpopulate(val, "Namespace", &k.Namespace) + delete(rawMsg, key) + case "relayConnectionString": + err = unpopulate(val, "RelayConnectionString", &k.RelayConnectionString) + delete(rawMsg, key) + case "serviceBusConnectionString": + err = unpopulate(val, "ServiceBusConnectionString", &k.ServiceBusConnectionString) + delete(rawMsg, key) + case "vcName": + err = unpopulate(val, "VcName", &k.VcName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type KubernetesSchema. +func (k KubernetesSchema) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", k.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type KubernetesSchema. +func (k *KubernetesSchema) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &k.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LakeHouseArtifact. +func (l LakeHouseArtifact) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "artifactName", l.ArtifactName) + objectMap["artifactType"] = OneLakeArtifactTypeLakeHouse + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LakeHouseArtifact. +func (l *LakeHouseArtifact) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "artifactName": + err = unpopulate(val, "ArtifactName", &l.ArtifactName) + delete(rawMsg, key) + case "artifactType": + err = unpopulate(val, "ArtifactType", &l.ArtifactType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ListAmlUserFeatureResult. +func (l ListAmlUserFeatureResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", l.NextLink) + populate(objectMap, "value", l.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ListAmlUserFeatureResult. +func (l *ListAmlUserFeatureResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &l.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &l.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ListNotebookKeysResult. +func (l ListNotebookKeysResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "primaryAccessKey", l.PrimaryAccessKey) + populate(objectMap, "secondaryAccessKey", l.SecondaryAccessKey) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ListNotebookKeysResult. +func (l *ListNotebookKeysResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "primaryAccessKey": + err = unpopulate(val, "PrimaryAccessKey", &l.PrimaryAccessKey) + delete(rawMsg, key) + case "secondaryAccessKey": + err = unpopulate(val, "SecondaryAccessKey", &l.SecondaryAccessKey) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ListStorageAccountKeysResult. +func (l ListStorageAccountKeysResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "userStorageKey", l.UserStorageKey) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ListStorageAccountKeysResult. +func (l *ListStorageAccountKeysResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "userStorageKey": + err = unpopulate(val, "UserStorageKey", &l.UserStorageKey) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ListUsagesResult. +func (l ListUsagesResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", l.NextLink) + populate(objectMap, "value", l.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ListUsagesResult. +func (l *ListUsagesResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &l.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &l.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ListWorkspaceKeysResult. +func (l ListWorkspaceKeysResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "appInsightsInstrumentationKey", l.AppInsightsInstrumentationKey) + populate(objectMap, "containerRegistryCredentials", l.ContainerRegistryCredentials) + populate(objectMap, "notebookAccessKeys", l.NotebookAccessKeys) + populate(objectMap, "userStorageKey", l.UserStorageKey) + populate(objectMap, "userStorageResourceId", l.UserStorageResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ListWorkspaceKeysResult. +func (l *ListWorkspaceKeysResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "appInsightsInstrumentationKey": + err = unpopulate(val, "AppInsightsInstrumentationKey", &l.AppInsightsInstrumentationKey) + delete(rawMsg, key) + case "containerRegistryCredentials": + err = unpopulate(val, "ContainerRegistryCredentials", &l.ContainerRegistryCredentials) + delete(rawMsg, key) + case "notebookAccessKeys": + err = unpopulate(val, "NotebookAccessKeys", &l.NotebookAccessKeys) + delete(rawMsg, key) + case "userStorageKey": + err = unpopulate(val, "UserStorageKey", &l.UserStorageKey) + delete(rawMsg, key) + case "userStorageResourceId": + err = unpopulate(val, "UserStorageResourceID", &l.UserStorageResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ListWorkspaceQuotas. +func (l ListWorkspaceQuotas) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", l.NextLink) + populate(objectMap, "value", l.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ListWorkspaceQuotas. +func (l *ListWorkspaceQuotas) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &l.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &l.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LiteralJobInput. +func (l LiteralJobInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", l.Description) + objectMap["jobInputType"] = JobInputTypeLiteral + populate(objectMap, "value", l.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LiteralJobInput. +func (l *LiteralJobInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &l.Description) + delete(rawMsg, key) + case "jobInputType": + err = unpopulate(val, "JobInputType", &l.JobInputType) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &l.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MLFlowModelJobInput. +func (m MLFlowModelJobInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", m.Description) + objectMap["jobInputType"] = JobInputTypeMlflowModel + populate(objectMap, "mode", m.Mode) + populate(objectMap, "uri", m.URI) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MLFlowModelJobInput. +func (m *MLFlowModelJobInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &m.Description) + delete(rawMsg, key) + case "jobInputType": + err = unpopulate(val, "JobInputType", &m.JobInputType) + delete(rawMsg, key) + case "mode": + err = unpopulate(val, "Mode", &m.Mode) + delete(rawMsg, key) + case "uri": + err = unpopulate(val, "URI", &m.URI) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MLFlowModelJobOutput. +func (m MLFlowModelJobOutput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", m.Description) + objectMap["jobOutputType"] = JobOutputTypeMlflowModel + populate(objectMap, "mode", m.Mode) + populate(objectMap, "uri", m.URI) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MLFlowModelJobOutput. +func (m *MLFlowModelJobOutput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &m.Description) + delete(rawMsg, key) + case "jobOutputType": + err = unpopulate(val, "JobOutputType", &m.JobOutputType) + delete(rawMsg, key) + case "mode": + err = unpopulate(val, "Mode", &m.Mode) + delete(rawMsg, key) + case "uri": + err = unpopulate(val, "URI", &m.URI) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MLTableData. +func (m MLTableData) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["dataType"] = DataTypeMltable + populate(objectMap, "dataUri", m.DataURI) + populate(objectMap, "description", m.Description) + populate(objectMap, "isAnonymous", m.IsAnonymous) + populate(objectMap, "isArchived", m.IsArchived) + populate(objectMap, "properties", m.Properties) + populate(objectMap, "referencedUris", m.ReferencedUris) + populate(objectMap, "tags", m.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MLTableData. +func (m *MLTableData) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "dataType": + err = unpopulate(val, "DataType", &m.DataType) + delete(rawMsg, key) + case "dataUri": + err = unpopulate(val, "DataURI", &m.DataURI) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &m.Description) + delete(rawMsg, key) + case "isAnonymous": + err = unpopulate(val, "IsAnonymous", &m.IsAnonymous) + delete(rawMsg, key) + case "isArchived": + err = unpopulate(val, "IsArchived", &m.IsArchived) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) + delete(rawMsg, key) + case "referencedUris": + err = unpopulate(val, "ReferencedUris", &m.ReferencedUris) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &m.Tags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MLTableJobInput. +func (m MLTableJobInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", m.Description) + objectMap["jobInputType"] = JobInputTypeMltable + populate(objectMap, "mode", m.Mode) + populate(objectMap, "uri", m.URI) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MLTableJobInput. +func (m *MLTableJobInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &m.Description) + delete(rawMsg, key) + case "jobInputType": + err = unpopulate(val, "JobInputType", &m.JobInputType) + delete(rawMsg, key) + case "mode": + err = unpopulate(val, "Mode", &m.Mode) + delete(rawMsg, key) + case "uri": + err = unpopulate(val, "URI", &m.URI) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MLTableJobOutput. +func (m MLTableJobOutput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", m.Description) + objectMap["jobOutputType"] = JobOutputTypeMltable + populate(objectMap, "mode", m.Mode) + populate(objectMap, "uri", m.URI) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MLTableJobOutput. +func (m *MLTableJobOutput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &m.Description) + delete(rawMsg, key) + case "jobOutputType": + err = unpopulate(val, "JobOutputType", &m.JobOutputType) + delete(rawMsg, key) + case "mode": + err = unpopulate(val, "Mode", &m.Mode) + delete(rawMsg, key) + case "uri": + err = unpopulate(val, "URI", &m.URI) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedComputeIdentity. +func (m ManagedComputeIdentity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["computeIdentityType"] = MonitorComputeIdentityTypeManagedIdentity + populate(objectMap, "identity", m.Identity) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedComputeIdentity. +func (m *ManagedComputeIdentity) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "computeIdentityType": + err = unpopulate(val, "ComputeIdentityType", &m.ComputeIdentityType) + delete(rawMsg, key) + case "identity": + err = unpopulate(val, "Identity", &m.Identity) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedIdentity. +func (m ManagedIdentity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "clientId", m.ClientID) + objectMap["identityType"] = IdentityConfigurationTypeManaged + populate(objectMap, "objectId", m.ObjectID) + populate(objectMap, "resourceId", m.ResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedIdentity. +func (m *ManagedIdentity) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "clientId": + err = unpopulate(val, "ClientID", &m.ClientID) + delete(rawMsg, key) + case "identityType": + err = unpopulate(val, "IdentityType", &m.IdentityType) + delete(rawMsg, key) + case "objectId": + err = unpopulate(val, "ObjectID", &m.ObjectID) + delete(rawMsg, key) + case "resourceId": + err = unpopulate(val, "ResourceID", &m.ResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedIdentityAuthTypeWorkspaceConnectionProperties. +func (m ManagedIdentityAuthTypeWorkspaceConnectionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["authType"] = ConnectionAuthTypeManagedIdentity + populate(objectMap, "category", m.Category) + populate(objectMap, "createdByWorkspaceArmId", m.CreatedByWorkspaceArmID) + populate(objectMap, "credentials", m.Credentials) + populateDateTimeRFC3339(objectMap, "expiryTime", m.ExpiryTime) + populate(objectMap, "group", m.Group) + populate(objectMap, "isSharedToAll", m.IsSharedToAll) + populate(objectMap, "metadata", m.Metadata) + populate(objectMap, "sharedUserList", m.SharedUserList) + populate(objectMap, "target", m.Target) + populate(objectMap, "value", m.Value) + populate(objectMap, "valueFormat", m.ValueFormat) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedIdentityAuthTypeWorkspaceConnectionProperties. +func (m *ManagedIdentityAuthTypeWorkspaceConnectionProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "authType": + err = unpopulate(val, "AuthType", &m.AuthType) + delete(rawMsg, key) + case "category": + err = unpopulate(val, "Category", &m.Category) + delete(rawMsg, key) + case "createdByWorkspaceArmId": + err = unpopulate(val, "CreatedByWorkspaceArmID", &m.CreatedByWorkspaceArmID) + delete(rawMsg, key) + case "credentials": + err = unpopulate(val, "Credentials", &m.Credentials) + delete(rawMsg, key) + case "expiryTime": + err = unpopulateDateTimeRFC3339(val, "ExpiryTime", &m.ExpiryTime) + delete(rawMsg, key) + case "group": + err = unpopulate(val, "Group", &m.Group) + delete(rawMsg, key) + case "isSharedToAll": + err = unpopulate(val, "IsSharedToAll", &m.IsSharedToAll) + delete(rawMsg, key) + case "metadata": + err = unpopulate(val, "Metadata", &m.Metadata) + delete(rawMsg, key) + case "sharedUserList": + err = unpopulate(val, "SharedUserList", &m.SharedUserList) + delete(rawMsg, key) + case "target": + err = unpopulate(val, "Target", &m.Target) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &m.Value) + delete(rawMsg, key) + case "valueFormat": + err = unpopulate(val, "ValueFormat", &m.ValueFormat) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedIdentityCredential. +func (m ManagedIdentityCredential) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["credentialType"] = DataReferenceCredentialTypeManagedIdentity + populate(objectMap, "managedIdentityType", m.ManagedIdentityType) + populate(objectMap, "userManagedIdentityClientId", m.UserManagedIdentityClientID) + populate(objectMap, "userManagedIdentityPrincipalId", m.UserManagedIdentityPrincipalID) + populate(objectMap, "userManagedIdentityResourceId", m.UserManagedIdentityResourceID) + populate(objectMap, "userManagedIdentityTenantId", m.UserManagedIdentityTenantID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedIdentityCredential. +func (m *ManagedIdentityCredential) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "credentialType": + err = unpopulate(val, "CredentialType", &m.CredentialType) + delete(rawMsg, key) + case "managedIdentityType": + err = unpopulate(val, "ManagedIdentityType", &m.ManagedIdentityType) + delete(rawMsg, key) + case "userManagedIdentityClientId": + err = unpopulate(val, "UserManagedIdentityClientID", &m.UserManagedIdentityClientID) + delete(rawMsg, key) + case "userManagedIdentityPrincipalId": + err = unpopulate(val, "UserManagedIdentityPrincipalID", &m.UserManagedIdentityPrincipalID) + delete(rawMsg, key) + case "userManagedIdentityResourceId": + err = unpopulate(val, "UserManagedIdentityResourceID", &m.UserManagedIdentityResourceID) + delete(rawMsg, key) + case "userManagedIdentityTenantId": + err = unpopulate(val, "UserManagedIdentityTenantID", &m.UserManagedIdentityTenantID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedNetworkProvisionOptions. +func (m ManagedNetworkProvisionOptions) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "includeSpark", m.IncludeSpark) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedNetworkProvisionOptions. +func (m *ManagedNetworkProvisionOptions) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "includeSpark": + err = unpopulate(val, "IncludeSpark", &m.IncludeSpark) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedNetworkProvisionStatus. +func (m ManagedNetworkProvisionStatus) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "sparkReady", m.SparkReady) + populate(objectMap, "status", m.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedNetworkProvisionStatus. +func (m *ManagedNetworkProvisionStatus) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "sparkReady": + err = unpopulate(val, "SparkReady", &m.SparkReady) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &m.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedNetworkSettings. +func (m ManagedNetworkSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "isolationMode", m.IsolationMode) + populate(objectMap, "networkId", m.NetworkID) + populate(objectMap, "outboundRules", m.OutboundRules) + populate(objectMap, "status", m.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedNetworkSettings. +func (m *ManagedNetworkSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "isolationMode": + err = unpopulate(val, "IsolationMode", &m.IsolationMode) + delete(rawMsg, key) + case "networkId": + err = unpopulate(val, "NetworkID", &m.NetworkID) + delete(rawMsg, key) + case "outboundRules": + m.OutboundRules, err = unmarshalOutboundRuleClassificationMap(val) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &m.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedOnlineDeployment. +func (m ManagedOnlineDeployment) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "appInsightsEnabled", m.AppInsightsEnabled) + populate(objectMap, "codeConfiguration", m.CodeConfiguration) + populate(objectMap, "dataCollector", m.DataCollector) + populate(objectMap, "description", m.Description) + populate(objectMap, "egressPublicNetworkAccess", m.EgressPublicNetworkAccess) + objectMap["endpointComputeType"] = EndpointComputeTypeManaged + populate(objectMap, "environmentId", m.EnvironmentID) + populate(objectMap, "environmentVariables", m.EnvironmentVariables) + populate(objectMap, "instanceType", m.InstanceType) + populate(objectMap, "livenessProbe", m.LivenessProbe) + populate(objectMap, "model", m.Model) + populate(objectMap, "modelMountPath", m.ModelMountPath) + populate(objectMap, "properties", m.Properties) + populate(objectMap, "provisioningState", m.ProvisioningState) + populate(objectMap, "readinessProbe", m.ReadinessProbe) + populate(objectMap, "requestSettings", m.RequestSettings) + populate(objectMap, "scaleSettings", m.ScaleSettings) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedOnlineDeployment. +func (m *ManagedOnlineDeployment) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "appInsightsEnabled": + err = unpopulate(val, "AppInsightsEnabled", &m.AppInsightsEnabled) + delete(rawMsg, key) + case "codeConfiguration": + err = unpopulate(val, "CodeConfiguration", &m.CodeConfiguration) + delete(rawMsg, key) + case "dataCollector": + err = unpopulate(val, "DataCollector", &m.DataCollector) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &m.Description) + delete(rawMsg, key) + case "egressPublicNetworkAccess": + err = unpopulate(val, "EgressPublicNetworkAccess", &m.EgressPublicNetworkAccess) + delete(rawMsg, key) + case "endpointComputeType": + err = unpopulate(val, "EndpointComputeType", &m.EndpointComputeType) + delete(rawMsg, key) + case "environmentId": + err = unpopulate(val, "EnvironmentID", &m.EnvironmentID) + delete(rawMsg, key) + case "environmentVariables": + err = unpopulate(val, "EnvironmentVariables", &m.EnvironmentVariables) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &m.InstanceType) + delete(rawMsg, key) + case "livenessProbe": + err = unpopulate(val, "LivenessProbe", &m.LivenessProbe) + delete(rawMsg, key) + case "model": + err = unpopulate(val, "Model", &m.Model) + delete(rawMsg, key) + case "modelMountPath": + err = unpopulate(val, "ModelMountPath", &m.ModelMountPath) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &m.ProvisioningState) + delete(rawMsg, key) + case "readinessProbe": + err = unpopulate(val, "ReadinessProbe", &m.ReadinessProbe) + delete(rawMsg, key) + case "requestSettings": + err = unpopulate(val, "RequestSettings", &m.RequestSettings) + delete(rawMsg, key) + case "scaleSettings": + m.ScaleSettings, err = unmarshalOnlineScaleSettingsClassification(val) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedServiceIdentity. +func (m ManagedServiceIdentity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "principalId", m.PrincipalID) + populate(objectMap, "tenantId", m.TenantID) + populate(objectMap, "type", m.Type) + populate(objectMap, "userAssignedIdentities", m.UserAssignedIdentities) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedServiceIdentity. +func (m *ManagedServiceIdentity) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "principalId": + err = unpopulate(val, "PrincipalID", &m.PrincipalID) + delete(rawMsg, key) + case "tenantId": + err = unpopulate(val, "TenantID", &m.TenantID) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + delete(rawMsg, key) + case "userAssignedIdentities": + err = unpopulate(val, "UserAssignedIdentities", &m.UserAssignedIdentities) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MarketplacePlan. +func (m MarketplacePlan) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "offerId", m.OfferID) + populate(objectMap, "planId", m.PlanID) + populate(objectMap, "publisherId", m.PublisherID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MarketplacePlan. +func (m *MarketplacePlan) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "offerId": + err = unpopulate(val, "OfferID", &m.OfferID) + delete(rawMsg, key) + case "planId": + err = unpopulate(val, "PlanID", &m.PlanID) + delete(rawMsg, key) + case "publisherId": + err = unpopulate(val, "PublisherID", &m.PublisherID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MarketplaceSubscription. +func (m MarketplaceSubscription) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", m.ID) + populate(objectMap, "name", m.Name) + populate(objectMap, "properties", m.Properties) + populate(objectMap, "systemData", m.SystemData) + populate(objectMap, "type", m.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MarketplaceSubscription. +func (m *MarketplaceSubscription) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &m.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &m.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MarketplaceSubscriptionProperties. +func (m MarketplaceSubscriptionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "marketplacePlan", m.MarketplacePlan) + populate(objectMap, "marketplaceSubscriptionStatus", m.MarketplaceSubscriptionStatus) + populate(objectMap, "modelId", m.ModelID) + populate(objectMap, "provisioningState", m.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MarketplaceSubscriptionProperties. +func (m *MarketplaceSubscriptionProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "marketplacePlan": + err = unpopulate(val, "MarketplacePlan", &m.MarketplacePlan) + delete(rawMsg, key) + case "marketplaceSubscriptionStatus": + err = unpopulate(val, "MarketplaceSubscriptionStatus", &m.MarketplaceSubscriptionStatus) + delete(rawMsg, key) + case "modelId": + err = unpopulate(val, "ModelID", &m.ModelID) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &m.ProvisioningState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MarketplaceSubscriptionResourceArmPaginatedResult. +func (m MarketplaceSubscriptionResourceArmPaginatedResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", m.NextLink) + populate(objectMap, "value", m.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MarketplaceSubscriptionResourceArmPaginatedResult. +func (m *MarketplaceSubscriptionResourceArmPaginatedResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &m.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &m.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MaterializationComputeResource. +func (m MaterializationComputeResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "instanceType", m.InstanceType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MaterializationComputeResource. +func (m *MaterializationComputeResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &m.InstanceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MaterializationSettings. +func (m MaterializationSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "notification", m.Notification) + populate(objectMap, "resource", m.Resource) + populate(objectMap, "schedule", m.Schedule) + populate(objectMap, "sparkConfiguration", m.SparkConfiguration) + populate(objectMap, "storeType", m.StoreType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MaterializationSettings. +func (m *MaterializationSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "notification": + err = unpopulate(val, "Notification", &m.Notification) + delete(rawMsg, key) + case "resource": + err = unpopulate(val, "Resource", &m.Resource) + delete(rawMsg, key) + case "schedule": + err = unpopulate(val, "Schedule", &m.Schedule) + delete(rawMsg, key) + case "sparkConfiguration": + err = unpopulate(val, "SparkConfiguration", &m.SparkConfiguration) + delete(rawMsg, key) + case "storeType": + err = unpopulate(val, "StoreType", &m.StoreType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MedianStoppingPolicy. +func (m MedianStoppingPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "delayEvaluation", m.DelayEvaluation) + populate(objectMap, "evaluationInterval", m.EvaluationInterval) + objectMap["policyType"] = EarlyTerminationPolicyTypeMedianStopping + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MedianStoppingPolicy. +func (m *MedianStoppingPolicy) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "delayEvaluation": + err = unpopulate(val, "DelayEvaluation", &m.DelayEvaluation) + delete(rawMsg, key) + case "evaluationInterval": + err = unpopulate(val, "EvaluationInterval", &m.EvaluationInterval) + delete(rawMsg, key) + case "policyType": + err = unpopulate(val, "PolicyType", &m.PolicyType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ModelContainer. +func (m ModelContainer) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", m.ID) + populate(objectMap, "name", m.Name) + populate(objectMap, "properties", m.Properties) + populate(objectMap, "systemData", m.SystemData) + populate(objectMap, "type", m.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ModelContainer. +func (m *ModelContainer) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &m.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &m.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ModelContainerProperties. +func (m ModelContainerProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", m.Description) + populate(objectMap, "isArchived", m.IsArchived) + populate(objectMap, "latestVersion", m.LatestVersion) + populate(objectMap, "nextVersion", m.NextVersion) + populate(objectMap, "properties", m.Properties) + populate(objectMap, "provisioningState", m.ProvisioningState) + populate(objectMap, "tags", m.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ModelContainerProperties. +func (m *ModelContainerProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &m.Description) + delete(rawMsg, key) + case "isArchived": + err = unpopulate(val, "IsArchived", &m.IsArchived) + delete(rawMsg, key) + case "latestVersion": + err = unpopulate(val, "LatestVersion", &m.LatestVersion) + delete(rawMsg, key) + case "nextVersion": + err = unpopulate(val, "NextVersion", &m.NextVersion) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &m.ProvisioningState) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &m.Tags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ModelContainerResourceArmPaginatedResult. +func (m ModelContainerResourceArmPaginatedResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", m.NextLink) + populate(objectMap, "value", m.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ModelContainerResourceArmPaginatedResult. +func (m *ModelContainerResourceArmPaginatedResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &m.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &m.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ModelSettings. +func (m ModelSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "modelId", m.ModelID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ModelSettings. +func (m *ModelSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "modelId": + err = unpopulate(val, "ModelID", &m.ModelID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ModelVersion. +func (m ModelVersion) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", m.ID) + populate(objectMap, "name", m.Name) + populate(objectMap, "properties", m.Properties) + populate(objectMap, "systemData", m.SystemData) + populate(objectMap, "type", m.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ModelVersion. +func (m *ModelVersion) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &m.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &m.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ModelVersionProperties. +func (m ModelVersionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", m.Description) + populate(objectMap, "flavors", m.Flavors) + populate(objectMap, "isAnonymous", m.IsAnonymous) + populate(objectMap, "isArchived", m.IsArchived) + populate(objectMap, "jobName", m.JobName) + populate(objectMap, "modelType", m.ModelType) + populate(objectMap, "modelUri", m.ModelURI) + populate(objectMap, "properties", m.Properties) + populate(objectMap, "provisioningState", m.ProvisioningState) + populate(objectMap, "stage", m.Stage) + populate(objectMap, "tags", m.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ModelVersionProperties. +func (m *ModelVersionProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &m.Description) + delete(rawMsg, key) + case "flavors": + err = unpopulate(val, "Flavors", &m.Flavors) + delete(rawMsg, key) + case "isAnonymous": + err = unpopulate(val, "IsAnonymous", &m.IsAnonymous) + delete(rawMsg, key) + case "isArchived": + err = unpopulate(val, "IsArchived", &m.IsArchived) + delete(rawMsg, key) + case "jobName": + err = unpopulate(val, "JobName", &m.JobName) + delete(rawMsg, key) + case "modelType": + err = unpopulate(val, "ModelType", &m.ModelType) + delete(rawMsg, key) + case "modelUri": + err = unpopulate(val, "ModelURI", &m.ModelURI) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &m.ProvisioningState) + delete(rawMsg, key) + case "stage": + err = unpopulate(val, "Stage", &m.Stage) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &m.Tags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ModelVersionResourceArmPaginatedResult. +func (m ModelVersionResourceArmPaginatedResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", m.NextLink) + populate(objectMap, "value", m.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ModelVersionResourceArmPaginatedResult. +func (m *ModelVersionResourceArmPaginatedResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &m.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &m.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MonitorComputeConfigurationBase. +func (m MonitorComputeConfigurationBase) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["computeType"] = m.ComputeType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MonitorComputeConfigurationBase. +func (m *MonitorComputeConfigurationBase) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "computeType": + err = unpopulate(val, "ComputeType", &m.ComputeType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MonitorComputeIdentityBase. +func (m MonitorComputeIdentityBase) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["computeIdentityType"] = m.ComputeIdentityType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MonitorComputeIdentityBase. +func (m *MonitorComputeIdentityBase) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "computeIdentityType": + err = unpopulate(val, "ComputeIdentityType", &m.ComputeIdentityType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MonitorDefinition. +func (m MonitorDefinition) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "alertNotificationSettings", m.AlertNotificationSettings) + populate(objectMap, "computeConfiguration", m.ComputeConfiguration) + populate(objectMap, "monitoringTarget", m.MonitoringTarget) + populate(objectMap, "signals", m.Signals) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MonitorDefinition. +func (m *MonitorDefinition) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "alertNotificationSettings": + err = unpopulate(val, "AlertNotificationSettings", &m.AlertNotificationSettings) + delete(rawMsg, key) + case "computeConfiguration": + m.ComputeConfiguration, err = unmarshalMonitorComputeConfigurationBaseClassification(val) + delete(rawMsg, key) + case "monitoringTarget": + err = unpopulate(val, "MonitoringTarget", &m.MonitoringTarget) + delete(rawMsg, key) + case "signals": + m.Signals, err = unmarshalMonitoringSignalBaseClassificationMap(val) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MonitorEmailNotificationSettings. +func (m MonitorEmailNotificationSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "emails", m.Emails) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MonitorEmailNotificationSettings. +func (m *MonitorEmailNotificationSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "emails": + err = unpopulate(val, "Emails", &m.Emails) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MonitorNotificationSettings. +func (m MonitorNotificationSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "emailNotificationSettings", m.EmailNotificationSettings) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MonitorNotificationSettings. +func (m *MonitorNotificationSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "emailNotificationSettings": + err = unpopulate(val, "EmailNotificationSettings", &m.EmailNotificationSettings) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MonitorServerlessSparkCompute. +func (m MonitorServerlessSparkCompute) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "computeIdentity", m.ComputeIdentity) + objectMap["computeType"] = MonitorComputeTypeServerlessSpark + populate(objectMap, "instanceType", m.InstanceType) + populate(objectMap, "runtimeVersion", m.RuntimeVersion) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MonitorServerlessSparkCompute. +func (m *MonitorServerlessSparkCompute) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "computeIdentity": + m.ComputeIdentity, err = unmarshalMonitorComputeIdentityBaseClassification(val) + delete(rawMsg, key) + case "computeType": + err = unpopulate(val, "ComputeType", &m.ComputeType) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &m.InstanceType) + delete(rawMsg, key) + case "runtimeVersion": + err = unpopulate(val, "RuntimeVersion", &m.RuntimeVersion) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MonitoringFeatureFilterBase. +func (m MonitoringFeatureFilterBase) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["filterType"] = m.FilterType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MonitoringFeatureFilterBase. +func (m *MonitoringFeatureFilterBase) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "filterType": + err = unpopulate(val, "FilterType", &m.FilterType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MonitoringInputDataBase. +func (m MonitoringInputDataBase) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "columns", m.Columns) + populate(objectMap, "dataContext", m.DataContext) + objectMap["inputDataType"] = m.InputDataType + populate(objectMap, "jobInputType", m.JobInputType) + populate(objectMap, "uri", m.URI) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MonitoringInputDataBase. +func (m *MonitoringInputDataBase) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "columns": + err = unpopulate(val, "Columns", &m.Columns) delete(rawMsg, key) - case "trainingCropSize": - err = unpopulate(val, "TrainingCropSize", &i.TrainingCropSize) + case "dataContext": + err = unpopulate(val, "DataContext", &m.DataContext) delete(rawMsg, key) - case "validationBatchSize": - err = unpopulate(val, "ValidationBatchSize", &i.ValidationBatchSize) + case "inputDataType": + err = unpopulate(val, "InputDataType", &m.InputDataType) delete(rawMsg, key) - case "validationCropSize": - err = unpopulate(val, "ValidationCropSize", &i.ValidationCropSize) + case "jobInputType": + err = unpopulate(val, "JobInputType", &m.JobInputType) delete(rawMsg, key) - case "validationResizeSize": - err = unpopulate(val, "ValidationResizeSize", &i.ValidationResizeSize) + case "uri": + err = unpopulate(val, "URI", &m.URI) delete(rawMsg, key) - case "warmupCosineLRCycles": - err = unpopulate(val, "WarmupCosineLRCycles", &i.WarmupCosineLRCycles) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MonitoringSignalBase. +func (m MonitoringSignalBase) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "notificationTypes", m.NotificationTypes) + populate(objectMap, "properties", m.Properties) + objectMap["signalType"] = m.SignalType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MonitoringSignalBase. +func (m *MonitoringSignalBase) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "notificationTypes": + err = unpopulate(val, "NotificationTypes", &m.NotificationTypes) delete(rawMsg, key) - case "warmupCosineLRWarmupEpochs": - err = unpopulate(val, "WarmupCosineLRWarmupEpochs", &i.WarmupCosineLRWarmupEpochs) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) + delete(rawMsg, key) + case "signalType": + err = unpopulate(val, "SignalType", &m.SignalType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MonitoringTarget. +func (m MonitoringTarget) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "deploymentId", m.DeploymentID) + populate(objectMap, "modelId", m.ModelID) + populate(objectMap, "taskType", m.TaskType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MonitoringTarget. +func (m *MonitoringTarget) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "deploymentId": + err = unpopulate(val, "DeploymentID", &m.DeploymentID) + delete(rawMsg, key) + case "modelId": + err = unpopulate(val, "ModelID", &m.ModelID) + delete(rawMsg, key) + case "taskType": + err = unpopulate(val, "TaskType", &m.TaskType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MonitoringThreshold. +func (m MonitoringThreshold) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", m.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MonitoringThreshold. +func (m *MonitoringThreshold) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &m.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Mpi. +func (m Mpi) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["distributionType"] = DistributionTypeMpi + populate(objectMap, "processCountPerInstance", m.ProcessCountPerInstance) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Mpi. +func (m *Mpi) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "distributionType": + err = unpopulate(val, "DistributionType", &m.DistributionType) + delete(rawMsg, key) + case "processCountPerInstance": + err = unpopulate(val, "ProcessCountPerInstance", &m.ProcessCountPerInstance) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type NCrossValidations. +func (n NCrossValidations) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["mode"] = n.Mode + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NCrossValidations. +func (n *NCrossValidations) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "mode": + err = unpopulate(val, "Mode", &n.Mode) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type NlpVertical. +func (n NlpVertical) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "featurizationSettings", n.FeaturizationSettings) + populate(objectMap, "limitSettings", n.LimitSettings) + populate(objectMap, "validationData", n.ValidationData) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NlpVertical. +func (n *NlpVertical) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "featurizationSettings": + err = unpopulate(val, "FeaturizationSettings", &n.FeaturizationSettings) + delete(rawMsg, key) + case "limitSettings": + err = unpopulate(val, "LimitSettings", &n.LimitSettings) + delete(rawMsg, key) + case "validationData": + err = unpopulate(val, "ValidationData", &n.ValidationData) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type NlpVerticalFeaturizationSettings. +func (n NlpVerticalFeaturizationSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "datasetLanguage", n.DatasetLanguage) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NlpVerticalFeaturizationSettings. +func (n *NlpVerticalFeaturizationSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "datasetLanguage": + err = unpopulate(val, "DatasetLanguage", &n.DatasetLanguage) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type NlpVerticalLimitSettings. +func (n NlpVerticalLimitSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "maxConcurrentTrials", n.MaxConcurrentTrials) + populate(objectMap, "maxTrials", n.MaxTrials) + populate(objectMap, "timeout", n.Timeout) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NlpVerticalLimitSettings. +func (n *NlpVerticalLimitSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "maxConcurrentTrials": + err = unpopulate(val, "MaxConcurrentTrials", &n.MaxConcurrentTrials) delete(rawMsg, key) - case "weightDecay": - err = unpopulate(val, "WeightDecay", &i.WeightDecay) + case "maxTrials": + err = unpopulate(val, "MaxTrials", &n.MaxTrials) delete(rawMsg, key) - case "weightedLoss": - err = unpopulate(val, "WeightedLoss", &i.WeightedLoss) + case "timeout": + err = unpopulate(val, "Timeout", &n.Timeout) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) + return fmt.Errorf("unmarshalling type %T: %v", n, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ImageModelSettingsObjectDetection. -func (i ImageModelSettingsObjectDetection) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type NodeStateCounts. +func (n NodeStateCounts) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "advancedSettings", i.AdvancedSettings) - populate(objectMap, "amsGradient", i.AmsGradient) - populate(objectMap, "augmentations", i.Augmentations) - populate(objectMap, "beta1", i.Beta1) - populate(objectMap, "beta2", i.Beta2) - populate(objectMap, "boxDetectionsPerImage", i.BoxDetectionsPerImage) - populate(objectMap, "boxScoreThreshold", i.BoxScoreThreshold) - populate(objectMap, "checkpointFrequency", i.CheckpointFrequency) - populate(objectMap, "checkpointModel", i.CheckpointModel) - populate(objectMap, "checkpointRunId", i.CheckpointRunID) - populate(objectMap, "distributed", i.Distributed) - populate(objectMap, "earlyStopping", i.EarlyStopping) - populate(objectMap, "earlyStoppingDelay", i.EarlyStoppingDelay) - populate(objectMap, "earlyStoppingPatience", i.EarlyStoppingPatience) - populate(objectMap, "enableOnnxNormalization", i.EnableOnnxNormalization) - populate(objectMap, "evaluationFrequency", i.EvaluationFrequency) - populate(objectMap, "gradientAccumulationStep", i.GradientAccumulationStep) - populate(objectMap, "imageSize", i.ImageSize) - populate(objectMap, "layersToFreeze", i.LayersToFreeze) - populate(objectMap, "learningRate", i.LearningRate) - populate(objectMap, "learningRateScheduler", i.LearningRateScheduler) - populate(objectMap, "maxSize", i.MaxSize) - populate(objectMap, "minSize", i.MinSize) - populate(objectMap, "modelName", i.ModelName) - populate(objectMap, "modelSize", i.ModelSize) - populate(objectMap, "momentum", i.Momentum) - populate(objectMap, "multiScale", i.MultiScale) - populate(objectMap, "nesterov", i.Nesterov) - populate(objectMap, "nmsIouThreshold", i.NmsIouThreshold) - populate(objectMap, "numberOfEpochs", i.NumberOfEpochs) - populate(objectMap, "numberOfWorkers", i.NumberOfWorkers) - populate(objectMap, "optimizer", i.Optimizer) - populate(objectMap, "randomSeed", i.RandomSeed) - populate(objectMap, "stepLRGamma", i.StepLRGamma) - populate(objectMap, "stepLRStepSize", i.StepLRStepSize) - populate(objectMap, "tileGridSize", i.TileGridSize) - populate(objectMap, "tileOverlapRatio", i.TileOverlapRatio) - populate(objectMap, "tilePredictionsNmsThreshold", i.TilePredictionsNmsThreshold) - populate(objectMap, "trainingBatchSize", i.TrainingBatchSize) - populate(objectMap, "validationBatchSize", i.ValidationBatchSize) - populate(objectMap, "validationIouThreshold", i.ValidationIouThreshold) - populate(objectMap, "validationMetricType", i.ValidationMetricType) - populate(objectMap, "warmupCosineLRCycles", i.WarmupCosineLRCycles) - populate(objectMap, "warmupCosineLRWarmupEpochs", i.WarmupCosineLRWarmupEpochs) - populate(objectMap, "weightDecay", i.WeightDecay) + populate(objectMap, "idleNodeCount", n.IdleNodeCount) + populate(objectMap, "leavingNodeCount", n.LeavingNodeCount) + populate(objectMap, "preemptedNodeCount", n.PreemptedNodeCount) + populate(objectMap, "preparingNodeCount", n.PreparingNodeCount) + populate(objectMap, "runningNodeCount", n.RunningNodeCount) + populate(objectMap, "unusableNodeCount", n.UnusableNodeCount) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ImageModelSettingsObjectDetection. -func (i *ImageModelSettingsObjectDetection) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type NodeStateCounts. +func (n *NodeStateCounts) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) + return fmt.Errorf("unmarshalling type %T: %v", n, err) } for key, val := range rawMsg { var err error switch key { - case "advancedSettings": - err = unpopulate(val, "AdvancedSettings", &i.AdvancedSettings) - delete(rawMsg, key) - case "amsGradient": - err = unpopulate(val, "AmsGradient", &i.AmsGradient) - delete(rawMsg, key) - case "augmentations": - err = unpopulate(val, "Augmentations", &i.Augmentations) - delete(rawMsg, key) - case "beta1": - err = unpopulate(val, "Beta1", &i.Beta1) - delete(rawMsg, key) - case "beta2": - err = unpopulate(val, "Beta2", &i.Beta2) - delete(rawMsg, key) - case "boxDetectionsPerImage": - err = unpopulate(val, "BoxDetectionsPerImage", &i.BoxDetectionsPerImage) - delete(rawMsg, key) - case "boxScoreThreshold": - err = unpopulate(val, "BoxScoreThreshold", &i.BoxScoreThreshold) - delete(rawMsg, key) - case "checkpointFrequency": - err = unpopulate(val, "CheckpointFrequency", &i.CheckpointFrequency) - delete(rawMsg, key) - case "checkpointModel": - err = unpopulate(val, "CheckpointModel", &i.CheckpointModel) - delete(rawMsg, key) - case "checkpointRunId": - err = unpopulate(val, "CheckpointRunID", &i.CheckpointRunID) - delete(rawMsg, key) - case "distributed": - err = unpopulate(val, "Distributed", &i.Distributed) - delete(rawMsg, key) - case "earlyStopping": - err = unpopulate(val, "EarlyStopping", &i.EarlyStopping) - delete(rawMsg, key) - case "earlyStoppingDelay": - err = unpopulate(val, "EarlyStoppingDelay", &i.EarlyStoppingDelay) - delete(rawMsg, key) - case "earlyStoppingPatience": - err = unpopulate(val, "EarlyStoppingPatience", &i.EarlyStoppingPatience) - delete(rawMsg, key) - case "enableOnnxNormalization": - err = unpopulate(val, "EnableOnnxNormalization", &i.EnableOnnxNormalization) - delete(rawMsg, key) - case "evaluationFrequency": - err = unpopulate(val, "EvaluationFrequency", &i.EvaluationFrequency) - delete(rawMsg, key) - case "gradientAccumulationStep": - err = unpopulate(val, "GradientAccumulationStep", &i.GradientAccumulationStep) - delete(rawMsg, key) - case "imageSize": - err = unpopulate(val, "ImageSize", &i.ImageSize) - delete(rawMsg, key) - case "layersToFreeze": - err = unpopulate(val, "LayersToFreeze", &i.LayersToFreeze) - delete(rawMsg, key) - case "learningRate": - err = unpopulate(val, "LearningRate", &i.LearningRate) - delete(rawMsg, key) - case "learningRateScheduler": - err = unpopulate(val, "LearningRateScheduler", &i.LearningRateScheduler) - delete(rawMsg, key) - case "maxSize": - err = unpopulate(val, "MaxSize", &i.MaxSize) - delete(rawMsg, key) - case "minSize": - err = unpopulate(val, "MinSize", &i.MinSize) - delete(rawMsg, key) - case "modelName": - err = unpopulate(val, "ModelName", &i.ModelName) - delete(rawMsg, key) - case "modelSize": - err = unpopulate(val, "ModelSize", &i.ModelSize) - delete(rawMsg, key) - case "momentum": - err = unpopulate(val, "Momentum", &i.Momentum) - delete(rawMsg, key) - case "multiScale": - err = unpopulate(val, "MultiScale", &i.MultiScale) - delete(rawMsg, key) - case "nesterov": - err = unpopulate(val, "Nesterov", &i.Nesterov) - delete(rawMsg, key) - case "nmsIouThreshold": - err = unpopulate(val, "NmsIouThreshold", &i.NmsIouThreshold) - delete(rawMsg, key) - case "numberOfEpochs": - err = unpopulate(val, "NumberOfEpochs", &i.NumberOfEpochs) - delete(rawMsg, key) - case "numberOfWorkers": - err = unpopulate(val, "NumberOfWorkers", &i.NumberOfWorkers) - delete(rawMsg, key) - case "optimizer": - err = unpopulate(val, "Optimizer", &i.Optimizer) - delete(rawMsg, key) - case "randomSeed": - err = unpopulate(val, "RandomSeed", &i.RandomSeed) - delete(rawMsg, key) - case "stepLRGamma": - err = unpopulate(val, "StepLRGamma", &i.StepLRGamma) - delete(rawMsg, key) - case "stepLRStepSize": - err = unpopulate(val, "StepLRStepSize", &i.StepLRStepSize) - delete(rawMsg, key) - case "tileGridSize": - err = unpopulate(val, "TileGridSize", &i.TileGridSize) - delete(rawMsg, key) - case "tileOverlapRatio": - err = unpopulate(val, "TileOverlapRatio", &i.TileOverlapRatio) - delete(rawMsg, key) - case "tilePredictionsNmsThreshold": - err = unpopulate(val, "TilePredictionsNmsThreshold", &i.TilePredictionsNmsThreshold) - delete(rawMsg, key) - case "trainingBatchSize": - err = unpopulate(val, "TrainingBatchSize", &i.TrainingBatchSize) + case "idleNodeCount": + err = unpopulate(val, "IdleNodeCount", &n.IdleNodeCount) delete(rawMsg, key) - case "validationBatchSize": - err = unpopulate(val, "ValidationBatchSize", &i.ValidationBatchSize) + case "leavingNodeCount": + err = unpopulate(val, "LeavingNodeCount", &n.LeavingNodeCount) delete(rawMsg, key) - case "validationIouThreshold": - err = unpopulate(val, "ValidationIouThreshold", &i.ValidationIouThreshold) + case "preemptedNodeCount": + err = unpopulate(val, "PreemptedNodeCount", &n.PreemptedNodeCount) delete(rawMsg, key) - case "validationMetricType": - err = unpopulate(val, "ValidationMetricType", &i.ValidationMetricType) + case "preparingNodeCount": + err = unpopulate(val, "PreparingNodeCount", &n.PreparingNodeCount) delete(rawMsg, key) - case "warmupCosineLRCycles": - err = unpopulate(val, "WarmupCosineLRCycles", &i.WarmupCosineLRCycles) + case "runningNodeCount": + err = unpopulate(val, "RunningNodeCount", &n.RunningNodeCount) delete(rawMsg, key) - case "warmupCosineLRWarmupEpochs": - err = unpopulate(val, "WarmupCosineLRWarmupEpochs", &i.WarmupCosineLRWarmupEpochs) + case "unusableNodeCount": + err = unpopulate(val, "UnusableNodeCount", &n.UnusableNodeCount) delete(rawMsg, key) - case "weightDecay": - err = unpopulate(val, "WeightDecay", &i.WeightDecay) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Nodes. +func (n Nodes) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["nodesValueType"] = n.NodesValueType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Nodes. +func (n *Nodes) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nodesValueType": + err = unpopulate(val, "NodesValueType", &n.NodesValueType) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) + return fmt.Errorf("unmarshalling type %T: %v", n, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ImageObjectDetection. -func (i ImageObjectDetection) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type NoneAuthTypeWorkspaceConnectionProperties. +func (n NoneAuthTypeWorkspaceConnectionProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "limitSettings", i.LimitSettings) - populate(objectMap, "logVerbosity", i.LogVerbosity) - populate(objectMap, "modelSettings", i.ModelSettings) - populate(objectMap, "primaryMetric", i.PrimaryMetric) - populate(objectMap, "searchSpace", i.SearchSpace) - populate(objectMap, "sweepSettings", i.SweepSettings) - populate(objectMap, "targetColumnName", i.TargetColumnName) - objectMap["taskType"] = TaskTypeImageObjectDetection - populate(objectMap, "trainingData", i.TrainingData) - populate(objectMap, "validationData", i.ValidationData) - populate(objectMap, "validationDataSize", i.ValidationDataSize) + objectMap["authType"] = ConnectionAuthTypeNone + populate(objectMap, "category", n.Category) + populate(objectMap, "createdByWorkspaceArmId", n.CreatedByWorkspaceArmID) + populateDateTimeRFC3339(objectMap, "expiryTime", n.ExpiryTime) + populate(objectMap, "group", n.Group) + populate(objectMap, "isSharedToAll", n.IsSharedToAll) + populate(objectMap, "metadata", n.Metadata) + populate(objectMap, "sharedUserList", n.SharedUserList) + populate(objectMap, "target", n.Target) + populate(objectMap, "value", n.Value) + populate(objectMap, "valueFormat", n.ValueFormat) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ImageObjectDetection. -func (i *ImageObjectDetection) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type NoneAuthTypeWorkspaceConnectionProperties. +func (n *NoneAuthTypeWorkspaceConnectionProperties) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) + return fmt.Errorf("unmarshalling type %T: %v", n, err) } for key, val := range rawMsg { var err error switch key { - case "limitSettings": - err = unpopulate(val, "LimitSettings", &i.LimitSettings) + case "authType": + err = unpopulate(val, "AuthType", &n.AuthType) delete(rawMsg, key) - case "logVerbosity": - err = unpopulate(val, "LogVerbosity", &i.LogVerbosity) + case "category": + err = unpopulate(val, "Category", &n.Category) delete(rawMsg, key) - case "modelSettings": - err = unpopulate(val, "ModelSettings", &i.ModelSettings) + case "createdByWorkspaceArmId": + err = unpopulate(val, "CreatedByWorkspaceArmID", &n.CreatedByWorkspaceArmID) delete(rawMsg, key) - case "primaryMetric": - err = unpopulate(val, "PrimaryMetric", &i.PrimaryMetric) + case "expiryTime": + err = unpopulateDateTimeRFC3339(val, "ExpiryTime", &n.ExpiryTime) delete(rawMsg, key) - case "searchSpace": - err = unpopulate(val, "SearchSpace", &i.SearchSpace) + case "group": + err = unpopulate(val, "Group", &n.Group) delete(rawMsg, key) - case "sweepSettings": - err = unpopulate(val, "SweepSettings", &i.SweepSettings) + case "isSharedToAll": + err = unpopulate(val, "IsSharedToAll", &n.IsSharedToAll) delete(rawMsg, key) - case "targetColumnName": - err = unpopulate(val, "TargetColumnName", &i.TargetColumnName) + case "metadata": + err = unpopulate(val, "Metadata", &n.Metadata) delete(rawMsg, key) - case "taskType": - err = unpopulate(val, "TaskType", &i.TaskType) + case "sharedUserList": + err = unpopulate(val, "SharedUserList", &n.SharedUserList) delete(rawMsg, key) - case "trainingData": - err = unpopulate(val, "TrainingData", &i.TrainingData) + case "target": + err = unpopulate(val, "Target", &n.Target) delete(rawMsg, key) - case "validationData": - err = unpopulate(val, "ValidationData", &i.ValidationData) + case "value": + err = unpopulate(val, "Value", &n.Value) delete(rawMsg, key) - case "validationDataSize": - err = unpopulate(val, "ValidationDataSize", &i.ValidationDataSize) + case "valueFormat": + err = unpopulate(val, "ValueFormat", &n.ValueFormat) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) + return fmt.Errorf("unmarshalling type %T: %v", n, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ImageObjectDetectionBase. -func (i ImageObjectDetectionBase) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type NoneDatastoreCredentials. +func (n NoneDatastoreCredentials) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "limitSettings", i.LimitSettings) - populate(objectMap, "modelSettings", i.ModelSettings) - populate(objectMap, "searchSpace", i.SearchSpace) - populate(objectMap, "sweepSettings", i.SweepSettings) - populate(objectMap, "validationData", i.ValidationData) - populate(objectMap, "validationDataSize", i.ValidationDataSize) + objectMap["credentialsType"] = CredentialsTypeNone return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ImageObjectDetectionBase. -func (i *ImageObjectDetectionBase) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type NoneDatastoreCredentials. +func (n *NoneDatastoreCredentials) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) + return fmt.Errorf("unmarshalling type %T: %v", n, err) } for key, val := range rawMsg { var err error switch key { - case "limitSettings": - err = unpopulate(val, "LimitSettings", &i.LimitSettings) + case "credentialsType": + err = unpopulate(val, "CredentialsType", &n.CredentialsType) delete(rawMsg, key) - case "modelSettings": - err = unpopulate(val, "ModelSettings", &i.ModelSettings) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type NotebookAccessTokenResult. +func (n NotebookAccessTokenResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "accessToken", n.AccessToken) + populate(objectMap, "expiresIn", n.ExpiresIn) + populate(objectMap, "hostName", n.HostName) + populate(objectMap, "notebookResourceId", n.NotebookResourceID) + populate(objectMap, "publicDns", n.PublicDNS) + populate(objectMap, "refreshToken", n.RefreshToken) + populate(objectMap, "scope", n.Scope) + populate(objectMap, "tokenType", n.TokenType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NotebookAccessTokenResult. +func (n *NotebookAccessTokenResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "accessToken": + err = unpopulate(val, "AccessToken", &n.AccessToken) delete(rawMsg, key) - case "searchSpace": - err = unpopulate(val, "SearchSpace", &i.SearchSpace) + case "expiresIn": + err = unpopulate(val, "ExpiresIn", &n.ExpiresIn) delete(rawMsg, key) - case "sweepSettings": - err = unpopulate(val, "SweepSettings", &i.SweepSettings) + case "hostName": + err = unpopulate(val, "HostName", &n.HostName) delete(rawMsg, key) - case "validationData": - err = unpopulate(val, "ValidationData", &i.ValidationData) + case "notebookResourceId": + err = unpopulate(val, "NotebookResourceID", &n.NotebookResourceID) delete(rawMsg, key) - case "validationDataSize": - err = unpopulate(val, "ValidationDataSize", &i.ValidationDataSize) + case "publicDns": + err = unpopulate(val, "PublicDNS", &n.PublicDNS) + delete(rawMsg, key) + case "refreshToken": + err = unpopulate(val, "RefreshToken", &n.RefreshToken) + delete(rawMsg, key) + case "scope": + err = unpopulate(val, "Scope", &n.Scope) + delete(rawMsg, key) + case "tokenType": + err = unpopulate(val, "TokenType", &n.TokenType) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) + return fmt.Errorf("unmarshalling type %T: %v", n, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ImageSweepSettings. -func (i ImageSweepSettings) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type NotebookPreparationError. +func (n NotebookPreparationError) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "earlyTermination", i.EarlyTermination) - populate(objectMap, "samplingAlgorithm", i.SamplingAlgorithm) + populate(objectMap, "errorMessage", n.ErrorMessage) + populate(objectMap, "statusCode", n.StatusCode) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ImageSweepSettings. -func (i *ImageSweepSettings) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type NotebookPreparationError. +func (n *NotebookPreparationError) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) + return fmt.Errorf("unmarshalling type %T: %v", n, err) } for key, val := range rawMsg { var err error switch key { - case "earlyTermination": - i.EarlyTermination, err = unmarshalEarlyTerminationPolicyClassification(val) + case "errorMessage": + err = unpopulate(val, "ErrorMessage", &n.ErrorMessage) delete(rawMsg, key) - case "samplingAlgorithm": - err = unpopulate(val, "SamplingAlgorithm", &i.SamplingAlgorithm) + case "statusCode": + err = unpopulate(val, "StatusCode", &n.StatusCode) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) + return fmt.Errorf("unmarshalling type %T: %v", n, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ImageVertical. -func (i ImageVertical) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type NotebookResourceInfo. +func (n NotebookResourceInfo) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "limitSettings", i.LimitSettings) - populate(objectMap, "sweepSettings", i.SweepSettings) - populate(objectMap, "validationData", i.ValidationData) - populate(objectMap, "validationDataSize", i.ValidationDataSize) + populate(objectMap, "fqdn", n.Fqdn) + populate(objectMap, "notebookPreparationError", n.NotebookPreparationError) + populate(objectMap, "resourceId", n.ResourceID) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ImageVertical. -func (i *ImageVertical) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type NotebookResourceInfo. +func (n *NotebookResourceInfo) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) + return fmt.Errorf("unmarshalling type %T: %v", n, err) } for key, val := range rawMsg { var err error switch key { - case "limitSettings": - err = unpopulate(val, "LimitSettings", &i.LimitSettings) - delete(rawMsg, key) - case "sweepSettings": - err = unpopulate(val, "SweepSettings", &i.SweepSettings) + case "fqdn": + err = unpopulate(val, "Fqdn", &n.Fqdn) delete(rawMsg, key) - case "validationData": - err = unpopulate(val, "ValidationData", &i.ValidationData) + case "notebookPreparationError": + err = unpopulate(val, "NotebookPreparationError", &n.NotebookPreparationError) delete(rawMsg, key) - case "validationDataSize": - err = unpopulate(val, "ValidationDataSize", &i.ValidationDataSize) + case "resourceId": + err = unpopulate(val, "ResourceID", &n.ResourceID) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) + return fmt.Errorf("unmarshalling type %T: %v", n, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type InferenceContainerProperties. -func (i InferenceContainerProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type NotificationSetting. +func (n NotificationSetting) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "livenessRoute", i.LivenessRoute) - populate(objectMap, "readinessRoute", i.ReadinessRoute) - populate(objectMap, "scoringRoute", i.ScoringRoute) + populate(objectMap, "emailOn", n.EmailOn) + populate(objectMap, "emails", n.Emails) + populate(objectMap, "webhooks", n.Webhooks) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type InferenceContainerProperties. -func (i *InferenceContainerProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type NotificationSetting. +func (n *NotificationSetting) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) + return fmt.Errorf("unmarshalling type %T: %v", n, err) } for key, val := range rawMsg { var err error switch key { - case "livenessRoute": - err = unpopulate(val, "LivenessRoute", &i.LivenessRoute) + case "emailOn": + err = unpopulate(val, "EmailOn", &n.EmailOn) delete(rawMsg, key) - case "readinessRoute": - err = unpopulate(val, "ReadinessRoute", &i.ReadinessRoute) + case "emails": + err = unpopulate(val, "Emails", &n.Emails) delete(rawMsg, key) - case "scoringRoute": - err = unpopulate(val, "ScoringRoute", &i.ScoringRoute) + case "webhooks": + n.Webhooks, err = unmarshalWebhookClassificationMap(val) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) + return fmt.Errorf("unmarshalling type %T: %v", n, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type InstanceTypeSchema. -func (i InstanceTypeSchema) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type NumericalDataDriftMetricThreshold. +func (n NumericalDataDriftMetricThreshold) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "nodeSelector", i.NodeSelector) - populate(objectMap, "resources", i.Resources) + objectMap["dataType"] = MonitoringFeatureDataTypeNumerical + populate(objectMap, "metric", n.Metric) + populate(objectMap, "threshold", n.Threshold) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type InstanceTypeSchema. -func (i *InstanceTypeSchema) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type NumericalDataDriftMetricThreshold. +func (n *NumericalDataDriftMetricThreshold) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) + return fmt.Errorf("unmarshalling type %T: %v", n, err) } for key, val := range rawMsg { var err error switch key { - case "nodeSelector": - err = unpopulate(val, "NodeSelector", &i.NodeSelector) + case "dataType": + err = unpopulate(val, "DataType", &n.DataType) delete(rawMsg, key) - case "resources": - err = unpopulate(val, "Resources", &i.Resources) + case "metric": + err = unpopulate(val, "Metric", &n.Metric) + delete(rawMsg, key) + case "threshold": + err = unpopulate(val, "Threshold", &n.Threshold) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) + return fmt.Errorf("unmarshalling type %T: %v", n, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type InstanceTypeSchemaResources. -func (i InstanceTypeSchemaResources) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type NumericalDataQualityMetricThreshold. +func (n NumericalDataQualityMetricThreshold) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "limits", i.Limits) - populate(objectMap, "requests", i.Requests) + objectMap["dataType"] = MonitoringFeatureDataTypeNumerical + populate(objectMap, "metric", n.Metric) + populate(objectMap, "threshold", n.Threshold) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type InstanceTypeSchemaResources. -func (i *InstanceTypeSchemaResources) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type NumericalDataQualityMetricThreshold. +func (n *NumericalDataQualityMetricThreshold) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) + return fmt.Errorf("unmarshalling type %T: %v", n, err) } for key, val := range rawMsg { var err error switch key { - case "limits": - err = unpopulate(val, "Limits", &i.Limits) + case "dataType": + err = unpopulate(val, "DataType", &n.DataType) delete(rawMsg, key) - case "requests": - err = unpopulate(val, "Requests", &i.Requests) + case "metric": + err = unpopulate(val, "Metric", &n.Metric) + delete(rawMsg, key) + case "threshold": + err = unpopulate(val, "Threshold", &n.Threshold) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) + return fmt.Errorf("unmarshalling type %T: %v", n, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type JobBase. -func (j JobBase) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type NumericalPredictionDriftMetricThreshold. +func (n NumericalPredictionDriftMetricThreshold) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "id", j.ID) - populate(objectMap, "name", j.Name) - populate(objectMap, "properties", j.Properties) - populate(objectMap, "systemData", j.SystemData) - populate(objectMap, "type", j.Type) + objectMap["dataType"] = MonitoringFeatureDataTypeNumerical + populate(objectMap, "metric", n.Metric) + populate(objectMap, "threshold", n.Threshold) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type JobBase. -func (j *JobBase) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type NumericalPredictionDriftMetricThreshold. +func (n *NumericalPredictionDriftMetricThreshold) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", j, err) + return fmt.Errorf("unmarshalling type %T: %v", n, err) } for key, val := range rawMsg { var err error switch key { - case "id": - err = unpopulate(val, "ID", &j.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &j.Name) - delete(rawMsg, key) - case "properties": - j.Properties, err = unmarshalJobBasePropertiesClassification(val) + case "dataType": + err = unpopulate(val, "DataType", &n.DataType) delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &j.SystemData) + case "metric": + err = unpopulate(val, "Metric", &n.Metric) delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &j.Type) + case "threshold": + err = unpopulate(val, "Threshold", &n.Threshold) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", j, err) + return fmt.Errorf("unmarshalling type %T: %v", n, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type JobBaseProperties. -func (j JobBaseProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type OAuth2AuthTypeWorkspaceConnectionProperties. +func (o OAuth2AuthTypeWorkspaceConnectionProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "componentId", j.ComponentID) - populate(objectMap, "computeId", j.ComputeID) - populate(objectMap, "description", j.Description) - populate(objectMap, "displayName", j.DisplayName) - populate(objectMap, "experimentName", j.ExperimentName) - populate(objectMap, "identity", j.Identity) - populate(objectMap, "isArchived", j.IsArchived) - objectMap["jobType"] = j.JobType - populate(objectMap, "properties", j.Properties) - populate(objectMap, "services", j.Services) - populate(objectMap, "status", j.Status) - populate(objectMap, "tags", j.Tags) + objectMap["authType"] = ConnectionAuthTypeOAuth2 + populate(objectMap, "category", o.Category) + populate(objectMap, "createdByWorkspaceArmId", o.CreatedByWorkspaceArmID) + populate(objectMap, "credentials", o.Credentials) + populateDateTimeRFC3339(objectMap, "expiryTime", o.ExpiryTime) + populate(objectMap, "group", o.Group) + populate(objectMap, "isSharedToAll", o.IsSharedToAll) + populate(objectMap, "metadata", o.Metadata) + populate(objectMap, "sharedUserList", o.SharedUserList) + populate(objectMap, "target", o.Target) + populate(objectMap, "value", o.Value) + populate(objectMap, "valueFormat", o.ValueFormat) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type JobBaseProperties. -func (j *JobBaseProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type OAuth2AuthTypeWorkspaceConnectionProperties. +func (o *OAuth2AuthTypeWorkspaceConnectionProperties) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", j, err) + return fmt.Errorf("unmarshalling type %T: %v", o, err) } for key, val := range rawMsg { var err error switch key { - case "componentId": - err = unpopulate(val, "ComponentID", &j.ComponentID) + case "authType": + err = unpopulate(val, "AuthType", &o.AuthType) delete(rawMsg, key) - case "computeId": - err = unpopulate(val, "ComputeID", &j.ComputeID) + case "category": + err = unpopulate(val, "Category", &o.Category) delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &j.Description) + case "createdByWorkspaceArmId": + err = unpopulate(val, "CreatedByWorkspaceArmID", &o.CreatedByWorkspaceArmID) delete(rawMsg, key) - case "displayName": - err = unpopulate(val, "DisplayName", &j.DisplayName) + case "credentials": + err = unpopulate(val, "Credentials", &o.Credentials) delete(rawMsg, key) - case "experimentName": - err = unpopulate(val, "ExperimentName", &j.ExperimentName) + case "expiryTime": + err = unpopulateDateTimeRFC3339(val, "ExpiryTime", &o.ExpiryTime) delete(rawMsg, key) - case "identity": - j.Identity, err = unmarshalIdentityConfigurationClassification(val) + case "group": + err = unpopulate(val, "Group", &o.Group) delete(rawMsg, key) - case "isArchived": - err = unpopulate(val, "IsArchived", &j.IsArchived) + case "isSharedToAll": + err = unpopulate(val, "IsSharedToAll", &o.IsSharedToAll) delete(rawMsg, key) - case "jobType": - err = unpopulate(val, "JobType", &j.JobType) + case "metadata": + err = unpopulate(val, "Metadata", &o.Metadata) delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &j.Properties) + case "sharedUserList": + err = unpopulate(val, "SharedUserList", &o.SharedUserList) delete(rawMsg, key) - case "services": - err = unpopulate(val, "Services", &j.Services) + case "target": + err = unpopulate(val, "Target", &o.Target) delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &j.Status) + case "value": + err = unpopulate(val, "Value", &o.Value) delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &j.Tags) + case "valueFormat": + err = unpopulate(val, "ValueFormat", &o.ValueFormat) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", j, err) + return fmt.Errorf("unmarshalling type %T: %v", o, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type JobBaseResourceArmPaginatedResult. -func (j JobBaseResourceArmPaginatedResult) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type Objective. +func (o Objective) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "nextLink", j.NextLink) - populate(objectMap, "value", j.Value) + populate(objectMap, "goal", o.Goal) + populate(objectMap, "primaryMetric", o.PrimaryMetric) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type JobBaseResourceArmPaginatedResult. -func (j *JobBaseResourceArmPaginatedResult) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type Objective. +func (o *Objective) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", j, err) + return fmt.Errorf("unmarshalling type %T: %v", o, err) } for key, val := range rawMsg { var err error switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &j.NextLink) + case "goal": + err = unpopulate(val, "Goal", &o.Goal) delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &j.Value) + case "primaryMetric": + err = unpopulate(val, "PrimaryMetric", &o.PrimaryMetric) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", j, err) + return fmt.Errorf("unmarshalling type %T: %v", o, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type JobInput. -func (j JobInput) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type OneLakeArtifact. +func (o OneLakeArtifact) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "description", j.Description) - objectMap["jobInputType"] = j.JobInputType + populate(objectMap, "artifactName", o.ArtifactName) + objectMap["artifactType"] = o.ArtifactType return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type JobInput. -func (j *JobInput) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type OneLakeArtifact. +func (o *OneLakeArtifact) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", j, err) + return fmt.Errorf("unmarshalling type %T: %v", o, err) } for key, val := range rawMsg { var err error switch key { - case "description": - err = unpopulate(val, "Description", &j.Description) + case "artifactName": + err = unpopulate(val, "ArtifactName", &o.ArtifactName) delete(rawMsg, key) - case "jobInputType": - err = unpopulate(val, "JobInputType", &j.JobInputType) + case "artifactType": + err = unpopulate(val, "ArtifactType", &o.ArtifactType) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", j, err) + return fmt.Errorf("unmarshalling type %T: %v", o, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type JobLimits. -func (j JobLimits) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type OneLakeDatastore. +func (o OneLakeDatastore) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - objectMap["jobLimitsType"] = j.JobLimitsType - populate(objectMap, "timeout", j.Timeout) + populate(objectMap, "artifact", o.Artifact) + populate(objectMap, "credentials", o.Credentials) + objectMap["datastoreType"] = DatastoreTypeOneLake + populate(objectMap, "description", o.Description) + populate(objectMap, "endpoint", o.Endpoint) + populate(objectMap, "isDefault", o.IsDefault) + populate(objectMap, "oneLakeWorkspaceName", o.OneLakeWorkspaceName) + populate(objectMap, "properties", o.Properties) + populate(objectMap, "serviceDataAccessAuthIdentity", o.ServiceDataAccessAuthIdentity) + populate(objectMap, "tags", o.Tags) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type JobLimits. -func (j *JobLimits) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type OneLakeDatastore. +func (o *OneLakeDatastore) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", j, err) + return fmt.Errorf("unmarshalling type %T: %v", o, err) } for key, val := range rawMsg { var err error switch key { - case "jobLimitsType": - err = unpopulate(val, "JobLimitsType", &j.JobLimitsType) + case "artifact": + o.Artifact, err = unmarshalOneLakeArtifactClassification(val) delete(rawMsg, key) - case "timeout": - err = unpopulate(val, "Timeout", &j.Timeout) + case "credentials": + o.Credentials, err = unmarshalDatastoreCredentialsClassification(val) + delete(rawMsg, key) + case "datastoreType": + err = unpopulate(val, "DatastoreType", &o.DatastoreType) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &o.Description) + delete(rawMsg, key) + case "endpoint": + err = unpopulate(val, "Endpoint", &o.Endpoint) + delete(rawMsg, key) + case "isDefault": + err = unpopulate(val, "IsDefault", &o.IsDefault) + delete(rawMsg, key) + case "oneLakeWorkspaceName": + err = unpopulate(val, "OneLakeWorkspaceName", &o.OneLakeWorkspaceName) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &o.Properties) + delete(rawMsg, key) + case "serviceDataAccessAuthIdentity": + err = unpopulate(val, "ServiceDataAccessAuthIdentity", &o.ServiceDataAccessAuthIdentity) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &o.Tags) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", j, err) + return fmt.Errorf("unmarshalling type %T: %v", o, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type JobOutput. -func (j JobOutput) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type OnlineDeployment. +func (o OnlineDeployment) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "description", j.Description) - objectMap["jobOutputType"] = j.JobOutputType + populate(objectMap, "id", o.ID) + populate(objectMap, "identity", o.Identity) + populate(objectMap, "kind", o.Kind) + populate(objectMap, "location", o.Location) + populate(objectMap, "name", o.Name) + populate(objectMap, "properties", o.Properties) + populate(objectMap, "sku", o.SKU) + populate(objectMap, "systemData", o.SystemData) + populate(objectMap, "tags", o.Tags) + populate(objectMap, "type", o.Type) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type JobOutput. -func (j *JobOutput) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type OnlineDeployment. +func (o *OnlineDeployment) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", j, err) + return fmt.Errorf("unmarshalling type %T: %v", o, err) } for key, val := range rawMsg { var err error switch key { - case "description": - err = unpopulate(val, "Description", &j.Description) + case "id": + err = unpopulate(val, "ID", &o.ID) delete(rawMsg, key) - case "jobOutputType": - err = unpopulate(val, "JobOutputType", &j.JobOutputType) + case "identity": + err = unpopulate(val, "Identity", &o.Identity) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &o.Kind) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &o.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &o.Name) + delete(rawMsg, key) + case "properties": + o.Properties, err = unmarshalOnlineDeploymentPropertiesClassification(val) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &o.SKU) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &o.SystemData) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &o.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &o.Type) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", j, err) + return fmt.Errorf("unmarshalling type %T: %v", o, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type JobResourceConfiguration. -func (j JobResourceConfiguration) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type OnlineDeploymentProperties. +func (o OnlineDeploymentProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "dockerArgs", j.DockerArgs) - populate(objectMap, "instanceCount", j.InstanceCount) - populate(objectMap, "instanceType", j.InstanceType) - populate(objectMap, "properties", j.Properties) - populate(objectMap, "shmSize", j.ShmSize) + populate(objectMap, "appInsightsEnabled", o.AppInsightsEnabled) + populate(objectMap, "codeConfiguration", o.CodeConfiguration) + populate(objectMap, "dataCollector", o.DataCollector) + populate(objectMap, "description", o.Description) + populate(objectMap, "egressPublicNetworkAccess", o.EgressPublicNetworkAccess) + objectMap["endpointComputeType"] = o.EndpointComputeType + populate(objectMap, "environmentId", o.EnvironmentID) + populate(objectMap, "environmentVariables", o.EnvironmentVariables) + populate(objectMap, "instanceType", o.InstanceType) + populate(objectMap, "livenessProbe", o.LivenessProbe) + populate(objectMap, "model", o.Model) + populate(objectMap, "modelMountPath", o.ModelMountPath) + populate(objectMap, "properties", o.Properties) + populate(objectMap, "provisioningState", o.ProvisioningState) + populate(objectMap, "readinessProbe", o.ReadinessProbe) + populate(objectMap, "requestSettings", o.RequestSettings) + populate(objectMap, "scaleSettings", o.ScaleSettings) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type JobResourceConfiguration. -func (j *JobResourceConfiguration) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type OnlineDeploymentProperties. +func (o *OnlineDeploymentProperties) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", j, err) + return fmt.Errorf("unmarshalling type %T: %v", o, err) } for key, val := range rawMsg { var err error switch key { - case "dockerArgs": - err = unpopulate(val, "DockerArgs", &j.DockerArgs) + case "appInsightsEnabled": + err = unpopulate(val, "AppInsightsEnabled", &o.AppInsightsEnabled) delete(rawMsg, key) - case "instanceCount": - err = unpopulate(val, "InstanceCount", &j.InstanceCount) + case "codeConfiguration": + err = unpopulate(val, "CodeConfiguration", &o.CodeConfiguration) + delete(rawMsg, key) + case "dataCollector": + err = unpopulate(val, "DataCollector", &o.DataCollector) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &o.Description) + delete(rawMsg, key) + case "egressPublicNetworkAccess": + err = unpopulate(val, "EgressPublicNetworkAccess", &o.EgressPublicNetworkAccess) + delete(rawMsg, key) + case "endpointComputeType": + err = unpopulate(val, "EndpointComputeType", &o.EndpointComputeType) + delete(rawMsg, key) + case "environmentId": + err = unpopulate(val, "EnvironmentID", &o.EnvironmentID) + delete(rawMsg, key) + case "environmentVariables": + err = unpopulate(val, "EnvironmentVariables", &o.EnvironmentVariables) delete(rawMsg, key) case "instanceType": - err = unpopulate(val, "InstanceType", &j.InstanceType) + err = unpopulate(val, "InstanceType", &o.InstanceType) + delete(rawMsg, key) + case "livenessProbe": + err = unpopulate(val, "LivenessProbe", &o.LivenessProbe) + delete(rawMsg, key) + case "model": + err = unpopulate(val, "Model", &o.Model) + delete(rawMsg, key) + case "modelMountPath": + err = unpopulate(val, "ModelMountPath", &o.ModelMountPath) delete(rawMsg, key) case "properties": - err = unpopulate(val, "Properties", &j.Properties) + err = unpopulate(val, "Properties", &o.Properties) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &o.ProvisioningState) + delete(rawMsg, key) + case "readinessProbe": + err = unpopulate(val, "ReadinessProbe", &o.ReadinessProbe) delete(rawMsg, key) - case "shmSize": - err = unpopulate(val, "ShmSize", &j.ShmSize) + case "requestSettings": + err = unpopulate(val, "RequestSettings", &o.RequestSettings) + delete(rawMsg, key) + case "scaleSettings": + o.ScaleSettings, err = unmarshalOnlineScaleSettingsClassification(val) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", j, err) + return fmt.Errorf("unmarshalling type %T: %v", o, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type JobScheduleAction. -func (j JobScheduleAction) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type OnlineDeploymentTrackedResourceArmPaginatedResult. +func (o OnlineDeploymentTrackedResourceArmPaginatedResult) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - objectMap["actionType"] = ScheduleActionTypeCreateJob - populate(objectMap, "jobDefinition", j.JobDefinition) + populate(objectMap, "nextLink", o.NextLink) + populate(objectMap, "value", o.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type JobScheduleAction. -func (j *JobScheduleAction) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type OnlineDeploymentTrackedResourceArmPaginatedResult. +func (o *OnlineDeploymentTrackedResourceArmPaginatedResult) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", j, err) + return fmt.Errorf("unmarshalling type %T: %v", o, err) } for key, val := range rawMsg { var err error switch key { - case "actionType": - err = unpopulate(val, "ActionType", &j.ActionType) + case "nextLink": + err = unpopulate(val, "NextLink", &o.NextLink) delete(rawMsg, key) - case "jobDefinition": - j.JobDefinition, err = unmarshalJobBasePropertiesClassification(val) + case "value": + err = unpopulate(val, "Value", &o.Value) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", j, err) + return fmt.Errorf("unmarshalling type %T: %v", o, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type JobService. -func (j JobService) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type OnlineEndpoint. +func (o OnlineEndpoint) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "endpoint", j.Endpoint) - populate(objectMap, "errorMessage", j.ErrorMessage) - populate(objectMap, "jobServiceType", j.JobServiceType) - populate(objectMap, "port", j.Port) - populate(objectMap, "properties", j.Properties) - populate(objectMap, "status", j.Status) + populate(objectMap, "id", o.ID) + populate(objectMap, "identity", o.Identity) + populate(objectMap, "kind", o.Kind) + populate(objectMap, "location", o.Location) + populate(objectMap, "name", o.Name) + populate(objectMap, "properties", o.Properties) + populate(objectMap, "sku", o.SKU) + populate(objectMap, "systemData", o.SystemData) + populate(objectMap, "tags", o.Tags) + populate(objectMap, "type", o.Type) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type JobService. -func (j *JobService) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type OnlineEndpoint. +func (o *OnlineEndpoint) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", j, err) + return fmt.Errorf("unmarshalling type %T: %v", o, err) } for key, val := range rawMsg { var err error switch key { - case "endpoint": - err = unpopulate(val, "Endpoint", &j.Endpoint) + case "id": + err = unpopulate(val, "ID", &o.ID) delete(rawMsg, key) - case "errorMessage": - err = unpopulate(val, "ErrorMessage", &j.ErrorMessage) + case "identity": + err = unpopulate(val, "Identity", &o.Identity) delete(rawMsg, key) - case "jobServiceType": - err = unpopulate(val, "JobServiceType", &j.JobServiceType) + case "kind": + err = unpopulate(val, "Kind", &o.Kind) delete(rawMsg, key) - case "port": - err = unpopulate(val, "Port", &j.Port) + case "location": + err = unpopulate(val, "Location", &o.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &o.Name) delete(rawMsg, key) case "properties": - err = unpopulate(val, "Properties", &j.Properties) + err = unpopulate(val, "Properties", &o.Properties) delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &j.Status) + case "sku": + err = unpopulate(val, "SKU", &o.SKU) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &o.SystemData) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &o.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &o.Type) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", j, err) + return fmt.Errorf("unmarshalling type %T: %v", o, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type Kubernetes. -func (k Kubernetes) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type OnlineEndpointProperties. +func (o OnlineEndpointProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "computeLocation", k.ComputeLocation) - objectMap["computeType"] = ComputeTypeKubernetes - populateDateTimeRFC3339(objectMap, "createdOn", k.CreatedOn) - populate(objectMap, "description", k.Description) - populate(objectMap, "disableLocalAuth", k.DisableLocalAuth) - populate(objectMap, "isAttachedCompute", k.IsAttachedCompute) - populateDateTimeRFC3339(objectMap, "modifiedOn", k.ModifiedOn) - populate(objectMap, "properties", k.Properties) - populate(objectMap, "provisioningErrors", k.ProvisioningErrors) - populate(objectMap, "provisioningState", k.ProvisioningState) - populate(objectMap, "resourceId", k.ResourceID) + populate(objectMap, "authMode", o.AuthMode) + populate(objectMap, "compute", o.Compute) + populate(objectMap, "description", o.Description) + populate(objectMap, "keys", o.Keys) + populate(objectMap, "mirrorTraffic", o.MirrorTraffic) + populate(objectMap, "properties", o.Properties) + populate(objectMap, "provisioningState", o.ProvisioningState) + populate(objectMap, "publicNetworkAccess", o.PublicNetworkAccess) + populate(objectMap, "scoringUri", o.ScoringURI) + populate(objectMap, "swaggerUri", o.SwaggerURI) + populate(objectMap, "traffic", o.Traffic) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type Kubernetes. -func (k *Kubernetes) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type OnlineEndpointProperties. +func (o *OnlineEndpointProperties) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", k, err) + return fmt.Errorf("unmarshalling type %T: %v", o, err) } for key, val := range rawMsg { var err error switch key { - case "computeLocation": - err = unpopulate(val, "ComputeLocation", &k.ComputeLocation) - delete(rawMsg, key) - case "computeType": - err = unpopulate(val, "ComputeType", &k.ComputeType) + case "authMode": + err = unpopulate(val, "AuthMode", &o.AuthMode) delete(rawMsg, key) - case "createdOn": - err = unpopulateDateTimeRFC3339(val, "CreatedOn", &k.CreatedOn) + case "compute": + err = unpopulate(val, "Compute", &o.Compute) delete(rawMsg, key) case "description": - err = unpopulate(val, "Description", &k.Description) - delete(rawMsg, key) - case "disableLocalAuth": - err = unpopulate(val, "DisableLocalAuth", &k.DisableLocalAuth) + err = unpopulate(val, "Description", &o.Description) delete(rawMsg, key) - case "isAttachedCompute": - err = unpopulate(val, "IsAttachedCompute", &k.IsAttachedCompute) + case "keys": + err = unpopulate(val, "Keys", &o.Keys) delete(rawMsg, key) - case "modifiedOn": - err = unpopulateDateTimeRFC3339(val, "ModifiedOn", &k.ModifiedOn) + case "mirrorTraffic": + err = unpopulate(val, "MirrorTraffic", &o.MirrorTraffic) delete(rawMsg, key) case "properties": - err = unpopulate(val, "Properties", &k.Properties) - delete(rawMsg, key) - case "provisioningErrors": - err = unpopulate(val, "ProvisioningErrors", &k.ProvisioningErrors) + err = unpopulate(val, "Properties", &o.Properties) delete(rawMsg, key) case "provisioningState": - err = unpopulate(val, "ProvisioningState", &k.ProvisioningState) + err = unpopulate(val, "ProvisioningState", &o.ProvisioningState) delete(rawMsg, key) - case "resourceId": - err = unpopulate(val, "ResourceID", &k.ResourceID) + case "publicNetworkAccess": + err = unpopulate(val, "PublicNetworkAccess", &o.PublicNetworkAccess) + delete(rawMsg, key) + case "scoringUri": + err = unpopulate(val, "ScoringURI", &o.ScoringURI) + delete(rawMsg, key) + case "swaggerUri": + err = unpopulate(val, "SwaggerURI", &o.SwaggerURI) + delete(rawMsg, key) + case "traffic": + err = unpopulate(val, "Traffic", &o.Traffic) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", k, err) + return fmt.Errorf("unmarshalling type %T: %v", o, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type KubernetesOnlineDeployment. -func (k KubernetesOnlineDeployment) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type OnlineEndpointTrackedResourceArmPaginatedResult. +func (o OnlineEndpointTrackedResourceArmPaginatedResult) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "appInsightsEnabled", k.AppInsightsEnabled) - populate(objectMap, "codeConfiguration", k.CodeConfiguration) - populate(objectMap, "containerResourceRequirements", k.ContainerResourceRequirements) - populate(objectMap, "description", k.Description) - populate(objectMap, "egressPublicNetworkAccess", k.EgressPublicNetworkAccess) - objectMap["endpointComputeType"] = EndpointComputeTypeKubernetes - populate(objectMap, "environmentId", k.EnvironmentID) - populate(objectMap, "environmentVariables", k.EnvironmentVariables) - populate(objectMap, "instanceType", k.InstanceType) - populate(objectMap, "livenessProbe", k.LivenessProbe) - populate(objectMap, "model", k.Model) - populate(objectMap, "modelMountPath", k.ModelMountPath) - populate(objectMap, "properties", k.Properties) - populate(objectMap, "provisioningState", k.ProvisioningState) - populate(objectMap, "readinessProbe", k.ReadinessProbe) - populate(objectMap, "requestSettings", k.RequestSettings) - populate(objectMap, "scaleSettings", k.ScaleSettings) + populate(objectMap, "nextLink", o.NextLink) + populate(objectMap, "value", o.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type KubernetesOnlineDeployment. -func (k *KubernetesOnlineDeployment) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type OnlineEndpointTrackedResourceArmPaginatedResult. +func (o *OnlineEndpointTrackedResourceArmPaginatedResult) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", k, err) + return fmt.Errorf("unmarshalling type %T: %v", o, err) } for key, val := range rawMsg { var err error switch key { - case "appInsightsEnabled": - err = unpopulate(val, "AppInsightsEnabled", &k.AppInsightsEnabled) - delete(rawMsg, key) - case "codeConfiguration": - err = unpopulate(val, "CodeConfiguration", &k.CodeConfiguration) - delete(rawMsg, key) - case "containerResourceRequirements": - err = unpopulate(val, "ContainerResourceRequirements", &k.ContainerResourceRequirements) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &k.Description) - delete(rawMsg, key) - case "egressPublicNetworkAccess": - err = unpopulate(val, "EgressPublicNetworkAccess", &k.EgressPublicNetworkAccess) - delete(rawMsg, key) - case "endpointComputeType": - err = unpopulate(val, "EndpointComputeType", &k.EndpointComputeType) - delete(rawMsg, key) - case "environmentId": - err = unpopulate(val, "EnvironmentID", &k.EnvironmentID) - delete(rawMsg, key) - case "environmentVariables": - err = unpopulate(val, "EnvironmentVariables", &k.EnvironmentVariables) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &k.InstanceType) - delete(rawMsg, key) - case "livenessProbe": - err = unpopulate(val, "LivenessProbe", &k.LivenessProbe) - delete(rawMsg, key) - case "model": - err = unpopulate(val, "Model", &k.Model) - delete(rawMsg, key) - case "modelMountPath": - err = unpopulate(val, "ModelMountPath", &k.ModelMountPath) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &k.Properties) + case "nextLink": + err = unpopulate(val, "NextLink", &o.NextLink) delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &k.ProvisioningState) + case "value": + err = unpopulate(val, "Value", &o.Value) delete(rawMsg, key) - case "readinessProbe": - err = unpopulate(val, "ReadinessProbe", &k.ReadinessProbe) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OnlineRequestSettings. +func (o OnlineRequestSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "maxConcurrentRequestsPerInstance", o.MaxConcurrentRequestsPerInstance) + populate(objectMap, "maxQueueWait", o.MaxQueueWait) + populate(objectMap, "requestTimeout", o.RequestTimeout) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OnlineRequestSettings. +func (o *OnlineRequestSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "maxConcurrentRequestsPerInstance": + err = unpopulate(val, "MaxConcurrentRequestsPerInstance", &o.MaxConcurrentRequestsPerInstance) delete(rawMsg, key) - case "requestSettings": - err = unpopulate(val, "RequestSettings", &k.RequestSettings) + case "maxQueueWait": + err = unpopulate(val, "MaxQueueWait", &o.MaxQueueWait) delete(rawMsg, key) - case "scaleSettings": - k.ScaleSettings, err = unmarshalOnlineScaleSettingsClassification(val) + case "requestTimeout": + err = unpopulate(val, "RequestTimeout", &o.RequestTimeout) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", k, err) + return fmt.Errorf("unmarshalling type %T: %v", o, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type KubernetesProperties. -func (k KubernetesProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type OnlineScaleSettings. +func (o OnlineScaleSettings) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "defaultInstanceType", k.DefaultInstanceType) - populate(objectMap, "extensionInstanceReleaseTrain", k.ExtensionInstanceReleaseTrain) - populate(objectMap, "extensionPrincipalId", k.ExtensionPrincipalID) - populate(objectMap, "instanceTypes", k.InstanceTypes) - populate(objectMap, "namespace", k.Namespace) - populate(objectMap, "relayConnectionString", k.RelayConnectionString) - populate(objectMap, "serviceBusConnectionString", k.ServiceBusConnectionString) - populate(objectMap, "vcName", k.VcName) + objectMap["scaleType"] = o.ScaleType return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type KubernetesProperties. -func (k *KubernetesProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type OnlineScaleSettings. +func (o *OnlineScaleSettings) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", k, err) + return fmt.Errorf("unmarshalling type %T: %v", o, err) } for key, val := range rawMsg { var err error switch key { - case "defaultInstanceType": - err = unpopulate(val, "DefaultInstanceType", &k.DefaultInstanceType) - delete(rawMsg, key) - case "extensionInstanceReleaseTrain": - err = unpopulate(val, "ExtensionInstanceReleaseTrain", &k.ExtensionInstanceReleaseTrain) - delete(rawMsg, key) - case "extensionPrincipalId": - err = unpopulate(val, "ExtensionPrincipalID", &k.ExtensionPrincipalID) + case "scaleType": + err = unpopulate(val, "ScaleType", &o.ScaleType) delete(rawMsg, key) - case "instanceTypes": - err = unpopulate(val, "InstanceTypes", &k.InstanceTypes) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Operation. +func (o Operation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "actionType", o.ActionType) + populate(objectMap, "display", o.Display) + populate(objectMap, "isDataAction", o.IsDataAction) + populate(objectMap, "name", o.Name) + populate(objectMap, "origin", o.Origin) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Operation. +func (o *Operation) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "actionType": + err = unpopulate(val, "ActionType", &o.ActionType) delete(rawMsg, key) - case "namespace": - err = unpopulate(val, "Namespace", &k.Namespace) + case "display": + err = unpopulate(val, "Display", &o.Display) delete(rawMsg, key) - case "relayConnectionString": - err = unpopulate(val, "RelayConnectionString", &k.RelayConnectionString) + case "isDataAction": + err = unpopulate(val, "IsDataAction", &o.IsDataAction) delete(rawMsg, key) - case "serviceBusConnectionString": - err = unpopulate(val, "ServiceBusConnectionString", &k.ServiceBusConnectionString) + case "name": + err = unpopulate(val, "Name", &o.Name) delete(rawMsg, key) - case "vcName": - err = unpopulate(val, "VcName", &k.VcName) + case "origin": + err = unpopulate(val, "Origin", &o.Origin) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", k, err) + return fmt.Errorf("unmarshalling type %T: %v", o, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type KubernetesSchema. -func (k KubernetesSchema) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type OperationDisplay. +func (o OperationDisplay) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "properties", k.Properties) + populate(objectMap, "description", o.Description) + populate(objectMap, "operation", o.Operation) + populate(objectMap, "provider", o.Provider) + populate(objectMap, "resource", o.Resource) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type KubernetesSchema. -func (k *KubernetesSchema) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplay. +func (o *OperationDisplay) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", k, err) + return fmt.Errorf("unmarshalling type %T: %v", o, err) } for key, val := range rawMsg { var err error switch key { - case "properties": - err = unpopulate(val, "Properties", &k.Properties) + case "description": + err = unpopulate(val, "Description", &o.Description) + delete(rawMsg, key) + case "operation": + err = unpopulate(val, "Operation", &o.Operation) + delete(rawMsg, key) + case "provider": + err = unpopulate(val, "Provider", &o.Provider) + delete(rawMsg, key) + case "resource": + err = unpopulate(val, "Resource", &o.Resource) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", k, err) + return fmt.Errorf("unmarshalling type %T: %v", o, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ListAmlUserFeatureResult. -func (l ListAmlUserFeatureResult) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type OperationListResult. +func (o OperationListResult) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "nextLink", l.NextLink) - populate(objectMap, "value", l.Value) + populate(objectMap, "nextLink", o.NextLink) + populate(objectMap, "value", o.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ListAmlUserFeatureResult. -func (l *ListAmlUserFeatureResult) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type OperationListResult. +func (o *OperationListResult) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) + return fmt.Errorf("unmarshalling type %T: %v", o, err) } for key, val := range rawMsg { var err error switch key { case "nextLink": - err = unpopulate(val, "NextLink", &l.NextLink) + err = unpopulate(val, "NextLink", &o.NextLink) delete(rawMsg, key) case "value": - err = unpopulate(val, "Value", &l.Value) + err = unpopulate(val, "Value", &o.Value) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) + return fmt.Errorf("unmarshalling type %T: %v", o, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ListNotebookKeysResult. -func (l ListNotebookKeysResult) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type OutboundRule. +func (o OutboundRule) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "primaryAccessKey", l.PrimaryAccessKey) - populate(objectMap, "secondaryAccessKey", l.SecondaryAccessKey) + populate(objectMap, "category", o.Category) + populate(objectMap, "status", o.Status) + objectMap["type"] = o.Type return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ListNotebookKeysResult. -func (l *ListNotebookKeysResult) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type OutboundRule. +func (o *OutboundRule) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) + return fmt.Errorf("unmarshalling type %T: %v", o, err) } for key, val := range rawMsg { var err error switch key { - case "primaryAccessKey": - err = unpopulate(val, "PrimaryAccessKey", &l.PrimaryAccessKey) + case "category": + err = unpopulate(val, "Category", &o.Category) delete(rawMsg, key) - case "secondaryAccessKey": - err = unpopulate(val, "SecondaryAccessKey", &l.SecondaryAccessKey) + case "status": + err = unpopulate(val, "Status", &o.Status) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &o.Type) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) + return fmt.Errorf("unmarshalling type %T: %v", o, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ListStorageAccountKeysResult. -func (l ListStorageAccountKeysResult) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type OutboundRuleBasicResource. +func (o OutboundRuleBasicResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "userStorageKey", l.UserStorageKey) + populate(objectMap, "id", o.ID) + populate(objectMap, "name", o.Name) + populate(objectMap, "properties", o.Properties) + populate(objectMap, "systemData", o.SystemData) + populate(objectMap, "type", o.Type) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ListStorageAccountKeysResult. -func (l *ListStorageAccountKeysResult) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type OutboundRuleBasicResource. +func (o *OutboundRuleBasicResource) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) + return fmt.Errorf("unmarshalling type %T: %v", o, err) } for key, val := range rawMsg { var err error switch key { - case "userStorageKey": - err = unpopulate(val, "UserStorageKey", &l.UserStorageKey) + case "id": + err = unpopulate(val, "ID", &o.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &o.Name) + delete(rawMsg, key) + case "properties": + o.Properties, err = unmarshalOutboundRuleClassification(val) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &o.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &o.Type) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) + return fmt.Errorf("unmarshalling type %T: %v", o, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ListUsagesResult. -func (l ListUsagesResult) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type OutboundRuleListResult. +func (o OutboundRuleListResult) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "nextLink", l.NextLink) - populate(objectMap, "value", l.Value) + populate(objectMap, "nextLink", o.NextLink) + populate(objectMap, "value", o.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ListUsagesResult. -func (l *ListUsagesResult) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type OutboundRuleListResult. +func (o *OutboundRuleListResult) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) + return fmt.Errorf("unmarshalling type %T: %v", o, err) } for key, val := range rawMsg { var err error switch key { case "nextLink": - err = unpopulate(val, "NextLink", &l.NextLink) + err = unpopulate(val, "NextLink", &o.NextLink) delete(rawMsg, key) case "value": - err = unpopulate(val, "Value", &l.Value) + err = unpopulate(val, "Value", &o.Value) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) + return fmt.Errorf("unmarshalling type %T: %v", o, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ListWorkspaceKeysResult. -func (l ListWorkspaceKeysResult) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type OutputPathAssetReference. +func (o OutputPathAssetReference) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "appInsightsInstrumentationKey", l.AppInsightsInstrumentationKey) - populate(objectMap, "containerRegistryCredentials", l.ContainerRegistryCredentials) - populate(objectMap, "notebookAccessKeys", l.NotebookAccessKeys) - populate(objectMap, "userStorageKey", l.UserStorageKey) - populate(objectMap, "userStorageResourceId", l.UserStorageResourceID) + populate(objectMap, "jobId", o.JobID) + populate(objectMap, "path", o.Path) + objectMap["referenceType"] = ReferenceTypeOutputPath return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ListWorkspaceKeysResult. -func (l *ListWorkspaceKeysResult) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type OutputPathAssetReference. +func (o *OutputPathAssetReference) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) + return fmt.Errorf("unmarshalling type %T: %v", o, err) } for key, val := range rawMsg { var err error switch key { - case "appInsightsInstrumentationKey": - err = unpopulate(val, "AppInsightsInstrumentationKey", &l.AppInsightsInstrumentationKey) - delete(rawMsg, key) - case "containerRegistryCredentials": - err = unpopulate(val, "ContainerRegistryCredentials", &l.ContainerRegistryCredentials) - delete(rawMsg, key) - case "notebookAccessKeys": - err = unpopulate(val, "NotebookAccessKeys", &l.NotebookAccessKeys) + case "jobId": + err = unpopulate(val, "JobID", &o.JobID) delete(rawMsg, key) - case "userStorageKey": - err = unpopulate(val, "UserStorageKey", &l.UserStorageKey) + case "path": + err = unpopulate(val, "Path", &o.Path) delete(rawMsg, key) - case "userStorageResourceId": - err = unpopulate(val, "UserStorageResourceID", &l.UserStorageResourceID) + case "referenceType": + err = unpopulate(val, "ReferenceType", &o.ReferenceType) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) + return fmt.Errorf("unmarshalling type %T: %v", o, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ListWorkspaceQuotas. -func (l ListWorkspaceQuotas) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type PATAuthTypeWorkspaceConnectionProperties. +func (p PATAuthTypeWorkspaceConnectionProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "nextLink", l.NextLink) - populate(objectMap, "value", l.Value) + objectMap["authType"] = ConnectionAuthTypePAT + populate(objectMap, "category", p.Category) + populate(objectMap, "createdByWorkspaceArmId", p.CreatedByWorkspaceArmID) + populate(objectMap, "credentials", p.Credentials) + populateDateTimeRFC3339(objectMap, "expiryTime", p.ExpiryTime) + populate(objectMap, "group", p.Group) + populate(objectMap, "isSharedToAll", p.IsSharedToAll) + populate(objectMap, "metadata", p.Metadata) + populate(objectMap, "sharedUserList", p.SharedUserList) + populate(objectMap, "target", p.Target) + populate(objectMap, "value", p.Value) + populate(objectMap, "valueFormat", p.ValueFormat) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ListWorkspaceQuotas. -func (l *ListWorkspaceQuotas) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type PATAuthTypeWorkspaceConnectionProperties. +func (p *PATAuthTypeWorkspaceConnectionProperties) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) + return fmt.Errorf("unmarshalling type %T: %v", p, err) } for key, val := range rawMsg { var err error switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &l.NextLink) + case "authType": + err = unpopulate(val, "AuthType", &p.AuthType) + delete(rawMsg, key) + case "category": + err = unpopulate(val, "Category", &p.Category) + delete(rawMsg, key) + case "createdByWorkspaceArmId": + err = unpopulate(val, "CreatedByWorkspaceArmID", &p.CreatedByWorkspaceArmID) + delete(rawMsg, key) + case "credentials": + err = unpopulate(val, "Credentials", &p.Credentials) + delete(rawMsg, key) + case "expiryTime": + err = unpopulateDateTimeRFC3339(val, "ExpiryTime", &p.ExpiryTime) + delete(rawMsg, key) + case "group": + err = unpopulate(val, "Group", &p.Group) + delete(rawMsg, key) + case "isSharedToAll": + err = unpopulate(val, "IsSharedToAll", &p.IsSharedToAll) + delete(rawMsg, key) + case "metadata": + err = unpopulate(val, "Metadata", &p.Metadata) + delete(rawMsg, key) + case "sharedUserList": + err = unpopulate(val, "SharedUserList", &p.SharedUserList) + delete(rawMsg, key) + case "target": + err = unpopulate(val, "Target", &p.Target) delete(rawMsg, key) case "value": - err = unpopulate(val, "Value", &l.Value) + err = unpopulate(val, "Value", &p.Value) + delete(rawMsg, key) + case "valueFormat": + err = unpopulate(val, "ValueFormat", &p.ValueFormat) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) + return fmt.Errorf("unmarshalling type %T: %v", p, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type LiteralJobInput. -func (l LiteralJobInput) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type PaginatedComputeResourcesList. +func (p PaginatedComputeResourcesList) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "description", l.Description) - objectMap["jobInputType"] = JobInputTypeLiteral - populate(objectMap, "value", l.Value) + populate(objectMap, "nextLink", p.NextLink) + populate(objectMap, "value", p.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type LiteralJobInput. -func (l *LiteralJobInput) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type PaginatedComputeResourcesList. +func (p *PaginatedComputeResourcesList) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) + return fmt.Errorf("unmarshalling type %T: %v", p, err) } for key, val := range rawMsg { var err error switch key { - case "description": - err = unpopulate(val, "Description", &l.Description) - delete(rawMsg, key) - case "jobInputType": - err = unpopulate(val, "JobInputType", &l.JobInputType) + case "nextLink": + err = unpopulate(val, "NextLink", &p.NextLink) delete(rawMsg, key) case "value": - err = unpopulate(val, "Value", &l.Value) + err = unpopulate(val, "Value", &p.Value) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) + return fmt.Errorf("unmarshalling type %T: %v", p, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type MLFlowModelJobInput. -func (m MLFlowModelJobInput) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type PartialBatchDeployment. +func (p PartialBatchDeployment) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "description", m.Description) - objectMap["jobInputType"] = JobInputTypeMlflowModel - populate(objectMap, "mode", m.Mode) - populate(objectMap, "uri", m.URI) + populate(objectMap, "description", p.Description) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type MLFlowModelJobInput. -func (m *MLFlowModelJobInput) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type PartialBatchDeployment. +func (p *PartialBatchDeployment) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) + return fmt.Errorf("unmarshalling type %T: %v", p, err) } for key, val := range rawMsg { var err error switch key { case "description": - err = unpopulate(val, "Description", &m.Description) - delete(rawMsg, key) - case "jobInputType": - err = unpopulate(val, "JobInputType", &m.JobInputType) - delete(rawMsg, key) - case "mode": - err = unpopulate(val, "Mode", &m.Mode) - delete(rawMsg, key) - case "uri": - err = unpopulate(val, "URI", &m.URI) + err = unpopulate(val, "Description", &p.Description) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) + return fmt.Errorf("unmarshalling type %T: %v", p, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type MLFlowModelJobOutput. -func (m MLFlowModelJobOutput) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties. +func (p PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "description", m.Description) - objectMap["jobOutputType"] = JobOutputTypeMlflowModel - populate(objectMap, "mode", m.Mode) - populate(objectMap, "uri", m.URI) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "tags", p.Tags) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type MLFlowModelJobOutput. -func (m *MLFlowModelJobOutput) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties. +func (p *PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) + return fmt.Errorf("unmarshalling type %T: %v", p, err) } for key, val := range rawMsg { var err error switch key { - case "description": - err = unpopulate(val, "Description", &m.Description) - delete(rawMsg, key) - case "jobOutputType": - err = unpopulate(val, "JobOutputType", &m.JobOutputType) - delete(rawMsg, key) - case "mode": - err = unpopulate(val, "Mode", &m.Mode) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) delete(rawMsg, key) - case "uri": - err = unpopulate(val, "URI", &m.URI) + case "tags": + err = unpopulate(val, "Tags", &p.Tags) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) + return fmt.Errorf("unmarshalling type %T: %v", p, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type MLTableData. -func (m MLTableData) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type PartialManagedServiceIdentity. +func (p PartialManagedServiceIdentity) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - objectMap["dataType"] = DataTypeMltable - populate(objectMap, "dataUri", m.DataURI) - populate(objectMap, "description", m.Description) - populate(objectMap, "isAnonymous", m.IsAnonymous) - populate(objectMap, "isArchived", m.IsArchived) - populate(objectMap, "properties", m.Properties) - populate(objectMap, "referencedUris", m.ReferencedUris) - populate(objectMap, "tags", m.Tags) + populate(objectMap, "type", p.Type) + populate(objectMap, "userAssignedIdentities", p.UserAssignedIdentities) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type MLTableData. -func (m *MLTableData) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type PartialManagedServiceIdentity. +func (p *PartialManagedServiceIdentity) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) + return fmt.Errorf("unmarshalling type %T: %v", p, err) } for key, val := range rawMsg { var err error switch key { - case "dataType": - err = unpopulate(val, "DataType", &m.DataType) - delete(rawMsg, key) - case "dataUri": - err = unpopulate(val, "DataURI", &m.DataURI) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &m.Description) - delete(rawMsg, key) - case "isAnonymous": - err = unpopulate(val, "IsAnonymous", &m.IsAnonymous) - delete(rawMsg, key) - case "isArchived": - err = unpopulate(val, "IsArchived", &m.IsArchived) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &m.Properties) - delete(rawMsg, key) - case "referencedUris": - err = unpopulate(val, "ReferencedUris", &m.ReferencedUris) + case "type": + err = unpopulate(val, "Type", &p.Type) delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &m.Tags) + case "userAssignedIdentities": + err = unpopulate(val, "UserAssignedIdentities", &p.UserAssignedIdentities) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) + return fmt.Errorf("unmarshalling type %T: %v", p, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type MLTableJobInput. -func (m MLTableJobInput) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type PartialMinimalTrackedResource. +func (p PartialMinimalTrackedResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "description", m.Description) - objectMap["jobInputType"] = JobInputTypeMltable - populate(objectMap, "mode", m.Mode) - populate(objectMap, "uri", m.URI) + populate(objectMap, "tags", p.Tags) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type MLTableJobInput. -func (m *MLTableJobInput) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type PartialMinimalTrackedResource. +func (p *PartialMinimalTrackedResource) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) + return fmt.Errorf("unmarshalling type %T: %v", p, err) } for key, val := range rawMsg { var err error switch key { - case "description": - err = unpopulate(val, "Description", &m.Description) - delete(rawMsg, key) - case "jobInputType": - err = unpopulate(val, "JobInputType", &m.JobInputType) - delete(rawMsg, key) - case "mode": - err = unpopulate(val, "Mode", &m.Mode) - delete(rawMsg, key) - case "uri": - err = unpopulate(val, "URI", &m.URI) + case "tags": + err = unpopulate(val, "Tags", &p.Tags) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) + return fmt.Errorf("unmarshalling type %T: %v", p, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type MLTableJobOutput. -func (m MLTableJobOutput) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type PartialMinimalTrackedResourceWithIdentity. +func (p PartialMinimalTrackedResourceWithIdentity) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "description", m.Description) - objectMap["jobOutputType"] = JobOutputTypeMltable - populate(objectMap, "mode", m.Mode) - populate(objectMap, "uri", m.URI) + populate(objectMap, "identity", p.Identity) + populate(objectMap, "tags", p.Tags) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type MLTableJobOutput. -func (m *MLTableJobOutput) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type PartialMinimalTrackedResourceWithIdentity. +func (p *PartialMinimalTrackedResourceWithIdentity) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) + return fmt.Errorf("unmarshalling type %T: %v", p, err) } for key, val := range rawMsg { var err error switch key { - case "description": - err = unpopulate(val, "Description", &m.Description) - delete(rawMsg, key) - case "jobOutputType": - err = unpopulate(val, "JobOutputType", &m.JobOutputType) - delete(rawMsg, key) - case "mode": - err = unpopulate(val, "Mode", &m.Mode) + case "identity": + err = unpopulate(val, "Identity", &p.Identity) delete(rawMsg, key) - case "uri": - err = unpopulate(val, "URI", &m.URI) + case "tags": + err = unpopulate(val, "Tags", &p.Tags) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) + return fmt.Errorf("unmarshalling type %T: %v", p, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedIdentity. -func (m ManagedIdentity) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type PartialMinimalTrackedResourceWithSKU. +func (p PartialMinimalTrackedResourceWithSKU) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "clientId", m.ClientID) - objectMap["identityType"] = IdentityConfigurationTypeManaged - populate(objectMap, "objectId", m.ObjectID) - populate(objectMap, "resourceId", m.ResourceID) + populate(objectMap, "sku", p.SKU) + populate(objectMap, "tags", p.Tags) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedIdentity. -func (m *ManagedIdentity) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type PartialMinimalTrackedResourceWithSKU. +func (p *PartialMinimalTrackedResourceWithSKU) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) + return fmt.Errorf("unmarshalling type %T: %v", p, err) } for key, val := range rawMsg { var err error switch key { - case "clientId": - err = unpopulate(val, "ClientID", &m.ClientID) - delete(rawMsg, key) - case "identityType": - err = unpopulate(val, "IdentityType", &m.IdentityType) - delete(rawMsg, key) - case "objectId": - err = unpopulate(val, "ObjectID", &m.ObjectID) + case "sku": + err = unpopulate(val, "SKU", &p.SKU) delete(rawMsg, key) - case "resourceId": - err = unpopulate(val, "ResourceID", &m.ResourceID) + case "tags": + err = unpopulate(val, "Tags", &p.Tags) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) + return fmt.Errorf("unmarshalling type %T: %v", p, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedIdentityAuthTypeWorkspaceConnectionProperties. -func (m ManagedIdentityAuthTypeWorkspaceConnectionProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type PartialMinimalTrackedResourceWithSKUAndIdentity. +func (p PartialMinimalTrackedResourceWithSKUAndIdentity) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - objectMap["authType"] = ConnectionAuthTypeManagedIdentity - populate(objectMap, "category", m.Category) - populate(objectMap, "credentials", m.Credentials) - populate(objectMap, "target", m.Target) - populate(objectMap, "value", m.Value) - populate(objectMap, "valueFormat", m.ValueFormat) + populate(objectMap, "identity", p.Identity) + populate(objectMap, "sku", p.SKU) + populate(objectMap, "tags", p.Tags) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedIdentityAuthTypeWorkspaceConnectionProperties. -func (m *ManagedIdentityAuthTypeWorkspaceConnectionProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type PartialMinimalTrackedResourceWithSKUAndIdentity. +func (p *PartialMinimalTrackedResourceWithSKUAndIdentity) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) + return fmt.Errorf("unmarshalling type %T: %v", p, err) } for key, val := range rawMsg { var err error switch key { - case "authType": - err = unpopulate(val, "AuthType", &m.AuthType) - delete(rawMsg, key) - case "category": - err = unpopulate(val, "Category", &m.Category) - delete(rawMsg, key) - case "credentials": - err = unpopulate(val, "Credentials", &m.Credentials) - delete(rawMsg, key) - case "target": - err = unpopulate(val, "Target", &m.Target) + case "identity": + err = unpopulate(val, "Identity", &p.Identity) delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &m.Value) + case "sku": + err = unpopulate(val, "SKU", &p.SKU) delete(rawMsg, key) - case "valueFormat": - err = unpopulate(val, "ValueFormat", &m.ValueFormat) + case "tags": + err = unpopulate(val, "Tags", &p.Tags) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) + return fmt.Errorf("unmarshalling type %T: %v", p, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedOnlineDeployment. -func (m ManagedOnlineDeployment) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type PartialRegistryPartialTrackedResource. +func (p PartialRegistryPartialTrackedResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "appInsightsEnabled", m.AppInsightsEnabled) - populate(objectMap, "codeConfiguration", m.CodeConfiguration) - populate(objectMap, "description", m.Description) - populate(objectMap, "egressPublicNetworkAccess", m.EgressPublicNetworkAccess) - objectMap["endpointComputeType"] = EndpointComputeTypeManaged - populate(objectMap, "environmentId", m.EnvironmentID) - populate(objectMap, "environmentVariables", m.EnvironmentVariables) - populate(objectMap, "instanceType", m.InstanceType) - populate(objectMap, "livenessProbe", m.LivenessProbe) - populate(objectMap, "model", m.Model) - populate(objectMap, "modelMountPath", m.ModelMountPath) - populate(objectMap, "properties", m.Properties) - populate(objectMap, "provisioningState", m.ProvisioningState) - populate(objectMap, "readinessProbe", m.ReadinessProbe) - populate(objectMap, "requestSettings", m.RequestSettings) - populate(objectMap, "scaleSettings", m.ScaleSettings) + populate(objectMap, "identity", p.Identity) + populate(objectMap, "sku", p.SKU) + populate(objectMap, "tags", p.Tags) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedOnlineDeployment. -func (m *ManagedOnlineDeployment) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type PartialRegistryPartialTrackedResource. +func (p *PartialRegistryPartialTrackedResource) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) + return fmt.Errorf("unmarshalling type %T: %v", p, err) } for key, val := range rawMsg { var err error switch key { - case "appInsightsEnabled": - err = unpopulate(val, "AppInsightsEnabled", &m.AppInsightsEnabled) - delete(rawMsg, key) - case "codeConfiguration": - err = unpopulate(val, "CodeConfiguration", &m.CodeConfiguration) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &m.Description) - delete(rawMsg, key) - case "egressPublicNetworkAccess": - err = unpopulate(val, "EgressPublicNetworkAccess", &m.EgressPublicNetworkAccess) - delete(rawMsg, key) - case "endpointComputeType": - err = unpopulate(val, "EndpointComputeType", &m.EndpointComputeType) - delete(rawMsg, key) - case "environmentId": - err = unpopulate(val, "EnvironmentID", &m.EnvironmentID) - delete(rawMsg, key) - case "environmentVariables": - err = unpopulate(val, "EnvironmentVariables", &m.EnvironmentVariables) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &m.InstanceType) - delete(rawMsg, key) - case "livenessProbe": - err = unpopulate(val, "LivenessProbe", &m.LivenessProbe) - delete(rawMsg, key) - case "model": - err = unpopulate(val, "Model", &m.Model) - delete(rawMsg, key) - case "modelMountPath": - err = unpopulate(val, "ModelMountPath", &m.ModelMountPath) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &m.Properties) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &m.ProvisioningState) - delete(rawMsg, key) - case "readinessProbe": - err = unpopulate(val, "ReadinessProbe", &m.ReadinessProbe) + case "identity": + err = unpopulate(val, "Identity", &p.Identity) delete(rawMsg, key) - case "requestSettings": - err = unpopulate(val, "RequestSettings", &m.RequestSettings) + case "sku": + err = unpopulate(val, "SKU", &p.SKU) delete(rawMsg, key) - case "scaleSettings": - m.ScaleSettings, err = unmarshalOnlineScaleSettingsClassification(val) + case "tags": + err = unpopulate(val, "Tags", &p.Tags) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) + return fmt.Errorf("unmarshalling type %T: %v", p, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedServiceIdentity. -func (m ManagedServiceIdentity) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type PartialSKU. +func (p PartialSKU) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "principalId", m.PrincipalID) - populate(objectMap, "tenantId", m.TenantID) - populate(objectMap, "type", m.Type) - populate(objectMap, "userAssignedIdentities", m.UserAssignedIdentities) + populate(objectMap, "capacity", p.Capacity) + populate(objectMap, "family", p.Family) + populate(objectMap, "name", p.Name) + populate(objectMap, "size", p.Size) + populate(objectMap, "tier", p.Tier) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedServiceIdentity. -func (m *ManagedServiceIdentity) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type PartialSKU. +func (p *PartialSKU) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) + return fmt.Errorf("unmarshalling type %T: %v", p, err) } for key, val := range rawMsg { var err error switch key { - case "principalId": - err = unpopulate(val, "PrincipalID", &m.PrincipalID) + case "capacity": + err = unpopulate(val, "Capacity", &p.Capacity) delete(rawMsg, key) - case "tenantId": - err = unpopulate(val, "TenantID", &m.TenantID) + case "family": + err = unpopulate(val, "Family", &p.Family) delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &m.Type) + case "name": + err = unpopulate(val, "Name", &p.Name) delete(rawMsg, key) - case "userAssignedIdentities": - err = unpopulate(val, "UserAssignedIdentities", &m.UserAssignedIdentities) + case "size": + err = unpopulate(val, "Size", &p.Size) + delete(rawMsg, key) + case "tier": + err = unpopulate(val, "Tier", &p.Tier) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) + return fmt.Errorf("unmarshalling type %T: %v", p, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type MedianStoppingPolicy. -func (m MedianStoppingPolicy) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type Password. +func (p Password) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "delayEvaluation", m.DelayEvaluation) - populate(objectMap, "evaluationInterval", m.EvaluationInterval) - objectMap["policyType"] = EarlyTerminationPolicyTypeMedianStopping + populate(objectMap, "name", p.Name) + populate(objectMap, "value", p.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type MedianStoppingPolicy. -func (m *MedianStoppingPolicy) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type Password. +func (p *Password) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) + return fmt.Errorf("unmarshalling type %T: %v", p, err) } for key, val := range rawMsg { var err error switch key { - case "delayEvaluation": - err = unpopulate(val, "DelayEvaluation", &m.DelayEvaluation) - delete(rawMsg, key) - case "evaluationInterval": - err = unpopulate(val, "EvaluationInterval", &m.EvaluationInterval) + case "name": + err = unpopulate(val, "Name", &p.Name) delete(rawMsg, key) - case "policyType": - err = unpopulate(val, "PolicyType", &m.PolicyType) + case "value": + err = unpopulate(val, "Value", &p.Value) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) + return fmt.Errorf("unmarshalling type %T: %v", p, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ModelContainer. -func (m ModelContainer) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type PendingUploadCredentialDto. +func (p PendingUploadCredentialDto) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "id", m.ID) - populate(objectMap, "name", m.Name) - populate(objectMap, "properties", m.Properties) - populate(objectMap, "systemData", m.SystemData) - populate(objectMap, "type", m.Type) + objectMap["credentialType"] = p.CredentialType return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ModelContainer. -func (m *ModelContainer) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type PendingUploadCredentialDto. +func (p *PendingUploadCredentialDto) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) + return fmt.Errorf("unmarshalling type %T: %v", p, err) } for key, val := range rawMsg { var err error switch key { - case "id": - err = unpopulate(val, "ID", &m.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &m.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &m.Properties) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &m.SystemData) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &m.Type) + case "credentialType": + err = unpopulate(val, "CredentialType", &p.CredentialType) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) + return fmt.Errorf("unmarshalling type %T: %v", p, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ModelContainerProperties. -func (m ModelContainerProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type PendingUploadRequestDto. +func (p PendingUploadRequestDto) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "description", m.Description) - populate(objectMap, "isArchived", m.IsArchived) - populate(objectMap, "latestVersion", m.LatestVersion) - populate(objectMap, "nextVersion", m.NextVersion) - populate(objectMap, "properties", m.Properties) - populate(objectMap, "tags", m.Tags) + populate(objectMap, "pendingUploadId", p.PendingUploadID) + populate(objectMap, "pendingUploadType", p.PendingUploadType) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ModelContainerProperties. -func (m *ModelContainerProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type PendingUploadRequestDto. +func (p *PendingUploadRequestDto) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) + return fmt.Errorf("unmarshalling type %T: %v", p, err) } for key, val := range rawMsg { var err error switch key { - case "description": - err = unpopulate(val, "Description", &m.Description) - delete(rawMsg, key) - case "isArchived": - err = unpopulate(val, "IsArchived", &m.IsArchived) - delete(rawMsg, key) - case "latestVersion": - err = unpopulate(val, "LatestVersion", &m.LatestVersion) - delete(rawMsg, key) - case "nextVersion": - err = unpopulate(val, "NextVersion", &m.NextVersion) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &m.Properties) + case "pendingUploadId": + err = unpopulate(val, "PendingUploadID", &p.PendingUploadID) delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &m.Tags) + case "pendingUploadType": + err = unpopulate(val, "PendingUploadType", &p.PendingUploadType) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) + return fmt.Errorf("unmarshalling type %T: %v", p, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ModelContainerResourceArmPaginatedResult. -func (m ModelContainerResourceArmPaginatedResult) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type PendingUploadResponseDto. +func (p PendingUploadResponseDto) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "nextLink", m.NextLink) - populate(objectMap, "value", m.Value) + populate(objectMap, "blobReferenceForConsumption", p.BlobReferenceForConsumption) + populate(objectMap, "pendingUploadId", p.PendingUploadID) + populate(objectMap, "pendingUploadType", p.PendingUploadType) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ModelContainerResourceArmPaginatedResult. -func (m *ModelContainerResourceArmPaginatedResult) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type PendingUploadResponseDto. +func (p *PendingUploadResponseDto) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) + return fmt.Errorf("unmarshalling type %T: %v", p, err) } for key, val := range rawMsg { var err error switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &m.NextLink) + case "blobReferenceForConsumption": + err = unpopulate(val, "BlobReferenceForConsumption", &p.BlobReferenceForConsumption) delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &m.Value) + case "pendingUploadId": + err = unpopulate(val, "PendingUploadID", &p.PendingUploadID) + delete(rawMsg, key) + case "pendingUploadType": + err = unpopulate(val, "PendingUploadType", &p.PendingUploadType) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) + return fmt.Errorf("unmarshalling type %T: %v", p, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ModelVersion. -func (m ModelVersion) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type PersonalComputeInstanceSettings. +func (p PersonalComputeInstanceSettings) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "id", m.ID) - populate(objectMap, "name", m.Name) - populate(objectMap, "properties", m.Properties) - populate(objectMap, "systemData", m.SystemData) - populate(objectMap, "type", m.Type) + populate(objectMap, "assignedUser", p.AssignedUser) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ModelVersion. -func (m *ModelVersion) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type PersonalComputeInstanceSettings. +func (p *PersonalComputeInstanceSettings) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) + return fmt.Errorf("unmarshalling type %T: %v", p, err) } for key, val := range rawMsg { var err error switch key { - case "id": - err = unpopulate(val, "ID", &m.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &m.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &m.Properties) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &m.SystemData) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &m.Type) + case "assignedUser": + err = unpopulate(val, "AssignedUser", &p.AssignedUser) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) + return fmt.Errorf("unmarshalling type %T: %v", p, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ModelVersionProperties. -func (m ModelVersionProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type PipelineJob. +func (p PipelineJob) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "description", m.Description) - populate(objectMap, "flavors", m.Flavors) - populate(objectMap, "isAnonymous", m.IsAnonymous) - populate(objectMap, "isArchived", m.IsArchived) - populate(objectMap, "jobName", m.JobName) - populate(objectMap, "modelType", m.ModelType) - populate(objectMap, "modelUri", m.ModelURI) - populate(objectMap, "properties", m.Properties) - populate(objectMap, "tags", m.Tags) + populate(objectMap, "componentId", p.ComponentID) + populate(objectMap, "computeId", p.ComputeID) + populate(objectMap, "description", p.Description) + populate(objectMap, "displayName", p.DisplayName) + populate(objectMap, "experimentName", p.ExperimentName) + populate(objectMap, "identity", p.Identity) + populate(objectMap, "inputs", p.Inputs) + populate(objectMap, "isArchived", p.IsArchived) + objectMap["jobType"] = JobTypePipeline + populate(objectMap, "jobs", p.Jobs) + populate(objectMap, "notificationSetting", p.NotificationSetting) + populate(objectMap, "outputs", p.Outputs) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "services", p.Services) + populateAny(objectMap, "settings", p.Settings) + populate(objectMap, "sourceJobId", p.SourceJobID) + populate(objectMap, "status", p.Status) + populate(objectMap, "tags", p.Tags) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ModelVersionProperties. -func (m *ModelVersionProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type PipelineJob. +func (p *PipelineJob) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) + return fmt.Errorf("unmarshalling type %T: %v", p, err) } for key, val := range rawMsg { var err error switch key { + case "componentId": + err = unpopulate(val, "ComponentID", &p.ComponentID) + delete(rawMsg, key) + case "computeId": + err = unpopulate(val, "ComputeID", &p.ComputeID) + delete(rawMsg, key) case "description": - err = unpopulate(val, "Description", &m.Description) + err = unpopulate(val, "Description", &p.Description) delete(rawMsg, key) - case "flavors": - err = unpopulate(val, "Flavors", &m.Flavors) + case "displayName": + err = unpopulate(val, "DisplayName", &p.DisplayName) delete(rawMsg, key) - case "isAnonymous": - err = unpopulate(val, "IsAnonymous", &m.IsAnonymous) + case "experimentName": + err = unpopulate(val, "ExperimentName", &p.ExperimentName) + delete(rawMsg, key) + case "identity": + p.Identity, err = unmarshalIdentityConfigurationClassification(val) + delete(rawMsg, key) + case "inputs": + p.Inputs, err = unmarshalJobInputClassificationMap(val) delete(rawMsg, key) case "isArchived": - err = unpopulate(val, "IsArchived", &m.IsArchived) + err = unpopulate(val, "IsArchived", &p.IsArchived) delete(rawMsg, key) - case "jobName": - err = unpopulate(val, "JobName", &m.JobName) + case "jobType": + err = unpopulate(val, "JobType", &p.JobType) delete(rawMsg, key) - case "modelType": - err = unpopulate(val, "ModelType", &m.ModelType) + case "jobs": + err = unpopulate(val, "Jobs", &p.Jobs) delete(rawMsg, key) - case "modelUri": - err = unpopulate(val, "ModelURI", &m.ModelURI) + case "notificationSetting": + err = unpopulate(val, "NotificationSetting", &p.NotificationSetting) + delete(rawMsg, key) + case "outputs": + p.Outputs, err = unmarshalJobOutputClassificationMap(val) delete(rawMsg, key) case "properties": - err = unpopulate(val, "Properties", &m.Properties) + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + case "services": + err = unpopulate(val, "Services", &p.Services) + delete(rawMsg, key) + case "settings": + err = unpopulate(val, "Settings", &p.Settings) + delete(rawMsg, key) + case "sourceJobId": + err = unpopulate(val, "SourceJobID", &p.SourceJobID) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &p.Status) delete(rawMsg, key) case "tags": - err = unpopulate(val, "Tags", &m.Tags) + err = unpopulate(val, "Tags", &p.Tags) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) + return fmt.Errorf("unmarshalling type %T: %v", p, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ModelVersionResourceArmPaginatedResult. -func (m ModelVersionResourceArmPaginatedResult) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type PredictionDriftMetricThresholdBase. +func (p PredictionDriftMetricThresholdBase) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "nextLink", m.NextLink) - populate(objectMap, "value", m.Value) + objectMap["dataType"] = p.DataType + populate(objectMap, "threshold", p.Threshold) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ModelVersionResourceArmPaginatedResult. -func (m *ModelVersionResourceArmPaginatedResult) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type PredictionDriftMetricThresholdBase. +func (p *PredictionDriftMetricThresholdBase) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) + return fmt.Errorf("unmarshalling type %T: %v", p, err) } for key, val := range rawMsg { var err error switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &m.NextLink) + case "dataType": + err = unpopulate(val, "DataType", &p.DataType) delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &m.Value) + case "threshold": + err = unpopulate(val, "Threshold", &p.Threshold) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) + return fmt.Errorf("unmarshalling type %T: %v", p, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type Mpi. -func (m Mpi) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type PredictionDriftMonitoringSignal. +func (p PredictionDriftMonitoringSignal) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - objectMap["distributionType"] = DistributionTypeMpi - populate(objectMap, "processCountPerInstance", m.ProcessCountPerInstance) + populate(objectMap, "featureDataTypeOverride", p.FeatureDataTypeOverride) + populate(objectMap, "metricThresholds", p.MetricThresholds) + populate(objectMap, "notificationTypes", p.NotificationTypes) + populate(objectMap, "productionData", p.ProductionData) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "referenceData", p.ReferenceData) + objectMap["signalType"] = MonitoringSignalTypePredictionDrift return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type Mpi. -func (m *Mpi) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type PredictionDriftMonitoringSignal. +func (p *PredictionDriftMonitoringSignal) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) + return fmt.Errorf("unmarshalling type %T: %v", p, err) } for key, val := range rawMsg { var err error switch key { - case "distributionType": - err = unpopulate(val, "DistributionType", &m.DistributionType) + case "featureDataTypeOverride": + err = unpopulate(val, "FeatureDataTypeOverride", &p.FeatureDataTypeOverride) delete(rawMsg, key) - case "processCountPerInstance": - err = unpopulate(val, "ProcessCountPerInstance", &m.ProcessCountPerInstance) + case "metricThresholds": + p.MetricThresholds, err = unmarshalPredictionDriftMetricThresholdBaseClassificationArray(val) + delete(rawMsg, key) + case "notificationTypes": + err = unpopulate(val, "NotificationTypes", &p.NotificationTypes) + delete(rawMsg, key) + case "productionData": + p.ProductionData, err = unmarshalMonitoringInputDataBaseClassification(val) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + case "referenceData": + p.ReferenceData, err = unmarshalMonitoringInputDataBaseClassification(val) + delete(rawMsg, key) + case "signalType": + err = unpopulate(val, "SignalType", &p.SignalType) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) + return fmt.Errorf("unmarshalling type %T: %v", p, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type NCrossValidations. -func (n NCrossValidations) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type PrivateEndpoint. +func (p PrivateEndpoint) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - objectMap["mode"] = n.Mode + populate(objectMap, "id", p.ID) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type NCrossValidations. -func (n *NCrossValidations) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpoint. +func (p *PrivateEndpoint) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) + return fmt.Errorf("unmarshalling type %T: %v", p, err) } for key, val := range rawMsg { var err error switch key { - case "mode": - err = unpopulate(val, "Mode", &n.Mode) + case "id": + err = unpopulate(val, "ID", &p.ID) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) + return fmt.Errorf("unmarshalling type %T: %v", p, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type NlpVertical. -func (n NlpVertical) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnection. +func (p PrivateEndpointConnection) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "featurizationSettings", n.FeaturizationSettings) - populate(objectMap, "limitSettings", n.LimitSettings) - populate(objectMap, "validationData", n.ValidationData) + populate(objectMap, "id", p.ID) + populate(objectMap, "identity", p.Identity) + populate(objectMap, "location", p.Location) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "sku", p.SKU) + populate(objectMap, "systemData", p.SystemData) + populate(objectMap, "tags", p.Tags) + populate(objectMap, "type", p.Type) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type NlpVertical. -func (n *NlpVertical) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnection. +func (p *PrivateEndpointConnection) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) + return fmt.Errorf("unmarshalling type %T: %v", p, err) } for key, val := range rawMsg { var err error switch key { - case "featurizationSettings": - err = unpopulate(val, "FeaturizationSettings", &n.FeaturizationSettings) + case "id": + err = unpopulate(val, "ID", &p.ID) delete(rawMsg, key) - case "limitSettings": - err = unpopulate(val, "LimitSettings", &n.LimitSettings) + case "identity": + err = unpopulate(val, "Identity", &p.Identity) delete(rawMsg, key) - case "validationData": - err = unpopulate(val, "ValidationData", &n.ValidationData) + case "location": + err = unpopulate(val, "Location", &p.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &p.SKU) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &p.SystemData) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &p.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) + return fmt.Errorf("unmarshalling type %T: %v", p, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type NlpVerticalFeaturizationSettings. -func (n NlpVerticalFeaturizationSettings) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionListResult. +func (p PrivateEndpointConnectionListResult) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "datasetLanguage", n.DatasetLanguage) + populate(objectMap, "value", p.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type NlpVerticalFeaturizationSettings. -func (n *NlpVerticalFeaturizationSettings) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionListResult. +func (p *PrivateEndpointConnectionListResult) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) + return fmt.Errorf("unmarshalling type %T: %v", p, err) } for key, val := range rawMsg { var err error switch key { - case "datasetLanguage": - err = unpopulate(val, "DatasetLanguage", &n.DatasetLanguage) + case "value": + err = unpopulate(val, "Value", &p.Value) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) + return fmt.Errorf("unmarshalling type %T: %v", p, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type NlpVerticalLimitSettings. -func (n NlpVerticalLimitSettings) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionProperties. +func (p PrivateEndpointConnectionProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "maxConcurrentTrials", n.MaxConcurrentTrials) - populate(objectMap, "maxTrials", n.MaxTrials) - populate(objectMap, "timeout", n.Timeout) + populate(objectMap, "privateEndpoint", p.PrivateEndpoint) + populate(objectMap, "privateLinkServiceConnectionState", p.PrivateLinkServiceConnectionState) + populate(objectMap, "provisioningState", p.ProvisioningState) return json.Marshal(objectMap) } - -// UnmarshalJSON implements the json.Unmarshaller interface for type NlpVerticalLimitSettings. -func (n *NlpVerticalLimitSettings) UnmarshalJSON(data []byte) error { + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionProperties. +func (p *PrivateEndpointConnectionProperties) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) + return fmt.Errorf("unmarshalling type %T: %v", p, err) } for key, val := range rawMsg { var err error switch key { - case "maxConcurrentTrials": - err = unpopulate(val, "MaxConcurrentTrials", &n.MaxConcurrentTrials) + case "privateEndpoint": + err = unpopulate(val, "PrivateEndpoint", &p.PrivateEndpoint) delete(rawMsg, key) - case "maxTrials": - err = unpopulate(val, "MaxTrials", &n.MaxTrials) + case "privateLinkServiceConnectionState": + err = unpopulate(val, "PrivateLinkServiceConnectionState", &p.PrivateLinkServiceConnectionState) delete(rawMsg, key) - case "timeout": - err = unpopulate(val, "Timeout", &n.Timeout) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &p.ProvisioningState) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) + return fmt.Errorf("unmarshalling type %T: %v", p, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type NodeStateCounts. -func (n NodeStateCounts) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointDestination. +func (p PrivateEndpointDestination) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "idleNodeCount", n.IdleNodeCount) - populate(objectMap, "leavingNodeCount", n.LeavingNodeCount) - populate(objectMap, "preemptedNodeCount", n.PreemptedNodeCount) - populate(objectMap, "preparingNodeCount", n.PreparingNodeCount) - populate(objectMap, "runningNodeCount", n.RunningNodeCount) - populate(objectMap, "unusableNodeCount", n.UnusableNodeCount) + populate(objectMap, "serviceResourceId", p.ServiceResourceID) + populate(objectMap, "sparkEnabled", p.SparkEnabled) + populate(objectMap, "sparkStatus", p.SparkStatus) + populate(objectMap, "subresourceTarget", p.SubresourceTarget) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type NodeStateCounts. -func (n *NodeStateCounts) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointDestination. +func (p *PrivateEndpointDestination) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) + return fmt.Errorf("unmarshalling type %T: %v", p, err) } for key, val := range rawMsg { var err error switch key { - case "idleNodeCount": - err = unpopulate(val, "IdleNodeCount", &n.IdleNodeCount) - delete(rawMsg, key) - case "leavingNodeCount": - err = unpopulate(val, "LeavingNodeCount", &n.LeavingNodeCount) + case "serviceResourceId": + err = unpopulate(val, "ServiceResourceID", &p.ServiceResourceID) delete(rawMsg, key) - case "preemptedNodeCount": - err = unpopulate(val, "PreemptedNodeCount", &n.PreemptedNodeCount) - delete(rawMsg, key) - case "preparingNodeCount": - err = unpopulate(val, "PreparingNodeCount", &n.PreparingNodeCount) + case "sparkEnabled": + err = unpopulate(val, "SparkEnabled", &p.SparkEnabled) delete(rawMsg, key) - case "runningNodeCount": - err = unpopulate(val, "RunningNodeCount", &n.RunningNodeCount) + case "sparkStatus": + err = unpopulate(val, "SparkStatus", &p.SparkStatus) delete(rawMsg, key) - case "unusableNodeCount": - err = unpopulate(val, "UnusableNodeCount", &n.UnusableNodeCount) + case "subresourceTarget": + err = unpopulate(val, "SubresourceTarget", &p.SubresourceTarget) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) + return fmt.Errorf("unmarshalling type %T: %v", p, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type NoneAuthTypeWorkspaceConnectionProperties. -func (n NoneAuthTypeWorkspaceConnectionProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointOutboundRule. +func (p PrivateEndpointOutboundRule) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - objectMap["authType"] = ConnectionAuthTypeNone - populate(objectMap, "category", n.Category) - populate(objectMap, "target", n.Target) - populate(objectMap, "value", n.Value) - populate(objectMap, "valueFormat", n.ValueFormat) + populate(objectMap, "category", p.Category) + populate(objectMap, "destination", p.Destination) + populate(objectMap, "status", p.Status) + objectMap["type"] = RuleTypePrivateEndpoint return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type NoneAuthTypeWorkspaceConnectionProperties. -func (n *NoneAuthTypeWorkspaceConnectionProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointOutboundRule. +func (p *PrivateEndpointOutboundRule) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) + return fmt.Errorf("unmarshalling type %T: %v", p, err) } for key, val := range rawMsg { var err error switch key { - case "authType": - err = unpopulate(val, "AuthType", &n.AuthType) - delete(rawMsg, key) case "category": - err = unpopulate(val, "Category", &n.Category) + err = unpopulate(val, "Category", &p.Category) delete(rawMsg, key) - case "target": - err = unpopulate(val, "Target", &n.Target) + case "destination": + err = unpopulate(val, "Destination", &p.Destination) delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &n.Value) + case "status": + err = unpopulate(val, "Status", &p.Status) delete(rawMsg, key) - case "valueFormat": - err = unpopulate(val, "ValueFormat", &n.ValueFormat) + case "type": + err = unpopulate(val, "Type", &p.Type) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) + return fmt.Errorf("unmarshalling type %T: %v", p, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type NoneDatastoreCredentials. -func (n NoneDatastoreCredentials) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointResource. +func (p PrivateEndpointResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - objectMap["credentialsType"] = CredentialsTypeNone + populate(objectMap, "id", p.ID) + populate(objectMap, "subnetArmId", p.SubnetArmID) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type NoneDatastoreCredentials. -func (n *NoneDatastoreCredentials) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointResource. +func (p *PrivateEndpointResource) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) + return fmt.Errorf("unmarshalling type %T: %v", p, err) } for key, val := range rawMsg { var err error switch key { - case "credentialsType": - err = unpopulate(val, "CredentialsType", &n.CredentialsType) + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "subnetArmId": + err = unpopulate(val, "SubnetArmID", &p.SubnetArmID) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) + return fmt.Errorf("unmarshalling type %T: %v", p, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type NotebookAccessTokenResult. -func (n NotebookAccessTokenResult) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type PrivateLinkResource. +func (p PrivateLinkResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "accessToken", n.AccessToken) - populate(objectMap, "expiresIn", n.ExpiresIn) - populate(objectMap, "hostName", n.HostName) - populate(objectMap, "notebookResourceId", n.NotebookResourceID) - populate(objectMap, "publicDns", n.PublicDNS) - populate(objectMap, "refreshToken", n.RefreshToken) - populate(objectMap, "scope", n.Scope) - populate(objectMap, "tokenType", n.TokenType) + populate(objectMap, "id", p.ID) + populate(objectMap, "identity", p.Identity) + populate(objectMap, "location", p.Location) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "sku", p.SKU) + populate(objectMap, "systemData", p.SystemData) + populate(objectMap, "tags", p.Tags) + populate(objectMap, "type", p.Type) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type NotebookAccessTokenResult. -func (n *NotebookAccessTokenResult) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResource. +func (p *PrivateLinkResource) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) + return fmt.Errorf("unmarshalling type %T: %v", p, err) } for key, val := range rawMsg { var err error switch key { - case "accessToken": - err = unpopulate(val, "AccessToken", &n.AccessToken) + case "id": + err = unpopulate(val, "ID", &p.ID) delete(rawMsg, key) - case "expiresIn": - err = unpopulate(val, "ExpiresIn", &n.ExpiresIn) + case "identity": + err = unpopulate(val, "Identity", &p.Identity) delete(rawMsg, key) - case "hostName": - err = unpopulate(val, "HostName", &n.HostName) + case "location": + err = unpopulate(val, "Location", &p.Location) delete(rawMsg, key) - case "notebookResourceId": - err = unpopulate(val, "NotebookResourceID", &n.NotebookResourceID) + case "name": + err = unpopulate(val, "Name", &p.Name) delete(rawMsg, key) - case "publicDns": - err = unpopulate(val, "PublicDNS", &n.PublicDNS) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) delete(rawMsg, key) - case "refreshToken": - err = unpopulate(val, "RefreshToken", &n.RefreshToken) + case "sku": + err = unpopulate(val, "SKU", &p.SKU) delete(rawMsg, key) - case "scope": - err = unpopulate(val, "Scope", &n.Scope) + case "systemData": + err = unpopulate(val, "SystemData", &p.SystemData) delete(rawMsg, key) - case "tokenType": - err = unpopulate(val, "TokenType", &n.TokenType) + case "tags": + err = unpopulate(val, "Tags", &p.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) + return fmt.Errorf("unmarshalling type %T: %v", p, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type NotebookPreparationError. -func (n NotebookPreparationError) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourceListResult. +func (p PrivateLinkResourceListResult) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "errorMessage", n.ErrorMessage) - populate(objectMap, "statusCode", n.StatusCode) + populate(objectMap, "value", p.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type NotebookPreparationError. -func (n *NotebookPreparationError) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResourceListResult. +func (p *PrivateLinkResourceListResult) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) + return fmt.Errorf("unmarshalling type %T: %v", p, err) } for key, val := range rawMsg { var err error switch key { - case "errorMessage": - err = unpopulate(val, "ErrorMessage", &n.ErrorMessage) - delete(rawMsg, key) - case "statusCode": - err = unpopulate(val, "StatusCode", &n.StatusCode) + case "value": + err = unpopulate(val, "Value", &p.Value) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) + return fmt.Errorf("unmarshalling type %T: %v", p, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type NotebookResourceInfo. -func (n NotebookResourceInfo) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourceProperties. +func (p PrivateLinkResourceProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "fqdn", n.Fqdn) - populate(objectMap, "notebookPreparationError", n.NotebookPreparationError) - populate(objectMap, "resourceId", n.ResourceID) + populate(objectMap, "groupId", p.GroupID) + populate(objectMap, "requiredMembers", p.RequiredMembers) + populate(objectMap, "requiredZoneNames", p.RequiredZoneNames) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type NotebookResourceInfo. -func (n *NotebookResourceInfo) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResourceProperties. +func (p *PrivateLinkResourceProperties) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) + return fmt.Errorf("unmarshalling type %T: %v", p, err) } for key, val := range rawMsg { var err error switch key { - case "fqdn": - err = unpopulate(val, "Fqdn", &n.Fqdn) + case "groupId": + err = unpopulate(val, "GroupID", &p.GroupID) delete(rawMsg, key) - case "notebookPreparationError": - err = unpopulate(val, "NotebookPreparationError", &n.NotebookPreparationError) + case "requiredMembers": + err = unpopulate(val, "RequiredMembers", &p.RequiredMembers) delete(rawMsg, key) - case "resourceId": - err = unpopulate(val, "ResourceID", &n.ResourceID) + case "requiredZoneNames": + err = unpopulate(val, "RequiredZoneNames", &p.RequiredZoneNames) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) + return fmt.Errorf("unmarshalling type %T: %v", p, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type Objective. -func (o Objective) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type PrivateLinkServiceConnectionState. +func (p PrivateLinkServiceConnectionState) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "goal", o.Goal) - populate(objectMap, "primaryMetric", o.PrimaryMetric) + populate(objectMap, "actionsRequired", p.ActionsRequired) + populate(objectMap, "description", p.Description) + populate(objectMap, "status", p.Status) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type Objective. -func (o *Objective) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkServiceConnectionState. +func (p *PrivateLinkServiceConnectionState) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) + return fmt.Errorf("unmarshalling type %T: %v", p, err) } for key, val := range rawMsg { var err error switch key { - case "goal": - err = unpopulate(val, "Goal", &o.Goal) + case "actionsRequired": + err = unpopulate(val, "ActionsRequired", &p.ActionsRequired) delete(rawMsg, key) - case "primaryMetric": - err = unpopulate(val, "PrimaryMetric", &o.PrimaryMetric) + case "description": + err = unpopulate(val, "Description", &p.Description) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &p.Status) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) + return fmt.Errorf("unmarshalling type %T: %v", p, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type OnlineDeployment. -func (o OnlineDeployment) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ProbeSettings. +func (p ProbeSettings) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "id", o.ID) - populate(objectMap, "identity", o.Identity) - populate(objectMap, "kind", o.Kind) - populate(objectMap, "location", o.Location) - populate(objectMap, "name", o.Name) - populate(objectMap, "properties", o.Properties) - populate(objectMap, "sku", o.SKU) - populate(objectMap, "systemData", o.SystemData) - populate(objectMap, "tags", o.Tags) - populate(objectMap, "type", o.Type) + populate(objectMap, "failureThreshold", p.FailureThreshold) + populate(objectMap, "initialDelay", p.InitialDelay) + populate(objectMap, "period", p.Period) + populate(objectMap, "successThreshold", p.SuccessThreshold) + populate(objectMap, "timeout", p.Timeout) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type OnlineDeployment. -func (o *OnlineDeployment) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ProbeSettings. +func (p *ProbeSettings) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) + return fmt.Errorf("unmarshalling type %T: %v", p, err) } for key, val := range rawMsg { var err error switch key { - case "id": - err = unpopulate(val, "ID", &o.ID) - delete(rawMsg, key) - case "identity": - err = unpopulate(val, "Identity", &o.Identity) - delete(rawMsg, key) - case "kind": - err = unpopulate(val, "Kind", &o.Kind) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &o.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &o.Name) - delete(rawMsg, key) - case "properties": - o.Properties, err = unmarshalOnlineDeploymentPropertiesClassification(val) + case "failureThreshold": + err = unpopulate(val, "FailureThreshold", &p.FailureThreshold) delete(rawMsg, key) - case "sku": - err = unpopulate(val, "SKU", &o.SKU) + case "initialDelay": + err = unpopulate(val, "InitialDelay", &p.InitialDelay) delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &o.SystemData) + case "period": + err = unpopulate(val, "Period", &p.Period) delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &o.Tags) + case "successThreshold": + err = unpopulate(val, "SuccessThreshold", &p.SuccessThreshold) delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &o.Type) + case "timeout": + err = unpopulate(val, "Timeout", &p.Timeout) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) + return fmt.Errorf("unmarshalling type %T: %v", p, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type OnlineDeploymentProperties. -func (o OnlineDeploymentProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ProxyResource. +func (p ProxyResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "appInsightsEnabled", o.AppInsightsEnabled) - populate(objectMap, "codeConfiguration", o.CodeConfiguration) - populate(objectMap, "description", o.Description) - populate(objectMap, "egressPublicNetworkAccess", o.EgressPublicNetworkAccess) - objectMap["endpointComputeType"] = o.EndpointComputeType - populate(objectMap, "environmentId", o.EnvironmentID) - populate(objectMap, "environmentVariables", o.EnvironmentVariables) - populate(objectMap, "instanceType", o.InstanceType) - populate(objectMap, "livenessProbe", o.LivenessProbe) - populate(objectMap, "model", o.Model) - populate(objectMap, "modelMountPath", o.ModelMountPath) - populate(objectMap, "properties", o.Properties) - populate(objectMap, "provisioningState", o.ProvisioningState) - populate(objectMap, "readinessProbe", o.ReadinessProbe) - populate(objectMap, "requestSettings", o.RequestSettings) - populate(objectMap, "scaleSettings", o.ScaleSettings) + populate(objectMap, "id", p.ID) + populate(objectMap, "name", p.Name) + populate(objectMap, "systemData", p.SystemData) + populate(objectMap, "type", p.Type) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type OnlineDeploymentProperties. -func (o *OnlineDeploymentProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ProxyResource. +func (p *ProxyResource) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) + return fmt.Errorf("unmarshalling type %T: %v", p, err) } for key, val := range rawMsg { var err error switch key { - case "appInsightsEnabled": - err = unpopulate(val, "AppInsightsEnabled", &o.AppInsightsEnabled) - delete(rawMsg, key) - case "codeConfiguration": - err = unpopulate(val, "CodeConfiguration", &o.CodeConfiguration) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &o.Description) - delete(rawMsg, key) - case "egressPublicNetworkAccess": - err = unpopulate(val, "EgressPublicNetworkAccess", &o.EgressPublicNetworkAccess) - delete(rawMsg, key) - case "endpointComputeType": - err = unpopulate(val, "EndpointComputeType", &o.EndpointComputeType) - delete(rawMsg, key) - case "environmentId": - err = unpopulate(val, "EnvironmentID", &o.EnvironmentID) - delete(rawMsg, key) - case "environmentVariables": - err = unpopulate(val, "EnvironmentVariables", &o.EnvironmentVariables) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &o.InstanceType) - delete(rawMsg, key) - case "livenessProbe": - err = unpopulate(val, "LivenessProbe", &o.LivenessProbe) - delete(rawMsg, key) - case "model": - err = unpopulate(val, "Model", &o.Model) - delete(rawMsg, key) - case "modelMountPath": - err = unpopulate(val, "ModelMountPath", &o.ModelMountPath) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &o.Properties) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &o.ProvisioningState) + case "id": + err = unpopulate(val, "ID", &p.ID) delete(rawMsg, key) - case "readinessProbe": - err = unpopulate(val, "ReadinessProbe", &o.ReadinessProbe) + case "name": + err = unpopulate(val, "Name", &p.Name) delete(rawMsg, key) - case "requestSettings": - err = unpopulate(val, "RequestSettings", &o.RequestSettings) + case "systemData": + err = unpopulate(val, "SystemData", &p.SystemData) delete(rawMsg, key) - case "scaleSettings": - o.ScaleSettings, err = unmarshalOnlineScaleSettingsClassification(val) + case "type": + err = unpopulate(val, "Type", &p.Type) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) + return fmt.Errorf("unmarshalling type %T: %v", p, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type OnlineDeploymentTrackedResourceArmPaginatedResult. -func (o OnlineDeploymentTrackedResourceArmPaginatedResult) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type PyTorch. +func (p PyTorch) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "nextLink", o.NextLink) - populate(objectMap, "value", o.Value) + objectMap["distributionType"] = DistributionTypePyTorch + populate(objectMap, "processCountPerInstance", p.ProcessCountPerInstance) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type OnlineDeploymentTrackedResourceArmPaginatedResult. -func (o *OnlineDeploymentTrackedResourceArmPaginatedResult) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type PyTorch. +func (p *PyTorch) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) + return fmt.Errorf("unmarshalling type %T: %v", p, err) } for key, val := range rawMsg { var err error switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &o.NextLink) + case "distributionType": + err = unpopulate(val, "DistributionType", &p.DistributionType) delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &o.Value) + case "processCountPerInstance": + err = unpopulate(val, "ProcessCountPerInstance", &p.ProcessCountPerInstance) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) + return fmt.Errorf("unmarshalling type %T: %v", p, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type OnlineEndpoint. -func (o OnlineEndpoint) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type QueueSettings. +func (q QueueSettings) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "id", o.ID) - populate(objectMap, "identity", o.Identity) - populate(objectMap, "kind", o.Kind) - populate(objectMap, "location", o.Location) - populate(objectMap, "name", o.Name) - populate(objectMap, "properties", o.Properties) - populate(objectMap, "sku", o.SKU) - populate(objectMap, "systemData", o.SystemData) - populate(objectMap, "tags", o.Tags) - populate(objectMap, "type", o.Type) + populate(objectMap, "jobTier", q.JobTier) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type OnlineEndpoint. -func (o *OnlineEndpoint) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type QueueSettings. +func (q *QueueSettings) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) + return fmt.Errorf("unmarshalling type %T: %v", q, err) } for key, val := range rawMsg { var err error switch key { - case "id": - err = unpopulate(val, "ID", &o.ID) - delete(rawMsg, key) - case "identity": - err = unpopulate(val, "Identity", &o.Identity) - delete(rawMsg, key) - case "kind": - err = unpopulate(val, "Kind", &o.Kind) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &o.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &o.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &o.Properties) - delete(rawMsg, key) - case "sku": - err = unpopulate(val, "SKU", &o.SKU) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &o.SystemData) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &o.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &o.Type) + case "jobTier": + err = unpopulate(val, "JobTier", &q.JobTier) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) + return fmt.Errorf("unmarshalling type %T: %v", q, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type OnlineEndpointProperties. -func (o OnlineEndpointProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type QuotaBaseProperties. +func (q QuotaBaseProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "authMode", o.AuthMode) - populate(objectMap, "compute", o.Compute) - populate(objectMap, "description", o.Description) - populate(objectMap, "keys", o.Keys) - populate(objectMap, "properties", o.Properties) - populate(objectMap, "provisioningState", o.ProvisioningState) - populate(objectMap, "publicNetworkAccess", o.PublicNetworkAccess) - populate(objectMap, "scoringUri", o.ScoringURI) - populate(objectMap, "swaggerUri", o.SwaggerURI) - populate(objectMap, "traffic", o.Traffic) + populate(objectMap, "id", q.ID) + populate(objectMap, "limit", q.Limit) + populate(objectMap, "type", q.Type) + populate(objectMap, "unit", q.Unit) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type OnlineEndpointProperties. -func (o *OnlineEndpointProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type QuotaBaseProperties. +func (q *QuotaBaseProperties) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) + return fmt.Errorf("unmarshalling type %T: %v", q, err) } for key, val := range rawMsg { var err error switch key { - case "authMode": - err = unpopulate(val, "AuthMode", &o.AuthMode) - delete(rawMsg, key) - case "compute": - err = unpopulate(val, "Compute", &o.Compute) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &o.Description) - delete(rawMsg, key) - case "keys": - err = unpopulate(val, "Keys", &o.Keys) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &o.Properties) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &o.ProvisioningState) - delete(rawMsg, key) - case "publicNetworkAccess": - err = unpopulate(val, "PublicNetworkAccess", &o.PublicNetworkAccess) + case "id": + err = unpopulate(val, "ID", &q.ID) delete(rawMsg, key) - case "scoringUri": - err = unpopulate(val, "ScoringURI", &o.ScoringURI) + case "limit": + err = unpopulate(val, "Limit", &q.Limit) delete(rawMsg, key) - case "swaggerUri": - err = unpopulate(val, "SwaggerURI", &o.SwaggerURI) + case "type": + err = unpopulate(val, "Type", &q.Type) delete(rawMsg, key) - case "traffic": - err = unpopulate(val, "Traffic", &o.Traffic) + case "unit": + err = unpopulate(val, "Unit", &q.Unit) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) + return fmt.Errorf("unmarshalling type %T: %v", q, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type OnlineEndpointTrackedResourceArmPaginatedResult. -func (o OnlineEndpointTrackedResourceArmPaginatedResult) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type QuotaUpdateParameters. +func (q QuotaUpdateParameters) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "nextLink", o.NextLink) - populate(objectMap, "value", o.Value) + populate(objectMap, "location", q.Location) + populate(objectMap, "value", q.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type OnlineEndpointTrackedResourceArmPaginatedResult. -func (o *OnlineEndpointTrackedResourceArmPaginatedResult) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type QuotaUpdateParameters. +func (q *QuotaUpdateParameters) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) + return fmt.Errorf("unmarshalling type %T: %v", q, err) } for key, val := range rawMsg { var err error switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &o.NextLink) + case "location": + err = unpopulate(val, "Location", &q.Location) delete(rawMsg, key) case "value": - err = unpopulate(val, "Value", &o.Value) + err = unpopulate(val, "Value", &q.Value) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) + return fmt.Errorf("unmarshalling type %T: %v", q, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type OnlineRequestSettings. -func (o OnlineRequestSettings) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type RandomSamplingAlgorithm. +func (r RandomSamplingAlgorithm) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "maxConcurrentRequestsPerInstance", o.MaxConcurrentRequestsPerInstance) - populate(objectMap, "maxQueueWait", o.MaxQueueWait) - populate(objectMap, "requestTimeout", o.RequestTimeout) + populate(objectMap, "rule", r.Rule) + objectMap["samplingAlgorithmType"] = SamplingAlgorithmTypeRandom + populate(objectMap, "seed", r.Seed) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type OnlineRequestSettings. -func (o *OnlineRequestSettings) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type RandomSamplingAlgorithm. +func (r *RandomSamplingAlgorithm) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) + return fmt.Errorf("unmarshalling type %T: %v", r, err) } for key, val := range rawMsg { var err error switch key { - case "maxConcurrentRequestsPerInstance": - err = unpopulate(val, "MaxConcurrentRequestsPerInstance", &o.MaxConcurrentRequestsPerInstance) + case "rule": + err = unpopulate(val, "Rule", &r.Rule) delete(rawMsg, key) - case "maxQueueWait": - err = unpopulate(val, "MaxQueueWait", &o.MaxQueueWait) + case "samplingAlgorithmType": + err = unpopulate(val, "SamplingAlgorithmType", &r.SamplingAlgorithmType) delete(rawMsg, key) - case "requestTimeout": - err = unpopulate(val, "RequestTimeout", &o.RequestTimeout) + case "seed": + err = unpopulate(val, "Seed", &r.Seed) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) + return fmt.Errorf("unmarshalling type %T: %v", r, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type OnlineScaleSettings. -func (o OnlineScaleSettings) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type Recurrence. +func (r Recurrence) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - objectMap["scaleType"] = o.ScaleType + populate(objectMap, "frequency", r.Frequency) + populate(objectMap, "interval", r.Interval) + populate(objectMap, "schedule", r.Schedule) + populate(objectMap, "startTime", r.StartTime) + populate(objectMap, "timeZone", r.TimeZone) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type OnlineScaleSettings. -func (o *OnlineScaleSettings) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type Recurrence. +func (r *Recurrence) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) + return fmt.Errorf("unmarshalling type %T: %v", r, err) } for key, val := range rawMsg { var err error switch key { - case "scaleType": - err = unpopulate(val, "ScaleType", &o.ScaleType) + case "frequency": + err = unpopulate(val, "Frequency", &r.Frequency) + delete(rawMsg, key) + case "interval": + err = unpopulate(val, "Interval", &r.Interval) + delete(rawMsg, key) + case "schedule": + err = unpopulate(val, "Schedule", &r.Schedule) + delete(rawMsg, key) + case "startTime": + err = unpopulate(val, "StartTime", &r.StartTime) + delete(rawMsg, key) + case "timeZone": + err = unpopulate(val, "TimeZone", &r.TimeZone) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) + return fmt.Errorf("unmarshalling type %T: %v", r, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type OutputPathAssetReference. -func (o OutputPathAssetReference) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type RecurrenceSchedule. +func (r RecurrenceSchedule) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "jobId", o.JobID) - populate(objectMap, "path", o.Path) - objectMap["referenceType"] = ReferenceTypeOutputPath + populate(objectMap, "hours", r.Hours) + populate(objectMap, "minutes", r.Minutes) + populate(objectMap, "monthDays", r.MonthDays) + populate(objectMap, "weekDays", r.WeekDays) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type OutputPathAssetReference. -func (o *OutputPathAssetReference) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type RecurrenceSchedule. +func (r *RecurrenceSchedule) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) + return fmt.Errorf("unmarshalling type %T: %v", r, err) } for key, val := range rawMsg { var err error switch key { - case "jobId": - err = unpopulate(val, "JobID", &o.JobID) + case "hours": + err = unpopulate(val, "Hours", &r.Hours) delete(rawMsg, key) - case "path": - err = unpopulate(val, "Path", &o.Path) + case "minutes": + err = unpopulate(val, "Minutes", &r.Minutes) delete(rawMsg, key) - case "referenceType": - err = unpopulate(val, "ReferenceType", &o.ReferenceType) + case "monthDays": + err = unpopulate(val, "MonthDays", &r.MonthDays) + delete(rawMsg, key) + case "weekDays": + err = unpopulate(val, "WeekDays", &r.WeekDays) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) + return fmt.Errorf("unmarshalling type %T: %v", r, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type PATAuthTypeWorkspaceConnectionProperties. -func (p PATAuthTypeWorkspaceConnectionProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type RecurrenceTrigger. +func (r RecurrenceTrigger) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - objectMap["authType"] = ConnectionAuthTypePAT - populate(objectMap, "category", p.Category) - populate(objectMap, "credentials", p.Credentials) - populate(objectMap, "target", p.Target) - populate(objectMap, "value", p.Value) - populate(objectMap, "valueFormat", p.ValueFormat) + populate(objectMap, "endTime", r.EndTime) + populate(objectMap, "frequency", r.Frequency) + populate(objectMap, "interval", r.Interval) + populate(objectMap, "schedule", r.Schedule) + populate(objectMap, "startTime", r.StartTime) + populate(objectMap, "timeZone", r.TimeZone) + objectMap["triggerType"] = TriggerTypeRecurrence return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type PATAuthTypeWorkspaceConnectionProperties. -func (p *PATAuthTypeWorkspaceConnectionProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type RecurrenceTrigger. +func (r *RecurrenceTrigger) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) + return fmt.Errorf("unmarshalling type %T: %v", r, err) } for key, val := range rawMsg { var err error switch key { - case "authType": - err = unpopulate(val, "AuthType", &p.AuthType) + case "endTime": + err = unpopulate(val, "EndTime", &r.EndTime) delete(rawMsg, key) - case "category": - err = unpopulate(val, "Category", &p.Category) + case "frequency": + err = unpopulate(val, "Frequency", &r.Frequency) delete(rawMsg, key) - case "credentials": - err = unpopulate(val, "Credentials", &p.Credentials) + case "interval": + err = unpopulate(val, "Interval", &r.Interval) delete(rawMsg, key) - case "target": - err = unpopulate(val, "Target", &p.Target) + case "schedule": + err = unpopulate(val, "Schedule", &r.Schedule) delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &p.Value) + case "startTime": + err = unpopulate(val, "StartTime", &r.StartTime) delete(rawMsg, key) - case "valueFormat": - err = unpopulate(val, "ValueFormat", &p.ValueFormat) + case "timeZone": + err = unpopulate(val, "TimeZone", &r.TimeZone) + delete(rawMsg, key) + case "triggerType": + err = unpopulate(val, "TriggerType", &r.TriggerType) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) + return fmt.Errorf("unmarshalling type %T: %v", r, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type PaginatedComputeResourcesList. -func (p PaginatedComputeResourcesList) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type RegenerateEndpointKeysRequest. +func (r RegenerateEndpointKeysRequest) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "nextLink", p.NextLink) - populate(objectMap, "value", p.Value) + populate(objectMap, "keyType", r.KeyType) + populate(objectMap, "keyValue", r.KeyValue) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type PaginatedComputeResourcesList. -func (p *PaginatedComputeResourcesList) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type RegenerateEndpointKeysRequest. +func (r *RegenerateEndpointKeysRequest) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) + return fmt.Errorf("unmarshalling type %T: %v", r, err) } for key, val := range rawMsg { var err error switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &p.NextLink) + case "keyType": + err = unpopulate(val, "KeyType", &r.KeyType) delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &p.Value) + case "keyValue": + err = unpopulate(val, "KeyValue", &r.KeyValue) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) + return fmt.Errorf("unmarshalling type %T: %v", r, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type PartialBatchDeployment. -func (p PartialBatchDeployment) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type Registry. +func (r Registry) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "description", p.Description) + populate(objectMap, "id", r.ID) + populate(objectMap, "identity", r.Identity) + populate(objectMap, "kind", r.Kind) + populate(objectMap, "location", r.Location) + populate(objectMap, "name", r.Name) + populate(objectMap, "properties", r.Properties) + populate(objectMap, "sku", r.SKU) + populate(objectMap, "systemData", r.SystemData) + populate(objectMap, "tags", r.Tags) + populate(objectMap, "type", r.Type) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type PartialBatchDeployment. -func (p *PartialBatchDeployment) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type Registry. +func (r *Registry) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) + return fmt.Errorf("unmarshalling type %T: %v", r, err) } for key, val := range rawMsg { var err error switch key { - case "description": - err = unpopulate(val, "Description", &p.Description) + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "identity": + err = unpopulate(val, "Identity", &r.Identity) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &r.Kind) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &r.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &r.SKU) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &r.SystemData) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &r.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) + return fmt.Errorf("unmarshalling type %T: %v", r, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties. -func (p PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type RegistryListCredentialsResult. +func (r RegistryListCredentialsResult) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "properties", p.Properties) - populate(objectMap, "tags", p.Tags) + populate(objectMap, "location", r.Location) + populate(objectMap, "passwords", r.Passwords) + populate(objectMap, "username", r.Username) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties. -func (p *PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type RegistryListCredentialsResult. +func (r *RegistryListCredentialsResult) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) + return fmt.Errorf("unmarshalling type %T: %v", r, err) } for key, val := range rawMsg { var err error switch key { - case "properties": - err = unpopulate(val, "Properties", &p.Properties) + case "location": + err = unpopulate(val, "Location", &r.Location) + delete(rawMsg, key) + case "passwords": + err = unpopulate(val, "Passwords", &r.Passwords) delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &p.Tags) + case "username": + err = unpopulate(val, "Username", &r.Username) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) + return fmt.Errorf("unmarshalling type %T: %v", r, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type PartialManagedServiceIdentity. -func (p PartialManagedServiceIdentity) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type RegistryPartialManagedServiceIdentity. +func (r RegistryPartialManagedServiceIdentity) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "type", p.Type) - populate(objectMap, "userAssignedIdentities", p.UserAssignedIdentities) + populate(objectMap, "principalId", r.PrincipalID) + populate(objectMap, "tenantId", r.TenantID) + populate(objectMap, "type", r.Type) + populate(objectMap, "userAssignedIdentities", r.UserAssignedIdentities) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type PartialManagedServiceIdentity. -func (p *PartialManagedServiceIdentity) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type RegistryPartialManagedServiceIdentity. +func (r *RegistryPartialManagedServiceIdentity) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) + return fmt.Errorf("unmarshalling type %T: %v", r, err) } for key, val := range rawMsg { var err error switch key { + case "principalId": + err = unpopulate(val, "PrincipalID", &r.PrincipalID) + delete(rawMsg, key) + case "tenantId": + err = unpopulate(val, "TenantID", &r.TenantID) + delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &p.Type) + err = unpopulate(val, "Type", &r.Type) delete(rawMsg, key) case "userAssignedIdentities": - err = unpopulate(val, "UserAssignedIdentities", &p.UserAssignedIdentities) + err = unpopulate(val, "UserAssignedIdentities", &r.UserAssignedIdentities) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) + return fmt.Errorf("unmarshalling type %T: %v", r, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type PartialMinimalTrackedResource. -func (p PartialMinimalTrackedResource) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type RegistryPrivateEndpointConnection. +func (r RegistryPrivateEndpointConnection) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "tags", p.Tags) + populate(objectMap, "id", r.ID) + populate(objectMap, "location", r.Location) + populate(objectMap, "properties", r.Properties) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type PartialMinimalTrackedResource. -func (p *PartialMinimalTrackedResource) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type RegistryPrivateEndpointConnection. +func (r *RegistryPrivateEndpointConnection) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) + return fmt.Errorf("unmarshalling type %T: %v", r, err) } for key, val := range rawMsg { var err error switch key { - case "tags": - err = unpopulate(val, "Tags", &p.Tags) + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &r.Location) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &r.Properties) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) + return fmt.Errorf("unmarshalling type %T: %v", r, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type PartialMinimalTrackedResourceWithIdentity. -func (p PartialMinimalTrackedResourceWithIdentity) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type RegistryPrivateEndpointConnectionProperties. +func (r RegistryPrivateEndpointConnectionProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "identity", p.Identity) - populate(objectMap, "tags", p.Tags) + populate(objectMap, "groupIds", r.GroupIDs) + populate(objectMap, "privateEndpoint", r.PrivateEndpoint) + populate(objectMap, "provisioningState", r.ProvisioningState) + populate(objectMap, "registryPrivateLinkServiceConnectionState", r.RegistryPrivateLinkServiceConnectionState) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type PartialMinimalTrackedResourceWithIdentity. -func (p *PartialMinimalTrackedResourceWithIdentity) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type RegistryPrivateEndpointConnectionProperties. +func (r *RegistryPrivateEndpointConnectionProperties) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) + return fmt.Errorf("unmarshalling type %T: %v", r, err) } for key, val := range rawMsg { var err error switch key { - case "identity": - err = unpopulate(val, "Identity", &p.Identity) + case "groupIds": + err = unpopulate(val, "GroupIDs", &r.GroupIDs) delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &p.Tags) + case "privateEndpoint": + err = unpopulate(val, "PrivateEndpoint", &r.PrivateEndpoint) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &r.ProvisioningState) + delete(rawMsg, key) + case "registryPrivateLinkServiceConnectionState": + err = unpopulate(val, "RegistryPrivateLinkServiceConnectionState", &r.RegistryPrivateLinkServiceConnectionState) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) + return fmt.Errorf("unmarshalling type %T: %v", r, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type PartialMinimalTrackedResourceWithSKU. -func (p PartialMinimalTrackedResourceWithSKU) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type RegistryPrivateLinkServiceConnectionState. +func (r RegistryPrivateLinkServiceConnectionState) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "sku", p.SKU) - populate(objectMap, "tags", p.Tags) + populate(objectMap, "actionsRequired", r.ActionsRequired) + populate(objectMap, "description", r.Description) + populate(objectMap, "status", r.Status) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type PartialMinimalTrackedResourceWithSKU. -func (p *PartialMinimalTrackedResourceWithSKU) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type RegistryPrivateLinkServiceConnectionState. +func (r *RegistryPrivateLinkServiceConnectionState) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) + return fmt.Errorf("unmarshalling type %T: %v", r, err) } for key, val := range rawMsg { var err error switch key { - case "sku": - err = unpopulate(val, "SKU", &p.SKU) + case "actionsRequired": + err = unpopulate(val, "ActionsRequired", &r.ActionsRequired) delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &p.Tags) + case "description": + err = unpopulate(val, "Description", &r.Description) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &r.Status) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) + return fmt.Errorf("unmarshalling type %T: %v", r, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type PartialSKU. -func (p PartialSKU) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type RegistryProperties. +func (r RegistryProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "capacity", p.Capacity) - populate(objectMap, "family", p.Family) - populate(objectMap, "name", p.Name) - populate(objectMap, "size", p.Size) - populate(objectMap, "tier", p.Tier) + populate(objectMap, "discoveryUrl", r.DiscoveryURL) + populate(objectMap, "intellectualPropertyPublisher", r.IntellectualPropertyPublisher) + populate(objectMap, "managedResourceGroup", r.ManagedResourceGroup) + populate(objectMap, "mlFlowRegistryUri", r.MlFlowRegistryURI) + populate(objectMap, "publicNetworkAccess", r.PublicNetworkAccess) + populate(objectMap, "regionDetails", r.RegionDetails) + populate(objectMap, "registryPrivateEndpointConnections", r.RegistryPrivateEndpointConnections) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type PartialSKU. -func (p *PartialSKU) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type RegistryProperties. +func (r *RegistryProperties) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) + return fmt.Errorf("unmarshalling type %T: %v", r, err) } for key, val := range rawMsg { var err error switch key { - case "capacity": - err = unpopulate(val, "Capacity", &p.Capacity) + case "discoveryUrl": + err = unpopulate(val, "DiscoveryURL", &r.DiscoveryURL) delete(rawMsg, key) - case "family": - err = unpopulate(val, "Family", &p.Family) + case "intellectualPropertyPublisher": + err = unpopulate(val, "IntellectualPropertyPublisher", &r.IntellectualPropertyPublisher) delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &p.Name) + case "managedResourceGroup": + err = unpopulate(val, "ManagedResourceGroup", &r.ManagedResourceGroup) delete(rawMsg, key) - case "size": - err = unpopulate(val, "Size", &p.Size) + case "mlFlowRegistryUri": + err = unpopulate(val, "MlFlowRegistryURI", &r.MlFlowRegistryURI) delete(rawMsg, key) - case "tier": - err = unpopulate(val, "Tier", &p.Tier) + case "publicNetworkAccess": + err = unpopulate(val, "PublicNetworkAccess", &r.PublicNetworkAccess) + delete(rawMsg, key) + case "regionDetails": + err = unpopulate(val, "RegionDetails", &r.RegionDetails) + delete(rawMsg, key) + case "registryPrivateEndpointConnections": + err = unpopulate(val, "RegistryPrivateEndpointConnections", &r.RegistryPrivateEndpointConnections) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) + return fmt.Errorf("unmarshalling type %T: %v", r, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type Password. -func (p Password) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type RegistryRegionArmDetails. +func (r RegistryRegionArmDetails) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "name", p.Name) - populate(objectMap, "value", p.Value) + populate(objectMap, "acrDetails", r.AcrDetails) + populate(objectMap, "location", r.Location) + populate(objectMap, "storageAccountDetails", r.StorageAccountDetails) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type Password. -func (p *Password) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type RegistryRegionArmDetails. +func (r *RegistryRegionArmDetails) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) + return fmt.Errorf("unmarshalling type %T: %v", r, err) } for key, val := range rawMsg { var err error switch key { - case "name": - err = unpopulate(val, "Name", &p.Name) + case "acrDetails": + err = unpopulate(val, "AcrDetails", &r.AcrDetails) delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &p.Value) + case "location": + err = unpopulate(val, "Location", &r.Location) + delete(rawMsg, key) + case "storageAccountDetails": + err = unpopulate(val, "StorageAccountDetails", &r.StorageAccountDetails) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) + return fmt.Errorf("unmarshalling type %T: %v", r, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type PersonalComputeInstanceSettings. -func (p PersonalComputeInstanceSettings) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type RegistryTrackedResourceArmPaginatedResult. +func (r RegistryTrackedResourceArmPaginatedResult) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "assignedUser", p.AssignedUser) + populate(objectMap, "nextLink", r.NextLink) + populate(objectMap, "value", r.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type PersonalComputeInstanceSettings. -func (p *PersonalComputeInstanceSettings) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type RegistryTrackedResourceArmPaginatedResult. +func (r *RegistryTrackedResourceArmPaginatedResult) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) + return fmt.Errorf("unmarshalling type %T: %v", r, err) } for key, val := range rawMsg { var err error switch key { - case "assignedUser": - err = unpopulate(val, "AssignedUser", &p.AssignedUser) + case "nextLink": + err = unpopulate(val, "NextLink", &r.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &r.Value) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) + return fmt.Errorf("unmarshalling type %T: %v", r, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type PipelineJob. -func (p PipelineJob) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type Regression. +func (r Regression) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "componentId", p.ComponentID) - populate(objectMap, "computeId", p.ComputeID) - populate(objectMap, "description", p.Description) - populate(objectMap, "displayName", p.DisplayName) - populate(objectMap, "experimentName", p.ExperimentName) - populate(objectMap, "identity", p.Identity) - populate(objectMap, "inputs", p.Inputs) - populate(objectMap, "isArchived", p.IsArchived) - objectMap["jobType"] = JobTypePipeline - populate(objectMap, "jobs", p.Jobs) - populate(objectMap, "outputs", p.Outputs) - populate(objectMap, "properties", p.Properties) - populate(objectMap, "services", p.Services) - populateAny(objectMap, "settings", p.Settings) - populate(objectMap, "sourceJobId", p.SourceJobID) - populate(objectMap, "status", p.Status) - populate(objectMap, "tags", p.Tags) + populate(objectMap, "cvSplitColumnNames", r.CvSplitColumnNames) + populate(objectMap, "featurizationSettings", r.FeaturizationSettings) + populate(objectMap, "limitSettings", r.LimitSettings) + populate(objectMap, "logVerbosity", r.LogVerbosity) + populate(objectMap, "nCrossValidations", r.NCrossValidations) + populate(objectMap, "primaryMetric", r.PrimaryMetric) + populate(objectMap, "targetColumnName", r.TargetColumnName) + objectMap["taskType"] = TaskTypeRegression + populate(objectMap, "testData", r.TestData) + populate(objectMap, "testDataSize", r.TestDataSize) + populate(objectMap, "trainingData", r.TrainingData) + populate(objectMap, "trainingSettings", r.TrainingSettings) + populate(objectMap, "validationData", r.ValidationData) + populate(objectMap, "validationDataSize", r.ValidationDataSize) + populate(objectMap, "weightColumnName", r.WeightColumnName) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type PipelineJob. -func (p *PipelineJob) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type Regression. +func (r *Regression) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) + return fmt.Errorf("unmarshalling type %T: %v", r, err) } for key, val := range rawMsg { var err error switch key { - case "componentId": - err = unpopulate(val, "ComponentID", &p.ComponentID) + case "cvSplitColumnNames": + err = unpopulate(val, "CvSplitColumnNames", &r.CvSplitColumnNames) delete(rawMsg, key) - case "computeId": - err = unpopulate(val, "ComputeID", &p.ComputeID) + case "featurizationSettings": + err = unpopulate(val, "FeaturizationSettings", &r.FeaturizationSettings) delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &p.Description) + case "limitSettings": + err = unpopulate(val, "LimitSettings", &r.LimitSettings) delete(rawMsg, key) - case "displayName": - err = unpopulate(val, "DisplayName", &p.DisplayName) + case "logVerbosity": + err = unpopulate(val, "LogVerbosity", &r.LogVerbosity) delete(rawMsg, key) - case "experimentName": - err = unpopulate(val, "ExperimentName", &p.ExperimentName) + case "nCrossValidations": + r.NCrossValidations, err = unmarshalNCrossValidationsClassification(val) delete(rawMsg, key) - case "identity": - p.Identity, err = unmarshalIdentityConfigurationClassification(val) + case "primaryMetric": + err = unpopulate(val, "PrimaryMetric", &r.PrimaryMetric) delete(rawMsg, key) - case "inputs": - p.Inputs, err = unmarshalJobInputClassificationMap(val) + case "targetColumnName": + err = unpopulate(val, "TargetColumnName", &r.TargetColumnName) delete(rawMsg, key) - case "isArchived": - err = unpopulate(val, "IsArchived", &p.IsArchived) + case "taskType": + err = unpopulate(val, "TaskType", &r.TaskType) delete(rawMsg, key) - case "jobType": - err = unpopulate(val, "JobType", &p.JobType) + case "testData": + err = unpopulate(val, "TestData", &r.TestData) + delete(rawMsg, key) + case "testDataSize": + err = unpopulate(val, "TestDataSize", &r.TestDataSize) + delete(rawMsg, key) + case "trainingData": + err = unpopulate(val, "TrainingData", &r.TrainingData) + delete(rawMsg, key) + case "trainingSettings": + err = unpopulate(val, "TrainingSettings", &r.TrainingSettings) + delete(rawMsg, key) + case "validationData": + err = unpopulate(val, "ValidationData", &r.ValidationData) + delete(rawMsg, key) + case "validationDataSize": + err = unpopulate(val, "ValidationDataSize", &r.ValidationDataSize) + delete(rawMsg, key) + case "weightColumnName": + err = unpopulate(val, "WeightColumnName", &r.WeightColumnName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RegressionTrainingSettings. +func (r RegressionTrainingSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "allowedTrainingAlgorithms", r.AllowedTrainingAlgorithms) + populate(objectMap, "blockedTrainingAlgorithms", r.BlockedTrainingAlgorithms) + populate(objectMap, "enableDnnTraining", r.EnableDnnTraining) + populate(objectMap, "enableModelExplainability", r.EnableModelExplainability) + populate(objectMap, "enableOnnxCompatibleModels", r.EnableOnnxCompatibleModels) + populate(objectMap, "enableStackEnsemble", r.EnableStackEnsemble) + populate(objectMap, "enableVoteEnsemble", r.EnableVoteEnsemble) + populate(objectMap, "ensembleModelDownloadTimeout", r.EnsembleModelDownloadTimeout) + populate(objectMap, "stackEnsembleSettings", r.StackEnsembleSettings) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RegressionTrainingSettings. +func (r *RegressionTrainingSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "allowedTrainingAlgorithms": + err = unpopulate(val, "AllowedTrainingAlgorithms", &r.AllowedTrainingAlgorithms) delete(rawMsg, key) - case "jobs": - err = unpopulate(val, "Jobs", &p.Jobs) + case "blockedTrainingAlgorithms": + err = unpopulate(val, "BlockedTrainingAlgorithms", &r.BlockedTrainingAlgorithms) delete(rawMsg, key) - case "outputs": - p.Outputs, err = unmarshalJobOutputClassificationMap(val) + case "enableDnnTraining": + err = unpopulate(val, "EnableDnnTraining", &r.EnableDnnTraining) delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &p.Properties) + case "enableModelExplainability": + err = unpopulate(val, "EnableModelExplainability", &r.EnableModelExplainability) delete(rawMsg, key) - case "services": - err = unpopulate(val, "Services", &p.Services) + case "enableOnnxCompatibleModels": + err = unpopulate(val, "EnableOnnxCompatibleModels", &r.EnableOnnxCompatibleModels) delete(rawMsg, key) - case "settings": - err = unpopulate(val, "Settings", &p.Settings) + case "enableStackEnsemble": + err = unpopulate(val, "EnableStackEnsemble", &r.EnableStackEnsemble) delete(rawMsg, key) - case "sourceJobId": - err = unpopulate(val, "SourceJobID", &p.SourceJobID) + case "enableVoteEnsemble": + err = unpopulate(val, "EnableVoteEnsemble", &r.EnableVoteEnsemble) delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &p.Status) + case "ensembleModelDownloadTimeout": + err = unpopulate(val, "EnsembleModelDownloadTimeout", &r.EnsembleModelDownloadTimeout) delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &p.Tags) + case "stackEnsembleSettings": + err = unpopulate(val, "StackEnsembleSettings", &r.StackEnsembleSettings) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) + return fmt.Errorf("unmarshalling type %T: %v", r, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type PrivateEndpoint. -func (p PrivateEndpoint) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type RequestLogging. +func (r RequestLogging) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "id", p.ID) - populate(objectMap, "subnetArmId", p.SubnetArmID) + populate(objectMap, "captureHeaders", r.CaptureHeaders) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpoint. -func (p *PrivateEndpoint) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type RequestLogging. +func (r *RequestLogging) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) + return fmt.Errorf("unmarshalling type %T: %v", r, err) } for key, val := range rawMsg { var err error switch key { - case "id": - err = unpopulate(val, "ID", &p.ID) - delete(rawMsg, key) - case "subnetArmId": - err = unpopulate(val, "SubnetArmID", &p.SubnetArmID) + case "captureHeaders": + err = unpopulate(val, "CaptureHeaders", &r.CaptureHeaders) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) + return fmt.Errorf("unmarshalling type %T: %v", r, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnection. -func (p PrivateEndpointConnection) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type Resource. +func (r Resource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "id", p.ID) - populate(objectMap, "identity", p.Identity) - populate(objectMap, "location", p.Location) - populate(objectMap, "name", p.Name) - populate(objectMap, "properties", p.Properties) - populate(objectMap, "sku", p.SKU) - populate(objectMap, "systemData", p.SystemData) - populate(objectMap, "tags", p.Tags) - populate(objectMap, "type", p.Type) + populate(objectMap, "id", r.ID) + populate(objectMap, "name", r.Name) + populate(objectMap, "systemData", r.SystemData) + populate(objectMap, "type", r.Type) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnection. -func (p *PrivateEndpointConnection) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type Resource. +func (r *Resource) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) + return fmt.Errorf("unmarshalling type %T: %v", r, err) } for key, val := range rawMsg { var err error switch key { case "id": - err = unpopulate(val, "ID", &p.ID) - delete(rawMsg, key) - case "identity": - err = unpopulate(val, "Identity", &p.Identity) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &p.Location) + err = unpopulate(val, "ID", &r.ID) delete(rawMsg, key) case "name": - err = unpopulate(val, "Name", &p.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &p.Properties) - delete(rawMsg, key) - case "sku": - err = unpopulate(val, "SKU", &p.SKU) + err = unpopulate(val, "Name", &r.Name) delete(rawMsg, key) case "systemData": - err = unpopulate(val, "SystemData", &p.SystemData) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &p.Tags) + err = unpopulate(val, "SystemData", &r.SystemData) delete(rawMsg, key) case "type": - err = unpopulate(val, "Type", &p.Type) + err = unpopulate(val, "Type", &r.Type) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) + return fmt.Errorf("unmarshalling type %T: %v", r, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionListResult. -func (p PrivateEndpointConnectionListResult) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ResourceBase. +func (r ResourceBase) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "value", p.Value) + populate(objectMap, "description", r.Description) + populate(objectMap, "properties", r.Properties) + populate(objectMap, "tags", r.Tags) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionListResult. -func (p *PrivateEndpointConnectionListResult) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceBase. +func (r *ResourceBase) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) + return fmt.Errorf("unmarshalling type %T: %v", r, err) } for key, val := range rawMsg { var err error switch key { - case "value": - err = unpopulate(val, "Value", &p.Value) + case "description": + err = unpopulate(val, "Description", &r.Description) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &r.Tags) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) + return fmt.Errorf("unmarshalling type %T: %v", r, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionProperties. -func (p PrivateEndpointConnectionProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ResourceConfiguration. +func (r ResourceConfiguration) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "privateEndpoint", p.PrivateEndpoint) - populate(objectMap, "privateLinkServiceConnectionState", p.PrivateLinkServiceConnectionState) - populate(objectMap, "provisioningState", p.ProvisioningState) + populate(objectMap, "instanceCount", r.InstanceCount) + populate(objectMap, "instanceType", r.InstanceType) + populate(objectMap, "properties", r.Properties) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionProperties. -func (p *PrivateEndpointConnectionProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceConfiguration. +func (r *ResourceConfiguration) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) + return fmt.Errorf("unmarshalling type %T: %v", r, err) } for key, val := range rawMsg { var err error switch key { - case "privateEndpoint": - err = unpopulate(val, "PrivateEndpoint", &p.PrivateEndpoint) + case "instanceCount": + err = unpopulate(val, "InstanceCount", &r.InstanceCount) delete(rawMsg, key) - case "privateLinkServiceConnectionState": - err = unpopulate(val, "PrivateLinkServiceConnectionState", &p.PrivateLinkServiceConnectionState) + case "instanceType": + err = unpopulate(val, "InstanceType", &r.InstanceType) delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &p.ProvisioningState) + case "properties": + err = unpopulate(val, "Properties", &r.Properties) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) + return fmt.Errorf("unmarshalling type %T: %v", r, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type PrivateLinkResource. -func (p PrivateLinkResource) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ResourceID. +func (r ResourceID) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "id", p.ID) - populate(objectMap, "identity", p.Identity) - populate(objectMap, "location", p.Location) - populate(objectMap, "name", p.Name) - populate(objectMap, "properties", p.Properties) - populate(objectMap, "sku", p.SKU) - populate(objectMap, "systemData", p.SystemData) - populate(objectMap, "tags", p.Tags) - populate(objectMap, "type", p.Type) + populate(objectMap, "id", r.ID) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResource. -func (p *PrivateLinkResource) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceID. +func (r *ResourceID) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) + return fmt.Errorf("unmarshalling type %T: %v", r, err) } for key, val := range rawMsg { var err error switch key { case "id": - err = unpopulate(val, "ID", &p.ID) - delete(rawMsg, key) - case "identity": - err = unpopulate(val, "Identity", &p.Identity) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &p.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &p.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &p.Properties) - delete(rawMsg, key) - case "sku": - err = unpopulate(val, "SKU", &p.SKU) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &p.SystemData) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &p.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &p.Type) + err = unpopulate(val, "ID", &r.ID) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) + return fmt.Errorf("unmarshalling type %T: %v", r, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourceListResult. -func (p PrivateLinkResourceListResult) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ResourceName. +func (r ResourceName) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "value", p.Value) + populate(objectMap, "localizedValue", r.LocalizedValue) + populate(objectMap, "value", r.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResourceListResult. -func (p *PrivateLinkResourceListResult) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceName. +func (r *ResourceName) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) + return fmt.Errorf("unmarshalling type %T: %v", r, err) } for key, val := range rawMsg { var err error switch key { + case "localizedValue": + err = unpopulate(val, "LocalizedValue", &r.LocalizedValue) + delete(rawMsg, key) case "value": - err = unpopulate(val, "Value", &p.Value) + err = unpopulate(val, "Value", &r.Value) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) + return fmt.Errorf("unmarshalling type %T: %v", r, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourceProperties. -func (p PrivateLinkResourceProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ResourceQuota. +func (r ResourceQuota) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "groupId", p.GroupID) - populate(objectMap, "requiredMembers", p.RequiredMembers) - populate(objectMap, "requiredZoneNames", p.RequiredZoneNames) + populate(objectMap, "amlWorkspaceLocation", r.AmlWorkspaceLocation) + populate(objectMap, "id", r.ID) + populate(objectMap, "limit", r.Limit) + populate(objectMap, "name", r.Name) + populate(objectMap, "type", r.Type) + populate(objectMap, "unit", r.Unit) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResourceProperties. -func (p *PrivateLinkResourceProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceQuota. +func (r *ResourceQuota) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) + return fmt.Errorf("unmarshalling type %T: %v", r, err) } for key, val := range rawMsg { var err error switch key { - case "groupId": - err = unpopulate(val, "GroupID", &p.GroupID) + case "amlWorkspaceLocation": + err = unpopulate(val, "AmlWorkspaceLocation", &r.AmlWorkspaceLocation) delete(rawMsg, key) - case "requiredMembers": - err = unpopulate(val, "RequiredMembers", &p.RequiredMembers) + case "id": + err = unpopulate(val, "ID", &r.ID) delete(rawMsg, key) - case "requiredZoneNames": - err = unpopulate(val, "RequiredZoneNames", &p.RequiredZoneNames) + case "limit": + err = unpopulate(val, "Limit", &r.Limit) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + case "unit": + err = unpopulate(val, "Unit", &r.Unit) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) + return fmt.Errorf("unmarshalling type %T: %v", r, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type PrivateLinkServiceConnectionState. -func (p PrivateLinkServiceConnectionState) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type RollingInputData. +func (r RollingInputData) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "actionsRequired", p.ActionsRequired) - populate(objectMap, "description", p.Description) - populate(objectMap, "status", p.Status) + populate(objectMap, "columns", r.Columns) + populate(objectMap, "dataContext", r.DataContext) + objectMap["inputDataType"] = MonitoringInputDataTypeRolling + populate(objectMap, "jobInputType", r.JobInputType) + populate(objectMap, "preprocessingComponentId", r.PreprocessingComponentID) + populate(objectMap, "uri", r.URI) + populate(objectMap, "windowOffset", r.WindowOffset) + populate(objectMap, "windowSize", r.WindowSize) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkServiceConnectionState. -func (p *PrivateLinkServiceConnectionState) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type RollingInputData. +func (r *RollingInputData) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) + return fmt.Errorf("unmarshalling type %T: %v", r, err) } for key, val := range rawMsg { var err error switch key { - case "actionsRequired": - err = unpopulate(val, "ActionsRequired", &p.ActionsRequired) + case "columns": + err = unpopulate(val, "Columns", &r.Columns) delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &p.Description) + case "dataContext": + err = unpopulate(val, "DataContext", &r.DataContext) delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &p.Status) + case "inputDataType": + err = unpopulate(val, "InputDataType", &r.InputDataType) + delete(rawMsg, key) + case "jobInputType": + err = unpopulate(val, "JobInputType", &r.JobInputType) + delete(rawMsg, key) + case "preprocessingComponentId": + err = unpopulate(val, "PreprocessingComponentID", &r.PreprocessingComponentID) + delete(rawMsg, key) + case "uri": + err = unpopulate(val, "URI", &r.URI) + delete(rawMsg, key) + case "windowOffset": + err = unpopulate(val, "WindowOffset", &r.WindowOffset) + delete(rawMsg, key) + case "windowSize": + err = unpopulate(val, "WindowSize", &r.WindowSize) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) + return fmt.Errorf("unmarshalling type %T: %v", r, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ProbeSettings. -func (p ProbeSettings) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type Route. +func (r Route) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "failureThreshold", p.FailureThreshold) - populate(objectMap, "initialDelay", p.InitialDelay) - populate(objectMap, "period", p.Period) - populate(objectMap, "successThreshold", p.SuccessThreshold) - populate(objectMap, "timeout", p.Timeout) + populate(objectMap, "path", r.Path) + populate(objectMap, "port", r.Port) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ProbeSettings. -func (p *ProbeSettings) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type Route. +func (r *Route) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) + return fmt.Errorf("unmarshalling type %T: %v", r, err) } for key, val := range rawMsg { var err error switch key { - case "failureThreshold": - err = unpopulate(val, "FailureThreshold", &p.FailureThreshold) - delete(rawMsg, key) - case "initialDelay": - err = unpopulate(val, "InitialDelay", &p.InitialDelay) - delete(rawMsg, key) - case "period": - err = unpopulate(val, "Period", &p.Period) - delete(rawMsg, key) - case "successThreshold": - err = unpopulate(val, "SuccessThreshold", &p.SuccessThreshold) + case "path": + err = unpopulate(val, "Path", &r.Path) delete(rawMsg, key) - case "timeout": - err = unpopulate(val, "Timeout", &p.Timeout) + case "port": + err = unpopulate(val, "Port", &r.Port) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) + return fmt.Errorf("unmarshalling type %T: %v", r, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type PyTorch. -func (p PyTorch) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type SASAuthTypeWorkspaceConnectionProperties. +func (s SASAuthTypeWorkspaceConnectionProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - objectMap["distributionType"] = DistributionTypePyTorch - populate(objectMap, "processCountPerInstance", p.ProcessCountPerInstance) + objectMap["authType"] = ConnectionAuthTypeSAS + populate(objectMap, "category", s.Category) + populate(objectMap, "createdByWorkspaceArmId", s.CreatedByWorkspaceArmID) + populate(objectMap, "credentials", s.Credentials) + populateDateTimeRFC3339(objectMap, "expiryTime", s.ExpiryTime) + populate(objectMap, "group", s.Group) + populate(objectMap, "isSharedToAll", s.IsSharedToAll) + populate(objectMap, "metadata", s.Metadata) + populate(objectMap, "sharedUserList", s.SharedUserList) + populate(objectMap, "target", s.Target) + populate(objectMap, "value", s.Value) + populate(objectMap, "valueFormat", s.ValueFormat) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type PyTorch. -func (p *PyTorch) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type SASAuthTypeWorkspaceConnectionProperties. +func (s *SASAuthTypeWorkspaceConnectionProperties) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) + return fmt.Errorf("unmarshalling type %T: %v", s, err) } for key, val := range rawMsg { var err error switch key { - case "distributionType": - err = unpopulate(val, "DistributionType", &p.DistributionType) + case "authType": + err = unpopulate(val, "AuthType", &s.AuthType) delete(rawMsg, key) - case "processCountPerInstance": - err = unpopulate(val, "ProcessCountPerInstance", &p.ProcessCountPerInstance) + case "category": + err = unpopulate(val, "Category", &s.Category) + delete(rawMsg, key) + case "createdByWorkspaceArmId": + err = unpopulate(val, "CreatedByWorkspaceArmID", &s.CreatedByWorkspaceArmID) + delete(rawMsg, key) + case "credentials": + err = unpopulate(val, "Credentials", &s.Credentials) + delete(rawMsg, key) + case "expiryTime": + err = unpopulateDateTimeRFC3339(val, "ExpiryTime", &s.ExpiryTime) + delete(rawMsg, key) + case "group": + err = unpopulate(val, "Group", &s.Group) + delete(rawMsg, key) + case "isSharedToAll": + err = unpopulate(val, "IsSharedToAll", &s.IsSharedToAll) + delete(rawMsg, key) + case "metadata": + err = unpopulate(val, "Metadata", &s.Metadata) + delete(rawMsg, key) + case "sharedUserList": + err = unpopulate(val, "SharedUserList", &s.SharedUserList) + delete(rawMsg, key) + case "target": + err = unpopulate(val, "Target", &s.Target) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + case "valueFormat": + err = unpopulate(val, "ValueFormat", &s.ValueFormat) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) + return fmt.Errorf("unmarshalling type %T: %v", s, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type QuotaBaseProperties. -func (q QuotaBaseProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type SASCredential. +func (s SASCredential) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "id", q.ID) - populate(objectMap, "limit", q.Limit) - populate(objectMap, "type", q.Type) - populate(objectMap, "unit", q.Unit) + objectMap["credentialType"] = DataReferenceCredentialTypeSAS + populate(objectMap, "sasUri", s.SasURI) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type QuotaBaseProperties. -func (q *QuotaBaseProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type SASCredential. +func (s *SASCredential) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", q, err) + return fmt.Errorf("unmarshalling type %T: %v", s, err) } for key, val := range rawMsg { var err error switch key { - case "id": - err = unpopulate(val, "ID", &q.ID) - delete(rawMsg, key) - case "limit": - err = unpopulate(val, "Limit", &q.Limit) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &q.Type) + case "credentialType": + err = unpopulate(val, "CredentialType", &s.CredentialType) delete(rawMsg, key) - case "unit": - err = unpopulate(val, "Unit", &q.Unit) + case "sasUri": + err = unpopulate(val, "SasURI", &s.SasURI) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", q, err) + return fmt.Errorf("unmarshalling type %T: %v", s, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type QuotaUpdateParameters. -func (q QuotaUpdateParameters) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type SASCredentialDto. +func (s SASCredentialDto) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "location", q.Location) - populate(objectMap, "value", q.Value) + objectMap["credentialType"] = PendingUploadCredentialTypeSAS + populate(objectMap, "sasUri", s.SasURI) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type QuotaUpdateParameters. -func (q *QuotaUpdateParameters) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type SASCredentialDto. +func (s *SASCredentialDto) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", q, err) + return fmt.Errorf("unmarshalling type %T: %v", s, err) } for key, val := range rawMsg { var err error switch key { - case "location": - err = unpopulate(val, "Location", &q.Location) + case "credentialType": + err = unpopulate(val, "CredentialType", &s.CredentialType) delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &q.Value) + case "sasUri": + err = unpopulate(val, "SasURI", &s.SasURI) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", q, err) + return fmt.Errorf("unmarshalling type %T: %v", s, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type RandomSamplingAlgorithm. -func (r RandomSamplingAlgorithm) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type SKU. +func (s SKU) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "rule", r.Rule) - objectMap["samplingAlgorithmType"] = SamplingAlgorithmTypeRandom - populate(objectMap, "seed", r.Seed) + populate(objectMap, "capacity", s.Capacity) + populate(objectMap, "family", s.Family) + populate(objectMap, "name", s.Name) + populate(objectMap, "size", s.Size) + populate(objectMap, "tier", s.Tier) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type RandomSamplingAlgorithm. -func (r *RandomSamplingAlgorithm) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type SKU. +func (s *SKU) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) + return fmt.Errorf("unmarshalling type %T: %v", s, err) } for key, val := range rawMsg { var err error switch key { - case "rule": - err = unpopulate(val, "Rule", &r.Rule) + case "capacity": + err = unpopulate(val, "Capacity", &s.Capacity) delete(rawMsg, key) - case "samplingAlgorithmType": - err = unpopulate(val, "SamplingAlgorithmType", &r.SamplingAlgorithmType) + case "family": + err = unpopulate(val, "Family", &s.Family) delete(rawMsg, key) - case "seed": - err = unpopulate(val, "Seed", &r.Seed) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "size": + err = unpopulate(val, "Size", &s.Size) + delete(rawMsg, key) + case "tier": + err = unpopulate(val, "Tier", &s.Tier) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) + return fmt.Errorf("unmarshalling type %T: %v", s, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type RecurrenceSchedule. -func (r RecurrenceSchedule) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type SKUCapacity. +func (s SKUCapacity) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "hours", r.Hours) - populate(objectMap, "minutes", r.Minutes) - populate(objectMap, "monthDays", r.MonthDays) - populate(objectMap, "weekDays", r.WeekDays) + populate(objectMap, "default", s.Default) + populate(objectMap, "maximum", s.Maximum) + populate(objectMap, "minimum", s.Minimum) + populate(objectMap, "scaleType", s.ScaleType) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type RecurrenceSchedule. -func (r *RecurrenceSchedule) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type SKUCapacity. +func (s *SKUCapacity) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) + return fmt.Errorf("unmarshalling type %T: %v", s, err) } for key, val := range rawMsg { var err error switch key { - case "hours": - err = unpopulate(val, "Hours", &r.Hours) + case "default": + err = unpopulate(val, "Default", &s.Default) delete(rawMsg, key) - case "minutes": - err = unpopulate(val, "Minutes", &r.Minutes) + case "maximum": + err = unpopulate(val, "Maximum", &s.Maximum) delete(rawMsg, key) - case "monthDays": - err = unpopulate(val, "MonthDays", &r.MonthDays) + case "minimum": + err = unpopulate(val, "Minimum", &s.Minimum) delete(rawMsg, key) - case "weekDays": - err = unpopulate(val, "WeekDays", &r.WeekDays) + case "scaleType": + err = unpopulate(val, "ScaleType", &s.ScaleType) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) + return fmt.Errorf("unmarshalling type %T: %v", s, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type RecurrenceTrigger. -func (r RecurrenceTrigger) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type SKUResource. +func (s SKUResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "endTime", r.EndTime) - populate(objectMap, "frequency", r.Frequency) - populate(objectMap, "interval", r.Interval) - populate(objectMap, "schedule", r.Schedule) - populate(objectMap, "startTime", r.StartTime) - populate(objectMap, "timeZone", r.TimeZone) - objectMap["triggerType"] = TriggerTypeRecurrence + populate(objectMap, "capacity", s.Capacity) + populate(objectMap, "resourceType", s.ResourceType) + populate(objectMap, "sku", s.SKU) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type RecurrenceTrigger. -func (r *RecurrenceTrigger) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type SKUResource. +func (s *SKUResource) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) + return fmt.Errorf("unmarshalling type %T: %v", s, err) } for key, val := range rawMsg { var err error switch key { - case "endTime": - err = unpopulate(val, "EndTime", &r.EndTime) - delete(rawMsg, key) - case "frequency": - err = unpopulate(val, "Frequency", &r.Frequency) - delete(rawMsg, key) - case "interval": - err = unpopulate(val, "Interval", &r.Interval) - delete(rawMsg, key) - case "schedule": - err = unpopulate(val, "Schedule", &r.Schedule) - delete(rawMsg, key) - case "startTime": - err = unpopulate(val, "StartTime", &r.StartTime) + case "capacity": + err = unpopulate(val, "Capacity", &s.Capacity) delete(rawMsg, key) - case "timeZone": - err = unpopulate(val, "TimeZone", &r.TimeZone) + case "resourceType": + err = unpopulate(val, "ResourceType", &s.ResourceType) delete(rawMsg, key) - case "triggerType": - err = unpopulate(val, "TriggerType", &r.TriggerType) + case "sku": + err = unpopulate(val, "SKU", &s.SKU) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) + return fmt.Errorf("unmarshalling type %T: %v", s, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type RegenerateEndpointKeysRequest. -func (r RegenerateEndpointKeysRequest) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type SKUResourceArmPaginatedResult. +func (s SKUResourceArmPaginatedResult) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "keyType", r.KeyType) - populate(objectMap, "keyValue", r.KeyValue) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type RegenerateEndpointKeysRequest. -func (r *RegenerateEndpointKeysRequest) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type SKUResourceArmPaginatedResult. +func (s *SKUResourceArmPaginatedResult) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) + return fmt.Errorf("unmarshalling type %T: %v", s, err) } for key, val := range rawMsg { var err error switch key { - case "keyType": - err = unpopulate(val, "KeyType", &r.KeyType) + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) delete(rawMsg, key) - case "keyValue": - err = unpopulate(val, "KeyValue", &r.KeyValue) + case "value": + err = unpopulate(val, "Value", &s.Value) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) + return fmt.Errorf("unmarshalling type %T: %v", s, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type RegistryListCredentialsResult. -func (r RegistryListCredentialsResult) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type SKUSetting. +func (s SKUSetting) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "location", r.Location) - populate(objectMap, "passwords", r.Passwords) - populate(objectMap, "username", r.Username) + populate(objectMap, "name", s.Name) + populate(objectMap, "tier", s.Tier) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type RegistryListCredentialsResult. -func (r *RegistryListCredentialsResult) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type SKUSetting. +func (s *SKUSetting) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) + return fmt.Errorf("unmarshalling type %T: %v", s, err) } for key, val := range rawMsg { var err error switch key { - case "location": - err = unpopulate(val, "Location", &r.Location) - delete(rawMsg, key) - case "passwords": - err = unpopulate(val, "Passwords", &r.Passwords) + case "name": + err = unpopulate(val, "Name", &s.Name) delete(rawMsg, key) - case "username": - err = unpopulate(val, "Username", &r.Username) + case "tier": + err = unpopulate(val, "Tier", &s.Tier) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) + return fmt.Errorf("unmarshalling type %T: %v", s, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type Regression. -func (r Regression) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type SSLConfiguration. +func (s SSLConfiguration) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "cvSplitColumnNames", r.CvSplitColumnNames) - populate(objectMap, "featurizationSettings", r.FeaturizationSettings) - populate(objectMap, "limitSettings", r.LimitSettings) - populate(objectMap, "logVerbosity", r.LogVerbosity) - populate(objectMap, "nCrossValidations", r.NCrossValidations) - populate(objectMap, "primaryMetric", r.PrimaryMetric) - populate(objectMap, "targetColumnName", r.TargetColumnName) - objectMap["taskType"] = TaskTypeRegression - populate(objectMap, "testData", r.TestData) - populate(objectMap, "testDataSize", r.TestDataSize) - populate(objectMap, "trainingData", r.TrainingData) - populate(objectMap, "trainingSettings", r.TrainingSettings) - populate(objectMap, "validationData", r.ValidationData) - populate(objectMap, "validationDataSize", r.ValidationDataSize) - populate(objectMap, "weightColumnName", r.WeightColumnName) + populate(objectMap, "cert", s.Cert) + populate(objectMap, "cname", s.Cname) + populate(objectMap, "key", s.Key) + populate(objectMap, "leafDomainLabel", s.LeafDomainLabel) + populate(objectMap, "overwriteExistingDomain", s.OverwriteExistingDomain) + populate(objectMap, "status", s.Status) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type Regression. -func (r *Regression) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type SSLConfiguration. +func (s *SSLConfiguration) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) + return fmt.Errorf("unmarshalling type %T: %v", s, err) } for key, val := range rawMsg { var err error switch key { - case "cvSplitColumnNames": - err = unpopulate(val, "CvSplitColumnNames", &r.CvSplitColumnNames) - delete(rawMsg, key) - case "featurizationSettings": - err = unpopulate(val, "FeaturizationSettings", &r.FeaturizationSettings) - delete(rawMsg, key) - case "limitSettings": - err = unpopulate(val, "LimitSettings", &r.LimitSettings) - delete(rawMsg, key) - case "logVerbosity": - err = unpopulate(val, "LogVerbosity", &r.LogVerbosity) - delete(rawMsg, key) - case "nCrossValidations": - r.NCrossValidations, err = unmarshalNCrossValidationsClassification(val) - delete(rawMsg, key) - case "primaryMetric": - err = unpopulate(val, "PrimaryMetric", &r.PrimaryMetric) - delete(rawMsg, key) - case "targetColumnName": - err = unpopulate(val, "TargetColumnName", &r.TargetColumnName) - delete(rawMsg, key) - case "taskType": - err = unpopulate(val, "TaskType", &r.TaskType) - delete(rawMsg, key) - case "testData": - err = unpopulate(val, "TestData", &r.TestData) - delete(rawMsg, key) - case "testDataSize": - err = unpopulate(val, "TestDataSize", &r.TestDataSize) + case "cert": + err = unpopulate(val, "Cert", &s.Cert) delete(rawMsg, key) - case "trainingData": - err = unpopulate(val, "TrainingData", &r.TrainingData) + case "cname": + err = unpopulate(val, "Cname", &s.Cname) delete(rawMsg, key) - case "trainingSettings": - err = unpopulate(val, "TrainingSettings", &r.TrainingSettings) + case "key": + err = unpopulate(val, "Key", &s.Key) delete(rawMsg, key) - case "validationData": - err = unpopulate(val, "ValidationData", &r.ValidationData) + case "leafDomainLabel": + err = unpopulate(val, "LeafDomainLabel", &s.LeafDomainLabel) delete(rawMsg, key) - case "validationDataSize": - err = unpopulate(val, "ValidationDataSize", &r.ValidationDataSize) + case "overwriteExistingDomain": + err = unpopulate(val, "OverwriteExistingDomain", &s.OverwriteExistingDomain) delete(rawMsg, key) - case "weightColumnName": - err = unpopulate(val, "WeightColumnName", &r.WeightColumnName) + case "status": + err = unpopulate(val, "Status", &s.Status) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) + return fmt.Errorf("unmarshalling type %T: %v", s, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type RegressionTrainingSettings. -func (r RegressionTrainingSettings) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type SamplingAlgorithm. +func (s SamplingAlgorithm) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "allowedTrainingAlgorithms", r.AllowedTrainingAlgorithms) - populate(objectMap, "blockedTrainingAlgorithms", r.BlockedTrainingAlgorithms) - populate(objectMap, "enableDnnTraining", r.EnableDnnTraining) - populate(objectMap, "enableModelExplainability", r.EnableModelExplainability) - populate(objectMap, "enableOnnxCompatibleModels", r.EnableOnnxCompatibleModels) - populate(objectMap, "enableStackEnsemble", r.EnableStackEnsemble) - populate(objectMap, "enableVoteEnsemble", r.EnableVoteEnsemble) - populate(objectMap, "ensembleModelDownloadTimeout", r.EnsembleModelDownloadTimeout) - populate(objectMap, "stackEnsembleSettings", r.StackEnsembleSettings) + objectMap["samplingAlgorithmType"] = s.SamplingAlgorithmType return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type RegressionTrainingSettings. -func (r *RegressionTrainingSettings) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type SamplingAlgorithm. +func (s *SamplingAlgorithm) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) + return fmt.Errorf("unmarshalling type %T: %v", s, err) } for key, val := range rawMsg { var err error switch key { - case "allowedTrainingAlgorithms": - err = unpopulate(val, "AllowedTrainingAlgorithms", &r.AllowedTrainingAlgorithms) - delete(rawMsg, key) - case "blockedTrainingAlgorithms": - err = unpopulate(val, "BlockedTrainingAlgorithms", &r.BlockedTrainingAlgorithms) - delete(rawMsg, key) - case "enableDnnTraining": - err = unpopulate(val, "EnableDnnTraining", &r.EnableDnnTraining) - delete(rawMsg, key) - case "enableModelExplainability": - err = unpopulate(val, "EnableModelExplainability", &r.EnableModelExplainability) - delete(rawMsg, key) - case "enableOnnxCompatibleModels": - err = unpopulate(val, "EnableOnnxCompatibleModels", &r.EnableOnnxCompatibleModels) - delete(rawMsg, key) - case "enableStackEnsemble": - err = unpopulate(val, "EnableStackEnsemble", &r.EnableStackEnsemble) - delete(rawMsg, key) - case "enableVoteEnsemble": - err = unpopulate(val, "EnableVoteEnsemble", &r.EnableVoteEnsemble) - delete(rawMsg, key) - case "ensembleModelDownloadTimeout": - err = unpopulate(val, "EnsembleModelDownloadTimeout", &r.EnsembleModelDownloadTimeout) - delete(rawMsg, key) - case "stackEnsembleSettings": - err = unpopulate(val, "StackEnsembleSettings", &r.StackEnsembleSettings) + case "samplingAlgorithmType": + err = unpopulate(val, "SamplingAlgorithmType", &s.SamplingAlgorithmType) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) + return fmt.Errorf("unmarshalling type %T: %v", s, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type Resource. -func (r Resource) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type SasDatastoreCredentials. +func (s SasDatastoreCredentials) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "id", r.ID) - populate(objectMap, "name", r.Name) - populate(objectMap, "systemData", r.SystemData) - populate(objectMap, "type", r.Type) + objectMap["credentialsType"] = CredentialsTypeSas + populate(objectMap, "secrets", s.Secrets) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type Resource. -func (r *Resource) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type SasDatastoreCredentials. +func (s *SasDatastoreCredentials) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) + return fmt.Errorf("unmarshalling type %T: %v", s, err) } for key, val := range rawMsg { var err error switch key { - case "id": - err = unpopulate(val, "ID", &r.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &r.Name) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &r.SystemData) + case "credentialsType": + err = unpopulate(val, "CredentialsType", &s.CredentialsType) delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &r.Type) + case "secrets": + err = unpopulate(val, "Secrets", &s.Secrets) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) + return fmt.Errorf("unmarshalling type %T: %v", s, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ResourceBase. -func (r ResourceBase) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type SasDatastoreSecrets. +func (s SasDatastoreSecrets) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "description", r.Description) - populate(objectMap, "properties", r.Properties) - populate(objectMap, "tags", r.Tags) + populate(objectMap, "sasToken", s.SasToken) + objectMap["secretsType"] = SecretsTypeSas return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceBase. -func (r *ResourceBase) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type SasDatastoreSecrets. +func (s *SasDatastoreSecrets) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) + return fmt.Errorf("unmarshalling type %T: %v", s, err) } for key, val := range rawMsg { var err error switch key { - case "description": - err = unpopulate(val, "Description", &r.Description) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &r.Properties) + case "sasToken": + err = unpopulate(val, "SasToken", &s.SasToken) delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &r.Tags) + case "secretsType": + err = unpopulate(val, "SecretsType", &s.SecretsType) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) + return fmt.Errorf("unmarshalling type %T: %v", s, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ResourceConfiguration. -func (r ResourceConfiguration) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ScaleSettings. +func (s ScaleSettings) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "instanceCount", r.InstanceCount) - populate(objectMap, "instanceType", r.InstanceType) - populate(objectMap, "properties", r.Properties) + populate(objectMap, "maxNodeCount", s.MaxNodeCount) + populate(objectMap, "minNodeCount", s.MinNodeCount) + populate(objectMap, "nodeIdleTimeBeforeScaleDown", s.NodeIdleTimeBeforeScaleDown) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceConfiguration. -func (r *ResourceConfiguration) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ScaleSettings. +func (s *ScaleSettings) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) + return fmt.Errorf("unmarshalling type %T: %v", s, err) } for key, val := range rawMsg { var err error switch key { - case "instanceCount": - err = unpopulate(val, "InstanceCount", &r.InstanceCount) + case "maxNodeCount": + err = unpopulate(val, "MaxNodeCount", &s.MaxNodeCount) delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &r.InstanceType) + case "minNodeCount": + err = unpopulate(val, "MinNodeCount", &s.MinNodeCount) delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &r.Properties) + case "nodeIdleTimeBeforeScaleDown": + err = unpopulate(val, "NodeIdleTimeBeforeScaleDown", &s.NodeIdleTimeBeforeScaleDown) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) + return fmt.Errorf("unmarshalling type %T: %v", s, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ResourceID. -func (r ResourceID) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ScaleSettingsInformation. +func (s ScaleSettingsInformation) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "id", r.ID) + populate(objectMap, "scaleSettings", s.ScaleSettings) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceID. -func (r *ResourceID) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ScaleSettingsInformation. +func (s *ScaleSettingsInformation) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) + return fmt.Errorf("unmarshalling type %T: %v", s, err) } for key, val := range rawMsg { var err error switch key { - case "id": - err = unpopulate(val, "ID", &r.ID) + case "scaleSettings": + err = unpopulate(val, "ScaleSettings", &s.ScaleSettings) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) + return fmt.Errorf("unmarshalling type %T: %v", s, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ResourceName. -func (r ResourceName) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type Schedule. +func (s Schedule) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "localizedValue", r.LocalizedValue) - populate(objectMap, "value", r.Value) + populate(objectMap, "id", s.ID) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "systemData", s.SystemData) + populate(objectMap, "type", s.Type) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceName. -func (r *ResourceName) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type Schedule. +func (s *Schedule) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) + return fmt.Errorf("unmarshalling type %T: %v", s, err) } for key, val := range rawMsg { var err error switch key { - case "localizedValue": - err = unpopulate(val, "LocalizedValue", &r.LocalizedValue) + case "id": + err = unpopulate(val, "ID", &s.ID) delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &r.Value) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &s.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) + return fmt.Errorf("unmarshalling type %T: %v", s, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ResourceQuota. -func (r ResourceQuota) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ScheduleActionBase. +func (s ScheduleActionBase) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "amlWorkspaceLocation", r.AmlWorkspaceLocation) - populate(objectMap, "id", r.ID) - populate(objectMap, "limit", r.Limit) - populate(objectMap, "name", r.Name) - populate(objectMap, "type", r.Type) - populate(objectMap, "unit", r.Unit) + objectMap["actionType"] = s.ActionType return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceQuota. -func (r *ResourceQuota) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ScheduleActionBase. +func (s *ScheduleActionBase) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) + return fmt.Errorf("unmarshalling type %T: %v", s, err) } for key, val := range rawMsg { var err error switch key { - case "amlWorkspaceLocation": - err = unpopulate(val, "AmlWorkspaceLocation", &r.AmlWorkspaceLocation) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &r.ID) - delete(rawMsg, key) - case "limit": - err = unpopulate(val, "Limit", &r.Limit) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &r.Name) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &r.Type) - delete(rawMsg, key) - case "unit": - err = unpopulate(val, "Unit", &r.Unit) + case "actionType": + err = unpopulate(val, "ActionType", &s.ActionType) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) + return fmt.Errorf("unmarshalling type %T: %v", s, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type Route. -func (r Route) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ScheduleBase. +func (s ScheduleBase) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "path", r.Path) - populate(objectMap, "port", r.Port) + populate(objectMap, "id", s.ID) + populate(objectMap, "provisioningStatus", s.ProvisioningStatus) + populate(objectMap, "status", s.Status) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type Route. -func (r *Route) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ScheduleBase. +func (s *ScheduleBase) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) + return fmt.Errorf("unmarshalling type %T: %v", s, err) } for key, val := range rawMsg { var err error switch key { - case "path": - err = unpopulate(val, "Path", &r.Path) + case "id": + err = unpopulate(val, "ID", &s.ID) delete(rawMsg, key) - case "port": - err = unpopulate(val, "Port", &r.Port) + case "provisioningStatus": + err = unpopulate(val, "ProvisioningStatus", &s.ProvisioningStatus) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &s.Status) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) + return fmt.Errorf("unmarshalling type %T: %v", s, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type SASAuthTypeWorkspaceConnectionProperties. -func (s SASAuthTypeWorkspaceConnectionProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ScheduleProperties. +func (s ScheduleProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - objectMap["authType"] = ConnectionAuthTypeSAS - populate(objectMap, "category", s.Category) - populate(objectMap, "credentials", s.Credentials) - populate(objectMap, "target", s.Target) - populate(objectMap, "value", s.Value) - populate(objectMap, "valueFormat", s.ValueFormat) + populate(objectMap, "action", s.Action) + populate(objectMap, "description", s.Description) + populate(objectMap, "displayName", s.DisplayName) + populate(objectMap, "isEnabled", s.IsEnabled) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "provisioningState", s.ProvisioningState) + populate(objectMap, "tags", s.Tags) + populate(objectMap, "trigger", s.Trigger) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type SASAuthTypeWorkspaceConnectionProperties. -func (s *SASAuthTypeWorkspaceConnectionProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ScheduleProperties. +func (s *ScheduleProperties) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", s, err) @@ -12279,23 +18186,29 @@ func (s *SASAuthTypeWorkspaceConnectionProperties) UnmarshalJSON(data []byte) er for key, val := range rawMsg { var err error switch key { - case "authType": - err = unpopulate(val, "AuthType", &s.AuthType) + case "action": + s.Action, err = unmarshalScheduleActionBaseClassification(val) delete(rawMsg, key) - case "category": - err = unpopulate(val, "Category", &s.Category) + case "description": + err = unpopulate(val, "Description", &s.Description) delete(rawMsg, key) - case "credentials": - err = unpopulate(val, "Credentials", &s.Credentials) + case "displayName": + err = unpopulate(val, "DisplayName", &s.DisplayName) delete(rawMsg, key) - case "target": - err = unpopulate(val, "Target", &s.Target) + case "isEnabled": + err = unpopulate(val, "IsEnabled", &s.IsEnabled) delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &s.Value) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) delete(rawMsg, key) - case "valueFormat": - err = unpopulate(val, "ValueFormat", &s.ValueFormat) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &s.ProvisioningState) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &s.Tags) + delete(rawMsg, key) + case "trigger": + s.Trigger, err = unmarshalTriggerBaseClassification(val) delete(rawMsg, key) } if err != nil { @@ -12305,40 +18218,28 @@ func (s *SASAuthTypeWorkspaceConnectionProperties) UnmarshalJSON(data []byte) er return nil } -// MarshalJSON implements the json.Marshaller interface for type SKU. -func (s SKU) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ScheduleResourceArmPaginatedResult. +func (s ScheduleResourceArmPaginatedResult) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "capacity", s.Capacity) - populate(objectMap, "family", s.Family) - populate(objectMap, "name", s.Name) - populate(objectMap, "size", s.Size) - populate(objectMap, "tier", s.Tier) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type SKU. -func (s *SKU) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ScheduleResourceArmPaginatedResult. +func (s *ScheduleResourceArmPaginatedResult) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", s, err) } - for key, val := range rawMsg { - var err error - switch key { - case "capacity": - err = unpopulate(val, "Capacity", &s.Capacity) - delete(rawMsg, key) - case "family": - err = unpopulate(val, "Family", &s.Family) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &s.Name) - delete(rawMsg, key) - case "size": - err = unpopulate(val, "Size", &s.Size) + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) delete(rawMsg, key) - case "tier": - err = unpopulate(val, "Tier", &s.Tier) + case "value": + err = unpopulate(val, "Value", &s.Value) delete(rawMsg, key) } if err != nil { @@ -12348,18 +18249,18 @@ func (s *SKU) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type SKUCapacity. -func (s SKUCapacity) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ScriptReference. +func (s ScriptReference) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "default", s.Default) - populate(objectMap, "maximum", s.Maximum) - populate(objectMap, "minimum", s.Minimum) - populate(objectMap, "scaleType", s.ScaleType) + populate(objectMap, "scriptArguments", s.ScriptArguments) + populate(objectMap, "scriptData", s.ScriptData) + populate(objectMap, "scriptSource", s.ScriptSource) + populate(objectMap, "timeout", s.Timeout) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type SKUCapacity. -func (s *SKUCapacity) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ScriptReference. +func (s *ScriptReference) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", s, err) @@ -12367,17 +18268,17 @@ func (s *SKUCapacity) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "default": - err = unpopulate(val, "Default", &s.Default) + case "scriptArguments": + err = unpopulate(val, "ScriptArguments", &s.ScriptArguments) delete(rawMsg, key) - case "maximum": - err = unpopulate(val, "Maximum", &s.Maximum) + case "scriptData": + err = unpopulate(val, "ScriptData", &s.ScriptData) delete(rawMsg, key) - case "minimum": - err = unpopulate(val, "Minimum", &s.Minimum) + case "scriptSource": + err = unpopulate(val, "ScriptSource", &s.ScriptSource) delete(rawMsg, key) - case "scaleType": - err = unpopulate(val, "ScaleType", &s.ScaleType) + case "timeout": + err = unpopulate(val, "Timeout", &s.Timeout) delete(rawMsg, key) } if err != nil { @@ -12387,17 +18288,16 @@ func (s *SKUCapacity) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type SKUResource. -func (s SKUResource) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ScriptsToExecute. +func (s ScriptsToExecute) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "capacity", s.Capacity) - populate(objectMap, "resourceType", s.ResourceType) - populate(objectMap, "sku", s.SKU) + populate(objectMap, "creationScript", s.CreationScript) + populate(objectMap, "startupScript", s.StartupScript) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type SKUResource. -func (s *SKUResource) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ScriptsToExecute. +func (s *ScriptsToExecute) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", s, err) @@ -12405,14 +18305,11 @@ func (s *SKUResource) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "capacity": - err = unpopulate(val, "Capacity", &s.Capacity) - delete(rawMsg, key) - case "resourceType": - err = unpopulate(val, "ResourceType", &s.ResourceType) + case "creationScript": + err = unpopulate(val, "CreationScript", &s.CreationScript) delete(rawMsg, key) - case "sku": - err = unpopulate(val, "SKU", &s.SKU) + case "startupScript": + err = unpopulate(val, "StartupScript", &s.StartupScript) delete(rawMsg, key) } if err != nil { @@ -12422,16 +18319,15 @@ func (s *SKUResource) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type SKUResourceArmPaginatedResult. -func (s SKUResourceArmPaginatedResult) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type Seasonality. +func (s Seasonality) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "nextLink", s.NextLink) - populate(objectMap, "value", s.Value) + objectMap["mode"] = s.Mode return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type SKUResourceArmPaginatedResult. -func (s *SKUResourceArmPaginatedResult) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type Seasonality. +func (s *Seasonality) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", s, err) @@ -12439,11 +18335,8 @@ func (s *SKUResourceArmPaginatedResult) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &s.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &s.Value) + case "mode": + err = unpopulate(val, "Mode", &s.Mode) delete(rawMsg, key) } if err != nil { @@ -12453,16 +18346,16 @@ func (s *SKUResourceArmPaginatedResult) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type SKUSetting. -func (s SKUSetting) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ServerlessComputeSettings. +func (s ServerlessComputeSettings) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "name", s.Name) - populate(objectMap, "tier", s.Tier) + populate(objectMap, "serverlessComputeCustomSubnet", s.ServerlessComputeCustomSubnet) + populate(objectMap, "serverlessComputeNoPublicIP", s.ServerlessComputeNoPublicIP) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type SKUSetting. -func (s *SKUSetting) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ServerlessComputeSettings. +func (s *ServerlessComputeSettings) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", s, err) @@ -12470,11 +18363,11 @@ func (s *SKUSetting) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "name": - err = unpopulate(val, "Name", &s.Name) + case "serverlessComputeCustomSubnet": + err = unpopulate(val, "ServerlessComputeCustomSubnet", &s.ServerlessComputeCustomSubnet) delete(rawMsg, key) - case "tier": - err = unpopulate(val, "Tier", &s.Tier) + case "serverlessComputeNoPublicIP": + err = unpopulate(val, "ServerlessComputeNoPublicIP", &s.ServerlessComputeNoPublicIP) delete(rawMsg, key) } if err != nil { @@ -12484,20 +18377,24 @@ func (s *SKUSetting) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type SSLConfiguration. -func (s SSLConfiguration) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ServerlessEndpoint. +func (s ServerlessEndpoint) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "cert", s.Cert) - populate(objectMap, "cname", s.Cname) - populate(objectMap, "key", s.Key) - populate(objectMap, "leafDomainLabel", s.LeafDomainLabel) - populate(objectMap, "overwriteExistingDomain", s.OverwriteExistingDomain) - populate(objectMap, "status", s.Status) + populate(objectMap, "id", s.ID) + populate(objectMap, "identity", s.Identity) + populate(objectMap, "kind", s.Kind) + populate(objectMap, "location", s.Location) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "sku", s.SKU) + populate(objectMap, "systemData", s.SystemData) + populate(objectMap, "tags", s.Tags) + populate(objectMap, "type", s.Type) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type SSLConfiguration. -func (s *SSLConfiguration) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ServerlessEndpoint. +func (s *ServerlessEndpoint) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", s, err) @@ -12505,23 +18402,35 @@ func (s *SSLConfiguration) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "cert": - err = unpopulate(val, "Cert", &s.Cert) + case "id": + err = unpopulate(val, "ID", &s.ID) delete(rawMsg, key) - case "cname": - err = unpopulate(val, "Cname", &s.Cname) + case "identity": + err = unpopulate(val, "Identity", &s.Identity) delete(rawMsg, key) - case "key": - err = unpopulate(val, "Key", &s.Key) + case "kind": + err = unpopulate(val, "Kind", &s.Kind) delete(rawMsg, key) - case "leafDomainLabel": - err = unpopulate(val, "LeafDomainLabel", &s.LeafDomainLabel) + case "location": + err = unpopulate(val, "Location", &s.Location) delete(rawMsg, key) - case "overwriteExistingDomain": - err = unpopulate(val, "OverwriteExistingDomain", &s.OverwriteExistingDomain) + case "name": + err = unpopulate(val, "Name", &s.Name) delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &s.Status) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &s.SKU) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &s.SystemData) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &s.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) delete(rawMsg, key) } if err != nil { @@ -12531,15 +18440,21 @@ func (s *SSLConfiguration) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type SamplingAlgorithm. -func (s SamplingAlgorithm) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ServerlessEndpointProperties. +func (s ServerlessEndpointProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - objectMap["samplingAlgorithmType"] = s.SamplingAlgorithmType + populate(objectMap, "authMode", s.AuthMode) + populate(objectMap, "contentSafety", s.ContentSafety) + populate(objectMap, "endpointState", s.EndpointState) + populate(objectMap, "inferenceEndpoint", s.InferenceEndpoint) + populate(objectMap, "marketplaceSubscriptionId", s.MarketplaceSubscriptionID) + populate(objectMap, "modelSettings", s.ModelSettings) + populate(objectMap, "provisioningState", s.ProvisioningState) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type SamplingAlgorithm. -func (s *SamplingAlgorithm) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ServerlessEndpointProperties. +func (s *ServerlessEndpointProperties) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", s, err) @@ -12547,8 +18462,26 @@ func (s *SamplingAlgorithm) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "samplingAlgorithmType": - err = unpopulate(val, "SamplingAlgorithmType", &s.SamplingAlgorithmType) + case "authMode": + err = unpopulate(val, "AuthMode", &s.AuthMode) + delete(rawMsg, key) + case "contentSafety": + err = unpopulate(val, "ContentSafety", &s.ContentSafety) + delete(rawMsg, key) + case "endpointState": + err = unpopulate(val, "EndpointState", &s.EndpointState) + delete(rawMsg, key) + case "inferenceEndpoint": + err = unpopulate(val, "InferenceEndpoint", &s.InferenceEndpoint) + delete(rawMsg, key) + case "marketplaceSubscriptionId": + err = unpopulate(val, "MarketplaceSubscriptionID", &s.MarketplaceSubscriptionID) + delete(rawMsg, key) + case "modelSettings": + err = unpopulate(val, "ModelSettings", &s.ModelSettings) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &s.ProvisioningState) delete(rawMsg, key) } if err != nil { @@ -12558,16 +18491,16 @@ func (s *SamplingAlgorithm) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type SasDatastoreCredentials. -func (s SasDatastoreCredentials) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ServerlessEndpointTrackedResourceArmPaginatedResult. +func (s ServerlessEndpointTrackedResourceArmPaginatedResult) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - objectMap["credentialsType"] = CredentialsTypeSas - populate(objectMap, "secrets", s.Secrets) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type SasDatastoreCredentials. -func (s *SasDatastoreCredentials) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ServerlessEndpointTrackedResourceArmPaginatedResult. +func (s *ServerlessEndpointTrackedResourceArmPaginatedResult) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", s, err) @@ -12575,11 +18508,11 @@ func (s *SasDatastoreCredentials) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "credentialsType": - err = unpopulate(val, "CredentialsType", &s.CredentialsType) + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) delete(rawMsg, key) - case "secrets": - err = unpopulate(val, "Secrets", &s.Secrets) + case "value": + err = unpopulate(val, "Value", &s.Value) delete(rawMsg, key) } if err != nil { @@ -12589,16 +18522,16 @@ func (s *SasDatastoreCredentials) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type SasDatastoreSecrets. -func (s SasDatastoreSecrets) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ServerlessInferenceEndpoint. +func (s ServerlessInferenceEndpoint) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "sasToken", s.SasToken) - objectMap["secretsType"] = SecretsTypeSas + populate(objectMap, "headers", s.Headers) + populate(objectMap, "uri", s.URI) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type SasDatastoreSecrets. -func (s *SasDatastoreSecrets) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ServerlessInferenceEndpoint. +func (s *ServerlessInferenceEndpoint) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", s, err) @@ -12606,11 +18539,11 @@ func (s *SasDatastoreSecrets) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "sasToken": - err = unpopulate(val, "SasToken", &s.SasToken) + case "headers": + err = unpopulate(val, "Headers", &s.Headers) delete(rawMsg, key) - case "secretsType": - err = unpopulate(val, "SecretsType", &s.SecretsType) + case "uri": + err = unpopulate(val, "URI", &s.URI) delete(rawMsg, key) } if err != nil { @@ -12620,17 +18553,15 @@ func (s *SasDatastoreSecrets) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ScaleSettings. -func (s ScaleSettings) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ServiceManagedResourcesSettings. +func (s ServiceManagedResourcesSettings) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "maxNodeCount", s.MaxNodeCount) - populate(objectMap, "minNodeCount", s.MinNodeCount) - populate(objectMap, "nodeIdleTimeBeforeScaleDown", s.NodeIdleTimeBeforeScaleDown) + populate(objectMap, "cosmosDb", s.CosmosDb) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ScaleSettings. -func (s *ScaleSettings) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceManagedResourcesSettings. +func (s *ServiceManagedResourcesSettings) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", s, err) @@ -12638,14 +18569,8 @@ func (s *ScaleSettings) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "maxNodeCount": - err = unpopulate(val, "MaxNodeCount", &s.MaxNodeCount) - delete(rawMsg, key) - case "minNodeCount": - err = unpopulate(val, "MinNodeCount", &s.MinNodeCount) - delete(rawMsg, key) - case "nodeIdleTimeBeforeScaleDown": - err = unpopulate(val, "NodeIdleTimeBeforeScaleDown", &s.NodeIdleTimeBeforeScaleDown) + case "cosmosDb": + err = unpopulate(val, "CosmosDb", &s.CosmosDb) delete(rawMsg, key) } if err != nil { @@ -12655,15 +18580,26 @@ func (s *ScaleSettings) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ScaleSettingsInformation. -func (s ScaleSettingsInformation) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ServicePrincipalAuthTypeWorkspaceConnectionProperties. +func (s ServicePrincipalAuthTypeWorkspaceConnectionProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "scaleSettings", s.ScaleSettings) + objectMap["authType"] = ConnectionAuthTypeServicePrincipal + populate(objectMap, "category", s.Category) + populate(objectMap, "createdByWorkspaceArmId", s.CreatedByWorkspaceArmID) + populate(objectMap, "credentials", s.Credentials) + populateDateTimeRFC3339(objectMap, "expiryTime", s.ExpiryTime) + populate(objectMap, "group", s.Group) + populate(objectMap, "isSharedToAll", s.IsSharedToAll) + populate(objectMap, "metadata", s.Metadata) + populate(objectMap, "sharedUserList", s.SharedUserList) + populate(objectMap, "target", s.Target) + populate(objectMap, "value", s.Value) + populate(objectMap, "valueFormat", s.ValueFormat) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ScaleSettingsInformation. -func (s *ScaleSettingsInformation) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ServicePrincipalAuthTypeWorkspaceConnectionProperties. +func (s *ServicePrincipalAuthTypeWorkspaceConnectionProperties) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", s, err) @@ -12671,8 +18607,41 @@ func (s *ScaleSettingsInformation) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "scaleSettings": - err = unpopulate(val, "ScaleSettings", &s.ScaleSettings) + case "authType": + err = unpopulate(val, "AuthType", &s.AuthType) + delete(rawMsg, key) + case "category": + err = unpopulate(val, "Category", &s.Category) + delete(rawMsg, key) + case "createdByWorkspaceArmId": + err = unpopulate(val, "CreatedByWorkspaceArmID", &s.CreatedByWorkspaceArmID) + delete(rawMsg, key) + case "credentials": + err = unpopulate(val, "Credentials", &s.Credentials) + delete(rawMsg, key) + case "expiryTime": + err = unpopulateDateTimeRFC3339(val, "ExpiryTime", &s.ExpiryTime) + delete(rawMsg, key) + case "group": + err = unpopulate(val, "Group", &s.Group) + delete(rawMsg, key) + case "isSharedToAll": + err = unpopulate(val, "IsSharedToAll", &s.IsSharedToAll) + delete(rawMsg, key) + case "metadata": + err = unpopulate(val, "Metadata", &s.Metadata) + delete(rawMsg, key) + case "sharedUserList": + err = unpopulate(val, "SharedUserList", &s.SharedUserList) + delete(rawMsg, key) + case "target": + err = unpopulate(val, "Target", &s.Target) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + case "valueFormat": + err = unpopulate(val, "ValueFormat", &s.ValueFormat) delete(rawMsg, key) } if err != nil { @@ -12682,19 +18651,20 @@ func (s *ScaleSettingsInformation) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type Schedule. -func (s Schedule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", s.ID) - populate(objectMap, "name", s.Name) - populate(objectMap, "properties", s.Properties) - populate(objectMap, "systemData", s.SystemData) - populate(objectMap, "type", s.Type) +// MarshalJSON implements the json.Marshaller interface for type ServicePrincipalDatastoreCredentials. +func (s ServicePrincipalDatastoreCredentials) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "authorityUrl", s.AuthorityURL) + populate(objectMap, "clientId", s.ClientID) + objectMap["credentialsType"] = CredentialsTypeServicePrincipal + populate(objectMap, "resourceUrl", s.ResourceURL) + populate(objectMap, "secrets", s.Secrets) + populate(objectMap, "tenantId", s.TenantID) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type Schedule. -func (s *Schedule) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ServicePrincipalDatastoreCredentials. +func (s *ServicePrincipalDatastoreCredentials) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", s, err) @@ -12702,20 +18672,23 @@ func (s *Schedule) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "id": - err = unpopulate(val, "ID", &s.ID) + case "authorityUrl": + err = unpopulate(val, "AuthorityURL", &s.AuthorityURL) delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &s.Name) + case "clientId": + err = unpopulate(val, "ClientID", &s.ClientID) delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &s.Properties) + case "credentialsType": + err = unpopulate(val, "CredentialsType", &s.CredentialsType) delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &s.SystemData) + case "resourceUrl": + err = unpopulate(val, "ResourceURL", &s.ResourceURL) delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &s.Type) + case "secrets": + err = unpopulate(val, "Secrets", &s.Secrets) + delete(rawMsg, key) + case "tenantId": + err = unpopulate(val, "TenantID", &s.TenantID) delete(rawMsg, key) } if err != nil { @@ -12725,15 +18698,16 @@ func (s *Schedule) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ScheduleActionBase. -func (s ScheduleActionBase) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ServicePrincipalDatastoreSecrets. +func (s ServicePrincipalDatastoreSecrets) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - objectMap["actionType"] = s.ActionType + populate(objectMap, "clientSecret", s.ClientSecret) + objectMap["secretsType"] = SecretsTypeServicePrincipal return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ScheduleActionBase. -func (s *ScheduleActionBase) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ServicePrincipalDatastoreSecrets. +func (s *ServicePrincipalDatastoreSecrets) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", s, err) @@ -12741,8 +18715,11 @@ func (s *ScheduleActionBase) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "actionType": - err = unpopulate(val, "ActionType", &s.ActionType) + case "clientSecret": + err = unpopulate(val, "ClientSecret", &s.ClientSecret) + delete(rawMsg, key) + case "secretsType": + err = unpopulate(val, "SecretsType", &s.SecretsType) delete(rawMsg, key) } if err != nil { @@ -12752,17 +18729,19 @@ func (s *ScheduleActionBase) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ScheduleBase. -func (s ScheduleBase) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ServiceTagDestination. +func (s ServiceTagDestination) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "id", s.ID) - populate(objectMap, "provisioningStatus", s.ProvisioningStatus) - populate(objectMap, "status", s.Status) + populate(objectMap, "action", s.Action) + populate(objectMap, "addressPrefixes", s.AddressPrefixes) + populate(objectMap, "portRanges", s.PortRanges) + populate(objectMap, "protocol", s.Protocol) + populate(objectMap, "serviceTag", s.ServiceTag) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ScheduleBase. -func (s *ScheduleBase) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceTagDestination. +func (s *ServiceTagDestination) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", s, err) @@ -12770,14 +18749,20 @@ func (s *ScheduleBase) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "id": - err = unpopulate(val, "ID", &s.ID) + case "action": + err = unpopulate(val, "Action", &s.Action) delete(rawMsg, key) - case "provisioningStatus": - err = unpopulate(val, "ProvisioningStatus", &s.ProvisioningStatus) + case "addressPrefixes": + err = unpopulate(val, "AddressPrefixes", &s.AddressPrefixes) delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &s.Status) + case "portRanges": + err = unpopulate(val, "PortRanges", &s.PortRanges) + delete(rawMsg, key) + case "protocol": + err = unpopulate(val, "Protocol", &s.Protocol) + delete(rawMsg, key) + case "serviceTag": + err = unpopulate(val, "ServiceTag", &s.ServiceTag) delete(rawMsg, key) } if err != nil { @@ -12787,22 +18772,18 @@ func (s *ScheduleBase) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ScheduleProperties. -func (s ScheduleProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ServiceTagOutboundRule. +func (s ServiceTagOutboundRule) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "action", s.Action) - populate(objectMap, "description", s.Description) - populate(objectMap, "displayName", s.DisplayName) - populate(objectMap, "isEnabled", s.IsEnabled) - populate(objectMap, "properties", s.Properties) - populate(objectMap, "provisioningState", s.ProvisioningState) - populate(objectMap, "tags", s.Tags) - populate(objectMap, "trigger", s.Trigger) + populate(objectMap, "category", s.Category) + populate(objectMap, "destination", s.Destination) + populate(objectMap, "status", s.Status) + objectMap["type"] = RuleTypeServiceTag return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ScheduleProperties. -func (s *ScheduleProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceTagOutboundRule. +func (s *ServiceTagOutboundRule) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", s, err) @@ -12810,29 +18791,17 @@ func (s *ScheduleProperties) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "action": - s.Action, err = unmarshalScheduleActionBaseClassification(val) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &s.Description) - delete(rawMsg, key) - case "displayName": - err = unpopulate(val, "DisplayName", &s.DisplayName) - delete(rawMsg, key) - case "isEnabled": - err = unpopulate(val, "IsEnabled", &s.IsEnabled) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &s.Properties) + case "category": + err = unpopulate(val, "Category", &s.Category) delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &s.ProvisioningState) + case "destination": + err = unpopulate(val, "Destination", &s.Destination) delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &s.Tags) + case "status": + err = unpopulate(val, "Status", &s.Status) delete(rawMsg, key) - case "trigger": - s.Trigger, err = unmarshalTriggerBaseClassification(val) + case "type": + err = unpopulate(val, "Type", &s.Type) delete(rawMsg, key) } if err != nil { @@ -12842,16 +18811,15 @@ func (s *ScheduleProperties) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ScheduleResourceArmPaginatedResult. -func (s ScheduleResourceArmPaginatedResult) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type SetupScripts. +func (s SetupScripts) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "nextLink", s.NextLink) - populate(objectMap, "value", s.Value) + populate(objectMap, "scripts", s.Scripts) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ScheduleResourceArmPaginatedResult. -func (s *ScheduleResourceArmPaginatedResult) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type SetupScripts. +func (s *SetupScripts) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", s, err) @@ -12859,11 +18827,8 @@ func (s *ScheduleResourceArmPaginatedResult) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &s.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &s.Value) + case "scripts": + err = unpopulate(val, "Scripts", &s.Scripts) delete(rawMsg, key) } if err != nil { @@ -12873,18 +18838,16 @@ func (s *ScheduleResourceArmPaginatedResult) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ScriptReference. -func (s ScriptReference) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type SharedPrivateLinkResource. +func (s SharedPrivateLinkResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "scriptArguments", s.ScriptArguments) - populate(objectMap, "scriptData", s.ScriptData) - populate(objectMap, "scriptSource", s.ScriptSource) - populate(objectMap, "timeout", s.Timeout) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ScriptReference. -func (s *ScriptReference) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type SharedPrivateLinkResource. +func (s *SharedPrivateLinkResource) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", s, err) @@ -12892,17 +18855,11 @@ func (s *ScriptReference) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "scriptArguments": - err = unpopulate(val, "ScriptArguments", &s.ScriptArguments) - delete(rawMsg, key) - case "scriptData": - err = unpopulate(val, "ScriptData", &s.ScriptData) - delete(rawMsg, key) - case "scriptSource": - err = unpopulate(val, "ScriptSource", &s.ScriptSource) + case "name": + err = unpopulate(val, "Name", &s.Name) delete(rawMsg, key) - case "timeout": - err = unpopulate(val, "Timeout", &s.Timeout) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) delete(rawMsg, key) } if err != nil { @@ -12912,16 +18869,18 @@ func (s *ScriptReference) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ScriptsToExecute. -func (s ScriptsToExecute) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type SharedPrivateLinkResourceProperty. +func (s SharedPrivateLinkResourceProperty) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "creationScript", s.CreationScript) - populate(objectMap, "startupScript", s.StartupScript) + populate(objectMap, "groupId", s.GroupID) + populate(objectMap, "privateLinkResourceId", s.PrivateLinkResourceID) + populate(objectMap, "requestMessage", s.RequestMessage) + populate(objectMap, "status", s.Status) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ScriptsToExecute. -func (s *ScriptsToExecute) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type SharedPrivateLinkResourceProperty. +func (s *SharedPrivateLinkResourceProperty) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", s, err) @@ -12929,11 +18888,17 @@ func (s *ScriptsToExecute) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "creationScript": - err = unpopulate(val, "CreationScript", &s.CreationScript) + case "groupId": + err = unpopulate(val, "GroupID", &s.GroupID) delete(rawMsg, key) - case "startupScript": - err = unpopulate(val, "StartupScript", &s.StartupScript) + case "privateLinkResourceId": + err = unpopulate(val, "PrivateLinkResourceID", &s.PrivateLinkResourceID) + delete(rawMsg, key) + case "requestMessage": + err = unpopulate(val, "RequestMessage", &s.RequestMessage) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &s.Status) delete(rawMsg, key) } if err != nil { @@ -12943,15 +18908,41 @@ func (s *ScriptsToExecute) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type Seasonality. -func (s Seasonality) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type SparkJob. +func (s SparkJob) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - objectMap["mode"] = s.Mode + populate(objectMap, "archives", s.Archives) + populate(objectMap, "args", s.Args) + populate(objectMap, "codeId", s.CodeID) + populate(objectMap, "componentId", s.ComponentID) + populate(objectMap, "computeId", s.ComputeID) + populate(objectMap, "conf", s.Conf) + populate(objectMap, "description", s.Description) + populate(objectMap, "displayName", s.DisplayName) + populate(objectMap, "entry", s.Entry) + populate(objectMap, "environmentId", s.EnvironmentID) + populate(objectMap, "environmentVariables", s.EnvironmentVariables) + populate(objectMap, "experimentName", s.ExperimentName) + populate(objectMap, "files", s.Files) + populate(objectMap, "identity", s.Identity) + populate(objectMap, "inputs", s.Inputs) + populate(objectMap, "isArchived", s.IsArchived) + populate(objectMap, "jars", s.Jars) + objectMap["jobType"] = JobTypeSpark + populate(objectMap, "notificationSetting", s.NotificationSetting) + populate(objectMap, "outputs", s.Outputs) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "pyFiles", s.PyFiles) + populate(objectMap, "queueSettings", s.QueueSettings) + populate(objectMap, "resources", s.Resources) + populate(objectMap, "services", s.Services) + populate(objectMap, "status", s.Status) + populate(objectMap, "tags", s.Tags) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type Seasonality. -func (s *Seasonality) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type SparkJob. +func (s *SparkJob) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", s, err) @@ -12959,8 +18950,86 @@ func (s *Seasonality) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "mode": - err = unpopulate(val, "Mode", &s.Mode) + case "archives": + err = unpopulate(val, "Archives", &s.Archives) + delete(rawMsg, key) + case "args": + err = unpopulate(val, "Args", &s.Args) + delete(rawMsg, key) + case "codeId": + err = unpopulate(val, "CodeID", &s.CodeID) + delete(rawMsg, key) + case "componentId": + err = unpopulate(val, "ComponentID", &s.ComponentID) + delete(rawMsg, key) + case "computeId": + err = unpopulate(val, "ComputeID", &s.ComputeID) + delete(rawMsg, key) + case "conf": + err = unpopulate(val, "Conf", &s.Conf) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &s.Description) + delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &s.DisplayName) + delete(rawMsg, key) + case "entry": + s.Entry, err = unmarshalSparkJobEntryClassification(val) + delete(rawMsg, key) + case "environmentId": + err = unpopulate(val, "EnvironmentID", &s.EnvironmentID) + delete(rawMsg, key) + case "environmentVariables": + err = unpopulate(val, "EnvironmentVariables", &s.EnvironmentVariables) + delete(rawMsg, key) + case "experimentName": + err = unpopulate(val, "ExperimentName", &s.ExperimentName) + delete(rawMsg, key) + case "files": + err = unpopulate(val, "Files", &s.Files) + delete(rawMsg, key) + case "identity": + s.Identity, err = unmarshalIdentityConfigurationClassification(val) + delete(rawMsg, key) + case "inputs": + s.Inputs, err = unmarshalJobInputClassificationMap(val) + delete(rawMsg, key) + case "isArchived": + err = unpopulate(val, "IsArchived", &s.IsArchived) + delete(rawMsg, key) + case "jars": + err = unpopulate(val, "Jars", &s.Jars) + delete(rawMsg, key) + case "jobType": + err = unpopulate(val, "JobType", &s.JobType) + delete(rawMsg, key) + case "notificationSetting": + err = unpopulate(val, "NotificationSetting", &s.NotificationSetting) + delete(rawMsg, key) + case "outputs": + s.Outputs, err = unmarshalJobOutputClassificationMap(val) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "pyFiles": + err = unpopulate(val, "PyFiles", &s.PyFiles) + delete(rawMsg, key) + case "queueSettings": + err = unpopulate(val, "QueueSettings", &s.QueueSettings) + delete(rawMsg, key) + case "resources": + err = unpopulate(val, "Resources", &s.Resources) + delete(rawMsg, key) + case "services": + err = unpopulate(val, "Services", &s.Services) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &s.Status) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &s.Tags) delete(rawMsg, key) } if err != nil { @@ -12970,15 +19039,15 @@ func (s *Seasonality) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ServiceManagedResourcesSettings. -func (s ServiceManagedResourcesSettings) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type SparkJobEntry. +func (s SparkJobEntry) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "cosmosDb", s.CosmosDb) + objectMap["sparkJobEntryType"] = s.SparkJobEntryType return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceManagedResourcesSettings. -func (s *ServiceManagedResourcesSettings) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type SparkJobEntry. +func (s *SparkJobEntry) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", s, err) @@ -12986,8 +19055,8 @@ func (s *ServiceManagedResourcesSettings) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "cosmosDb": - err = unpopulate(val, "CosmosDb", &s.CosmosDb) + case "sparkJobEntryType": + err = unpopulate(val, "SparkJobEntryType", &s.SparkJobEntryType) delete(rawMsg, key) } if err != nil { @@ -12997,20 +19066,16 @@ func (s *ServiceManagedResourcesSettings) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ServicePrincipalDatastoreCredentials. -func (s ServicePrincipalDatastoreCredentials) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type SparkJobPythonEntry. +func (s SparkJobPythonEntry) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "authorityUrl", s.AuthorityURL) - populate(objectMap, "clientId", s.ClientID) - objectMap["credentialsType"] = CredentialsTypeServicePrincipal - populate(objectMap, "resourceUrl", s.ResourceURL) - populate(objectMap, "secrets", s.Secrets) - populate(objectMap, "tenantId", s.TenantID) + populate(objectMap, "file", s.File) + objectMap["sparkJobEntryType"] = SparkJobEntryTypeSparkJobPythonEntry return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ServicePrincipalDatastoreCredentials. -func (s *ServicePrincipalDatastoreCredentials) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type SparkJobPythonEntry. +func (s *SparkJobPythonEntry) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", s, err) @@ -13018,23 +19083,11 @@ func (s *ServicePrincipalDatastoreCredentials) UnmarshalJSON(data []byte) error for key, val := range rawMsg { var err error switch key { - case "authorityUrl": - err = unpopulate(val, "AuthorityURL", &s.AuthorityURL) - delete(rawMsg, key) - case "clientId": - err = unpopulate(val, "ClientID", &s.ClientID) - delete(rawMsg, key) - case "credentialsType": - err = unpopulate(val, "CredentialsType", &s.CredentialsType) - delete(rawMsg, key) - case "resourceUrl": - err = unpopulate(val, "ResourceURL", &s.ResourceURL) - delete(rawMsg, key) - case "secrets": - err = unpopulate(val, "Secrets", &s.Secrets) + case "file": + err = unpopulate(val, "File", &s.File) delete(rawMsg, key) - case "tenantId": - err = unpopulate(val, "TenantID", &s.TenantID) + case "sparkJobEntryType": + err = unpopulate(val, "SparkJobEntryType", &s.SparkJobEntryType) delete(rawMsg, key) } if err != nil { @@ -13044,16 +19097,16 @@ func (s *ServicePrincipalDatastoreCredentials) UnmarshalJSON(data []byte) error return nil } -// MarshalJSON implements the json.Marshaller interface for type ServicePrincipalDatastoreSecrets. -func (s ServicePrincipalDatastoreSecrets) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type SparkJobScalaEntry. +func (s SparkJobScalaEntry) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "clientSecret", s.ClientSecret) - objectMap["secretsType"] = SecretsTypeServicePrincipal + populate(objectMap, "className", s.ClassName) + objectMap["sparkJobEntryType"] = SparkJobEntryTypeSparkJobScalaEntry return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ServicePrincipalDatastoreSecrets. -func (s *ServicePrincipalDatastoreSecrets) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type SparkJobScalaEntry. +func (s *SparkJobScalaEntry) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", s, err) @@ -13061,11 +19114,11 @@ func (s *ServicePrincipalDatastoreSecrets) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "clientSecret": - err = unpopulate(val, "ClientSecret", &s.ClientSecret) + case "className": + err = unpopulate(val, "ClassName", &s.ClassName) delete(rawMsg, key) - case "secretsType": - err = unpopulate(val, "SecretsType", &s.SecretsType) + case "sparkJobEntryType": + err = unpopulate(val, "SparkJobEntryType", &s.SparkJobEntryType) delete(rawMsg, key) } if err != nil { @@ -13075,15 +19128,16 @@ func (s *ServicePrincipalDatastoreSecrets) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type SetupScripts. -func (s SetupScripts) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type SparkResourceConfiguration. +func (s SparkResourceConfiguration) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "scripts", s.Scripts) + populate(objectMap, "instanceType", s.InstanceType) + populate(objectMap, "runtimeVersion", s.RuntimeVersion) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type SetupScripts. -func (s *SetupScripts) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type SparkResourceConfiguration. +func (s *SparkResourceConfiguration) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", s, err) @@ -13091,8 +19145,11 @@ func (s *SetupScripts) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "scripts": - err = unpopulate(val, "Scripts", &s.Scripts) + case "instanceType": + err = unpopulate(val, "InstanceType", &s.InstanceType) + delete(rawMsg, key) + case "runtimeVersion": + err = unpopulate(val, "RuntimeVersion", &s.RuntimeVersion) delete(rawMsg, key) } if err != nil { @@ -13102,16 +19159,17 @@ func (s *SetupScripts) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type SharedPrivateLinkResource. -func (s SharedPrivateLinkResource) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type StackEnsembleSettings. +func (s StackEnsembleSettings) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "name", s.Name) - populate(objectMap, "properties", s.Properties) + populateAny(objectMap, "stackMetaLearnerKWargs", s.StackMetaLearnerKWargs) + populate(objectMap, "stackMetaLearnerTrainPercentage", s.StackMetaLearnerTrainPercentage) + populate(objectMap, "stackMetaLearnerType", s.StackMetaLearnerType) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type SharedPrivateLinkResource. -func (s *SharedPrivateLinkResource) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type StackEnsembleSettings. +func (s *StackEnsembleSettings) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", s, err) @@ -13119,11 +19177,14 @@ func (s *SharedPrivateLinkResource) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "name": - err = unpopulate(val, "Name", &s.Name) + case "stackMetaLearnerKWargs": + err = unpopulate(val, "StackMetaLearnerKWargs", &s.StackMetaLearnerKWargs) delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &s.Properties) + case "stackMetaLearnerTrainPercentage": + err = unpopulate(val, "StackMetaLearnerTrainPercentage", &s.StackMetaLearnerTrainPercentage) + delete(rawMsg, key) + case "stackMetaLearnerType": + err = unpopulate(val, "StackMetaLearnerType", &s.StackMetaLearnerType) delete(rawMsg, key) } if err != nil { @@ -13133,18 +19194,22 @@ func (s *SharedPrivateLinkResource) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type SharedPrivateLinkResourceProperty. -func (s SharedPrivateLinkResourceProperty) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type StaticInputData. +func (s StaticInputData) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "groupId", s.GroupID) - populate(objectMap, "privateLinkResourceId", s.PrivateLinkResourceID) - populate(objectMap, "requestMessage", s.RequestMessage) - populate(objectMap, "status", s.Status) + populate(objectMap, "columns", s.Columns) + populate(objectMap, "dataContext", s.DataContext) + objectMap["inputDataType"] = MonitoringInputDataTypeStatic + populate(objectMap, "jobInputType", s.JobInputType) + populate(objectMap, "preprocessingComponentId", s.PreprocessingComponentID) + populate(objectMap, "uri", s.URI) + populateDateTimeRFC3339(objectMap, "windowEnd", s.WindowEnd) + populateDateTimeRFC3339(objectMap, "windowStart", s.WindowStart) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type SharedPrivateLinkResourceProperty. -func (s *SharedPrivateLinkResourceProperty) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticInputData. +func (s *StaticInputData) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", s, err) @@ -13152,17 +19217,29 @@ func (s *SharedPrivateLinkResourceProperty) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "groupId": - err = unpopulate(val, "GroupID", &s.GroupID) + case "columns": + err = unpopulate(val, "Columns", &s.Columns) delete(rawMsg, key) - case "privateLinkResourceId": - err = unpopulate(val, "PrivateLinkResourceID", &s.PrivateLinkResourceID) + case "dataContext": + err = unpopulate(val, "DataContext", &s.DataContext) delete(rawMsg, key) - case "requestMessage": - err = unpopulate(val, "RequestMessage", &s.RequestMessage) + case "inputDataType": + err = unpopulate(val, "InputDataType", &s.InputDataType) delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &s.Status) + case "jobInputType": + err = unpopulate(val, "JobInputType", &s.JobInputType) + delete(rawMsg, key) + case "preprocessingComponentId": + err = unpopulate(val, "PreprocessingComponentID", &s.PreprocessingComponentID) + delete(rawMsg, key) + case "uri": + err = unpopulate(val, "URI", &s.URI) + delete(rawMsg, key) + case "windowEnd": + err = unpopulateDateTimeRFC3339(val, "WindowEnd", &s.WindowEnd) + delete(rawMsg, key) + case "windowStart": + err = unpopulateDateTimeRFC3339(val, "WindowStart", &s.WindowStart) delete(rawMsg, key) } if err != nil { @@ -13172,17 +19249,16 @@ func (s *SharedPrivateLinkResourceProperty) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type StackEnsembleSettings. -func (s StackEnsembleSettings) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type StorageAccountDetails. +func (s StorageAccountDetails) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateAny(objectMap, "stackMetaLearnerKWargs", s.StackMetaLearnerKWargs) - populate(objectMap, "stackMetaLearnerTrainPercentage", s.StackMetaLearnerTrainPercentage) - populate(objectMap, "stackMetaLearnerType", s.StackMetaLearnerType) + populate(objectMap, "systemCreatedStorageAccount", s.SystemCreatedStorageAccount) + populate(objectMap, "userCreatedStorageAccount", s.UserCreatedStorageAccount) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type StackEnsembleSettings. -func (s *StackEnsembleSettings) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type StorageAccountDetails. +func (s *StorageAccountDetails) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", s, err) @@ -13190,14 +19266,11 @@ func (s *StackEnsembleSettings) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "stackMetaLearnerKWargs": - err = unpopulate(val, "StackMetaLearnerKWargs", &s.StackMetaLearnerKWargs) - delete(rawMsg, key) - case "stackMetaLearnerTrainPercentage": - err = unpopulate(val, "StackMetaLearnerTrainPercentage", &s.StackMetaLearnerTrainPercentage) + case "systemCreatedStorageAccount": + err = unpopulate(val, "SystemCreatedStorageAccount", &s.SystemCreatedStorageAccount) delete(rawMsg, key) - case "stackMetaLearnerType": - err = unpopulate(val, "StackMetaLearnerType", &s.StackMetaLearnerType) + case "userCreatedStorageAccount": + err = unpopulate(val, "UserCreatedStorageAccount", &s.UserCreatedStorageAccount) delete(rawMsg, key) } if err != nil { @@ -13221,9 +19294,11 @@ func (s SweepJob) MarshalJSON() ([]byte, error) { populate(objectMap, "isArchived", s.IsArchived) objectMap["jobType"] = JobTypeSweep populate(objectMap, "limits", s.Limits) + populate(objectMap, "notificationSetting", s.NotificationSetting) populate(objectMap, "objective", s.Objective) populate(objectMap, "outputs", s.Outputs) populate(objectMap, "properties", s.Properties) + populate(objectMap, "queueSettings", s.QueueSettings) populate(objectMap, "samplingAlgorithm", s.SamplingAlgorithm) populateAny(objectMap, "searchSpace", s.SearchSpace) populate(objectMap, "services", s.Services) @@ -13275,6 +19350,9 @@ func (s *SweepJob) UnmarshalJSON(data []byte) error { case "limits": err = unpopulate(val, "Limits", &s.Limits) delete(rawMsg, key) + case "notificationSetting": + err = unpopulate(val, "NotificationSetting", &s.NotificationSetting) + delete(rawMsg, key) case "objective": err = unpopulate(val, "Objective", &s.Objective) delete(rawMsg, key) @@ -13284,6 +19362,9 @@ func (s *SweepJob) UnmarshalJSON(data []byte) error { case "properties": err = unpopulate(val, "Properties", &s.Properties) delete(rawMsg, key) + case "queueSettings": + err = unpopulate(val, "QueueSettings", &s.QueueSettings) + delete(rawMsg, key) case "samplingAlgorithm": s.SamplingAlgorithm, err = unmarshalSamplingAlgorithmClassification(val) delete(rawMsg, key) @@ -13483,6 +19564,84 @@ func (s *SynapseSparkProperties) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type SystemCreatedAcrAccount. +func (s SystemCreatedAcrAccount) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "acrAccountName", s.AcrAccountName) + populate(objectMap, "acrAccountSku", s.AcrAccountSKU) + populate(objectMap, "armResourceId", s.ArmResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SystemCreatedAcrAccount. +func (s *SystemCreatedAcrAccount) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "acrAccountName": + err = unpopulate(val, "AcrAccountName", &s.AcrAccountName) + delete(rawMsg, key) + case "acrAccountSku": + err = unpopulate(val, "AcrAccountSKU", &s.AcrAccountSKU) + delete(rawMsg, key) + case "armResourceId": + err = unpopulate(val, "ArmResourceID", &s.ArmResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SystemCreatedStorageAccount. +func (s SystemCreatedStorageAccount) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "allowBlobPublicAccess", s.AllowBlobPublicAccess) + populate(objectMap, "armResourceId", s.ArmResourceID) + populate(objectMap, "storageAccountHnsEnabled", s.StorageAccountHnsEnabled) + populate(objectMap, "storageAccountName", s.StorageAccountName) + populate(objectMap, "storageAccountType", s.StorageAccountType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SystemCreatedStorageAccount. +func (s *SystemCreatedStorageAccount) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "allowBlobPublicAccess": + err = unpopulate(val, "AllowBlobPublicAccess", &s.AllowBlobPublicAccess) + delete(rawMsg, key) + case "armResourceId": + err = unpopulate(val, "ArmResourceID", &s.ArmResourceID) + delete(rawMsg, key) + case "storageAccountHnsEnabled": + err = unpopulate(val, "StorageAccountHnsEnabled", &s.StorageAccountHnsEnabled) + delete(rawMsg, key) + case "storageAccountName": + err = unpopulate(val, "StorageAccountName", &s.StorageAccountName) + delete(rawMsg, key) + case "storageAccountType": + err = unpopulate(val, "StorageAccountType", &s.StorageAccountType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type SystemData. func (s SystemData) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -14019,6 +20178,64 @@ func (t *TextNer) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type TmpfsOptions. +func (t TmpfsOptions) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "size", t.Size) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TmpfsOptions. +func (t *TmpfsOptions) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "size": + err = unpopulate(val, "Size", &t.Size) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TopNFeaturesByAttribution. +func (t TopNFeaturesByAttribution) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["filterType"] = MonitoringFeatureFilterTypeTopNByAttribution + populate(objectMap, "top", t.Top) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TopNFeaturesByAttribution. +func (t *TopNFeaturesByAttribution) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "filterType": + err = unpopulate(val, "FilterType", &t.FilterType) + delete(rawMsg, key) + case "top": + err = unpopulate(val, "Top", &t.Top) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type TrackedResource. func (t TrackedResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -14800,6 +21017,60 @@ func (u *UserAssignedIdentity) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type UserCreatedAcrAccount. +func (u UserCreatedAcrAccount) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "armResourceId", u.ArmResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UserCreatedAcrAccount. +func (u *UserCreatedAcrAccount) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "armResourceId": + err = unpopulate(val, "ArmResourceID", &u.ArmResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UserCreatedStorageAccount. +func (u UserCreatedStorageAccount) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "armResourceId", u.ArmResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UserCreatedStorageAccount. +func (u *UserCreatedStorageAccount) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "armResourceId": + err = unpopulate(val, "ArmResourceID", &u.ArmResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type UserIdentity. func (u UserIdentity) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -14832,7 +21103,13 @@ func (u UsernamePasswordAuthTypeWorkspaceConnectionProperties) MarshalJSON() ([] objectMap := make(map[string]any) objectMap["authType"] = ConnectionAuthTypeUsernamePassword populate(objectMap, "category", u.Category) + populate(objectMap, "createdByWorkspaceArmId", u.CreatedByWorkspaceArmID) populate(objectMap, "credentials", u.Credentials) + populateDateTimeRFC3339(objectMap, "expiryTime", u.ExpiryTime) + populate(objectMap, "group", u.Group) + populate(objectMap, "isSharedToAll", u.IsSharedToAll) + populate(objectMap, "metadata", u.Metadata) + populate(objectMap, "sharedUserList", u.SharedUserList) populate(objectMap, "target", u.Target) populate(objectMap, "value", u.Value) populate(objectMap, "valueFormat", u.ValueFormat) @@ -14854,8 +21131,26 @@ func (u *UsernamePasswordAuthTypeWorkspaceConnectionProperties) UnmarshalJSON(da case "category": err = unpopulate(val, "Category", &u.Category) delete(rawMsg, key) - case "credentials": - err = unpopulate(val, "Credentials", &u.Credentials) + case "createdByWorkspaceArmId": + err = unpopulate(val, "CreatedByWorkspaceArmID", &u.CreatedByWorkspaceArmID) + delete(rawMsg, key) + case "credentials": + err = unpopulate(val, "Credentials", &u.Credentials) + delete(rawMsg, key) + case "expiryTime": + err = unpopulateDateTimeRFC3339(val, "ExpiryTime", &u.ExpiryTime) + delete(rawMsg, key) + case "group": + err = unpopulate(val, "Group", &u.Group) + delete(rawMsg, key) + case "isSharedToAll": + err = unpopulate(val, "IsSharedToAll", &u.IsSharedToAll) + delete(rawMsg, key) + case "metadata": + err = unpopulate(val, "Metadata", &u.Metadata) + delete(rawMsg, key) + case "sharedUserList": + err = unpopulate(val, "SharedUserList", &u.SharedUserList) delete(rawMsg, key) case "target": err = unpopulate(val, "Target", &u.Target) @@ -15233,11 +21528,125 @@ func (v *VirtualMachineSizeListResult) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type VolumeDefinition. +func (v VolumeDefinition) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "bind", v.Bind) + populate(objectMap, "consistency", v.Consistency) + populate(objectMap, "readOnly", v.ReadOnly) + populate(objectMap, "source", v.Source) + populate(objectMap, "target", v.Target) + populate(objectMap, "tmpfs", v.Tmpfs) + populate(objectMap, "type", v.Type) + populate(objectMap, "volume", v.Volume) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VolumeDefinition. +func (v *VolumeDefinition) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "bind": + err = unpopulate(val, "Bind", &v.Bind) + delete(rawMsg, key) + case "consistency": + err = unpopulate(val, "Consistency", &v.Consistency) + delete(rawMsg, key) + case "readOnly": + err = unpopulate(val, "ReadOnly", &v.ReadOnly) + delete(rawMsg, key) + case "source": + err = unpopulate(val, "Source", &v.Source) + delete(rawMsg, key) + case "target": + err = unpopulate(val, "Target", &v.Target) + delete(rawMsg, key) + case "tmpfs": + err = unpopulate(val, "Tmpfs", &v.Tmpfs) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &v.Type) + delete(rawMsg, key) + case "volume": + err = unpopulate(val, "Volume", &v.Volume) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VolumeOptions. +func (v VolumeOptions) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nocopy", v.Nocopy) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VolumeOptions. +func (v *VolumeOptions) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nocopy": + err = unpopulate(val, "Nocopy", &v.Nocopy) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Webhook. +func (w Webhook) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "eventType", w.EventType) + objectMap["webhookType"] = w.WebhookType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Webhook. +func (w *Webhook) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "eventType": + err = unpopulate(val, "EventType", &w.EventType) + delete(rawMsg, key) + case "webhookType": + err = unpopulate(val, "WebhookType", &w.WebhookType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type Workspace. func (w Workspace) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "id", w.ID) populate(objectMap, "identity", w.Identity) + populate(objectMap, "kind", w.Kind) populate(objectMap, "location", w.Location) populate(objectMap, "name", w.Name) populate(objectMap, "properties", w.Properties) @@ -15263,6 +21672,9 @@ func (w *Workspace) UnmarshalJSON(data []byte) error { case "identity": err = unpopulate(val, "Identity", &w.Identity) delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &w.Kind) + delete(rawMsg, key) case "location": err = unpopulate(val, "Location", &w.Location) delete(rawMsg, key) @@ -15292,6 +21704,91 @@ func (w *Workspace) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type WorkspaceConnectionAPIKey. +func (w WorkspaceConnectionAPIKey) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "key", w.Key) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkspaceConnectionAPIKey. +func (w *WorkspaceConnectionAPIKey) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "key": + err = unpopulate(val, "Key", &w.Key) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkspaceConnectionAccessKey. +func (w WorkspaceConnectionAccessKey) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "accessKeyId", w.AccessKeyID) + populate(objectMap, "secretAccessKey", w.SecretAccessKey) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkspaceConnectionAccessKey. +func (w *WorkspaceConnectionAccessKey) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "accessKeyId": + err = unpopulate(val, "AccessKeyID", &w.AccessKeyID) + delete(rawMsg, key) + case "secretAccessKey": + err = unpopulate(val, "SecretAccessKey", &w.SecretAccessKey) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkspaceConnectionAccountKey. +func (w WorkspaceConnectionAccountKey) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "key", w.Key) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkspaceConnectionAccountKey. +func (w *WorkspaceConnectionAccountKey) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "key": + err = unpopulate(val, "Key", &w.Key) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type WorkspaceConnectionManagedIdentity. func (w WorkspaceConnectionManagedIdentity) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -15323,6 +21820,61 @@ func (w *WorkspaceConnectionManagedIdentity) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type WorkspaceConnectionOAuth2. +func (w WorkspaceConnectionOAuth2) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "authUrl", w.AuthURL) + populate(objectMap, "clientId", w.ClientID) + populate(objectMap, "clientSecret", w.ClientSecret) + populate(objectMap, "developerToken", w.DeveloperToken) + populate(objectMap, "password", w.Password) + populate(objectMap, "refreshToken", w.RefreshToken) + populate(objectMap, "tenantId", w.TenantID) + populate(objectMap, "username", w.Username) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkspaceConnectionOAuth2. +func (w *WorkspaceConnectionOAuth2) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "authUrl": + err = unpopulate(val, "AuthURL", &w.AuthURL) + delete(rawMsg, key) + case "clientId": + err = unpopulate(val, "ClientID", &w.ClientID) + delete(rawMsg, key) + case "clientSecret": + err = unpopulate(val, "ClientSecret", &w.ClientSecret) + delete(rawMsg, key) + case "developerToken": + err = unpopulate(val, "DeveloperToken", &w.DeveloperToken) + delete(rawMsg, key) + case "password": + err = unpopulate(val, "Password", &w.Password) + delete(rawMsg, key) + case "refreshToken": + err = unpopulate(val, "RefreshToken", &w.RefreshToken) + delete(rawMsg, key) + case "tenantId": + err = unpopulate(val, "TenantID", &w.TenantID) + delete(rawMsg, key) + case "username": + err = unpopulate(val, "Username", &w.Username) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type WorkspaceConnectionPersonalAccessToken. func (w WorkspaceConnectionPersonalAccessToken) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -15355,6 +21907,12 @@ func (w WorkspaceConnectionPropertiesV2) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) objectMap["authType"] = w.AuthType populate(objectMap, "category", w.Category) + populate(objectMap, "createdByWorkspaceArmId", w.CreatedByWorkspaceArmID) + populateDateTimeRFC3339(objectMap, "expiryTime", w.ExpiryTime) + populate(objectMap, "group", w.Group) + populate(objectMap, "isSharedToAll", w.IsSharedToAll) + populate(objectMap, "metadata", w.Metadata) + populate(objectMap, "sharedUserList", w.SharedUserList) populate(objectMap, "target", w.Target) populate(objectMap, "value", w.Value) populate(objectMap, "valueFormat", w.ValueFormat) @@ -15376,6 +21934,24 @@ func (w *WorkspaceConnectionPropertiesV2) UnmarshalJSON(data []byte) error { case "category": err = unpopulate(val, "Category", &w.Category) delete(rawMsg, key) + case "createdByWorkspaceArmId": + err = unpopulate(val, "CreatedByWorkspaceArmID", &w.CreatedByWorkspaceArmID) + delete(rawMsg, key) + case "expiryTime": + err = unpopulateDateTimeRFC3339(val, "ExpiryTime", &w.ExpiryTime) + delete(rawMsg, key) + case "group": + err = unpopulate(val, "Group", &w.Group) + delete(rawMsg, key) + case "isSharedToAll": + err = unpopulate(val, "IsSharedToAll", &w.IsSharedToAll) + delete(rawMsg, key) + case "metadata": + err = unpopulate(val, "Metadata", &w.Metadata) + delete(rawMsg, key) + case "sharedUserList": + err = unpopulate(val, "SharedUserList", &w.SharedUserList) + delete(rawMsg, key) case "target": err = unpopulate(val, "Target", &w.Target) delete(rawMsg, key) @@ -15467,6 +22043,41 @@ func (w *WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult) Unmarsh return nil } +// MarshalJSON implements the json.Marshaller interface for type WorkspaceConnectionServicePrincipal. +func (w WorkspaceConnectionServicePrincipal) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "clientId", w.ClientID) + populate(objectMap, "clientSecret", w.ClientSecret) + populate(objectMap, "tenantId", w.TenantID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkspaceConnectionServicePrincipal. +func (w *WorkspaceConnectionServicePrincipal) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "clientId": + err = unpopulate(val, "ClientID", &w.ClientID) + delete(rawMsg, key) + case "clientSecret": + err = unpopulate(val, "ClientSecret", &w.ClientSecret) + delete(rawMsg, key) + case "tenantId": + err = unpopulate(val, "TenantID", &w.TenantID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type WorkspaceConnectionSharedAccessSignature. func (w WorkspaceConnectionSharedAccessSignature) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -15498,6 +22109,7 @@ func (w *WorkspaceConnectionSharedAccessSignature) UnmarshalJSON(data []byte) er func (w WorkspaceConnectionUsernamePassword) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "password", w.Password) + populate(objectMap, "securityToken", w.SecurityToken) populate(objectMap, "username", w.Username) return json.Marshal(objectMap) } @@ -15514,6 +22126,9 @@ func (w *WorkspaceConnectionUsernamePassword) UnmarshalJSON(data []byte) error { case "password": err = unpopulate(val, "Password", &w.Password) delete(rawMsg, key) + case "securityToken": + err = unpopulate(val, "SecurityToken", &w.SecurityToken) + delete(rawMsg, key) case "username": err = unpopulate(val, "Username", &w.Username) delete(rawMsg, key) @@ -15525,6 +22140,37 @@ func (w *WorkspaceConnectionUsernamePassword) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type WorkspaceHubConfig. +func (w WorkspaceHubConfig) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "additionalWorkspaceStorageAccounts", w.AdditionalWorkspaceStorageAccounts) + populate(objectMap, "defaultWorkspaceResourceGroup", w.DefaultWorkspaceResourceGroup) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkspaceHubConfig. +func (w *WorkspaceHubConfig) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "additionalWorkspaceStorageAccounts": + err = unpopulate(val, "AdditionalWorkspaceStorageAccounts", &w.AdditionalWorkspaceStorageAccounts) + delete(rawMsg, key) + case "defaultWorkspaceResourceGroup": + err = unpopulate(val, "DefaultWorkspaceResourceGroup", &w.DefaultWorkspaceResourceGroup) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type WorkspaceListResult. func (w WorkspaceListResult) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -15561,14 +22207,19 @@ func (w WorkspaceProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "allowPublicAccessWhenBehindVnet", w.AllowPublicAccessWhenBehindVnet) populate(objectMap, "applicationInsights", w.ApplicationInsights) + populate(objectMap, "associatedWorkspaces", w.AssociatedWorkspaces) populate(objectMap, "containerRegistry", w.ContainerRegistry) populate(objectMap, "description", w.Description) populate(objectMap, "discoveryUrl", w.DiscoveryURL) + populate(objectMap, "enableDataIsolation", w.EnableDataIsolation) populate(objectMap, "encryption", w.Encryption) + populate(objectMap, "featureStoreSettings", w.FeatureStoreSettings) populate(objectMap, "friendlyName", w.FriendlyName) populate(objectMap, "hbiWorkspace", w.HbiWorkspace) + populate(objectMap, "hubResourceId", w.HubResourceID) populate(objectMap, "imageBuildCompute", w.ImageBuildCompute) populate(objectMap, "keyVault", w.KeyVault) + populate(objectMap, "managedNetwork", w.ManagedNetwork) populate(objectMap, "mlFlowTrackingUri", w.MlFlowTrackingURI) populate(objectMap, "notebookInfo", w.NotebookInfo) populate(objectMap, "primaryUserAssignedIdentity", w.PrimaryUserAssignedIdentity) @@ -15576,6 +22227,7 @@ func (w WorkspaceProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "privateLinkCount", w.PrivateLinkCount) populate(objectMap, "provisioningState", w.ProvisioningState) populate(objectMap, "publicNetworkAccess", w.PublicNetworkAccess) + populate(objectMap, "serverlessComputeSettings", w.ServerlessComputeSettings) populate(objectMap, "serviceManagedResourcesSettings", w.ServiceManagedResourcesSettings) populate(objectMap, "serviceProvisionedResourceGroup", w.ServiceProvisionedResourceGroup) populate(objectMap, "sharedPrivateLinkResources", w.SharedPrivateLinkResources) @@ -15583,6 +22235,7 @@ func (w WorkspaceProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "storageHnsEnabled", w.StorageHnsEnabled) populate(objectMap, "tenantId", w.TenantID) populate(objectMap, "v1LegacyMode", w.V1LegacyMode) + populate(objectMap, "workspaceHubConfig", w.WorkspaceHubConfig) populate(objectMap, "workspaceId", w.WorkspaceID) return json.Marshal(objectMap) } @@ -15602,6 +22255,9 @@ func (w *WorkspaceProperties) UnmarshalJSON(data []byte) error { case "applicationInsights": err = unpopulate(val, "ApplicationInsights", &w.ApplicationInsights) delete(rawMsg, key) + case "associatedWorkspaces": + err = unpopulate(val, "AssociatedWorkspaces", &w.AssociatedWorkspaces) + delete(rawMsg, key) case "containerRegistry": err = unpopulate(val, "ContainerRegistry", &w.ContainerRegistry) delete(rawMsg, key) @@ -15611,21 +22267,33 @@ func (w *WorkspaceProperties) UnmarshalJSON(data []byte) error { case "discoveryUrl": err = unpopulate(val, "DiscoveryURL", &w.DiscoveryURL) delete(rawMsg, key) + case "enableDataIsolation": + err = unpopulate(val, "EnableDataIsolation", &w.EnableDataIsolation) + delete(rawMsg, key) case "encryption": err = unpopulate(val, "Encryption", &w.Encryption) delete(rawMsg, key) + case "featureStoreSettings": + err = unpopulate(val, "FeatureStoreSettings", &w.FeatureStoreSettings) + delete(rawMsg, key) case "friendlyName": err = unpopulate(val, "FriendlyName", &w.FriendlyName) delete(rawMsg, key) case "hbiWorkspace": err = unpopulate(val, "HbiWorkspace", &w.HbiWorkspace) delete(rawMsg, key) + case "hubResourceId": + err = unpopulate(val, "HubResourceID", &w.HubResourceID) + delete(rawMsg, key) case "imageBuildCompute": err = unpopulate(val, "ImageBuildCompute", &w.ImageBuildCompute) delete(rawMsg, key) case "keyVault": err = unpopulate(val, "KeyVault", &w.KeyVault) delete(rawMsg, key) + case "managedNetwork": + err = unpopulate(val, "ManagedNetwork", &w.ManagedNetwork) + delete(rawMsg, key) case "mlFlowTrackingUri": err = unpopulate(val, "MlFlowTrackingURI", &w.MlFlowTrackingURI) delete(rawMsg, key) @@ -15647,6 +22315,9 @@ func (w *WorkspaceProperties) UnmarshalJSON(data []byte) error { case "publicNetworkAccess": err = unpopulate(val, "PublicNetworkAccess", &w.PublicNetworkAccess) delete(rawMsg, key) + case "serverlessComputeSettings": + err = unpopulate(val, "ServerlessComputeSettings", &w.ServerlessComputeSettings) + delete(rawMsg, key) case "serviceManagedResourcesSettings": err = unpopulate(val, "ServiceManagedResourcesSettings", &w.ServiceManagedResourcesSettings) delete(rawMsg, key) @@ -15668,6 +22339,9 @@ func (w *WorkspaceProperties) UnmarshalJSON(data []byte) error { case "v1LegacyMode": err = unpopulate(val, "V1LegacyMode", &w.V1LegacyMode) delete(rawMsg, key) + case "workspaceHubConfig": + err = unpopulate(val, "WorkspaceHubConfig", &w.WorkspaceHubConfig) + delete(rawMsg, key) case "workspaceId": err = unpopulate(val, "WorkspaceID", &w.WorkspaceID) delete(rawMsg, key) @@ -15685,11 +22359,17 @@ func (w WorkspacePropertiesUpdateParameters) MarshalJSON() ([]byte, error) { populate(objectMap, "applicationInsights", w.ApplicationInsights) populate(objectMap, "containerRegistry", w.ContainerRegistry) populate(objectMap, "description", w.Description) + populate(objectMap, "enableDataIsolation", w.EnableDataIsolation) + populate(objectMap, "encryption", w.Encryption) + populate(objectMap, "featureStoreSettings", w.FeatureStoreSettings) populate(objectMap, "friendlyName", w.FriendlyName) populate(objectMap, "imageBuildCompute", w.ImageBuildCompute) + populate(objectMap, "managedNetwork", w.ManagedNetwork) populate(objectMap, "primaryUserAssignedIdentity", w.PrimaryUserAssignedIdentity) populate(objectMap, "publicNetworkAccess", w.PublicNetworkAccess) + populate(objectMap, "serverlessComputeSettings", w.ServerlessComputeSettings) populate(objectMap, "serviceManagedResourcesSettings", w.ServiceManagedResourcesSettings) + populate(objectMap, "v1LegacyMode", w.V1LegacyMode) return json.Marshal(objectMap) } @@ -15711,21 +22391,39 @@ func (w *WorkspacePropertiesUpdateParameters) UnmarshalJSON(data []byte) error { case "description": err = unpopulate(val, "Description", &w.Description) delete(rawMsg, key) + case "enableDataIsolation": + err = unpopulate(val, "EnableDataIsolation", &w.EnableDataIsolation) + delete(rawMsg, key) + case "encryption": + err = unpopulate(val, "Encryption", &w.Encryption) + delete(rawMsg, key) + case "featureStoreSettings": + err = unpopulate(val, "FeatureStoreSettings", &w.FeatureStoreSettings) + delete(rawMsg, key) case "friendlyName": err = unpopulate(val, "FriendlyName", &w.FriendlyName) delete(rawMsg, key) case "imageBuildCompute": err = unpopulate(val, "ImageBuildCompute", &w.ImageBuildCompute) delete(rawMsg, key) + case "managedNetwork": + err = unpopulate(val, "ManagedNetwork", &w.ManagedNetwork) + delete(rawMsg, key) case "primaryUserAssignedIdentity": err = unpopulate(val, "PrimaryUserAssignedIdentity", &w.PrimaryUserAssignedIdentity) delete(rawMsg, key) case "publicNetworkAccess": err = unpopulate(val, "PublicNetworkAccess", &w.PublicNetworkAccess) delete(rawMsg, key) + case "serverlessComputeSettings": + err = unpopulate(val, "ServerlessComputeSettings", &w.ServerlessComputeSettings) + delete(rawMsg, key) case "serviceManagedResourcesSettings": err = unpopulate(val, "ServiceManagedResourcesSettings", &w.ServiceManagedResourcesSettings) delete(rawMsg, key) + case "v1LegacyMode": + err = unpopulate(val, "V1LegacyMode", &w.V1LegacyMode) + delete(rawMsg, key) } if err != nil { return fmt.Errorf("unmarshalling type %T: %v", w, err) @@ -15794,7 +22492,7 @@ func populateAny(m map[string]any, k string, v any) { } func unpopulate(data json.RawMessage, fn string, v any) error { - if data == nil { + if data == nil || string(data) == "null" { return nil } if err := json.Unmarshal(data, v); err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/modelversions_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/modelversions_client.go similarity index 77% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/modelversions_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/modelversions_client.go index 9dac0a522..b51782211 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/modelversions_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/modelversions_client.go @@ -47,7 +47,7 @@ func NewModelVersionsClient(subscriptionID string, credential azcore.TokenCreden // CreateOrUpdate - Create or update version. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Container name. This is case-sensitive. @@ -105,7 +105,7 @@ func (client *ModelVersionsClient) createOrUpdateCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -126,7 +126,7 @@ func (client *ModelVersionsClient) createOrUpdateHandleResponse(resp *http.Respo // Delete - Delete version. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Container name. This is case-sensitive. @@ -181,7 +181,7 @@ func (client *ModelVersionsClient) deleteCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -190,7 +190,7 @@ func (client *ModelVersionsClient) deleteCreateRequest(ctx context.Context, reso // Get - Get version. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Container name. This is case-sensitive. @@ -246,7 +246,7 @@ func (client *ModelVersionsClient) getCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -263,7 +263,7 @@ func (client *ModelVersionsClient) getHandleResponse(resp *http.Response) (Model // NewListPager - List model versions. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Model name. This is case-sensitive. @@ -315,36 +315,36 @@ func (client *ModelVersionsClient) listCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - if options != nil && options.Skip != nil { - reqQP.Set("$skip", *options.Skip) - } if options != nil && options.OrderBy != nil { reqQP.Set("$orderBy", *options.OrderBy) } + if options != nil && options.Skip != nil { + reqQP.Set("$skip", *options.Skip) + } if options != nil && options.Top != nil { reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) } - if options != nil && options.Version != nil { - reqQP.Set("version", *options.Version) - } + reqQP.Set("api-version", "2024-04-01") if options != nil && options.Description != nil { reqQP.Set("description", *options.Description) } + if options != nil && options.Feed != nil { + reqQP.Set("feed", *options.Feed) + } + if options != nil && options.ListViewType != nil { + reqQP.Set("listViewType", string(*options.ListViewType)) + } if options != nil && options.Offset != nil { reqQP.Set("offset", strconv.FormatInt(int64(*options.Offset), 10)) } - if options != nil && options.Tags != nil { - reqQP.Set("tags", *options.Tags) - } if options != nil && options.Properties != nil { reqQP.Set("properties", *options.Properties) } - if options != nil && options.Feed != nil { - reqQP.Set("feed", *options.Feed) + if options != nil && options.Tags != nil { + reqQP.Set("tags", *options.Tags) } - if options != nil && options.ListViewType != nil { - reqQP.Set("listViewType", string(*options.ListViewType)) + if options != nil && options.Version != nil { + reqQP.Set("version", *options.Version) } req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} @@ -359,3 +359,94 @@ func (client *ModelVersionsClient) listHandleResponse(resp *http.Response) (Mode } return result, nil } + +// BeginPublish - Publish version asset into registry. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - Name of Azure Machine Learning workspace. +// - name - Container name. +// - version - Version identifier. +// - body - Destination registry info +// - options - ModelVersionsClientBeginPublishOptions contains the optional parameters for the ModelVersionsClient.BeginPublish +// method. +func (client *ModelVersionsClient) BeginPublish(ctx context.Context, resourceGroupName string, workspaceName string, name string, version string, body DestinationAsset, options *ModelVersionsClientBeginPublishOptions) (*runtime.Poller[ModelVersionsClientPublishResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.publish(ctx, resourceGroupName, workspaceName, name, version, body, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ModelVersionsClientPublishResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ModelVersionsClientPublishResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Publish - Publish version asset into registry. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *ModelVersionsClient) publish(ctx context.Context, resourceGroupName string, workspaceName string, name string, version string, body DestinationAsset, options *ModelVersionsClientBeginPublishOptions) (*http.Response, error) { + var err error + const operationName = "ModelVersionsClient.BeginPublish" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.publishCreateRequest(ctx, resourceGroupName, workspaceName, name, version, body, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// publishCreateRequest creates the Publish request. +func (client *ModelVersionsClient) publishCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, name string, version string, body DestinationAsset, options *ModelVersionsClientBeginPublishOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version}/publish" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if workspaceName == "" { + return nil, errors.New("parameter workspaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceName}", url.PathEscape(workspaceName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if version == "" { + return nil, errors.New("parameter version cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{version}", url.PathEscape(version)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, body); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/onlinedeployments_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/onlinedeployments_client.go similarity index 97% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/onlinedeployments_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/onlinedeployments_client.go index 771950bbe..1e74b36eb 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/onlinedeployments_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/onlinedeployments_client.go @@ -47,7 +47,7 @@ func NewOnlineDeploymentsClient(subscriptionID string, credential azcore.TokenCr // BeginCreateOrUpdate - Create or update Inference Endpoint Deployment (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - endpointName - Inference endpoint name. @@ -62,7 +62,8 @@ func (client *OnlineDeploymentsClient) BeginCreateOrUpdate(ctx context.Context, return nil, err } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[OnlineDeploymentsClientCreateOrUpdateResponse]{ - Tracer: client.internal.Tracer(), + FinalStateVia: runtime.FinalStateViaOriginalURI, + Tracer: client.internal.Tracer(), }) return poller, err } else { @@ -75,7 +76,7 @@ func (client *OnlineDeploymentsClient) BeginCreateOrUpdate(ctx context.Context, // CreateOrUpdate - Create or update Inference Endpoint Deployment (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 func (client *OnlineDeploymentsClient) createOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, endpointName string, deploymentName string, body OnlineDeployment, options *OnlineDeploymentsClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "OnlineDeploymentsClient.BeginCreateOrUpdate" @@ -125,7 +126,7 @@ func (client *OnlineDeploymentsClient) createOrUpdateCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -137,7 +138,7 @@ func (client *OnlineDeploymentsClient) createOrUpdateCreateRequest(ctx context.C // BeginDelete - Delete Inference Endpoint Deployment (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - endpointName - Inference endpoint name. @@ -151,7 +152,8 @@ func (client *OnlineDeploymentsClient) BeginDelete(ctx context.Context, resource return nil, err } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[OnlineDeploymentsClientDeleteResponse]{ - Tracer: client.internal.Tracer(), + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { @@ -164,7 +166,7 @@ func (client *OnlineDeploymentsClient) BeginDelete(ctx context.Context, resource // Delete - Delete Inference Endpoint Deployment (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 func (client *OnlineDeploymentsClient) deleteOperation(ctx context.Context, resourceGroupName string, workspaceName string, endpointName string, deploymentName string, options *OnlineDeploymentsClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "OnlineDeploymentsClient.BeginDelete" @@ -214,7 +216,7 @@ func (client *OnlineDeploymentsClient) deleteCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -223,7 +225,7 @@ func (client *OnlineDeploymentsClient) deleteCreateRequest(ctx context.Context, // Get - Get Inference Deployment Deployment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - endpointName - Inference endpoint name. @@ -279,7 +281,7 @@ func (client *OnlineDeploymentsClient) getCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -297,7 +299,7 @@ func (client *OnlineDeploymentsClient) getHandleResponse(resp *http.Response) (O // GetLogs - Polls an Endpoint operation. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - endpointName - Inference endpoint name. @@ -355,7 +357,7 @@ func (client *OnlineDeploymentsClient) getLogsCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -375,7 +377,7 @@ func (client *OnlineDeploymentsClient) getLogsHandleResponse(resp *http.Response // NewListPager - List Inference Endpoint Deployments. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - endpointName - Inference endpoint name. @@ -428,16 +430,16 @@ func (client *OnlineDeploymentsClient) listCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") if options != nil && options.OrderBy != nil { reqQP.Set("$orderBy", *options.OrderBy) } - if options != nil && options.Top != nil { - reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) - } if options != nil && options.Skip != nil { reqQP.Set("$skip", *options.Skip) } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -454,7 +456,7 @@ func (client *OnlineDeploymentsClient) listHandleResponse(resp *http.Response) ( // NewListSKUsPager - List Inference Endpoint Deployment Skus. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - endpointName - Inference endpoint name. @@ -512,13 +514,13 @@ func (client *OnlineDeploymentsClient) listSKUsCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - if options != nil && options.Count != nil { - reqQP.Set("count", strconv.FormatInt(int64(*options.Count), 10)) - } if options != nil && options.Skip != nil { reqQP.Set("$skip", *options.Skip) } + reqQP.Set("api-version", "2024-04-01") + if options != nil && options.Count != nil { + reqQP.Set("count", strconv.FormatInt(int64(*options.Count), 10)) + } req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -536,7 +538,7 @@ func (client *OnlineDeploymentsClient) listSKUsHandleResponse(resp *http.Respons // BeginUpdate - Update Online Deployment (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - endpointName - Online Endpoint name. @@ -564,7 +566,7 @@ func (client *OnlineDeploymentsClient) BeginUpdate(ctx context.Context, resource // Update - Update Online Deployment (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 func (client *OnlineDeploymentsClient) update(ctx context.Context, resourceGroupName string, workspaceName string, endpointName string, deploymentName string, body PartialMinimalTrackedResourceWithSKU, options *OnlineDeploymentsClientBeginUpdateOptions) (*http.Response, error) { var err error const operationName = "OnlineDeploymentsClient.BeginUpdate" @@ -614,7 +616,7 @@ func (client *OnlineDeploymentsClient) updateCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/onlineendpoints_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/onlineendpoints_client.go similarity index 96% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/onlineendpoints_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/onlineendpoints_client.go index 51f9519ef..c87b7ef7a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/onlineendpoints_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/onlineendpoints_client.go @@ -47,7 +47,7 @@ func NewOnlineEndpointsClient(subscriptionID string, credential azcore.TokenCred // BeginCreateOrUpdate - Create or update Online Endpoint (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - endpointName - Online Endpoint name. @@ -61,7 +61,8 @@ func (client *OnlineEndpointsClient) BeginCreateOrUpdate(ctx context.Context, re return nil, err } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[OnlineEndpointsClientCreateOrUpdateResponse]{ - Tracer: client.internal.Tracer(), + FinalStateVia: runtime.FinalStateViaOriginalURI, + Tracer: client.internal.Tracer(), }) return poller, err } else { @@ -74,7 +75,7 @@ func (client *OnlineEndpointsClient) BeginCreateOrUpdate(ctx context.Context, re // CreateOrUpdate - Create or update Online Endpoint (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 func (client *OnlineEndpointsClient) createOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, endpointName string, body OnlineEndpoint, options *OnlineEndpointsClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "OnlineEndpointsClient.BeginCreateOrUpdate" @@ -120,7 +121,7 @@ func (client *OnlineEndpointsClient) createOrUpdateCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -132,7 +133,7 @@ func (client *OnlineEndpointsClient) createOrUpdateCreateRequest(ctx context.Con // BeginDelete - Delete Online Endpoint (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - endpointName - Online Endpoint name. @@ -145,7 +146,8 @@ func (client *OnlineEndpointsClient) BeginDelete(ctx context.Context, resourceGr return nil, err } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[OnlineEndpointsClientDeleteResponse]{ - Tracer: client.internal.Tracer(), + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { @@ -158,7 +160,7 @@ func (client *OnlineEndpointsClient) BeginDelete(ctx context.Context, resourceGr // Delete - Delete Online Endpoint (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 func (client *OnlineEndpointsClient) deleteOperation(ctx context.Context, resourceGroupName string, workspaceName string, endpointName string, options *OnlineEndpointsClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "OnlineEndpointsClient.BeginDelete" @@ -204,7 +206,7 @@ func (client *OnlineEndpointsClient) deleteCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -213,7 +215,7 @@ func (client *OnlineEndpointsClient) deleteCreateRequest(ctx context.Context, re // Get - Get Online Endpoint. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - endpointName - Online Endpoint name. @@ -264,7 +266,7 @@ func (client *OnlineEndpointsClient) getCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -279,10 +281,10 @@ func (client *OnlineEndpointsClient) getHandleResponse(resp *http.Response) (Onl return result, nil } -// GetToken - Retrieve a valid AAD token for an Endpoint using AMLToken-based authentication. +// GetToken - Retrieve a valid AML token for an Endpoint using AMLToken-based authentication. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - endpointName - Online Endpoint name. @@ -334,7 +336,7 @@ func (client *OnlineEndpointsClient) getTokenCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -351,7 +353,7 @@ func (client *OnlineEndpointsClient) getTokenHandleResponse(resp *http.Response) // NewListPager - List Online Endpoints. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - options - OnlineEndpointsClientListOptions contains the optional parameters for the OnlineEndpointsClient.NewListPager @@ -399,27 +401,27 @@ func (client *OnlineEndpointsClient) listCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - if options != nil && options.Name != nil { - reqQP.Set("name", *options.Name) - } - if options != nil && options.Count != nil { - reqQP.Set("count", strconv.FormatInt(int64(*options.Count), 10)) + if options != nil && options.Skip != nil { + reqQP.Set("$skip", *options.Skip) } + reqQP.Set("api-version", "2024-04-01") if options != nil && options.ComputeType != nil { reqQP.Set("computeType", string(*options.ComputeType)) } - if options != nil && options.Skip != nil { - reqQP.Set("$skip", *options.Skip) + if options != nil && options.Count != nil { + reqQP.Set("count", strconv.FormatInt(int64(*options.Count), 10)) } - if options != nil && options.Tags != nil { - reqQP.Set("tags", *options.Tags) + if options != nil && options.Name != nil { + reqQP.Set("name", *options.Name) + } + if options != nil && options.OrderBy != nil { + reqQP.Set("orderBy", string(*options.OrderBy)) } if options != nil && options.Properties != nil { reqQP.Set("properties", *options.Properties) } - if options != nil && options.OrderBy != nil { - reqQP.Set("orderBy", string(*options.OrderBy)) + if options != nil && options.Tags != nil { + reqQP.Set("tags", *options.Tags) } req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} @@ -438,7 +440,7 @@ func (client *OnlineEndpointsClient) listHandleResponse(resp *http.Response) (On // ListKeys - List EndpointAuthKeys for an Endpoint using Key-based authentication. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - endpointName - Online Endpoint name. @@ -490,7 +492,7 @@ func (client *OnlineEndpointsClient) listKeysCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -508,7 +510,7 @@ func (client *OnlineEndpointsClient) listKeysHandleResponse(resp *http.Response) // BeginRegenerateKeys - Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - endpointName - Online Endpoint name. @@ -536,7 +538,7 @@ func (client *OnlineEndpointsClient) BeginRegenerateKeys(ctx context.Context, re // RegenerateKeys - Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 func (client *OnlineEndpointsClient) regenerateKeys(ctx context.Context, resourceGroupName string, workspaceName string, endpointName string, body RegenerateEndpointKeysRequest, options *OnlineEndpointsClientBeginRegenerateKeysOptions) (*http.Response, error) { var err error const operationName = "OnlineEndpointsClient.BeginRegenerateKeys" @@ -582,7 +584,7 @@ func (client *OnlineEndpointsClient) regenerateKeysCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -594,7 +596,7 @@ func (client *OnlineEndpointsClient) regenerateKeysCreateRequest(ctx context.Con // BeginUpdate - Update Online Endpoint (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - endpointName - Online Endpoint name. @@ -621,7 +623,7 @@ func (client *OnlineEndpointsClient) BeginUpdate(ctx context.Context, resourceGr // Update - Update Online Endpoint (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 func (client *OnlineEndpointsClient) update(ctx context.Context, resourceGroupName string, workspaceName string, endpointName string, body PartialMinimalTrackedResourceWithIdentity, options *OnlineEndpointsClientBeginUpdateOptions) (*http.Response, error) { var err error const operationName = "OnlineEndpointsClient.BeginUpdate" @@ -667,7 +669,7 @@ func (client *OnlineEndpointsClient) updateCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/operations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/operations_client.go similarity index 95% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/operations_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/operations_client.go index 6c71bd6f4..cf3c1b62a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/operations_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/operations_client.go @@ -39,7 +39,7 @@ func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientO // NewListPager - Lists all of the available Azure Machine Learning Workspaces REST API operations. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[OperationsClientListResponse]{ @@ -73,7 +73,7 @@ func (client *OperationsClient) listCreateRequest(ctx context.Context, options * return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -82,7 +82,7 @@ func (client *OperationsClient) listCreateRequest(ctx context.Context, options * // listHandleResponse handles the List response. func (client *OperationsClient) listHandleResponse(resp *http.Response) (OperationsClientListResponse, error) { result := OperationsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.AmlOperationListResult); err != nil { + if err := runtime.UnmarshalAsJSON(resp, &result.OperationListResult); err != nil { return OperationsClientListResponse{}, err } return result, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/options.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/options.go similarity index 51% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/options.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/options.go index 93d7cdecf..f12aeacdb 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/options.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/options.go @@ -104,6 +104,18 @@ type CodeContainersClientListOptions struct { Skip *string } +// CodeVersionsClientBeginPublishOptions contains the optional parameters for the CodeVersionsClient.BeginPublish method. +type CodeVersionsClientBeginPublishOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// CodeVersionsClientCreateOrGetStartPendingUploadOptions contains the optional parameters for the CodeVersionsClient.CreateOrGetStartPendingUpload +// method. +type CodeVersionsClientCreateOrGetStartPendingUploadOptions struct { + // placeholder for future optional parameters +} + // CodeVersionsClientCreateOrUpdateOptions contains the optional parameters for the CodeVersionsClient.CreateOrUpdate method. type CodeVersionsClientCreateOrUpdateOptions struct { // placeholder for future optional parameters @@ -121,6 +133,12 @@ type CodeVersionsClientGetOptions struct { // CodeVersionsClientListOptions contains the optional parameters for the CodeVersionsClient.NewListPager method. type CodeVersionsClientListOptions struct { + // If specified, return CodeVersion assets with specified content hash value, regardless of name + Hash *string + + // Hash algorithm version when listing by hash + HashVersion *string + // Ordering of list. OrderBy *string @@ -156,6 +174,13 @@ type ComponentContainersClientListOptions struct { Skip *string } +// ComponentVersionsClientBeginPublishOptions contains the optional parameters for the ComponentVersionsClient.BeginPublish +// method. +type ComponentVersionsClientBeginPublishOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + // ComponentVersionsClientCreateOrUpdateOptions contains the optional parameters for the ComponentVersionsClient.CreateOrUpdate // method. type ComponentVersionsClientCreateOrUpdateOptions struct { @@ -269,6 +294,12 @@ type DataContainersClientListOptions struct { Skip *string } +// DataVersionsClientBeginPublishOptions contains the optional parameters for the DataVersionsClient.BeginPublish method. +type DataVersionsClientBeginPublishOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + // DataVersionsClientCreateOrUpdateOptions contains the optional parameters for the DataVersionsClient.CreateOrUpdate method. type DataVersionsClientCreateOrUpdateOptions struct { // placeholder for future optional parameters @@ -375,6 +406,13 @@ type EnvironmentContainersClientListOptions struct { Skip *string } +// EnvironmentVersionsClientBeginPublishOptions contains the optional parameters for the EnvironmentVersionsClient.BeginPublish +// method. +type EnvironmentVersionsClientBeginPublishOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + // EnvironmentVersionsClientCreateOrUpdateOptions contains the optional parameters for the EnvironmentVersionsClient.CreateOrUpdate // method. type EnvironmentVersionsClientCreateOrUpdateOptions struct { @@ -406,6 +444,234 @@ type EnvironmentVersionsClientListOptions struct { Top *int32 } +// FeaturesClientGetOptions contains the optional parameters for the FeaturesClient.Get method. +type FeaturesClientGetOptions struct { + // placeholder for future optional parameters +} + +// FeaturesClientListOptions contains the optional parameters for the FeaturesClient.NewListPager method. +type FeaturesClientListOptions struct { + // Description of the featureset. + Description *string + + // feature name. + FeatureName *string + + // [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for including/excluding (for example) archived + // entities. + ListViewType *ListViewType + + // Page size. + PageSize *int32 + + // Continuation token for pagination. + Skip *string + + // Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2 + Tags *string +} + +// FeaturesetContainersClientBeginCreateOrUpdateOptions contains the optional parameters for the FeaturesetContainersClient.BeginCreateOrUpdate +// method. +type FeaturesetContainersClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// FeaturesetContainersClientBeginDeleteOptions contains the optional parameters for the FeaturesetContainersClient.BeginDelete +// method. +type FeaturesetContainersClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// FeaturesetContainersClientGetEntityOptions contains the optional parameters for the FeaturesetContainersClient.GetEntity +// method. +type FeaturesetContainersClientGetEntityOptions struct { + // placeholder for future optional parameters +} + +// FeaturesetContainersClientListOptions contains the optional parameters for the FeaturesetContainersClient.NewListPager +// method. +type FeaturesetContainersClientListOptions struct { + // createdBy user name + CreatedBy *string + + // description for the feature set + Description *string + + // [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for including/excluding (for example) archived + // entities. + ListViewType *ListViewType + + // name for the featureset + Name *string + + // page size + PageSize *int32 + + // Continuation token for pagination. + Skip *string + + // Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2 + Tags *string +} + +// FeaturesetVersionsClientBeginBackfillOptions contains the optional parameters for the FeaturesetVersionsClient.BeginBackfill +// method. +type FeaturesetVersionsClientBeginBackfillOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// FeaturesetVersionsClientBeginCreateOrUpdateOptions contains the optional parameters for the FeaturesetVersionsClient.BeginCreateOrUpdate +// method. +type FeaturesetVersionsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// FeaturesetVersionsClientBeginDeleteOptions contains the optional parameters for the FeaturesetVersionsClient.BeginDelete +// method. +type FeaturesetVersionsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// FeaturesetVersionsClientGetOptions contains the optional parameters for the FeaturesetVersionsClient.Get method. +type FeaturesetVersionsClientGetOptions struct { + // placeholder for future optional parameters +} + +// FeaturesetVersionsClientListOptions contains the optional parameters for the FeaturesetVersionsClient.NewListPager method. +type FeaturesetVersionsClientListOptions struct { + // createdBy user name + CreatedBy *string + + // description for the feature set version + Description *string + + // [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for including/excluding (for example) archived + // entities. + ListViewType *ListViewType + + // page size + PageSize *int32 + + // Continuation token for pagination. + Skip *string + + // Specifies the featurestore stage + Stage *string + + // Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2 + Tags *string + + // featureset version + Version *string + + // name for the featureset version + VersionName *string +} + +// FeaturestoreEntityContainersClientBeginCreateOrUpdateOptions contains the optional parameters for the FeaturestoreEntityContainersClient.BeginCreateOrUpdate +// method. +type FeaturestoreEntityContainersClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// FeaturestoreEntityContainersClientBeginDeleteOptions contains the optional parameters for the FeaturestoreEntityContainersClient.BeginDelete +// method. +type FeaturestoreEntityContainersClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// FeaturestoreEntityContainersClientGetEntityOptions contains the optional parameters for the FeaturestoreEntityContainersClient.GetEntity +// method. +type FeaturestoreEntityContainersClientGetEntityOptions struct { + // placeholder for future optional parameters +} + +// FeaturestoreEntityContainersClientListOptions contains the optional parameters for the FeaturestoreEntityContainersClient.NewListPager +// method. +type FeaturestoreEntityContainersClientListOptions struct { + // createdBy user name + CreatedBy *string + + // description for the featurestore entity + Description *string + + // [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for including/excluding (for example) archived + // entities. + ListViewType *ListViewType + + // name for the featurestore entity + Name *string + + // page size + PageSize *int32 + + // Continuation token for pagination. + Skip *string + + // Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2 + Tags *string +} + +// FeaturestoreEntityVersionsClientBeginCreateOrUpdateOptions contains the optional parameters for the FeaturestoreEntityVersionsClient.BeginCreateOrUpdate +// method. +type FeaturestoreEntityVersionsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// FeaturestoreEntityVersionsClientBeginDeleteOptions contains the optional parameters for the FeaturestoreEntityVersionsClient.BeginDelete +// method. +type FeaturestoreEntityVersionsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// FeaturestoreEntityVersionsClientGetOptions contains the optional parameters for the FeaturestoreEntityVersionsClient.Get +// method. +type FeaturestoreEntityVersionsClientGetOptions struct { + // placeholder for future optional parameters +} + +// FeaturestoreEntityVersionsClientListOptions contains the optional parameters for the FeaturestoreEntityVersionsClient.NewListPager +// method. +type FeaturestoreEntityVersionsClientListOptions struct { + // createdBy user name + CreatedBy *string + + // description for the feature entity version + Description *string + + // [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for including/excluding (for example) archived + // entities. + ListViewType *ListViewType + + // page size + PageSize *int32 + + // Continuation token for pagination. + Skip *string + + // Specifies the featurestore stage + Stage *string + + // Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2 + Tags *string + + // featurestore entity version + Version *string + + // name for the featurestore entity version + VersionName *string +} + // JobsClientBeginCancelOptions contains the optional parameters for the JobsClient.BeginCancel method. type JobsClientBeginCancelOptions struct { // Resumes the LRO from the provided token. @@ -436,6 +702,9 @@ type JobsClientListOptions struct { // View type for including/excluding (for example) archived entities. ListViewType *ListViewType + // Comma-separated list of user property names (and optionally values). Example: prop1,prop2=value2 + Properties *string + // Continuation token for pagination. Skip *string @@ -443,6 +712,68 @@ type JobsClientListOptions struct { Tag *string } +// ManagedNetworkProvisionsClientBeginProvisionManagedNetworkOptions contains the optional parameters for the ManagedNetworkProvisionsClient.BeginProvisionManagedNetwork +// method. +type ManagedNetworkProvisionsClientBeginProvisionManagedNetworkOptions struct { + // Managed Network Provisioning Options for a machine learning workspace. + Body *ManagedNetworkProvisionOptions + + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ManagedNetworkSettingsRuleClientBeginCreateOrUpdateOptions contains the optional parameters for the ManagedNetworkSettingsRuleClient.BeginCreateOrUpdate +// method. +type ManagedNetworkSettingsRuleClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ManagedNetworkSettingsRuleClientBeginDeleteOptions contains the optional parameters for the ManagedNetworkSettingsRuleClient.BeginDelete +// method. +type ManagedNetworkSettingsRuleClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ManagedNetworkSettingsRuleClientGetOptions contains the optional parameters for the ManagedNetworkSettingsRuleClient.Get +// method. +type ManagedNetworkSettingsRuleClientGetOptions struct { + // placeholder for future optional parameters +} + +// ManagedNetworkSettingsRuleClientListOptions contains the optional parameters for the ManagedNetworkSettingsRuleClient.NewListPager +// method. +type ManagedNetworkSettingsRuleClientListOptions struct { + // placeholder for future optional parameters +} + +// MarketplaceSubscriptionsClientBeginCreateOrUpdateOptions contains the optional parameters for the MarketplaceSubscriptionsClient.BeginCreateOrUpdate +// method. +type MarketplaceSubscriptionsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// MarketplaceSubscriptionsClientBeginDeleteOptions contains the optional parameters for the MarketplaceSubscriptionsClient.BeginDelete +// method. +type MarketplaceSubscriptionsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// MarketplaceSubscriptionsClientGetOptions contains the optional parameters for the MarketplaceSubscriptionsClient.Get method. +type MarketplaceSubscriptionsClientGetOptions struct { + // placeholder for future optional parameters +} + +// MarketplaceSubscriptionsClientListOptions contains the optional parameters for the MarketplaceSubscriptionsClient.NewListPager +// method. +type MarketplaceSubscriptionsClientListOptions struct { + // Continuation token for pagination. + Skip *string +} + // ModelContainersClientCreateOrUpdateOptions contains the optional parameters for the ModelContainersClient.CreateOrUpdate // method. type ModelContainersClientCreateOrUpdateOptions struct { @@ -471,6 +802,12 @@ type ModelContainersClientListOptions struct { Skip *string } +// ModelVersionsClientBeginPublishOptions contains the optional parameters for the ModelVersionsClient.BeginPublish method. +type ModelVersionsClientBeginPublishOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + // ModelVersionsClientCreateOrUpdateOptions contains the optional parameters for the ModelVersionsClient.CreateOrUpdate method. type ModelVersionsClientCreateOrUpdateOptions struct { // placeholder for future optional parameters @@ -683,51 +1020,489 @@ type QuotasClientUpdateOptions struct { // placeholder for future optional parameters } -// SchedulesClientBeginCreateOrUpdateOptions contains the optional parameters for the SchedulesClient.BeginCreateOrUpdate +// RegistriesClientBeginCreateOrUpdateOptions contains the optional parameters for the RegistriesClient.BeginCreateOrUpdate // method. -type SchedulesClientBeginCreateOrUpdateOptions struct { +type RegistriesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string } -// SchedulesClientBeginDeleteOptions contains the optional parameters for the SchedulesClient.BeginDelete method. -type SchedulesClientBeginDeleteOptions struct { +// RegistriesClientBeginDeleteOptions contains the optional parameters for the RegistriesClient.BeginDelete method. +type RegistriesClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string } -// SchedulesClientGetOptions contains the optional parameters for the SchedulesClient.Get method. -type SchedulesClientGetOptions struct { - // placeholder for future optional parameters +// RegistriesClientBeginRemoveRegionsOptions contains the optional parameters for the RegistriesClient.BeginRemoveRegions +// method. +type RegistriesClientBeginRemoveRegionsOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string } -// SchedulesClientListOptions contains the optional parameters for the SchedulesClient.NewListPager method. -type SchedulesClientListOptions struct { - // Status filter for schedule. - ListViewType *ScheduleListViewType - - // Continuation token for pagination. - Skip *string +// RegistriesClientGetOptions contains the optional parameters for the RegistriesClient.Get method. +type RegistriesClientGetOptions struct { + // placeholder for future optional parameters } -// UsagesClientListOptions contains the optional parameters for the UsagesClient.NewListPager method. -type UsagesClientListOptions struct { +// RegistriesClientListBySubscriptionOptions contains the optional parameters for the RegistriesClient.NewListBySubscriptionPager +// method. +type RegistriesClientListBySubscriptionOptions struct { // placeholder for future optional parameters } -// VirtualMachineSizesClientListOptions contains the optional parameters for the VirtualMachineSizesClient.List method. -type VirtualMachineSizesClientListOptions struct { +// RegistriesClientListOptions contains the optional parameters for the RegistriesClient.NewListPager method. +type RegistriesClientListOptions struct { // placeholder for future optional parameters } -// WorkspaceConnectionsClientCreateOptions contains the optional parameters for the WorkspaceConnectionsClient.Create method. -type WorkspaceConnectionsClientCreateOptions struct { +// RegistriesClientUpdateOptions contains the optional parameters for the RegistriesClient.Update method. +type RegistriesClientUpdateOptions struct { // placeholder for future optional parameters } -// WorkspaceConnectionsClientDeleteOptions contains the optional parameters for the WorkspaceConnectionsClient.Delete method. -type WorkspaceConnectionsClientDeleteOptions struct { - // placeholder for future optional parameters +// RegistryCodeContainersClientBeginCreateOrUpdateOptions contains the optional parameters for the RegistryCodeContainersClient.BeginCreateOrUpdate +// method. +type RegistryCodeContainersClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// RegistryCodeContainersClientBeginDeleteOptions contains the optional parameters for the RegistryCodeContainersClient.BeginDelete +// method. +type RegistryCodeContainersClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// RegistryCodeContainersClientGetOptions contains the optional parameters for the RegistryCodeContainersClient.Get method. +type RegistryCodeContainersClientGetOptions struct { + // placeholder for future optional parameters +} + +// RegistryCodeContainersClientListOptions contains the optional parameters for the RegistryCodeContainersClient.NewListPager +// method. +type RegistryCodeContainersClientListOptions struct { + // Continuation token for pagination. + Skip *string +} + +// RegistryCodeVersionsClientBeginCreateOrUpdateOptions contains the optional parameters for the RegistryCodeVersionsClient.BeginCreateOrUpdate +// method. +type RegistryCodeVersionsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// RegistryCodeVersionsClientBeginDeleteOptions contains the optional parameters for the RegistryCodeVersionsClient.BeginDelete +// method. +type RegistryCodeVersionsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// RegistryCodeVersionsClientCreateOrGetStartPendingUploadOptions contains the optional parameters for the RegistryCodeVersionsClient.CreateOrGetStartPendingUpload +// method. +type RegistryCodeVersionsClientCreateOrGetStartPendingUploadOptions struct { + // placeholder for future optional parameters +} + +// RegistryCodeVersionsClientGetOptions contains the optional parameters for the RegistryCodeVersionsClient.Get method. +type RegistryCodeVersionsClientGetOptions struct { + // placeholder for future optional parameters +} + +// RegistryCodeVersionsClientListOptions contains the optional parameters for the RegistryCodeVersionsClient.NewListPager +// method. +type RegistryCodeVersionsClientListOptions struct { + // Ordering of list. + OrderBy *string + + // Continuation token for pagination. + Skip *string + + // Maximum number of records to return. + Top *int32 +} + +// RegistryComponentContainersClientBeginCreateOrUpdateOptions contains the optional parameters for the RegistryComponentContainersClient.BeginCreateOrUpdate +// method. +type RegistryComponentContainersClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// RegistryComponentContainersClientBeginDeleteOptions contains the optional parameters for the RegistryComponentContainersClient.BeginDelete +// method. +type RegistryComponentContainersClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// RegistryComponentContainersClientGetOptions contains the optional parameters for the RegistryComponentContainersClient.Get +// method. +type RegistryComponentContainersClientGetOptions struct { + // placeholder for future optional parameters +} + +// RegistryComponentContainersClientListOptions contains the optional parameters for the RegistryComponentContainersClient.NewListPager +// method. +type RegistryComponentContainersClientListOptions struct { + // Continuation token for pagination. + Skip *string +} + +// RegistryComponentVersionsClientBeginCreateOrUpdateOptions contains the optional parameters for the RegistryComponentVersionsClient.BeginCreateOrUpdate +// method. +type RegistryComponentVersionsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// RegistryComponentVersionsClientBeginDeleteOptions contains the optional parameters for the RegistryComponentVersionsClient.BeginDelete +// method. +type RegistryComponentVersionsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// RegistryComponentVersionsClientGetOptions contains the optional parameters for the RegistryComponentVersionsClient.Get +// method. +type RegistryComponentVersionsClientGetOptions struct { + // placeholder for future optional parameters +} + +// RegistryComponentVersionsClientListOptions contains the optional parameters for the RegistryComponentVersionsClient.NewListPager +// method. +type RegistryComponentVersionsClientListOptions struct { + // Ordering of list. + OrderBy *string + + // Continuation token for pagination. + Skip *string + + // Maximum number of records to return. + Top *int32 +} + +// RegistryDataContainersClientBeginCreateOrUpdateOptions contains the optional parameters for the RegistryDataContainersClient.BeginCreateOrUpdate +// method. +type RegistryDataContainersClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// RegistryDataContainersClientBeginDeleteOptions contains the optional parameters for the RegistryDataContainersClient.BeginDelete +// method. +type RegistryDataContainersClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// RegistryDataContainersClientGetOptions contains the optional parameters for the RegistryDataContainersClient.Get method. +type RegistryDataContainersClientGetOptions struct { + // placeholder for future optional parameters +} + +// RegistryDataContainersClientListOptions contains the optional parameters for the RegistryDataContainersClient.NewListPager +// method. +type RegistryDataContainersClientListOptions struct { + // View type for including/excluding (for example) archived entities. + ListViewType *ListViewType + + // Continuation token for pagination. + Skip *string +} + +// RegistryDataReferencesClientGetBlobReferenceSASOptions contains the optional parameters for the RegistryDataReferencesClient.GetBlobReferenceSAS +// method. +type RegistryDataReferencesClientGetBlobReferenceSASOptions struct { + // placeholder for future optional parameters +} + +// RegistryDataVersionsClientBeginCreateOrUpdateOptions contains the optional parameters for the RegistryDataVersionsClient.BeginCreateOrUpdate +// method. +type RegistryDataVersionsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// RegistryDataVersionsClientBeginDeleteOptions contains the optional parameters for the RegistryDataVersionsClient.BeginDelete +// method. +type RegistryDataVersionsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// RegistryDataVersionsClientCreateOrGetStartPendingUploadOptions contains the optional parameters for the RegistryDataVersionsClient.CreateOrGetStartPendingUpload +// method. +type RegistryDataVersionsClientCreateOrGetStartPendingUploadOptions struct { + // placeholder for future optional parameters +} + +// RegistryDataVersionsClientGetOptions contains the optional parameters for the RegistryDataVersionsClient.Get method. +type RegistryDataVersionsClientGetOptions struct { + // placeholder for future optional parameters +} + +// RegistryDataVersionsClientListOptions contains the optional parameters for the RegistryDataVersionsClient.NewListPager +// method. +type RegistryDataVersionsClientListOptions struct { + // [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for including/excluding (for example) archived + // entities. + ListViewType *ListViewType + + // Please choose OrderBy value from ['createdtime', 'modifiedtime'] + OrderBy *string + + // Continuation token for pagination. + Skip *string + + // Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2 + Tags *string + + // Top count of results, top count cannot be greater than the page size. If topCount > page size, results with be default + // page size count will be returned + Top *int32 +} + +// RegistryEnvironmentContainersClientBeginCreateOrUpdateOptions contains the optional parameters for the RegistryEnvironmentContainersClient.BeginCreateOrUpdate +// method. +type RegistryEnvironmentContainersClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// RegistryEnvironmentContainersClientBeginDeleteOptions contains the optional parameters for the RegistryEnvironmentContainersClient.BeginDelete +// method. +type RegistryEnvironmentContainersClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// RegistryEnvironmentContainersClientGetOptions contains the optional parameters for the RegistryEnvironmentContainersClient.Get +// method. +type RegistryEnvironmentContainersClientGetOptions struct { + // placeholder for future optional parameters +} + +// RegistryEnvironmentContainersClientListOptions contains the optional parameters for the RegistryEnvironmentContainersClient.NewListPager +// method. +type RegistryEnvironmentContainersClientListOptions struct { + // View type for including/excluding (for example) archived entities. + ListViewType *ListViewType + + // Continuation token for pagination. + Skip *string +} + +// RegistryEnvironmentVersionsClientBeginCreateOrUpdateOptions contains the optional parameters for the RegistryEnvironmentVersionsClient.BeginCreateOrUpdate +// method. +type RegistryEnvironmentVersionsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// RegistryEnvironmentVersionsClientBeginDeleteOptions contains the optional parameters for the RegistryEnvironmentVersionsClient.BeginDelete +// method. +type RegistryEnvironmentVersionsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// RegistryEnvironmentVersionsClientGetOptions contains the optional parameters for the RegistryEnvironmentVersionsClient.Get +// method. +type RegistryEnvironmentVersionsClientGetOptions struct { + // placeholder for future optional parameters +} + +// RegistryEnvironmentVersionsClientListOptions contains the optional parameters for the RegistryEnvironmentVersionsClient.NewListPager +// method. +type RegistryEnvironmentVersionsClientListOptions struct { + // View type for including/excluding (for example) archived entities. + ListViewType *ListViewType + + // Ordering of list. + OrderBy *string + + // Continuation token for pagination. + Skip *string + + // Maximum number of records to return. + Top *int32 +} + +// RegistryModelContainersClientBeginCreateOrUpdateOptions contains the optional parameters for the RegistryModelContainersClient.BeginCreateOrUpdate +// method. +type RegistryModelContainersClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// RegistryModelContainersClientBeginDeleteOptions contains the optional parameters for the RegistryModelContainersClient.BeginDelete +// method. +type RegistryModelContainersClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// RegistryModelContainersClientGetOptions contains the optional parameters for the RegistryModelContainersClient.Get method. +type RegistryModelContainersClientGetOptions struct { + // placeholder for future optional parameters +} + +// RegistryModelContainersClientListOptions contains the optional parameters for the RegistryModelContainersClient.NewListPager +// method. +type RegistryModelContainersClientListOptions struct { + // View type for including/excluding (for example) archived entities. + ListViewType *ListViewType + + // Continuation token for pagination. + Skip *string +} + +// RegistryModelVersionsClientBeginCreateOrUpdateOptions contains the optional parameters for the RegistryModelVersionsClient.BeginCreateOrUpdate +// method. +type RegistryModelVersionsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// RegistryModelVersionsClientBeginDeleteOptions contains the optional parameters for the RegistryModelVersionsClient.BeginDelete +// method. +type RegistryModelVersionsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// RegistryModelVersionsClientCreateOrGetStartPendingUploadOptions contains the optional parameters for the RegistryModelVersionsClient.CreateOrGetStartPendingUpload +// method. +type RegistryModelVersionsClientCreateOrGetStartPendingUploadOptions struct { + // placeholder for future optional parameters +} + +// RegistryModelVersionsClientGetOptions contains the optional parameters for the RegistryModelVersionsClient.Get method. +type RegistryModelVersionsClientGetOptions struct { + // placeholder for future optional parameters +} + +// RegistryModelVersionsClientListOptions contains the optional parameters for the RegistryModelVersionsClient.NewListPager +// method. +type RegistryModelVersionsClientListOptions struct { + // Model description. + Description *string + + // View type for including/excluding (for example) archived entities. + ListViewType *ListViewType + + // Ordering of list. + OrderBy *string + + // Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2 + Properties *string + + // Continuation token for pagination. + Skip *string + + // Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2 + Tags *string + + // Maximum number of records to return. + Top *int32 + + // Version identifier. + Version *string +} + +// SchedulesClientBeginCreateOrUpdateOptions contains the optional parameters for the SchedulesClient.BeginCreateOrUpdate +// method. +type SchedulesClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// SchedulesClientBeginDeleteOptions contains the optional parameters for the SchedulesClient.BeginDelete method. +type SchedulesClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// SchedulesClientGetOptions contains the optional parameters for the SchedulesClient.Get method. +type SchedulesClientGetOptions struct { + // placeholder for future optional parameters +} + +// SchedulesClientListOptions contains the optional parameters for the SchedulesClient.NewListPager method. +type SchedulesClientListOptions struct { + // Status filter for schedule. + ListViewType *ScheduleListViewType + + // Continuation token for pagination. + Skip *string +} + +// ServerlessEndpointsClientBeginCreateOrUpdateOptions contains the optional parameters for the ServerlessEndpointsClient.BeginCreateOrUpdate +// method. +type ServerlessEndpointsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ServerlessEndpointsClientBeginDeleteOptions contains the optional parameters for the ServerlessEndpointsClient.BeginDelete +// method. +type ServerlessEndpointsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ServerlessEndpointsClientBeginRegenerateKeysOptions contains the optional parameters for the ServerlessEndpointsClient.BeginRegenerateKeys +// method. +type ServerlessEndpointsClientBeginRegenerateKeysOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ServerlessEndpointsClientBeginUpdateOptions contains the optional parameters for the ServerlessEndpointsClient.BeginUpdate +// method. +type ServerlessEndpointsClientBeginUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ServerlessEndpointsClientGetOptions contains the optional parameters for the ServerlessEndpointsClient.Get method. +type ServerlessEndpointsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ServerlessEndpointsClientListKeysOptions contains the optional parameters for the ServerlessEndpointsClient.ListKeys method. +type ServerlessEndpointsClientListKeysOptions struct { + // placeholder for future optional parameters +} + +// ServerlessEndpointsClientListOptions contains the optional parameters for the ServerlessEndpointsClient.NewListPager method. +type ServerlessEndpointsClientListOptions struct { + // Continuation token for pagination. + Skip *string +} + +// UsagesClientListOptions contains the optional parameters for the UsagesClient.NewListPager method. +type UsagesClientListOptions struct { + // placeholder for future optional parameters +} + +// VirtualMachineSizesClientListOptions contains the optional parameters for the VirtualMachineSizesClient.List method. +type VirtualMachineSizesClientListOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceConnectionsClientCreateOptions contains the optional parameters for the WorkspaceConnectionsClient.Create method. +type WorkspaceConnectionsClientCreateOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceConnectionsClientDeleteOptions contains the optional parameters for the WorkspaceConnectionsClient.Delete method. +type WorkspaceConnectionsClientDeleteOptions struct { + // placeholder for future optional parameters } // WorkspaceConnectionsClientGetOptions contains the optional parameters for the WorkspaceConnectionsClient.Get method. @@ -745,6 +1520,12 @@ type WorkspaceConnectionsClientListOptions struct { Target *string } +// WorkspaceConnectionsClientListSecretsOptions contains the optional parameters for the WorkspaceConnectionsClient.ListSecrets +// method. +type WorkspaceConnectionsClientListSecretsOptions struct { + // placeholder for future optional parameters +} + // WorkspaceFeaturesClientListOptions contains the optional parameters for the WorkspaceFeaturesClient.NewListPager method. type WorkspaceFeaturesClientListOptions struct { // placeholder for future optional parameters @@ -759,6 +1540,9 @@ type WorkspacesClientBeginCreateOrUpdateOptions struct { // WorkspacesClientBeginDeleteOptions contains the optional parameters for the WorkspacesClient.BeginDelete method. type WorkspacesClientBeginDeleteOptions struct { + // Flag to indicate delete is a purge request. + ForceToPurge *bool + // Resumes the LRO from the provided token. ResumeToken string } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/polymorphic_helpers.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/polymorphic_helpers.go similarity index 51% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/polymorphic_helpers.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/polymorphic_helpers.go index bac9444bd..f32d824f4 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/polymorphic_helpers.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/polymorphic_helpers.go @@ -11,7 +11,7 @@ package armmachinelearning import "encoding/json" func unmarshalAssetReferenceBaseClassification(rawMsg json.RawMessage) (AssetReferenceBaseClassification, error) { - if rawMsg == nil { + if rawMsg == nil || string(rawMsg) == "null" { return nil, nil } var m map[string]any @@ -36,7 +36,7 @@ func unmarshalAssetReferenceBaseClassification(rawMsg json.RawMessage) (AssetRef } func unmarshalAutoMLVerticalClassification(rawMsg json.RawMessage) (AutoMLVerticalClassification, error) { - if rawMsg == nil { + if rawMsg == nil || string(rawMsg) == "null" { return nil, nil } var m map[string]any @@ -74,8 +74,29 @@ func unmarshalAutoMLVerticalClassification(rawMsg json.RawMessage) (AutoMLVertic return b, nil } +func unmarshalBatchDeploymentConfigurationClassification(rawMsg json.RawMessage) (BatchDeploymentConfigurationClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b BatchDeploymentConfigurationClassification + switch m["deploymentConfigurationType"] { + case string(BatchDeploymentConfigurationTypePipelineComponent): + b = &BatchPipelineComponentDeploymentConfiguration{} + default: + b = &BatchDeploymentConfiguration{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + func unmarshalComputeClassification(rawMsg json.RawMessage) (ComputeClassification, error) { - if rawMsg == nil { + if rawMsg == nil || string(rawMsg) == "null" { return nil, nil } var m map[string]any @@ -114,7 +135,7 @@ func unmarshalComputeClassification(rawMsg json.RawMessage) (ComputeClassificati } func unmarshalComputeSecretsClassification(rawMsg json.RawMessage) (ComputeSecretsClassification, error) { - if rawMsg == nil { + if rawMsg == nil || string(rawMsg) == "null" { return nil, nil } var m map[string]any @@ -138,8 +159,119 @@ func unmarshalComputeSecretsClassification(rawMsg json.RawMessage) (ComputeSecre return b, nil } +func unmarshalDataDriftMetricThresholdBaseClassification(rawMsg json.RawMessage) (DataDriftMetricThresholdBaseClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b DataDriftMetricThresholdBaseClassification + switch m["dataType"] { + case string(MonitoringFeatureDataTypeCategorical): + b = &CategoricalDataDriftMetricThreshold{} + case string(MonitoringFeatureDataTypeNumerical): + b = &NumericalDataDriftMetricThreshold{} + default: + b = &DataDriftMetricThresholdBase{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalDataDriftMetricThresholdBaseClassificationArray(rawMsg json.RawMessage) ([]DataDriftMetricThresholdBaseClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var rawMessages []json.RawMessage + if err := json.Unmarshal(rawMsg, &rawMessages); err != nil { + return nil, err + } + fArray := make([]DataDriftMetricThresholdBaseClassification, len(rawMessages)) + for index, rawMessage := range rawMessages { + f, err := unmarshalDataDriftMetricThresholdBaseClassification(rawMessage) + if err != nil { + return nil, err + } + fArray[index] = f + } + return fArray, nil +} + +func unmarshalDataQualityMetricThresholdBaseClassification(rawMsg json.RawMessage) (DataQualityMetricThresholdBaseClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b DataQualityMetricThresholdBaseClassification + switch m["dataType"] { + case string(MonitoringFeatureDataTypeCategorical): + b = &CategoricalDataQualityMetricThreshold{} + case string(MonitoringFeatureDataTypeNumerical): + b = &NumericalDataQualityMetricThreshold{} + default: + b = &DataQualityMetricThresholdBase{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalDataQualityMetricThresholdBaseClassificationArray(rawMsg json.RawMessage) ([]DataQualityMetricThresholdBaseClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var rawMessages []json.RawMessage + if err := json.Unmarshal(rawMsg, &rawMessages); err != nil { + return nil, err + } + fArray := make([]DataQualityMetricThresholdBaseClassification, len(rawMessages)) + for index, rawMessage := range rawMessages { + f, err := unmarshalDataQualityMetricThresholdBaseClassification(rawMessage) + if err != nil { + return nil, err + } + fArray[index] = f + } + return fArray, nil +} + +func unmarshalDataReferenceCredentialClassification(rawMsg json.RawMessage) (DataReferenceCredentialClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b DataReferenceCredentialClassification + switch m["credentialType"] { + case string(DataReferenceCredentialTypeDockerCredentials): + b = &DockerCredential{} + case string(DataReferenceCredentialTypeManagedIdentity): + b = &ManagedIdentityCredential{} + case string(DataReferenceCredentialTypeNoCredentials): + b = &AnonymousAccessCredential{} + case string(DataReferenceCredentialTypeSAS): + b = &SASCredential{} + default: + b = &DataReferenceCredential{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + func unmarshalDataVersionBasePropertiesClassification(rawMsg json.RawMessage) (DataVersionBasePropertiesClassification, error) { - if rawMsg == nil { + if rawMsg == nil || string(rawMsg) == "null" { return nil, nil } var m map[string]any @@ -164,7 +296,7 @@ func unmarshalDataVersionBasePropertiesClassification(rawMsg json.RawMessage) (D } func unmarshalDatastoreCredentialsClassification(rawMsg json.RawMessage) (DatastoreCredentialsClassification, error) { - if rawMsg == nil { + if rawMsg == nil || string(rawMsg) == "null" { return nil, nil } var m map[string]any @@ -193,7 +325,7 @@ func unmarshalDatastoreCredentialsClassification(rawMsg json.RawMessage) (Datast } func unmarshalDatastorePropertiesClassification(rawMsg json.RawMessage) (DatastorePropertiesClassification, error) { - if rawMsg == nil { + if rawMsg == nil || string(rawMsg) == "null" { return nil, nil } var m map[string]any @@ -210,6 +342,8 @@ func unmarshalDatastorePropertiesClassification(rawMsg json.RawMessage) (Datasto b = &AzureDataLakeGen2Datastore{} case string(DatastoreTypeAzureFile): b = &AzureFileDatastore{} + case string(DatastoreTypeOneLake): + b = &OneLakeDatastore{} default: b = &DatastoreProperties{} } @@ -220,7 +354,7 @@ func unmarshalDatastorePropertiesClassification(rawMsg json.RawMessage) (Datasto } func unmarshalDatastoreSecretsClassification(rawMsg json.RawMessage) (DatastoreSecretsClassification, error) { - if rawMsg == nil { + if rawMsg == nil || string(rawMsg) == "null" { return nil, nil } var m map[string]any @@ -247,7 +381,7 @@ func unmarshalDatastoreSecretsClassification(rawMsg json.RawMessage) (DatastoreS } func unmarshalDistributionConfigurationClassification(rawMsg json.RawMessage) (DistributionConfigurationClassification, error) { - if rawMsg == nil { + if rawMsg == nil || string(rawMsg) == "null" { return nil, nil } var m map[string]any @@ -272,7 +406,7 @@ func unmarshalDistributionConfigurationClassification(rawMsg json.RawMessage) (D } func unmarshalEarlyTerminationPolicyClassification(rawMsg json.RawMessage) (EarlyTerminationPolicyClassification, error) { - if rawMsg == nil { + if rawMsg == nil || string(rawMsg) == "null" { return nil, nil } var m map[string]any @@ -297,7 +431,7 @@ func unmarshalEarlyTerminationPolicyClassification(rawMsg json.RawMessage) (Earl } func unmarshalForecastHorizonClassification(rawMsg json.RawMessage) (ForecastHorizonClassification, error) { - if rawMsg == nil { + if rawMsg == nil || string(rawMsg) == "null" { return nil, nil } var m map[string]any @@ -320,7 +454,7 @@ func unmarshalForecastHorizonClassification(rawMsg json.RawMessage) (ForecastHor } func unmarshalIdentityConfigurationClassification(rawMsg json.RawMessage) (IdentityConfigurationClassification, error) { - if rawMsg == nil { + if rawMsg == nil || string(rawMsg) == "null" { return nil, nil } var m map[string]any @@ -345,7 +479,7 @@ func unmarshalIdentityConfigurationClassification(rawMsg json.RawMessage) (Ident } func unmarshalJobBasePropertiesClassification(rawMsg json.RawMessage) (JobBasePropertiesClassification, error) { - if rawMsg == nil { + if rawMsg == nil || string(rawMsg) == "null" { return nil, nil } var m map[string]any @@ -360,6 +494,8 @@ func unmarshalJobBasePropertiesClassification(rawMsg json.RawMessage) (JobBasePr b = &CommandJob{} case string(JobTypePipeline): b = &PipelineJob{} + case string(JobTypeSpark): + b = &SparkJob{} case string(JobTypeSweep): b = &SweepJob{} default: @@ -372,7 +508,7 @@ func unmarshalJobBasePropertiesClassification(rawMsg json.RawMessage) (JobBasePr } func unmarshalJobInputClassification(rawMsg json.RawMessage) (JobInputClassification, error) { - if rawMsg == nil { + if rawMsg == nil || string(rawMsg) == "null" { return nil, nil } var m map[string]any @@ -405,7 +541,7 @@ func unmarshalJobInputClassification(rawMsg json.RawMessage) (JobInputClassifica } func unmarshalJobInputClassificationMap(rawMsg json.RawMessage) (map[string]JobInputClassification, error) { - if rawMsg == nil { + if rawMsg == nil || string(rawMsg) == "null" { return nil, nil } var rawMessages map[string]json.RawMessage @@ -424,7 +560,7 @@ func unmarshalJobInputClassificationMap(rawMsg json.RawMessage) (map[string]JobI } func unmarshalJobOutputClassification(rawMsg json.RawMessage) (JobOutputClassification, error) { - if rawMsg == nil { + if rawMsg == nil || string(rawMsg) == "null" { return nil, nil } var m map[string]any @@ -455,7 +591,7 @@ func unmarshalJobOutputClassification(rawMsg json.RawMessage) (JobOutputClassifi } func unmarshalJobOutputClassificationMap(rawMsg json.RawMessage) (map[string]JobOutputClassification, error) { - if rawMsg == nil { + if rawMsg == nil || string(rawMsg) == "null" { return nil, nil } var rawMessages map[string]json.RawMessage @@ -473,8 +609,188 @@ func unmarshalJobOutputClassificationMap(rawMsg json.RawMessage) (map[string]Job return fMap, nil } +func unmarshalMonitorComputeConfigurationBaseClassification(rawMsg json.RawMessage) (MonitorComputeConfigurationBaseClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b MonitorComputeConfigurationBaseClassification + switch m["computeType"] { + case string(MonitorComputeTypeServerlessSpark): + b = &MonitorServerlessSparkCompute{} + default: + b = &MonitorComputeConfigurationBase{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalMonitorComputeIdentityBaseClassification(rawMsg json.RawMessage) (MonitorComputeIdentityBaseClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b MonitorComputeIdentityBaseClassification + switch m["computeIdentityType"] { + case string(MonitorComputeIdentityTypeAmlToken): + b = &AmlTokenComputeIdentity{} + case string(MonitorComputeIdentityTypeManagedIdentity): + b = &ManagedComputeIdentity{} + default: + b = &MonitorComputeIdentityBase{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalMonitoringFeatureFilterBaseClassification(rawMsg json.RawMessage) (MonitoringFeatureFilterBaseClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b MonitoringFeatureFilterBaseClassification + switch m["filterType"] { + case string(MonitoringFeatureFilterTypeAllFeatures): + b = &AllFeatures{} + case string(MonitoringFeatureFilterTypeFeatureSubset): + b = &FeatureSubset{} + case string(MonitoringFeatureFilterTypeTopNByAttribution): + b = &TopNFeaturesByAttribution{} + default: + b = &MonitoringFeatureFilterBase{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalMonitoringInputDataBaseClassification(rawMsg json.RawMessage) (MonitoringInputDataBaseClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b MonitoringInputDataBaseClassification + switch m["inputDataType"] { + case string(MonitoringInputDataTypeFixed): + b = &FixedInputData{} + case string(MonitoringInputDataTypeRolling): + b = &RollingInputData{} + case string(MonitoringInputDataTypeStatic): + b = &StaticInputData{} + default: + b = &MonitoringInputDataBase{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalMonitoringInputDataBaseClassificationArray(rawMsg json.RawMessage) ([]MonitoringInputDataBaseClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var rawMessages []json.RawMessage + if err := json.Unmarshal(rawMsg, &rawMessages); err != nil { + return nil, err + } + fArray := make([]MonitoringInputDataBaseClassification, len(rawMessages)) + for index, rawMessage := range rawMessages { + f, err := unmarshalMonitoringInputDataBaseClassification(rawMessage) + if err != nil { + return nil, err + } + fArray[index] = f + } + return fArray, nil +} + +func unmarshalMonitoringInputDataBaseClassificationMap(rawMsg json.RawMessage) (map[string]MonitoringInputDataBaseClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var rawMessages map[string]json.RawMessage + if err := json.Unmarshal(rawMsg, &rawMessages); err != nil { + return nil, err + } + fMap := make(map[string]MonitoringInputDataBaseClassification, len(rawMessages)) + for key, rawMessage := range rawMessages { + f, err := unmarshalMonitoringInputDataBaseClassification(rawMessage) + if err != nil { + return nil, err + } + fMap[key] = f + } + return fMap, nil +} + +func unmarshalMonitoringSignalBaseClassification(rawMsg json.RawMessage) (MonitoringSignalBaseClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b MonitoringSignalBaseClassification + switch m["signalType"] { + case string(MonitoringSignalTypeCustom): + b = &CustomMonitoringSignal{} + case string(MonitoringSignalTypeDataDrift): + b = &DataDriftMonitoringSignal{} + case string(MonitoringSignalTypeDataQuality): + b = &DataQualityMonitoringSignal{} + case string(MonitoringSignalTypeFeatureAttributionDrift): + b = &FeatureAttributionDriftMonitoringSignal{} + case string(MonitoringSignalTypePredictionDrift): + b = &PredictionDriftMonitoringSignal{} + default: + b = &MonitoringSignalBase{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalMonitoringSignalBaseClassificationMap(rawMsg json.RawMessage) (map[string]MonitoringSignalBaseClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var rawMessages map[string]json.RawMessage + if err := json.Unmarshal(rawMsg, &rawMessages); err != nil { + return nil, err + } + fMap := make(map[string]MonitoringSignalBaseClassification, len(rawMessages)) + for key, rawMessage := range rawMessages { + f, err := unmarshalMonitoringSignalBaseClassification(rawMessage) + if err != nil { + return nil, err + } + fMap[key] = f + } + return fMap, nil +} + func unmarshalNCrossValidationsClassification(rawMsg json.RawMessage) (NCrossValidationsClassification, error) { - if rawMsg == nil { + if rawMsg == nil || string(rawMsg) == "null" { return nil, nil } var m map[string]any @@ -496,8 +812,50 @@ func unmarshalNCrossValidationsClassification(rawMsg json.RawMessage) (NCrossVal return b, nil } +func unmarshalNodesClassification(rawMsg json.RawMessage) (NodesClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b NodesClassification + switch m["nodesValueType"] { + case string(NodesValueTypeAll): + b = &AllNodes{} + default: + b = &Nodes{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalOneLakeArtifactClassification(rawMsg json.RawMessage) (OneLakeArtifactClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b OneLakeArtifactClassification + switch m["artifactType"] { + case string(OneLakeArtifactTypeLakeHouse): + b = &LakeHouseArtifact{} + default: + b = &OneLakeArtifact{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + func unmarshalOnlineDeploymentPropertiesClassification(rawMsg json.RawMessage) (OnlineDeploymentPropertiesClassification, error) { - if rawMsg == nil { + if rawMsg == nil || string(rawMsg) == "null" { return nil, nil } var m map[string]any @@ -520,7 +878,7 @@ func unmarshalOnlineDeploymentPropertiesClassification(rawMsg json.RawMessage) ( } func unmarshalOnlineScaleSettingsClassification(rawMsg json.RawMessage) (OnlineScaleSettingsClassification, error) { - if rawMsg == nil { + if rawMsg == nil || string(rawMsg) == "null" { return nil, nil } var m map[string]any @@ -542,8 +900,115 @@ func unmarshalOnlineScaleSettingsClassification(rawMsg json.RawMessage) (OnlineS return b, nil } +func unmarshalOutboundRuleClassification(rawMsg json.RawMessage) (OutboundRuleClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b OutboundRuleClassification + switch m["type"] { + case string(RuleTypeFQDN): + b = &FqdnOutboundRule{} + case string(RuleTypePrivateEndpoint): + b = &PrivateEndpointOutboundRule{} + case string(RuleTypeServiceTag): + b = &ServiceTagOutboundRule{} + default: + b = &OutboundRule{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalOutboundRuleClassificationMap(rawMsg json.RawMessage) (map[string]OutboundRuleClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var rawMessages map[string]json.RawMessage + if err := json.Unmarshal(rawMsg, &rawMessages); err != nil { + return nil, err + } + fMap := make(map[string]OutboundRuleClassification, len(rawMessages)) + for key, rawMessage := range rawMessages { + f, err := unmarshalOutboundRuleClassification(rawMessage) + if err != nil { + return nil, err + } + fMap[key] = f + } + return fMap, nil +} + +func unmarshalPendingUploadCredentialDtoClassification(rawMsg json.RawMessage) (PendingUploadCredentialDtoClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b PendingUploadCredentialDtoClassification + switch m["credentialType"] { + case string(PendingUploadCredentialTypeSAS): + b = &SASCredentialDto{} + default: + b = &PendingUploadCredentialDto{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalPredictionDriftMetricThresholdBaseClassification(rawMsg json.RawMessage) (PredictionDriftMetricThresholdBaseClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b PredictionDriftMetricThresholdBaseClassification + switch m["dataType"] { + case string(MonitoringFeatureDataTypeCategorical): + b = &CategoricalPredictionDriftMetricThreshold{} + case string(MonitoringFeatureDataTypeNumerical): + b = &NumericalPredictionDriftMetricThreshold{} + default: + b = &PredictionDriftMetricThresholdBase{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalPredictionDriftMetricThresholdBaseClassificationArray(rawMsg json.RawMessage) ([]PredictionDriftMetricThresholdBaseClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var rawMessages []json.RawMessage + if err := json.Unmarshal(rawMsg, &rawMessages); err != nil { + return nil, err + } + fArray := make([]PredictionDriftMetricThresholdBaseClassification, len(rawMessages)) + for index, rawMessage := range rawMessages { + f, err := unmarshalPredictionDriftMetricThresholdBaseClassification(rawMessage) + if err != nil { + return nil, err + } + fArray[index] = f + } + return fArray, nil +} + func unmarshalSamplingAlgorithmClassification(rawMsg json.RawMessage) (SamplingAlgorithmClassification, error) { - if rawMsg == nil { + if rawMsg == nil || string(rawMsg) == "null" { return nil, nil } var m map[string]any @@ -568,7 +1033,7 @@ func unmarshalSamplingAlgorithmClassification(rawMsg json.RawMessage) (SamplingA } func unmarshalScheduleActionBaseClassification(rawMsg json.RawMessage) (ScheduleActionBaseClassification, error) { - if rawMsg == nil { + if rawMsg == nil || string(rawMsg) == "null" { return nil, nil } var m map[string]any @@ -579,6 +1044,8 @@ func unmarshalScheduleActionBaseClassification(rawMsg json.RawMessage) (Schedule switch m["actionType"] { case string(ScheduleActionTypeCreateJob): b = &JobScheduleAction{} + case string(ScheduleActionTypeCreateMonitor): + b = &CreateMonitorAction{} case string(ScheduleActionTypeInvokeBatchEndpoint): b = &EndpointScheduleAction{} default: @@ -591,7 +1058,7 @@ func unmarshalScheduleActionBaseClassification(rawMsg json.RawMessage) (Schedule } func unmarshalSeasonalityClassification(rawMsg json.RawMessage) (SeasonalityClassification, error) { - if rawMsg == nil { + if rawMsg == nil || string(rawMsg) == "null" { return nil, nil } var m map[string]any @@ -613,8 +1080,31 @@ func unmarshalSeasonalityClassification(rawMsg json.RawMessage) (SeasonalityClas return b, nil } +func unmarshalSparkJobEntryClassification(rawMsg json.RawMessage) (SparkJobEntryClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b SparkJobEntryClassification + switch m["sparkJobEntryType"] { + case string(SparkJobEntryTypeSparkJobPythonEntry): + b = &SparkJobPythonEntry{} + case string(SparkJobEntryTypeSparkJobScalaEntry): + b = &SparkJobScalaEntry{} + default: + b = &SparkJobEntry{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + func unmarshalTargetLagsClassification(rawMsg json.RawMessage) (TargetLagsClassification, error) { - if rawMsg == nil { + if rawMsg == nil || string(rawMsg) == "null" { return nil, nil } var m map[string]any @@ -637,7 +1127,7 @@ func unmarshalTargetLagsClassification(rawMsg json.RawMessage) (TargetLagsClassi } func unmarshalTargetRollingWindowSizeClassification(rawMsg json.RawMessage) (TargetRollingWindowSizeClassification, error) { - if rawMsg == nil { + if rawMsg == nil || string(rawMsg) == "null" { return nil, nil } var m map[string]any @@ -660,7 +1150,7 @@ func unmarshalTargetRollingWindowSizeClassification(rawMsg json.RawMessage) (Tar } func unmarshalTriggerBaseClassification(rawMsg json.RawMessage) (TriggerBaseClassification, error) { - if rawMsg == nil { + if rawMsg == nil || string(rawMsg) == "null" { return nil, nil } var m map[string]any @@ -682,8 +1172,48 @@ func unmarshalTriggerBaseClassification(rawMsg json.RawMessage) (TriggerBaseClas return b, nil } +func unmarshalWebhookClassification(rawMsg json.RawMessage) (WebhookClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b WebhookClassification + switch m["webhookType"] { + case string(WebhookTypeAzureDevOps): + b = &AzureDevOpsWebhook{} + default: + b = &Webhook{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalWebhookClassificationMap(rawMsg json.RawMessage) (map[string]WebhookClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var rawMessages map[string]json.RawMessage + if err := json.Unmarshal(rawMsg, &rawMessages); err != nil { + return nil, err + } + fMap := make(map[string]WebhookClassification, len(rawMessages)) + for key, rawMessage := range rawMessages { + f, err := unmarshalWebhookClassification(rawMessage) + if err != nil { + return nil, err + } + fMap[key] = f + } + return fMap, nil +} + func unmarshalWorkspaceConnectionPropertiesV2Classification(rawMsg json.RawMessage) (WorkspaceConnectionPropertiesV2Classification, error) { - if rawMsg == nil { + if rawMsg == nil || string(rawMsg) == "null" { return nil, nil } var m map[string]any @@ -692,14 +1222,28 @@ func unmarshalWorkspaceConnectionPropertiesV2Classification(rawMsg json.RawMessa } var b WorkspaceConnectionPropertiesV2Classification switch m["authType"] { + case string(ConnectionAuthTypeAAD): + b = &AADAuthTypeWorkspaceConnectionProperties{} + case string(ConnectionAuthTypeAccessKey): + b = &AccessKeyAuthTypeWorkspaceConnectionProperties{} + case string(ConnectionAuthTypeAccountKey): + b = &AccountKeyAuthTypeWorkspaceConnectionProperties{} + case string(ConnectionAuthTypeAPIKey): + b = &APIKeyAuthWorkspaceConnectionProperties{} + case string(ConnectionAuthTypeCustomKeys): + b = &CustomKeysWorkspaceConnectionProperties{} case string(ConnectionAuthTypeManagedIdentity): b = &ManagedIdentityAuthTypeWorkspaceConnectionProperties{} case string(ConnectionAuthTypeNone): b = &NoneAuthTypeWorkspaceConnectionProperties{} + case string(ConnectionAuthTypeOAuth2): + b = &OAuth2AuthTypeWorkspaceConnectionProperties{} case string(ConnectionAuthTypePAT): b = &PATAuthTypeWorkspaceConnectionProperties{} case string(ConnectionAuthTypeSAS): b = &SASAuthTypeWorkspaceConnectionProperties{} + case string(ConnectionAuthTypeServicePrincipal): + b = &ServicePrincipalAuthTypeWorkspaceConnectionProperties{} case string(ConnectionAuthTypeUsernamePassword): b = &UsernamePasswordAuthTypeWorkspaceConnectionProperties{} default: diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/privateendpointconnections_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/privateendpointconnections_client.go similarity index 98% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/privateendpointconnections_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/privateendpointconnections_client.go index 312cc6057..f648537a5 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/privateendpointconnections_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/privateendpointconnections_client.go @@ -46,7 +46,7 @@ func NewPrivateEndpointConnectionsClient(subscriptionID string, credential azcor // CreateOrUpdate - Update the state of specified private endpoint connection associated with the workspace. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - privateEndpointConnectionName - The name of the private endpoint connection associated with the workspace @@ -99,7 +99,7 @@ func (client *PrivateEndpointConnectionsClient) createOrUpdateCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, properties); err != nil { @@ -120,7 +120,7 @@ func (client *PrivateEndpointConnectionsClient) createOrUpdateHandleResponse(res // Delete - Deletes the specified private endpoint connection associated with the workspace. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - privateEndpointConnectionName - The name of the private endpoint connection associated with the workspace @@ -171,7 +171,7 @@ func (client *PrivateEndpointConnectionsClient) deleteCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -180,7 +180,7 @@ func (client *PrivateEndpointConnectionsClient) deleteCreateRequest(ctx context. // Get - Gets the specified private endpoint connection associated with the workspace. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - privateEndpointConnectionName - The name of the private endpoint connection associated with the workspace @@ -232,7 +232,7 @@ func (client *PrivateEndpointConnectionsClient) getCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -249,7 +249,7 @@ func (client *PrivateEndpointConnectionsClient) getHandleResponse(resp *http.Res // NewListPager - List all the private endpoint connections associated with the workspace. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - options - PrivateEndpointConnectionsClientListOptions contains the optional parameters for the PrivateEndpointConnectionsClient.NewListPager @@ -298,7 +298,7 @@ func (client *PrivateEndpointConnectionsClient) listCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/privatelinkresources_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/privatelinkresources_client.go similarity index 98% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/privatelinkresources_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/privatelinkresources_client.go index da3f67cc6..fd91b553d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/privatelinkresources_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/privatelinkresources_client.go @@ -46,7 +46,7 @@ func NewPrivateLinkResourcesClient(subscriptionID string, credential azcore.Toke // List - Gets the private link resources that need to be created for a workspace. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - options - PrivateLinkResourcesClientListOptions contains the optional parameters for the PrivateLinkResourcesClient.List @@ -93,7 +93,7 @@ func (client *PrivateLinkResourcesClient) listCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/quotas_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/quotas_client.go similarity index 97% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/quotas_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/quotas_client.go index 8d13e85c3..a284a957e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/quotas_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/quotas_client.go @@ -45,7 +45,7 @@ func NewQuotasClient(subscriptionID string, credential azcore.TokenCredential, o // NewListPager - Gets the currently assigned Workspace Quotas based on VMFamily. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - location - The location for which resource usage is queried. // - options - QuotasClientListOptions contains the optional parameters for the QuotasClient.NewListPager method. func (client *QuotasClient) NewListPager(location string, options *QuotasClientListOptions) *runtime.Pager[QuotasClientListResponse] { @@ -87,7 +87,7 @@ func (client *QuotasClient) listCreateRequest(ctx context.Context, location stri return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -105,7 +105,7 @@ func (client *QuotasClient) listHandleResponse(resp *http.Response) (QuotasClien // Update - Update quota for each VM family in workspace. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - location - The location for update quota is queried. // - parameters - Quota update parameters. // - options - QuotasClientUpdateOptions contains the optional parameters for the QuotasClient.Update method. @@ -147,7 +147,7 @@ func (client *QuotasClient) updateCreateRequest(ctx context.Context, location st return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/registries_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/registries_client.go new file mode 100644 index 000000000..cb1375b47 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/registries_client.go @@ -0,0 +1,528 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armmachinelearning + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// RegistriesClient contains the methods for the Registries group. +// Don't use this type directly, use NewRegistriesClient() instead. +type RegistriesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewRegistriesClient creates a new instance of RegistriesClient with the specified values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewRegistriesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RegistriesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &RegistriesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Create or update registry +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of Azure Machine Learning registry. This is case-insensitive +// - body - Details required to create the registry. +// - options - RegistriesClientBeginCreateOrUpdateOptions contains the optional parameters for the RegistriesClient.BeginCreateOrUpdate +// method. +func (client *RegistriesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, registryName string, body Registry, options *RegistriesClientBeginCreateOrUpdateOptions) (*runtime.Poller[RegistriesClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, registryName, body, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RegistriesClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[RegistriesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Create or update registry +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *RegistriesClient) createOrUpdate(ctx context.Context, resourceGroupName string, registryName string, body Registry, options *RegistriesClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "RegistriesClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, registryName, body, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *RegistriesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, registryName string, body Registry, options *RegistriesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, body); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Delete registry +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of Azure Machine Learning registry. This is case-insensitive +// - options - RegistriesClientBeginDeleteOptions contains the optional parameters for the RegistriesClient.BeginDelete method. +func (client *RegistriesClient) BeginDelete(ctx context.Context, resourceGroupName string, registryName string, options *RegistriesClientBeginDeleteOptions) (*runtime.Poller[RegistriesClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, registryName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RegistriesClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[RegistriesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Delete registry +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *RegistriesClient) deleteOperation(ctx context.Context, resourceGroupName string, registryName string, options *RegistriesClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "RegistriesClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, registryName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *RegistriesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, registryName string, options *RegistriesClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get registry +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of Azure Machine Learning registry. This is case-insensitive +// - options - RegistriesClientGetOptions contains the optional parameters for the RegistriesClient.Get method. +func (client *RegistriesClient) Get(ctx context.Context, resourceGroupName string, registryName string, options *RegistriesClientGetOptions) (RegistriesClientGetResponse, error) { + var err error + const operationName = "RegistriesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, registryName, options) + if err != nil { + return RegistriesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return RegistriesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return RegistriesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *RegistriesClient) getCreateRequest(ctx context.Context, resourceGroupName string, registryName string, options *RegistriesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *RegistriesClient) getHandleResponse(resp *http.Response) (RegistriesClientGetResponse, error) { + result := RegistriesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Registry); err != nil { + return RegistriesClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - List registries +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - options - RegistriesClientListOptions contains the optional parameters for the RegistriesClient.NewListPager method. +func (client *RegistriesClient) NewListPager(resourceGroupName string, options *RegistriesClientListOptions) *runtime.Pager[RegistriesClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[RegistriesClientListResponse]{ + More: func(page RegistriesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *RegistriesClientListResponse) (RegistriesClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "RegistriesClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, options) + }, nil) + if err != nil { + return RegistriesClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *RegistriesClient) listCreateRequest(ctx context.Context, resourceGroupName string, options *RegistriesClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *RegistriesClient) listHandleResponse(resp *http.Response) (RegistriesClientListResponse, error) { + result := RegistriesClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RegistryTrackedResourceArmPaginatedResult); err != nil { + return RegistriesClientListResponse{}, err + } + return result, nil +} + +// NewListBySubscriptionPager - List registries by subscription +// +// Generated from API version 2024-04-01 +// - options - RegistriesClientListBySubscriptionOptions contains the optional parameters for the RegistriesClient.NewListBySubscriptionPager +// method. +func (client *RegistriesClient) NewListBySubscriptionPager(options *RegistriesClientListBySubscriptionOptions) *runtime.Pager[RegistriesClientListBySubscriptionResponse] { + return runtime.NewPager(runtime.PagingHandler[RegistriesClientListBySubscriptionResponse]{ + More: func(page RegistriesClientListBySubscriptionResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *RegistriesClientListBySubscriptionResponse) (RegistriesClientListBySubscriptionResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "RegistriesClient.NewListBySubscriptionPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listBySubscriptionCreateRequest(ctx, options) + }, nil) + if err != nil { + return RegistriesClientListBySubscriptionResponse{}, err + } + return client.listBySubscriptionHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listBySubscriptionCreateRequest creates the ListBySubscription request. +func (client *RegistriesClient) listBySubscriptionCreateRequest(ctx context.Context, options *RegistriesClientListBySubscriptionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/registries" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listBySubscriptionHandleResponse handles the ListBySubscription response. +func (client *RegistriesClient) listBySubscriptionHandleResponse(resp *http.Response) (RegistriesClientListBySubscriptionResponse, error) { + result := RegistriesClientListBySubscriptionResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RegistryTrackedResourceArmPaginatedResult); err != nil { + return RegistriesClientListBySubscriptionResponse{}, err + } + return result, nil +} + +// BeginRemoveRegions - Remove regions from registry +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of Azure Machine Learning registry. This is case-insensitive +// - body - Details required to create the registry. +// - options - RegistriesClientBeginRemoveRegionsOptions contains the optional parameters for the RegistriesClient.BeginRemoveRegions +// method. +func (client *RegistriesClient) BeginRemoveRegions(ctx context.Context, resourceGroupName string, registryName string, body Registry, options *RegistriesClientBeginRemoveRegionsOptions) (*runtime.Poller[RegistriesClientRemoveRegionsResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.removeRegions(ctx, resourceGroupName, registryName, body, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RegistriesClientRemoveRegionsResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[RegistriesClientRemoveRegionsResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// RemoveRegions - Remove regions from registry +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *RegistriesClient) removeRegions(ctx context.Context, resourceGroupName string, registryName string, body Registry, options *RegistriesClientBeginRemoveRegionsOptions) (*http.Response, error) { + var err error + const operationName = "RegistriesClient.BeginRemoveRegions" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.removeRegionsCreateRequest(ctx, resourceGroupName, registryName, body, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// removeRegionsCreateRequest creates the RemoveRegions request. +func (client *RegistriesClient) removeRegionsCreateRequest(ctx context.Context, resourceGroupName string, registryName string, body Registry, options *RegistriesClientBeginRemoveRegionsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/removeRegions" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, body); err != nil { + return nil, err + } + return req, nil +} + +// Update - Update tags +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of Azure Machine Learning registry. This is case-insensitive +// - body - Details required to create the registry. +// - options - RegistriesClientUpdateOptions contains the optional parameters for the RegistriesClient.Update method. +func (client *RegistriesClient) Update(ctx context.Context, resourceGroupName string, registryName string, body PartialRegistryPartialTrackedResource, options *RegistriesClientUpdateOptions) (RegistriesClientUpdateResponse, error) { + var err error + const operationName = "RegistriesClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, registryName, body, options) + if err != nil { + return RegistriesClientUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return RegistriesClientUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return RegistriesClientUpdateResponse{}, err + } + resp, err := client.updateHandleResponse(httpResp) + return resp, err +} + +// updateCreateRequest creates the Update request. +func (client *RegistriesClient) updateCreateRequest(ctx context.Context, resourceGroupName string, registryName string, body PartialRegistryPartialTrackedResource, options *RegistriesClientUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, body); err != nil { + return nil, err + } + return req, nil +} + +// updateHandleResponse handles the Update response. +func (client *RegistriesClient) updateHandleResponse(resp *http.Response) (RegistriesClientUpdateResponse, error) { + result := RegistriesClientUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Registry); err != nil { + return RegistriesClientUpdateResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/registrycodecontainers_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/registrycodecontainers_client.go new file mode 100644 index 000000000..5b78ba5ce --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/registrycodecontainers_client.go @@ -0,0 +1,350 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armmachinelearning + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// RegistryCodeContainersClient contains the methods for the RegistryCodeContainers group. +// Don't use this type directly, use NewRegistryCodeContainersClient() instead. +type RegistryCodeContainersClient struct { + internal *arm.Client + subscriptionID string +} + +// NewRegistryCodeContainersClient creates a new instance of RegistryCodeContainersClient with the specified values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewRegistryCodeContainersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RegistryCodeContainersClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &RegistryCodeContainersClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Create or update Code container. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of Azure Machine Learning registry. This is case-insensitive +// - codeName - Container name. +// - body - Container entity to create or update. +// - options - RegistryCodeContainersClientBeginCreateOrUpdateOptions contains the optional parameters for the RegistryCodeContainersClient.BeginCreateOrUpdate +// method. +func (client *RegistryCodeContainersClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, registryName string, codeName string, body CodeContainer, options *RegistryCodeContainersClientBeginCreateOrUpdateOptions) (*runtime.Poller[RegistryCodeContainersClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, registryName, codeName, body, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RegistryCodeContainersClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaOriginalURI, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[RegistryCodeContainersClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Create or update Code container. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *RegistryCodeContainersClient) createOrUpdate(ctx context.Context, resourceGroupName string, registryName string, codeName string, body CodeContainer, options *RegistryCodeContainersClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "RegistryCodeContainersClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, registryName, codeName, body, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *RegistryCodeContainersClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, registryName string, codeName string, body CodeContainer, options *RegistryCodeContainersClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if codeName == "" { + return nil, errors.New("parameter codeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{codeName}", url.PathEscape(codeName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, body); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Delete Code container. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of Azure Machine Learning registry. This is case-insensitive +// - codeName - Container name. +// - options - RegistryCodeContainersClientBeginDeleteOptions contains the optional parameters for the RegistryCodeContainersClient.BeginDelete +// method. +func (client *RegistryCodeContainersClient) BeginDelete(ctx context.Context, resourceGroupName string, registryName string, codeName string, options *RegistryCodeContainersClientBeginDeleteOptions) (*runtime.Poller[RegistryCodeContainersClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, registryName, codeName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RegistryCodeContainersClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[RegistryCodeContainersClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Delete Code container. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *RegistryCodeContainersClient) deleteOperation(ctx context.Context, resourceGroupName string, registryName string, codeName string, options *RegistryCodeContainersClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "RegistryCodeContainersClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, registryName, codeName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *RegistryCodeContainersClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, registryName string, codeName string, options *RegistryCodeContainersClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if codeName == "" { + return nil, errors.New("parameter codeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{codeName}", url.PathEscape(codeName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get Code container. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of Azure Machine Learning registry. This is case-insensitive +// - codeName - Container name. +// - options - RegistryCodeContainersClientGetOptions contains the optional parameters for the RegistryCodeContainersClient.Get +// method. +func (client *RegistryCodeContainersClient) Get(ctx context.Context, resourceGroupName string, registryName string, codeName string, options *RegistryCodeContainersClientGetOptions) (RegistryCodeContainersClientGetResponse, error) { + var err error + const operationName = "RegistryCodeContainersClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, registryName, codeName, options) + if err != nil { + return RegistryCodeContainersClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return RegistryCodeContainersClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return RegistryCodeContainersClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *RegistryCodeContainersClient) getCreateRequest(ctx context.Context, resourceGroupName string, registryName string, codeName string, options *RegistryCodeContainersClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if codeName == "" { + return nil, errors.New("parameter codeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{codeName}", url.PathEscape(codeName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *RegistryCodeContainersClient) getHandleResponse(resp *http.Response) (RegistryCodeContainersClientGetResponse, error) { + result := RegistryCodeContainersClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.CodeContainer); err != nil { + return RegistryCodeContainersClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - List containers. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of Azure Machine Learning registry. This is case-insensitive +// - options - RegistryCodeContainersClientListOptions contains the optional parameters for the RegistryCodeContainersClient.NewListPager +// method. +func (client *RegistryCodeContainersClient) NewListPager(resourceGroupName string, registryName string, options *RegistryCodeContainersClientListOptions) *runtime.Pager[RegistryCodeContainersClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[RegistryCodeContainersClientListResponse]{ + More: func(page RegistryCodeContainersClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *RegistryCodeContainersClientListResponse) (RegistryCodeContainersClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "RegistryCodeContainersClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, registryName, options) + }, nil) + if err != nil { + return RegistryCodeContainersClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *RegistryCodeContainersClient) listCreateRequest(ctx context.Context, resourceGroupName string, registryName string, options *RegistryCodeContainersClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Skip != nil { + reqQP.Set("$skip", *options.Skip) + } + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *RegistryCodeContainersClient) listHandleResponse(resp *http.Response) (RegistryCodeContainersClientListResponse, error) { + result := RegistryCodeContainersClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.CodeContainerResourceArmPaginatedResult); err != nil { + return RegistryCodeContainersClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/registrycodeversions_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/registrycodeversions_client.go new file mode 100644 index 000000000..1d37c375c --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/registrycodeversions_client.go @@ -0,0 +1,456 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armmachinelearning + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// RegistryCodeVersionsClient contains the methods for the RegistryCodeVersions group. +// Don't use this type directly, use NewRegistryCodeVersionsClient() instead. +type RegistryCodeVersionsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewRegistryCodeVersionsClient creates a new instance of RegistryCodeVersionsClient with the specified values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewRegistryCodeVersionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RegistryCodeVersionsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &RegistryCodeVersionsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrGetStartPendingUpload - Generate a storage location and credential for the client to upload a code asset to. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of Azure Machine Learning registry. This is case-insensitive +// - codeName - Pending upload name. This is case-sensitive. +// - version - Version identifier. This is case-sensitive. +// - body - Pending upload request object +// - options - RegistryCodeVersionsClientCreateOrGetStartPendingUploadOptions contains the optional parameters for the RegistryCodeVersionsClient.CreateOrGetStartPendingUpload +// method. +func (client *RegistryCodeVersionsClient) CreateOrGetStartPendingUpload(ctx context.Context, resourceGroupName string, registryName string, codeName string, version string, body PendingUploadRequestDto, options *RegistryCodeVersionsClientCreateOrGetStartPendingUploadOptions) (RegistryCodeVersionsClientCreateOrGetStartPendingUploadResponse, error) { + var err error + const operationName = "RegistryCodeVersionsClient.CreateOrGetStartPendingUpload" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrGetStartPendingUploadCreateRequest(ctx, resourceGroupName, registryName, codeName, version, body, options) + if err != nil { + return RegistryCodeVersionsClientCreateOrGetStartPendingUploadResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return RegistryCodeVersionsClientCreateOrGetStartPendingUploadResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return RegistryCodeVersionsClientCreateOrGetStartPendingUploadResponse{}, err + } + resp, err := client.createOrGetStartPendingUploadHandleResponse(httpResp) + return resp, err +} + +// createOrGetStartPendingUploadCreateRequest creates the CreateOrGetStartPendingUpload request. +func (client *RegistryCodeVersionsClient) createOrGetStartPendingUploadCreateRequest(ctx context.Context, resourceGroupName string, registryName string, codeName string, version string, body PendingUploadRequestDto, options *RegistryCodeVersionsClientCreateOrGetStartPendingUploadOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}/versions/{version}/startPendingUpload" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if codeName == "" { + return nil, errors.New("parameter codeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{codeName}", url.PathEscape(codeName)) + if version == "" { + return nil, errors.New("parameter version cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{version}", url.PathEscape(version)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, body); err != nil { + return nil, err + } + return req, nil +} + +// createOrGetStartPendingUploadHandleResponse handles the CreateOrGetStartPendingUpload response. +func (client *RegistryCodeVersionsClient) createOrGetStartPendingUploadHandleResponse(resp *http.Response) (RegistryCodeVersionsClientCreateOrGetStartPendingUploadResponse, error) { + result := RegistryCodeVersionsClientCreateOrGetStartPendingUploadResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PendingUploadResponseDto); err != nil { + return RegistryCodeVersionsClientCreateOrGetStartPendingUploadResponse{}, err + } + return result, nil +} + +// BeginCreateOrUpdate - Create or update version. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of Azure Machine Learning registry. This is case-insensitive +// - codeName - Container name. +// - version - Version identifier. +// - body - Version entity to create or update. +// - options - RegistryCodeVersionsClientBeginCreateOrUpdateOptions contains the optional parameters for the RegistryCodeVersionsClient.BeginCreateOrUpdate +// method. +func (client *RegistryCodeVersionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, registryName string, codeName string, version string, body CodeVersion, options *RegistryCodeVersionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[RegistryCodeVersionsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, registryName, codeName, version, body, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RegistryCodeVersionsClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaOriginalURI, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[RegistryCodeVersionsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Create or update version. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *RegistryCodeVersionsClient) createOrUpdate(ctx context.Context, resourceGroupName string, registryName string, codeName string, version string, body CodeVersion, options *RegistryCodeVersionsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "RegistryCodeVersionsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, registryName, codeName, version, body, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *RegistryCodeVersionsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, registryName string, codeName string, version string, body CodeVersion, options *RegistryCodeVersionsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}/versions/{version}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if codeName == "" { + return nil, errors.New("parameter codeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{codeName}", url.PathEscape(codeName)) + if version == "" { + return nil, errors.New("parameter version cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{version}", url.PathEscape(version)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, body); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Delete version. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of Azure Machine Learning registry. This is case-insensitive +// - codeName - Container name. +// - version - Version identifier. +// - options - RegistryCodeVersionsClientBeginDeleteOptions contains the optional parameters for the RegistryCodeVersionsClient.BeginDelete +// method. +func (client *RegistryCodeVersionsClient) BeginDelete(ctx context.Context, resourceGroupName string, registryName string, codeName string, version string, options *RegistryCodeVersionsClientBeginDeleteOptions) (*runtime.Poller[RegistryCodeVersionsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, registryName, codeName, version, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RegistryCodeVersionsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[RegistryCodeVersionsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Delete version. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *RegistryCodeVersionsClient) deleteOperation(ctx context.Context, resourceGroupName string, registryName string, codeName string, version string, options *RegistryCodeVersionsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "RegistryCodeVersionsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, registryName, codeName, version, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *RegistryCodeVersionsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, registryName string, codeName string, version string, options *RegistryCodeVersionsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}/versions/{version}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if codeName == "" { + return nil, errors.New("parameter codeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{codeName}", url.PathEscape(codeName)) + if version == "" { + return nil, errors.New("parameter version cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{version}", url.PathEscape(version)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get version. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of Azure Machine Learning registry. This is case-insensitive +// - codeName - Container name. +// - version - Version identifier. +// - options - RegistryCodeVersionsClientGetOptions contains the optional parameters for the RegistryCodeVersionsClient.Get +// method. +func (client *RegistryCodeVersionsClient) Get(ctx context.Context, resourceGroupName string, registryName string, codeName string, version string, options *RegistryCodeVersionsClientGetOptions) (RegistryCodeVersionsClientGetResponse, error) { + var err error + const operationName = "RegistryCodeVersionsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, registryName, codeName, version, options) + if err != nil { + return RegistryCodeVersionsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return RegistryCodeVersionsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return RegistryCodeVersionsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *RegistryCodeVersionsClient) getCreateRequest(ctx context.Context, resourceGroupName string, registryName string, codeName string, version string, options *RegistryCodeVersionsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}/versions/{version}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if codeName == "" { + return nil, errors.New("parameter codeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{codeName}", url.PathEscape(codeName)) + if version == "" { + return nil, errors.New("parameter version cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{version}", url.PathEscape(version)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *RegistryCodeVersionsClient) getHandleResponse(resp *http.Response) (RegistryCodeVersionsClientGetResponse, error) { + result := RegistryCodeVersionsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.CodeVersion); err != nil { + return RegistryCodeVersionsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - List versions. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of Azure Machine Learning registry. This is case-insensitive +// - codeName - Container name. +// - options - RegistryCodeVersionsClientListOptions contains the optional parameters for the RegistryCodeVersionsClient.NewListPager +// method. +func (client *RegistryCodeVersionsClient) NewListPager(resourceGroupName string, registryName string, codeName string, options *RegistryCodeVersionsClientListOptions) *runtime.Pager[RegistryCodeVersionsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[RegistryCodeVersionsClientListResponse]{ + More: func(page RegistryCodeVersionsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *RegistryCodeVersionsClientListResponse) (RegistryCodeVersionsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "RegistryCodeVersionsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, registryName, codeName, options) + }, nil) + if err != nil { + return RegistryCodeVersionsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *RegistryCodeVersionsClient) listCreateRequest(ctx context.Context, resourceGroupName string, registryName string, codeName string, options *RegistryCodeVersionsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}/versions" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if codeName == "" { + return nil, errors.New("parameter codeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{codeName}", url.PathEscape(codeName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.OrderBy != nil { + reqQP.Set("$orderBy", *options.OrderBy) + } + if options != nil && options.Skip != nil { + reqQP.Set("$skip", *options.Skip) + } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *RegistryCodeVersionsClient) listHandleResponse(resp *http.Response) (RegistryCodeVersionsClientListResponse, error) { + result := RegistryCodeVersionsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.CodeVersionResourceArmPaginatedResult); err != nil { + return RegistryCodeVersionsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/registrycomponentcontainers_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/registrycomponentcontainers_client.go new file mode 100644 index 000000000..f68d7e353 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/registrycomponentcontainers_client.go @@ -0,0 +1,350 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armmachinelearning + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// RegistryComponentContainersClient contains the methods for the RegistryComponentContainers group. +// Don't use this type directly, use NewRegistryComponentContainersClient() instead. +type RegistryComponentContainersClient struct { + internal *arm.Client + subscriptionID string +} + +// NewRegistryComponentContainersClient creates a new instance of RegistryComponentContainersClient with the specified values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewRegistryComponentContainersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RegistryComponentContainersClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &RegistryComponentContainersClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Create or update container. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of Azure Machine Learning registry. This is case-insensitive +// - componentName - Container name. +// - body - Container entity to create or update. +// - options - RegistryComponentContainersClientBeginCreateOrUpdateOptions contains the optional parameters for the RegistryComponentContainersClient.BeginCreateOrUpdate +// method. +func (client *RegistryComponentContainersClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, registryName string, componentName string, body ComponentContainer, options *RegistryComponentContainersClientBeginCreateOrUpdateOptions) (*runtime.Poller[RegistryComponentContainersClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, registryName, componentName, body, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RegistryComponentContainersClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaOriginalURI, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[RegistryComponentContainersClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Create or update container. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *RegistryComponentContainersClient) createOrUpdate(ctx context.Context, resourceGroupName string, registryName string, componentName string, body ComponentContainer, options *RegistryComponentContainersClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "RegistryComponentContainersClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, registryName, componentName, body, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *RegistryComponentContainersClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, registryName string, componentName string, body ComponentContainer, options *RegistryComponentContainersClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if componentName == "" { + return nil, errors.New("parameter componentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{componentName}", url.PathEscape(componentName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, body); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Delete container. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of Azure Machine Learning registry. This is case-insensitive +// - componentName - Container name. +// - options - RegistryComponentContainersClientBeginDeleteOptions contains the optional parameters for the RegistryComponentContainersClient.BeginDelete +// method. +func (client *RegistryComponentContainersClient) BeginDelete(ctx context.Context, resourceGroupName string, registryName string, componentName string, options *RegistryComponentContainersClientBeginDeleteOptions) (*runtime.Poller[RegistryComponentContainersClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, registryName, componentName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RegistryComponentContainersClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[RegistryComponentContainersClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Delete container. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *RegistryComponentContainersClient) deleteOperation(ctx context.Context, resourceGroupName string, registryName string, componentName string, options *RegistryComponentContainersClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "RegistryComponentContainersClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, registryName, componentName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *RegistryComponentContainersClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, registryName string, componentName string, options *RegistryComponentContainersClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if componentName == "" { + return nil, errors.New("parameter componentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{componentName}", url.PathEscape(componentName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get container. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of Azure Machine Learning registry. This is case-insensitive +// - componentName - Container name. +// - options - RegistryComponentContainersClientGetOptions contains the optional parameters for the RegistryComponentContainersClient.Get +// method. +func (client *RegistryComponentContainersClient) Get(ctx context.Context, resourceGroupName string, registryName string, componentName string, options *RegistryComponentContainersClientGetOptions) (RegistryComponentContainersClientGetResponse, error) { + var err error + const operationName = "RegistryComponentContainersClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, registryName, componentName, options) + if err != nil { + return RegistryComponentContainersClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return RegistryComponentContainersClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return RegistryComponentContainersClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *RegistryComponentContainersClient) getCreateRequest(ctx context.Context, resourceGroupName string, registryName string, componentName string, options *RegistryComponentContainersClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if componentName == "" { + return nil, errors.New("parameter componentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{componentName}", url.PathEscape(componentName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *RegistryComponentContainersClient) getHandleResponse(resp *http.Response) (RegistryComponentContainersClientGetResponse, error) { + result := RegistryComponentContainersClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ComponentContainer); err != nil { + return RegistryComponentContainersClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - List containers. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of Azure Machine Learning registry. This is case-insensitive +// - options - RegistryComponentContainersClientListOptions contains the optional parameters for the RegistryComponentContainersClient.NewListPager +// method. +func (client *RegistryComponentContainersClient) NewListPager(resourceGroupName string, registryName string, options *RegistryComponentContainersClientListOptions) *runtime.Pager[RegistryComponentContainersClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[RegistryComponentContainersClientListResponse]{ + More: func(page RegistryComponentContainersClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *RegistryComponentContainersClientListResponse) (RegistryComponentContainersClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "RegistryComponentContainersClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, registryName, options) + }, nil) + if err != nil { + return RegistryComponentContainersClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *RegistryComponentContainersClient) listCreateRequest(ctx context.Context, resourceGroupName string, registryName string, options *RegistryComponentContainersClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Skip != nil { + reqQP.Set("$skip", *options.Skip) + } + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *RegistryComponentContainersClient) listHandleResponse(resp *http.Response) (RegistryComponentContainersClientListResponse, error) { + result := RegistryComponentContainersClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ComponentContainerResourceArmPaginatedResult); err != nil { + return RegistryComponentContainersClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/registrycomponentversions_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/registrycomponentversions_client.go new file mode 100644 index 000000000..02bbd3ea3 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/registrycomponentversions_client.go @@ -0,0 +1,377 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armmachinelearning + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// RegistryComponentVersionsClient contains the methods for the RegistryComponentVersions group. +// Don't use this type directly, use NewRegistryComponentVersionsClient() instead. +type RegistryComponentVersionsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewRegistryComponentVersionsClient creates a new instance of RegistryComponentVersionsClient with the specified values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewRegistryComponentVersionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RegistryComponentVersionsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &RegistryComponentVersionsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Create or update version. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of Azure Machine Learning registry. This is case-insensitive +// - componentName - Container name. +// - version - Version identifier. +// - body - Version entity to create or update. +// - options - RegistryComponentVersionsClientBeginCreateOrUpdateOptions contains the optional parameters for the RegistryComponentVersionsClient.BeginCreateOrUpdate +// method. +func (client *RegistryComponentVersionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, registryName string, componentName string, version string, body ComponentVersion, options *RegistryComponentVersionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[RegistryComponentVersionsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, registryName, componentName, version, body, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RegistryComponentVersionsClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaOriginalURI, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[RegistryComponentVersionsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Create or update version. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *RegistryComponentVersionsClient) createOrUpdate(ctx context.Context, resourceGroupName string, registryName string, componentName string, version string, body ComponentVersion, options *RegistryComponentVersionsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "RegistryComponentVersionsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, registryName, componentName, version, body, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *RegistryComponentVersionsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, registryName string, componentName string, version string, body ComponentVersion, options *RegistryComponentVersionsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}/versions/{version}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if componentName == "" { + return nil, errors.New("parameter componentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{componentName}", url.PathEscape(componentName)) + if version == "" { + return nil, errors.New("parameter version cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{version}", url.PathEscape(version)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, body); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Delete version. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of Azure Machine Learning registry. This is case-insensitive +// - componentName - Container name. +// - version - Version identifier. +// - options - RegistryComponentVersionsClientBeginDeleteOptions contains the optional parameters for the RegistryComponentVersionsClient.BeginDelete +// method. +func (client *RegistryComponentVersionsClient) BeginDelete(ctx context.Context, resourceGroupName string, registryName string, componentName string, version string, options *RegistryComponentVersionsClientBeginDeleteOptions) (*runtime.Poller[RegistryComponentVersionsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, registryName, componentName, version, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RegistryComponentVersionsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[RegistryComponentVersionsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Delete version. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *RegistryComponentVersionsClient) deleteOperation(ctx context.Context, resourceGroupName string, registryName string, componentName string, version string, options *RegistryComponentVersionsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "RegistryComponentVersionsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, registryName, componentName, version, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *RegistryComponentVersionsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, registryName string, componentName string, version string, options *RegistryComponentVersionsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}/versions/{version}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if componentName == "" { + return nil, errors.New("parameter componentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{componentName}", url.PathEscape(componentName)) + if version == "" { + return nil, errors.New("parameter version cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{version}", url.PathEscape(version)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get version. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of Azure Machine Learning registry. This is case-insensitive +// - componentName - Container name. +// - version - Version identifier. +// - options - RegistryComponentVersionsClientGetOptions contains the optional parameters for the RegistryComponentVersionsClient.Get +// method. +func (client *RegistryComponentVersionsClient) Get(ctx context.Context, resourceGroupName string, registryName string, componentName string, version string, options *RegistryComponentVersionsClientGetOptions) (RegistryComponentVersionsClientGetResponse, error) { + var err error + const operationName = "RegistryComponentVersionsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, registryName, componentName, version, options) + if err != nil { + return RegistryComponentVersionsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return RegistryComponentVersionsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return RegistryComponentVersionsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *RegistryComponentVersionsClient) getCreateRequest(ctx context.Context, resourceGroupName string, registryName string, componentName string, version string, options *RegistryComponentVersionsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}/versions/{version}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if componentName == "" { + return nil, errors.New("parameter componentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{componentName}", url.PathEscape(componentName)) + if version == "" { + return nil, errors.New("parameter version cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{version}", url.PathEscape(version)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *RegistryComponentVersionsClient) getHandleResponse(resp *http.Response) (RegistryComponentVersionsClientGetResponse, error) { + result := RegistryComponentVersionsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ComponentVersion); err != nil { + return RegistryComponentVersionsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - List versions. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of Azure Machine Learning registry. This is case-insensitive +// - componentName - Container name. +// - options - RegistryComponentVersionsClientListOptions contains the optional parameters for the RegistryComponentVersionsClient.NewListPager +// method. +func (client *RegistryComponentVersionsClient) NewListPager(resourceGroupName string, registryName string, componentName string, options *RegistryComponentVersionsClientListOptions) *runtime.Pager[RegistryComponentVersionsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[RegistryComponentVersionsClientListResponse]{ + More: func(page RegistryComponentVersionsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *RegistryComponentVersionsClientListResponse) (RegistryComponentVersionsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "RegistryComponentVersionsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, registryName, componentName, options) + }, nil) + if err != nil { + return RegistryComponentVersionsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *RegistryComponentVersionsClient) listCreateRequest(ctx context.Context, resourceGroupName string, registryName string, componentName string, options *RegistryComponentVersionsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}/versions" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if componentName == "" { + return nil, errors.New("parameter componentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{componentName}", url.PathEscape(componentName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.OrderBy != nil { + reqQP.Set("$orderBy", *options.OrderBy) + } + if options != nil && options.Skip != nil { + reqQP.Set("$skip", *options.Skip) + } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *RegistryComponentVersionsClient) listHandleResponse(resp *http.Response) (RegistryComponentVersionsClientListResponse, error) { + result := RegistryComponentVersionsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ComponentVersionResourceArmPaginatedResult); err != nil { + return RegistryComponentVersionsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/registrydatacontainers_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/registrydatacontainers_client.go new file mode 100644 index 000000000..44fb7db28 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/registrydatacontainers_client.go @@ -0,0 +1,353 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armmachinelearning + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// RegistryDataContainersClient contains the methods for the RegistryDataContainers group. +// Don't use this type directly, use NewRegistryDataContainersClient() instead. +type RegistryDataContainersClient struct { + internal *arm.Client + subscriptionID string +} + +// NewRegistryDataContainersClient creates a new instance of RegistryDataContainersClient with the specified values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewRegistryDataContainersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RegistryDataContainersClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &RegistryDataContainersClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Create or update container. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of Azure Machine Learning registry. This is case-insensitive +// - name - Container name. +// - body - Container entity to create or update. +// - options - RegistryDataContainersClientBeginCreateOrUpdateOptions contains the optional parameters for the RegistryDataContainersClient.BeginCreateOrUpdate +// method. +func (client *RegistryDataContainersClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, registryName string, name string, body DataContainer, options *RegistryDataContainersClientBeginCreateOrUpdateOptions) (*runtime.Poller[RegistryDataContainersClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, registryName, name, body, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RegistryDataContainersClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaOriginalURI, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[RegistryDataContainersClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Create or update container. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *RegistryDataContainersClient) createOrUpdate(ctx context.Context, resourceGroupName string, registryName string, name string, body DataContainer, options *RegistryDataContainersClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "RegistryDataContainersClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, registryName, name, body, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *RegistryDataContainersClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, registryName string, name string, body DataContainer, options *RegistryDataContainersClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, body); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Delete container. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of Azure Machine Learning registry. This is case-insensitive +// - name - Container name. +// - options - RegistryDataContainersClientBeginDeleteOptions contains the optional parameters for the RegistryDataContainersClient.BeginDelete +// method. +func (client *RegistryDataContainersClient) BeginDelete(ctx context.Context, resourceGroupName string, registryName string, name string, options *RegistryDataContainersClientBeginDeleteOptions) (*runtime.Poller[RegistryDataContainersClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, registryName, name, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RegistryDataContainersClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[RegistryDataContainersClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Delete container. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *RegistryDataContainersClient) deleteOperation(ctx context.Context, resourceGroupName string, registryName string, name string, options *RegistryDataContainersClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "RegistryDataContainersClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, registryName, name, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *RegistryDataContainersClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, registryName string, name string, options *RegistryDataContainersClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get container. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of Azure Machine Learning registry. This is case-insensitive +// - name - Container name. +// - options - RegistryDataContainersClientGetOptions contains the optional parameters for the RegistryDataContainersClient.Get +// method. +func (client *RegistryDataContainersClient) Get(ctx context.Context, resourceGroupName string, registryName string, name string, options *RegistryDataContainersClientGetOptions) (RegistryDataContainersClientGetResponse, error) { + var err error + const operationName = "RegistryDataContainersClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, registryName, name, options) + if err != nil { + return RegistryDataContainersClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return RegistryDataContainersClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return RegistryDataContainersClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *RegistryDataContainersClient) getCreateRequest(ctx context.Context, resourceGroupName string, registryName string, name string, options *RegistryDataContainersClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *RegistryDataContainersClient) getHandleResponse(resp *http.Response) (RegistryDataContainersClientGetResponse, error) { + result := RegistryDataContainersClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DataContainer); err != nil { + return RegistryDataContainersClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - List Data containers. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of Azure Machine Learning registry. This is case-insensitive +// - options - RegistryDataContainersClientListOptions contains the optional parameters for the RegistryDataContainersClient.NewListPager +// method. +func (client *RegistryDataContainersClient) NewListPager(resourceGroupName string, registryName string, options *RegistryDataContainersClientListOptions) *runtime.Pager[RegistryDataContainersClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[RegistryDataContainersClientListResponse]{ + More: func(page RegistryDataContainersClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *RegistryDataContainersClientListResponse) (RegistryDataContainersClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "RegistryDataContainersClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, registryName, options) + }, nil) + if err != nil { + return RegistryDataContainersClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *RegistryDataContainersClient) listCreateRequest(ctx context.Context, resourceGroupName string, registryName string, options *RegistryDataContainersClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Skip != nil { + reqQP.Set("$skip", *options.Skip) + } + reqQP.Set("api-version", "2024-04-01") + if options != nil && options.ListViewType != nil { + reqQP.Set("listViewType", string(*options.ListViewType)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *RegistryDataContainersClient) listHandleResponse(resp *http.Response) (RegistryDataContainersClientListResponse, error) { + result := RegistryDataContainersClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DataContainerResourceArmPaginatedResult); err != nil { + return RegistryDataContainersClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/registrydatareferences_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/registrydatareferences_client.go new file mode 100644 index 000000000..c12870223 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/registrydatareferences_client.go @@ -0,0 +1,123 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armmachinelearning + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// RegistryDataReferencesClient contains the methods for the RegistryDataReferences group. +// Don't use this type directly, use NewRegistryDataReferencesClient() instead. +type RegistryDataReferencesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewRegistryDataReferencesClient creates a new instance of RegistryDataReferencesClient with the specified values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewRegistryDataReferencesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RegistryDataReferencesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &RegistryDataReferencesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// GetBlobReferenceSAS - Get blob reference SAS Uri. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of Azure Machine Learning registry. This is case-insensitive +// - name - Data reference name. +// - version - Version identifier. +// - body - Asset id and blob uri. +// - options - RegistryDataReferencesClientGetBlobReferenceSASOptions contains the optional parameters for the RegistryDataReferencesClient.GetBlobReferenceSAS +// method. +func (client *RegistryDataReferencesClient) GetBlobReferenceSAS(ctx context.Context, resourceGroupName string, registryName string, name string, version string, body GetBlobReferenceSASRequestDto, options *RegistryDataReferencesClientGetBlobReferenceSASOptions) (RegistryDataReferencesClientGetBlobReferenceSASResponse, error) { + var err error + const operationName = "RegistryDataReferencesClient.GetBlobReferenceSAS" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getBlobReferenceSASCreateRequest(ctx, resourceGroupName, registryName, name, version, body, options) + if err != nil { + return RegistryDataReferencesClientGetBlobReferenceSASResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return RegistryDataReferencesClientGetBlobReferenceSASResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return RegistryDataReferencesClientGetBlobReferenceSASResponse{}, err + } + resp, err := client.getBlobReferenceSASHandleResponse(httpResp) + return resp, err +} + +// getBlobReferenceSASCreateRequest creates the GetBlobReferenceSAS request. +func (client *RegistryDataReferencesClient) getBlobReferenceSASCreateRequest(ctx context.Context, resourceGroupName string, registryName string, name string, version string, body GetBlobReferenceSASRequestDto, options *RegistryDataReferencesClientGetBlobReferenceSASOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/datareferences/{name}/versions/{version}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if version == "" { + return nil, errors.New("parameter version cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{version}", url.PathEscape(version)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, body); err != nil { + return nil, err + } + return req, nil +} + +// getBlobReferenceSASHandleResponse handles the GetBlobReferenceSAS response. +func (client *RegistryDataReferencesClient) getBlobReferenceSASHandleResponse(resp *http.Response) (RegistryDataReferencesClientGetBlobReferenceSASResponse, error) { + result := RegistryDataReferencesClientGetBlobReferenceSASResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.GetBlobReferenceSASResponseDto); err != nil { + return RegistryDataReferencesClientGetBlobReferenceSASResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/registrydataversions_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/registrydataversions_client.go new file mode 100644 index 000000000..af568306d --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/registrydataversions_client.go @@ -0,0 +1,462 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armmachinelearning + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// RegistryDataVersionsClient contains the methods for the RegistryDataVersions group. +// Don't use this type directly, use NewRegistryDataVersionsClient() instead. +type RegistryDataVersionsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewRegistryDataVersionsClient creates a new instance of RegistryDataVersionsClient with the specified values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewRegistryDataVersionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RegistryDataVersionsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &RegistryDataVersionsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrGetStartPendingUpload - Generate a storage location and credential for the client to upload a data asset to. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of Azure Machine Learning registry. This is case-insensitive +// - name - Data asset name. This is case-sensitive. +// - version - Version identifier. This is case-sensitive. +// - body - Pending upload request object +// - options - RegistryDataVersionsClientCreateOrGetStartPendingUploadOptions contains the optional parameters for the RegistryDataVersionsClient.CreateOrGetStartPendingUpload +// method. +func (client *RegistryDataVersionsClient) CreateOrGetStartPendingUpload(ctx context.Context, resourceGroupName string, registryName string, name string, version string, body PendingUploadRequestDto, options *RegistryDataVersionsClientCreateOrGetStartPendingUploadOptions) (RegistryDataVersionsClientCreateOrGetStartPendingUploadResponse, error) { + var err error + const operationName = "RegistryDataVersionsClient.CreateOrGetStartPendingUpload" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrGetStartPendingUploadCreateRequest(ctx, resourceGroupName, registryName, name, version, body, options) + if err != nil { + return RegistryDataVersionsClientCreateOrGetStartPendingUploadResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return RegistryDataVersionsClientCreateOrGetStartPendingUploadResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return RegistryDataVersionsClientCreateOrGetStartPendingUploadResponse{}, err + } + resp, err := client.createOrGetStartPendingUploadHandleResponse(httpResp) + return resp, err +} + +// createOrGetStartPendingUploadCreateRequest creates the CreateOrGetStartPendingUpload request. +func (client *RegistryDataVersionsClient) createOrGetStartPendingUploadCreateRequest(ctx context.Context, resourceGroupName string, registryName string, name string, version string, body PendingUploadRequestDto, options *RegistryDataVersionsClientCreateOrGetStartPendingUploadOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}/versions/{version}/startPendingUpload" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if version == "" { + return nil, errors.New("parameter version cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{version}", url.PathEscape(version)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, body); err != nil { + return nil, err + } + return req, nil +} + +// createOrGetStartPendingUploadHandleResponse handles the CreateOrGetStartPendingUpload response. +func (client *RegistryDataVersionsClient) createOrGetStartPendingUploadHandleResponse(resp *http.Response) (RegistryDataVersionsClientCreateOrGetStartPendingUploadResponse, error) { + result := RegistryDataVersionsClientCreateOrGetStartPendingUploadResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PendingUploadResponseDto); err != nil { + return RegistryDataVersionsClientCreateOrGetStartPendingUploadResponse{}, err + } + return result, nil +} + +// BeginCreateOrUpdate - Create or update version. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of Azure Machine Learning registry. This is case-insensitive +// - name - Container name. +// - version - Version identifier. +// - body - Version entity to create or update. +// - options - RegistryDataVersionsClientBeginCreateOrUpdateOptions contains the optional parameters for the RegistryDataVersionsClient.BeginCreateOrUpdate +// method. +func (client *RegistryDataVersionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, registryName string, name string, version string, body DataVersionBase, options *RegistryDataVersionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[RegistryDataVersionsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, registryName, name, version, body, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RegistryDataVersionsClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaOriginalURI, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[RegistryDataVersionsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Create or update version. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *RegistryDataVersionsClient) createOrUpdate(ctx context.Context, resourceGroupName string, registryName string, name string, version string, body DataVersionBase, options *RegistryDataVersionsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "RegistryDataVersionsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, registryName, name, version, body, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *RegistryDataVersionsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, registryName string, name string, version string, body DataVersionBase, options *RegistryDataVersionsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}/versions/{version}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if version == "" { + return nil, errors.New("parameter version cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{version}", url.PathEscape(version)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, body); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Delete version. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of Azure Machine Learning registry. This is case-insensitive +// - name - Container name. +// - version - Version identifier. +// - options - RegistryDataVersionsClientBeginDeleteOptions contains the optional parameters for the RegistryDataVersionsClient.BeginDelete +// method. +func (client *RegistryDataVersionsClient) BeginDelete(ctx context.Context, resourceGroupName string, registryName string, name string, version string, options *RegistryDataVersionsClientBeginDeleteOptions) (*runtime.Poller[RegistryDataVersionsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, registryName, name, version, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RegistryDataVersionsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[RegistryDataVersionsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Delete version. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *RegistryDataVersionsClient) deleteOperation(ctx context.Context, resourceGroupName string, registryName string, name string, version string, options *RegistryDataVersionsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "RegistryDataVersionsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, registryName, name, version, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *RegistryDataVersionsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, registryName string, name string, version string, options *RegistryDataVersionsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}/versions/{version}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if version == "" { + return nil, errors.New("parameter version cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{version}", url.PathEscape(version)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get version. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of Azure Machine Learning registry. This is case-insensitive +// - name - Container name. +// - version - Version identifier. +// - options - RegistryDataVersionsClientGetOptions contains the optional parameters for the RegistryDataVersionsClient.Get +// method. +func (client *RegistryDataVersionsClient) Get(ctx context.Context, resourceGroupName string, registryName string, name string, version string, options *RegistryDataVersionsClientGetOptions) (RegistryDataVersionsClientGetResponse, error) { + var err error + const operationName = "RegistryDataVersionsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, registryName, name, version, options) + if err != nil { + return RegistryDataVersionsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return RegistryDataVersionsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return RegistryDataVersionsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *RegistryDataVersionsClient) getCreateRequest(ctx context.Context, resourceGroupName string, registryName string, name string, version string, options *RegistryDataVersionsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}/versions/{version}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if version == "" { + return nil, errors.New("parameter version cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{version}", url.PathEscape(version)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *RegistryDataVersionsClient) getHandleResponse(resp *http.Response) (RegistryDataVersionsClientGetResponse, error) { + result := RegistryDataVersionsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DataVersionBase); err != nil { + return RegistryDataVersionsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - List data versions in the data container +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of Azure Machine Learning registry. This is case-insensitive +// - name - Data container's name +// - options - RegistryDataVersionsClientListOptions contains the optional parameters for the RegistryDataVersionsClient.NewListPager +// method. +func (client *RegistryDataVersionsClient) NewListPager(resourceGroupName string, registryName string, name string, options *RegistryDataVersionsClientListOptions) *runtime.Pager[RegistryDataVersionsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[RegistryDataVersionsClientListResponse]{ + More: func(page RegistryDataVersionsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *RegistryDataVersionsClientListResponse) (RegistryDataVersionsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "RegistryDataVersionsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, registryName, name, options) + }, nil) + if err != nil { + return RegistryDataVersionsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *RegistryDataVersionsClient) listCreateRequest(ctx context.Context, resourceGroupName string, registryName string, name string, options *RegistryDataVersionsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}/versions" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.OrderBy != nil { + reqQP.Set("$orderBy", *options.OrderBy) + } + if options != nil && options.Skip != nil { + reqQP.Set("$skip", *options.Skip) + } + if options != nil && options.Tags != nil { + reqQP.Set("$tags", *options.Tags) + } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-04-01") + if options != nil && options.ListViewType != nil { + reqQP.Set("listViewType", string(*options.ListViewType)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *RegistryDataVersionsClient) listHandleResponse(resp *http.Response) (RegistryDataVersionsClientListResponse, error) { + result := RegistryDataVersionsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DataVersionBaseResourceArmPaginatedResult); err != nil { + return RegistryDataVersionsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/registryenvironmentcontainers_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/registryenvironmentcontainers_client.go new file mode 100644 index 000000000..1f47134ce --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/registryenvironmentcontainers_client.go @@ -0,0 +1,353 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armmachinelearning + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// RegistryEnvironmentContainersClient contains the methods for the RegistryEnvironmentContainers group. +// Don't use this type directly, use NewRegistryEnvironmentContainersClient() instead. +type RegistryEnvironmentContainersClient struct { + internal *arm.Client + subscriptionID string +} + +// NewRegistryEnvironmentContainersClient creates a new instance of RegistryEnvironmentContainersClient with the specified values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewRegistryEnvironmentContainersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RegistryEnvironmentContainersClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &RegistryEnvironmentContainersClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Create or update container. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of Azure Machine Learning registry. This is case-insensitive +// - environmentName - Container name. +// - body - Container entity to create or update. +// - options - RegistryEnvironmentContainersClientBeginCreateOrUpdateOptions contains the optional parameters for the RegistryEnvironmentContainersClient.BeginCreateOrUpdate +// method. +func (client *RegistryEnvironmentContainersClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, registryName string, environmentName string, body EnvironmentContainer, options *RegistryEnvironmentContainersClientBeginCreateOrUpdateOptions) (*runtime.Poller[RegistryEnvironmentContainersClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, registryName, environmentName, body, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RegistryEnvironmentContainersClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaOriginalURI, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[RegistryEnvironmentContainersClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Create or update container. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *RegistryEnvironmentContainersClient) createOrUpdate(ctx context.Context, resourceGroupName string, registryName string, environmentName string, body EnvironmentContainer, options *RegistryEnvironmentContainersClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "RegistryEnvironmentContainersClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, registryName, environmentName, body, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *RegistryEnvironmentContainersClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, registryName string, environmentName string, body EnvironmentContainer, options *RegistryEnvironmentContainersClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if environmentName == "" { + return nil, errors.New("parameter environmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, body); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Delete container. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of Azure Machine Learning registry. This is case-insensitive +// - environmentName - Container name. +// - options - RegistryEnvironmentContainersClientBeginDeleteOptions contains the optional parameters for the RegistryEnvironmentContainersClient.BeginDelete +// method. +func (client *RegistryEnvironmentContainersClient) BeginDelete(ctx context.Context, resourceGroupName string, registryName string, environmentName string, options *RegistryEnvironmentContainersClientBeginDeleteOptions) (*runtime.Poller[RegistryEnvironmentContainersClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, registryName, environmentName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RegistryEnvironmentContainersClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[RegistryEnvironmentContainersClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Delete container. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *RegistryEnvironmentContainersClient) deleteOperation(ctx context.Context, resourceGroupName string, registryName string, environmentName string, options *RegistryEnvironmentContainersClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "RegistryEnvironmentContainersClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, registryName, environmentName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *RegistryEnvironmentContainersClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, registryName string, environmentName string, options *RegistryEnvironmentContainersClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if environmentName == "" { + return nil, errors.New("parameter environmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get container. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of Azure Machine Learning registry. This is case-insensitive +// - environmentName - Container name. This is case-sensitive. +// - options - RegistryEnvironmentContainersClientGetOptions contains the optional parameters for the RegistryEnvironmentContainersClient.Get +// method. +func (client *RegistryEnvironmentContainersClient) Get(ctx context.Context, resourceGroupName string, registryName string, environmentName string, options *RegistryEnvironmentContainersClientGetOptions) (RegistryEnvironmentContainersClientGetResponse, error) { + var err error + const operationName = "RegistryEnvironmentContainersClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, registryName, environmentName, options) + if err != nil { + return RegistryEnvironmentContainersClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return RegistryEnvironmentContainersClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return RegistryEnvironmentContainersClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *RegistryEnvironmentContainersClient) getCreateRequest(ctx context.Context, resourceGroupName string, registryName string, environmentName string, options *RegistryEnvironmentContainersClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if environmentName == "" { + return nil, errors.New("parameter environmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *RegistryEnvironmentContainersClient) getHandleResponse(resp *http.Response) (RegistryEnvironmentContainersClientGetResponse, error) { + result := RegistryEnvironmentContainersClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.EnvironmentContainer); err != nil { + return RegistryEnvironmentContainersClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - List environment containers. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of Azure Machine Learning registry. This is case-insensitive +// - options - RegistryEnvironmentContainersClientListOptions contains the optional parameters for the RegistryEnvironmentContainersClient.NewListPager +// method. +func (client *RegistryEnvironmentContainersClient) NewListPager(resourceGroupName string, registryName string, options *RegistryEnvironmentContainersClientListOptions) *runtime.Pager[RegistryEnvironmentContainersClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[RegistryEnvironmentContainersClientListResponse]{ + More: func(page RegistryEnvironmentContainersClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *RegistryEnvironmentContainersClientListResponse) (RegistryEnvironmentContainersClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "RegistryEnvironmentContainersClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, registryName, options) + }, nil) + if err != nil { + return RegistryEnvironmentContainersClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *RegistryEnvironmentContainersClient) listCreateRequest(ctx context.Context, resourceGroupName string, registryName string, options *RegistryEnvironmentContainersClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Skip != nil { + reqQP.Set("$skip", *options.Skip) + } + reqQP.Set("api-version", "2024-04-01") + if options != nil && options.ListViewType != nil { + reqQP.Set("listViewType", string(*options.ListViewType)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *RegistryEnvironmentContainersClient) listHandleResponse(resp *http.Response) (RegistryEnvironmentContainersClientListResponse, error) { + result := RegistryEnvironmentContainersClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.EnvironmentContainerResourceArmPaginatedResult); err != nil { + return RegistryEnvironmentContainersClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/registryenvironmentversions_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/registryenvironmentversions_client.go new file mode 100644 index 000000000..0ec51b39e --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/registryenvironmentversions_client.go @@ -0,0 +1,380 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armmachinelearning + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// RegistryEnvironmentVersionsClient contains the methods for the RegistryEnvironmentVersions group. +// Don't use this type directly, use NewRegistryEnvironmentVersionsClient() instead. +type RegistryEnvironmentVersionsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewRegistryEnvironmentVersionsClient creates a new instance of RegistryEnvironmentVersionsClient with the specified values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewRegistryEnvironmentVersionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RegistryEnvironmentVersionsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &RegistryEnvironmentVersionsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Create or update version. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of Azure Machine Learning registry. This is case-insensitive +// - environmentName - Container name. +// - version - Version identifier. +// - body - Version entity to create or update. +// - options - RegistryEnvironmentVersionsClientBeginCreateOrUpdateOptions contains the optional parameters for the RegistryEnvironmentVersionsClient.BeginCreateOrUpdate +// method. +func (client *RegistryEnvironmentVersionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, registryName string, environmentName string, version string, body EnvironmentVersion, options *RegistryEnvironmentVersionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[RegistryEnvironmentVersionsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, registryName, environmentName, version, body, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RegistryEnvironmentVersionsClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaOriginalURI, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[RegistryEnvironmentVersionsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Create or update version. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *RegistryEnvironmentVersionsClient) createOrUpdate(ctx context.Context, resourceGroupName string, registryName string, environmentName string, version string, body EnvironmentVersion, options *RegistryEnvironmentVersionsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "RegistryEnvironmentVersionsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, registryName, environmentName, version, body, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *RegistryEnvironmentVersionsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, registryName string, environmentName string, version string, body EnvironmentVersion, options *RegistryEnvironmentVersionsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}/versions/{version}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if environmentName == "" { + return nil, errors.New("parameter environmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) + if version == "" { + return nil, errors.New("parameter version cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{version}", url.PathEscape(version)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, body); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Delete version. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of Azure Machine Learning registry. This is case-insensitive +// - environmentName - Container name. +// - version - Version identifier. +// - options - RegistryEnvironmentVersionsClientBeginDeleteOptions contains the optional parameters for the RegistryEnvironmentVersionsClient.BeginDelete +// method. +func (client *RegistryEnvironmentVersionsClient) BeginDelete(ctx context.Context, resourceGroupName string, registryName string, environmentName string, version string, options *RegistryEnvironmentVersionsClientBeginDeleteOptions) (*runtime.Poller[RegistryEnvironmentVersionsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, registryName, environmentName, version, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RegistryEnvironmentVersionsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[RegistryEnvironmentVersionsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Delete version. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *RegistryEnvironmentVersionsClient) deleteOperation(ctx context.Context, resourceGroupName string, registryName string, environmentName string, version string, options *RegistryEnvironmentVersionsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "RegistryEnvironmentVersionsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, registryName, environmentName, version, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *RegistryEnvironmentVersionsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, registryName string, environmentName string, version string, options *RegistryEnvironmentVersionsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}/versions/{version}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if environmentName == "" { + return nil, errors.New("parameter environmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) + if version == "" { + return nil, errors.New("parameter version cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{version}", url.PathEscape(version)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get version. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of Azure Machine Learning registry. This is case-insensitive +// - environmentName - Container name. This is case-sensitive. +// - version - Version identifier. This is case-sensitive. +// - options - RegistryEnvironmentVersionsClientGetOptions contains the optional parameters for the RegistryEnvironmentVersionsClient.Get +// method. +func (client *RegistryEnvironmentVersionsClient) Get(ctx context.Context, resourceGroupName string, registryName string, environmentName string, version string, options *RegistryEnvironmentVersionsClientGetOptions) (RegistryEnvironmentVersionsClientGetResponse, error) { + var err error + const operationName = "RegistryEnvironmentVersionsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, registryName, environmentName, version, options) + if err != nil { + return RegistryEnvironmentVersionsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return RegistryEnvironmentVersionsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return RegistryEnvironmentVersionsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *RegistryEnvironmentVersionsClient) getCreateRequest(ctx context.Context, resourceGroupName string, registryName string, environmentName string, version string, options *RegistryEnvironmentVersionsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}/versions/{version}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if environmentName == "" { + return nil, errors.New("parameter environmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) + if version == "" { + return nil, errors.New("parameter version cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{version}", url.PathEscape(version)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *RegistryEnvironmentVersionsClient) getHandleResponse(resp *http.Response) (RegistryEnvironmentVersionsClientGetResponse, error) { + result := RegistryEnvironmentVersionsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.EnvironmentVersion); err != nil { + return RegistryEnvironmentVersionsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - List versions. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of Azure Machine Learning registry. This is case-insensitive +// - environmentName - Container name. This is case-sensitive. +// - options - RegistryEnvironmentVersionsClientListOptions contains the optional parameters for the RegistryEnvironmentVersionsClient.NewListPager +// method. +func (client *RegistryEnvironmentVersionsClient) NewListPager(resourceGroupName string, registryName string, environmentName string, options *RegistryEnvironmentVersionsClientListOptions) *runtime.Pager[RegistryEnvironmentVersionsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[RegistryEnvironmentVersionsClientListResponse]{ + More: func(page RegistryEnvironmentVersionsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *RegistryEnvironmentVersionsClientListResponse) (RegistryEnvironmentVersionsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "RegistryEnvironmentVersionsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, registryName, environmentName, options) + }, nil) + if err != nil { + return RegistryEnvironmentVersionsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *RegistryEnvironmentVersionsClient) listCreateRequest(ctx context.Context, resourceGroupName string, registryName string, environmentName string, options *RegistryEnvironmentVersionsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}/versions" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if environmentName == "" { + return nil, errors.New("parameter environmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.OrderBy != nil { + reqQP.Set("$orderBy", *options.OrderBy) + } + if options != nil && options.Skip != nil { + reqQP.Set("$skip", *options.Skip) + } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-04-01") + if options != nil && options.ListViewType != nil { + reqQP.Set("listViewType", string(*options.ListViewType)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *RegistryEnvironmentVersionsClient) listHandleResponse(resp *http.Response) (RegistryEnvironmentVersionsClientListResponse, error) { + result := RegistryEnvironmentVersionsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.EnvironmentVersionResourceArmPaginatedResult); err != nil { + return RegistryEnvironmentVersionsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/registrymodelcontainers_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/registrymodelcontainers_client.go new file mode 100644 index 000000000..7bf846e03 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/registrymodelcontainers_client.go @@ -0,0 +1,353 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armmachinelearning + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// RegistryModelContainersClient contains the methods for the RegistryModelContainers group. +// Don't use this type directly, use NewRegistryModelContainersClient() instead. +type RegistryModelContainersClient struct { + internal *arm.Client + subscriptionID string +} + +// NewRegistryModelContainersClient creates a new instance of RegistryModelContainersClient with the specified values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewRegistryModelContainersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RegistryModelContainersClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &RegistryModelContainersClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Create or update model container. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of Azure Machine Learning registry. This is case-insensitive +// - modelName - Container name. +// - body - Container entity to create or update. +// - options - RegistryModelContainersClientBeginCreateOrUpdateOptions contains the optional parameters for the RegistryModelContainersClient.BeginCreateOrUpdate +// method. +func (client *RegistryModelContainersClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, registryName string, modelName string, body ModelContainer, options *RegistryModelContainersClientBeginCreateOrUpdateOptions) (*runtime.Poller[RegistryModelContainersClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, registryName, modelName, body, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RegistryModelContainersClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaOriginalURI, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[RegistryModelContainersClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Create or update model container. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *RegistryModelContainersClient) createOrUpdate(ctx context.Context, resourceGroupName string, registryName string, modelName string, body ModelContainer, options *RegistryModelContainersClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "RegistryModelContainersClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, registryName, modelName, body, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *RegistryModelContainersClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, registryName string, modelName string, body ModelContainer, options *RegistryModelContainersClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if modelName == "" { + return nil, errors.New("parameter modelName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{modelName}", url.PathEscape(modelName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, body); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Delete container. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of Azure Machine Learning registry. This is case-insensitive +// - modelName - Container name. +// - options - RegistryModelContainersClientBeginDeleteOptions contains the optional parameters for the RegistryModelContainersClient.BeginDelete +// method. +func (client *RegistryModelContainersClient) BeginDelete(ctx context.Context, resourceGroupName string, registryName string, modelName string, options *RegistryModelContainersClientBeginDeleteOptions) (*runtime.Poller[RegistryModelContainersClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, registryName, modelName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RegistryModelContainersClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[RegistryModelContainersClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Delete container. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *RegistryModelContainersClient) deleteOperation(ctx context.Context, resourceGroupName string, registryName string, modelName string, options *RegistryModelContainersClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "RegistryModelContainersClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, registryName, modelName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *RegistryModelContainersClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, registryName string, modelName string, options *RegistryModelContainersClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if modelName == "" { + return nil, errors.New("parameter modelName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{modelName}", url.PathEscape(modelName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get container. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of Azure Machine Learning registry. This is case-insensitive +// - modelName - Container name. This is case-sensitive. +// - options - RegistryModelContainersClientGetOptions contains the optional parameters for the RegistryModelContainersClient.Get +// method. +func (client *RegistryModelContainersClient) Get(ctx context.Context, resourceGroupName string, registryName string, modelName string, options *RegistryModelContainersClientGetOptions) (RegistryModelContainersClientGetResponse, error) { + var err error + const operationName = "RegistryModelContainersClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, registryName, modelName, options) + if err != nil { + return RegistryModelContainersClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return RegistryModelContainersClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return RegistryModelContainersClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *RegistryModelContainersClient) getCreateRequest(ctx context.Context, resourceGroupName string, registryName string, modelName string, options *RegistryModelContainersClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if modelName == "" { + return nil, errors.New("parameter modelName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{modelName}", url.PathEscape(modelName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *RegistryModelContainersClient) getHandleResponse(resp *http.Response) (RegistryModelContainersClientGetResponse, error) { + result := RegistryModelContainersClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ModelContainer); err != nil { + return RegistryModelContainersClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - List model containers. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of Azure Machine Learning registry. This is case-insensitive +// - options - RegistryModelContainersClientListOptions contains the optional parameters for the RegistryModelContainersClient.NewListPager +// method. +func (client *RegistryModelContainersClient) NewListPager(resourceGroupName string, registryName string, options *RegistryModelContainersClientListOptions) *runtime.Pager[RegistryModelContainersClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[RegistryModelContainersClientListResponse]{ + More: func(page RegistryModelContainersClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *RegistryModelContainersClientListResponse) (RegistryModelContainersClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "RegistryModelContainersClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, registryName, options) + }, nil) + if err != nil { + return RegistryModelContainersClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *RegistryModelContainersClient) listCreateRequest(ctx context.Context, resourceGroupName string, registryName string, options *RegistryModelContainersClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Skip != nil { + reqQP.Set("$skip", *options.Skip) + } + reqQP.Set("api-version", "2024-04-01") + if options != nil && options.ListViewType != nil { + reqQP.Set("listViewType", string(*options.ListViewType)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *RegistryModelContainersClient) listHandleResponse(resp *http.Response) (RegistryModelContainersClientListResponse, error) { + result := RegistryModelContainersClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ModelContainerResourceArmPaginatedResult); err != nil { + return RegistryModelContainersClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/registrymodelversions_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/registrymodelversions_client.go new file mode 100644 index 000000000..5f9a6157e --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/registrymodelversions_client.go @@ -0,0 +1,471 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armmachinelearning + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// RegistryModelVersionsClient contains the methods for the RegistryModelVersions group. +// Don't use this type directly, use NewRegistryModelVersionsClient() instead. +type RegistryModelVersionsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewRegistryModelVersionsClient creates a new instance of RegistryModelVersionsClient with the specified values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewRegistryModelVersionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RegistryModelVersionsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &RegistryModelVersionsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrGetStartPendingUpload - Generate a storage location and credential for the client to upload a model asset to. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of Azure Machine Learning registry. This is case-insensitive +// - modelName - Model name. This is case-sensitive. +// - version - Version identifier. This is case-sensitive. +// - body - Pending upload request object +// - options - RegistryModelVersionsClientCreateOrGetStartPendingUploadOptions contains the optional parameters for the RegistryModelVersionsClient.CreateOrGetStartPendingUpload +// method. +func (client *RegistryModelVersionsClient) CreateOrGetStartPendingUpload(ctx context.Context, resourceGroupName string, registryName string, modelName string, version string, body PendingUploadRequestDto, options *RegistryModelVersionsClientCreateOrGetStartPendingUploadOptions) (RegistryModelVersionsClientCreateOrGetStartPendingUploadResponse, error) { + var err error + const operationName = "RegistryModelVersionsClient.CreateOrGetStartPendingUpload" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrGetStartPendingUploadCreateRequest(ctx, resourceGroupName, registryName, modelName, version, body, options) + if err != nil { + return RegistryModelVersionsClientCreateOrGetStartPendingUploadResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return RegistryModelVersionsClientCreateOrGetStartPendingUploadResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return RegistryModelVersionsClientCreateOrGetStartPendingUploadResponse{}, err + } + resp, err := client.createOrGetStartPendingUploadHandleResponse(httpResp) + return resp, err +} + +// createOrGetStartPendingUploadCreateRequest creates the CreateOrGetStartPendingUpload request. +func (client *RegistryModelVersionsClient) createOrGetStartPendingUploadCreateRequest(ctx context.Context, resourceGroupName string, registryName string, modelName string, version string, body PendingUploadRequestDto, options *RegistryModelVersionsClientCreateOrGetStartPendingUploadOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}/versions/{version}/startPendingUpload" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if modelName == "" { + return nil, errors.New("parameter modelName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{modelName}", url.PathEscape(modelName)) + if version == "" { + return nil, errors.New("parameter version cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{version}", url.PathEscape(version)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, body); err != nil { + return nil, err + } + return req, nil +} + +// createOrGetStartPendingUploadHandleResponse handles the CreateOrGetStartPendingUpload response. +func (client *RegistryModelVersionsClient) createOrGetStartPendingUploadHandleResponse(resp *http.Response) (RegistryModelVersionsClientCreateOrGetStartPendingUploadResponse, error) { + result := RegistryModelVersionsClientCreateOrGetStartPendingUploadResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PendingUploadResponseDto); err != nil { + return RegistryModelVersionsClientCreateOrGetStartPendingUploadResponse{}, err + } + return result, nil +} + +// BeginCreateOrUpdate - Create or update version. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of Azure Machine Learning registry. This is case-insensitive +// - modelName - Container name. +// - version - Version identifier. +// - body - Version entity to create or update. +// - options - RegistryModelVersionsClientBeginCreateOrUpdateOptions contains the optional parameters for the RegistryModelVersionsClient.BeginCreateOrUpdate +// method. +func (client *RegistryModelVersionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, registryName string, modelName string, version string, body ModelVersion, options *RegistryModelVersionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[RegistryModelVersionsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, registryName, modelName, version, body, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RegistryModelVersionsClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaOriginalURI, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[RegistryModelVersionsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Create or update version. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *RegistryModelVersionsClient) createOrUpdate(ctx context.Context, resourceGroupName string, registryName string, modelName string, version string, body ModelVersion, options *RegistryModelVersionsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "RegistryModelVersionsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, registryName, modelName, version, body, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *RegistryModelVersionsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, registryName string, modelName string, version string, body ModelVersion, options *RegistryModelVersionsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}/versions/{version}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if modelName == "" { + return nil, errors.New("parameter modelName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{modelName}", url.PathEscape(modelName)) + if version == "" { + return nil, errors.New("parameter version cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{version}", url.PathEscape(version)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, body); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Delete version. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of Azure Machine Learning registry. This is case-insensitive +// - modelName - Container name. +// - version - Version identifier. +// - options - RegistryModelVersionsClientBeginDeleteOptions contains the optional parameters for the RegistryModelVersionsClient.BeginDelete +// method. +func (client *RegistryModelVersionsClient) BeginDelete(ctx context.Context, resourceGroupName string, registryName string, modelName string, version string, options *RegistryModelVersionsClientBeginDeleteOptions) (*runtime.Poller[RegistryModelVersionsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, registryName, modelName, version, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RegistryModelVersionsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[RegistryModelVersionsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Delete version. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *RegistryModelVersionsClient) deleteOperation(ctx context.Context, resourceGroupName string, registryName string, modelName string, version string, options *RegistryModelVersionsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "RegistryModelVersionsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, registryName, modelName, version, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *RegistryModelVersionsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, registryName string, modelName string, version string, options *RegistryModelVersionsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}/versions/{version}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if modelName == "" { + return nil, errors.New("parameter modelName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{modelName}", url.PathEscape(modelName)) + if version == "" { + return nil, errors.New("parameter version cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{version}", url.PathEscape(version)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get version. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of Azure Machine Learning registry. This is case-insensitive +// - modelName - Container name. This is case-sensitive. +// - version - Version identifier. This is case-sensitive. +// - options - RegistryModelVersionsClientGetOptions contains the optional parameters for the RegistryModelVersionsClient.Get +// method. +func (client *RegistryModelVersionsClient) Get(ctx context.Context, resourceGroupName string, registryName string, modelName string, version string, options *RegistryModelVersionsClientGetOptions) (RegistryModelVersionsClientGetResponse, error) { + var err error + const operationName = "RegistryModelVersionsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, registryName, modelName, version, options) + if err != nil { + return RegistryModelVersionsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return RegistryModelVersionsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return RegistryModelVersionsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *RegistryModelVersionsClient) getCreateRequest(ctx context.Context, resourceGroupName string, registryName string, modelName string, version string, options *RegistryModelVersionsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}/versions/{version}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if modelName == "" { + return nil, errors.New("parameter modelName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{modelName}", url.PathEscape(modelName)) + if version == "" { + return nil, errors.New("parameter version cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{version}", url.PathEscape(version)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *RegistryModelVersionsClient) getHandleResponse(resp *http.Response) (RegistryModelVersionsClientGetResponse, error) { + result := RegistryModelVersionsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ModelVersion); err != nil { + return RegistryModelVersionsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - List versions. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of Azure Machine Learning registry. This is case-insensitive +// - modelName - Container name. This is case-sensitive. +// - options - RegistryModelVersionsClientListOptions contains the optional parameters for the RegistryModelVersionsClient.NewListPager +// method. +func (client *RegistryModelVersionsClient) NewListPager(resourceGroupName string, registryName string, modelName string, options *RegistryModelVersionsClientListOptions) *runtime.Pager[RegistryModelVersionsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[RegistryModelVersionsClientListResponse]{ + More: func(page RegistryModelVersionsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *RegistryModelVersionsClientListResponse) (RegistryModelVersionsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "RegistryModelVersionsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, registryName, modelName, options) + }, nil) + if err != nil { + return RegistryModelVersionsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *RegistryModelVersionsClient) listCreateRequest(ctx context.Context, resourceGroupName string, registryName string, modelName string, options *RegistryModelVersionsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}/versions" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if modelName == "" { + return nil, errors.New("parameter modelName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{modelName}", url.PathEscape(modelName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.OrderBy != nil { + reqQP.Set("$orderBy", *options.OrderBy) + } + if options != nil && options.Skip != nil { + reqQP.Set("$skip", *options.Skip) + } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-04-01") + if options != nil && options.Description != nil { + reqQP.Set("description", *options.Description) + } + if options != nil && options.ListViewType != nil { + reqQP.Set("listViewType", string(*options.ListViewType)) + } + if options != nil && options.Properties != nil { + reqQP.Set("properties", *options.Properties) + } + if options != nil && options.Tags != nil { + reqQP.Set("tags", *options.Tags) + } + if options != nil && options.Version != nil { + reqQP.Set("version", *options.Version) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *RegistryModelVersionsClient) listHandleResponse(resp *http.Response) (RegistryModelVersionsClientListResponse, error) { + result := RegistryModelVersionsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ModelVersionResourceArmPaginatedResult); err != nil { + return RegistryModelVersionsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/response_types.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/responses.go similarity index 53% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/response_types.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/responses.go index 9f6ccfcb0..8bc6bf26f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/response_types.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/responses.go @@ -89,6 +89,11 @@ type CodeContainersClientListResponse struct { CodeContainerResourceArmPaginatedResult } +// CodeVersionsClientCreateOrGetStartPendingUploadResponse contains the response from method CodeVersionsClient.CreateOrGetStartPendingUpload. +type CodeVersionsClientCreateOrGetStartPendingUploadResponse struct { + PendingUploadResponseDto +} + // CodeVersionsClientCreateOrUpdateResponse contains the response from method CodeVersionsClient.CreateOrUpdate. type CodeVersionsClientCreateOrUpdateResponse struct { // Azure Resource Manager resource envelope. @@ -112,6 +117,11 @@ type CodeVersionsClientListResponse struct { CodeVersionResourceArmPaginatedResult } +// CodeVersionsClientPublishResponse contains the response from method CodeVersionsClient.BeginPublish. +type CodeVersionsClientPublishResponse struct { + // placeholder for future response values +} + // ComponentContainersClientCreateOrUpdateResponse contains the response from method ComponentContainersClient.CreateOrUpdate. type ComponentContainersClientCreateOrUpdateResponse struct { // Azure Resource Manager resource envelope. @@ -158,6 +168,11 @@ type ComponentVersionsClientListResponse struct { ComponentVersionResourceArmPaginatedResult } +// ComponentVersionsClientPublishResponse contains the response from method ComponentVersionsClient.BeginPublish. +type ComponentVersionsClientPublishResponse struct { + // placeholder for future response values +} + // ComputeClientCreateOrUpdateResponse contains the response from method ComputeClient.BeginCreateOrUpdate. type ComputeClientCreateOrUpdateResponse struct { // Machine Learning compute object wrapped into ARM resource envelope. @@ -270,6 +285,11 @@ type DataVersionsClientListResponse struct { DataVersionBaseResourceArmPaginatedResult } +// DataVersionsClientPublishResponse contains the response from method DataVersionsClient.BeginPublish. +type DataVersionsClientPublishResponse struct { + // placeholder for future response values +} + // DatastoresClientCreateOrUpdateResponse contains the response from method DatastoresClient.CreateOrUpdate. type DatastoresClientCreateOrUpdateResponse struct { // Azure Resource Manager resource envelope. @@ -355,6 +375,121 @@ type EnvironmentVersionsClientListResponse struct { EnvironmentVersionResourceArmPaginatedResult } +// EnvironmentVersionsClientPublishResponse contains the response from method EnvironmentVersionsClient.BeginPublish. +type EnvironmentVersionsClientPublishResponse struct { + // placeholder for future response values +} + +// FeaturesClientGetResponse contains the response from method FeaturesClient.Get. +type FeaturesClientGetResponse struct { + // Azure Resource Manager resource envelope. + Feature +} + +// FeaturesClientListResponse contains the response from method FeaturesClient.NewListPager. +type FeaturesClientListResponse struct { + // A paginated list of Feature entities. + FeatureResourceArmPaginatedResult +} + +// FeaturesetContainersClientCreateOrUpdateResponse contains the response from method FeaturesetContainersClient.BeginCreateOrUpdate. +type FeaturesetContainersClientCreateOrUpdateResponse struct { + // Azure Resource Manager resource envelope. + FeaturesetContainer +} + +// FeaturesetContainersClientDeleteResponse contains the response from method FeaturesetContainersClient.BeginDelete. +type FeaturesetContainersClientDeleteResponse struct { + // placeholder for future response values +} + +// FeaturesetContainersClientGetEntityResponse contains the response from method FeaturesetContainersClient.GetEntity. +type FeaturesetContainersClientGetEntityResponse struct { + // Azure Resource Manager resource envelope. + FeaturesetContainer +} + +// FeaturesetContainersClientListResponse contains the response from method FeaturesetContainersClient.NewListPager. +type FeaturesetContainersClientListResponse struct { + // A paginated list of FeaturesetContainer entities. + FeaturesetContainerResourceArmPaginatedResult +} + +// FeaturesetVersionsClientBackfillResponse contains the response from method FeaturesetVersionsClient.BeginBackfill. +type FeaturesetVersionsClientBackfillResponse struct { + // Response payload for creating a backfill request for a given feature set version + FeaturesetVersionBackfillResponse +} + +// FeaturesetVersionsClientCreateOrUpdateResponse contains the response from method FeaturesetVersionsClient.BeginCreateOrUpdate. +type FeaturesetVersionsClientCreateOrUpdateResponse struct { + // Azure Resource Manager resource envelope. + FeaturesetVersion +} + +// FeaturesetVersionsClientDeleteResponse contains the response from method FeaturesetVersionsClient.BeginDelete. +type FeaturesetVersionsClientDeleteResponse struct { + // placeholder for future response values +} + +// FeaturesetVersionsClientGetResponse contains the response from method FeaturesetVersionsClient.Get. +type FeaturesetVersionsClientGetResponse struct { + // Azure Resource Manager resource envelope. + FeaturesetVersion +} + +// FeaturesetVersionsClientListResponse contains the response from method FeaturesetVersionsClient.NewListPager. +type FeaturesetVersionsClientListResponse struct { + // A paginated list of FeaturesetVersion entities. + FeaturesetVersionResourceArmPaginatedResult +} + +// FeaturestoreEntityContainersClientCreateOrUpdateResponse contains the response from method FeaturestoreEntityContainersClient.BeginCreateOrUpdate. +type FeaturestoreEntityContainersClientCreateOrUpdateResponse struct { + // Azure Resource Manager resource envelope. + FeaturestoreEntityContainer +} + +// FeaturestoreEntityContainersClientDeleteResponse contains the response from method FeaturestoreEntityContainersClient.BeginDelete. +type FeaturestoreEntityContainersClientDeleteResponse struct { + // placeholder for future response values +} + +// FeaturestoreEntityContainersClientGetEntityResponse contains the response from method FeaturestoreEntityContainersClient.GetEntity. +type FeaturestoreEntityContainersClientGetEntityResponse struct { + // Azure Resource Manager resource envelope. + FeaturestoreEntityContainer +} + +// FeaturestoreEntityContainersClientListResponse contains the response from method FeaturestoreEntityContainersClient.NewListPager. +type FeaturestoreEntityContainersClientListResponse struct { + // A paginated list of FeaturestoreEntityContainer entities. + FeaturestoreEntityContainerResourceArmPaginatedResult +} + +// FeaturestoreEntityVersionsClientCreateOrUpdateResponse contains the response from method FeaturestoreEntityVersionsClient.BeginCreateOrUpdate. +type FeaturestoreEntityVersionsClientCreateOrUpdateResponse struct { + // Azure Resource Manager resource envelope. + FeaturestoreEntityVersion +} + +// FeaturestoreEntityVersionsClientDeleteResponse contains the response from method FeaturestoreEntityVersionsClient.BeginDelete. +type FeaturestoreEntityVersionsClientDeleteResponse struct { + // placeholder for future response values +} + +// FeaturestoreEntityVersionsClientGetResponse contains the response from method FeaturestoreEntityVersionsClient.Get. +type FeaturestoreEntityVersionsClientGetResponse struct { + // Azure Resource Manager resource envelope. + FeaturestoreEntityVersion +} + +// FeaturestoreEntityVersionsClientListResponse contains the response from method FeaturestoreEntityVersionsClient.NewListPager. +type FeaturestoreEntityVersionsClientListResponse struct { + // A paginated list of FeaturestoreEntityVersion entities. + FeaturestoreEntityVersionResourceArmPaginatedResult +} + // JobsClientCancelResponse contains the response from method JobsClient.BeginCancel. type JobsClientCancelResponse struct { // placeholder for future response values @@ -383,6 +518,58 @@ type JobsClientListResponse struct { JobBaseResourceArmPaginatedResult } +// ManagedNetworkProvisionsClientProvisionManagedNetworkResponse contains the response from method ManagedNetworkProvisionsClient.BeginProvisionManagedNetwork. +type ManagedNetworkProvisionsClientProvisionManagedNetworkResponse struct { + // Status of the Provisioning for the managed network of a machine learning workspace. + ManagedNetworkProvisionStatus +} + +// ManagedNetworkSettingsRuleClientCreateOrUpdateResponse contains the response from method ManagedNetworkSettingsRuleClient.BeginCreateOrUpdate. +type ManagedNetworkSettingsRuleClientCreateOrUpdateResponse struct { + // Outbound Rule Basic Resource for the managed network of a machine learning workspace. + OutboundRuleBasicResource +} + +// ManagedNetworkSettingsRuleClientDeleteResponse contains the response from method ManagedNetworkSettingsRuleClient.BeginDelete. +type ManagedNetworkSettingsRuleClientDeleteResponse struct { + // placeholder for future response values +} + +// ManagedNetworkSettingsRuleClientGetResponse contains the response from method ManagedNetworkSettingsRuleClient.Get. +type ManagedNetworkSettingsRuleClientGetResponse struct { + // Outbound Rule Basic Resource for the managed network of a machine learning workspace. + OutboundRuleBasicResource +} + +// ManagedNetworkSettingsRuleClientListResponse contains the response from method ManagedNetworkSettingsRuleClient.NewListPager. +type ManagedNetworkSettingsRuleClientListResponse struct { + // List of outbound rules for the managed network of a machine learning workspace. + OutboundRuleListResult +} + +// MarketplaceSubscriptionsClientCreateOrUpdateResponse contains the response from method MarketplaceSubscriptionsClient.BeginCreateOrUpdate. +type MarketplaceSubscriptionsClientCreateOrUpdateResponse struct { + // Azure Resource Manager resource envelope. + MarketplaceSubscription +} + +// MarketplaceSubscriptionsClientDeleteResponse contains the response from method MarketplaceSubscriptionsClient.BeginDelete. +type MarketplaceSubscriptionsClientDeleteResponse struct { + // placeholder for future response values +} + +// MarketplaceSubscriptionsClientGetResponse contains the response from method MarketplaceSubscriptionsClient.Get. +type MarketplaceSubscriptionsClientGetResponse struct { + // Azure Resource Manager resource envelope. + MarketplaceSubscription +} + +// MarketplaceSubscriptionsClientListResponse contains the response from method MarketplaceSubscriptionsClient.NewListPager. +type MarketplaceSubscriptionsClientListResponse struct { + // A paginated list of MarketplaceSubscription entities. + MarketplaceSubscriptionResourceArmPaginatedResult +} + // ModelContainersClientCreateOrUpdateResponse contains the response from method ModelContainersClient.CreateOrUpdate. type ModelContainersClientCreateOrUpdateResponse struct { // Azure Resource Manager resource envelope. @@ -429,6 +616,11 @@ type ModelVersionsClientListResponse struct { ModelVersionResourceArmPaginatedResult } +// ModelVersionsClientPublishResponse contains the response from method ModelVersionsClient.BeginPublish. +type ModelVersionsClientPublishResponse struct { + // placeholder for future response values +} + // OnlineDeploymentsClientCreateOrUpdateResponse contains the response from method OnlineDeploymentsClient.BeginCreateOrUpdate. type OnlineDeploymentsClientCreateOrUpdateResponse struct { OnlineDeployment @@ -511,8 +703,8 @@ type OnlineEndpointsClientUpdateResponse struct { // OperationsClientListResponse contains the response from method OperationsClient.NewListPager. type OperationsClientListResponse struct { - // An array of operations supported by the resource provider. - AmlOperationListResult + // A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results. + OperationListResult } // PrivateEndpointConnectionsClientCreateOrUpdateResponse contains the response from method PrivateEndpointConnectionsClient.CreateOrUpdate. @@ -556,6 +748,294 @@ type QuotasClientUpdateResponse struct { UpdateWorkspaceQuotasResult } +// RegistriesClientCreateOrUpdateResponse contains the response from method RegistriesClient.BeginCreateOrUpdate. +type RegistriesClientCreateOrUpdateResponse struct { + Registry +} + +// RegistriesClientDeleteResponse contains the response from method RegistriesClient.BeginDelete. +type RegistriesClientDeleteResponse struct { + // placeholder for future response values +} + +// RegistriesClientGetResponse contains the response from method RegistriesClient.Get. +type RegistriesClientGetResponse struct { + Registry +} + +// RegistriesClientListBySubscriptionResponse contains the response from method RegistriesClient.NewListBySubscriptionPager. +type RegistriesClientListBySubscriptionResponse struct { + // A paginated list of Registry entities. + RegistryTrackedResourceArmPaginatedResult +} + +// RegistriesClientListResponse contains the response from method RegistriesClient.NewListPager. +type RegistriesClientListResponse struct { + // A paginated list of Registry entities. + RegistryTrackedResourceArmPaginatedResult +} + +// RegistriesClientRemoveRegionsResponse contains the response from method RegistriesClient.BeginRemoveRegions. +type RegistriesClientRemoveRegionsResponse struct { + Registry +} + +// RegistriesClientUpdateResponse contains the response from method RegistriesClient.Update. +type RegistriesClientUpdateResponse struct { + Registry +} + +// RegistryCodeContainersClientCreateOrUpdateResponse contains the response from method RegistryCodeContainersClient.BeginCreateOrUpdate. +type RegistryCodeContainersClientCreateOrUpdateResponse struct { + // Azure Resource Manager resource envelope. + CodeContainer +} + +// RegistryCodeContainersClientDeleteResponse contains the response from method RegistryCodeContainersClient.BeginDelete. +type RegistryCodeContainersClientDeleteResponse struct { + // placeholder for future response values +} + +// RegistryCodeContainersClientGetResponse contains the response from method RegistryCodeContainersClient.Get. +type RegistryCodeContainersClientGetResponse struct { + // Azure Resource Manager resource envelope. + CodeContainer +} + +// RegistryCodeContainersClientListResponse contains the response from method RegistryCodeContainersClient.NewListPager. +type RegistryCodeContainersClientListResponse struct { + // A paginated list of CodeContainer entities. + CodeContainerResourceArmPaginatedResult +} + +// RegistryCodeVersionsClientCreateOrGetStartPendingUploadResponse contains the response from method RegistryCodeVersionsClient.CreateOrGetStartPendingUpload. +type RegistryCodeVersionsClientCreateOrGetStartPendingUploadResponse struct { + PendingUploadResponseDto +} + +// RegistryCodeVersionsClientCreateOrUpdateResponse contains the response from method RegistryCodeVersionsClient.BeginCreateOrUpdate. +type RegistryCodeVersionsClientCreateOrUpdateResponse struct { + // Azure Resource Manager resource envelope. + CodeVersion +} + +// RegistryCodeVersionsClientDeleteResponse contains the response from method RegistryCodeVersionsClient.BeginDelete. +type RegistryCodeVersionsClientDeleteResponse struct { + // placeholder for future response values +} + +// RegistryCodeVersionsClientGetResponse contains the response from method RegistryCodeVersionsClient.Get. +type RegistryCodeVersionsClientGetResponse struct { + // Azure Resource Manager resource envelope. + CodeVersion +} + +// RegistryCodeVersionsClientListResponse contains the response from method RegistryCodeVersionsClient.NewListPager. +type RegistryCodeVersionsClientListResponse struct { + // A paginated list of CodeVersion entities. + CodeVersionResourceArmPaginatedResult +} + +// RegistryComponentContainersClientCreateOrUpdateResponse contains the response from method RegistryComponentContainersClient.BeginCreateOrUpdate. +type RegistryComponentContainersClientCreateOrUpdateResponse struct { + // Azure Resource Manager resource envelope. + ComponentContainer +} + +// RegistryComponentContainersClientDeleteResponse contains the response from method RegistryComponentContainersClient.BeginDelete. +type RegistryComponentContainersClientDeleteResponse struct { + // placeholder for future response values +} + +// RegistryComponentContainersClientGetResponse contains the response from method RegistryComponentContainersClient.Get. +type RegistryComponentContainersClientGetResponse struct { + // Azure Resource Manager resource envelope. + ComponentContainer +} + +// RegistryComponentContainersClientListResponse contains the response from method RegistryComponentContainersClient.NewListPager. +type RegistryComponentContainersClientListResponse struct { + // A paginated list of ComponentContainer entities. + ComponentContainerResourceArmPaginatedResult +} + +// RegistryComponentVersionsClientCreateOrUpdateResponse contains the response from method RegistryComponentVersionsClient.BeginCreateOrUpdate. +type RegistryComponentVersionsClientCreateOrUpdateResponse struct { + // Azure Resource Manager resource envelope. + ComponentVersion +} + +// RegistryComponentVersionsClientDeleteResponse contains the response from method RegistryComponentVersionsClient.BeginDelete. +type RegistryComponentVersionsClientDeleteResponse struct { + // placeholder for future response values +} + +// RegistryComponentVersionsClientGetResponse contains the response from method RegistryComponentVersionsClient.Get. +type RegistryComponentVersionsClientGetResponse struct { + // Azure Resource Manager resource envelope. + ComponentVersion +} + +// RegistryComponentVersionsClientListResponse contains the response from method RegistryComponentVersionsClient.NewListPager. +type RegistryComponentVersionsClientListResponse struct { + // A paginated list of ComponentVersion entities. + ComponentVersionResourceArmPaginatedResult +} + +// RegistryDataContainersClientCreateOrUpdateResponse contains the response from method RegistryDataContainersClient.BeginCreateOrUpdate. +type RegistryDataContainersClientCreateOrUpdateResponse struct { + // Azure Resource Manager resource envelope. + DataContainer +} + +// RegistryDataContainersClientDeleteResponse contains the response from method RegistryDataContainersClient.BeginDelete. +type RegistryDataContainersClientDeleteResponse struct { + // placeholder for future response values +} + +// RegistryDataContainersClientGetResponse contains the response from method RegistryDataContainersClient.Get. +type RegistryDataContainersClientGetResponse struct { + // Azure Resource Manager resource envelope. + DataContainer +} + +// RegistryDataContainersClientListResponse contains the response from method RegistryDataContainersClient.NewListPager. +type RegistryDataContainersClientListResponse struct { + // A paginated list of DataContainer entities. + DataContainerResourceArmPaginatedResult +} + +// RegistryDataReferencesClientGetBlobReferenceSASResponse contains the response from method RegistryDataReferencesClient.GetBlobReferenceSAS. +type RegistryDataReferencesClientGetBlobReferenceSASResponse struct { + // BlobReferenceSASResponse for getBlobReferenceSAS API + GetBlobReferenceSASResponseDto +} + +// RegistryDataVersionsClientCreateOrGetStartPendingUploadResponse contains the response from method RegistryDataVersionsClient.CreateOrGetStartPendingUpload. +type RegistryDataVersionsClientCreateOrGetStartPendingUploadResponse struct { + PendingUploadResponseDto +} + +// RegistryDataVersionsClientCreateOrUpdateResponse contains the response from method RegistryDataVersionsClient.BeginCreateOrUpdate. +type RegistryDataVersionsClientCreateOrUpdateResponse struct { + // Azure Resource Manager resource envelope. + DataVersionBase +} + +// RegistryDataVersionsClientDeleteResponse contains the response from method RegistryDataVersionsClient.BeginDelete. +type RegistryDataVersionsClientDeleteResponse struct { + // placeholder for future response values +} + +// RegistryDataVersionsClientGetResponse contains the response from method RegistryDataVersionsClient.Get. +type RegistryDataVersionsClientGetResponse struct { + // Azure Resource Manager resource envelope. + DataVersionBase +} + +// RegistryDataVersionsClientListResponse contains the response from method RegistryDataVersionsClient.NewListPager. +type RegistryDataVersionsClientListResponse struct { + // A paginated list of DataVersionBase entities. + DataVersionBaseResourceArmPaginatedResult +} + +// RegistryEnvironmentContainersClientCreateOrUpdateResponse contains the response from method RegistryEnvironmentContainersClient.BeginCreateOrUpdate. +type RegistryEnvironmentContainersClientCreateOrUpdateResponse struct { + // Azure Resource Manager resource envelope. + EnvironmentContainer +} + +// RegistryEnvironmentContainersClientDeleteResponse contains the response from method RegistryEnvironmentContainersClient.BeginDelete. +type RegistryEnvironmentContainersClientDeleteResponse struct { + // placeholder for future response values +} + +// RegistryEnvironmentContainersClientGetResponse contains the response from method RegistryEnvironmentContainersClient.Get. +type RegistryEnvironmentContainersClientGetResponse struct { + // Azure Resource Manager resource envelope. + EnvironmentContainer +} + +// RegistryEnvironmentContainersClientListResponse contains the response from method RegistryEnvironmentContainersClient.NewListPager. +type RegistryEnvironmentContainersClientListResponse struct { + // A paginated list of EnvironmentContainer entities. + EnvironmentContainerResourceArmPaginatedResult +} + +// RegistryEnvironmentVersionsClientCreateOrUpdateResponse contains the response from method RegistryEnvironmentVersionsClient.BeginCreateOrUpdate. +type RegistryEnvironmentVersionsClientCreateOrUpdateResponse struct { + // Azure Resource Manager resource envelope. + EnvironmentVersion +} + +// RegistryEnvironmentVersionsClientDeleteResponse contains the response from method RegistryEnvironmentVersionsClient.BeginDelete. +type RegistryEnvironmentVersionsClientDeleteResponse struct { + // placeholder for future response values +} + +// RegistryEnvironmentVersionsClientGetResponse contains the response from method RegistryEnvironmentVersionsClient.Get. +type RegistryEnvironmentVersionsClientGetResponse struct { + // Azure Resource Manager resource envelope. + EnvironmentVersion +} + +// RegistryEnvironmentVersionsClientListResponse contains the response from method RegistryEnvironmentVersionsClient.NewListPager. +type RegistryEnvironmentVersionsClientListResponse struct { + // A paginated list of EnvironmentVersion entities. + EnvironmentVersionResourceArmPaginatedResult +} + +// RegistryModelContainersClientCreateOrUpdateResponse contains the response from method RegistryModelContainersClient.BeginCreateOrUpdate. +type RegistryModelContainersClientCreateOrUpdateResponse struct { + // Azure Resource Manager resource envelope. + ModelContainer +} + +// RegistryModelContainersClientDeleteResponse contains the response from method RegistryModelContainersClient.BeginDelete. +type RegistryModelContainersClientDeleteResponse struct { + // placeholder for future response values +} + +// RegistryModelContainersClientGetResponse contains the response from method RegistryModelContainersClient.Get. +type RegistryModelContainersClientGetResponse struct { + // Azure Resource Manager resource envelope. + ModelContainer +} + +// RegistryModelContainersClientListResponse contains the response from method RegistryModelContainersClient.NewListPager. +type RegistryModelContainersClientListResponse struct { + // A paginated list of ModelContainer entities. + ModelContainerResourceArmPaginatedResult +} + +// RegistryModelVersionsClientCreateOrGetStartPendingUploadResponse contains the response from method RegistryModelVersionsClient.CreateOrGetStartPendingUpload. +type RegistryModelVersionsClientCreateOrGetStartPendingUploadResponse struct { + PendingUploadResponseDto +} + +// RegistryModelVersionsClientCreateOrUpdateResponse contains the response from method RegistryModelVersionsClient.BeginCreateOrUpdate. +type RegistryModelVersionsClientCreateOrUpdateResponse struct { + // Azure Resource Manager resource envelope. + ModelVersion +} + +// RegistryModelVersionsClientDeleteResponse contains the response from method RegistryModelVersionsClient.BeginDelete. +type RegistryModelVersionsClientDeleteResponse struct { + // placeholder for future response values +} + +// RegistryModelVersionsClientGetResponse contains the response from method RegistryModelVersionsClient.Get. +type RegistryModelVersionsClientGetResponse struct { + // Azure Resource Manager resource envelope. + ModelVersion +} + +// RegistryModelVersionsClientListResponse contains the response from method RegistryModelVersionsClient.NewListPager. +type RegistryModelVersionsClientListResponse struct { + // A paginated list of ModelVersion entities. + ModelVersionResourceArmPaginatedResult +} + // SchedulesClientCreateOrUpdateResponse contains the response from method SchedulesClient.BeginCreateOrUpdate. type SchedulesClientCreateOrUpdateResponse struct { // Azure Resource Manager resource envelope. @@ -579,6 +1059,44 @@ type SchedulesClientListResponse struct { ScheduleResourceArmPaginatedResult } +// ServerlessEndpointsClientCreateOrUpdateResponse contains the response from method ServerlessEndpointsClient.BeginCreateOrUpdate. +type ServerlessEndpointsClientCreateOrUpdateResponse struct { + ServerlessEndpoint +} + +// ServerlessEndpointsClientDeleteResponse contains the response from method ServerlessEndpointsClient.BeginDelete. +type ServerlessEndpointsClientDeleteResponse struct { + // placeholder for future response values +} + +// ServerlessEndpointsClientGetResponse contains the response from method ServerlessEndpointsClient.Get. +type ServerlessEndpointsClientGetResponse struct { + ServerlessEndpoint +} + +// ServerlessEndpointsClientListKeysResponse contains the response from method ServerlessEndpointsClient.ListKeys. +type ServerlessEndpointsClientListKeysResponse struct { + // Keys for endpoint authentication. + EndpointAuthKeys +} + +// ServerlessEndpointsClientListResponse contains the response from method ServerlessEndpointsClient.NewListPager. +type ServerlessEndpointsClientListResponse struct { + // A paginated list of ServerlessEndpoint entities. + ServerlessEndpointTrackedResourceArmPaginatedResult +} + +// ServerlessEndpointsClientRegenerateKeysResponse contains the response from method ServerlessEndpointsClient.BeginRegenerateKeys. +type ServerlessEndpointsClientRegenerateKeysResponse struct { + // Keys for endpoint authentication. + EndpointAuthKeys +} + +// ServerlessEndpointsClientUpdateResponse contains the response from method ServerlessEndpointsClient.BeginUpdate. +type ServerlessEndpointsClientUpdateResponse struct { + ServerlessEndpoint +} + // UsagesClientListResponse contains the response from method UsagesClient.NewListPager. type UsagesClientListResponse struct { // The List Usages operation response. @@ -611,6 +1129,11 @@ type WorkspaceConnectionsClientListResponse struct { WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult } +// WorkspaceConnectionsClientListSecretsResponse contains the response from method WorkspaceConnectionsClient.ListSecrets. +type WorkspaceConnectionsClientListSecretsResponse struct { + WorkspaceConnectionPropertiesV2BasicResource +} + // WorkspaceFeaturesClientListResponse contains the response from method WorkspaceFeaturesClient.NewListPager. type WorkspaceFeaturesClientListResponse struct { // The List Aml user feature operation response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/schedules_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/schedules_client.go similarity index 96% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/schedules_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/schedules_client.go index ae5f7ae1e..e705b8ee2 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/schedules_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/schedules_client.go @@ -46,7 +46,7 @@ func NewSchedulesClient(subscriptionID string, credential azcore.TokenCredential // BeginCreateOrUpdate - Create or update schedule. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Schedule name. @@ -60,7 +60,8 @@ func (client *SchedulesClient) BeginCreateOrUpdate(ctx context.Context, resource return nil, err } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SchedulesClientCreateOrUpdateResponse]{ - Tracer: client.internal.Tracer(), + FinalStateVia: runtime.FinalStateViaOriginalURI, + Tracer: client.internal.Tracer(), }) return poller, err } else { @@ -73,7 +74,7 @@ func (client *SchedulesClient) BeginCreateOrUpdate(ctx context.Context, resource // CreateOrUpdate - Create or update schedule. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 func (client *SchedulesClient) createOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, name string, body Schedule, options *SchedulesClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "SchedulesClient.BeginCreateOrUpdate" @@ -119,7 +120,7 @@ func (client *SchedulesClient) createOrUpdateCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -131,7 +132,7 @@ func (client *SchedulesClient) createOrUpdateCreateRequest(ctx context.Context, // BeginDelete - Delete schedule. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Schedule name. @@ -143,7 +144,8 @@ func (client *SchedulesClient) BeginDelete(ctx context.Context, resourceGroupNam return nil, err } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SchedulesClientDeleteResponse]{ - Tracer: client.internal.Tracer(), + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { @@ -156,7 +158,7 @@ func (client *SchedulesClient) BeginDelete(ctx context.Context, resourceGroupNam // Delete - Delete schedule. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 func (client *SchedulesClient) deleteOperation(ctx context.Context, resourceGroupName string, workspaceName string, name string, options *SchedulesClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "SchedulesClient.BeginDelete" @@ -202,7 +204,7 @@ func (client *SchedulesClient) deleteCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -211,7 +213,7 @@ func (client *SchedulesClient) deleteCreateRequest(ctx context.Context, resource // Get - Get schedule. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Schedule name. @@ -262,7 +264,7 @@ func (client *SchedulesClient) getCreateRequest(ctx context.Context, resourceGro return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -279,7 +281,7 @@ func (client *SchedulesClient) getHandleResponse(resp *http.Response) (Schedules // NewListPager - List schedules in specified workspace. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - options - SchedulesClientListOptions contains the optional parameters for the SchedulesClient.NewListPager method. @@ -326,10 +328,10 @@ func (client *SchedulesClient) listCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") if options != nil && options.Skip != nil { reqQP.Set("$skip", *options.Skip) } + reqQP.Set("api-version", "2024-04-01") if options != nil && options.ListViewType != nil { reqQP.Set("listViewType", string(*options.ListViewType)) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/serverlessendpoints_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/serverlessendpoints_client.go new file mode 100644 index 000000000..dd8e0f9e9 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/serverlessendpoints_client.go @@ -0,0 +1,590 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armmachinelearning + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ServerlessEndpointsClient contains the methods for the ServerlessEndpoints group. +// Don't use this type directly, use NewServerlessEndpointsClient() instead. +type ServerlessEndpointsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewServerlessEndpointsClient creates a new instance of ServerlessEndpointsClient with the specified values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewServerlessEndpointsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServerlessEndpointsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ServerlessEndpointsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Create or update Serverless Endpoint (asynchronous). +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - Name of Azure Machine Learning workspace. +// - name - Serverless Endpoint name. +// - body - Serverless Endpoint entity to apply during operation. +// - options - ServerlessEndpointsClientBeginCreateOrUpdateOptions contains the optional parameters for the ServerlessEndpointsClient.BeginCreateOrUpdate +// method. +func (client *ServerlessEndpointsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, name string, body ServerlessEndpoint, options *ServerlessEndpointsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ServerlessEndpointsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, workspaceName, name, body, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ServerlessEndpointsClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaOriginalURI, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ServerlessEndpointsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Create or update Serverless Endpoint (asynchronous). +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *ServerlessEndpointsClient) createOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, name string, body ServerlessEndpoint, options *ServerlessEndpointsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ServerlessEndpointsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, workspaceName, name, body, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *ServerlessEndpointsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, name string, body ServerlessEndpoint, options *ServerlessEndpointsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/serverlessEndpoints/{name}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if workspaceName == "" { + return nil, errors.New("parameter workspaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceName}", url.PathEscape(workspaceName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, body); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Delete Serverless Endpoint (asynchronous). +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - Name of Azure Machine Learning workspace. +// - name - Serverless Endpoint name. +// - options - ServerlessEndpointsClientBeginDeleteOptions contains the optional parameters for the ServerlessEndpointsClient.BeginDelete +// method. +func (client *ServerlessEndpointsClient) BeginDelete(ctx context.Context, resourceGroupName string, workspaceName string, name string, options *ServerlessEndpointsClientBeginDeleteOptions) (*runtime.Poller[ServerlessEndpointsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, workspaceName, name, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ServerlessEndpointsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ServerlessEndpointsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Delete Serverless Endpoint (asynchronous). +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *ServerlessEndpointsClient) deleteOperation(ctx context.Context, resourceGroupName string, workspaceName string, name string, options *ServerlessEndpointsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "ServerlessEndpointsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, workspaceName, name, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *ServerlessEndpointsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, name string, options *ServerlessEndpointsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/serverlessEndpoints/{name}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if workspaceName == "" { + return nil, errors.New("parameter workspaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceName}", url.PathEscape(workspaceName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get Serverless Endpoint. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - Name of Azure Machine Learning workspace. +// - name - Serverless Endpoint name. +// - options - ServerlessEndpointsClientGetOptions contains the optional parameters for the ServerlessEndpointsClient.Get method. +func (client *ServerlessEndpointsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, name string, options *ServerlessEndpointsClientGetOptions) (ServerlessEndpointsClientGetResponse, error) { + var err error + const operationName = "ServerlessEndpointsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, workspaceName, name, options) + if err != nil { + return ServerlessEndpointsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ServerlessEndpointsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ServerlessEndpointsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ServerlessEndpointsClient) getCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, name string, options *ServerlessEndpointsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/serverlessEndpoints/{name}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if workspaceName == "" { + return nil, errors.New("parameter workspaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceName}", url.PathEscape(workspaceName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ServerlessEndpointsClient) getHandleResponse(resp *http.Response) (ServerlessEndpointsClientGetResponse, error) { + result := ServerlessEndpointsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ServerlessEndpoint); err != nil { + return ServerlessEndpointsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - List Serverless Endpoints. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - Name of Azure Machine Learning workspace. +// - options - ServerlessEndpointsClientListOptions contains the optional parameters for the ServerlessEndpointsClient.NewListPager +// method. +func (client *ServerlessEndpointsClient) NewListPager(resourceGroupName string, workspaceName string, options *ServerlessEndpointsClientListOptions) *runtime.Pager[ServerlessEndpointsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[ServerlessEndpointsClientListResponse]{ + More: func(page ServerlessEndpointsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ServerlessEndpointsClientListResponse) (ServerlessEndpointsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ServerlessEndpointsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, workspaceName, options) + }, nil) + if err != nil { + return ServerlessEndpointsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *ServerlessEndpointsClient) listCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, options *ServerlessEndpointsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/serverlessEndpoints" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if workspaceName == "" { + return nil, errors.New("parameter workspaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceName}", url.PathEscape(workspaceName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Skip != nil { + reqQP.Set("$skip", *options.Skip) + } + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *ServerlessEndpointsClient) listHandleResponse(resp *http.Response) (ServerlessEndpointsClientListResponse, error) { + result := ServerlessEndpointsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ServerlessEndpointTrackedResourceArmPaginatedResult); err != nil { + return ServerlessEndpointsClientListResponse{}, err + } + return result, nil +} + +// ListKeys - List EndpointAuthKeys for an Endpoint using Key-based authentication. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - Name of Azure Machine Learning workspace. +// - name - Serverless Endpoint name. +// - options - ServerlessEndpointsClientListKeysOptions contains the optional parameters for the ServerlessEndpointsClient.ListKeys +// method. +func (client *ServerlessEndpointsClient) ListKeys(ctx context.Context, resourceGroupName string, workspaceName string, name string, options *ServerlessEndpointsClientListKeysOptions) (ServerlessEndpointsClientListKeysResponse, error) { + var err error + const operationName = "ServerlessEndpointsClient.ListKeys" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listKeysCreateRequest(ctx, resourceGroupName, workspaceName, name, options) + if err != nil { + return ServerlessEndpointsClientListKeysResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ServerlessEndpointsClientListKeysResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ServerlessEndpointsClientListKeysResponse{}, err + } + resp, err := client.listKeysHandleResponse(httpResp) + return resp, err +} + +// listKeysCreateRequest creates the ListKeys request. +func (client *ServerlessEndpointsClient) listKeysCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, name string, options *ServerlessEndpointsClientListKeysOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/serverlessEndpoints/{name}/listKeys" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if workspaceName == "" { + return nil, errors.New("parameter workspaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceName}", url.PathEscape(workspaceName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listKeysHandleResponse handles the ListKeys response. +func (client *ServerlessEndpointsClient) listKeysHandleResponse(resp *http.Response) (ServerlessEndpointsClientListKeysResponse, error) { + result := ServerlessEndpointsClientListKeysResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.EndpointAuthKeys); err != nil { + return ServerlessEndpointsClientListKeysResponse{}, err + } + return result, nil +} + +// BeginRegenerateKeys - Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - Name of Azure Machine Learning workspace. +// - name - Serverless Endpoint name. +// - body - RegenerateKeys request . +// - options - ServerlessEndpointsClientBeginRegenerateKeysOptions contains the optional parameters for the ServerlessEndpointsClient.BeginRegenerateKeys +// method. +func (client *ServerlessEndpointsClient) BeginRegenerateKeys(ctx context.Context, resourceGroupName string, workspaceName string, name string, body RegenerateEndpointKeysRequest, options *ServerlessEndpointsClientBeginRegenerateKeysOptions) (*runtime.Poller[ServerlessEndpointsClientRegenerateKeysResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.regenerateKeys(ctx, resourceGroupName, workspaceName, name, body, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ServerlessEndpointsClientRegenerateKeysResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ServerlessEndpointsClientRegenerateKeysResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// RegenerateKeys - Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *ServerlessEndpointsClient) regenerateKeys(ctx context.Context, resourceGroupName string, workspaceName string, name string, body RegenerateEndpointKeysRequest, options *ServerlessEndpointsClientBeginRegenerateKeysOptions) (*http.Response, error) { + var err error + const operationName = "ServerlessEndpointsClient.BeginRegenerateKeys" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.regenerateKeysCreateRequest(ctx, resourceGroupName, workspaceName, name, body, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// regenerateKeysCreateRequest creates the RegenerateKeys request. +func (client *ServerlessEndpointsClient) regenerateKeysCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, name string, body RegenerateEndpointKeysRequest, options *ServerlessEndpointsClientBeginRegenerateKeysOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/serverlessEndpoints/{name}/regenerateKeys" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if workspaceName == "" { + return nil, errors.New("parameter workspaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceName}", url.PathEscape(workspaceName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, body); err != nil { + return nil, err + } + return req, nil +} + +// BeginUpdate - Update Serverless Endpoint (asynchronous). +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - Name of Azure Machine Learning workspace. +// - name - Serverless Endpoint name. +// - body - Serverless Endpoint entity to apply during operation. +// - options - ServerlessEndpointsClientBeginUpdateOptions contains the optional parameters for the ServerlessEndpointsClient.BeginUpdate +// method. +func (client *ServerlessEndpointsClient) BeginUpdate(ctx context.Context, resourceGroupName string, workspaceName string, name string, body PartialMinimalTrackedResourceWithSKUAndIdentity, options *ServerlessEndpointsClientBeginUpdateOptions) (*runtime.Poller[ServerlessEndpointsClientUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.update(ctx, resourceGroupName, workspaceName, name, body, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ServerlessEndpointsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ServerlessEndpointsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Update - Update Serverless Endpoint (asynchronous). +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *ServerlessEndpointsClient) update(ctx context.Context, resourceGroupName string, workspaceName string, name string, body PartialMinimalTrackedResourceWithSKUAndIdentity, options *ServerlessEndpointsClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ServerlessEndpointsClient.BeginUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, workspaceName, name, body, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// updateCreateRequest creates the Update request. +func (client *ServerlessEndpointsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, name string, body PartialMinimalTrackedResourceWithSKUAndIdentity, options *ServerlessEndpointsClientBeginUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/serverlessEndpoints/{name}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if workspaceName == "" { + return nil, errors.New("parameter workspaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceName}", url.PathEscape(workspaceName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, body); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/time_rfc3339.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/time_rfc3339.go new file mode 100644 index 000000000..12a8cd3fc --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/time_rfc3339.go @@ -0,0 +1,110 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armmachinelearning + +import ( + "encoding/json" + "fmt" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "reflect" + "regexp" + "strings" + "time" +) + +// Azure reports time in UTC but it doesn't include the 'Z' time zone suffix in some cases. +var tzOffsetRegex = regexp.MustCompile(`(?:Z|z|\+|-)(?:\d+:\d+)*"*$`) + +const ( + utcDateTime = "2006-01-02T15:04:05.999999999" + utcDateTimeJSON = `"` + utcDateTime + `"` + utcDateTimeNoT = "2006-01-02 15:04:05.999999999" + utcDateTimeJSONNoT = `"` + utcDateTimeNoT + `"` + dateTimeNoT = `2006-01-02 15:04:05.999999999Z07:00` + dateTimeJSON = `"` + time.RFC3339Nano + `"` + dateTimeJSONNoT = `"` + dateTimeNoT + `"` +) + +type dateTimeRFC3339 time.Time + +func (t dateTimeRFC3339) MarshalJSON() ([]byte, error) { + tt := time.Time(t) + return tt.MarshalJSON() +} + +func (t dateTimeRFC3339) MarshalText() ([]byte, error) { + tt := time.Time(t) + return tt.MarshalText() +} + +func (t *dateTimeRFC3339) UnmarshalJSON(data []byte) error { + tzOffset := tzOffsetRegex.Match(data) + hasT := strings.Contains(string(data), "T") || strings.Contains(string(data), "t") + var layout string + if tzOffset && hasT { + layout = dateTimeJSON + } else if tzOffset { + layout = dateTimeJSONNoT + } else if hasT { + layout = utcDateTimeJSON + } else { + layout = utcDateTimeJSONNoT + } + return t.Parse(layout, string(data)) +} + +func (t *dateTimeRFC3339) UnmarshalText(data []byte) error { + tzOffset := tzOffsetRegex.Match(data) + hasT := strings.Contains(string(data), "T") || strings.Contains(string(data), "t") + var layout string + if tzOffset && hasT { + layout = time.RFC3339Nano + } else if tzOffset { + layout = dateTimeNoT + } else if hasT { + layout = utcDateTime + } else { + layout = utcDateTimeNoT + } + return t.Parse(layout, string(data)) +} + +func (t *dateTimeRFC3339) Parse(layout, value string) error { + p, err := time.Parse(layout, strings.ToUpper(value)) + *t = dateTimeRFC3339(p) + return err +} + +func (t dateTimeRFC3339) String() string { + return time.Time(t).Format(time.RFC3339Nano) +} + +func populateDateTimeRFC3339(m map[string]any, k string, t *time.Time) { + if t == nil { + return + } else if azcore.IsNullValue(t) { + m[k] = nil + return + } else if reflect.ValueOf(t).IsNil() { + return + } + m[k] = (*dateTimeRFC3339)(t) +} + +func unpopulateDateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { + if data == nil || string(data) == "null" { + return nil + } + var aux dateTimeRFC3339 + if err := json.Unmarshal(data, &aux); err != nil { + return fmt.Errorf("struct field %s: %v", fn, err) + } + *t = (*time.Time)(&aux) + return nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/usages_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/usages_client.go similarity index 98% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/usages_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/usages_client.go index 818d7837e..2aca1f0ad 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/usages_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/usages_client.go @@ -45,7 +45,7 @@ func NewUsagesClient(subscriptionID string, credential azcore.TokenCredential, o // NewListPager - Gets the current usage information as well as limits for AML resources for given subscription and location. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - location - The location for which resource usage is queried. // - options - UsagesClientListOptions contains the optional parameters for the UsagesClient.NewListPager method. func (client *UsagesClient) NewListPager(location string, options *UsagesClientListOptions) *runtime.Pager[UsagesClientListResponse] { @@ -87,7 +87,7 @@ func (client *UsagesClient) listCreateRequest(ctx context.Context, location stri return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/virtualmachinesizes_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/virtualmachinesizes_client.go similarity index 98% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/virtualmachinesizes_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/virtualmachinesizes_client.go index 50b9a11f2..c2a256598 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/virtualmachinesizes_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/virtualmachinesizes_client.go @@ -46,7 +46,7 @@ func NewVirtualMachineSizesClient(subscriptionID string, credential azcore.Token // List - Returns supported VM Sizes in a location // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - location - The location upon which virtual-machine-sizes is queried. // - options - VirtualMachineSizesClientListOptions contains the optional parameters for the VirtualMachineSizesClient.List // method. @@ -88,7 +88,7 @@ func (client *VirtualMachineSizesClient) listCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/workspaceconnections_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/workspaceconnections_client.go similarity index 79% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/workspaceconnections_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/workspaceconnections_client.go index 9279dd18a..293856698 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/workspaceconnections_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/workspaceconnections_client.go @@ -46,7 +46,7 @@ func NewWorkspaceConnectionsClient(subscriptionID string, credential azcore.Toke // Create - // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - connectionName - Friendly name of the workspace connection @@ -99,7 +99,7 @@ func (client *WorkspaceConnectionsClient) createCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { @@ -120,7 +120,7 @@ func (client *WorkspaceConnectionsClient) createHandleResponse(resp *http.Respon // Delete - // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - connectionName - Friendly name of the workspace connection @@ -171,7 +171,7 @@ func (client *WorkspaceConnectionsClient) deleteCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -180,7 +180,7 @@ func (client *WorkspaceConnectionsClient) deleteCreateRequest(ctx context.Contex // Get - // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - connectionName - Friendly name of the workspace connection @@ -232,7 +232,7 @@ func (client *WorkspaceConnectionsClient) getCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -294,13 +294,13 @@ func (client *WorkspaceConnectionsClient) listCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - if options != nil && options.Target != nil { - reqQP.Set("target", *options.Target) - } + reqQP.Set("api-version", "2024-04-01") if options != nil && options.Category != nil { reqQP.Set("category", *options.Category) } - reqQP.Set("api-version", "2022-10-01") + if options != nil && options.Target != nil { + reqQP.Set("target", *options.Target) + } req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -314,3 +314,73 @@ func (client *WorkspaceConnectionsClient) listHandleResponse(resp *http.Response } return result, nil } + +// ListSecrets - List all the secrets of a machine learning workspaces connections. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - Name of Azure Machine Learning workspace. +// - connectionName - Friendly name of the workspace connection +// - options - WorkspaceConnectionsClientListSecretsOptions contains the optional parameters for the WorkspaceConnectionsClient.ListSecrets +// method. +func (client *WorkspaceConnectionsClient) ListSecrets(ctx context.Context, resourceGroupName string, workspaceName string, connectionName string, options *WorkspaceConnectionsClientListSecretsOptions) (WorkspaceConnectionsClientListSecretsResponse, error) { + var err error + const operationName = "WorkspaceConnectionsClient.ListSecrets" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listSecretsCreateRequest(ctx, resourceGroupName, workspaceName, connectionName, options) + if err != nil { + return WorkspaceConnectionsClientListSecretsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceConnectionsClientListSecretsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkspaceConnectionsClientListSecretsResponse{}, err + } + resp, err := client.listSecretsHandleResponse(httpResp) + return resp, err +} + +// listSecretsCreateRequest creates the ListSecrets request. +func (client *WorkspaceConnectionsClient) listSecretsCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, connectionName string, options *WorkspaceConnectionsClientListSecretsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/listsecrets" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if workspaceName == "" { + return nil, errors.New("parameter workspaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceName}", url.PathEscape(workspaceName)) + if connectionName == "" { + return nil, errors.New("parameter connectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{connectionName}", url.PathEscape(connectionName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listSecretsHandleResponse handles the ListSecrets response. +func (client *WorkspaceConnectionsClient) listSecretsHandleResponse(resp *http.Response) (WorkspaceConnectionsClientListSecretsResponse, error) { + result := WorkspaceConnectionsClientListSecretsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.WorkspaceConnectionPropertiesV2BasicResource); err != nil { + return WorkspaceConnectionsClientListSecretsResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/workspacefeatures_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/workspacefeatures_client.go similarity index 98% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/workspacefeatures_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/workspacefeatures_client.go index 9aa318676..f3b30c590 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/workspacefeatures_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/workspacefeatures_client.go @@ -45,7 +45,7 @@ func NewWorkspaceFeaturesClient(subscriptionID string, credential azcore.TokenCr // NewListPager - Lists all enabled features for a workspace // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - options - WorkspaceFeaturesClientListOptions contains the optional parameters for the WorkspaceFeaturesClient.NewListPager @@ -93,7 +93,7 @@ func (client *WorkspaceFeaturesClient) listCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/workspaces_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/workspaces_client.go similarity index 97% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/workspaces_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/workspaces_client.go index 759829135..784aead0a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/workspaces_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4/workspaces_client.go @@ -17,6 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" "net/url" + "strconv" "strings" ) @@ -46,7 +47,7 @@ func NewWorkspacesClient(subscriptionID string, credential azcore.TokenCredentia // BeginCreateOrUpdate - Creates or updates a workspace with the specified parameters. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - parameters - The parameters for creating or updating a machine learning workspace. @@ -72,7 +73,7 @@ func (client *WorkspacesClient) BeginCreateOrUpdate(ctx context.Context, resourc // CreateOrUpdate - Creates or updates a workspace with the specified parameters. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 func (client *WorkspacesClient) createOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, parameters Workspace, options *WorkspacesClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "WorkspacesClient.BeginCreateOrUpdate" @@ -114,7 +115,7 @@ func (client *WorkspacesClient) createOrUpdateCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { @@ -126,7 +127,7 @@ func (client *WorkspacesClient) createOrUpdateCreateRequest(ctx context.Context, // BeginDelete - Deletes a machine learning workspace. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - options - WorkspacesClientBeginDeleteOptions contains the optional parameters for the WorkspacesClient.BeginDelete method. @@ -150,7 +151,7 @@ func (client *WorkspacesClient) BeginDelete(ctx context.Context, resourceGroupNa // Delete - Deletes a machine learning workspace. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 func (client *WorkspacesClient) deleteOperation(ctx context.Context, resourceGroupName string, workspaceName string, options *WorkspacesClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "WorkspacesClient.BeginDelete" @@ -192,7 +193,10 @@ func (client *WorkspacesClient) deleteCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") + if options != nil && options.ForceToPurge != nil { + reqQP.Set("forceToPurge", strconv.FormatBool(*options.ForceToPurge)) + } req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -201,7 +205,7 @@ func (client *WorkspacesClient) deleteCreateRequest(ctx context.Context, resourc // BeginDiagnose - Diagnose workspace setup issue. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - options - WorkspacesClientBeginDiagnoseOptions contains the optional parameters for the WorkspacesClient.BeginDiagnose @@ -227,7 +231,7 @@ func (client *WorkspacesClient) BeginDiagnose(ctx context.Context, resourceGroup // Diagnose - Diagnose workspace setup issue. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 func (client *WorkspacesClient) diagnose(ctx context.Context, resourceGroupName string, workspaceName string, options *WorkspacesClientBeginDiagnoseOptions) (*http.Response, error) { var err error const operationName = "WorkspacesClient.BeginDiagnose" @@ -269,7 +273,7 @@ func (client *WorkspacesClient) diagnoseCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.Parameters != nil { @@ -284,7 +288,7 @@ func (client *WorkspacesClient) diagnoseCreateRequest(ctx context.Context, resou // Get - Gets the properties of the specified machine learning workspace. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - options - WorkspacesClientGetOptions contains the optional parameters for the WorkspacesClient.Get method. @@ -330,7 +334,7 @@ func (client *WorkspacesClient) getCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -347,7 +351,7 @@ func (client *WorkspacesClient) getHandleResponse(resp *http.Response) (Workspac // NewListByResourceGroupPager - Lists all the available machine learning workspaces under the specified resource group. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - options - WorkspacesClientListByResourceGroupOptions contains the optional parameters for the WorkspacesClient.NewListByResourceGroupPager // method. @@ -390,10 +394,10 @@ func (client *WorkspacesClient) listByResourceGroupCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") if options != nil && options.Skip != nil { reqQP.Set("$skip", *options.Skip) } + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -410,7 +414,7 @@ func (client *WorkspacesClient) listByResourceGroupHandleResponse(resp *http.Res // NewListBySubscriptionPager - Lists all the available machine learning workspaces under the specified subscription. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - options - WorkspacesClientListBySubscriptionOptions contains the optional parameters for the WorkspacesClient.NewListBySubscriptionPager // method. func (client *WorkspacesClient) NewListBySubscriptionPager(options *WorkspacesClientListBySubscriptionOptions) *runtime.Pager[WorkspacesClientListBySubscriptionResponse] { @@ -448,10 +452,10 @@ func (client *WorkspacesClient) listBySubscriptionCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") if options != nil && options.Skip != nil { reqQP.Set("$skip", *options.Skip) } + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -470,7 +474,7 @@ func (client *WorkspacesClient) listBySubscriptionHandleResponse(resp *http.Resp // and password for container registry // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - options - WorkspacesClientListKeysOptions contains the optional parameters for the WorkspacesClient.ListKeys method. @@ -516,7 +520,7 @@ func (client *WorkspacesClient) listKeysCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -534,7 +538,7 @@ func (client *WorkspacesClient) listKeysHandleResponse(resp *http.Response) (Wor // ListNotebookAccessToken - return notebook access token and refresh token // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - options - WorkspacesClientListNotebookAccessTokenOptions contains the optional parameters for the WorkspacesClient.ListNotebookAccessToken @@ -581,7 +585,7 @@ func (client *WorkspacesClient) listNotebookAccessTokenCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -599,7 +603,7 @@ func (client *WorkspacesClient) listNotebookAccessTokenHandleResponse(resp *http // ListNotebookKeys - List keys of a notebook. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - options - WorkspacesClientListNotebookKeysOptions contains the optional parameters for the WorkspacesClient.ListNotebookKeys @@ -646,7 +650,7 @@ func (client *WorkspacesClient) listNotebookKeysCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -665,7 +669,7 @@ func (client *WorkspacesClient) listNotebookKeysHandleResponse(resp *http.Respon // (FQDNs) programmatically. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - options - WorkspacesClientListOutboundNetworkDependenciesEndpointsOptions contains the optional parameters for the WorkspacesClient.ListOutboundNetworkDependenciesEndpoints @@ -712,7 +716,7 @@ func (client *WorkspacesClient) listOutboundNetworkDependenciesEndpointsCreateRe return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -730,7 +734,7 @@ func (client *WorkspacesClient) listOutboundNetworkDependenciesEndpointsHandleRe // ListStorageAccountKeys - List storage account keys of a workspace. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - options - WorkspacesClientListStorageAccountKeysOptions contains the optional parameters for the WorkspacesClient.ListStorageAccountKeys @@ -777,7 +781,7 @@ func (client *WorkspacesClient) listStorageAccountKeysCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -795,7 +799,7 @@ func (client *WorkspacesClient) listStorageAccountKeysHandleResponse(resp *http. // BeginPrepareNotebook - Prepare a notebook. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - options - WorkspacesClientBeginPrepareNotebookOptions contains the optional parameters for the WorkspacesClient.BeginPrepareNotebook @@ -821,7 +825,7 @@ func (client *WorkspacesClient) BeginPrepareNotebook(ctx context.Context, resour // PrepareNotebook - Prepare a notebook. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 func (client *WorkspacesClient) prepareNotebook(ctx context.Context, resourceGroupName string, workspaceName string, options *WorkspacesClientBeginPrepareNotebookOptions) (*http.Response, error) { var err error const operationName = "WorkspacesClient.BeginPrepareNotebook" @@ -863,7 +867,7 @@ func (client *WorkspacesClient) prepareNotebookCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -873,7 +877,7 @@ func (client *WorkspacesClient) prepareNotebookCreateRequest(ctx context.Context // and password for container registry // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - options - WorkspacesClientBeginResyncKeysOptions contains the optional parameters for the WorkspacesClient.BeginResyncKeys @@ -899,7 +903,7 @@ func (client *WorkspacesClient) BeginResyncKeys(ctx context.Context, resourceGro // and password for container registry // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 func (client *WorkspacesClient) resyncKeys(ctx context.Context, resourceGroupName string, workspaceName string, options *WorkspacesClientBeginResyncKeysOptions) (*http.Response, error) { var err error const operationName = "WorkspacesClient.BeginResyncKeys" @@ -941,7 +945,7 @@ func (client *WorkspacesClient) resyncKeysCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -950,7 +954,7 @@ func (client *WorkspacesClient) resyncKeysCreateRequest(ctx context.Context, res // BeginUpdate - Updates a machine learning workspace with the specified parameters. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - parameters - The parameters for updating a machine learning workspace. @@ -975,7 +979,7 @@ func (client *WorkspacesClient) BeginUpdate(ctx context.Context, resourceGroupNa // Update - Updates a machine learning workspace with the specified parameters. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-10-01 +// Generated from API version 2024-04-01 func (client *WorkspacesClient) update(ctx context.Context, resourceGroupName string, workspaceName string, parameters WorkspaceUpdateParameters, options *WorkspacesClientBeginUpdateOptions) (*http.Response, error) { var err error const operationName = "WorkspacesClient.BeginUpdate" @@ -1017,7 +1021,7 @@ func (client *WorkspacesClient) updateCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2024-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/CHANGELOG.md new file mode 100644 index 000000000..66c0ae881 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/CHANGELOG.md @@ -0,0 +1,281 @@ +# Release History + +## 1.2.0 (2023-11-30) +### Features Added + +- Support for test fakes and OpenTelemetry trace spans. + + +## 2.0.0-beta.2 (2023-09-22) +### Features Added + +- New enum type `FreeLimitExhaustionBehavior` with values `FreeLimitExhaustionBehaviorAutoPause`, `FreeLimitExhaustionBehaviorBillOverUsage` +- New field `EncryptionProtectorAutoRotation`, `FreeLimitExhaustionBehavior`, `UseFreeLimit` in struct `DatabaseProperties` +- New field `EncryptionProtectorAutoRotation`, `FreeLimitExhaustionBehavior`, `UseFreeLimit` in struct `DatabaseUpdateProperties` +- New field `TargetServer` in struct `FailoverGroupReadOnlyEndpoint` +- New field `PartnerServers` in struct `FailoverGroupUpdateProperties` +- New field `IsIPv6Enabled` in struct `ServerProperties` + + +## 2.0.0-beta.1 (2023-07-28) +### Breaking Changes + +- Function `*ServerDevOpsAuditSettingsClient.BeginCreateOrUpdate` parameter(s) have been changed from `(context.Context, string, string, string, ServerDevOpsAuditingSettings, *ServerDevOpsAuditSettingsClientBeginCreateOrUpdateOptions)` to `(context.Context, string, string, DevOpsAuditingSettingsName, ServerDevOpsAuditingSettings, *ServerDevOpsAuditSettingsClientBeginCreateOrUpdateOptions)` +- Function `*ServerDevOpsAuditSettingsClient.Get` parameter(s) have been changed from `(context.Context, string, string, string, *ServerDevOpsAuditSettingsClientGetOptions)` to `(context.Context, string, string, DevOpsAuditingSettingsName, *ServerDevOpsAuditSettingsClientGetOptions)` +- Type of `ManagedDatabaseRestoreDetailsProperties.NumberOfFilesDetected` has been changed from `*int64` to `*int32` +- Type of `ManagedDatabaseRestoreDetailsProperties.PercentCompleted` has been changed from `*float64` to `*int32` +- Type of `ManagedDatabaseRestoreDetailsProperties.UnrestorableFiles` has been changed from `[]*string` to `[]*ManagedDatabaseRestoreDetailsUnrestorableFileProperties` +- Type of `ServerProperties.PublicNetworkAccess` has been changed from `*ServerNetworkAccessFlag` to `*ServerPublicNetworkAccessFlag` +- Enum `DNSRefreshConfigurationPropertiesStatus` has been removed +- Operation `*ReplicationLinksClient.Delete` has been changed to LRO, use `*ReplicationLinksClient.BeginDelete` instead. +- Operation `*TransparentDataEncryptionsClient.CreateOrUpdate` has been changed to LRO, use `*TransparentDataEncryptionsClient.BeginCreateOrUpdate` instead. +- Operation `*VirtualClustersClient.UpdateDNSServers` has been changed to LRO, use `*VirtualClustersClient.BeginUpdateDNSServers` instead. +- Struct `DNSRefreshConfigurationProperties` has been removed +- Struct `UpdateManagedInstanceDNSServersOperation` has been removed +- Field `Family`, `MaintenanceConfigurationID` of struct `VirtualClusterProperties` has been removed + +### Features Added + +- New value `ManagedDatabaseStatusDbCopying`, `ManagedDatabaseStatusDbMoving`, `ManagedDatabaseStatusStarting`, `ManagedDatabaseStatusStopped`, `ManagedDatabaseStatusStopping` added to enum type `ManagedDatabaseStatus` +- New value `ReplicationLinkTypeSTANDBY` added to enum type `ReplicationLinkType` +- New value `SecondaryTypeStandby` added to enum type `SecondaryType` +- New enum type `AlwaysEncryptedEnclaveType` with values `AlwaysEncryptedEnclaveTypeDefault`, `AlwaysEncryptedEnclaveTypeVBS` +- New enum type `AvailabilityZoneType` with values `AvailabilityZoneTypeNoPreference`, `AvailabilityZoneTypeOne`, `AvailabilityZoneTypeThree`, `AvailabilityZoneTypeTwo` +- New enum type `BaselineName` with values `BaselineNameDefault` +- New enum type `DNSRefreshOperationStatus` with values `DNSRefreshOperationStatusFailed`, `DNSRefreshOperationStatusInProgress`, `DNSRefreshOperationStatusSucceeded` +- New enum type `DatabaseKeyType` with values `DatabaseKeyTypeAzureKeyVault` +- New enum type `DevOpsAuditingSettingsName` with values `DevOpsAuditingSettingsNameDefault` +- New enum type `DtcName` with values `DtcNameCurrent` +- New enum type `ExternalGovernanceStatus` with values `ExternalGovernanceStatusDisabled`, `ExternalGovernanceStatusEnabled` +- New enum type `ManagedLedgerDigestUploadsName` with values `ManagedLedgerDigestUploadsNameCurrent` +- New enum type `ManagedLedgerDigestUploadsState` with values `ManagedLedgerDigestUploadsStateDisabled`, `ManagedLedgerDigestUploadsStateEnabled` +- New enum type `MoveOperationMode` with values `MoveOperationModeCopy`, `MoveOperationModeMove` +- New enum type `RuleSeverity` with values `RuleSeverityHigh`, `RuleSeverityInformational`, `RuleSeverityLow`, `RuleSeverityMedium`, `RuleSeverityObsolete` +- New enum type `RuleStatus` with values `RuleStatusFinding`, `RuleStatusInternalError`, `RuleStatusNonFinding` +- New enum type `RuleType` with values `RuleTypeBaselineExpected`, `RuleTypeBinary`, `RuleTypeNegativeList`, `RuleTypePositiveList` +- New enum type `SQLVulnerabilityAssessmentName` with values `SQLVulnerabilityAssessmentNameDefault` +- New enum type `SQLVulnerabilityAssessmentState` with values `SQLVulnerabilityAssessmentStateDisabled`, `SQLVulnerabilityAssessmentStateEnabled` +- New enum type `SecondaryInstanceType` with values `SecondaryInstanceTypeGeo`, `SecondaryInstanceTypeStandby` +- New enum type `ServerConfigurationOptionName` with values `ServerConfigurationOptionNameAllowPolybaseExport` +- New enum type `ServerPublicNetworkAccessFlag` with values `ServerPublicNetworkAccessFlagDisabled`, `ServerPublicNetworkAccessFlagEnabled`, `ServerPublicNetworkAccessFlagSecuredByPerimeter` +- New enum type `StartStopScheduleName` with values `StartStopScheduleNameDefault` +- New function `*ClientFactory.NewDatabaseEncryptionProtectorsClient() *DatabaseEncryptionProtectorsClient` +- New function `*ClientFactory.NewDatabaseSQLVulnerabilityAssessmentBaselinesClient() *DatabaseSQLVulnerabilityAssessmentBaselinesClient` +- New function `*ClientFactory.NewDatabaseSQLVulnerabilityAssessmentExecuteScanClient() *DatabaseSQLVulnerabilityAssessmentExecuteScanClient` +- New function `*ClientFactory.NewDatabaseSQLVulnerabilityAssessmentRuleBaselinesClient() *DatabaseSQLVulnerabilityAssessmentRuleBaselinesClient` +- New function `*ClientFactory.NewDatabaseSQLVulnerabilityAssessmentScanResultClient() *DatabaseSQLVulnerabilityAssessmentScanResultClient` +- New function `*ClientFactory.NewDatabaseSQLVulnerabilityAssessmentScansClient() *DatabaseSQLVulnerabilityAssessmentScansClient` +- New function `*ClientFactory.NewDatabaseSQLVulnerabilityAssessmentsSettingsClient() *DatabaseSQLVulnerabilityAssessmentsSettingsClient` +- New function `*ClientFactory.NewManagedDatabaseAdvancedThreatProtectionSettingsClient() *ManagedDatabaseAdvancedThreatProtectionSettingsClient` +- New function `*ClientFactory.NewManagedDatabaseMoveOperationsClient() *ManagedDatabaseMoveOperationsClient` +- New function `*ClientFactory.NewManagedInstanceAdvancedThreatProtectionSettingsClient() *ManagedInstanceAdvancedThreatProtectionSettingsClient` +- New function `*ClientFactory.NewManagedInstanceDtcsClient() *ManagedInstanceDtcsClient` +- New function `*ClientFactory.NewManagedLedgerDigestUploadsClient() *ManagedLedgerDigestUploadsClient` +- New function `*ClientFactory.NewManagedServerDNSAliasesClient() *ManagedServerDNSAliasesClient` +- New function `*ClientFactory.NewServerConfigurationOptionsClient() *ServerConfigurationOptionsClient` +- New function `*ClientFactory.NewStartStopManagedInstanceSchedulesClient() *StartStopManagedInstanceSchedulesClient` +- New function `*ClientFactory.NewSynapseLinkWorkspacesClient() *SynapseLinkWorkspacesClient` +- New function `*ClientFactory.NewVulnerabilityAssessmentBaselineClient() *VulnerabilityAssessmentBaselineClient` +- New function `*ClientFactory.NewVulnerabilityAssessmentBaselinesClient() *VulnerabilityAssessmentBaselinesClient` +- New function `*ClientFactory.NewVulnerabilityAssessmentExecuteScanClient() *VulnerabilityAssessmentExecuteScanClient` +- New function `*ClientFactory.NewVulnerabilityAssessmentRuleBaselineClient() *VulnerabilityAssessmentRuleBaselineClient` +- New function `*ClientFactory.NewVulnerabilityAssessmentRuleBaselinesClient() *VulnerabilityAssessmentRuleBaselinesClient` +- New function `*ClientFactory.NewVulnerabilityAssessmentScanResultClient() *VulnerabilityAssessmentScanResultClient` +- New function `*ClientFactory.NewVulnerabilityAssessmentScansClient() *VulnerabilityAssessmentScansClient` +- New function `*ClientFactory.NewVulnerabilityAssessmentsClient() *VulnerabilityAssessmentsClient` +- New function `*ClientFactory.NewVulnerabilityAssessmentsSettingsClient() *VulnerabilityAssessmentsSettingsClient` +- New function `NewDatabaseEncryptionProtectorsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*DatabaseEncryptionProtectorsClient, error)` +- New function `*DatabaseEncryptionProtectorsClient.BeginRevalidate(context.Context, string, string, string, EncryptionProtectorName, *DatabaseEncryptionProtectorsClientBeginRevalidateOptions) (*runtime.Poller[DatabaseEncryptionProtectorsClientRevalidateResponse], error)` +- New function `*DatabaseEncryptionProtectorsClient.BeginRevert(context.Context, string, string, string, EncryptionProtectorName, *DatabaseEncryptionProtectorsClientBeginRevertOptions) (*runtime.Poller[DatabaseEncryptionProtectorsClientRevertResponse], error)` +- New function `NewDatabaseSQLVulnerabilityAssessmentBaselinesClient(string, azcore.TokenCredential, *arm.ClientOptions) (*DatabaseSQLVulnerabilityAssessmentBaselinesClient, error)` +- New function `*DatabaseSQLVulnerabilityAssessmentBaselinesClient.CreateOrUpdate(context.Context, string, string, string, VulnerabilityAssessmentName, BaselineName, DatabaseSQLVulnerabilityAssessmentRuleBaselineListInput, *DatabaseSQLVulnerabilityAssessmentBaselinesClientCreateOrUpdateOptions) (DatabaseSQLVulnerabilityAssessmentBaselinesClientCreateOrUpdateResponse, error)` +- New function `*DatabaseSQLVulnerabilityAssessmentBaselinesClient.Get(context.Context, string, string, string, VulnerabilityAssessmentName, BaselineName, *DatabaseSQLVulnerabilityAssessmentBaselinesClientGetOptions) (DatabaseSQLVulnerabilityAssessmentBaselinesClientGetResponse, error)` +- New function `*DatabaseSQLVulnerabilityAssessmentBaselinesClient.NewListBySQLVulnerabilityAssessmentPager(string, string, string, VulnerabilityAssessmentName, *DatabaseSQLVulnerabilityAssessmentBaselinesClientListBySQLVulnerabilityAssessmentOptions) *runtime.Pager[DatabaseSQLVulnerabilityAssessmentBaselinesClientListBySQLVulnerabilityAssessmentResponse]` +- New function `NewDatabaseSQLVulnerabilityAssessmentExecuteScanClient(string, azcore.TokenCredential, *arm.ClientOptions) (*DatabaseSQLVulnerabilityAssessmentExecuteScanClient, error)` +- New function `*DatabaseSQLVulnerabilityAssessmentExecuteScanClient.BeginExecute(context.Context, string, string, string, VulnerabilityAssessmentName, *DatabaseSQLVulnerabilityAssessmentExecuteScanClientBeginExecuteOptions) (*runtime.Poller[DatabaseSQLVulnerabilityAssessmentExecuteScanClientExecuteResponse], error)` +- New function `NewDatabaseSQLVulnerabilityAssessmentRuleBaselinesClient(string, azcore.TokenCredential, *arm.ClientOptions) (*DatabaseSQLVulnerabilityAssessmentRuleBaselinesClient, error)` +- New function `*DatabaseSQLVulnerabilityAssessmentRuleBaselinesClient.CreateOrUpdate(context.Context, string, string, string, VulnerabilityAssessmentName, BaselineName, string, DatabaseSQLVulnerabilityAssessmentRuleBaselineInput, *DatabaseSQLVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateOptions) (DatabaseSQLVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateResponse, error)` +- New function `*DatabaseSQLVulnerabilityAssessmentRuleBaselinesClient.Delete(context.Context, string, string, string, VulnerabilityAssessmentName, BaselineName, string, *DatabaseSQLVulnerabilityAssessmentRuleBaselinesClientDeleteOptions) (DatabaseSQLVulnerabilityAssessmentRuleBaselinesClientDeleteResponse, error)` +- New function `*DatabaseSQLVulnerabilityAssessmentRuleBaselinesClient.Get(context.Context, string, string, string, VulnerabilityAssessmentName, BaselineName, string, *DatabaseSQLVulnerabilityAssessmentRuleBaselinesClientGetOptions) (DatabaseSQLVulnerabilityAssessmentRuleBaselinesClientGetResponse, error)` +- New function `*DatabaseSQLVulnerabilityAssessmentRuleBaselinesClient.NewListByBaselinePager(string, string, string, VulnerabilityAssessmentName, BaselineName, *DatabaseSQLVulnerabilityAssessmentRuleBaselinesClientListByBaselineOptions) *runtime.Pager[DatabaseSQLVulnerabilityAssessmentRuleBaselinesClientListByBaselineResponse]` +- New function `NewDatabaseSQLVulnerabilityAssessmentScanResultClient(string, azcore.TokenCredential, *arm.ClientOptions) (*DatabaseSQLVulnerabilityAssessmentScanResultClient, error)` +- New function `*DatabaseSQLVulnerabilityAssessmentScanResultClient.Get(context.Context, string, string, string, SQLVulnerabilityAssessmentName, string, string, *DatabaseSQLVulnerabilityAssessmentScanResultClientGetOptions) (DatabaseSQLVulnerabilityAssessmentScanResultClientGetResponse, error)` +- New function `*DatabaseSQLVulnerabilityAssessmentScanResultClient.NewListByScanPager(string, string, string, SQLVulnerabilityAssessmentName, string, *DatabaseSQLVulnerabilityAssessmentScanResultClientListByScanOptions) *runtime.Pager[DatabaseSQLVulnerabilityAssessmentScanResultClientListByScanResponse]` +- New function `NewDatabaseSQLVulnerabilityAssessmentScansClient(string, azcore.TokenCredential, *arm.ClientOptions) (*DatabaseSQLVulnerabilityAssessmentScansClient, error)` +- New function `*DatabaseSQLVulnerabilityAssessmentScansClient.Get(context.Context, string, string, string, VulnerabilityAssessmentName, string, *DatabaseSQLVulnerabilityAssessmentScansClientGetOptions) (DatabaseSQLVulnerabilityAssessmentScansClientGetResponse, error)` +- New function `*DatabaseSQLVulnerabilityAssessmentScansClient.NewListBySQLVulnerabilityAssessmentsPager(string, string, string, VulnerabilityAssessmentName, *DatabaseSQLVulnerabilityAssessmentScansClientListBySQLVulnerabilityAssessmentsOptions) *runtime.Pager[DatabaseSQLVulnerabilityAssessmentScansClientListBySQLVulnerabilityAssessmentsResponse]` +- New function `NewDatabaseSQLVulnerabilityAssessmentsSettingsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*DatabaseSQLVulnerabilityAssessmentsSettingsClient, error)` +- New function `*DatabaseSQLVulnerabilityAssessmentsSettingsClient.Get(context.Context, string, string, string, SQLVulnerabilityAssessmentName, *DatabaseSQLVulnerabilityAssessmentsSettingsClientGetOptions) (DatabaseSQLVulnerabilityAssessmentsSettingsClientGetResponse, error)` +- New function `*DatabaseSQLVulnerabilityAssessmentsSettingsClient.NewListByDatabasePager(string, string, string, *DatabaseSQLVulnerabilityAssessmentsSettingsClientListByDatabaseOptions) *runtime.Pager[DatabaseSQLVulnerabilityAssessmentsSettingsClientListByDatabaseResponse]` +- New function `*FailoverGroupsClient.BeginTryPlannedBeforeForcedFailover(context.Context, string, string, string, *FailoverGroupsClientBeginTryPlannedBeforeForcedFailoverOptions) (*runtime.Poller[FailoverGroupsClientTryPlannedBeforeForcedFailoverResponse], error)` +- New function `NewManagedDatabaseAdvancedThreatProtectionSettingsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*ManagedDatabaseAdvancedThreatProtectionSettingsClient, error)` +- New function `*ManagedDatabaseAdvancedThreatProtectionSettingsClient.CreateOrUpdate(context.Context, string, string, string, AdvancedThreatProtectionName, ManagedDatabaseAdvancedThreatProtection, *ManagedDatabaseAdvancedThreatProtectionSettingsClientCreateOrUpdateOptions) (ManagedDatabaseAdvancedThreatProtectionSettingsClientCreateOrUpdateResponse, error)` +- New function `*ManagedDatabaseAdvancedThreatProtectionSettingsClient.Get(context.Context, string, string, string, AdvancedThreatProtectionName, *ManagedDatabaseAdvancedThreatProtectionSettingsClientGetOptions) (ManagedDatabaseAdvancedThreatProtectionSettingsClientGetResponse, error)` +- New function `*ManagedDatabaseAdvancedThreatProtectionSettingsClient.NewListByDatabasePager(string, string, string, *ManagedDatabaseAdvancedThreatProtectionSettingsClientListByDatabaseOptions) *runtime.Pager[ManagedDatabaseAdvancedThreatProtectionSettingsClientListByDatabaseResponse]` +- New function `NewManagedDatabaseMoveOperationsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*ManagedDatabaseMoveOperationsClient, error)` +- New function `*ManagedDatabaseMoveOperationsClient.Get(context.Context, string, string, string, *ManagedDatabaseMoveOperationsClientGetOptions) (ManagedDatabaseMoveOperationsClientGetResponse, error)` +- New function `*ManagedDatabaseMoveOperationsClient.NewListByLocationPager(string, string, *ManagedDatabaseMoveOperationsClientListByLocationOptions) *runtime.Pager[ManagedDatabaseMoveOperationsClientListByLocationResponse]` +- New function `*ManagedDatabasesClient.BeginCancelMove(context.Context, string, string, string, ManagedDatabaseMoveDefinition, *ManagedDatabasesClientBeginCancelMoveOptions) (*runtime.Poller[ManagedDatabasesClientCancelMoveResponse], error)` +- New function `*ManagedDatabasesClient.BeginCompleteMove(context.Context, string, string, string, ManagedDatabaseMoveDefinition, *ManagedDatabasesClientBeginCompleteMoveOptions) (*runtime.Poller[ManagedDatabasesClientCompleteMoveResponse], error)` +- New function `*ManagedDatabasesClient.BeginStartMove(context.Context, string, string, string, ManagedDatabaseStartMoveDefinition, *ManagedDatabasesClientBeginStartMoveOptions) (*runtime.Poller[ManagedDatabasesClientStartMoveResponse], error)` +- New function `NewManagedInstanceAdvancedThreatProtectionSettingsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*ManagedInstanceAdvancedThreatProtectionSettingsClient, error)` +- New function `*ManagedInstanceAdvancedThreatProtectionSettingsClient.BeginCreateOrUpdate(context.Context, string, string, AdvancedThreatProtectionName, ManagedInstanceAdvancedThreatProtection, *ManagedInstanceAdvancedThreatProtectionSettingsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ManagedInstanceAdvancedThreatProtectionSettingsClientCreateOrUpdateResponse], error)` +- New function `*ManagedInstanceAdvancedThreatProtectionSettingsClient.Get(context.Context, string, string, AdvancedThreatProtectionName, *ManagedInstanceAdvancedThreatProtectionSettingsClientGetOptions) (ManagedInstanceAdvancedThreatProtectionSettingsClientGetResponse, error)` +- New function `*ManagedInstanceAdvancedThreatProtectionSettingsClient.NewListByInstancePager(string, string, *ManagedInstanceAdvancedThreatProtectionSettingsClientListByInstanceOptions) *runtime.Pager[ManagedInstanceAdvancedThreatProtectionSettingsClientListByInstanceResponse]` +- New function `NewManagedInstanceDtcsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*ManagedInstanceDtcsClient, error)` +- New function `*ManagedInstanceDtcsClient.BeginCreateOrUpdate(context.Context, string, string, DtcName, ManagedInstanceDtc, *ManagedInstanceDtcsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ManagedInstanceDtcsClientCreateOrUpdateResponse], error)` +- New function `*ManagedInstanceDtcsClient.Get(context.Context, string, string, DtcName, *ManagedInstanceDtcsClientGetOptions) (ManagedInstanceDtcsClientGetResponse, error)` +- New function `*ManagedInstanceDtcsClient.NewListByManagedInstancePager(string, string, *ManagedInstanceDtcsClientListByManagedInstanceOptions) *runtime.Pager[ManagedInstanceDtcsClientListByManagedInstanceResponse]` +- New function `*ManagedInstancesClient.NewListOutboundNetworkDependenciesByManagedInstancePager(string, string, *ManagedInstancesClientListOutboundNetworkDependenciesByManagedInstanceOptions) *runtime.Pager[ManagedInstancesClientListOutboundNetworkDependenciesByManagedInstanceResponse]` +- New function `*ManagedInstancesClient.BeginStart(context.Context, string, string, *ManagedInstancesClientBeginStartOptions) (*runtime.Poller[ManagedInstancesClientStartResponse], error)` +- New function `*ManagedInstancesClient.BeginStop(context.Context, string, string, *ManagedInstancesClientBeginStopOptions) (*runtime.Poller[ManagedInstancesClientStopResponse], error)` +- New function `NewManagedLedgerDigestUploadsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*ManagedLedgerDigestUploadsClient, error)` +- New function `*ManagedLedgerDigestUploadsClient.BeginCreateOrUpdate(context.Context, string, string, string, ManagedLedgerDigestUploadsName, ManagedLedgerDigestUploads, *ManagedLedgerDigestUploadsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ManagedLedgerDigestUploadsClientCreateOrUpdateResponse], error)` +- New function `*ManagedLedgerDigestUploadsClient.BeginDisable(context.Context, string, string, string, ManagedLedgerDigestUploadsName, *ManagedLedgerDigestUploadsClientBeginDisableOptions) (*runtime.Poller[ManagedLedgerDigestUploadsClientDisableResponse], error)` +- New function `*ManagedLedgerDigestUploadsClient.Get(context.Context, string, string, string, ManagedLedgerDigestUploadsName, *ManagedLedgerDigestUploadsClientGetOptions) (ManagedLedgerDigestUploadsClientGetResponse, error)` +- New function `*ManagedLedgerDigestUploadsClient.NewListByDatabasePager(string, string, string, *ManagedLedgerDigestUploadsClientListByDatabaseOptions) *runtime.Pager[ManagedLedgerDigestUploadsClientListByDatabaseResponse]` +- New function `NewManagedServerDNSAliasesClient(string, azcore.TokenCredential, *arm.ClientOptions) (*ManagedServerDNSAliasesClient, error)` +- New function `*ManagedServerDNSAliasesClient.BeginAcquire(context.Context, string, string, string, ManagedServerDNSAliasAcquisition, *ManagedServerDNSAliasesClientBeginAcquireOptions) (*runtime.Poller[ManagedServerDNSAliasesClientAcquireResponse], error)` +- New function `*ManagedServerDNSAliasesClient.BeginCreateOrUpdate(context.Context, string, string, string, ManagedServerDNSAliasCreation, *ManagedServerDNSAliasesClientBeginCreateOrUpdateOptions) (*runtime.Poller[ManagedServerDNSAliasesClientCreateOrUpdateResponse], error)` +- New function `*ManagedServerDNSAliasesClient.BeginDelete(context.Context, string, string, string, *ManagedServerDNSAliasesClientBeginDeleteOptions) (*runtime.Poller[ManagedServerDNSAliasesClientDeleteResponse], error)` +- New function `*ManagedServerDNSAliasesClient.Get(context.Context, string, string, string, *ManagedServerDNSAliasesClientGetOptions) (ManagedServerDNSAliasesClientGetResponse, error)` +- New function `*ManagedServerDNSAliasesClient.NewListByManagedInstancePager(string, string, *ManagedServerDNSAliasesClientListByManagedInstanceOptions) *runtime.Pager[ManagedServerDNSAliasesClientListByManagedInstanceResponse]` +- New function `NewServerConfigurationOptionsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*ServerConfigurationOptionsClient, error)` +- New function `*ServerConfigurationOptionsClient.BeginCreateOrUpdate(context.Context, string, string, ServerConfigurationOptionName, ServerConfigurationOption, *ServerConfigurationOptionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ServerConfigurationOptionsClientCreateOrUpdateResponse], error)` +- New function `*ServerConfigurationOptionsClient.Get(context.Context, string, string, ServerConfigurationOptionName, *ServerConfigurationOptionsClientGetOptions) (ServerConfigurationOptionsClientGetResponse, error)` +- New function `*ServerConfigurationOptionsClient.NewListByManagedInstancePager(string, string, *ServerConfigurationOptionsClientListByManagedInstanceOptions) *runtime.Pager[ServerConfigurationOptionsClientListByManagedInstanceResponse]` +- New function `*ServersClient.BeginRefreshStatus(context.Context, string, string, *ServersClientBeginRefreshStatusOptions) (*runtime.Poller[ServersClientRefreshStatusResponse], error)` +- New function `NewStartStopManagedInstanceSchedulesClient(string, azcore.TokenCredential, *arm.ClientOptions) (*StartStopManagedInstanceSchedulesClient, error)` +- New function `*StartStopManagedInstanceSchedulesClient.CreateOrUpdate(context.Context, string, string, StartStopScheduleName, StartStopManagedInstanceSchedule, *StartStopManagedInstanceSchedulesClientCreateOrUpdateOptions) (StartStopManagedInstanceSchedulesClientCreateOrUpdateResponse, error)` +- New function `*StartStopManagedInstanceSchedulesClient.Delete(context.Context, string, string, StartStopScheduleName, *StartStopManagedInstanceSchedulesClientDeleteOptions) (StartStopManagedInstanceSchedulesClientDeleteResponse, error)` +- New function `*StartStopManagedInstanceSchedulesClient.Get(context.Context, string, string, StartStopScheduleName, *StartStopManagedInstanceSchedulesClientGetOptions) (StartStopManagedInstanceSchedulesClientGetResponse, error)` +- New function `*StartStopManagedInstanceSchedulesClient.NewListByInstancePager(string, string, *StartStopManagedInstanceSchedulesClientListByInstanceOptions) *runtime.Pager[StartStopManagedInstanceSchedulesClientListByInstanceResponse]` +- New function `NewSynapseLinkWorkspacesClient(string, azcore.TokenCredential, *arm.ClientOptions) (*SynapseLinkWorkspacesClient, error)` +- New function `*SynapseLinkWorkspacesClient.NewListByDatabasePager(string, string, string, *SynapseLinkWorkspacesClientListByDatabaseOptions) *runtime.Pager[SynapseLinkWorkspacesClientListByDatabaseResponse]` +- New function `NewVulnerabilityAssessmentBaselineClient(string, azcore.TokenCredential, *arm.ClientOptions) (*VulnerabilityAssessmentBaselineClient, error)` +- New function `*VulnerabilityAssessmentBaselineClient.Get(context.Context, string, string, VulnerabilityAssessmentName, BaselineName, *VulnerabilityAssessmentBaselineClientGetOptions) (VulnerabilityAssessmentBaselineClientGetResponse, error)` +- New function `*VulnerabilityAssessmentBaselineClient.NewListBySQLVulnerabilityAssessmentPager(string, string, VulnerabilityAssessmentName, *VulnerabilityAssessmentBaselineClientListBySQLVulnerabilityAssessmentOptions) *runtime.Pager[VulnerabilityAssessmentBaselineClientListBySQLVulnerabilityAssessmentResponse]` +- New function `NewVulnerabilityAssessmentBaselinesClient(string, azcore.TokenCredential, *arm.ClientOptions) (*VulnerabilityAssessmentBaselinesClient, error)` +- New function `*VulnerabilityAssessmentBaselinesClient.CreateOrUpdate(context.Context, string, string, VulnerabilityAssessmentName, BaselineName, DatabaseSQLVulnerabilityAssessmentRuleBaselineListInput, *VulnerabilityAssessmentBaselinesClientCreateOrUpdateOptions) (VulnerabilityAssessmentBaselinesClientCreateOrUpdateResponse, error)` +- New function `NewVulnerabilityAssessmentExecuteScanClient(string, azcore.TokenCredential, *arm.ClientOptions) (*VulnerabilityAssessmentExecuteScanClient, error)` +- New function `*VulnerabilityAssessmentExecuteScanClient.BeginExecute(context.Context, string, string, VulnerabilityAssessmentName, *VulnerabilityAssessmentExecuteScanClientBeginExecuteOptions) (*runtime.Poller[VulnerabilityAssessmentExecuteScanClientExecuteResponse], error)` +- New function `NewVulnerabilityAssessmentRuleBaselineClient(string, azcore.TokenCredential, *arm.ClientOptions) (*VulnerabilityAssessmentRuleBaselineClient, error)` +- New function `*VulnerabilityAssessmentRuleBaselineClient.CreateOrUpdate(context.Context, string, string, VulnerabilityAssessmentName, BaselineName, string, DatabaseSQLVulnerabilityAssessmentRuleBaselineInput, *VulnerabilityAssessmentRuleBaselineClientCreateOrUpdateOptions) (VulnerabilityAssessmentRuleBaselineClientCreateOrUpdateResponse, error)` +- New function `*VulnerabilityAssessmentRuleBaselineClient.Get(context.Context, string, string, VulnerabilityAssessmentName, BaselineName, string, *VulnerabilityAssessmentRuleBaselineClientGetOptions) (VulnerabilityAssessmentRuleBaselineClientGetResponse, error)` +- New function `*VulnerabilityAssessmentRuleBaselineClient.NewListByBaselinePager(string, string, VulnerabilityAssessmentName, BaselineName, *VulnerabilityAssessmentRuleBaselineClientListByBaselineOptions) *runtime.Pager[VulnerabilityAssessmentRuleBaselineClientListByBaselineResponse]` +- New function `NewVulnerabilityAssessmentRuleBaselinesClient(string, azcore.TokenCredential, *arm.ClientOptions) (*VulnerabilityAssessmentRuleBaselinesClient, error)` +- New function `*VulnerabilityAssessmentRuleBaselinesClient.Delete(context.Context, string, string, VulnerabilityAssessmentName, BaselineName, string, *VulnerabilityAssessmentRuleBaselinesClientDeleteOptions) (VulnerabilityAssessmentRuleBaselinesClientDeleteResponse, error)` +- New function `NewVulnerabilityAssessmentScanResultClient(string, azcore.TokenCredential, *arm.ClientOptions) (*VulnerabilityAssessmentScanResultClient, error)` +- New function `*VulnerabilityAssessmentScanResultClient.Get(context.Context, string, string, SQLVulnerabilityAssessmentName, string, string, *VulnerabilityAssessmentScanResultClientGetOptions) (VulnerabilityAssessmentScanResultClientGetResponse, error)` +- New function `*VulnerabilityAssessmentScanResultClient.NewListByScanPager(string, string, SQLVulnerabilityAssessmentName, string, *VulnerabilityAssessmentScanResultClientListByScanOptions) *runtime.Pager[VulnerabilityAssessmentScanResultClientListByScanResponse]` +- New function `NewVulnerabilityAssessmentScansClient(string, azcore.TokenCredential, *arm.ClientOptions) (*VulnerabilityAssessmentScansClient, error)` +- New function `*VulnerabilityAssessmentScansClient.Get(context.Context, string, string, VulnerabilityAssessmentName, string, *VulnerabilityAssessmentScansClientGetOptions) (VulnerabilityAssessmentScansClientGetResponse, error)` +- New function `*VulnerabilityAssessmentScansClient.NewListBySQLVulnerabilityAssessmentsPager(string, string, VulnerabilityAssessmentName, *VulnerabilityAssessmentScansClientListBySQLVulnerabilityAssessmentsOptions) *runtime.Pager[VulnerabilityAssessmentScansClientListBySQLVulnerabilityAssessmentsResponse]` +- New function `NewVulnerabilityAssessmentsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*VulnerabilityAssessmentsClient, error)` +- New function `*VulnerabilityAssessmentsClient.Delete(context.Context, string, string, VulnerabilityAssessmentName, *VulnerabilityAssessmentsClientDeleteOptions) (VulnerabilityAssessmentsClientDeleteResponse, error)` +- New function `NewVulnerabilityAssessmentsSettingsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*VulnerabilityAssessmentsSettingsClient, error)` +- New function `*VulnerabilityAssessmentsSettingsClient.CreateOrUpdate(context.Context, string, string, VulnerabilityAssessmentName, VulnerabilityAssessment, *VulnerabilityAssessmentsSettingsClientCreateOrUpdateOptions) (VulnerabilityAssessmentsSettingsClientCreateOrUpdateResponse, error)` +- New function `*VulnerabilityAssessmentsSettingsClient.Get(context.Context, string, string, SQLVulnerabilityAssessmentName, *VulnerabilityAssessmentsSettingsClientGetOptions) (VulnerabilityAssessmentsSettingsClientGetResponse, error)` +- New function `*VulnerabilityAssessmentsSettingsClient.NewListByServerPager(string, string, *VulnerabilityAssessmentsSettingsClientListByServerOptions) *runtime.Pager[VulnerabilityAssessmentsSettingsClientListByServerResponse]` +- New struct `Baseline` +- New struct `BaselineAdjustedResult` +- New struct `BenchmarkReference` +- New struct `DatabaseKey` +- New struct `DatabaseSQLVulnerabilityAssessmentBaselineSet` +- New struct `DatabaseSQLVulnerabilityAssessmentBaselineSetListResult` +- New struct `DatabaseSQLVulnerabilityAssessmentBaselineSetProperties` +- New struct `DatabaseSQLVulnerabilityAssessmentRuleBaseline` +- New struct `DatabaseSQLVulnerabilityAssessmentRuleBaselineInput` +- New struct `DatabaseSQLVulnerabilityAssessmentRuleBaselineInputProperties` +- New struct `DatabaseSQLVulnerabilityAssessmentRuleBaselineListInput` +- New struct `DatabaseSQLVulnerabilityAssessmentRuleBaselineListInputProperties` +- New struct `DatabaseSQLVulnerabilityAssessmentRuleBaselineListResult` +- New struct `DatabaseSQLVulnerabilityAssessmentRuleBaselineProperties` +- New struct `EndpointDependency` +- New struct `EndpointDetail` +- New struct `ManagedDatabaseAdvancedThreatProtection` +- New struct `ManagedDatabaseAdvancedThreatProtectionListResult` +- New struct `ManagedDatabaseMoveDefinition` +- New struct `ManagedDatabaseMoveOperationListResult` +- New struct `ManagedDatabaseMoveOperationResult` +- New struct `ManagedDatabaseMoveOperationResultProperties` +- New struct `ManagedDatabaseRestoreDetailsBackupSetProperties` +- New struct `ManagedDatabaseRestoreDetailsUnrestorableFileProperties` +- New struct `ManagedDatabaseStartMoveDefinition` +- New struct `ManagedInstanceAdvancedThreatProtection` +- New struct `ManagedInstanceAdvancedThreatProtectionListResult` +- New struct `ManagedInstanceDtc` +- New struct `ManagedInstanceDtcListResult` +- New struct `ManagedInstanceDtcProperties` +- New struct `ManagedInstanceDtcSecuritySettings` +- New struct `ManagedInstanceDtcTransactionManagerCommunicationSettings` +- New struct `ManagedLedgerDigestUploads` +- New struct `ManagedLedgerDigestUploadsListResult` +- New struct `ManagedLedgerDigestUploadsProperties` +- New struct `ManagedServerDNSAlias` +- New struct `ManagedServerDNSAliasAcquisition` +- New struct `ManagedServerDNSAliasCreation` +- New struct `ManagedServerDNSAliasListResult` +- New struct `ManagedServerDNSAliasProperties` +- New struct `OutboundEnvironmentEndpoint` +- New struct `OutboundEnvironmentEndpointCollection` +- New struct `QueryCheck` +- New struct `RefreshExternalGovernanceStatusOperationResult` +- New struct `RefreshExternalGovernanceStatusOperationResultProperties` +- New struct `Remediation` +- New struct `ScheduleItem` +- New struct `ServerConfigurationOption` +- New struct `ServerConfigurationOptionListResult` +- New struct `ServerConfigurationOptionProperties` +- New struct `StartStopManagedInstanceSchedule` +- New struct `StartStopManagedInstanceScheduleListResult` +- New struct `StartStopManagedInstanceScheduleProperties` +- New struct `SynapseLinkWorkspace` +- New struct `SynapseLinkWorkspaceInfoProperties` +- New struct `SynapseLinkWorkspaceListResult` +- New struct `SynapseLinkWorkspaceProperties` +- New struct `UpdateVirtualClusterDNSServersOperation` +- New struct `VaRule` +- New struct `VirtualClusterDNSServersProperties` +- New struct `VulnerabilityAssessment` +- New struct `VulnerabilityAssessmentListResult` +- New struct `VulnerabilityAssessmentPolicyProperties` +- New struct `VulnerabilityAssessmentScanForSQLError` +- New struct `VulnerabilityAssessmentScanListResult` +- New struct `VulnerabilityAssessmentScanRecordForSQL` +- New struct `VulnerabilityAssessmentScanRecordForSQLListResult` +- New struct `VulnerabilityAssessmentScanRecordForSQLProperties` +- New struct `VulnerabilityAssessmentScanResultProperties` +- New struct `VulnerabilityAssessmentScanResults` +- New field `AvailabilityZone`, `EncryptionProtector`, `Keys`, `ManualCutover`, `PerformCutover`, `PreferredEnclaveType` in struct `DatabaseProperties` +- New field `EncryptionProtector`, `Keys`, `ManualCutover`, `PerformCutover`, `PreferredEnclaveType` in struct `DatabaseUpdateProperties` +- New field `Expand`, `Filter` in struct `DatabasesClientGetOptions` +- New field `AvailabilityZone`, `MinCapacity`, `PreferredEnclaveType` in struct `ElasticPoolProperties` +- New field `AvailabilityZone`, `MinCapacity`, `PreferredEnclaveType` in struct `ElasticPoolUpdateProperties` +- New field `SecondaryType` in struct `InstanceFailoverGroupProperties` +- New field `CrossSubscriptionRestorableDroppedDatabaseID`, `CrossSubscriptionSourceDatabaseID`, `CrossSubscriptionTargetManagedInstanceID`, `IsLedgerOn`, `StorageContainerIdentity` in struct `ManagedDatabaseProperties` +- New field `CurrentBackupType`, `CurrentRestorePlanSizeMB`, `CurrentRestoredSizeMB`, `DiffBackupSets`, `FullBackupSets`, `LogBackupSets`, `NumberOfFilesQueued`, `NumberOfFilesRestored`, `NumberOfFilesRestoring`, `NumberOfFilesSkipped`, `NumberOfFilesUnrestorable`, `Type` in struct `ManagedDatabaseRestoreDetailsProperties` +- New field `GroupIDs` in struct `PrivateEndpointConnectionProperties` +- New field `NextLink` in struct `RecoverableDatabaseListResult` +- New field `Keys` in struct `RecoverableDatabaseProperties` +- New field `Expand`, `Filter` in struct `RecoverableDatabasesClientGetOptions` +- New field `Keys` in struct `RestorableDroppedDatabaseProperties` +- New field `Expand`, `Filter` in struct `RestorableDroppedDatabasesClientGetOptions` +- New field `IsManagedIdentityInUse` in struct `ServerDevOpsAuditSettingsProperties` +- New field `ExternalGovernanceStatus` in struct `ServerProperties` +- New field `Version` in struct `VirtualClusterProperties` + + +## 1.1.0 (2023-03-27) +### Features Added + +- New struct `ClientFactory` which is a client factory used to create any client in this module + + +## 1.0.0 (2022-06-02) + +The package of `github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql` is using our [next generation design principles](https://azure.github.io/azure-sdk/general_introduction.html) since version 1.0.0, which contains breaking changes. + +To migrate the existing applications to the latest version, please refer to [Migration Guide](https://aka.ms/azsdk/go/mgmt/migration). + +To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/go/mgmt). \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/LICENSE.txt b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/LICENSE.txt new file mode 100644 index 000000000..dc0c2ffb3 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/LICENSE.txt @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) Microsoft Corporation. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/README.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/README.md new file mode 100644 index 000000000..a45261de8 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/README.md @@ -0,0 +1,102 @@ +# Azure SQL Database Module for Go + +[![PkgGoDev](https://pkg.go.dev/badge/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql)](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql) + +The `armsql` module provides operations for working with Azure SQL Database. + +[Source code](https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/resourcemanager/sql/armsql) + +# Getting started + +## Prerequisites + +- an [Azure subscription](https://azure.microsoft.com/free/) +- Go 1.18 or above (You could download and install the latest version of Go from [here](https://go.dev/doc/install). It will replace the existing Go on your machine. If you want to install multiple Go versions on the same machine, you could refer this [doc](https://go.dev/doc/manage-install).) + +## Install the package + +This project uses [Go modules](https://github.com/golang/go/wiki/Modules) for versioning and dependency management. + +Install the Azure SQL Database module: + +```sh +go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql +``` + +## Authorization + +When creating a client, you will need to provide a credential for authenticating with Azure SQL Database. The `azidentity` module provides facilities for various ways of authenticating with Azure including client/secret, certificate, managed identity, and more. + +```go +cred, err := azidentity.NewDefaultAzureCredential(nil) +``` + +For more information on authentication, please see the documentation for `azidentity` at [pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity). + +## Client Factory + +Azure SQL Database module consists of one or more clients. We provide a client factory which could be used to create any client in this module. + +```go +clientFactory, err := armsql.NewClientFactory(, cred, nil) +``` + +You can use `ClientOptions` in package `github.com/Azure/azure-sdk-for-go/sdk/azcore/arm` to set endpoint to connect with public and sovereign clouds as well as Azure Stack. For more information, please see the documentation for `azcore` at [pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore). + +```go +options := arm.ClientOptions { + ClientOptions: azcore.ClientOptions { + Cloud: cloud.AzureChina, + }, +} +clientFactory, err := armsql.NewClientFactory(, cred, &options) +``` + +## Clients + +A client groups a set of related APIs, providing access to its functionality. Create one or more clients to access the APIs you require using client factory. + +```go +client := clientFactory.NewInstanceFailoverGroupsClient() +``` + +## Fakes + +The fake package contains types used for constructing in-memory fake servers used in unit tests. +This allows writing tests to cover various success/error conditions without the need for connecting to a live service. + +Please see https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/samples/fakes for details and examples on how to use fakes. + +## More sample code + +- [Database](https://aka.ms/azsdk/go/mgmt/samples?path=sdk/resourcemanager/sql/database) +- [Elastic Pool](https://aka.ms/azsdk/go/mgmt/samples?path=sdk/resourcemanager/sql/elastic_pool) +- [Failover Group](https://aka.ms/azsdk/go/mgmt/samples?path=sdk/resourcemanager/sql/failover_group) +- [Firewall Rule](https://aka.ms/azsdk/go/mgmt/samples?path=sdk/resourcemanager/sql/firewall_rule) +- [Job](https://aka.ms/azsdk/go/mgmt/samples?path=sdk/resourcemanager/sql/job) +- [Server](https://aka.ms/azsdk/go/mgmt/samples?path=sdk/resourcemanager/sql/server) +- [Sync](https://aka.ms/azsdk/go/mgmt/samples?path=sdk/resourcemanager/sql/sync) + +## Provide Feedback + +If you encounter bugs or have suggestions, please +[open an issue](https://github.com/Azure/azure-sdk-for-go/issues) and assign the `SQL Database` label. + +# Contributing + +This project welcomes contributions and suggestions. Most contributions require +you to agree to a Contributor License Agreement (CLA) declaring that you have +the right to, and actually do, grant us the rights to use your contribution. +For details, visit [https://cla.microsoft.com](https://cla.microsoft.com). + +When you submit a pull request, a CLA-bot will automatically determine whether +you need to provide a CLA and decorate the PR appropriately (e.g., label, +comment). Simply follow the instructions provided by the bot. You will only +need to do this once across all repos using our CLA. + +This project has adopted the +[Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). +For more information, see the +[Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) +or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any +additional questions or comments. \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/agent_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/agent_client.go new file mode 100644 index 000000000..b563605cd --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/agent_client.go @@ -0,0 +1,177 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// AgentClient contains the methods for the SQLAgent group. +// Don't use this type directly, use NewAgentClient() instead. +type AgentClient struct { + internal *arm.Client + subscriptionID string +} + +// NewAgentClient creates a new instance of AgentClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewAgentClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AgentClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &AgentClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Puts new sql agent configuration to instance. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - options - AgentClientCreateOrUpdateOptions contains the optional parameters for the AgentClient.CreateOrUpdate method. +func (client *AgentClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, parameters AgentConfiguration, options *AgentClientCreateOrUpdateOptions) (AgentClientCreateOrUpdateResponse, error) { + var err error + const operationName = "AgentClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, managedInstanceName, parameters, options) + if err != nil { + return AgentClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return AgentClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return AgentClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *AgentClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, parameters AgentConfiguration, options *AgentClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/sqlAgent/current" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *AgentClient) createOrUpdateHandleResponse(resp *http.Response) (AgentClientCreateOrUpdateResponse, error) { + result := AgentClientCreateOrUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.AgentConfiguration); err != nil { + return AgentClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// Get - Gets current instance sql agent configuration. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - options - AgentClientGetOptions contains the optional parameters for the AgentClient.Get method. +func (client *AgentClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, options *AgentClientGetOptions) (AgentClientGetResponse, error) { + var err error + const operationName = "AgentClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, managedInstanceName, options) + if err != nil { + return AgentClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return AgentClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return AgentClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *AgentClient) getCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, options *AgentClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/sqlAgent/current" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *AgentClient) getHandleResponse(resp *http.Response) (AgentClientGetResponse, error) { + result := AgentClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.AgentConfiguration); err != nil { + return AgentClientGetResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/autorest.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/autorest.md new file mode 100644 index 000000000..ce7365e96 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/autorest.md @@ -0,0 +1,13 @@ +### AutoRest Configuration + +> see https://aka.ms/autorest + +``` yaml +azure-arm: true +require: +- https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/readme.md +- https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/readme.go.md +license-header: MICROSOFT_MIT_NO_VERSION +module-version: 1.2.0 +tag: package-composite-v5 +``` \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/backupshorttermretentionpolicies_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/backupshorttermretentionpolicies_client.go new file mode 100644 index 000000000..57fc99bb2 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/backupshorttermretentionpolicies_client.go @@ -0,0 +1,373 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// BackupShortTermRetentionPoliciesClient contains the methods for the BackupShortTermRetentionPolicies group. +// Don't use this type directly, use NewBackupShortTermRetentionPoliciesClient() instead. +type BackupShortTermRetentionPoliciesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewBackupShortTermRetentionPoliciesClient creates a new instance of BackupShortTermRetentionPoliciesClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewBackupShortTermRetentionPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BackupShortTermRetentionPoliciesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &BackupShortTermRetentionPoliciesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Updates a database's short term retention policy. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-02-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database. +// - policyName - The policy name. Should always be "default". +// - parameters - The short term retention policy info. +// - options - BackupShortTermRetentionPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the BackupShortTermRetentionPoliciesClient.BeginCreateOrUpdate +// method. +func (client *BackupShortTermRetentionPoliciesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, policyName ShortTermRetentionPolicyName, parameters BackupShortTermRetentionPolicy, options *BackupShortTermRetentionPoliciesClientBeginCreateOrUpdateOptions) (*runtime.Poller[BackupShortTermRetentionPoliciesClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, serverName, databaseName, policyName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[BackupShortTermRetentionPoliciesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[BackupShortTermRetentionPoliciesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Updates a database's short term retention policy. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-02-01-preview +func (client *BackupShortTermRetentionPoliciesClient) createOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, policyName ShortTermRetentionPolicyName, parameters BackupShortTermRetentionPolicy, options *BackupShortTermRetentionPoliciesClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "BackupShortTermRetentionPoliciesClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serverName, databaseName, policyName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *BackupShortTermRetentionPoliciesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, policyName ShortTermRetentionPolicyName, parameters BackupShortTermRetentionPolicy, options *BackupShortTermRetentionPoliciesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupShortTermRetentionPolicies/{policyName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if policyName == "" { + return nil, errors.New("parameter policyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{policyName}", url.PathEscape(string(policyName))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-02-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// Get - Gets a database's short term retention policy. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-02-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database. +// - policyName - The policy name. Should always be "default". +// - options - BackupShortTermRetentionPoliciesClientGetOptions contains the optional parameters for the BackupShortTermRetentionPoliciesClient.Get +// method. +func (client *BackupShortTermRetentionPoliciesClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, policyName ShortTermRetentionPolicyName, options *BackupShortTermRetentionPoliciesClientGetOptions) (BackupShortTermRetentionPoliciesClientGetResponse, error) { + var err error + const operationName = "BackupShortTermRetentionPoliciesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serverName, databaseName, policyName, options) + if err != nil { + return BackupShortTermRetentionPoliciesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return BackupShortTermRetentionPoliciesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return BackupShortTermRetentionPoliciesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *BackupShortTermRetentionPoliciesClient) getCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, policyName ShortTermRetentionPolicyName, options *BackupShortTermRetentionPoliciesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupShortTermRetentionPolicies/{policyName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if policyName == "" { + return nil, errors.New("parameter policyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{policyName}", url.PathEscape(string(policyName))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-02-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *BackupShortTermRetentionPoliciesClient) getHandleResponse(resp *http.Response) (BackupShortTermRetentionPoliciesClientGetResponse, error) { + result := BackupShortTermRetentionPoliciesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.BackupShortTermRetentionPolicy); err != nil { + return BackupShortTermRetentionPoliciesClientGetResponse{}, err + } + return result, nil +} + +// NewListByDatabasePager - Gets a database's short term retention policy. +// +// Generated from API version 2021-02-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database. +// - options - BackupShortTermRetentionPoliciesClientListByDatabaseOptions contains the optional parameters for the BackupShortTermRetentionPoliciesClient.NewListByDatabasePager +// method. +func (client *BackupShortTermRetentionPoliciesClient) NewListByDatabasePager(resourceGroupName string, serverName string, databaseName string, options *BackupShortTermRetentionPoliciesClientListByDatabaseOptions) *runtime.Pager[BackupShortTermRetentionPoliciesClientListByDatabaseResponse] { + return runtime.NewPager(runtime.PagingHandler[BackupShortTermRetentionPoliciesClientListByDatabaseResponse]{ + More: func(page BackupShortTermRetentionPoliciesClientListByDatabaseResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *BackupShortTermRetentionPoliciesClientListByDatabaseResponse) (BackupShortTermRetentionPoliciesClientListByDatabaseResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "BackupShortTermRetentionPoliciesClient.NewListByDatabasePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByDatabaseCreateRequest(ctx, resourceGroupName, serverName, databaseName, options) + }, nil) + if err != nil { + return BackupShortTermRetentionPoliciesClientListByDatabaseResponse{}, err + } + return client.listByDatabaseHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByDatabaseCreateRequest creates the ListByDatabase request. +func (client *BackupShortTermRetentionPoliciesClient) listByDatabaseCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, options *BackupShortTermRetentionPoliciesClientListByDatabaseOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupShortTermRetentionPolicies" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-02-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByDatabaseHandleResponse handles the ListByDatabase response. +func (client *BackupShortTermRetentionPoliciesClient) listByDatabaseHandleResponse(resp *http.Response) (BackupShortTermRetentionPoliciesClientListByDatabaseResponse, error) { + result := BackupShortTermRetentionPoliciesClientListByDatabaseResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.BackupShortTermRetentionPolicyListResult); err != nil { + return BackupShortTermRetentionPoliciesClientListByDatabaseResponse{}, err + } + return result, nil +} + +// BeginUpdate - Updates a database's short term retention policy. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-02-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database. +// - policyName - The policy name. Should always be "default". +// - parameters - The short term retention policy info. +// - options - BackupShortTermRetentionPoliciesClientBeginUpdateOptions contains the optional parameters for the BackupShortTermRetentionPoliciesClient.BeginUpdate +// method. +func (client *BackupShortTermRetentionPoliciesClient) BeginUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, policyName ShortTermRetentionPolicyName, parameters BackupShortTermRetentionPolicy, options *BackupShortTermRetentionPoliciesClientBeginUpdateOptions) (*runtime.Poller[BackupShortTermRetentionPoliciesClientUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.update(ctx, resourceGroupName, serverName, databaseName, policyName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[BackupShortTermRetentionPoliciesClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[BackupShortTermRetentionPoliciesClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Update - Updates a database's short term retention policy. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-02-01-preview +func (client *BackupShortTermRetentionPoliciesClient) update(ctx context.Context, resourceGroupName string, serverName string, databaseName string, policyName ShortTermRetentionPolicyName, parameters BackupShortTermRetentionPolicy, options *BackupShortTermRetentionPoliciesClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "BackupShortTermRetentionPoliciesClient.BeginUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, serverName, databaseName, policyName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// updateCreateRequest creates the Update request. +func (client *BackupShortTermRetentionPoliciesClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, policyName ShortTermRetentionPolicyName, parameters BackupShortTermRetentionPolicy, options *BackupShortTermRetentionPoliciesClientBeginUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupShortTermRetentionPolicies/{policyName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if policyName == "" { + return nil, errors.New("parameter policyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{policyName}", url.PathEscape(string(policyName))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-02-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/build.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/build.go new file mode 100644 index 000000000..30b5ed42d --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/build.go @@ -0,0 +1,7 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +// This file enables 'go generate' to regenerate this specific SDK +//go:generate pwsh ../../../../eng/scripts/build.ps1 -skipBuild -cleanGenerated -format -tidy -generate resourcemanager/sql/armsql + +package armsql diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/capabilities_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/capabilities_client.go new file mode 100644 index 000000000..95ba3077c --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/capabilities_client.go @@ -0,0 +1,107 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// CapabilitiesClient contains the methods for the Capabilities group. +// Don't use this type directly, use NewCapabilitiesClient() instead. +type CapabilitiesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewCapabilitiesClient creates a new instance of CapabilitiesClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewCapabilitiesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CapabilitiesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &CapabilitiesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// ListByLocation - Gets the subscription capabilities available for the specified location. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - locationName - The location name whose capabilities are retrieved. +// - options - CapabilitiesClientListByLocationOptions contains the optional parameters for the CapabilitiesClient.ListByLocation +// method. +func (client *CapabilitiesClient) ListByLocation(ctx context.Context, locationName string, options *CapabilitiesClientListByLocationOptions) (CapabilitiesClientListByLocationResponse, error) { + var err error + const operationName = "CapabilitiesClient.ListByLocation" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listByLocationCreateRequest(ctx, locationName, options) + if err != nil { + return CapabilitiesClientListByLocationResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return CapabilitiesClientListByLocationResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return CapabilitiesClientListByLocationResponse{}, err + } + resp, err := client.listByLocationHandleResponse(httpResp) + return resp, err +} + +// listByLocationCreateRequest creates the ListByLocation request. +func (client *CapabilitiesClient) listByLocationCreateRequest(ctx context.Context, locationName string, options *CapabilitiesClientListByLocationOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/capabilities" + if locationName == "" { + return nil, errors.New("parameter locationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{locationName}", url.PathEscape(locationName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Include != nil { + reqQP.Set("include", string(*options.Include)) + } + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByLocationHandleResponse handles the ListByLocation response. +func (client *CapabilitiesClient) listByLocationHandleResponse(resp *http.Response) (CapabilitiesClientListByLocationResponse, error) { + result := CapabilitiesClientListByLocationResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.LocationCapabilities); err != nil { + return CapabilitiesClientListByLocationResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/ci.yml b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/ci.yml new file mode 100644 index 000000000..1bfc41336 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/ci.yml @@ -0,0 +1,28 @@ +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. +trigger: + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/resourcemanager/sql/armsql/ + +pr: + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/resourcemanager/sql/armsql/ + +stages: +- template: /eng/pipelines/templates/jobs/archetype-sdk-client.yml + parameters: + IncludeRelease: true + ServiceDirectory: 'resourcemanager/sql/armsql' diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/client_factory.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/client_factory.go new file mode 100644 index 000000000..726da3a4d --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/client_factory.go @@ -0,0 +1,782 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" +) + +// ClientFactory is a client factory used to create any client in this module. +// Don't use this type directly, use NewClientFactory instead. +type ClientFactory struct { + subscriptionID string + credential azcore.TokenCredential + options *arm.ClientOptions +} + +// NewClientFactory creates a new instance of ClientFactory with the specified values. +// The parameter values will be propagated to any client created from this factory. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error) { + _, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + return &ClientFactory{ + subscriptionID: subscriptionID, credential: credential, + options: options.Clone(), + }, nil +} + +// NewAgentClient creates a new instance of AgentClient. +func (c *ClientFactory) NewAgentClient() *AgentClient { + subClient, _ := NewAgentClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewBackupShortTermRetentionPoliciesClient creates a new instance of BackupShortTermRetentionPoliciesClient. +func (c *ClientFactory) NewBackupShortTermRetentionPoliciesClient() *BackupShortTermRetentionPoliciesClient { + subClient, _ := NewBackupShortTermRetentionPoliciesClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewCapabilitiesClient creates a new instance of CapabilitiesClient. +func (c *ClientFactory) NewCapabilitiesClient() *CapabilitiesClient { + subClient, _ := NewCapabilitiesClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewDataMaskingPoliciesClient creates a new instance of DataMaskingPoliciesClient. +func (c *ClientFactory) NewDataMaskingPoliciesClient() *DataMaskingPoliciesClient { + subClient, _ := NewDataMaskingPoliciesClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewDataMaskingRulesClient creates a new instance of DataMaskingRulesClient. +func (c *ClientFactory) NewDataMaskingRulesClient() *DataMaskingRulesClient { + subClient, _ := NewDataMaskingRulesClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewDataWarehouseUserActivitiesClient creates a new instance of DataWarehouseUserActivitiesClient. +func (c *ClientFactory) NewDataWarehouseUserActivitiesClient() *DataWarehouseUserActivitiesClient { + subClient, _ := NewDataWarehouseUserActivitiesClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewDatabaseAdvancedThreatProtectionSettingsClient creates a new instance of DatabaseAdvancedThreatProtectionSettingsClient. +func (c *ClientFactory) NewDatabaseAdvancedThreatProtectionSettingsClient() *DatabaseAdvancedThreatProtectionSettingsClient { + subClient, _ := NewDatabaseAdvancedThreatProtectionSettingsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewDatabaseAdvisorsClient creates a new instance of DatabaseAdvisorsClient. +func (c *ClientFactory) NewDatabaseAdvisorsClient() *DatabaseAdvisorsClient { + subClient, _ := NewDatabaseAdvisorsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewDatabaseAutomaticTuningClient creates a new instance of DatabaseAutomaticTuningClient. +func (c *ClientFactory) NewDatabaseAutomaticTuningClient() *DatabaseAutomaticTuningClient { + subClient, _ := NewDatabaseAutomaticTuningClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewDatabaseBlobAuditingPoliciesClient creates a new instance of DatabaseBlobAuditingPoliciesClient. +func (c *ClientFactory) NewDatabaseBlobAuditingPoliciesClient() *DatabaseBlobAuditingPoliciesClient { + subClient, _ := NewDatabaseBlobAuditingPoliciesClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewDatabaseColumnsClient creates a new instance of DatabaseColumnsClient. +func (c *ClientFactory) NewDatabaseColumnsClient() *DatabaseColumnsClient { + subClient, _ := NewDatabaseColumnsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewDatabaseExtensionsClient creates a new instance of DatabaseExtensionsClient. +func (c *ClientFactory) NewDatabaseExtensionsClient() *DatabaseExtensionsClient { + subClient, _ := NewDatabaseExtensionsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewDatabaseOperationsClient creates a new instance of DatabaseOperationsClient. +func (c *ClientFactory) NewDatabaseOperationsClient() *DatabaseOperationsClient { + subClient, _ := NewDatabaseOperationsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewDatabaseRecommendedActionsClient creates a new instance of DatabaseRecommendedActionsClient. +func (c *ClientFactory) NewDatabaseRecommendedActionsClient() *DatabaseRecommendedActionsClient { + subClient, _ := NewDatabaseRecommendedActionsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewDatabaseSchemasClient creates a new instance of DatabaseSchemasClient. +func (c *ClientFactory) NewDatabaseSchemasClient() *DatabaseSchemasClient { + subClient, _ := NewDatabaseSchemasClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewDatabaseSecurityAlertPoliciesClient creates a new instance of DatabaseSecurityAlertPoliciesClient. +func (c *ClientFactory) NewDatabaseSecurityAlertPoliciesClient() *DatabaseSecurityAlertPoliciesClient { + subClient, _ := NewDatabaseSecurityAlertPoliciesClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewDatabaseTablesClient creates a new instance of DatabaseTablesClient. +func (c *ClientFactory) NewDatabaseTablesClient() *DatabaseTablesClient { + subClient, _ := NewDatabaseTablesClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewDatabaseUsagesClient creates a new instance of DatabaseUsagesClient. +func (c *ClientFactory) NewDatabaseUsagesClient() *DatabaseUsagesClient { + subClient, _ := NewDatabaseUsagesClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewDatabaseVulnerabilityAssessmentRuleBaselinesClient creates a new instance of DatabaseVulnerabilityAssessmentRuleBaselinesClient. +func (c *ClientFactory) NewDatabaseVulnerabilityAssessmentRuleBaselinesClient() *DatabaseVulnerabilityAssessmentRuleBaselinesClient { + subClient, _ := NewDatabaseVulnerabilityAssessmentRuleBaselinesClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewDatabaseVulnerabilityAssessmentScansClient creates a new instance of DatabaseVulnerabilityAssessmentScansClient. +func (c *ClientFactory) NewDatabaseVulnerabilityAssessmentScansClient() *DatabaseVulnerabilityAssessmentScansClient { + subClient, _ := NewDatabaseVulnerabilityAssessmentScansClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewDatabaseVulnerabilityAssessmentsClient creates a new instance of DatabaseVulnerabilityAssessmentsClient. +func (c *ClientFactory) NewDatabaseVulnerabilityAssessmentsClient() *DatabaseVulnerabilityAssessmentsClient { + subClient, _ := NewDatabaseVulnerabilityAssessmentsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewDatabasesClient creates a new instance of DatabasesClient. +func (c *ClientFactory) NewDatabasesClient() *DatabasesClient { + subClient, _ := NewDatabasesClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewDeletedServersClient creates a new instance of DeletedServersClient. +func (c *ClientFactory) NewDeletedServersClient() *DeletedServersClient { + subClient, _ := NewDeletedServersClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewDistributedAvailabilityGroupsClient creates a new instance of DistributedAvailabilityGroupsClient. +func (c *ClientFactory) NewDistributedAvailabilityGroupsClient() *DistributedAvailabilityGroupsClient { + subClient, _ := NewDistributedAvailabilityGroupsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewElasticPoolActivitiesClient creates a new instance of ElasticPoolActivitiesClient. +func (c *ClientFactory) NewElasticPoolActivitiesClient() *ElasticPoolActivitiesClient { + subClient, _ := NewElasticPoolActivitiesClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewElasticPoolDatabaseActivitiesClient creates a new instance of ElasticPoolDatabaseActivitiesClient. +func (c *ClientFactory) NewElasticPoolDatabaseActivitiesClient() *ElasticPoolDatabaseActivitiesClient { + subClient, _ := NewElasticPoolDatabaseActivitiesClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewElasticPoolOperationsClient creates a new instance of ElasticPoolOperationsClient. +func (c *ClientFactory) NewElasticPoolOperationsClient() *ElasticPoolOperationsClient { + subClient, _ := NewElasticPoolOperationsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewElasticPoolsClient creates a new instance of ElasticPoolsClient. +func (c *ClientFactory) NewElasticPoolsClient() *ElasticPoolsClient { + subClient, _ := NewElasticPoolsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewEncryptionProtectorsClient creates a new instance of EncryptionProtectorsClient. +func (c *ClientFactory) NewEncryptionProtectorsClient() *EncryptionProtectorsClient { + subClient, _ := NewEncryptionProtectorsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewEndpointCertificatesClient creates a new instance of EndpointCertificatesClient. +func (c *ClientFactory) NewEndpointCertificatesClient() *EndpointCertificatesClient { + subClient, _ := NewEndpointCertificatesClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewExtendedDatabaseBlobAuditingPoliciesClient creates a new instance of ExtendedDatabaseBlobAuditingPoliciesClient. +func (c *ClientFactory) NewExtendedDatabaseBlobAuditingPoliciesClient() *ExtendedDatabaseBlobAuditingPoliciesClient { + subClient, _ := NewExtendedDatabaseBlobAuditingPoliciesClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewExtendedServerBlobAuditingPoliciesClient creates a new instance of ExtendedServerBlobAuditingPoliciesClient. +func (c *ClientFactory) NewExtendedServerBlobAuditingPoliciesClient() *ExtendedServerBlobAuditingPoliciesClient { + subClient, _ := NewExtendedServerBlobAuditingPoliciesClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewFailoverGroupsClient creates a new instance of FailoverGroupsClient. +func (c *ClientFactory) NewFailoverGroupsClient() *FailoverGroupsClient { + subClient, _ := NewFailoverGroupsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewFirewallRulesClient creates a new instance of FirewallRulesClient. +func (c *ClientFactory) NewFirewallRulesClient() *FirewallRulesClient { + subClient, _ := NewFirewallRulesClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewGeoBackupPoliciesClient creates a new instance of GeoBackupPoliciesClient. +func (c *ClientFactory) NewGeoBackupPoliciesClient() *GeoBackupPoliciesClient { + subClient, _ := NewGeoBackupPoliciesClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewIPv6FirewallRulesClient creates a new instance of IPv6FirewallRulesClient. +func (c *ClientFactory) NewIPv6FirewallRulesClient() *IPv6FirewallRulesClient { + subClient, _ := NewIPv6FirewallRulesClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewInstanceFailoverGroupsClient creates a new instance of InstanceFailoverGroupsClient. +func (c *ClientFactory) NewInstanceFailoverGroupsClient() *InstanceFailoverGroupsClient { + subClient, _ := NewInstanceFailoverGroupsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewInstancePoolsClient creates a new instance of InstancePoolsClient. +func (c *ClientFactory) NewInstancePoolsClient() *InstancePoolsClient { + subClient, _ := NewInstancePoolsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewJobAgentsClient creates a new instance of JobAgentsClient. +func (c *ClientFactory) NewJobAgentsClient() *JobAgentsClient { + subClient, _ := NewJobAgentsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewJobCredentialsClient creates a new instance of JobCredentialsClient. +func (c *ClientFactory) NewJobCredentialsClient() *JobCredentialsClient { + subClient, _ := NewJobCredentialsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewJobExecutionsClient creates a new instance of JobExecutionsClient. +func (c *ClientFactory) NewJobExecutionsClient() *JobExecutionsClient { + subClient, _ := NewJobExecutionsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewJobStepExecutionsClient creates a new instance of JobStepExecutionsClient. +func (c *ClientFactory) NewJobStepExecutionsClient() *JobStepExecutionsClient { + subClient, _ := NewJobStepExecutionsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewJobStepsClient creates a new instance of JobStepsClient. +func (c *ClientFactory) NewJobStepsClient() *JobStepsClient { + subClient, _ := NewJobStepsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewJobTargetExecutionsClient creates a new instance of JobTargetExecutionsClient. +func (c *ClientFactory) NewJobTargetExecutionsClient() *JobTargetExecutionsClient { + subClient, _ := NewJobTargetExecutionsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewJobTargetGroupsClient creates a new instance of JobTargetGroupsClient. +func (c *ClientFactory) NewJobTargetGroupsClient() *JobTargetGroupsClient { + subClient, _ := NewJobTargetGroupsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewJobVersionsClient creates a new instance of JobVersionsClient. +func (c *ClientFactory) NewJobVersionsClient() *JobVersionsClient { + subClient, _ := NewJobVersionsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewJobsClient creates a new instance of JobsClient. +func (c *ClientFactory) NewJobsClient() *JobsClient { + subClient, _ := NewJobsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewLedgerDigestUploadsClient creates a new instance of LedgerDigestUploadsClient. +func (c *ClientFactory) NewLedgerDigestUploadsClient() *LedgerDigestUploadsClient { + subClient, _ := NewLedgerDigestUploadsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewLongTermRetentionBackupsClient creates a new instance of LongTermRetentionBackupsClient. +func (c *ClientFactory) NewLongTermRetentionBackupsClient() *LongTermRetentionBackupsClient { + subClient, _ := NewLongTermRetentionBackupsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewLongTermRetentionManagedInstanceBackupsClient creates a new instance of LongTermRetentionManagedInstanceBackupsClient. +func (c *ClientFactory) NewLongTermRetentionManagedInstanceBackupsClient() *LongTermRetentionManagedInstanceBackupsClient { + subClient, _ := NewLongTermRetentionManagedInstanceBackupsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewLongTermRetentionPoliciesClient creates a new instance of LongTermRetentionPoliciesClient. +func (c *ClientFactory) NewLongTermRetentionPoliciesClient() *LongTermRetentionPoliciesClient { + subClient, _ := NewLongTermRetentionPoliciesClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewMaintenanceWindowOptionsClient creates a new instance of MaintenanceWindowOptionsClient. +func (c *ClientFactory) NewMaintenanceWindowOptionsClient() *MaintenanceWindowOptionsClient { + subClient, _ := NewMaintenanceWindowOptionsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewMaintenanceWindowsClient creates a new instance of MaintenanceWindowsClient. +func (c *ClientFactory) NewMaintenanceWindowsClient() *MaintenanceWindowsClient { + subClient, _ := NewMaintenanceWindowsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewManagedBackupShortTermRetentionPoliciesClient creates a new instance of ManagedBackupShortTermRetentionPoliciesClient. +func (c *ClientFactory) NewManagedBackupShortTermRetentionPoliciesClient() *ManagedBackupShortTermRetentionPoliciesClient { + subClient, _ := NewManagedBackupShortTermRetentionPoliciesClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewManagedDatabaseColumnsClient creates a new instance of ManagedDatabaseColumnsClient. +func (c *ClientFactory) NewManagedDatabaseColumnsClient() *ManagedDatabaseColumnsClient { + subClient, _ := NewManagedDatabaseColumnsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewManagedDatabaseQueriesClient creates a new instance of ManagedDatabaseQueriesClient. +func (c *ClientFactory) NewManagedDatabaseQueriesClient() *ManagedDatabaseQueriesClient { + subClient, _ := NewManagedDatabaseQueriesClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewManagedDatabaseRecommendedSensitivityLabelsClient creates a new instance of ManagedDatabaseRecommendedSensitivityLabelsClient. +func (c *ClientFactory) NewManagedDatabaseRecommendedSensitivityLabelsClient() *ManagedDatabaseRecommendedSensitivityLabelsClient { + subClient, _ := NewManagedDatabaseRecommendedSensitivityLabelsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewManagedDatabaseRestoreDetailsClient creates a new instance of ManagedDatabaseRestoreDetailsClient. +func (c *ClientFactory) NewManagedDatabaseRestoreDetailsClient() *ManagedDatabaseRestoreDetailsClient { + subClient, _ := NewManagedDatabaseRestoreDetailsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewManagedDatabaseSchemasClient creates a new instance of ManagedDatabaseSchemasClient. +func (c *ClientFactory) NewManagedDatabaseSchemasClient() *ManagedDatabaseSchemasClient { + subClient, _ := NewManagedDatabaseSchemasClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewManagedDatabaseSecurityAlertPoliciesClient creates a new instance of ManagedDatabaseSecurityAlertPoliciesClient. +func (c *ClientFactory) NewManagedDatabaseSecurityAlertPoliciesClient() *ManagedDatabaseSecurityAlertPoliciesClient { + subClient, _ := NewManagedDatabaseSecurityAlertPoliciesClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewManagedDatabaseSecurityEventsClient creates a new instance of ManagedDatabaseSecurityEventsClient. +func (c *ClientFactory) NewManagedDatabaseSecurityEventsClient() *ManagedDatabaseSecurityEventsClient { + subClient, _ := NewManagedDatabaseSecurityEventsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewManagedDatabaseSensitivityLabelsClient creates a new instance of ManagedDatabaseSensitivityLabelsClient. +func (c *ClientFactory) NewManagedDatabaseSensitivityLabelsClient() *ManagedDatabaseSensitivityLabelsClient { + subClient, _ := NewManagedDatabaseSensitivityLabelsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewManagedDatabaseTablesClient creates a new instance of ManagedDatabaseTablesClient. +func (c *ClientFactory) NewManagedDatabaseTablesClient() *ManagedDatabaseTablesClient { + subClient, _ := NewManagedDatabaseTablesClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewManagedDatabaseTransparentDataEncryptionClient creates a new instance of ManagedDatabaseTransparentDataEncryptionClient. +func (c *ClientFactory) NewManagedDatabaseTransparentDataEncryptionClient() *ManagedDatabaseTransparentDataEncryptionClient { + subClient, _ := NewManagedDatabaseTransparentDataEncryptionClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient creates a new instance of ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient. +func (c *ClientFactory) NewManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient() *ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient { + subClient, _ := NewManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewManagedDatabaseVulnerabilityAssessmentScansClient creates a new instance of ManagedDatabaseVulnerabilityAssessmentScansClient. +func (c *ClientFactory) NewManagedDatabaseVulnerabilityAssessmentScansClient() *ManagedDatabaseVulnerabilityAssessmentScansClient { + subClient, _ := NewManagedDatabaseVulnerabilityAssessmentScansClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewManagedDatabaseVulnerabilityAssessmentsClient creates a new instance of ManagedDatabaseVulnerabilityAssessmentsClient. +func (c *ClientFactory) NewManagedDatabaseVulnerabilityAssessmentsClient() *ManagedDatabaseVulnerabilityAssessmentsClient { + subClient, _ := NewManagedDatabaseVulnerabilityAssessmentsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewManagedDatabasesClient creates a new instance of ManagedDatabasesClient. +func (c *ClientFactory) NewManagedDatabasesClient() *ManagedDatabasesClient { + subClient, _ := NewManagedDatabasesClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewManagedInstanceAdministratorsClient creates a new instance of ManagedInstanceAdministratorsClient. +func (c *ClientFactory) NewManagedInstanceAdministratorsClient() *ManagedInstanceAdministratorsClient { + subClient, _ := NewManagedInstanceAdministratorsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewManagedInstanceAzureADOnlyAuthenticationsClient creates a new instance of ManagedInstanceAzureADOnlyAuthenticationsClient. +func (c *ClientFactory) NewManagedInstanceAzureADOnlyAuthenticationsClient() *ManagedInstanceAzureADOnlyAuthenticationsClient { + subClient, _ := NewManagedInstanceAzureADOnlyAuthenticationsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewManagedInstanceEncryptionProtectorsClient creates a new instance of ManagedInstanceEncryptionProtectorsClient. +func (c *ClientFactory) NewManagedInstanceEncryptionProtectorsClient() *ManagedInstanceEncryptionProtectorsClient { + subClient, _ := NewManagedInstanceEncryptionProtectorsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewManagedInstanceKeysClient creates a new instance of ManagedInstanceKeysClient. +func (c *ClientFactory) NewManagedInstanceKeysClient() *ManagedInstanceKeysClient { + subClient, _ := NewManagedInstanceKeysClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewManagedInstanceLongTermRetentionPoliciesClient creates a new instance of ManagedInstanceLongTermRetentionPoliciesClient. +func (c *ClientFactory) NewManagedInstanceLongTermRetentionPoliciesClient() *ManagedInstanceLongTermRetentionPoliciesClient { + subClient, _ := NewManagedInstanceLongTermRetentionPoliciesClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewManagedInstanceOperationsClient creates a new instance of ManagedInstanceOperationsClient. +func (c *ClientFactory) NewManagedInstanceOperationsClient() *ManagedInstanceOperationsClient { + subClient, _ := NewManagedInstanceOperationsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewManagedInstancePrivateEndpointConnectionsClient creates a new instance of ManagedInstancePrivateEndpointConnectionsClient. +func (c *ClientFactory) NewManagedInstancePrivateEndpointConnectionsClient() *ManagedInstancePrivateEndpointConnectionsClient { + subClient, _ := NewManagedInstancePrivateEndpointConnectionsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewManagedInstancePrivateLinkResourcesClient creates a new instance of ManagedInstancePrivateLinkResourcesClient. +func (c *ClientFactory) NewManagedInstancePrivateLinkResourcesClient() *ManagedInstancePrivateLinkResourcesClient { + subClient, _ := NewManagedInstancePrivateLinkResourcesClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewManagedInstanceTdeCertificatesClient creates a new instance of ManagedInstanceTdeCertificatesClient. +func (c *ClientFactory) NewManagedInstanceTdeCertificatesClient() *ManagedInstanceTdeCertificatesClient { + subClient, _ := NewManagedInstanceTdeCertificatesClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewManagedInstanceVulnerabilityAssessmentsClient creates a new instance of ManagedInstanceVulnerabilityAssessmentsClient. +func (c *ClientFactory) NewManagedInstanceVulnerabilityAssessmentsClient() *ManagedInstanceVulnerabilityAssessmentsClient { + subClient, _ := NewManagedInstanceVulnerabilityAssessmentsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewManagedInstancesClient creates a new instance of ManagedInstancesClient. +func (c *ClientFactory) NewManagedInstancesClient() *ManagedInstancesClient { + subClient, _ := NewManagedInstancesClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient creates a new instance of ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient. +func (c *ClientFactory) NewManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient() *ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient { + subClient, _ := NewManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewManagedServerSecurityAlertPoliciesClient creates a new instance of ManagedServerSecurityAlertPoliciesClient. +func (c *ClientFactory) NewManagedServerSecurityAlertPoliciesClient() *ManagedServerSecurityAlertPoliciesClient { + subClient, _ := NewManagedServerSecurityAlertPoliciesClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewOperationsClient creates a new instance of OperationsClient. +func (c *ClientFactory) NewOperationsClient() *OperationsClient { + subClient, _ := NewOperationsClient(c.credential, c.options) + return subClient +} + +// NewOutboundFirewallRulesClient creates a new instance of OutboundFirewallRulesClient. +func (c *ClientFactory) NewOutboundFirewallRulesClient() *OutboundFirewallRulesClient { + subClient, _ := NewOutboundFirewallRulesClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewPrivateEndpointConnectionsClient creates a new instance of PrivateEndpointConnectionsClient. +func (c *ClientFactory) NewPrivateEndpointConnectionsClient() *PrivateEndpointConnectionsClient { + subClient, _ := NewPrivateEndpointConnectionsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewPrivateLinkResourcesClient creates a new instance of PrivateLinkResourcesClient. +func (c *ClientFactory) NewPrivateLinkResourcesClient() *PrivateLinkResourcesClient { + subClient, _ := NewPrivateLinkResourcesClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewRecommendedSensitivityLabelsClient creates a new instance of RecommendedSensitivityLabelsClient. +func (c *ClientFactory) NewRecommendedSensitivityLabelsClient() *RecommendedSensitivityLabelsClient { + subClient, _ := NewRecommendedSensitivityLabelsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewRecoverableDatabasesClient creates a new instance of RecoverableDatabasesClient. +func (c *ClientFactory) NewRecoverableDatabasesClient() *RecoverableDatabasesClient { + subClient, _ := NewRecoverableDatabasesClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewRecoverableManagedDatabasesClient creates a new instance of RecoverableManagedDatabasesClient. +func (c *ClientFactory) NewRecoverableManagedDatabasesClient() *RecoverableManagedDatabasesClient { + subClient, _ := NewRecoverableManagedDatabasesClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewReplicationLinksClient creates a new instance of ReplicationLinksClient. +func (c *ClientFactory) NewReplicationLinksClient() *ReplicationLinksClient { + subClient, _ := NewReplicationLinksClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewRestorableDroppedDatabasesClient creates a new instance of RestorableDroppedDatabasesClient. +func (c *ClientFactory) NewRestorableDroppedDatabasesClient() *RestorableDroppedDatabasesClient { + subClient, _ := NewRestorableDroppedDatabasesClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewRestorableDroppedManagedDatabasesClient creates a new instance of RestorableDroppedManagedDatabasesClient. +func (c *ClientFactory) NewRestorableDroppedManagedDatabasesClient() *RestorableDroppedManagedDatabasesClient { + subClient, _ := NewRestorableDroppedManagedDatabasesClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewRestorePointsClient creates a new instance of RestorePointsClient. +func (c *ClientFactory) NewRestorePointsClient() *RestorePointsClient { + subClient, _ := NewRestorePointsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewSensitivityLabelsClient creates a new instance of SensitivityLabelsClient. +func (c *ClientFactory) NewSensitivityLabelsClient() *SensitivityLabelsClient { + subClient, _ := NewSensitivityLabelsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewServerAdvancedThreatProtectionSettingsClient creates a new instance of ServerAdvancedThreatProtectionSettingsClient. +func (c *ClientFactory) NewServerAdvancedThreatProtectionSettingsClient() *ServerAdvancedThreatProtectionSettingsClient { + subClient, _ := NewServerAdvancedThreatProtectionSettingsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewServerAdvisorsClient creates a new instance of ServerAdvisorsClient. +func (c *ClientFactory) NewServerAdvisorsClient() *ServerAdvisorsClient { + subClient, _ := NewServerAdvisorsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewServerAutomaticTuningClient creates a new instance of ServerAutomaticTuningClient. +func (c *ClientFactory) NewServerAutomaticTuningClient() *ServerAutomaticTuningClient { + subClient, _ := NewServerAutomaticTuningClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewServerAzureADAdministratorsClient creates a new instance of ServerAzureADAdministratorsClient. +func (c *ClientFactory) NewServerAzureADAdministratorsClient() *ServerAzureADAdministratorsClient { + subClient, _ := NewServerAzureADAdministratorsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewServerAzureADOnlyAuthenticationsClient creates a new instance of ServerAzureADOnlyAuthenticationsClient. +func (c *ClientFactory) NewServerAzureADOnlyAuthenticationsClient() *ServerAzureADOnlyAuthenticationsClient { + subClient, _ := NewServerAzureADOnlyAuthenticationsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewServerBlobAuditingPoliciesClient creates a new instance of ServerBlobAuditingPoliciesClient. +func (c *ClientFactory) NewServerBlobAuditingPoliciesClient() *ServerBlobAuditingPoliciesClient { + subClient, _ := NewServerBlobAuditingPoliciesClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewServerCommunicationLinksClient creates a new instance of ServerCommunicationLinksClient. +func (c *ClientFactory) NewServerCommunicationLinksClient() *ServerCommunicationLinksClient { + subClient, _ := NewServerCommunicationLinksClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewServerConnectionPoliciesClient creates a new instance of ServerConnectionPoliciesClient. +func (c *ClientFactory) NewServerConnectionPoliciesClient() *ServerConnectionPoliciesClient { + subClient, _ := NewServerConnectionPoliciesClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewServerDNSAliasesClient creates a new instance of ServerDNSAliasesClient. +func (c *ClientFactory) NewServerDNSAliasesClient() *ServerDNSAliasesClient { + subClient, _ := NewServerDNSAliasesClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewServerDevOpsAuditSettingsClient creates a new instance of ServerDevOpsAuditSettingsClient. +func (c *ClientFactory) NewServerDevOpsAuditSettingsClient() *ServerDevOpsAuditSettingsClient { + subClient, _ := NewServerDevOpsAuditSettingsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewServerKeysClient creates a new instance of ServerKeysClient. +func (c *ClientFactory) NewServerKeysClient() *ServerKeysClient { + subClient, _ := NewServerKeysClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewServerOperationsClient creates a new instance of ServerOperationsClient. +func (c *ClientFactory) NewServerOperationsClient() *ServerOperationsClient { + subClient, _ := NewServerOperationsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewServerSecurityAlertPoliciesClient creates a new instance of ServerSecurityAlertPoliciesClient. +func (c *ClientFactory) NewServerSecurityAlertPoliciesClient() *ServerSecurityAlertPoliciesClient { + subClient, _ := NewServerSecurityAlertPoliciesClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewServerTrustCertificatesClient creates a new instance of ServerTrustCertificatesClient. +func (c *ClientFactory) NewServerTrustCertificatesClient() *ServerTrustCertificatesClient { + subClient, _ := NewServerTrustCertificatesClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewServerTrustGroupsClient creates a new instance of ServerTrustGroupsClient. +func (c *ClientFactory) NewServerTrustGroupsClient() *ServerTrustGroupsClient { + subClient, _ := NewServerTrustGroupsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewServerUsagesClient creates a new instance of ServerUsagesClient. +func (c *ClientFactory) NewServerUsagesClient() *ServerUsagesClient { + subClient, _ := NewServerUsagesClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewServerVulnerabilityAssessmentsClient creates a new instance of ServerVulnerabilityAssessmentsClient. +func (c *ClientFactory) NewServerVulnerabilityAssessmentsClient() *ServerVulnerabilityAssessmentsClient { + subClient, _ := NewServerVulnerabilityAssessmentsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewServersClient creates a new instance of ServersClient. +func (c *ClientFactory) NewServersClient() *ServersClient { + subClient, _ := NewServersClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewServiceObjectivesClient creates a new instance of ServiceObjectivesClient. +func (c *ClientFactory) NewServiceObjectivesClient() *ServiceObjectivesClient { + subClient, _ := NewServiceObjectivesClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewSubscriptionUsagesClient creates a new instance of SubscriptionUsagesClient. +func (c *ClientFactory) NewSubscriptionUsagesClient() *SubscriptionUsagesClient { + subClient, _ := NewSubscriptionUsagesClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewSyncAgentsClient creates a new instance of SyncAgentsClient. +func (c *ClientFactory) NewSyncAgentsClient() *SyncAgentsClient { + subClient, _ := NewSyncAgentsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewSyncGroupsClient creates a new instance of SyncGroupsClient. +func (c *ClientFactory) NewSyncGroupsClient() *SyncGroupsClient { + subClient, _ := NewSyncGroupsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewSyncMembersClient creates a new instance of SyncMembersClient. +func (c *ClientFactory) NewSyncMembersClient() *SyncMembersClient { + subClient, _ := NewSyncMembersClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewTdeCertificatesClient creates a new instance of TdeCertificatesClient. +func (c *ClientFactory) NewTdeCertificatesClient() *TdeCertificatesClient { + subClient, _ := NewTdeCertificatesClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewTimeZonesClient creates a new instance of TimeZonesClient. +func (c *ClientFactory) NewTimeZonesClient() *TimeZonesClient { + subClient, _ := NewTimeZonesClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewTransparentDataEncryptionsClient creates a new instance of TransparentDataEncryptionsClient. +func (c *ClientFactory) NewTransparentDataEncryptionsClient() *TransparentDataEncryptionsClient { + subClient, _ := NewTransparentDataEncryptionsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewUsagesClient creates a new instance of UsagesClient. +func (c *ClientFactory) NewUsagesClient() *UsagesClient { + subClient, _ := NewUsagesClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewVirtualClustersClient creates a new instance of VirtualClustersClient. +func (c *ClientFactory) NewVirtualClustersClient() *VirtualClustersClient { + subClient, _ := NewVirtualClustersClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewVirtualNetworkRulesClient creates a new instance of VirtualNetworkRulesClient. +func (c *ClientFactory) NewVirtualNetworkRulesClient() *VirtualNetworkRulesClient { + subClient, _ := NewVirtualNetworkRulesClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewWorkloadClassifiersClient creates a new instance of WorkloadClassifiersClient. +func (c *ClientFactory) NewWorkloadClassifiersClient() *WorkloadClassifiersClient { + subClient, _ := NewWorkloadClassifiersClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewWorkloadGroupsClient creates a new instance of WorkloadGroupsClient. +func (c *ClientFactory) NewWorkloadGroupsClient() *WorkloadGroupsClient { + subClient, _ := NewWorkloadGroupsClient(c.subscriptionID, c.credential, c.options) + return subClient +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/constants.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/constants.go new file mode 100644 index 000000000..26cf2dc66 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/constants.go @@ -0,0 +1,2749 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +const ( + moduleName = "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" + moduleVersion = "v1.2.0" +) + +type AdministratorName string + +const ( + AdministratorNameActiveDirectory AdministratorName = "ActiveDirectory" +) + +// PossibleAdministratorNameValues returns the possible values for the AdministratorName const type. +func PossibleAdministratorNameValues() []AdministratorName { + return []AdministratorName{ + AdministratorNameActiveDirectory, + } +} + +// AdministratorType - Type of the sever administrator. +type AdministratorType string + +const ( + AdministratorTypeActiveDirectory AdministratorType = "ActiveDirectory" +) + +// PossibleAdministratorTypeValues returns the possible values for the AdministratorType const type. +func PossibleAdministratorTypeValues() []AdministratorType { + return []AdministratorType{ + AdministratorTypeActiveDirectory, + } +} + +type AdvancedThreatProtectionName string + +const ( + AdvancedThreatProtectionNameDefault AdvancedThreatProtectionName = "Default" +) + +// PossibleAdvancedThreatProtectionNameValues returns the possible values for the AdvancedThreatProtectionName const type. +func PossibleAdvancedThreatProtectionNameValues() []AdvancedThreatProtectionName { + return []AdvancedThreatProtectionName{ + AdvancedThreatProtectionNameDefault, + } +} + +// AdvancedThreatProtectionState - Specifies the state of the Advanced Threat Protection, whether it is enabled or disabled +// or a state has not been applied yet on the specific database or server. +type AdvancedThreatProtectionState string + +const ( + AdvancedThreatProtectionStateDisabled AdvancedThreatProtectionState = "Disabled" + AdvancedThreatProtectionStateEnabled AdvancedThreatProtectionState = "Enabled" + AdvancedThreatProtectionStateNew AdvancedThreatProtectionState = "New" +) + +// PossibleAdvancedThreatProtectionStateValues returns the possible values for the AdvancedThreatProtectionState const type. +func PossibleAdvancedThreatProtectionStateValues() []AdvancedThreatProtectionState { + return []AdvancedThreatProtectionState{ + AdvancedThreatProtectionStateDisabled, + AdvancedThreatProtectionStateEnabled, + AdvancedThreatProtectionStateNew, + } +} + +// AdvisorStatus - Gets the status of availability of this advisor to customers. Possible values are 'GA', 'PublicPreview', +// 'LimitedPublicPreview' and 'PrivatePreview'. +type AdvisorStatus string + +const ( + AdvisorStatusGA AdvisorStatus = "GA" + AdvisorStatusLimitedPublicPreview AdvisorStatus = "LimitedPublicPreview" + AdvisorStatusPrivatePreview AdvisorStatus = "PrivatePreview" + AdvisorStatusPublicPreview AdvisorStatus = "PublicPreview" +) + +// PossibleAdvisorStatusValues returns the possible values for the AdvisorStatus const type. +func PossibleAdvisorStatusValues() []AdvisorStatus { + return []AdvisorStatus{ + AdvisorStatusGA, + AdvisorStatusLimitedPublicPreview, + AdvisorStatusPrivatePreview, + AdvisorStatusPublicPreview, + } +} + +type AggregationFunctionType string + +const ( + AggregationFunctionTypeAvg AggregationFunctionType = "avg" + AggregationFunctionTypeMax AggregationFunctionType = "max" + AggregationFunctionTypeMin AggregationFunctionType = "min" + AggregationFunctionTypeStdev AggregationFunctionType = "stdev" + AggregationFunctionTypeSum AggregationFunctionType = "sum" +) + +// PossibleAggregationFunctionTypeValues returns the possible values for the AggregationFunctionType const type. +func PossibleAggregationFunctionTypeValues() []AggregationFunctionType { + return []AggregationFunctionType{ + AggregationFunctionTypeAvg, + AggregationFunctionTypeMax, + AggregationFunctionTypeMin, + AggregationFunctionTypeStdev, + AggregationFunctionTypeSum, + } +} + +type AuthenticationName string + +const ( + AuthenticationNameDefault AuthenticationName = "Default" +) + +// PossibleAuthenticationNameValues returns the possible values for the AuthenticationName const type. +func PossibleAuthenticationNameValues() []AuthenticationName { + return []AuthenticationName{ + AuthenticationNameDefault, + } +} + +// AutoExecuteStatus - Gets the auto-execute status (whether to let the system execute the recommendations) of this advisor. +// Possible values are 'Enabled' and 'Disabled' +type AutoExecuteStatus string + +const ( + AutoExecuteStatusDefault AutoExecuteStatus = "Default" + AutoExecuteStatusDisabled AutoExecuteStatus = "Disabled" + AutoExecuteStatusEnabled AutoExecuteStatus = "Enabled" +) + +// PossibleAutoExecuteStatusValues returns the possible values for the AutoExecuteStatus const type. +func PossibleAutoExecuteStatusValues() []AutoExecuteStatus { + return []AutoExecuteStatus{ + AutoExecuteStatusDefault, + AutoExecuteStatusDisabled, + AutoExecuteStatusEnabled, + } +} + +// AutoExecuteStatusInheritedFrom - Gets the resource from which current value of auto-execute status is inherited. Auto-execute +// status can be set on (and inherited from) different levels in the resource hierarchy. Possible values are +// 'Subscription', 'Server', 'ElasticPool', 'Database' and 'Default' (when status is not explicitly set on any level). +type AutoExecuteStatusInheritedFrom string + +const ( + AutoExecuteStatusInheritedFromDatabase AutoExecuteStatusInheritedFrom = "Database" + AutoExecuteStatusInheritedFromDefault AutoExecuteStatusInheritedFrom = "Default" + AutoExecuteStatusInheritedFromElasticPool AutoExecuteStatusInheritedFrom = "ElasticPool" + AutoExecuteStatusInheritedFromServer AutoExecuteStatusInheritedFrom = "Server" + AutoExecuteStatusInheritedFromSubscription AutoExecuteStatusInheritedFrom = "Subscription" +) + +// PossibleAutoExecuteStatusInheritedFromValues returns the possible values for the AutoExecuteStatusInheritedFrom const type. +func PossibleAutoExecuteStatusInheritedFromValues() []AutoExecuteStatusInheritedFrom { + return []AutoExecuteStatusInheritedFrom{ + AutoExecuteStatusInheritedFromDatabase, + AutoExecuteStatusInheritedFromDefault, + AutoExecuteStatusInheritedFromElasticPool, + AutoExecuteStatusInheritedFromServer, + AutoExecuteStatusInheritedFromSubscription, + } +} + +// AutomaticTuningDisabledReason - Reason description if desired and actual state are different. +type AutomaticTuningDisabledReason string + +const ( + AutomaticTuningDisabledReasonAutoConfigured AutomaticTuningDisabledReason = "AutoConfigured" + AutomaticTuningDisabledReasonDefault AutomaticTuningDisabledReason = "Default" + AutomaticTuningDisabledReasonDisabled AutomaticTuningDisabledReason = "Disabled" + AutomaticTuningDisabledReasonInheritedFromServer AutomaticTuningDisabledReason = "InheritedFromServer" + AutomaticTuningDisabledReasonNotSupported AutomaticTuningDisabledReason = "NotSupported" + AutomaticTuningDisabledReasonQueryStoreOff AutomaticTuningDisabledReason = "QueryStoreOff" + AutomaticTuningDisabledReasonQueryStoreReadOnly AutomaticTuningDisabledReason = "QueryStoreReadOnly" +) + +// PossibleAutomaticTuningDisabledReasonValues returns the possible values for the AutomaticTuningDisabledReason const type. +func PossibleAutomaticTuningDisabledReasonValues() []AutomaticTuningDisabledReason { + return []AutomaticTuningDisabledReason{ + AutomaticTuningDisabledReasonAutoConfigured, + AutomaticTuningDisabledReasonDefault, + AutomaticTuningDisabledReasonDisabled, + AutomaticTuningDisabledReasonInheritedFromServer, + AutomaticTuningDisabledReasonNotSupported, + AutomaticTuningDisabledReasonQueryStoreOff, + AutomaticTuningDisabledReasonQueryStoreReadOnly, + } +} + +// AutomaticTuningMode - Automatic tuning desired state. +type AutomaticTuningMode string + +const ( + AutomaticTuningModeAuto AutomaticTuningMode = "Auto" + AutomaticTuningModeCustom AutomaticTuningMode = "Custom" + AutomaticTuningModeInherit AutomaticTuningMode = "Inherit" + AutomaticTuningModeUnspecified AutomaticTuningMode = "Unspecified" +) + +// PossibleAutomaticTuningModeValues returns the possible values for the AutomaticTuningMode const type. +func PossibleAutomaticTuningModeValues() []AutomaticTuningMode { + return []AutomaticTuningMode{ + AutomaticTuningModeAuto, + AutomaticTuningModeCustom, + AutomaticTuningModeInherit, + AutomaticTuningModeUnspecified, + } +} + +// AutomaticTuningOptionModeActual - Automatic tuning option actual state. +type AutomaticTuningOptionModeActual string + +const ( + AutomaticTuningOptionModeActualOff AutomaticTuningOptionModeActual = "Off" + AutomaticTuningOptionModeActualOn AutomaticTuningOptionModeActual = "On" +) + +// PossibleAutomaticTuningOptionModeActualValues returns the possible values for the AutomaticTuningOptionModeActual const type. +func PossibleAutomaticTuningOptionModeActualValues() []AutomaticTuningOptionModeActual { + return []AutomaticTuningOptionModeActual{ + AutomaticTuningOptionModeActualOff, + AutomaticTuningOptionModeActualOn, + } +} + +// AutomaticTuningOptionModeDesired - Automatic tuning option desired state. +type AutomaticTuningOptionModeDesired string + +const ( + AutomaticTuningOptionModeDesiredDefault AutomaticTuningOptionModeDesired = "Default" + AutomaticTuningOptionModeDesiredOff AutomaticTuningOptionModeDesired = "Off" + AutomaticTuningOptionModeDesiredOn AutomaticTuningOptionModeDesired = "On" +) + +// PossibleAutomaticTuningOptionModeDesiredValues returns the possible values for the AutomaticTuningOptionModeDesired const type. +func PossibleAutomaticTuningOptionModeDesiredValues() []AutomaticTuningOptionModeDesired { + return []AutomaticTuningOptionModeDesired{ + AutomaticTuningOptionModeDesiredDefault, + AutomaticTuningOptionModeDesiredOff, + AutomaticTuningOptionModeDesiredOn, + } +} + +// AutomaticTuningServerMode - Automatic tuning desired state. +type AutomaticTuningServerMode string + +const ( + AutomaticTuningServerModeAuto AutomaticTuningServerMode = "Auto" + AutomaticTuningServerModeCustom AutomaticTuningServerMode = "Custom" + AutomaticTuningServerModeUnspecified AutomaticTuningServerMode = "Unspecified" +) + +// PossibleAutomaticTuningServerModeValues returns the possible values for the AutomaticTuningServerMode const type. +func PossibleAutomaticTuningServerModeValues() []AutomaticTuningServerMode { + return []AutomaticTuningServerMode{ + AutomaticTuningServerModeAuto, + AutomaticTuningServerModeCustom, + AutomaticTuningServerModeUnspecified, + } +} + +// AutomaticTuningServerReason - Reason description if desired and actual state are different. +type AutomaticTuningServerReason string + +const ( + AutomaticTuningServerReasonAutoConfigured AutomaticTuningServerReason = "AutoConfigured" + AutomaticTuningServerReasonDefault AutomaticTuningServerReason = "Default" + AutomaticTuningServerReasonDisabled AutomaticTuningServerReason = "Disabled" +) + +// PossibleAutomaticTuningServerReasonValues returns the possible values for the AutomaticTuningServerReason const type. +func PossibleAutomaticTuningServerReasonValues() []AutomaticTuningServerReason { + return []AutomaticTuningServerReason{ + AutomaticTuningServerReasonAutoConfigured, + AutomaticTuningServerReasonDefault, + AutomaticTuningServerReasonDisabled, + } +} + +// BackupStorageRedundancy - The storage account type used to store backups for this database. +type BackupStorageRedundancy string + +const ( + BackupStorageRedundancyGeo BackupStorageRedundancy = "Geo" + BackupStorageRedundancyGeoZone BackupStorageRedundancy = "GeoZone" + BackupStorageRedundancyLocal BackupStorageRedundancy = "Local" + BackupStorageRedundancyZone BackupStorageRedundancy = "Zone" +) + +// PossibleBackupStorageRedundancyValues returns the possible values for the BackupStorageRedundancy const type. +func PossibleBackupStorageRedundancyValues() []BackupStorageRedundancy { + return []BackupStorageRedundancy{ + BackupStorageRedundancyGeo, + BackupStorageRedundancyGeoZone, + BackupStorageRedundancyLocal, + BackupStorageRedundancyZone, + } +} + +// BlobAuditingPolicyState - Specifies the state of the audit. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled +// are required. +type BlobAuditingPolicyState string + +const ( + BlobAuditingPolicyStateDisabled BlobAuditingPolicyState = "Disabled" + BlobAuditingPolicyStateEnabled BlobAuditingPolicyState = "Enabled" +) + +// PossibleBlobAuditingPolicyStateValues returns the possible values for the BlobAuditingPolicyState const type. +func PossibleBlobAuditingPolicyStateValues() []BlobAuditingPolicyState { + return []BlobAuditingPolicyState{ + BlobAuditingPolicyStateDisabled, + BlobAuditingPolicyStateEnabled, + } +} + +type CapabilityGroup string + +const ( + CapabilityGroupSupportedEditions CapabilityGroup = "supportedEditions" + CapabilityGroupSupportedElasticPoolEditions CapabilityGroup = "supportedElasticPoolEditions" + CapabilityGroupSupportedInstancePoolEditions CapabilityGroup = "supportedInstancePoolEditions" + CapabilityGroupSupportedManagedInstanceEditions CapabilityGroup = "supportedManagedInstanceEditions" + CapabilityGroupSupportedManagedInstanceVersions CapabilityGroup = "supportedManagedInstanceVersions" +) + +// PossibleCapabilityGroupValues returns the possible values for the CapabilityGroup const type. +func PossibleCapabilityGroupValues() []CapabilityGroup { + return []CapabilityGroup{ + CapabilityGroupSupportedEditions, + CapabilityGroupSupportedElasticPoolEditions, + CapabilityGroupSupportedInstancePoolEditions, + CapabilityGroupSupportedManagedInstanceEditions, + CapabilityGroupSupportedManagedInstanceVersions, + } +} + +// CapabilityStatus - The status of the capability. +type CapabilityStatus string + +const ( + CapabilityStatusAvailable CapabilityStatus = "Available" + CapabilityStatusDefault CapabilityStatus = "Default" + CapabilityStatusDisabled CapabilityStatus = "Disabled" + CapabilityStatusVisible CapabilityStatus = "Visible" +) + +// PossibleCapabilityStatusValues returns the possible values for the CapabilityStatus const type. +func PossibleCapabilityStatusValues() []CapabilityStatus { + return []CapabilityStatus{ + CapabilityStatusAvailable, + CapabilityStatusDefault, + CapabilityStatusDisabled, + CapabilityStatusVisible, + } +} + +// CatalogCollationType - Collation of the metadata catalog. +type CatalogCollationType string + +const ( + CatalogCollationTypeDATABASEDEFAULT CatalogCollationType = "DATABASE_DEFAULT" + CatalogCollationTypeSQLLatin1GeneralCP1CIAS CatalogCollationType = "SQL_Latin1_General_CP1_CI_AS" +) + +// PossibleCatalogCollationTypeValues returns the possible values for the CatalogCollationType const type. +func PossibleCatalogCollationTypeValues() []CatalogCollationType { + return []CatalogCollationType{ + CatalogCollationTypeDATABASEDEFAULT, + CatalogCollationTypeSQLLatin1GeneralCP1CIAS, + } +} + +// CheckNameAvailabilityReason - The reason code explaining why the name is unavailable. Will be undefined if the name is +// available. +type CheckNameAvailabilityReason string + +const ( + CheckNameAvailabilityReasonAlreadyExists CheckNameAvailabilityReason = "AlreadyExists" + CheckNameAvailabilityReasonInvalid CheckNameAvailabilityReason = "Invalid" +) + +// PossibleCheckNameAvailabilityReasonValues returns the possible values for the CheckNameAvailabilityReason const type. +func PossibleCheckNameAvailabilityReasonValues() []CheckNameAvailabilityReason { + return []CheckNameAvailabilityReason{ + CheckNameAvailabilityReasonAlreadyExists, + CheckNameAvailabilityReasonInvalid, + } +} + +// ColumnDataType - The column data type. +type ColumnDataType string + +const ( + ColumnDataTypeBigint ColumnDataType = "bigint" + ColumnDataTypeBinary ColumnDataType = "binary" + ColumnDataTypeBit ColumnDataType = "bit" + ColumnDataTypeChar ColumnDataType = "char" + ColumnDataTypeDate ColumnDataType = "date" + ColumnDataTypeDatetime ColumnDataType = "datetime" + ColumnDataTypeDatetime2 ColumnDataType = "datetime2" + ColumnDataTypeDatetimeoffset ColumnDataType = "datetimeoffset" + ColumnDataTypeDecimal ColumnDataType = "decimal" + ColumnDataTypeFloat ColumnDataType = "float" + ColumnDataTypeGeography ColumnDataType = "geography" + ColumnDataTypeGeometry ColumnDataType = "geometry" + ColumnDataTypeHierarchyid ColumnDataType = "hierarchyid" + ColumnDataTypeImage ColumnDataType = "image" + ColumnDataTypeInt ColumnDataType = "int" + ColumnDataTypeMoney ColumnDataType = "money" + ColumnDataTypeNchar ColumnDataType = "nchar" + ColumnDataTypeNtext ColumnDataType = "ntext" + ColumnDataTypeNumeric ColumnDataType = "numeric" + ColumnDataTypeNvarchar ColumnDataType = "nvarchar" + ColumnDataTypeReal ColumnDataType = "real" + ColumnDataTypeSQLVariant ColumnDataType = "sql_variant" + ColumnDataTypeSmalldatetime ColumnDataType = "smalldatetime" + ColumnDataTypeSmallint ColumnDataType = "smallint" + ColumnDataTypeSmallmoney ColumnDataType = "smallmoney" + ColumnDataTypeSysname ColumnDataType = "sysname" + ColumnDataTypeText ColumnDataType = "text" + ColumnDataTypeTime ColumnDataType = "time" + ColumnDataTypeTimestamp ColumnDataType = "timestamp" + ColumnDataTypeTinyint ColumnDataType = "tinyint" + ColumnDataTypeUniqueidentifier ColumnDataType = "uniqueidentifier" + ColumnDataTypeVarbinary ColumnDataType = "varbinary" + ColumnDataTypeVarchar ColumnDataType = "varchar" + ColumnDataTypeXML ColumnDataType = "xml" +) + +// PossibleColumnDataTypeValues returns the possible values for the ColumnDataType const type. +func PossibleColumnDataTypeValues() []ColumnDataType { + return []ColumnDataType{ + ColumnDataTypeBigint, + ColumnDataTypeBinary, + ColumnDataTypeBit, + ColumnDataTypeChar, + ColumnDataTypeDate, + ColumnDataTypeDatetime, + ColumnDataTypeDatetime2, + ColumnDataTypeDatetimeoffset, + ColumnDataTypeDecimal, + ColumnDataTypeFloat, + ColumnDataTypeGeography, + ColumnDataTypeGeometry, + ColumnDataTypeHierarchyid, + ColumnDataTypeImage, + ColumnDataTypeInt, + ColumnDataTypeMoney, + ColumnDataTypeNchar, + ColumnDataTypeNtext, + ColumnDataTypeNumeric, + ColumnDataTypeNvarchar, + ColumnDataTypeReal, + ColumnDataTypeSQLVariant, + ColumnDataTypeSmalldatetime, + ColumnDataTypeSmallint, + ColumnDataTypeSmallmoney, + ColumnDataTypeSysname, + ColumnDataTypeText, + ColumnDataTypeTime, + ColumnDataTypeTimestamp, + ColumnDataTypeTinyint, + ColumnDataTypeUniqueidentifier, + ColumnDataTypeVarbinary, + ColumnDataTypeVarchar, + ColumnDataTypeXML, + } +} + +type ConnectionPolicyName string + +const ( + ConnectionPolicyNameDefault ConnectionPolicyName = "default" +) + +// PossibleConnectionPolicyNameValues returns the possible values for the ConnectionPolicyName const type. +func PossibleConnectionPolicyNameValues() []ConnectionPolicyName { + return []ConnectionPolicyName{ + ConnectionPolicyNameDefault, + } +} + +// CreateMode - Specifies the mode of database creation. +// Default: regular database creation. +// Copy: creates a database as a copy of an existing database. sourceDatabaseId must be specified as the resource ID of the +// source database. +// Secondary: creates a database as a secondary replica of an existing database. sourceDatabaseId must be specified as the +// resource ID of the existing primary database. +// PointInTimeRestore: Creates a database by restoring a point in time backup of an existing database. sourceDatabaseId must +// be specified as the resource ID of the existing database, and +// restorePointInTime must be specified. +// Recovery: Creates a database by restoring a geo-replicated backup. sourceDatabaseId must be specified as the recoverable +// database resource ID to restore. +// Restore: Creates a database by restoring a backup of a deleted database. sourceDatabaseId must be specified. If sourceDatabaseId +// is the database's original resource ID, then sourceDatabaseDeletionDate +// must be specified. Otherwise sourceDatabaseId must be the restorable dropped database resource ID and sourceDatabaseDeletionDate +// is ignored. restorePointInTime may also be specified to restore from an +// earlier point in time. +// RestoreLongTermRetentionBackup: Creates a database by restoring from a long term retention vault. recoveryServicesRecoveryPointResourceId +// must be specified as the recovery point resource ID. +// Copy, Secondary, and RestoreLongTermRetentionBackup are not supported for DataWarehouse edition. +type CreateMode string + +const ( + CreateModeCopy CreateMode = "Copy" + CreateModeDefault CreateMode = "Default" + CreateModeOnlineSecondary CreateMode = "OnlineSecondary" + CreateModePointInTimeRestore CreateMode = "PointInTimeRestore" + CreateModeRecovery CreateMode = "Recovery" + CreateModeRestore CreateMode = "Restore" + CreateModeRestoreExternalBackup CreateMode = "RestoreExternalBackup" + CreateModeRestoreExternalBackupSecondary CreateMode = "RestoreExternalBackupSecondary" + CreateModeRestoreLongTermRetentionBackup CreateMode = "RestoreLongTermRetentionBackup" + CreateModeSecondary CreateMode = "Secondary" +) + +// PossibleCreateModeValues returns the possible values for the CreateMode const type. +func PossibleCreateModeValues() []CreateMode { + return []CreateMode{ + CreateModeCopy, + CreateModeDefault, + CreateModeOnlineSecondary, + CreateModePointInTimeRestore, + CreateModeRecovery, + CreateModeRestore, + CreateModeRestoreExternalBackup, + CreateModeRestoreExternalBackupSecondary, + CreateModeRestoreLongTermRetentionBackup, + CreateModeSecondary, + } +} + +// CreatedByType - The type of identity that created the resource. +type CreatedByType string + +const ( + CreatedByTypeApplication CreatedByType = "Application" + CreatedByTypeKey CreatedByType = "Key" + CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity" + CreatedByTypeUser CreatedByType = "User" +) + +// PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type. +func PossibleCreatedByTypeValues() []CreatedByType { + return []CreatedByType{ + CreatedByTypeApplication, + CreatedByTypeKey, + CreatedByTypeManagedIdentity, + CreatedByTypeUser, + } +} + +// DNSRefreshConfigurationPropertiesStatus - The status of the DNS refresh operation. +type DNSRefreshConfigurationPropertiesStatus string + +const ( + DNSRefreshConfigurationPropertiesStatusFailed DNSRefreshConfigurationPropertiesStatus = "Failed" + DNSRefreshConfigurationPropertiesStatusSucceeded DNSRefreshConfigurationPropertiesStatus = "Succeeded" +) + +// PossibleDNSRefreshConfigurationPropertiesStatusValues returns the possible values for the DNSRefreshConfigurationPropertiesStatus const type. +func PossibleDNSRefreshConfigurationPropertiesStatusValues() []DNSRefreshConfigurationPropertiesStatus { + return []DNSRefreshConfigurationPropertiesStatus{ + DNSRefreshConfigurationPropertiesStatusFailed, + DNSRefreshConfigurationPropertiesStatusSucceeded, + } +} + +// DataMaskingFunction - The masking function that is used for the data masking rule. +type DataMaskingFunction string + +const ( + DataMaskingFunctionCCN DataMaskingFunction = "CCN" + DataMaskingFunctionDefault DataMaskingFunction = "Default" + DataMaskingFunctionEmail DataMaskingFunction = "Email" + DataMaskingFunctionNumber DataMaskingFunction = "Number" + DataMaskingFunctionSSN DataMaskingFunction = "SSN" + DataMaskingFunctionText DataMaskingFunction = "Text" +) + +// PossibleDataMaskingFunctionValues returns the possible values for the DataMaskingFunction const type. +func PossibleDataMaskingFunctionValues() []DataMaskingFunction { + return []DataMaskingFunction{ + DataMaskingFunctionCCN, + DataMaskingFunctionDefault, + DataMaskingFunctionEmail, + DataMaskingFunctionNumber, + DataMaskingFunctionSSN, + DataMaskingFunctionText, + } +} + +// DataMaskingRuleState - The rule state. Used to delete a rule. To delete an existing rule, specify the schemaName, tableName, +// columnName, maskingFunction, and specify ruleState as disabled. However, if the rule doesn't +// already exist, the rule will be created with ruleState set to enabled, regardless of the provided value of ruleState. +type DataMaskingRuleState string + +const ( + DataMaskingRuleStateDisabled DataMaskingRuleState = "Disabled" + DataMaskingRuleStateEnabled DataMaskingRuleState = "Enabled" +) + +// PossibleDataMaskingRuleStateValues returns the possible values for the DataMaskingRuleState const type. +func PossibleDataMaskingRuleStateValues() []DataMaskingRuleState { + return []DataMaskingRuleState{ + DataMaskingRuleStateDisabled, + DataMaskingRuleStateEnabled, + } +} + +// DataMaskingState - The state of the data masking policy. +type DataMaskingState string + +const ( + DataMaskingStateDisabled DataMaskingState = "Disabled" + DataMaskingStateEnabled DataMaskingState = "Enabled" +) + +// PossibleDataMaskingStateValues returns the possible values for the DataMaskingState const type. +func PossibleDataMaskingStateValues() []DataMaskingState { + return []DataMaskingState{ + DataMaskingStateDisabled, + DataMaskingStateEnabled, + } +} + +type DataWarehouseUserActivityName string + +const ( + DataWarehouseUserActivityNameCurrent DataWarehouseUserActivityName = "current" +) + +// PossibleDataWarehouseUserActivityNameValues returns the possible values for the DataWarehouseUserActivityName const type. +func PossibleDataWarehouseUserActivityNameValues() []DataWarehouseUserActivityName { + return []DataWarehouseUserActivityName{ + DataWarehouseUserActivityNameCurrent, + } +} + +// DatabaseIdentityType - The identity type +type DatabaseIdentityType string + +const ( + DatabaseIdentityTypeNone DatabaseIdentityType = "None" + DatabaseIdentityTypeUserAssigned DatabaseIdentityType = "UserAssigned" +) + +// PossibleDatabaseIdentityTypeValues returns the possible values for the DatabaseIdentityType const type. +func PossibleDatabaseIdentityTypeValues() []DatabaseIdentityType { + return []DatabaseIdentityType{ + DatabaseIdentityTypeNone, + DatabaseIdentityTypeUserAssigned, + } +} + +// DatabaseLicenseType - The license type to apply for this database. LicenseIncluded if you need a license, or BasePrice +// if you have a license and are eligible for the Azure Hybrid Benefit. +type DatabaseLicenseType string + +const ( + DatabaseLicenseTypeBasePrice DatabaseLicenseType = "BasePrice" + DatabaseLicenseTypeLicenseIncluded DatabaseLicenseType = "LicenseIncluded" +) + +// PossibleDatabaseLicenseTypeValues returns the possible values for the DatabaseLicenseType const type. +func PossibleDatabaseLicenseTypeValues() []DatabaseLicenseType { + return []DatabaseLicenseType{ + DatabaseLicenseTypeBasePrice, + DatabaseLicenseTypeLicenseIncluded, + } +} + +// DatabaseReadScale - The state of read-only routing. If enabled, connections that have application intent set to readonly +// in their connection string may be routed to a readonly secondary replica in the same region. Not +// applicable to a Hyperscale database within an elastic pool. +type DatabaseReadScale string + +const ( + DatabaseReadScaleDisabled DatabaseReadScale = "Disabled" + DatabaseReadScaleEnabled DatabaseReadScale = "Enabled" +) + +// PossibleDatabaseReadScaleValues returns the possible values for the DatabaseReadScale const type. +func PossibleDatabaseReadScaleValues() []DatabaseReadScale { + return []DatabaseReadScale{ + DatabaseReadScaleDisabled, + DatabaseReadScaleEnabled, + } +} + +type DatabaseState string + +const ( + DatabaseStateAll DatabaseState = "All" + DatabaseStateDeleted DatabaseState = "Deleted" + DatabaseStateLive DatabaseState = "Live" +) + +// PossibleDatabaseStateValues returns the possible values for the DatabaseState const type. +func PossibleDatabaseStateValues() []DatabaseState { + return []DatabaseState{ + DatabaseStateAll, + DatabaseStateDeleted, + DatabaseStateLive, + } +} + +// DatabaseStatus - The status of the database. +type DatabaseStatus string + +const ( + DatabaseStatusAutoClosed DatabaseStatus = "AutoClosed" + DatabaseStatusCopying DatabaseStatus = "Copying" + DatabaseStatusCreating DatabaseStatus = "Creating" + DatabaseStatusDisabled DatabaseStatus = "Disabled" + DatabaseStatusEmergencyMode DatabaseStatus = "EmergencyMode" + DatabaseStatusInaccessible DatabaseStatus = "Inaccessible" + DatabaseStatusOffline DatabaseStatus = "Offline" + DatabaseStatusOfflineChangingDwPerformanceTiers DatabaseStatus = "OfflineChangingDwPerformanceTiers" + DatabaseStatusOfflineSecondary DatabaseStatus = "OfflineSecondary" + DatabaseStatusOnline DatabaseStatus = "Online" + DatabaseStatusOnlineChangingDwPerformanceTiers DatabaseStatus = "OnlineChangingDwPerformanceTiers" + DatabaseStatusPaused DatabaseStatus = "Paused" + DatabaseStatusPausing DatabaseStatus = "Pausing" + DatabaseStatusRecovering DatabaseStatus = "Recovering" + DatabaseStatusRecoveryPending DatabaseStatus = "RecoveryPending" + DatabaseStatusRestoring DatabaseStatus = "Restoring" + DatabaseStatusResuming DatabaseStatus = "Resuming" + DatabaseStatusScaling DatabaseStatus = "Scaling" + DatabaseStatusShutdown DatabaseStatus = "Shutdown" + DatabaseStatusStandby DatabaseStatus = "Standby" + DatabaseStatusStarting DatabaseStatus = "Starting" + DatabaseStatusStopped DatabaseStatus = "Stopped" + DatabaseStatusStopping DatabaseStatus = "Stopping" + DatabaseStatusSuspect DatabaseStatus = "Suspect" +) + +// PossibleDatabaseStatusValues returns the possible values for the DatabaseStatus const type. +func PossibleDatabaseStatusValues() []DatabaseStatus { + return []DatabaseStatus{ + DatabaseStatusAutoClosed, + DatabaseStatusCopying, + DatabaseStatusCreating, + DatabaseStatusDisabled, + DatabaseStatusEmergencyMode, + DatabaseStatusInaccessible, + DatabaseStatusOffline, + DatabaseStatusOfflineChangingDwPerformanceTiers, + DatabaseStatusOfflineSecondary, + DatabaseStatusOnline, + DatabaseStatusOnlineChangingDwPerformanceTiers, + DatabaseStatusPaused, + DatabaseStatusPausing, + DatabaseStatusRecovering, + DatabaseStatusRecoveryPending, + DatabaseStatusRestoring, + DatabaseStatusResuming, + DatabaseStatusScaling, + DatabaseStatusShutdown, + DatabaseStatusStandby, + DatabaseStatusStarting, + DatabaseStatusStopped, + DatabaseStatusStopping, + DatabaseStatusSuspect, + } +} + +// DayOfWeek - Day of maintenance window. +type DayOfWeek string + +const ( + DayOfWeekFriday DayOfWeek = "Friday" + DayOfWeekMonday DayOfWeek = "Monday" + DayOfWeekSaturday DayOfWeek = "Saturday" + DayOfWeekSunday DayOfWeek = "Sunday" + DayOfWeekThursday DayOfWeek = "Thursday" + DayOfWeekTuesday DayOfWeek = "Tuesday" + DayOfWeekWednesday DayOfWeek = "Wednesday" +) + +// PossibleDayOfWeekValues returns the possible values for the DayOfWeek const type. +func PossibleDayOfWeekValues() []DayOfWeek { + return []DayOfWeek{ + DayOfWeekFriday, + DayOfWeekMonday, + DayOfWeekSaturday, + DayOfWeekSunday, + DayOfWeekThursday, + DayOfWeekTuesday, + DayOfWeekWednesday, + } +} + +// DiffBackupIntervalInHours - The differential backup interval in hours. This is how many interval hours between each differential +// backup will be supported. This is only applicable to live databases but not dropped databases. +type DiffBackupIntervalInHours int32 + +const ( + DiffBackupIntervalInHoursTwelve DiffBackupIntervalInHours = 12 + DiffBackupIntervalInHoursTwentyFour DiffBackupIntervalInHours = 24 +) + +// PossibleDiffBackupIntervalInHoursValues returns the possible values for the DiffBackupIntervalInHours const type. +func PossibleDiffBackupIntervalInHoursValues() []DiffBackupIntervalInHours { + return []DiffBackupIntervalInHours{ + DiffBackupIntervalInHoursTwelve, + DiffBackupIntervalInHoursTwentyFour, + } +} + +// ElasticPoolLicenseType - The license type to apply for this elastic pool. +type ElasticPoolLicenseType string + +const ( + ElasticPoolLicenseTypeBasePrice ElasticPoolLicenseType = "BasePrice" + ElasticPoolLicenseTypeLicenseIncluded ElasticPoolLicenseType = "LicenseIncluded" +) + +// PossibleElasticPoolLicenseTypeValues returns the possible values for the ElasticPoolLicenseType const type. +func PossibleElasticPoolLicenseTypeValues() []ElasticPoolLicenseType { + return []ElasticPoolLicenseType{ + ElasticPoolLicenseTypeBasePrice, + ElasticPoolLicenseTypeLicenseIncluded, + } +} + +// ElasticPoolState - The state of the elastic pool. +type ElasticPoolState string + +const ( + ElasticPoolStateCreating ElasticPoolState = "Creating" + ElasticPoolStateDisabled ElasticPoolState = "Disabled" + ElasticPoolStateReady ElasticPoolState = "Ready" +) + +// PossibleElasticPoolStateValues returns the possible values for the ElasticPoolState const type. +func PossibleElasticPoolStateValues() []ElasticPoolState { + return []ElasticPoolState{ + ElasticPoolStateCreating, + ElasticPoolStateDisabled, + ElasticPoolStateReady, + } +} + +type EncryptionProtectorName string + +const ( + EncryptionProtectorNameCurrent EncryptionProtectorName = "current" +) + +// PossibleEncryptionProtectorNameValues returns the possible values for the EncryptionProtectorName const type. +func PossibleEncryptionProtectorNameValues() []EncryptionProtectorName { + return []EncryptionProtectorName{ + EncryptionProtectorNameCurrent, + } +} + +// FailoverGroupReplicationRole - Local replication role of the failover group instance. +type FailoverGroupReplicationRole string + +const ( + FailoverGroupReplicationRolePrimary FailoverGroupReplicationRole = "Primary" + FailoverGroupReplicationRoleSecondary FailoverGroupReplicationRole = "Secondary" +) + +// PossibleFailoverGroupReplicationRoleValues returns the possible values for the FailoverGroupReplicationRole const type. +func PossibleFailoverGroupReplicationRoleValues() []FailoverGroupReplicationRole { + return []FailoverGroupReplicationRole{ + FailoverGroupReplicationRolePrimary, + FailoverGroupReplicationRoleSecondary, + } +} + +type GeoBackupPolicyName string + +const ( + GeoBackupPolicyNameDefault GeoBackupPolicyName = "Default" +) + +// PossibleGeoBackupPolicyNameValues returns the possible values for the GeoBackupPolicyName const type. +func PossibleGeoBackupPolicyNameValues() []GeoBackupPolicyName { + return []GeoBackupPolicyName{ + GeoBackupPolicyNameDefault, + } +} + +// GeoBackupPolicyState - The state of the geo backup policy. +type GeoBackupPolicyState string + +const ( + GeoBackupPolicyStateDisabled GeoBackupPolicyState = "Disabled" + GeoBackupPolicyStateEnabled GeoBackupPolicyState = "Enabled" +) + +// PossibleGeoBackupPolicyStateValues returns the possible values for the GeoBackupPolicyState const type. +func PossibleGeoBackupPolicyStateValues() []GeoBackupPolicyState { + return []GeoBackupPolicyState{ + GeoBackupPolicyStateDisabled, + GeoBackupPolicyStateEnabled, + } +} + +// IdentityType - The identity type. Set this to 'SystemAssigned' in order to automatically create and assign an Azure Active +// Directory principal for the resource. +type IdentityType string + +const ( + IdentityTypeNone IdentityType = "None" + IdentityTypeSystemAssigned IdentityType = "SystemAssigned" + IdentityTypeSystemAssignedUserAssigned IdentityType = "SystemAssigned,UserAssigned" + IdentityTypeUserAssigned IdentityType = "UserAssigned" +) + +// PossibleIdentityTypeValues returns the possible values for the IdentityType const type. +func PossibleIdentityTypeValues() []IdentityType { + return []IdentityType{ + IdentityTypeNone, + IdentityTypeSystemAssigned, + IdentityTypeSystemAssignedUserAssigned, + IdentityTypeUserAssigned, + } +} + +// ImplementationMethod - Gets the method in which this recommended action can be manually implemented. e.g., TSql, AzurePowerShell. +type ImplementationMethod string + +const ( + ImplementationMethodAzurePowerShell ImplementationMethod = "AzurePowerShell" + ImplementationMethodTSQL ImplementationMethod = "TSql" +) + +// PossibleImplementationMethodValues returns the possible values for the ImplementationMethod const type. +func PossibleImplementationMethodValues() []ImplementationMethod { + return []ImplementationMethod{ + ImplementationMethodAzurePowerShell, + ImplementationMethodTSQL, + } +} + +// InstanceFailoverGroupReplicationRole - Local replication role of the failover group instance. +type InstanceFailoverGroupReplicationRole string + +const ( + InstanceFailoverGroupReplicationRolePrimary InstanceFailoverGroupReplicationRole = "Primary" + InstanceFailoverGroupReplicationRoleSecondary InstanceFailoverGroupReplicationRole = "Secondary" +) + +// PossibleInstanceFailoverGroupReplicationRoleValues returns the possible values for the InstanceFailoverGroupReplicationRole const type. +func PossibleInstanceFailoverGroupReplicationRoleValues() []InstanceFailoverGroupReplicationRole { + return []InstanceFailoverGroupReplicationRole{ + InstanceFailoverGroupReplicationRolePrimary, + InstanceFailoverGroupReplicationRoleSecondary, + } +} + +// InstancePoolLicenseType - The license type. Possible values are 'LicenseIncluded' (price for SQL license is included) and +// 'BasePrice' (without SQL license price). +type InstancePoolLicenseType string + +const ( + InstancePoolLicenseTypeBasePrice InstancePoolLicenseType = "BasePrice" + InstancePoolLicenseTypeLicenseIncluded InstancePoolLicenseType = "LicenseIncluded" +) + +// PossibleInstancePoolLicenseTypeValues returns the possible values for the InstancePoolLicenseType const type. +func PossibleInstancePoolLicenseTypeValues() []InstancePoolLicenseType { + return []InstancePoolLicenseType{ + InstancePoolLicenseTypeBasePrice, + InstancePoolLicenseTypeLicenseIncluded, + } +} + +// IsRetryable - Gets whether the error could be ignored and recommended action could be retried. Possible values are: Yes/No +type IsRetryable string + +const ( + IsRetryableNo IsRetryable = "No" + IsRetryableYes IsRetryable = "Yes" +) + +// PossibleIsRetryableValues returns the possible values for the IsRetryable const type. +func PossibleIsRetryableValues() []IsRetryable { + return []IsRetryable{ + IsRetryableNo, + IsRetryableYes, + } +} + +// JobAgentState - The state of the job agent. +type JobAgentState string + +const ( + JobAgentStateCreating JobAgentState = "Creating" + JobAgentStateDeleting JobAgentState = "Deleting" + JobAgentStateDisabled JobAgentState = "Disabled" + JobAgentStateReady JobAgentState = "Ready" + JobAgentStateUpdating JobAgentState = "Updating" +) + +// PossibleJobAgentStateValues returns the possible values for the JobAgentState const type. +func PossibleJobAgentStateValues() []JobAgentState { + return []JobAgentState{ + JobAgentStateCreating, + JobAgentStateDeleting, + JobAgentStateDisabled, + JobAgentStateReady, + JobAgentStateUpdating, + } +} + +// JobExecutionLifecycle - The detailed state of the job execution. +type JobExecutionLifecycle string + +const ( + JobExecutionLifecycleCanceled JobExecutionLifecycle = "Canceled" + JobExecutionLifecycleCreated JobExecutionLifecycle = "Created" + JobExecutionLifecycleFailed JobExecutionLifecycle = "Failed" + JobExecutionLifecycleInProgress JobExecutionLifecycle = "InProgress" + JobExecutionLifecycleSkipped JobExecutionLifecycle = "Skipped" + JobExecutionLifecycleSucceeded JobExecutionLifecycle = "Succeeded" + JobExecutionLifecycleSucceededWithSkipped JobExecutionLifecycle = "SucceededWithSkipped" + JobExecutionLifecycleTimedOut JobExecutionLifecycle = "TimedOut" + JobExecutionLifecycleWaitingForChildJobExecutions JobExecutionLifecycle = "WaitingForChildJobExecutions" + JobExecutionLifecycleWaitingForRetry JobExecutionLifecycle = "WaitingForRetry" +) + +// PossibleJobExecutionLifecycleValues returns the possible values for the JobExecutionLifecycle const type. +func PossibleJobExecutionLifecycleValues() []JobExecutionLifecycle { + return []JobExecutionLifecycle{ + JobExecutionLifecycleCanceled, + JobExecutionLifecycleCreated, + JobExecutionLifecycleFailed, + JobExecutionLifecycleInProgress, + JobExecutionLifecycleSkipped, + JobExecutionLifecycleSucceeded, + JobExecutionLifecycleSucceededWithSkipped, + JobExecutionLifecycleTimedOut, + JobExecutionLifecycleWaitingForChildJobExecutions, + JobExecutionLifecycleWaitingForRetry, + } +} + +// JobScheduleType - Schedule interval type +type JobScheduleType string + +const ( + JobScheduleTypeOnce JobScheduleType = "Once" + JobScheduleTypeRecurring JobScheduleType = "Recurring" +) + +// PossibleJobScheduleTypeValues returns the possible values for the JobScheduleType const type. +func PossibleJobScheduleTypeValues() []JobScheduleType { + return []JobScheduleType{ + JobScheduleTypeOnce, + JobScheduleTypeRecurring, + } +} + +// JobStepActionSource - The source of the action to execute. +type JobStepActionSource string + +const ( + JobStepActionSourceInline JobStepActionSource = "Inline" +) + +// PossibleJobStepActionSourceValues returns the possible values for the JobStepActionSource const type. +func PossibleJobStepActionSourceValues() []JobStepActionSource { + return []JobStepActionSource{ + JobStepActionSourceInline, + } +} + +// JobStepActionType - Type of action being executed by the job step. +type JobStepActionType string + +const ( + JobStepActionTypeTSQL JobStepActionType = "TSql" +) + +// PossibleJobStepActionTypeValues returns the possible values for the JobStepActionType const type. +func PossibleJobStepActionTypeValues() []JobStepActionType { + return []JobStepActionType{ + JobStepActionTypeTSQL, + } +} + +// JobStepOutputType - The output destination type. +type JobStepOutputType string + +const ( + JobStepOutputTypeSQLDatabase JobStepOutputType = "SqlDatabase" +) + +// PossibleJobStepOutputTypeValues returns the possible values for the JobStepOutputType const type. +func PossibleJobStepOutputTypeValues() []JobStepOutputType { + return []JobStepOutputType{ + JobStepOutputTypeSQLDatabase, + } +} + +// JobTargetGroupMembershipType - Whether the target is included or excluded from the group. +type JobTargetGroupMembershipType string + +const ( + JobTargetGroupMembershipTypeExclude JobTargetGroupMembershipType = "Exclude" + JobTargetGroupMembershipTypeInclude JobTargetGroupMembershipType = "Include" +) + +// PossibleJobTargetGroupMembershipTypeValues returns the possible values for the JobTargetGroupMembershipType const type. +func PossibleJobTargetGroupMembershipTypeValues() []JobTargetGroupMembershipType { + return []JobTargetGroupMembershipType{ + JobTargetGroupMembershipTypeExclude, + JobTargetGroupMembershipTypeInclude, + } +} + +// JobTargetType - The type of the target. +type JobTargetType string + +const ( + JobTargetTypeSQLDatabase JobTargetType = "SqlDatabase" + JobTargetTypeSQLElasticPool JobTargetType = "SqlElasticPool" + JobTargetTypeSQLServer JobTargetType = "SqlServer" + JobTargetTypeSQLShardMap JobTargetType = "SqlShardMap" + JobTargetTypeTargetGroup JobTargetType = "TargetGroup" +) + +// PossibleJobTargetTypeValues returns the possible values for the JobTargetType const type. +func PossibleJobTargetTypeValues() []JobTargetType { + return []JobTargetType{ + JobTargetTypeSQLDatabase, + JobTargetTypeSQLElasticPool, + JobTargetTypeSQLServer, + JobTargetTypeSQLShardMap, + JobTargetTypeTargetGroup, + } +} + +type LedgerDigestUploadsName string + +const ( + LedgerDigestUploadsNameCurrent LedgerDigestUploadsName = "current" +) + +// PossibleLedgerDigestUploadsNameValues returns the possible values for the LedgerDigestUploadsName const type. +func PossibleLedgerDigestUploadsNameValues() []LedgerDigestUploadsName { + return []LedgerDigestUploadsName{ + LedgerDigestUploadsNameCurrent, + } +} + +// LedgerDigestUploadsState - Specifies the state of ledger digest upload. +type LedgerDigestUploadsState string + +const ( + LedgerDigestUploadsStateDisabled LedgerDigestUploadsState = "Disabled" + LedgerDigestUploadsStateEnabled LedgerDigestUploadsState = "Enabled" +) + +// PossibleLedgerDigestUploadsStateValues returns the possible values for the LedgerDigestUploadsState const type. +func PossibleLedgerDigestUploadsStateValues() []LedgerDigestUploadsState { + return []LedgerDigestUploadsState{ + LedgerDigestUploadsStateDisabled, + LedgerDigestUploadsStateEnabled, + } +} + +// LogSizeUnit - The units that the limit is expressed in. +type LogSizeUnit string + +const ( + LogSizeUnitGigabytes LogSizeUnit = "Gigabytes" + LogSizeUnitMegabytes LogSizeUnit = "Megabytes" + LogSizeUnitPercent LogSizeUnit = "Percent" + LogSizeUnitPetabytes LogSizeUnit = "Petabytes" + LogSizeUnitTerabytes LogSizeUnit = "Terabytes" +) + +// PossibleLogSizeUnitValues returns the possible values for the LogSizeUnit const type. +func PossibleLogSizeUnitValues() []LogSizeUnit { + return []LogSizeUnit{ + LogSizeUnitGigabytes, + LogSizeUnitMegabytes, + LogSizeUnitPercent, + LogSizeUnitPetabytes, + LogSizeUnitTerabytes, + } +} + +type LongTermRetentionPolicyName string + +const ( + LongTermRetentionPolicyNameDefault LongTermRetentionPolicyName = "default" +) + +// PossibleLongTermRetentionPolicyNameValues returns the possible values for the LongTermRetentionPolicyName const type. +func PossibleLongTermRetentionPolicyNameValues() []LongTermRetentionPolicyName { + return []LongTermRetentionPolicyName{ + LongTermRetentionPolicyNameDefault, + } +} + +// ManagedDatabaseCreateMode - Managed database create mode. PointInTimeRestore: Create a database by restoring a point in +// time backup of an existing database. SourceDatabaseName, SourceManagedInstanceName and PointInTime must be +// specified. RestoreExternalBackup: Create a database by restoring from external backup files. Collation, StorageContainerUri +// and StorageContainerSasToken must be specified. Recovery: Creates a database +// by restoring a geo-replicated backup. RecoverableDatabaseId must be specified as the recoverable database resource ID to +// restore. RestoreLongTermRetentionBackup: Create a database by restoring from a +// long term retention backup (longTermRetentionBackupResourceId required). +type ManagedDatabaseCreateMode string + +const ( + ManagedDatabaseCreateModeDefault ManagedDatabaseCreateMode = "Default" + ManagedDatabaseCreateModePointInTimeRestore ManagedDatabaseCreateMode = "PointInTimeRestore" + ManagedDatabaseCreateModeRecovery ManagedDatabaseCreateMode = "Recovery" + ManagedDatabaseCreateModeRestoreExternalBackup ManagedDatabaseCreateMode = "RestoreExternalBackup" + ManagedDatabaseCreateModeRestoreLongTermRetentionBackup ManagedDatabaseCreateMode = "RestoreLongTermRetentionBackup" +) + +// PossibleManagedDatabaseCreateModeValues returns the possible values for the ManagedDatabaseCreateMode const type. +func PossibleManagedDatabaseCreateModeValues() []ManagedDatabaseCreateMode { + return []ManagedDatabaseCreateMode{ + ManagedDatabaseCreateModeDefault, + ManagedDatabaseCreateModePointInTimeRestore, + ManagedDatabaseCreateModeRecovery, + ManagedDatabaseCreateModeRestoreExternalBackup, + ManagedDatabaseCreateModeRestoreLongTermRetentionBackup, + } +} + +// ManagedDatabaseStatus - Status of the database. +type ManagedDatabaseStatus string + +const ( + ManagedDatabaseStatusCreating ManagedDatabaseStatus = "Creating" + ManagedDatabaseStatusInaccessible ManagedDatabaseStatus = "Inaccessible" + ManagedDatabaseStatusOffline ManagedDatabaseStatus = "Offline" + ManagedDatabaseStatusOnline ManagedDatabaseStatus = "Online" + ManagedDatabaseStatusRestoring ManagedDatabaseStatus = "Restoring" + ManagedDatabaseStatusShutdown ManagedDatabaseStatus = "Shutdown" + ManagedDatabaseStatusUpdating ManagedDatabaseStatus = "Updating" +) + +// PossibleManagedDatabaseStatusValues returns the possible values for the ManagedDatabaseStatus const type. +func PossibleManagedDatabaseStatusValues() []ManagedDatabaseStatus { + return []ManagedDatabaseStatus{ + ManagedDatabaseStatusCreating, + ManagedDatabaseStatusInaccessible, + ManagedDatabaseStatusOffline, + ManagedDatabaseStatusOnline, + ManagedDatabaseStatusRestoring, + ManagedDatabaseStatusShutdown, + ManagedDatabaseStatusUpdating, + } +} + +// ManagedInstanceAdministratorType - Type of the managed instance administrator. +type ManagedInstanceAdministratorType string + +const ( + ManagedInstanceAdministratorTypeActiveDirectory ManagedInstanceAdministratorType = "ActiveDirectory" +) + +// PossibleManagedInstanceAdministratorTypeValues returns the possible values for the ManagedInstanceAdministratorType const type. +func PossibleManagedInstanceAdministratorTypeValues() []ManagedInstanceAdministratorType { + return []ManagedInstanceAdministratorType{ + ManagedInstanceAdministratorTypeActiveDirectory, + } +} + +// ManagedInstanceLicenseType - The license type. Possible values are 'LicenseIncluded' (regular price inclusive of a new +// SQL license) and 'BasePrice' (discounted AHB price for bringing your own SQL licenses). +type ManagedInstanceLicenseType string + +const ( + ManagedInstanceLicenseTypeBasePrice ManagedInstanceLicenseType = "BasePrice" + ManagedInstanceLicenseTypeLicenseIncluded ManagedInstanceLicenseType = "LicenseIncluded" +) + +// PossibleManagedInstanceLicenseTypeValues returns the possible values for the ManagedInstanceLicenseType const type. +func PossibleManagedInstanceLicenseTypeValues() []ManagedInstanceLicenseType { + return []ManagedInstanceLicenseType{ + ManagedInstanceLicenseTypeBasePrice, + ManagedInstanceLicenseTypeLicenseIncluded, + } +} + +type ManagedInstanceLongTermRetentionPolicyName string + +const ( + ManagedInstanceLongTermRetentionPolicyNameDefault ManagedInstanceLongTermRetentionPolicyName = "default" +) + +// PossibleManagedInstanceLongTermRetentionPolicyNameValues returns the possible values for the ManagedInstanceLongTermRetentionPolicyName const type. +func PossibleManagedInstanceLongTermRetentionPolicyNameValues() []ManagedInstanceLongTermRetentionPolicyName { + return []ManagedInstanceLongTermRetentionPolicyName{ + ManagedInstanceLongTermRetentionPolicyNameDefault, + } +} + +type ManagedInstancePropertiesProvisioningState string + +const ( + ManagedInstancePropertiesProvisioningStateAccepted ManagedInstancePropertiesProvisioningState = "Accepted" + ManagedInstancePropertiesProvisioningStateCanceled ManagedInstancePropertiesProvisioningState = "Canceled" + ManagedInstancePropertiesProvisioningStateCreated ManagedInstancePropertiesProvisioningState = "Created" + ManagedInstancePropertiesProvisioningStateCreating ManagedInstancePropertiesProvisioningState = "Creating" + ManagedInstancePropertiesProvisioningStateDeleted ManagedInstancePropertiesProvisioningState = "Deleted" + ManagedInstancePropertiesProvisioningStateDeleting ManagedInstancePropertiesProvisioningState = "Deleting" + ManagedInstancePropertiesProvisioningStateFailed ManagedInstancePropertiesProvisioningState = "Failed" + ManagedInstancePropertiesProvisioningStateNotSpecified ManagedInstancePropertiesProvisioningState = "NotSpecified" + ManagedInstancePropertiesProvisioningStateRegistering ManagedInstancePropertiesProvisioningState = "Registering" + ManagedInstancePropertiesProvisioningStateRunning ManagedInstancePropertiesProvisioningState = "Running" + ManagedInstancePropertiesProvisioningStateSucceeded ManagedInstancePropertiesProvisioningState = "Succeeded" + ManagedInstancePropertiesProvisioningStateTimedOut ManagedInstancePropertiesProvisioningState = "TimedOut" + ManagedInstancePropertiesProvisioningStateUnknown ManagedInstancePropertiesProvisioningState = "Unknown" + ManagedInstancePropertiesProvisioningStateUnrecognized ManagedInstancePropertiesProvisioningState = "Unrecognized" + ManagedInstancePropertiesProvisioningStateUpdating ManagedInstancePropertiesProvisioningState = "Updating" +) + +// PossibleManagedInstancePropertiesProvisioningStateValues returns the possible values for the ManagedInstancePropertiesProvisioningState const type. +func PossibleManagedInstancePropertiesProvisioningStateValues() []ManagedInstancePropertiesProvisioningState { + return []ManagedInstancePropertiesProvisioningState{ + ManagedInstancePropertiesProvisioningStateAccepted, + ManagedInstancePropertiesProvisioningStateCanceled, + ManagedInstancePropertiesProvisioningStateCreated, + ManagedInstancePropertiesProvisioningStateCreating, + ManagedInstancePropertiesProvisioningStateDeleted, + ManagedInstancePropertiesProvisioningStateDeleting, + ManagedInstancePropertiesProvisioningStateFailed, + ManagedInstancePropertiesProvisioningStateNotSpecified, + ManagedInstancePropertiesProvisioningStateRegistering, + ManagedInstancePropertiesProvisioningStateRunning, + ManagedInstancePropertiesProvisioningStateSucceeded, + ManagedInstancePropertiesProvisioningStateTimedOut, + ManagedInstancePropertiesProvisioningStateUnknown, + ManagedInstancePropertiesProvisioningStateUnrecognized, + ManagedInstancePropertiesProvisioningStateUpdating, + } +} + +// ManagedInstanceProxyOverride - Connection type used for connecting to the instance. +type ManagedInstanceProxyOverride string + +const ( + ManagedInstanceProxyOverrideDefault ManagedInstanceProxyOverride = "Default" + ManagedInstanceProxyOverrideProxy ManagedInstanceProxyOverride = "Proxy" + ManagedInstanceProxyOverrideRedirect ManagedInstanceProxyOverride = "Redirect" +) + +// PossibleManagedInstanceProxyOverrideValues returns the possible values for the ManagedInstanceProxyOverride const type. +func PossibleManagedInstanceProxyOverrideValues() []ManagedInstanceProxyOverride { + return []ManagedInstanceProxyOverride{ + ManagedInstanceProxyOverrideDefault, + ManagedInstanceProxyOverrideProxy, + ManagedInstanceProxyOverrideRedirect, + } +} + +// ManagedServerCreateMode - Specifies the mode of database creation. +// Default: Regular instance creation. +// Restore: Creates an instance by restoring a set of backups to specific point in time. RestorePointInTime and SourceManagedInstanceId +// must be specified. +type ManagedServerCreateMode string + +const ( + ManagedServerCreateModeDefault ManagedServerCreateMode = "Default" + ManagedServerCreateModePointInTimeRestore ManagedServerCreateMode = "PointInTimeRestore" +) + +// PossibleManagedServerCreateModeValues returns the possible values for the ManagedServerCreateMode const type. +func PossibleManagedServerCreateModeValues() []ManagedServerCreateMode { + return []ManagedServerCreateMode{ + ManagedServerCreateModeDefault, + ManagedServerCreateModePointInTimeRestore, + } +} + +type ManagedShortTermRetentionPolicyName string + +const ( + ManagedShortTermRetentionPolicyNameDefault ManagedShortTermRetentionPolicyName = "default" +) + +// PossibleManagedShortTermRetentionPolicyNameValues returns the possible values for the ManagedShortTermRetentionPolicyName const type. +func PossibleManagedShortTermRetentionPolicyNameValues() []ManagedShortTermRetentionPolicyName { + return []ManagedShortTermRetentionPolicyName{ + ManagedShortTermRetentionPolicyNameDefault, + } +} + +// ManagementOperationState - The operation state. +type ManagementOperationState string + +const ( + ManagementOperationStateCancelInProgress ManagementOperationState = "CancelInProgress" + ManagementOperationStateCancelled ManagementOperationState = "Cancelled" + ManagementOperationStateFailed ManagementOperationState = "Failed" + ManagementOperationStateInProgress ManagementOperationState = "InProgress" + ManagementOperationStatePending ManagementOperationState = "Pending" + ManagementOperationStateSucceeded ManagementOperationState = "Succeeded" +) + +// PossibleManagementOperationStateValues returns the possible values for the ManagementOperationState const type. +func PossibleManagementOperationStateValues() []ManagementOperationState { + return []ManagementOperationState{ + ManagementOperationStateCancelInProgress, + ManagementOperationStateCancelled, + ManagementOperationStateFailed, + ManagementOperationStateInProgress, + ManagementOperationStatePending, + ManagementOperationStateSucceeded, + } +} + +// MaxSizeUnit - The units that the limit is expressed in. +type MaxSizeUnit string + +const ( + MaxSizeUnitGigabytes MaxSizeUnit = "Gigabytes" + MaxSizeUnitMegabytes MaxSizeUnit = "Megabytes" + MaxSizeUnitPetabytes MaxSizeUnit = "Petabytes" + MaxSizeUnitTerabytes MaxSizeUnit = "Terabytes" +) + +// PossibleMaxSizeUnitValues returns the possible values for the MaxSizeUnit const type. +func PossibleMaxSizeUnitValues() []MaxSizeUnit { + return []MaxSizeUnit{ + MaxSizeUnitGigabytes, + MaxSizeUnitMegabytes, + MaxSizeUnitPetabytes, + MaxSizeUnitTerabytes, + } +} + +type MetricType string + +const ( + MetricTypeCPU MetricType = "cpu" + MetricTypeDtu MetricType = "dtu" + MetricTypeDuration MetricType = "duration" + MetricTypeIo MetricType = "io" + MetricTypeLogIo MetricType = "logIo" +) + +// PossibleMetricTypeValues returns the possible values for the MetricType const type. +func PossibleMetricTypeValues() []MetricType { + return []MetricType{ + MetricTypeCPU, + MetricTypeDtu, + MetricTypeDuration, + MetricTypeIo, + MetricTypeLogIo, + } +} + +// OperationMode - Operation Mode. +type OperationMode string + +const ( + OperationModePolybaseImport OperationMode = "PolybaseImport" +) + +// PossibleOperationModeValues returns the possible values for the OperationMode const type. +func PossibleOperationModeValues() []OperationMode { + return []OperationMode{ + OperationModePolybaseImport, + } +} + +// OperationOrigin - The intended executor of the operation. +type OperationOrigin string + +const ( + OperationOriginSystem OperationOrigin = "system" + OperationOriginUser OperationOrigin = "user" +) + +// PossibleOperationOriginValues returns the possible values for the OperationOrigin const type. +func PossibleOperationOriginValues() []OperationOrigin { + return []OperationOrigin{ + OperationOriginSystem, + OperationOriginUser, + } +} + +// PauseDelayTimeUnit - Unit of time that delay is expressed in +type PauseDelayTimeUnit string + +const ( + PauseDelayTimeUnitMinutes PauseDelayTimeUnit = "Minutes" +) + +// PossiblePauseDelayTimeUnitValues returns the possible values for the PauseDelayTimeUnit const type. +func PossiblePauseDelayTimeUnitValues() []PauseDelayTimeUnit { + return []PauseDelayTimeUnit{ + PauseDelayTimeUnitMinutes, + } +} + +// PerformanceLevelUnit - Unit type used to measure performance level. +type PerformanceLevelUnit string + +const ( + PerformanceLevelUnitDTU PerformanceLevelUnit = "DTU" + PerformanceLevelUnitVCores PerformanceLevelUnit = "VCores" +) + +// PossiblePerformanceLevelUnitValues returns the possible values for the PerformanceLevelUnit const type. +func PossiblePerformanceLevelUnitValues() []PerformanceLevelUnit { + return []PerformanceLevelUnit{ + PerformanceLevelUnitDTU, + PerformanceLevelUnitVCores, + } +} + +// PrimaryAggregationType - The primary aggregation type defining how metric values are displayed. +type PrimaryAggregationType string + +const ( + PrimaryAggregationTypeAverage PrimaryAggregationType = "Average" + PrimaryAggregationTypeCount PrimaryAggregationType = "Count" + PrimaryAggregationTypeMaximum PrimaryAggregationType = "Maximum" + PrimaryAggregationTypeMinimum PrimaryAggregationType = "Minimum" + PrimaryAggregationTypeNone PrimaryAggregationType = "None" + PrimaryAggregationTypeTotal PrimaryAggregationType = "Total" +) + +// PossiblePrimaryAggregationTypeValues returns the possible values for the PrimaryAggregationType const type. +func PossiblePrimaryAggregationTypeValues() []PrimaryAggregationType { + return []PrimaryAggregationType{ + PrimaryAggregationTypeAverage, + PrimaryAggregationTypeCount, + PrimaryAggregationTypeMaximum, + PrimaryAggregationTypeMinimum, + PrimaryAggregationTypeNone, + PrimaryAggregationTypeTotal, + } +} + +// PrincipalType - Principal Type of the sever administrator. +type PrincipalType string + +const ( + PrincipalTypeApplication PrincipalType = "Application" + PrincipalTypeGroup PrincipalType = "Group" + PrincipalTypeUser PrincipalType = "User" +) + +// PossiblePrincipalTypeValues returns the possible values for the PrincipalType const type. +func PossiblePrincipalTypeValues() []PrincipalType { + return []PrincipalType{ + PrincipalTypeApplication, + PrincipalTypeGroup, + PrincipalTypeUser, + } +} + +// PrivateEndpointProvisioningState - State of the private endpoint connection. +type PrivateEndpointProvisioningState string + +const ( + PrivateEndpointProvisioningStateApproving PrivateEndpointProvisioningState = "Approving" + PrivateEndpointProvisioningStateDropping PrivateEndpointProvisioningState = "Dropping" + PrivateEndpointProvisioningStateFailed PrivateEndpointProvisioningState = "Failed" + PrivateEndpointProvisioningStateReady PrivateEndpointProvisioningState = "Ready" + PrivateEndpointProvisioningStateRejecting PrivateEndpointProvisioningState = "Rejecting" +) + +// PossiblePrivateEndpointProvisioningStateValues returns the possible values for the PrivateEndpointProvisioningState const type. +func PossiblePrivateEndpointProvisioningStateValues() []PrivateEndpointProvisioningState { + return []PrivateEndpointProvisioningState{ + PrivateEndpointProvisioningStateApproving, + PrivateEndpointProvisioningStateDropping, + PrivateEndpointProvisioningStateFailed, + PrivateEndpointProvisioningStateReady, + PrivateEndpointProvisioningStateRejecting, + } +} + +// PrivateLinkServiceConnectionStateActionsRequire - The actions required for private link service connection. +type PrivateLinkServiceConnectionStateActionsRequire string + +const ( + PrivateLinkServiceConnectionStateActionsRequireNone PrivateLinkServiceConnectionStateActionsRequire = "None" +) + +// PossiblePrivateLinkServiceConnectionStateActionsRequireValues returns the possible values for the PrivateLinkServiceConnectionStateActionsRequire const type. +func PossiblePrivateLinkServiceConnectionStateActionsRequireValues() []PrivateLinkServiceConnectionStateActionsRequire { + return []PrivateLinkServiceConnectionStateActionsRequire{ + PrivateLinkServiceConnectionStateActionsRequireNone, + } +} + +// PrivateLinkServiceConnectionStateStatus - The private link service connection status. +type PrivateLinkServiceConnectionStateStatus string + +const ( + PrivateLinkServiceConnectionStateStatusApproved PrivateLinkServiceConnectionStateStatus = "Approved" + PrivateLinkServiceConnectionStateStatusDisconnected PrivateLinkServiceConnectionStateStatus = "Disconnected" + PrivateLinkServiceConnectionStateStatusPending PrivateLinkServiceConnectionStateStatus = "Pending" + PrivateLinkServiceConnectionStateStatusRejected PrivateLinkServiceConnectionStateStatus = "Rejected" +) + +// PossiblePrivateLinkServiceConnectionStateStatusValues returns the possible values for the PrivateLinkServiceConnectionStateStatus const type. +func PossiblePrivateLinkServiceConnectionStateStatusValues() []PrivateLinkServiceConnectionStateStatus { + return []PrivateLinkServiceConnectionStateStatus{ + PrivateLinkServiceConnectionStateStatusApproved, + PrivateLinkServiceConnectionStateStatusDisconnected, + PrivateLinkServiceConnectionStateStatusPending, + PrivateLinkServiceConnectionStateStatusRejected, + } +} + +// ProvisioningState - The ARM provisioning state of the job execution. +type ProvisioningState string + +const ( + ProvisioningStateCanceled ProvisioningState = "Canceled" + ProvisioningStateCreated ProvisioningState = "Created" + ProvisioningStateFailed ProvisioningState = "Failed" + ProvisioningStateInProgress ProvisioningState = "InProgress" + ProvisioningStateSucceeded ProvisioningState = "Succeeded" +) + +// PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type. +func PossibleProvisioningStateValues() []ProvisioningState { + return []ProvisioningState{ + ProvisioningStateCanceled, + ProvisioningStateCreated, + ProvisioningStateFailed, + ProvisioningStateInProgress, + ProvisioningStateSucceeded, + } +} + +// QueryMetricUnitType - The unit of the metric. +type QueryMetricUnitType string + +const ( + QueryMetricUnitTypeCount QueryMetricUnitType = "count" + QueryMetricUnitTypeKB QueryMetricUnitType = "KB" + QueryMetricUnitTypeMicroseconds QueryMetricUnitType = "microseconds" + QueryMetricUnitTypePercentage QueryMetricUnitType = "percentage" +) + +// PossibleQueryMetricUnitTypeValues returns the possible values for the QueryMetricUnitType const type. +func PossibleQueryMetricUnitTypeValues() []QueryMetricUnitType { + return []QueryMetricUnitType{ + QueryMetricUnitTypeCount, + QueryMetricUnitTypeKB, + QueryMetricUnitTypeMicroseconds, + QueryMetricUnitTypePercentage, + } +} + +// QueryTimeGrainType - Interval type (length). +type QueryTimeGrainType string + +const ( + QueryTimeGrainTypeP1D QueryTimeGrainType = "P1D" + QueryTimeGrainTypePT1H QueryTimeGrainType = "PT1H" +) + +// PossibleQueryTimeGrainTypeValues returns the possible values for the QueryTimeGrainType const type. +func PossibleQueryTimeGrainTypeValues() []QueryTimeGrainType { + return []QueryTimeGrainType{ + QueryTimeGrainTypeP1D, + QueryTimeGrainTypePT1H, + } +} + +// ReadOnlyEndpointFailoverPolicy - Failover policy of the read-only endpoint for the failover group. +type ReadOnlyEndpointFailoverPolicy string + +const ( + ReadOnlyEndpointFailoverPolicyDisabled ReadOnlyEndpointFailoverPolicy = "Disabled" + ReadOnlyEndpointFailoverPolicyEnabled ReadOnlyEndpointFailoverPolicy = "Enabled" +) + +// PossibleReadOnlyEndpointFailoverPolicyValues returns the possible values for the ReadOnlyEndpointFailoverPolicy const type. +func PossibleReadOnlyEndpointFailoverPolicyValues() []ReadOnlyEndpointFailoverPolicy { + return []ReadOnlyEndpointFailoverPolicy{ + ReadOnlyEndpointFailoverPolicyDisabled, + ReadOnlyEndpointFailoverPolicyEnabled, + } +} + +// ReadWriteEndpointFailoverPolicy - Failover policy of the read-write endpoint for the failover group. If failoverPolicy +// is Automatic then failoverWithDataLossGracePeriodMinutes is required. +type ReadWriteEndpointFailoverPolicy string + +const ( + ReadWriteEndpointFailoverPolicyAutomatic ReadWriteEndpointFailoverPolicy = "Automatic" + ReadWriteEndpointFailoverPolicyManual ReadWriteEndpointFailoverPolicy = "Manual" +) + +// PossibleReadWriteEndpointFailoverPolicyValues returns the possible values for the ReadWriteEndpointFailoverPolicy const type. +func PossibleReadWriteEndpointFailoverPolicyValues() []ReadWriteEndpointFailoverPolicy { + return []ReadWriteEndpointFailoverPolicy{ + ReadWriteEndpointFailoverPolicyAutomatic, + ReadWriteEndpointFailoverPolicyManual, + } +} + +// RecommendedActionCurrentState - Current state the recommended action is in. Some commonly used states are: Active -> recommended +// action is active and no action has been taken yet. Pending -> recommended action is approved for and is +// awaiting execution. Executing -> recommended action is being applied on the user database. Verifying -> recommended action +// was applied and is being verified of its usefulness by the system. Success -> +// recommended action was applied and improvement found during verification. Pending Revert -> verification found little or +// no improvement so recommended action is queued for revert or user has manually +// reverted. Reverting -> changes made while applying recommended action are being reverted on the user database. Reverted +// -> successfully reverted the changes made by recommended action on user +// database. Ignored -> user explicitly ignored/discarded the recommended action. +type RecommendedActionCurrentState string + +const ( + RecommendedActionCurrentStateActive RecommendedActionCurrentState = "Active" + RecommendedActionCurrentStateError RecommendedActionCurrentState = "Error" + RecommendedActionCurrentStateExecuting RecommendedActionCurrentState = "Executing" + RecommendedActionCurrentStateExpired RecommendedActionCurrentState = "Expired" + RecommendedActionCurrentStateIgnored RecommendedActionCurrentState = "Ignored" + RecommendedActionCurrentStateMonitoring RecommendedActionCurrentState = "Monitoring" + RecommendedActionCurrentStatePending RecommendedActionCurrentState = "Pending" + RecommendedActionCurrentStatePendingRevert RecommendedActionCurrentState = "PendingRevert" + RecommendedActionCurrentStateResolved RecommendedActionCurrentState = "Resolved" + RecommendedActionCurrentStateRevertCancelled RecommendedActionCurrentState = "RevertCancelled" + RecommendedActionCurrentStateReverted RecommendedActionCurrentState = "Reverted" + RecommendedActionCurrentStateReverting RecommendedActionCurrentState = "Reverting" + RecommendedActionCurrentStateSuccess RecommendedActionCurrentState = "Success" + RecommendedActionCurrentStateVerifying RecommendedActionCurrentState = "Verifying" +) + +// PossibleRecommendedActionCurrentStateValues returns the possible values for the RecommendedActionCurrentState const type. +func PossibleRecommendedActionCurrentStateValues() []RecommendedActionCurrentState { + return []RecommendedActionCurrentState{ + RecommendedActionCurrentStateActive, + RecommendedActionCurrentStateError, + RecommendedActionCurrentStateExecuting, + RecommendedActionCurrentStateExpired, + RecommendedActionCurrentStateIgnored, + RecommendedActionCurrentStateMonitoring, + RecommendedActionCurrentStatePending, + RecommendedActionCurrentStatePendingRevert, + RecommendedActionCurrentStateResolved, + RecommendedActionCurrentStateRevertCancelled, + RecommendedActionCurrentStateReverted, + RecommendedActionCurrentStateReverting, + RecommendedActionCurrentStateSuccess, + RecommendedActionCurrentStateVerifying, + } +} + +// RecommendedActionInitiatedBy - Gets if approval for applying this recommended action was given by user/system. +type RecommendedActionInitiatedBy string + +const ( + RecommendedActionInitiatedBySystem RecommendedActionInitiatedBy = "System" + RecommendedActionInitiatedByUser RecommendedActionInitiatedBy = "User" +) + +// PossibleRecommendedActionInitiatedByValues returns the possible values for the RecommendedActionInitiatedBy const type. +func PossibleRecommendedActionInitiatedByValues() []RecommendedActionInitiatedBy { + return []RecommendedActionInitiatedBy{ + RecommendedActionInitiatedBySystem, + RecommendedActionInitiatedByUser, + } +} + +type RecommendedSensitivityLabelUpdateKind string + +const ( + RecommendedSensitivityLabelUpdateKindDisable RecommendedSensitivityLabelUpdateKind = "disable" + RecommendedSensitivityLabelUpdateKindEnable RecommendedSensitivityLabelUpdateKind = "enable" +) + +// PossibleRecommendedSensitivityLabelUpdateKindValues returns the possible values for the RecommendedSensitivityLabelUpdateKind const type. +func PossibleRecommendedSensitivityLabelUpdateKindValues() []RecommendedSensitivityLabelUpdateKind { + return []RecommendedSensitivityLabelUpdateKind{ + RecommendedSensitivityLabelUpdateKindDisable, + RecommendedSensitivityLabelUpdateKindEnable, + } +} + +type ReplicaType string + +const ( + ReplicaTypePrimary ReplicaType = "Primary" + ReplicaTypeReadableSecondary ReplicaType = "ReadableSecondary" +) + +// PossibleReplicaTypeValues returns the possible values for the ReplicaType const type. +func PossibleReplicaTypeValues() []ReplicaType { + return []ReplicaType{ + ReplicaTypePrimary, + ReplicaTypeReadableSecondary, + } +} + +// ReplicationLinkType - Link type (GEO, NAMED). +type ReplicationLinkType string + +const ( + ReplicationLinkTypeGEO ReplicationLinkType = "GEO" + ReplicationLinkTypeNAMED ReplicationLinkType = "NAMED" +) + +// PossibleReplicationLinkTypeValues returns the possible values for the ReplicationLinkType const type. +func PossibleReplicationLinkTypeValues() []ReplicationLinkType { + return []ReplicationLinkType{ + ReplicationLinkTypeGEO, + ReplicationLinkTypeNAMED, + } +} + +// ReplicationMode - The replication mode of a distributed availability group. Parameter will be ignored during link creation. +type ReplicationMode string + +const ( + ReplicationModeAsync ReplicationMode = "Async" + ReplicationModeSync ReplicationMode = "Sync" +) + +// PossibleReplicationModeValues returns the possible values for the ReplicationMode const type. +func PossibleReplicationModeValues() []ReplicationMode { + return []ReplicationMode{ + ReplicationModeAsync, + ReplicationModeSync, + } +} + +// ReplicationRole - Local replication role. +type ReplicationRole string + +const ( + ReplicationRoleCopy ReplicationRole = "Copy" + ReplicationRoleNonReadableSecondary ReplicationRole = "NonReadableSecondary" + ReplicationRolePrimary ReplicationRole = "Primary" + ReplicationRoleSecondary ReplicationRole = "Secondary" + ReplicationRoleSource ReplicationRole = "Source" +) + +// PossibleReplicationRoleValues returns the possible values for the ReplicationRole const type. +func PossibleReplicationRoleValues() []ReplicationRole { + return []ReplicationRole{ + ReplicationRoleCopy, + ReplicationRoleNonReadableSecondary, + ReplicationRolePrimary, + ReplicationRoleSecondary, + ReplicationRoleSource, + } +} + +// ReplicationState - Replication state (PENDING, SEEDING, CATCHUP, SUSPENDED). +type ReplicationState string + +const ( + ReplicationStateCATCHUP ReplicationState = "CATCH_UP" + ReplicationStatePENDING ReplicationState = "PENDING" + ReplicationStateSEEDING ReplicationState = "SEEDING" + ReplicationStateSUSPENDED ReplicationState = "SUSPENDED" +) + +// PossibleReplicationStateValues returns the possible values for the ReplicationState const type. +func PossibleReplicationStateValues() []ReplicationState { + return []ReplicationState{ + ReplicationStateCATCHUP, + ReplicationStatePENDING, + ReplicationStateSEEDING, + ReplicationStateSUSPENDED, + } +} + +type RestoreDetailsName string + +const ( + RestoreDetailsNameDefault RestoreDetailsName = "Default" +) + +// PossibleRestoreDetailsNameValues returns the possible values for the RestoreDetailsName const type. +func PossibleRestoreDetailsNameValues() []RestoreDetailsName { + return []RestoreDetailsName{ + RestoreDetailsNameDefault, + } +} + +// RestorePointType - The type of restore point +type RestorePointType string + +const ( + RestorePointTypeCONTINUOUS RestorePointType = "CONTINUOUS" + RestorePointTypeDISCRETE RestorePointType = "DISCRETE" +) + +// PossibleRestorePointTypeValues returns the possible values for the RestorePointType const type. +func PossibleRestorePointTypeValues() []RestorePointType { + return []RestorePointType{ + RestorePointTypeCONTINUOUS, + RestorePointTypeDISCRETE, + } +} + +// SQLAgentConfigurationPropertiesState - The state of Sql Agent. +type SQLAgentConfigurationPropertiesState string + +const ( + SQLAgentConfigurationPropertiesStateDisabled SQLAgentConfigurationPropertiesState = "Disabled" + SQLAgentConfigurationPropertiesStateEnabled SQLAgentConfigurationPropertiesState = "Enabled" +) + +// PossibleSQLAgentConfigurationPropertiesStateValues returns the possible values for the SQLAgentConfigurationPropertiesState const type. +func PossibleSQLAgentConfigurationPropertiesStateValues() []SQLAgentConfigurationPropertiesState { + return []SQLAgentConfigurationPropertiesState{ + SQLAgentConfigurationPropertiesStateDisabled, + SQLAgentConfigurationPropertiesStateEnabled, + } +} + +// SampleName - The name of the sample schema to apply when creating this database. +type SampleName string + +const ( + SampleNameAdventureWorksLT SampleName = "AdventureWorksLT" + SampleNameWideWorldImportersFull SampleName = "WideWorldImportersFull" + SampleNameWideWorldImportersStd SampleName = "WideWorldImportersStd" +) + +// PossibleSampleNameValues returns the possible values for the SampleName const type. +func PossibleSampleNameValues() []SampleName { + return []SampleName{ + SampleNameAdventureWorksLT, + SampleNameWideWorldImportersFull, + SampleNameWideWorldImportersStd, + } +} + +// SecondaryType - The secondary type of the database if it is a secondary. Valid values are Geo and Named. +type SecondaryType string + +const ( + SecondaryTypeGeo SecondaryType = "Geo" + SecondaryTypeNamed SecondaryType = "Named" +) + +// PossibleSecondaryTypeValues returns the possible values for the SecondaryType const type. +func PossibleSecondaryTypeValues() []SecondaryType { + return []SecondaryType{ + SecondaryTypeGeo, + SecondaryTypeNamed, + } +} + +type SecurityAlertPolicyName string + +const ( + SecurityAlertPolicyNameDefault SecurityAlertPolicyName = "Default" +) + +// PossibleSecurityAlertPolicyNameValues returns the possible values for the SecurityAlertPolicyName const type. +func PossibleSecurityAlertPolicyNameValues() []SecurityAlertPolicyName { + return []SecurityAlertPolicyName{ + SecurityAlertPolicyNameDefault, + } +} + +// SecurityAlertPolicyState - Specifies the state of the policy, whether it is enabled or disabled or a policy has not been +// applied yet on the specific database. +type SecurityAlertPolicyState string + +const ( + SecurityAlertPolicyStateDisabled SecurityAlertPolicyState = "Disabled" + SecurityAlertPolicyStateEnabled SecurityAlertPolicyState = "Enabled" + SecurityAlertPolicyStateNew SecurityAlertPolicyState = "New" +) + +// PossibleSecurityAlertPolicyStateValues returns the possible values for the SecurityAlertPolicyState const type. +func PossibleSecurityAlertPolicyStateValues() []SecurityAlertPolicyState { + return []SecurityAlertPolicyState{ + SecurityAlertPolicyStateDisabled, + SecurityAlertPolicyStateEnabled, + SecurityAlertPolicyStateNew, + } +} + +// SecurityAlertsPolicyState - Specifies the state of the policy, whether it is enabled or disabled or a policy has not been +// applied yet on the specific database. +type SecurityAlertsPolicyState string + +const ( + SecurityAlertsPolicyStateDisabled SecurityAlertsPolicyState = "Disabled" + SecurityAlertsPolicyStateEnabled SecurityAlertsPolicyState = "Enabled" +) + +// PossibleSecurityAlertsPolicyStateValues returns the possible values for the SecurityAlertsPolicyState const type. +func PossibleSecurityAlertsPolicyStateValues() []SecurityAlertsPolicyState { + return []SecurityAlertsPolicyState{ + SecurityAlertsPolicyStateDisabled, + SecurityAlertsPolicyStateEnabled, + } +} + +// SecurityEventType - The type of the security event. +type SecurityEventType string + +const ( + SecurityEventTypeSQLInjectionExploit SecurityEventType = "SqlInjectionExploit" + SecurityEventTypeSQLInjectionVulnerability SecurityEventType = "SqlInjectionVulnerability" + SecurityEventTypeUndefined SecurityEventType = "Undefined" +) + +// PossibleSecurityEventTypeValues returns the possible values for the SecurityEventType const type. +func PossibleSecurityEventTypeValues() []SecurityEventType { + return []SecurityEventType{ + SecurityEventTypeSQLInjectionExploit, + SecurityEventTypeSQLInjectionVulnerability, + SecurityEventTypeUndefined, + } +} + +type SensitivityLabelRank string + +const ( + SensitivityLabelRankCritical SensitivityLabelRank = "Critical" + SensitivityLabelRankHigh SensitivityLabelRank = "High" + SensitivityLabelRankLow SensitivityLabelRank = "Low" + SensitivityLabelRankMedium SensitivityLabelRank = "Medium" + SensitivityLabelRankNone SensitivityLabelRank = "None" +) + +// PossibleSensitivityLabelRankValues returns the possible values for the SensitivityLabelRank const type. +func PossibleSensitivityLabelRankValues() []SensitivityLabelRank { + return []SensitivityLabelRank{ + SensitivityLabelRankCritical, + SensitivityLabelRankHigh, + SensitivityLabelRankLow, + SensitivityLabelRankMedium, + SensitivityLabelRankNone, + } +} + +type SensitivityLabelSource string + +const ( + SensitivityLabelSourceCurrent SensitivityLabelSource = "current" + SensitivityLabelSourceRecommended SensitivityLabelSource = "recommended" +) + +// PossibleSensitivityLabelSourceValues returns the possible values for the SensitivityLabelSource const type. +func PossibleSensitivityLabelSourceValues() []SensitivityLabelSource { + return []SensitivityLabelSource{ + SensitivityLabelSourceCurrent, + SensitivityLabelSourceRecommended, + } +} + +type SensitivityLabelUpdateKind string + +const ( + SensitivityLabelUpdateKindRemove SensitivityLabelUpdateKind = "remove" + SensitivityLabelUpdateKindSet SensitivityLabelUpdateKind = "set" +) + +// PossibleSensitivityLabelUpdateKindValues returns the possible values for the SensitivityLabelUpdateKind const type. +func PossibleSensitivityLabelUpdateKindValues() []SensitivityLabelUpdateKind { + return []SensitivityLabelUpdateKind{ + SensitivityLabelUpdateKindRemove, + SensitivityLabelUpdateKindSet, + } +} + +// ServerConnectionType - The server connection type. +type ServerConnectionType string + +const ( + ServerConnectionTypeDefault ServerConnectionType = "Default" + ServerConnectionTypeProxy ServerConnectionType = "Proxy" + ServerConnectionTypeRedirect ServerConnectionType = "Redirect" +) + +// PossibleServerConnectionTypeValues returns the possible values for the ServerConnectionType const type. +func PossibleServerConnectionTypeValues() []ServerConnectionType { + return []ServerConnectionType{ + ServerConnectionTypeDefault, + ServerConnectionTypeProxy, + ServerConnectionTypeRedirect, + } +} + +// ServerKeyType - The encryption protector type like 'ServiceManaged', 'AzureKeyVault'. +type ServerKeyType string + +const ( + ServerKeyTypeAzureKeyVault ServerKeyType = "AzureKeyVault" + ServerKeyTypeServiceManaged ServerKeyType = "ServiceManaged" +) + +// PossibleServerKeyTypeValues returns the possible values for the ServerKeyType const type. +func PossibleServerKeyTypeValues() []ServerKeyType { + return []ServerKeyType{ + ServerKeyTypeAzureKeyVault, + ServerKeyTypeServiceManaged, + } +} + +// ServerNetworkAccessFlag - Whether or not public endpoint access is allowed for this server. Value is optional but if passed +// in, must be 'Enabled' or 'Disabled' +type ServerNetworkAccessFlag string + +const ( + ServerNetworkAccessFlagDisabled ServerNetworkAccessFlag = "Disabled" + ServerNetworkAccessFlagEnabled ServerNetworkAccessFlag = "Enabled" +) + +// PossibleServerNetworkAccessFlagValues returns the possible values for the ServerNetworkAccessFlag const type. +func PossibleServerNetworkAccessFlagValues() []ServerNetworkAccessFlag { + return []ServerNetworkAccessFlag{ + ServerNetworkAccessFlagDisabled, + ServerNetworkAccessFlagEnabled, + } +} + +type ServerTrustGroupPropertiesTrustScopesItem string + +const ( + ServerTrustGroupPropertiesTrustScopesItemGlobalTransactions ServerTrustGroupPropertiesTrustScopesItem = "GlobalTransactions" + ServerTrustGroupPropertiesTrustScopesItemServiceBroker ServerTrustGroupPropertiesTrustScopesItem = "ServiceBroker" +) + +// PossibleServerTrustGroupPropertiesTrustScopesItemValues returns the possible values for the ServerTrustGroupPropertiesTrustScopesItem const type. +func PossibleServerTrustGroupPropertiesTrustScopesItemValues() []ServerTrustGroupPropertiesTrustScopesItem { + return []ServerTrustGroupPropertiesTrustScopesItem{ + ServerTrustGroupPropertiesTrustScopesItemGlobalTransactions, + ServerTrustGroupPropertiesTrustScopesItemServiceBroker, + } +} + +// ServerWorkspaceFeature - Whether or not existing server has a workspace created and if it allows connection from workspace +type ServerWorkspaceFeature string + +const ( + ServerWorkspaceFeatureConnected ServerWorkspaceFeature = "Connected" + ServerWorkspaceFeatureDisconnected ServerWorkspaceFeature = "Disconnected" +) + +// PossibleServerWorkspaceFeatureValues returns the possible values for the ServerWorkspaceFeature const type. +func PossibleServerWorkspaceFeatureValues() []ServerWorkspaceFeature { + return []ServerWorkspaceFeature{ + ServerWorkspaceFeatureConnected, + ServerWorkspaceFeatureDisconnected, + } +} + +// ServiceObjectiveName - The serviceLevelObjective for SLO usage metric. +type ServiceObjectiveName string + +const ( + ServiceObjectiveNameBasic ServiceObjectiveName = "Basic" + ServiceObjectiveNameDS100 ServiceObjectiveName = "DS100" + ServiceObjectiveNameDS1000 ServiceObjectiveName = "DS1000" + ServiceObjectiveNameDS1200 ServiceObjectiveName = "DS1200" + ServiceObjectiveNameDS1500 ServiceObjectiveName = "DS1500" + ServiceObjectiveNameDS200 ServiceObjectiveName = "DS200" + ServiceObjectiveNameDS2000 ServiceObjectiveName = "DS2000" + ServiceObjectiveNameDS300 ServiceObjectiveName = "DS300" + ServiceObjectiveNameDS400 ServiceObjectiveName = "DS400" + ServiceObjectiveNameDS500 ServiceObjectiveName = "DS500" + ServiceObjectiveNameDS600 ServiceObjectiveName = "DS600" + ServiceObjectiveNameDW100 ServiceObjectiveName = "DW100" + ServiceObjectiveNameDW1000 ServiceObjectiveName = "DW1000" + ServiceObjectiveNameDW10000C ServiceObjectiveName = "DW10000c" + ServiceObjectiveNameDW1000C ServiceObjectiveName = "DW1000c" + ServiceObjectiveNameDW1200 ServiceObjectiveName = "DW1200" + ServiceObjectiveNameDW1500 ServiceObjectiveName = "DW1500" + ServiceObjectiveNameDW15000C ServiceObjectiveName = "DW15000c" + ServiceObjectiveNameDW1500C ServiceObjectiveName = "DW1500c" + ServiceObjectiveNameDW200 ServiceObjectiveName = "DW200" + ServiceObjectiveNameDW2000 ServiceObjectiveName = "DW2000" + ServiceObjectiveNameDW2000C ServiceObjectiveName = "DW2000c" + ServiceObjectiveNameDW2500C ServiceObjectiveName = "DW2500c" + ServiceObjectiveNameDW300 ServiceObjectiveName = "DW300" + ServiceObjectiveNameDW3000 ServiceObjectiveName = "DW3000" + ServiceObjectiveNameDW30000C ServiceObjectiveName = "DW30000c" + ServiceObjectiveNameDW3000C ServiceObjectiveName = "DW3000c" + ServiceObjectiveNameDW400 ServiceObjectiveName = "DW400" + ServiceObjectiveNameDW500 ServiceObjectiveName = "DW500" + ServiceObjectiveNameDW5000C ServiceObjectiveName = "DW5000c" + ServiceObjectiveNameDW600 ServiceObjectiveName = "DW600" + ServiceObjectiveNameDW6000 ServiceObjectiveName = "DW6000" + ServiceObjectiveNameDW6000C ServiceObjectiveName = "DW6000c" + ServiceObjectiveNameDW7500C ServiceObjectiveName = "DW7500c" + ServiceObjectiveNameElasticPool ServiceObjectiveName = "ElasticPool" + ServiceObjectiveNameFree ServiceObjectiveName = "Free" + ServiceObjectiveNameP1 ServiceObjectiveName = "P1" + ServiceObjectiveNameP11 ServiceObjectiveName = "P11" + ServiceObjectiveNameP15 ServiceObjectiveName = "P15" + ServiceObjectiveNameP2 ServiceObjectiveName = "P2" + ServiceObjectiveNameP3 ServiceObjectiveName = "P3" + ServiceObjectiveNameP4 ServiceObjectiveName = "P4" + ServiceObjectiveNameP6 ServiceObjectiveName = "P6" + ServiceObjectiveNamePRS1 ServiceObjectiveName = "PRS1" + ServiceObjectiveNamePRS2 ServiceObjectiveName = "PRS2" + ServiceObjectiveNamePRS4 ServiceObjectiveName = "PRS4" + ServiceObjectiveNamePRS6 ServiceObjectiveName = "PRS6" + ServiceObjectiveNameS0 ServiceObjectiveName = "S0" + ServiceObjectiveNameS1 ServiceObjectiveName = "S1" + ServiceObjectiveNameS12 ServiceObjectiveName = "S12" + ServiceObjectiveNameS2 ServiceObjectiveName = "S2" + ServiceObjectiveNameS3 ServiceObjectiveName = "S3" + ServiceObjectiveNameS4 ServiceObjectiveName = "S4" + ServiceObjectiveNameS6 ServiceObjectiveName = "S6" + ServiceObjectiveNameS7 ServiceObjectiveName = "S7" + ServiceObjectiveNameS9 ServiceObjectiveName = "S9" + ServiceObjectiveNameSystem ServiceObjectiveName = "System" + ServiceObjectiveNameSystem0 ServiceObjectiveName = "System0" + ServiceObjectiveNameSystem1 ServiceObjectiveName = "System1" + ServiceObjectiveNameSystem2 ServiceObjectiveName = "System2" + ServiceObjectiveNameSystem2L ServiceObjectiveName = "System2L" + ServiceObjectiveNameSystem3 ServiceObjectiveName = "System3" + ServiceObjectiveNameSystem3L ServiceObjectiveName = "System3L" + ServiceObjectiveNameSystem4 ServiceObjectiveName = "System4" + ServiceObjectiveNameSystem4L ServiceObjectiveName = "System4L" +) + +// PossibleServiceObjectiveNameValues returns the possible values for the ServiceObjectiveName const type. +func PossibleServiceObjectiveNameValues() []ServiceObjectiveName { + return []ServiceObjectiveName{ + ServiceObjectiveNameBasic, + ServiceObjectiveNameDS100, + ServiceObjectiveNameDS1000, + ServiceObjectiveNameDS1200, + ServiceObjectiveNameDS1500, + ServiceObjectiveNameDS200, + ServiceObjectiveNameDS2000, + ServiceObjectiveNameDS300, + ServiceObjectiveNameDS400, + ServiceObjectiveNameDS500, + ServiceObjectiveNameDS600, + ServiceObjectiveNameDW100, + ServiceObjectiveNameDW1000, + ServiceObjectiveNameDW10000C, + ServiceObjectiveNameDW1000C, + ServiceObjectiveNameDW1200, + ServiceObjectiveNameDW1500, + ServiceObjectiveNameDW15000C, + ServiceObjectiveNameDW1500C, + ServiceObjectiveNameDW200, + ServiceObjectiveNameDW2000, + ServiceObjectiveNameDW2000C, + ServiceObjectiveNameDW2500C, + ServiceObjectiveNameDW300, + ServiceObjectiveNameDW3000, + ServiceObjectiveNameDW30000C, + ServiceObjectiveNameDW3000C, + ServiceObjectiveNameDW400, + ServiceObjectiveNameDW500, + ServiceObjectiveNameDW5000C, + ServiceObjectiveNameDW600, + ServiceObjectiveNameDW6000, + ServiceObjectiveNameDW6000C, + ServiceObjectiveNameDW7500C, + ServiceObjectiveNameElasticPool, + ServiceObjectiveNameFree, + ServiceObjectiveNameP1, + ServiceObjectiveNameP11, + ServiceObjectiveNameP15, + ServiceObjectiveNameP2, + ServiceObjectiveNameP3, + ServiceObjectiveNameP4, + ServiceObjectiveNameP6, + ServiceObjectiveNamePRS1, + ServiceObjectiveNamePRS2, + ServiceObjectiveNamePRS4, + ServiceObjectiveNamePRS6, + ServiceObjectiveNameS0, + ServiceObjectiveNameS1, + ServiceObjectiveNameS12, + ServiceObjectiveNameS2, + ServiceObjectiveNameS3, + ServiceObjectiveNameS4, + ServiceObjectiveNameS6, + ServiceObjectiveNameS7, + ServiceObjectiveNameS9, + ServiceObjectiveNameSystem, + ServiceObjectiveNameSystem0, + ServiceObjectiveNameSystem1, + ServiceObjectiveNameSystem2, + ServiceObjectiveNameSystem2L, + ServiceObjectiveNameSystem3, + ServiceObjectiveNameSystem3L, + ServiceObjectiveNameSystem4, + ServiceObjectiveNameSystem4L, + } +} + +// ServicePrincipalType - Service principal type. +type ServicePrincipalType string + +const ( + ServicePrincipalTypeNone ServicePrincipalType = "None" + ServicePrincipalTypeSystemAssigned ServicePrincipalType = "SystemAssigned" +) + +// PossibleServicePrincipalTypeValues returns the possible values for the ServicePrincipalType const type. +func PossibleServicePrincipalTypeValues() []ServicePrincipalType { + return []ServicePrincipalType{ + ServicePrincipalTypeNone, + ServicePrincipalTypeSystemAssigned, + } +} + +type ShortTermRetentionPolicyName string + +const ( + ShortTermRetentionPolicyNameDefault ShortTermRetentionPolicyName = "default" +) + +// PossibleShortTermRetentionPolicyNameValues returns the possible values for the ShortTermRetentionPolicyName const type. +func PossibleShortTermRetentionPolicyNameValues() []ShortTermRetentionPolicyName { + return []ShortTermRetentionPolicyName{ + ShortTermRetentionPolicyNameDefault, + } +} + +// StorageCapabilityStorageAccountType - The storage account type for the database's backups. +type StorageCapabilityStorageAccountType string + +const ( + StorageCapabilityStorageAccountTypeGRS StorageCapabilityStorageAccountType = "GRS" + StorageCapabilityStorageAccountTypeLRS StorageCapabilityStorageAccountType = "LRS" + StorageCapabilityStorageAccountTypeZRS StorageCapabilityStorageAccountType = "ZRS" +) + +// PossibleStorageCapabilityStorageAccountTypeValues returns the possible values for the StorageCapabilityStorageAccountType const type. +func PossibleStorageCapabilityStorageAccountTypeValues() []StorageCapabilityStorageAccountType { + return []StorageCapabilityStorageAccountType{ + StorageCapabilityStorageAccountTypeGRS, + StorageCapabilityStorageAccountTypeLRS, + StorageCapabilityStorageAccountTypeZRS, + } +} + +// StorageKeyType - Storage key type. +type StorageKeyType string + +const ( + StorageKeyTypeSharedAccessKey StorageKeyType = "SharedAccessKey" + StorageKeyTypeStorageAccessKey StorageKeyType = "StorageAccessKey" +) + +// PossibleStorageKeyTypeValues returns the possible values for the StorageKeyType const type. +func PossibleStorageKeyTypeValues() []StorageKeyType { + return []StorageKeyType{ + StorageKeyTypeSharedAccessKey, + StorageKeyTypeStorageAccessKey, + } +} + +// SyncAgentState - State of the sync agent. +type SyncAgentState string + +const ( + SyncAgentStateNeverConnected SyncAgentState = "NeverConnected" + SyncAgentStateOffline SyncAgentState = "Offline" + SyncAgentStateOnline SyncAgentState = "Online" +) + +// PossibleSyncAgentStateValues returns the possible values for the SyncAgentState const type. +func PossibleSyncAgentStateValues() []SyncAgentState { + return []SyncAgentState{ + SyncAgentStateNeverConnected, + SyncAgentStateOffline, + SyncAgentStateOnline, + } +} + +// SyncConflictResolutionPolicy - Conflict resolution policy of the sync group. +type SyncConflictResolutionPolicy string + +const ( + SyncConflictResolutionPolicyHubWin SyncConflictResolutionPolicy = "HubWin" + SyncConflictResolutionPolicyMemberWin SyncConflictResolutionPolicy = "MemberWin" +) + +// PossibleSyncConflictResolutionPolicyValues returns the possible values for the SyncConflictResolutionPolicy const type. +func PossibleSyncConflictResolutionPolicyValues() []SyncConflictResolutionPolicy { + return []SyncConflictResolutionPolicy{ + SyncConflictResolutionPolicyHubWin, + SyncConflictResolutionPolicyMemberWin, + } +} + +// SyncDirection - Sync direction of the sync member. +type SyncDirection string + +const ( + SyncDirectionBidirectional SyncDirection = "Bidirectional" + SyncDirectionOneWayHubToMember SyncDirection = "OneWayHubToMember" + SyncDirectionOneWayMemberToHub SyncDirection = "OneWayMemberToHub" +) + +// PossibleSyncDirectionValues returns the possible values for the SyncDirection const type. +func PossibleSyncDirectionValues() []SyncDirection { + return []SyncDirection{ + SyncDirectionBidirectional, + SyncDirectionOneWayHubToMember, + SyncDirectionOneWayMemberToHub, + } +} + +// SyncGroupLogType - Type of the sync group log. +type SyncGroupLogType string + +const ( + SyncGroupLogTypeAll SyncGroupLogType = "All" + SyncGroupLogTypeError SyncGroupLogType = "Error" + SyncGroupLogTypeSuccess SyncGroupLogType = "Success" + SyncGroupLogTypeWarning SyncGroupLogType = "Warning" +) + +// PossibleSyncGroupLogTypeValues returns the possible values for the SyncGroupLogType const type. +func PossibleSyncGroupLogTypeValues() []SyncGroupLogType { + return []SyncGroupLogType{ + SyncGroupLogTypeAll, + SyncGroupLogTypeError, + SyncGroupLogTypeSuccess, + SyncGroupLogTypeWarning, + } +} + +// SyncGroupState - Sync state of the sync group. +type SyncGroupState string + +const ( + SyncGroupStateError SyncGroupState = "Error" + SyncGroupStateGood SyncGroupState = "Good" + SyncGroupStateNotReady SyncGroupState = "NotReady" + SyncGroupStateProgressing SyncGroupState = "Progressing" + SyncGroupStateWarning SyncGroupState = "Warning" +) + +// PossibleSyncGroupStateValues returns the possible values for the SyncGroupState const type. +func PossibleSyncGroupStateValues() []SyncGroupState { + return []SyncGroupState{ + SyncGroupStateError, + SyncGroupStateGood, + SyncGroupStateNotReady, + SyncGroupStateProgressing, + SyncGroupStateWarning, + } +} + +type SyncGroupsType string + +const ( + SyncGroupsTypeAll SyncGroupsType = "All" + SyncGroupsTypeError SyncGroupsType = "Error" + SyncGroupsTypeSuccess SyncGroupsType = "Success" + SyncGroupsTypeWarning SyncGroupsType = "Warning" +) + +// PossibleSyncGroupsTypeValues returns the possible values for the SyncGroupsType const type. +func PossibleSyncGroupsTypeValues() []SyncGroupsType { + return []SyncGroupsType{ + SyncGroupsTypeAll, + SyncGroupsTypeError, + SyncGroupsTypeSuccess, + SyncGroupsTypeWarning, + } +} + +// SyncMemberDbType - Type of the sync agent linked database. +type SyncMemberDbType string + +const ( + SyncMemberDbTypeAzureSQLDatabase SyncMemberDbType = "AzureSqlDatabase" + SyncMemberDbTypeSQLServerDatabase SyncMemberDbType = "SqlServerDatabase" +) + +// PossibleSyncMemberDbTypeValues returns the possible values for the SyncMemberDbType const type. +func PossibleSyncMemberDbTypeValues() []SyncMemberDbType { + return []SyncMemberDbType{ + SyncMemberDbTypeAzureSQLDatabase, + SyncMemberDbTypeSQLServerDatabase, + } +} + +// SyncMemberState - Sync state of the sync member. +type SyncMemberState string + +const ( + SyncMemberStateDeProvisionFailed SyncMemberState = "DeProvisionFailed" + SyncMemberStateDeProvisioned SyncMemberState = "DeProvisioned" + SyncMemberStateDeProvisioning SyncMemberState = "DeProvisioning" + SyncMemberStateDisabledBackupRestore SyncMemberState = "DisabledBackupRestore" + SyncMemberStateDisabledTombstoneCleanup SyncMemberState = "DisabledTombstoneCleanup" + SyncMemberStateProvisionFailed SyncMemberState = "ProvisionFailed" + SyncMemberStateProvisioned SyncMemberState = "Provisioned" + SyncMemberStateProvisioning SyncMemberState = "Provisioning" + SyncMemberStateReprovisionFailed SyncMemberState = "ReprovisionFailed" + SyncMemberStateReprovisioning SyncMemberState = "Reprovisioning" + SyncMemberStateSyncCancelled SyncMemberState = "SyncCancelled" + SyncMemberStateSyncCancelling SyncMemberState = "SyncCancelling" + SyncMemberStateSyncFailed SyncMemberState = "SyncFailed" + SyncMemberStateSyncInProgress SyncMemberState = "SyncInProgress" + SyncMemberStateSyncSucceeded SyncMemberState = "SyncSucceeded" + SyncMemberStateSyncSucceededWithWarnings SyncMemberState = "SyncSucceededWithWarnings" + SyncMemberStateUnProvisioned SyncMemberState = "UnProvisioned" + SyncMemberStateUnReprovisioned SyncMemberState = "UnReprovisioned" +) + +// PossibleSyncMemberStateValues returns the possible values for the SyncMemberState const type. +func PossibleSyncMemberStateValues() []SyncMemberState { + return []SyncMemberState{ + SyncMemberStateDeProvisionFailed, + SyncMemberStateDeProvisioned, + SyncMemberStateDeProvisioning, + SyncMemberStateDisabledBackupRestore, + SyncMemberStateDisabledTombstoneCleanup, + SyncMemberStateProvisionFailed, + SyncMemberStateProvisioned, + SyncMemberStateProvisioning, + SyncMemberStateReprovisionFailed, + SyncMemberStateReprovisioning, + SyncMemberStateSyncCancelled, + SyncMemberStateSyncCancelling, + SyncMemberStateSyncFailed, + SyncMemberStateSyncInProgress, + SyncMemberStateSyncSucceeded, + SyncMemberStateSyncSucceededWithWarnings, + SyncMemberStateUnProvisioned, + SyncMemberStateUnReprovisioned, + } +} + +// TableTemporalType - The table temporal type. +type TableTemporalType string + +const ( + TableTemporalTypeHistoryTable TableTemporalType = "HistoryTable" + TableTemporalTypeNonTemporalTable TableTemporalType = "NonTemporalTable" + TableTemporalTypeSystemVersionedTemporalTable TableTemporalType = "SystemVersionedTemporalTable" +) + +// PossibleTableTemporalTypeValues returns the possible values for the TableTemporalType const type. +func PossibleTableTemporalTypeValues() []TableTemporalType { + return []TableTemporalType{ + TableTemporalTypeHistoryTable, + TableTemporalTypeNonTemporalTable, + TableTemporalTypeSystemVersionedTemporalTable, + } +} + +type TransparentDataEncryptionName string + +const ( + TransparentDataEncryptionNameCurrent TransparentDataEncryptionName = "current" +) + +// PossibleTransparentDataEncryptionNameValues returns the possible values for the TransparentDataEncryptionName const type. +func PossibleTransparentDataEncryptionNameValues() []TransparentDataEncryptionName { + return []TransparentDataEncryptionName{ + TransparentDataEncryptionNameCurrent, + } +} + +// TransparentDataEncryptionState - Specifies the state of the transparent data encryption. +type TransparentDataEncryptionState string + +const ( + TransparentDataEncryptionStateDisabled TransparentDataEncryptionState = "Disabled" + TransparentDataEncryptionStateEnabled TransparentDataEncryptionState = "Enabled" +) + +// PossibleTransparentDataEncryptionStateValues returns the possible values for the TransparentDataEncryptionState const type. +func PossibleTransparentDataEncryptionStateValues() []TransparentDataEncryptionState { + return []TransparentDataEncryptionState{ + TransparentDataEncryptionStateDisabled, + TransparentDataEncryptionStateEnabled, + } +} + +// UnitDefinitionType - The unit of the metric. +type UnitDefinitionType string + +const ( + UnitDefinitionTypeBytes UnitDefinitionType = "Bytes" + UnitDefinitionTypeBytesPerSecond UnitDefinitionType = "BytesPerSecond" + UnitDefinitionTypeCount UnitDefinitionType = "Count" + UnitDefinitionTypeCountPerSecond UnitDefinitionType = "CountPerSecond" + UnitDefinitionTypePercent UnitDefinitionType = "Percent" + UnitDefinitionTypeSeconds UnitDefinitionType = "Seconds" +) + +// PossibleUnitDefinitionTypeValues returns the possible values for the UnitDefinitionType const type. +func PossibleUnitDefinitionTypeValues() []UnitDefinitionType { + return []UnitDefinitionType{ + UnitDefinitionTypeBytes, + UnitDefinitionTypeBytesPerSecond, + UnitDefinitionTypeCount, + UnitDefinitionTypeCountPerSecond, + UnitDefinitionTypePercent, + UnitDefinitionTypeSeconds, + } +} + +// UnitType - The unit of the metric. +type UnitType string + +const ( + UnitTypeBytes UnitType = "bytes" + UnitTypeBytesPerSecond UnitType = "bytesPerSecond" + UnitTypeCount UnitType = "count" + UnitTypeCountPerSecond UnitType = "countPerSecond" + UnitTypePercent UnitType = "percent" + UnitTypeSeconds UnitType = "seconds" +) + +// PossibleUnitTypeValues returns the possible values for the UnitType const type. +func PossibleUnitTypeValues() []UnitType { + return []UnitType{ + UnitTypeBytes, + UnitTypeBytesPerSecond, + UnitTypeCount, + UnitTypeCountPerSecond, + UnitTypePercent, + UnitTypeSeconds, + } +} + +type UpsertManagedServerOperationStepStatus string + +const ( + UpsertManagedServerOperationStepStatusCanceled UpsertManagedServerOperationStepStatus = "Canceled" + UpsertManagedServerOperationStepStatusCompleted UpsertManagedServerOperationStepStatus = "Completed" + UpsertManagedServerOperationStepStatusFailed UpsertManagedServerOperationStepStatus = "Failed" + UpsertManagedServerOperationStepStatusInProgress UpsertManagedServerOperationStepStatus = "InProgress" + UpsertManagedServerOperationStepStatusNotStarted UpsertManagedServerOperationStepStatus = "NotStarted" + UpsertManagedServerOperationStepStatusSlowedDown UpsertManagedServerOperationStepStatus = "SlowedDown" +) + +// PossibleUpsertManagedServerOperationStepStatusValues returns the possible values for the UpsertManagedServerOperationStepStatus const type. +func PossibleUpsertManagedServerOperationStepStatusValues() []UpsertManagedServerOperationStepStatus { + return []UpsertManagedServerOperationStepStatus{ + UpsertManagedServerOperationStepStatusCanceled, + UpsertManagedServerOperationStepStatusCompleted, + UpsertManagedServerOperationStepStatusFailed, + UpsertManagedServerOperationStepStatusInProgress, + UpsertManagedServerOperationStepStatusNotStarted, + UpsertManagedServerOperationStepStatusSlowedDown, + } +} + +// VirtualNetworkRuleState - Virtual Network Rule State +type VirtualNetworkRuleState string + +const ( + VirtualNetworkRuleStateDeleting VirtualNetworkRuleState = "Deleting" + VirtualNetworkRuleStateFailed VirtualNetworkRuleState = "Failed" + VirtualNetworkRuleStateInProgress VirtualNetworkRuleState = "InProgress" + VirtualNetworkRuleStateInitializing VirtualNetworkRuleState = "Initializing" + VirtualNetworkRuleStateReady VirtualNetworkRuleState = "Ready" + VirtualNetworkRuleStateUnknown VirtualNetworkRuleState = "Unknown" +) + +// PossibleVirtualNetworkRuleStateValues returns the possible values for the VirtualNetworkRuleState const type. +func PossibleVirtualNetworkRuleStateValues() []VirtualNetworkRuleState { + return []VirtualNetworkRuleState{ + VirtualNetworkRuleStateDeleting, + VirtualNetworkRuleStateFailed, + VirtualNetworkRuleStateInProgress, + VirtualNetworkRuleStateInitializing, + VirtualNetworkRuleStateReady, + VirtualNetworkRuleStateUnknown, + } +} + +type VulnerabilityAssessmentName string + +const ( + VulnerabilityAssessmentNameDefault VulnerabilityAssessmentName = "default" +) + +// PossibleVulnerabilityAssessmentNameValues returns the possible values for the VulnerabilityAssessmentName const type. +func PossibleVulnerabilityAssessmentNameValues() []VulnerabilityAssessmentName { + return []VulnerabilityAssessmentName{ + VulnerabilityAssessmentNameDefault, + } +} + +type VulnerabilityAssessmentPolicyBaselineName string + +const ( + VulnerabilityAssessmentPolicyBaselineNameDefault VulnerabilityAssessmentPolicyBaselineName = "default" + VulnerabilityAssessmentPolicyBaselineNameMaster VulnerabilityAssessmentPolicyBaselineName = "master" +) + +// PossibleVulnerabilityAssessmentPolicyBaselineNameValues returns the possible values for the VulnerabilityAssessmentPolicyBaselineName const type. +func PossibleVulnerabilityAssessmentPolicyBaselineNameValues() []VulnerabilityAssessmentPolicyBaselineName { + return []VulnerabilityAssessmentPolicyBaselineName{ + VulnerabilityAssessmentPolicyBaselineNameDefault, + VulnerabilityAssessmentPolicyBaselineNameMaster, + } +} + +// VulnerabilityAssessmentScanState - The scan status. +type VulnerabilityAssessmentScanState string + +const ( + VulnerabilityAssessmentScanStateFailed VulnerabilityAssessmentScanState = "Failed" + VulnerabilityAssessmentScanStateFailedToRun VulnerabilityAssessmentScanState = "FailedToRun" + VulnerabilityAssessmentScanStateInProgress VulnerabilityAssessmentScanState = "InProgress" + VulnerabilityAssessmentScanStatePassed VulnerabilityAssessmentScanState = "Passed" +) + +// PossibleVulnerabilityAssessmentScanStateValues returns the possible values for the VulnerabilityAssessmentScanState const type. +func PossibleVulnerabilityAssessmentScanStateValues() []VulnerabilityAssessmentScanState { + return []VulnerabilityAssessmentScanState{ + VulnerabilityAssessmentScanStateFailed, + VulnerabilityAssessmentScanStateFailedToRun, + VulnerabilityAssessmentScanStateInProgress, + VulnerabilityAssessmentScanStatePassed, + } +} + +// VulnerabilityAssessmentScanTriggerType - The scan trigger type. +type VulnerabilityAssessmentScanTriggerType string + +const ( + VulnerabilityAssessmentScanTriggerTypeOnDemand VulnerabilityAssessmentScanTriggerType = "OnDemand" + VulnerabilityAssessmentScanTriggerTypeRecurring VulnerabilityAssessmentScanTriggerType = "Recurring" +) + +// PossibleVulnerabilityAssessmentScanTriggerTypeValues returns the possible values for the VulnerabilityAssessmentScanTriggerType const type. +func PossibleVulnerabilityAssessmentScanTriggerTypeValues() []VulnerabilityAssessmentScanTriggerType { + return []VulnerabilityAssessmentScanTriggerType{ + VulnerabilityAssessmentScanTriggerTypeOnDemand, + VulnerabilityAssessmentScanTriggerTypeRecurring, + } +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/databaseadvancedthreatprotectionsettings_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/databaseadvancedthreatprotectionsettings_client.go new file mode 100644 index 000000000..2377f18d7 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/databaseadvancedthreatprotectionsettings_client.go @@ -0,0 +1,271 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// DatabaseAdvancedThreatProtectionSettingsClient contains the methods for the DatabaseAdvancedThreatProtectionSettings group. +// Don't use this type directly, use NewDatabaseAdvancedThreatProtectionSettingsClient() instead. +type DatabaseAdvancedThreatProtectionSettingsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewDatabaseAdvancedThreatProtectionSettingsClient creates a new instance of DatabaseAdvancedThreatProtectionSettingsClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewDatabaseAdvancedThreatProtectionSettingsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DatabaseAdvancedThreatProtectionSettingsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &DatabaseAdvancedThreatProtectionSettingsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Creates or updates a database's Advanced Threat Protection state. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database. +// - advancedThreatProtectionName - The name of the Advanced Threat Protection state. +// - parameters - The database Advanced Threat Protection state. +// - options - DatabaseAdvancedThreatProtectionSettingsClientCreateOrUpdateOptions contains the optional parameters for the +// DatabaseAdvancedThreatProtectionSettingsClient.CreateOrUpdate method. +func (client *DatabaseAdvancedThreatProtectionSettingsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, advancedThreatProtectionName AdvancedThreatProtectionName, parameters DatabaseAdvancedThreatProtection, options *DatabaseAdvancedThreatProtectionSettingsClientCreateOrUpdateOptions) (DatabaseAdvancedThreatProtectionSettingsClientCreateOrUpdateResponse, error) { + var err error + const operationName = "DatabaseAdvancedThreatProtectionSettingsClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serverName, databaseName, advancedThreatProtectionName, parameters, options) + if err != nil { + return DatabaseAdvancedThreatProtectionSettingsClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return DatabaseAdvancedThreatProtectionSettingsClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return DatabaseAdvancedThreatProtectionSettingsClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *DatabaseAdvancedThreatProtectionSettingsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, advancedThreatProtectionName AdvancedThreatProtectionName, parameters DatabaseAdvancedThreatProtection, options *DatabaseAdvancedThreatProtectionSettingsClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/advancedThreatProtectionSettings/{advancedThreatProtectionName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if advancedThreatProtectionName == "" { + return nil, errors.New("parameter advancedThreatProtectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{advancedThreatProtectionName}", url.PathEscape(string(advancedThreatProtectionName))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *DatabaseAdvancedThreatProtectionSettingsClient) createOrUpdateHandleResponse(resp *http.Response) (DatabaseAdvancedThreatProtectionSettingsClientCreateOrUpdateResponse, error) { + result := DatabaseAdvancedThreatProtectionSettingsClientCreateOrUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DatabaseAdvancedThreatProtection); err != nil { + return DatabaseAdvancedThreatProtectionSettingsClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// Get - Gets a database's Advanced Threat Protection state. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database. +// - advancedThreatProtectionName - The name of the Advanced Threat Protection state. +// - options - DatabaseAdvancedThreatProtectionSettingsClientGetOptions contains the optional parameters for the DatabaseAdvancedThreatProtectionSettingsClient.Get +// method. +func (client *DatabaseAdvancedThreatProtectionSettingsClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, advancedThreatProtectionName AdvancedThreatProtectionName, options *DatabaseAdvancedThreatProtectionSettingsClientGetOptions) (DatabaseAdvancedThreatProtectionSettingsClientGetResponse, error) { + var err error + const operationName = "DatabaseAdvancedThreatProtectionSettingsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serverName, databaseName, advancedThreatProtectionName, options) + if err != nil { + return DatabaseAdvancedThreatProtectionSettingsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return DatabaseAdvancedThreatProtectionSettingsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DatabaseAdvancedThreatProtectionSettingsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *DatabaseAdvancedThreatProtectionSettingsClient) getCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, advancedThreatProtectionName AdvancedThreatProtectionName, options *DatabaseAdvancedThreatProtectionSettingsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/advancedThreatProtectionSettings/{advancedThreatProtectionName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if advancedThreatProtectionName == "" { + return nil, errors.New("parameter advancedThreatProtectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{advancedThreatProtectionName}", url.PathEscape(string(advancedThreatProtectionName))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *DatabaseAdvancedThreatProtectionSettingsClient) getHandleResponse(resp *http.Response) (DatabaseAdvancedThreatProtectionSettingsClientGetResponse, error) { + result := DatabaseAdvancedThreatProtectionSettingsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DatabaseAdvancedThreatProtection); err != nil { + return DatabaseAdvancedThreatProtectionSettingsClientGetResponse{}, err + } + return result, nil +} + +// NewListByDatabasePager - Gets a list of database's Advanced Threat Protection states. +// +// Generated from API version 2021-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database. +// - options - DatabaseAdvancedThreatProtectionSettingsClientListByDatabaseOptions contains the optional parameters for the +// DatabaseAdvancedThreatProtectionSettingsClient.NewListByDatabasePager method. +func (client *DatabaseAdvancedThreatProtectionSettingsClient) NewListByDatabasePager(resourceGroupName string, serverName string, databaseName string, options *DatabaseAdvancedThreatProtectionSettingsClientListByDatabaseOptions) *runtime.Pager[DatabaseAdvancedThreatProtectionSettingsClientListByDatabaseResponse] { + return runtime.NewPager(runtime.PagingHandler[DatabaseAdvancedThreatProtectionSettingsClientListByDatabaseResponse]{ + More: func(page DatabaseAdvancedThreatProtectionSettingsClientListByDatabaseResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *DatabaseAdvancedThreatProtectionSettingsClientListByDatabaseResponse) (DatabaseAdvancedThreatProtectionSettingsClientListByDatabaseResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DatabaseAdvancedThreatProtectionSettingsClient.NewListByDatabasePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByDatabaseCreateRequest(ctx, resourceGroupName, serverName, databaseName, options) + }, nil) + if err != nil { + return DatabaseAdvancedThreatProtectionSettingsClientListByDatabaseResponse{}, err + } + return client.listByDatabaseHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByDatabaseCreateRequest creates the ListByDatabase request. +func (client *DatabaseAdvancedThreatProtectionSettingsClient) listByDatabaseCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, options *DatabaseAdvancedThreatProtectionSettingsClientListByDatabaseOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/advancedThreatProtectionSettings" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByDatabaseHandleResponse handles the ListByDatabase response. +func (client *DatabaseAdvancedThreatProtectionSettingsClient) listByDatabaseHandleResponse(resp *http.Response) (DatabaseAdvancedThreatProtectionSettingsClientListByDatabaseResponse, error) { + result := DatabaseAdvancedThreatProtectionSettingsClientListByDatabaseResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DatabaseAdvancedThreatProtectionListResult); err != nil { + return DatabaseAdvancedThreatProtectionSettingsClientListByDatabaseResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/databaseadvisors_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/databaseadvisors_client.go new file mode 100644 index 000000000..bc464a221 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/databaseadvisors_client.go @@ -0,0 +1,272 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// DatabaseAdvisorsClient contains the methods for the DatabaseAdvisors group. +// Don't use this type directly, use NewDatabaseAdvisorsClient() instead. +type DatabaseAdvisorsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewDatabaseAdvisorsClient creates a new instance of DatabaseAdvisorsClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewDatabaseAdvisorsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DatabaseAdvisorsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &DatabaseAdvisorsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Gets a database advisor. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database. +// - advisorName - The name of the Database Advisor. +// - options - DatabaseAdvisorsClientGetOptions contains the optional parameters for the DatabaseAdvisorsClient.Get method. +func (client *DatabaseAdvisorsClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, advisorName string, options *DatabaseAdvisorsClientGetOptions) (DatabaseAdvisorsClientGetResponse, error) { + var err error + const operationName = "DatabaseAdvisorsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serverName, databaseName, advisorName, options) + if err != nil { + return DatabaseAdvisorsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return DatabaseAdvisorsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DatabaseAdvisorsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *DatabaseAdvisorsClient) getCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, advisorName string, options *DatabaseAdvisorsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/advisors/{advisorName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if advisorName == "" { + return nil, errors.New("parameter advisorName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{advisorName}", url.PathEscape(advisorName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *DatabaseAdvisorsClient) getHandleResponse(resp *http.Response) (DatabaseAdvisorsClientGetResponse, error) { + result := DatabaseAdvisorsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Advisor); err != nil { + return DatabaseAdvisorsClientGetResponse{}, err + } + return result, nil +} + +// ListByDatabase - Gets a list of database advisors. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database. +// - options - DatabaseAdvisorsClientListByDatabaseOptions contains the optional parameters for the DatabaseAdvisorsClient.ListByDatabase +// method. +func (client *DatabaseAdvisorsClient) ListByDatabase(ctx context.Context, resourceGroupName string, serverName string, databaseName string, options *DatabaseAdvisorsClientListByDatabaseOptions) (DatabaseAdvisorsClientListByDatabaseResponse, error) { + var err error + const operationName = "DatabaseAdvisorsClient.ListByDatabase" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listByDatabaseCreateRequest(ctx, resourceGroupName, serverName, databaseName, options) + if err != nil { + return DatabaseAdvisorsClientListByDatabaseResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return DatabaseAdvisorsClientListByDatabaseResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DatabaseAdvisorsClientListByDatabaseResponse{}, err + } + resp, err := client.listByDatabaseHandleResponse(httpResp) + return resp, err +} + +// listByDatabaseCreateRequest creates the ListByDatabase request. +func (client *DatabaseAdvisorsClient) listByDatabaseCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, options *DatabaseAdvisorsClientListByDatabaseOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/advisors" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Expand != nil { + reqQP.Set("$expand", *options.Expand) + } + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByDatabaseHandleResponse handles the ListByDatabase response. +func (client *DatabaseAdvisorsClient) listByDatabaseHandleResponse(resp *http.Response) (DatabaseAdvisorsClientListByDatabaseResponse, error) { + result := DatabaseAdvisorsClientListByDatabaseResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.AdvisorArray); err != nil { + return DatabaseAdvisorsClientListByDatabaseResponse{}, err + } + return result, nil +} + +// Update - Updates a database advisor. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database. +// - advisorName - The name of the Database Advisor. +// - parameters - The requested advisor resource state. +// - options - DatabaseAdvisorsClientUpdateOptions contains the optional parameters for the DatabaseAdvisorsClient.Update method. +func (client *DatabaseAdvisorsClient) Update(ctx context.Context, resourceGroupName string, serverName string, databaseName string, advisorName string, parameters Advisor, options *DatabaseAdvisorsClientUpdateOptions) (DatabaseAdvisorsClientUpdateResponse, error) { + var err error + const operationName = "DatabaseAdvisorsClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, serverName, databaseName, advisorName, parameters, options) + if err != nil { + return DatabaseAdvisorsClientUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return DatabaseAdvisorsClientUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DatabaseAdvisorsClientUpdateResponse{}, err + } + resp, err := client.updateHandleResponse(httpResp) + return resp, err +} + +// updateCreateRequest creates the Update request. +func (client *DatabaseAdvisorsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, advisorName string, parameters Advisor, options *DatabaseAdvisorsClientUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/advisors/{advisorName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if advisorName == "" { + return nil, errors.New("parameter advisorName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{advisorName}", url.PathEscape(advisorName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// updateHandleResponse handles the Update response. +func (client *DatabaseAdvisorsClient) updateHandleResponse(resp *http.Response) (DatabaseAdvisorsClientUpdateResponse, error) { + result := DatabaseAdvisorsClientUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Advisor); err != nil { + return DatabaseAdvisorsClientUpdateResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/databaseautomatictuning_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/databaseautomatictuning_client.go new file mode 100644 index 000000000..ee7509306 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/databaseautomatictuning_client.go @@ -0,0 +1,190 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// DatabaseAutomaticTuningClient contains the methods for the DatabaseAutomaticTuning group. +// Don't use this type directly, use NewDatabaseAutomaticTuningClient() instead. +type DatabaseAutomaticTuningClient struct { + internal *arm.Client + subscriptionID string +} + +// NewDatabaseAutomaticTuningClient creates a new instance of DatabaseAutomaticTuningClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewDatabaseAutomaticTuningClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DatabaseAutomaticTuningClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &DatabaseAutomaticTuningClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Gets a database's automatic tuning. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database. +// - options - DatabaseAutomaticTuningClientGetOptions contains the optional parameters for the DatabaseAutomaticTuningClient.Get +// method. +func (client *DatabaseAutomaticTuningClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, options *DatabaseAutomaticTuningClientGetOptions) (DatabaseAutomaticTuningClientGetResponse, error) { + var err error + const operationName = "DatabaseAutomaticTuningClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serverName, databaseName, options) + if err != nil { + return DatabaseAutomaticTuningClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return DatabaseAutomaticTuningClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DatabaseAutomaticTuningClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *DatabaseAutomaticTuningClient) getCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, options *DatabaseAutomaticTuningClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/automaticTuning/current" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *DatabaseAutomaticTuningClient) getHandleResponse(resp *http.Response) (DatabaseAutomaticTuningClientGetResponse, error) { + result := DatabaseAutomaticTuningClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DatabaseAutomaticTuning); err != nil { + return DatabaseAutomaticTuningClientGetResponse{}, err + } + return result, nil +} + +// Update - Update automatic tuning properties for target database. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database. +// - parameters - The requested automatic tuning resource state. +// - options - DatabaseAutomaticTuningClientUpdateOptions contains the optional parameters for the DatabaseAutomaticTuningClient.Update +// method. +func (client *DatabaseAutomaticTuningClient) Update(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters DatabaseAutomaticTuning, options *DatabaseAutomaticTuningClientUpdateOptions) (DatabaseAutomaticTuningClientUpdateResponse, error) { + var err error + const operationName = "DatabaseAutomaticTuningClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, serverName, databaseName, parameters, options) + if err != nil { + return DatabaseAutomaticTuningClientUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return DatabaseAutomaticTuningClientUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DatabaseAutomaticTuningClientUpdateResponse{}, err + } + resp, err := client.updateHandleResponse(httpResp) + return resp, err +} + +// updateCreateRequest creates the Update request. +func (client *DatabaseAutomaticTuningClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters DatabaseAutomaticTuning, options *DatabaseAutomaticTuningClientUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/automaticTuning/current" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// updateHandleResponse handles the Update response. +func (client *DatabaseAutomaticTuningClient) updateHandleResponse(resp *http.Response) (DatabaseAutomaticTuningClientUpdateResponse, error) { + result := DatabaseAutomaticTuningClientUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DatabaseAutomaticTuning); err != nil { + return DatabaseAutomaticTuningClientUpdateResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/databaseblobauditingpolicies_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/databaseblobauditingpolicies_client.go new file mode 100644 index 000000000..eb398e659 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/databaseblobauditingpolicies_client.go @@ -0,0 +1,263 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// DatabaseBlobAuditingPoliciesClient contains the methods for the DatabaseBlobAuditingPolicies group. +// Don't use this type directly, use NewDatabaseBlobAuditingPoliciesClient() instead. +type DatabaseBlobAuditingPoliciesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewDatabaseBlobAuditingPoliciesClient creates a new instance of DatabaseBlobAuditingPoliciesClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewDatabaseBlobAuditingPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DatabaseBlobAuditingPoliciesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &DatabaseBlobAuditingPoliciesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Creates or updates a database's blob auditing policy. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database. +// - parameters - The database blob auditing policy. +// - options - DatabaseBlobAuditingPoliciesClientCreateOrUpdateOptions contains the optional parameters for the DatabaseBlobAuditingPoliciesClient.CreateOrUpdate +// method. +func (client *DatabaseBlobAuditingPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters DatabaseBlobAuditingPolicy, options *DatabaseBlobAuditingPoliciesClientCreateOrUpdateOptions) (DatabaseBlobAuditingPoliciesClientCreateOrUpdateResponse, error) { + var err error + const operationName = "DatabaseBlobAuditingPoliciesClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serverName, databaseName, parameters, options) + if err != nil { + return DatabaseBlobAuditingPoliciesClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return DatabaseBlobAuditingPoliciesClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return DatabaseBlobAuditingPoliciesClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *DatabaseBlobAuditingPoliciesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters DatabaseBlobAuditingPolicy, options *DatabaseBlobAuditingPoliciesClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/auditingSettings/{blobAuditingPolicyName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + urlPath = strings.ReplaceAll(urlPath, "{blobAuditingPolicyName}", url.PathEscape("default")) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *DatabaseBlobAuditingPoliciesClient) createOrUpdateHandleResponse(resp *http.Response) (DatabaseBlobAuditingPoliciesClientCreateOrUpdateResponse, error) { + result := DatabaseBlobAuditingPoliciesClientCreateOrUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DatabaseBlobAuditingPolicy); err != nil { + return DatabaseBlobAuditingPoliciesClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// Get - Gets a database's blob auditing policy. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database. +// - options - DatabaseBlobAuditingPoliciesClientGetOptions contains the optional parameters for the DatabaseBlobAuditingPoliciesClient.Get +// method. +func (client *DatabaseBlobAuditingPoliciesClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, options *DatabaseBlobAuditingPoliciesClientGetOptions) (DatabaseBlobAuditingPoliciesClientGetResponse, error) { + var err error + const operationName = "DatabaseBlobAuditingPoliciesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serverName, databaseName, options) + if err != nil { + return DatabaseBlobAuditingPoliciesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return DatabaseBlobAuditingPoliciesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DatabaseBlobAuditingPoliciesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *DatabaseBlobAuditingPoliciesClient) getCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, options *DatabaseBlobAuditingPoliciesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/auditingSettings/{blobAuditingPolicyName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + urlPath = strings.ReplaceAll(urlPath, "{blobAuditingPolicyName}", url.PathEscape("default")) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *DatabaseBlobAuditingPoliciesClient) getHandleResponse(resp *http.Response) (DatabaseBlobAuditingPoliciesClientGetResponse, error) { + result := DatabaseBlobAuditingPoliciesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DatabaseBlobAuditingPolicy); err != nil { + return DatabaseBlobAuditingPoliciesClientGetResponse{}, err + } + return result, nil +} + +// NewListByDatabasePager - Lists auditing settings of a database. +// +// Generated from API version 2021-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database. +// - options - DatabaseBlobAuditingPoliciesClientListByDatabaseOptions contains the optional parameters for the DatabaseBlobAuditingPoliciesClient.NewListByDatabasePager +// method. +func (client *DatabaseBlobAuditingPoliciesClient) NewListByDatabasePager(resourceGroupName string, serverName string, databaseName string, options *DatabaseBlobAuditingPoliciesClientListByDatabaseOptions) *runtime.Pager[DatabaseBlobAuditingPoliciesClientListByDatabaseResponse] { + return runtime.NewPager(runtime.PagingHandler[DatabaseBlobAuditingPoliciesClientListByDatabaseResponse]{ + More: func(page DatabaseBlobAuditingPoliciesClientListByDatabaseResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *DatabaseBlobAuditingPoliciesClientListByDatabaseResponse) (DatabaseBlobAuditingPoliciesClientListByDatabaseResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DatabaseBlobAuditingPoliciesClient.NewListByDatabasePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByDatabaseCreateRequest(ctx, resourceGroupName, serverName, databaseName, options) + }, nil) + if err != nil { + return DatabaseBlobAuditingPoliciesClientListByDatabaseResponse{}, err + } + return client.listByDatabaseHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByDatabaseCreateRequest creates the ListByDatabase request. +func (client *DatabaseBlobAuditingPoliciesClient) listByDatabaseCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, options *DatabaseBlobAuditingPoliciesClientListByDatabaseOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/auditingSettings" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByDatabaseHandleResponse handles the ListByDatabase response. +func (client *DatabaseBlobAuditingPoliciesClient) listByDatabaseHandleResponse(resp *http.Response) (DatabaseBlobAuditingPoliciesClientListByDatabaseResponse, error) { + result := DatabaseBlobAuditingPoliciesClientListByDatabaseResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DatabaseBlobAuditingPolicyListResult); err != nil { + return DatabaseBlobAuditingPoliciesClientListByDatabaseResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/databasecolumns_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/databasecolumns_client.go new file mode 100644 index 000000000..c74247435 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/databasecolumns_client.go @@ -0,0 +1,307 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// DatabaseColumnsClient contains the methods for the DatabaseColumns group. +// Don't use this type directly, use NewDatabaseColumnsClient() instead. +type DatabaseColumnsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewDatabaseColumnsClient creates a new instance of DatabaseColumnsClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewDatabaseColumnsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DatabaseColumnsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &DatabaseColumnsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Get database column +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database. +// - schemaName - The name of the schema. +// - tableName - The name of the table. +// - columnName - The name of the column. +// - options - DatabaseColumnsClientGetOptions contains the optional parameters for the DatabaseColumnsClient.Get method. +func (client *DatabaseColumnsClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, schemaName string, tableName string, columnName string, options *DatabaseColumnsClientGetOptions) (DatabaseColumnsClientGetResponse, error) { + var err error + const operationName = "DatabaseColumnsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serverName, databaseName, schemaName, tableName, columnName, options) + if err != nil { + return DatabaseColumnsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return DatabaseColumnsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DatabaseColumnsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *DatabaseColumnsClient) getCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, schemaName string, tableName string, columnName string, options *DatabaseColumnsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if schemaName == "" { + return nil, errors.New("parameter schemaName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{schemaName}", url.PathEscape(schemaName)) + if tableName == "" { + return nil, errors.New("parameter tableName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{tableName}", url.PathEscape(tableName)) + if columnName == "" { + return nil, errors.New("parameter columnName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{columnName}", url.PathEscape(columnName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *DatabaseColumnsClient) getHandleResponse(resp *http.Response) (DatabaseColumnsClientGetResponse, error) { + result := DatabaseColumnsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DatabaseColumn); err != nil { + return DatabaseColumnsClientGetResponse{}, err + } + return result, nil +} + +// NewListByDatabasePager - List database columns +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database. +// - options - DatabaseColumnsClientListByDatabaseOptions contains the optional parameters for the DatabaseColumnsClient.NewListByDatabasePager +// method. +func (client *DatabaseColumnsClient) NewListByDatabasePager(resourceGroupName string, serverName string, databaseName string, options *DatabaseColumnsClientListByDatabaseOptions) *runtime.Pager[DatabaseColumnsClientListByDatabaseResponse] { + return runtime.NewPager(runtime.PagingHandler[DatabaseColumnsClientListByDatabaseResponse]{ + More: func(page DatabaseColumnsClientListByDatabaseResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *DatabaseColumnsClientListByDatabaseResponse) (DatabaseColumnsClientListByDatabaseResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DatabaseColumnsClient.NewListByDatabasePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByDatabaseCreateRequest(ctx, resourceGroupName, serverName, databaseName, options) + }, nil) + if err != nil { + return DatabaseColumnsClientListByDatabaseResponse{}, err + } + return client.listByDatabaseHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByDatabaseCreateRequest creates the ListByDatabase request. +func (client *DatabaseColumnsClient) listByDatabaseCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, options *DatabaseColumnsClientListByDatabaseOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/columns" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Schema != nil { + for _, qv := range options.Schema { + reqQP.Add("schema", qv) + } + } + if options != nil && options.Table != nil { + for _, qv := range options.Table { + reqQP.Add("table", qv) + } + } + if options != nil && options.Column != nil { + for _, qv := range options.Column { + reqQP.Add("column", qv) + } + } + if options != nil && options.OrderBy != nil { + for _, qv := range options.OrderBy { + reqQP.Add("orderBy", qv) + } + } + if options != nil && options.Skiptoken != nil { + reqQP.Set("$skiptoken", *options.Skiptoken) + } + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByDatabaseHandleResponse handles the ListByDatabase response. +func (client *DatabaseColumnsClient) listByDatabaseHandleResponse(resp *http.Response) (DatabaseColumnsClientListByDatabaseResponse, error) { + result := DatabaseColumnsClientListByDatabaseResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DatabaseColumnListResult); err != nil { + return DatabaseColumnsClientListByDatabaseResponse{}, err + } + return result, nil +} + +// NewListByTablePager - List database columns +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database. +// - schemaName - The name of the schema. +// - tableName - The name of the table. +// - options - DatabaseColumnsClientListByTableOptions contains the optional parameters for the DatabaseColumnsClient.NewListByTablePager +// method. +func (client *DatabaseColumnsClient) NewListByTablePager(resourceGroupName string, serverName string, databaseName string, schemaName string, tableName string, options *DatabaseColumnsClientListByTableOptions) *runtime.Pager[DatabaseColumnsClientListByTableResponse] { + return runtime.NewPager(runtime.PagingHandler[DatabaseColumnsClientListByTableResponse]{ + More: func(page DatabaseColumnsClientListByTableResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *DatabaseColumnsClientListByTableResponse) (DatabaseColumnsClientListByTableResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DatabaseColumnsClient.NewListByTablePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByTableCreateRequest(ctx, resourceGroupName, serverName, databaseName, schemaName, tableName, options) + }, nil) + if err != nil { + return DatabaseColumnsClientListByTableResponse{}, err + } + return client.listByTableHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByTableCreateRequest creates the ListByTable request. +func (client *DatabaseColumnsClient) listByTableCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, schemaName string, tableName string, options *DatabaseColumnsClientListByTableOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if schemaName == "" { + return nil, errors.New("parameter schemaName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{schemaName}", url.PathEscape(schemaName)) + if tableName == "" { + return nil, errors.New("parameter tableName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{tableName}", url.PathEscape(tableName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByTableHandleResponse handles the ListByTable response. +func (client *DatabaseColumnsClient) listByTableHandleResponse(resp *http.Response) (DatabaseColumnsClientListByTableResponse, error) { + result := DatabaseColumnsClientListByTableResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DatabaseColumnListResult); err != nil { + return DatabaseColumnsClientListByTableResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/databaseextensions_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/databaseextensions_client.go new file mode 100644 index 000000000..00110daf7 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/databaseextensions_client.go @@ -0,0 +1,268 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// DatabaseExtensionsClient contains the methods for the DatabaseExtensions group. +// Don't use this type directly, use NewDatabaseExtensionsClient() instead. +type DatabaseExtensionsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewDatabaseExtensionsClient creates a new instance of DatabaseExtensionsClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewDatabaseExtensionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DatabaseExtensionsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &DatabaseExtensionsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Perform a database extension operation, like polybase import +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-02-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database. +// - parameters - The database import request parameters. +// - options - DatabaseExtensionsClientBeginCreateOrUpdateOptions contains the optional parameters for the DatabaseExtensionsClient.BeginCreateOrUpdate +// method. +func (client *DatabaseExtensionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, extensionName string, parameters DatabaseExtensions, options *DatabaseExtensionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[DatabaseExtensionsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, serverName, databaseName, extensionName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DatabaseExtensionsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DatabaseExtensionsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Perform a database extension operation, like polybase import +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-02-01-preview +func (client *DatabaseExtensionsClient) createOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, extensionName string, parameters DatabaseExtensions, options *DatabaseExtensionsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "DatabaseExtensionsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serverName, databaseName, extensionName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *DatabaseExtensionsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, extensionName string, parameters DatabaseExtensions, options *DatabaseExtensionsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/extensions/{extensionName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if extensionName == "" { + return nil, errors.New("parameter extensionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{extensionName}", url.PathEscape(extensionName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-02-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// Get - Gets a database extension. This will return resource not found as it is not supported. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-02-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database. +// - options - DatabaseExtensionsClientGetOptions contains the optional parameters for the DatabaseExtensionsClient.Get method. +func (client *DatabaseExtensionsClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, extensionName string, options *DatabaseExtensionsClientGetOptions) (DatabaseExtensionsClientGetResponse, error) { + var err error + const operationName = "DatabaseExtensionsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serverName, databaseName, extensionName, options) + if err != nil { + return DatabaseExtensionsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return DatabaseExtensionsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DatabaseExtensionsClientGetResponse{}, err + } + return DatabaseExtensionsClientGetResponse{}, nil +} + +// getCreateRequest creates the Get request. +func (client *DatabaseExtensionsClient) getCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, extensionName string, options *DatabaseExtensionsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/extensions/{extensionName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if extensionName == "" { + return nil, errors.New("parameter extensionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{extensionName}", url.PathEscape(extensionName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-02-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + return req, nil +} + +// NewListByDatabasePager - List database extension. This will return an empty list as it is not supported. +// +// Generated from API version 2021-02-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database. +// - options - DatabaseExtensionsClientListByDatabaseOptions contains the optional parameters for the DatabaseExtensionsClient.NewListByDatabasePager +// method. +func (client *DatabaseExtensionsClient) NewListByDatabasePager(resourceGroupName string, serverName string, databaseName string, options *DatabaseExtensionsClientListByDatabaseOptions) *runtime.Pager[DatabaseExtensionsClientListByDatabaseResponse] { + return runtime.NewPager(runtime.PagingHandler[DatabaseExtensionsClientListByDatabaseResponse]{ + More: func(page DatabaseExtensionsClientListByDatabaseResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *DatabaseExtensionsClientListByDatabaseResponse) (DatabaseExtensionsClientListByDatabaseResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DatabaseExtensionsClient.NewListByDatabasePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByDatabaseCreateRequest(ctx, resourceGroupName, serverName, databaseName, options) + }, nil) + if err != nil { + return DatabaseExtensionsClientListByDatabaseResponse{}, err + } + return client.listByDatabaseHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByDatabaseCreateRequest creates the ListByDatabase request. +func (client *DatabaseExtensionsClient) listByDatabaseCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, options *DatabaseExtensionsClientListByDatabaseOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/extensions" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-02-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByDatabaseHandleResponse handles the ListByDatabase response. +func (client *DatabaseExtensionsClient) listByDatabaseHandleResponse(resp *http.Response) (DatabaseExtensionsClientListByDatabaseResponse, error) { + result := DatabaseExtensionsClientListByDatabaseResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ImportExportExtensionsOperationListResult); err != nil { + return DatabaseExtensionsClientListByDatabaseResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/databaseoperations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/databaseoperations_client.go new file mode 100644 index 000000000..5842a8886 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/databaseoperations_client.go @@ -0,0 +1,180 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// DatabaseOperationsClient contains the methods for the DatabaseOperations group. +// Don't use this type directly, use NewDatabaseOperationsClient() instead. +type DatabaseOperationsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewDatabaseOperationsClient creates a new instance of DatabaseOperationsClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewDatabaseOperationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DatabaseOperationsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &DatabaseOperationsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Cancel - Cancels the asynchronous operation on the database. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-02-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database. +// - operationID - The operation identifier. +// - options - DatabaseOperationsClientCancelOptions contains the optional parameters for the DatabaseOperationsClient.Cancel +// method. +func (client *DatabaseOperationsClient) Cancel(ctx context.Context, resourceGroupName string, serverName string, databaseName string, operationID string, options *DatabaseOperationsClientCancelOptions) (DatabaseOperationsClientCancelResponse, error) { + var err error + const operationName = "DatabaseOperationsClient.Cancel" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.cancelCreateRequest(ctx, resourceGroupName, serverName, databaseName, operationID, options) + if err != nil { + return DatabaseOperationsClientCancelResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return DatabaseOperationsClientCancelResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DatabaseOperationsClientCancelResponse{}, err + } + return DatabaseOperationsClientCancelResponse{}, nil +} + +// cancelCreateRequest creates the Cancel request. +func (client *DatabaseOperationsClient) cancelCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, operationID string, options *DatabaseOperationsClientCancelOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/operations/{operationId}/cancel" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if operationID == "" { + return nil, errors.New("parameter operationID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{operationId}", url.PathEscape(operationID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-02-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + return req, nil +} + +// NewListByDatabasePager - Gets a list of operations performed on the database. +// +// Generated from API version 2021-02-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database. +// - options - DatabaseOperationsClientListByDatabaseOptions contains the optional parameters for the DatabaseOperationsClient.NewListByDatabasePager +// method. +func (client *DatabaseOperationsClient) NewListByDatabasePager(resourceGroupName string, serverName string, databaseName string, options *DatabaseOperationsClientListByDatabaseOptions) *runtime.Pager[DatabaseOperationsClientListByDatabaseResponse] { + return runtime.NewPager(runtime.PagingHandler[DatabaseOperationsClientListByDatabaseResponse]{ + More: func(page DatabaseOperationsClientListByDatabaseResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *DatabaseOperationsClientListByDatabaseResponse) (DatabaseOperationsClientListByDatabaseResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DatabaseOperationsClient.NewListByDatabasePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByDatabaseCreateRequest(ctx, resourceGroupName, serverName, databaseName, options) + }, nil) + if err != nil { + return DatabaseOperationsClientListByDatabaseResponse{}, err + } + return client.listByDatabaseHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByDatabaseCreateRequest creates the ListByDatabase request. +func (client *DatabaseOperationsClient) listByDatabaseCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, options *DatabaseOperationsClientListByDatabaseOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/operations" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-02-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByDatabaseHandleResponse handles the ListByDatabase response. +func (client *DatabaseOperationsClient) listByDatabaseHandleResponse(resp *http.Response) (DatabaseOperationsClientListByDatabaseResponse, error) { + result := DatabaseOperationsClientListByDatabaseResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DatabaseOperationListResult); err != nil { + return DatabaseOperationsClientListByDatabaseResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/databaserecommendedactions_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/databaserecommendedactions_client.go new file mode 100644 index 000000000..b1fd3ab99 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/databaserecommendedactions_client.go @@ -0,0 +1,286 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// DatabaseRecommendedActionsClient contains the methods for the DatabaseRecommendedActions group. +// Don't use this type directly, use NewDatabaseRecommendedActionsClient() instead. +type DatabaseRecommendedActionsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewDatabaseRecommendedActionsClient creates a new instance of DatabaseRecommendedActionsClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewDatabaseRecommendedActionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DatabaseRecommendedActionsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &DatabaseRecommendedActionsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Gets a database recommended action. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database. +// - advisorName - The name of the Database Advisor. +// - recommendedActionName - The name of Database Recommended Action. +// - options - DatabaseRecommendedActionsClientGetOptions contains the optional parameters for the DatabaseRecommendedActionsClient.Get +// method. +func (client *DatabaseRecommendedActionsClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, advisorName string, recommendedActionName string, options *DatabaseRecommendedActionsClientGetOptions) (DatabaseRecommendedActionsClientGetResponse, error) { + var err error + const operationName = "DatabaseRecommendedActionsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serverName, databaseName, advisorName, recommendedActionName, options) + if err != nil { + return DatabaseRecommendedActionsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return DatabaseRecommendedActionsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DatabaseRecommendedActionsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *DatabaseRecommendedActionsClient) getCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, advisorName string, recommendedActionName string, options *DatabaseRecommendedActionsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/advisors/{advisorName}/recommendedActions/{recommendedActionName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if advisorName == "" { + return nil, errors.New("parameter advisorName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{advisorName}", url.PathEscape(advisorName)) + if recommendedActionName == "" { + return nil, errors.New("parameter recommendedActionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{recommendedActionName}", url.PathEscape(recommendedActionName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *DatabaseRecommendedActionsClient) getHandleResponse(resp *http.Response) (DatabaseRecommendedActionsClientGetResponse, error) { + result := DatabaseRecommendedActionsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RecommendedAction); err != nil { + return DatabaseRecommendedActionsClientGetResponse{}, err + } + return result, nil +} + +// ListByDatabaseAdvisor - Gets list of Database Recommended Actions. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database. +// - advisorName - The name of the Database Advisor. +// - options - DatabaseRecommendedActionsClientListByDatabaseAdvisorOptions contains the optional parameters for the DatabaseRecommendedActionsClient.ListByDatabaseAdvisor +// method. +func (client *DatabaseRecommendedActionsClient) ListByDatabaseAdvisor(ctx context.Context, resourceGroupName string, serverName string, databaseName string, advisorName string, options *DatabaseRecommendedActionsClientListByDatabaseAdvisorOptions) (DatabaseRecommendedActionsClientListByDatabaseAdvisorResponse, error) { + var err error + const operationName = "DatabaseRecommendedActionsClient.ListByDatabaseAdvisor" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listByDatabaseAdvisorCreateRequest(ctx, resourceGroupName, serverName, databaseName, advisorName, options) + if err != nil { + return DatabaseRecommendedActionsClientListByDatabaseAdvisorResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return DatabaseRecommendedActionsClientListByDatabaseAdvisorResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DatabaseRecommendedActionsClientListByDatabaseAdvisorResponse{}, err + } + resp, err := client.listByDatabaseAdvisorHandleResponse(httpResp) + return resp, err +} + +// listByDatabaseAdvisorCreateRequest creates the ListByDatabaseAdvisor request. +func (client *DatabaseRecommendedActionsClient) listByDatabaseAdvisorCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, advisorName string, options *DatabaseRecommendedActionsClientListByDatabaseAdvisorOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/advisors/{advisorName}/recommendedActions" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if advisorName == "" { + return nil, errors.New("parameter advisorName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{advisorName}", url.PathEscape(advisorName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByDatabaseAdvisorHandleResponse handles the ListByDatabaseAdvisor response. +func (client *DatabaseRecommendedActionsClient) listByDatabaseAdvisorHandleResponse(resp *http.Response) (DatabaseRecommendedActionsClientListByDatabaseAdvisorResponse, error) { + result := DatabaseRecommendedActionsClientListByDatabaseAdvisorResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RecommendedActionArray); err != nil { + return DatabaseRecommendedActionsClientListByDatabaseAdvisorResponse{}, err + } + return result, nil +} + +// Update - Updates a database recommended action. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database. +// - advisorName - The name of the Database Advisor. +// - recommendedActionName - The name of Database Recommended Action. +// - parameters - The requested recommended action resource state. +// - options - DatabaseRecommendedActionsClientUpdateOptions contains the optional parameters for the DatabaseRecommendedActionsClient.Update +// method. +func (client *DatabaseRecommendedActionsClient) Update(ctx context.Context, resourceGroupName string, serverName string, databaseName string, advisorName string, recommendedActionName string, parameters RecommendedAction, options *DatabaseRecommendedActionsClientUpdateOptions) (DatabaseRecommendedActionsClientUpdateResponse, error) { + var err error + const operationName = "DatabaseRecommendedActionsClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, serverName, databaseName, advisorName, recommendedActionName, parameters, options) + if err != nil { + return DatabaseRecommendedActionsClientUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return DatabaseRecommendedActionsClientUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DatabaseRecommendedActionsClientUpdateResponse{}, err + } + resp, err := client.updateHandleResponse(httpResp) + return resp, err +} + +// updateCreateRequest creates the Update request. +func (client *DatabaseRecommendedActionsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, advisorName string, recommendedActionName string, parameters RecommendedAction, options *DatabaseRecommendedActionsClientUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/advisors/{advisorName}/recommendedActions/{recommendedActionName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if advisorName == "" { + return nil, errors.New("parameter advisorName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{advisorName}", url.PathEscape(advisorName)) + if recommendedActionName == "" { + return nil, errors.New("parameter recommendedActionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{recommendedActionName}", url.PathEscape(recommendedActionName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// updateHandleResponse handles the Update response. +func (client *DatabaseRecommendedActionsClient) updateHandleResponse(resp *http.Response) (DatabaseRecommendedActionsClientUpdateResponse, error) { + result := DatabaseRecommendedActionsClientUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RecommendedAction); err != nil { + return DatabaseRecommendedActionsClientUpdateResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/databases_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/databases_client.go new file mode 100644 index 000000000..a9fd4c000 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/databases_client.go @@ -0,0 +1,1276 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// DatabasesClient contains the methods for the Databases group. +// Don't use this type directly, use NewDatabasesClient() instead. +type DatabasesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewDatabasesClient creates a new instance of DatabasesClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewDatabasesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DatabasesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &DatabasesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates a new database or updates an existing database. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-05-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database. +// - parameters - The requested database resource state. +// - options - DatabasesClientBeginCreateOrUpdateOptions contains the optional parameters for the DatabasesClient.BeginCreateOrUpdate +// method. +func (client *DatabasesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters Database, options *DatabasesClientBeginCreateOrUpdateOptions) (*runtime.Poller[DatabasesClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, serverName, databaseName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DatabasesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DatabasesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates a new database or updates an existing database. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-05-01-preview +func (client *DatabasesClient) createOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters Database, options *DatabasesClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "DatabasesClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serverName, databaseName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *DatabasesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters Database, options *DatabasesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-05-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes the database. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-05-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database. +// - options - DatabasesClientBeginDeleteOptions contains the optional parameters for the DatabasesClient.BeginDelete method. +func (client *DatabasesClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, databaseName string, options *DatabasesClientBeginDeleteOptions) (*runtime.Poller[DatabasesClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, serverName, databaseName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DatabasesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DatabasesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes the database. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-05-01-preview +func (client *DatabasesClient) deleteOperation(ctx context.Context, resourceGroupName string, serverName string, databaseName string, options *DatabasesClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "DatabasesClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serverName, databaseName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *DatabasesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, options *DatabasesClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-05-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + return req, nil +} + +// BeginExport - Exports a database. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-05-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database. +// - parameters - The database export request parameters. +// - options - DatabasesClientBeginExportOptions contains the optional parameters for the DatabasesClient.BeginExport method. +func (client *DatabasesClient) BeginExport(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters ExportDatabaseDefinition, options *DatabasesClientBeginExportOptions) (*runtime.Poller[DatabasesClientExportResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.export(ctx, resourceGroupName, serverName, databaseName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DatabasesClientExportResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DatabasesClientExportResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Export - Exports a database. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-05-01-preview +func (client *DatabasesClient) export(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters ExportDatabaseDefinition, options *DatabasesClientBeginExportOptions) (*http.Response, error) { + var err error + const operationName = "DatabasesClient.BeginExport" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.exportCreateRequest(ctx, resourceGroupName, serverName, databaseName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// exportCreateRequest creates the Export request. +func (client *DatabasesClient) exportCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters ExportDatabaseDefinition, options *DatabasesClientBeginExportOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/export" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-05-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginFailover - Failovers a database. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-05-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database to failover. +// - options - DatabasesClientBeginFailoverOptions contains the optional parameters for the DatabasesClient.BeginFailover method. +func (client *DatabasesClient) BeginFailover(ctx context.Context, resourceGroupName string, serverName string, databaseName string, options *DatabasesClientBeginFailoverOptions) (*runtime.Poller[DatabasesClientFailoverResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.failover(ctx, resourceGroupName, serverName, databaseName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DatabasesClientFailoverResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DatabasesClientFailoverResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Failover - Failovers a database. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-05-01-preview +func (client *DatabasesClient) failover(ctx context.Context, resourceGroupName string, serverName string, databaseName string, options *DatabasesClientBeginFailoverOptions) (*http.Response, error) { + var err error + const operationName = "DatabasesClient.BeginFailover" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.failoverCreateRequest(ctx, resourceGroupName, serverName, databaseName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// failoverCreateRequest creates the Failover request. +func (client *DatabasesClient) failoverCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, options *DatabasesClientBeginFailoverOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/failover" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.ReplicaType != nil { + reqQP.Set("replicaType", string(*options.ReplicaType)) + } + reqQP.Set("api-version", "2021-05-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + return req, nil +} + +// Get - Gets a database. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-05-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database. +// - options - DatabasesClientGetOptions contains the optional parameters for the DatabasesClient.Get method. +func (client *DatabasesClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, options *DatabasesClientGetOptions) (DatabasesClientGetResponse, error) { + var err error + const operationName = "DatabasesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serverName, databaseName, options) + if err != nil { + return DatabasesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return DatabasesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DatabasesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *DatabasesClient) getCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, options *DatabasesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-05-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *DatabasesClient) getHandleResponse(resp *http.Response) (DatabasesClientGetResponse, error) { + result := DatabasesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Database); err != nil { + return DatabasesClientGetResponse{}, err + } + return result, nil +} + +// BeginImport - Imports a bacpac into a new database. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-05-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database. +// - parameters - The database import request parameters. +// - options - DatabasesClientBeginImportOptions contains the optional parameters for the DatabasesClient.BeginImport method. +func (client *DatabasesClient) BeginImport(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters ImportExistingDatabaseDefinition, options *DatabasesClientBeginImportOptions) (*runtime.Poller[DatabasesClientImportResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.importOperation(ctx, resourceGroupName, serverName, databaseName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DatabasesClientImportResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DatabasesClientImportResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Import - Imports a bacpac into a new database. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-05-01-preview +func (client *DatabasesClient) importOperation(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters ImportExistingDatabaseDefinition, options *DatabasesClientBeginImportOptions) (*http.Response, error) { + var err error + const operationName = "DatabasesClient.BeginImport" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.importCreateRequest(ctx, resourceGroupName, serverName, databaseName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// importCreateRequest creates the Import request. +func (client *DatabasesClient) importCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters ImportExistingDatabaseDefinition, options *DatabasesClientBeginImportOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/import" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-05-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// NewListByElasticPoolPager - Gets a list of databases in an elastic pool. +// +// Generated from API version 2021-05-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - elasticPoolName - The name of the elastic pool. +// - options - DatabasesClientListByElasticPoolOptions contains the optional parameters for the DatabasesClient.NewListByElasticPoolPager +// method. +func (client *DatabasesClient) NewListByElasticPoolPager(resourceGroupName string, serverName string, elasticPoolName string, options *DatabasesClientListByElasticPoolOptions) *runtime.Pager[DatabasesClientListByElasticPoolResponse] { + return runtime.NewPager(runtime.PagingHandler[DatabasesClientListByElasticPoolResponse]{ + More: func(page DatabasesClientListByElasticPoolResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *DatabasesClientListByElasticPoolResponse) (DatabasesClientListByElasticPoolResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DatabasesClient.NewListByElasticPoolPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByElasticPoolCreateRequest(ctx, resourceGroupName, serverName, elasticPoolName, options) + }, nil) + if err != nil { + return DatabasesClientListByElasticPoolResponse{}, err + } + return client.listByElasticPoolHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByElasticPoolCreateRequest creates the ListByElasticPool request. +func (client *DatabasesClient) listByElasticPoolCreateRequest(ctx context.Context, resourceGroupName string, serverName string, elasticPoolName string, options *DatabasesClientListByElasticPoolOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/databases" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if elasticPoolName == "" { + return nil, errors.New("parameter elasticPoolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{elasticPoolName}", url.PathEscape(elasticPoolName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-05-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByElasticPoolHandleResponse handles the ListByElasticPool response. +func (client *DatabasesClient) listByElasticPoolHandleResponse(resp *http.Response) (DatabasesClientListByElasticPoolResponse, error) { + result := DatabasesClientListByElasticPoolResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DatabaseListResult); err != nil { + return DatabasesClientListByElasticPoolResponse{}, err + } + return result, nil +} + +// NewListByServerPager - Gets a list of databases. +// +// Generated from API version 2021-05-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - options - DatabasesClientListByServerOptions contains the optional parameters for the DatabasesClient.NewListByServerPager +// method. +func (client *DatabasesClient) NewListByServerPager(resourceGroupName string, serverName string, options *DatabasesClientListByServerOptions) *runtime.Pager[DatabasesClientListByServerResponse] { + return runtime.NewPager(runtime.PagingHandler[DatabasesClientListByServerResponse]{ + More: func(page DatabasesClientListByServerResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *DatabasesClientListByServerResponse) (DatabasesClientListByServerResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DatabasesClient.NewListByServerPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByServerCreateRequest(ctx, resourceGroupName, serverName, options) + }, nil) + if err != nil { + return DatabasesClientListByServerResponse{}, err + } + return client.listByServerHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByServerCreateRequest creates the ListByServer request. +func (client *DatabasesClient) listByServerCreateRequest(ctx context.Context, resourceGroupName string, serverName string, options *DatabasesClientListByServerOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.SkipToken != nil { + reqQP.Set("$skipToken", *options.SkipToken) + } + reqQP.Set("api-version", "2021-05-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByServerHandleResponse handles the ListByServer response. +func (client *DatabasesClient) listByServerHandleResponse(resp *http.Response) (DatabasesClientListByServerResponse, error) { + result := DatabasesClientListByServerResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DatabaseListResult); err != nil { + return DatabasesClientListByServerResponse{}, err + } + return result, nil +} + +// NewListInaccessibleByServerPager - Gets a list of inaccessible databases in a logical server +// +// Generated from API version 2021-05-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - options - DatabasesClientListInaccessibleByServerOptions contains the optional parameters for the DatabasesClient.NewListInaccessibleByServerPager +// method. +func (client *DatabasesClient) NewListInaccessibleByServerPager(resourceGroupName string, serverName string, options *DatabasesClientListInaccessibleByServerOptions) *runtime.Pager[DatabasesClientListInaccessibleByServerResponse] { + return runtime.NewPager(runtime.PagingHandler[DatabasesClientListInaccessibleByServerResponse]{ + More: func(page DatabasesClientListInaccessibleByServerResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *DatabasesClientListInaccessibleByServerResponse) (DatabasesClientListInaccessibleByServerResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DatabasesClient.NewListInaccessibleByServerPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listInaccessibleByServerCreateRequest(ctx, resourceGroupName, serverName, options) + }, nil) + if err != nil { + return DatabasesClientListInaccessibleByServerResponse{}, err + } + return client.listInaccessibleByServerHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listInaccessibleByServerCreateRequest creates the ListInaccessibleByServer request. +func (client *DatabasesClient) listInaccessibleByServerCreateRequest(ctx context.Context, resourceGroupName string, serverName string, options *DatabasesClientListInaccessibleByServerOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/inaccessibleDatabases" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-05-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listInaccessibleByServerHandleResponse handles the ListInaccessibleByServer response. +func (client *DatabasesClient) listInaccessibleByServerHandleResponse(resp *http.Response) (DatabasesClientListInaccessibleByServerResponse, error) { + result := DatabasesClientListInaccessibleByServerResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DatabaseListResult); err != nil { + return DatabasesClientListInaccessibleByServerResponse{}, err + } + return result, nil +} + +// NewListMetricDefinitionsPager - Returns database metric definitions. +// +// Generated from API version 2014-04-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database. +// - options - DatabasesClientListMetricDefinitionsOptions contains the optional parameters for the DatabasesClient.NewListMetricDefinitionsPager +// method. +func (client *DatabasesClient) NewListMetricDefinitionsPager(resourceGroupName string, serverName string, databaseName string, options *DatabasesClientListMetricDefinitionsOptions) *runtime.Pager[DatabasesClientListMetricDefinitionsResponse] { + return runtime.NewPager(runtime.PagingHandler[DatabasesClientListMetricDefinitionsResponse]{ + More: func(page DatabasesClientListMetricDefinitionsResponse) bool { + return false + }, + Fetcher: func(ctx context.Context, page *DatabasesClientListMetricDefinitionsResponse) (DatabasesClientListMetricDefinitionsResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DatabasesClient.NewListMetricDefinitionsPager") + req, err := client.listMetricDefinitionsCreateRequest(ctx, resourceGroupName, serverName, databaseName, options) + if err != nil { + return DatabasesClientListMetricDefinitionsResponse{}, err + } + resp, err := client.internal.Pipeline().Do(req) + if err != nil { + return DatabasesClientListMetricDefinitionsResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return DatabasesClientListMetricDefinitionsResponse{}, runtime.NewResponseError(resp) + } + return client.listMetricDefinitionsHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listMetricDefinitionsCreateRequest creates the ListMetricDefinitions request. +func (client *DatabasesClient) listMetricDefinitionsCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, options *DatabasesClientListMetricDefinitionsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/metricDefinitions" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2014-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listMetricDefinitionsHandleResponse handles the ListMetricDefinitions response. +func (client *DatabasesClient) listMetricDefinitionsHandleResponse(resp *http.Response) (DatabasesClientListMetricDefinitionsResponse, error) { + result := DatabasesClientListMetricDefinitionsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.MetricDefinitionListResult); err != nil { + return DatabasesClientListMetricDefinitionsResponse{}, err + } + return result, nil +} + +// NewListMetricsPager - Returns database metrics. +// +// Generated from API version 2014-04-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database. +// - filter - An OData filter expression that describes a subset of metrics to return. +// - options - DatabasesClientListMetricsOptions contains the optional parameters for the DatabasesClient.NewListMetricsPager +// method. +func (client *DatabasesClient) NewListMetricsPager(resourceGroupName string, serverName string, databaseName string, filter string, options *DatabasesClientListMetricsOptions) *runtime.Pager[DatabasesClientListMetricsResponse] { + return runtime.NewPager(runtime.PagingHandler[DatabasesClientListMetricsResponse]{ + More: func(page DatabasesClientListMetricsResponse) bool { + return false + }, + Fetcher: func(ctx context.Context, page *DatabasesClientListMetricsResponse) (DatabasesClientListMetricsResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DatabasesClient.NewListMetricsPager") + req, err := client.listMetricsCreateRequest(ctx, resourceGroupName, serverName, databaseName, filter, options) + if err != nil { + return DatabasesClientListMetricsResponse{}, err + } + resp, err := client.internal.Pipeline().Do(req) + if err != nil { + return DatabasesClientListMetricsResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return DatabasesClientListMetricsResponse{}, runtime.NewResponseError(resp) + } + return client.listMetricsHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listMetricsCreateRequest creates the ListMetrics request. +func (client *DatabasesClient) listMetricsCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, filter string, options *DatabasesClientListMetricsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/metrics" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2014-04-01") + reqQP.Set("$filter", filter) + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listMetricsHandleResponse handles the ListMetrics response. +func (client *DatabasesClient) listMetricsHandleResponse(resp *http.Response) (DatabasesClientListMetricsResponse, error) { + result := DatabasesClientListMetricsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.MetricListResult); err != nil { + return DatabasesClientListMetricsResponse{}, err + } + return result, nil +} + +// BeginPause - Pauses a database. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-05-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database to be paused. +// - options - DatabasesClientBeginPauseOptions contains the optional parameters for the DatabasesClient.BeginPause method. +func (client *DatabasesClient) BeginPause(ctx context.Context, resourceGroupName string, serverName string, databaseName string, options *DatabasesClientBeginPauseOptions) (*runtime.Poller[DatabasesClientPauseResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.pause(ctx, resourceGroupName, serverName, databaseName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DatabasesClientPauseResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DatabasesClientPauseResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Pause - Pauses a database. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-05-01-preview +func (client *DatabasesClient) pause(ctx context.Context, resourceGroupName string, serverName string, databaseName string, options *DatabasesClientBeginPauseOptions) (*http.Response, error) { + var err error + const operationName = "DatabasesClient.BeginPause" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.pauseCreateRequest(ctx, resourceGroupName, serverName, databaseName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// pauseCreateRequest creates the Pause request. +func (client *DatabasesClient) pauseCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, options *DatabasesClientBeginPauseOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/pause" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-05-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Rename - Renames a database. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-05-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database to rename. +// - parameters - The resource move definition for renaming this database. +// - options - DatabasesClientRenameOptions contains the optional parameters for the DatabasesClient.Rename method. +func (client *DatabasesClient) Rename(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters ResourceMoveDefinition, options *DatabasesClientRenameOptions) (DatabasesClientRenameResponse, error) { + var err error + const operationName = "DatabasesClient.Rename" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.renameCreateRequest(ctx, resourceGroupName, serverName, databaseName, parameters, options) + if err != nil { + return DatabasesClientRenameResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return DatabasesClientRenameResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DatabasesClientRenameResponse{}, err + } + return DatabasesClientRenameResponse{}, nil +} + +// renameCreateRequest creates the Rename request. +func (client *DatabasesClient) renameCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters ResourceMoveDefinition, options *DatabasesClientRenameOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/move" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-05-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginResume - Resumes a database. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-05-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database to be resumed. +// - options - DatabasesClientBeginResumeOptions contains the optional parameters for the DatabasesClient.BeginResume method. +func (client *DatabasesClient) BeginResume(ctx context.Context, resourceGroupName string, serverName string, databaseName string, options *DatabasesClientBeginResumeOptions) (*runtime.Poller[DatabasesClientResumeResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.resume(ctx, resourceGroupName, serverName, databaseName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DatabasesClientResumeResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DatabasesClientResumeResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Resume - Resumes a database. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-05-01-preview +func (client *DatabasesClient) resume(ctx context.Context, resourceGroupName string, serverName string, databaseName string, options *DatabasesClientBeginResumeOptions) (*http.Response, error) { + var err error + const operationName = "DatabasesClient.BeginResume" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.resumeCreateRequest(ctx, resourceGroupName, serverName, databaseName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// resumeCreateRequest creates the Resume request. +func (client *DatabasesClient) resumeCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, options *DatabasesClientBeginResumeOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/resume" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-05-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginUpdate - Updates an existing database. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-05-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database. +// - parameters - The requested database resource state. +// - options - DatabasesClientBeginUpdateOptions contains the optional parameters for the DatabasesClient.BeginUpdate method. +func (client *DatabasesClient) BeginUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters DatabaseUpdate, options *DatabasesClientBeginUpdateOptions) (*runtime.Poller[DatabasesClientUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.update(ctx, resourceGroupName, serverName, databaseName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DatabasesClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DatabasesClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Update - Updates an existing database. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-05-01-preview +func (client *DatabasesClient) update(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters DatabaseUpdate, options *DatabasesClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "DatabasesClient.BeginUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, serverName, databaseName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// updateCreateRequest creates the Update request. +func (client *DatabasesClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters DatabaseUpdate, options *DatabasesClientBeginUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-05-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginUpgradeDataWarehouse - Upgrades a data warehouse. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-05-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database to be upgraded. +// - options - DatabasesClientBeginUpgradeDataWarehouseOptions contains the optional parameters for the DatabasesClient.BeginUpgradeDataWarehouse +// method. +func (client *DatabasesClient) BeginUpgradeDataWarehouse(ctx context.Context, resourceGroupName string, serverName string, databaseName string, options *DatabasesClientBeginUpgradeDataWarehouseOptions) (*runtime.Poller[DatabasesClientUpgradeDataWarehouseResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.upgradeDataWarehouse(ctx, resourceGroupName, serverName, databaseName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DatabasesClientUpgradeDataWarehouseResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DatabasesClientUpgradeDataWarehouseResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// UpgradeDataWarehouse - Upgrades a data warehouse. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-05-01-preview +func (client *DatabasesClient) upgradeDataWarehouse(ctx context.Context, resourceGroupName string, serverName string, databaseName string, options *DatabasesClientBeginUpgradeDataWarehouseOptions) (*http.Response, error) { + var err error + const operationName = "DatabasesClient.BeginUpgradeDataWarehouse" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.upgradeDataWarehouseCreateRequest(ctx, resourceGroupName, serverName, databaseName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// upgradeDataWarehouseCreateRequest creates the UpgradeDataWarehouse request. +func (client *DatabasesClient) upgradeDataWarehouseCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, options *DatabasesClientBeginUpgradeDataWarehouseOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/upgradeDataWarehouse" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-05-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/databaseschemas_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/databaseschemas_client.go new file mode 100644 index 000000000..d2677539b --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/databaseschemas_client.go @@ -0,0 +1,193 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// DatabaseSchemasClient contains the methods for the DatabaseSchemas group. +// Don't use this type directly, use NewDatabaseSchemasClient() instead. +type DatabaseSchemasClient struct { + internal *arm.Client + subscriptionID string +} + +// NewDatabaseSchemasClient creates a new instance of DatabaseSchemasClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewDatabaseSchemasClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DatabaseSchemasClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &DatabaseSchemasClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Get database schema +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database. +// - schemaName - The name of the schema. +// - options - DatabaseSchemasClientGetOptions contains the optional parameters for the DatabaseSchemasClient.Get method. +func (client *DatabaseSchemasClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, schemaName string, options *DatabaseSchemasClientGetOptions) (DatabaseSchemasClientGetResponse, error) { + var err error + const operationName = "DatabaseSchemasClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serverName, databaseName, schemaName, options) + if err != nil { + return DatabaseSchemasClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return DatabaseSchemasClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DatabaseSchemasClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *DatabaseSchemasClient) getCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, schemaName string, options *DatabaseSchemasClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if schemaName == "" { + return nil, errors.New("parameter schemaName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{schemaName}", url.PathEscape(schemaName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *DatabaseSchemasClient) getHandleResponse(resp *http.Response) (DatabaseSchemasClientGetResponse, error) { + result := DatabaseSchemasClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DatabaseSchema); err != nil { + return DatabaseSchemasClientGetResponse{}, err + } + return result, nil +} + +// NewListByDatabasePager - List database schemas +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database. +// - options - DatabaseSchemasClientListByDatabaseOptions contains the optional parameters for the DatabaseSchemasClient.NewListByDatabasePager +// method. +func (client *DatabaseSchemasClient) NewListByDatabasePager(resourceGroupName string, serverName string, databaseName string, options *DatabaseSchemasClientListByDatabaseOptions) *runtime.Pager[DatabaseSchemasClientListByDatabaseResponse] { + return runtime.NewPager(runtime.PagingHandler[DatabaseSchemasClientListByDatabaseResponse]{ + More: func(page DatabaseSchemasClientListByDatabaseResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *DatabaseSchemasClientListByDatabaseResponse) (DatabaseSchemasClientListByDatabaseResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DatabaseSchemasClient.NewListByDatabasePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByDatabaseCreateRequest(ctx, resourceGroupName, serverName, databaseName, options) + }, nil) + if err != nil { + return DatabaseSchemasClientListByDatabaseResponse{}, err + } + return client.listByDatabaseHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByDatabaseCreateRequest creates the ListByDatabase request. +func (client *DatabaseSchemasClient) listByDatabaseCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, options *DatabaseSchemasClientListByDatabaseOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByDatabaseHandleResponse handles the ListByDatabase response. +func (client *DatabaseSchemasClient) listByDatabaseHandleResponse(resp *http.Response) (DatabaseSchemasClientListByDatabaseResponse, error) { + result := DatabaseSchemasClientListByDatabaseResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DatabaseSchemaListResult); err != nil { + return DatabaseSchemasClientListByDatabaseResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/databasesecurityalertpolicies_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/databasesecurityalertpolicies_client.go new file mode 100644 index 000000000..2d22fb45c --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/databasesecurityalertpolicies_client.go @@ -0,0 +1,271 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// DatabaseSecurityAlertPoliciesClient contains the methods for the DatabaseSecurityAlertPolicies group. +// Don't use this type directly, use NewDatabaseSecurityAlertPoliciesClient() instead. +type DatabaseSecurityAlertPoliciesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewDatabaseSecurityAlertPoliciesClient creates a new instance of DatabaseSecurityAlertPoliciesClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewDatabaseSecurityAlertPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DatabaseSecurityAlertPoliciesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &DatabaseSecurityAlertPoliciesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Creates or updates a database's security alert policy. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database for which the security alert policy is defined. +// - securityAlertPolicyName - The name of the security alert policy. +// - parameters - The database security alert policy. +// - options - DatabaseSecurityAlertPoliciesClientCreateOrUpdateOptions contains the optional parameters for the DatabaseSecurityAlertPoliciesClient.CreateOrUpdate +// method. +func (client *DatabaseSecurityAlertPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, securityAlertPolicyName SecurityAlertPolicyName, parameters DatabaseSecurityAlertPolicy, options *DatabaseSecurityAlertPoliciesClientCreateOrUpdateOptions) (DatabaseSecurityAlertPoliciesClientCreateOrUpdateResponse, error) { + var err error + const operationName = "DatabaseSecurityAlertPoliciesClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serverName, databaseName, securityAlertPolicyName, parameters, options) + if err != nil { + return DatabaseSecurityAlertPoliciesClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return DatabaseSecurityAlertPoliciesClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return DatabaseSecurityAlertPoliciesClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *DatabaseSecurityAlertPoliciesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, securityAlertPolicyName SecurityAlertPolicyName, parameters DatabaseSecurityAlertPolicy, options *DatabaseSecurityAlertPoliciesClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/securityAlertPolicies/{securityAlertPolicyName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if securityAlertPolicyName == "" { + return nil, errors.New("parameter securityAlertPolicyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{securityAlertPolicyName}", url.PathEscape(string(securityAlertPolicyName))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *DatabaseSecurityAlertPoliciesClient) createOrUpdateHandleResponse(resp *http.Response) (DatabaseSecurityAlertPoliciesClientCreateOrUpdateResponse, error) { + result := DatabaseSecurityAlertPoliciesClientCreateOrUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DatabaseSecurityAlertPolicy); err != nil { + return DatabaseSecurityAlertPoliciesClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// Get - Gets a database's security alert policy. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database for which the security alert policy is defined. +// - securityAlertPolicyName - The name of the security alert policy. +// - options - DatabaseSecurityAlertPoliciesClientGetOptions contains the optional parameters for the DatabaseSecurityAlertPoliciesClient.Get +// method. +func (client *DatabaseSecurityAlertPoliciesClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, securityAlertPolicyName SecurityAlertPolicyName, options *DatabaseSecurityAlertPoliciesClientGetOptions) (DatabaseSecurityAlertPoliciesClientGetResponse, error) { + var err error + const operationName = "DatabaseSecurityAlertPoliciesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serverName, databaseName, securityAlertPolicyName, options) + if err != nil { + return DatabaseSecurityAlertPoliciesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return DatabaseSecurityAlertPoliciesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DatabaseSecurityAlertPoliciesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *DatabaseSecurityAlertPoliciesClient) getCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, securityAlertPolicyName SecurityAlertPolicyName, options *DatabaseSecurityAlertPoliciesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/securityAlertPolicies/{securityAlertPolicyName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if securityAlertPolicyName == "" { + return nil, errors.New("parameter securityAlertPolicyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{securityAlertPolicyName}", url.PathEscape(string(securityAlertPolicyName))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *DatabaseSecurityAlertPoliciesClient) getHandleResponse(resp *http.Response) (DatabaseSecurityAlertPoliciesClientGetResponse, error) { + result := DatabaseSecurityAlertPoliciesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DatabaseSecurityAlertPolicy); err != nil { + return DatabaseSecurityAlertPoliciesClientGetResponse{}, err + } + return result, nil +} + +// NewListByDatabasePager - Gets a list of database's security alert policies. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database for which the security alert policy is defined. +// - options - DatabaseSecurityAlertPoliciesClientListByDatabaseOptions contains the optional parameters for the DatabaseSecurityAlertPoliciesClient.NewListByDatabasePager +// method. +func (client *DatabaseSecurityAlertPoliciesClient) NewListByDatabasePager(resourceGroupName string, serverName string, databaseName string, options *DatabaseSecurityAlertPoliciesClientListByDatabaseOptions) *runtime.Pager[DatabaseSecurityAlertPoliciesClientListByDatabaseResponse] { + return runtime.NewPager(runtime.PagingHandler[DatabaseSecurityAlertPoliciesClientListByDatabaseResponse]{ + More: func(page DatabaseSecurityAlertPoliciesClientListByDatabaseResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *DatabaseSecurityAlertPoliciesClientListByDatabaseResponse) (DatabaseSecurityAlertPoliciesClientListByDatabaseResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DatabaseSecurityAlertPoliciesClient.NewListByDatabasePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByDatabaseCreateRequest(ctx, resourceGroupName, serverName, databaseName, options) + }, nil) + if err != nil { + return DatabaseSecurityAlertPoliciesClientListByDatabaseResponse{}, err + } + return client.listByDatabaseHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByDatabaseCreateRequest creates the ListByDatabase request. +func (client *DatabaseSecurityAlertPoliciesClient) listByDatabaseCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, options *DatabaseSecurityAlertPoliciesClientListByDatabaseOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/securityAlertPolicies" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByDatabaseHandleResponse handles the ListByDatabase response. +func (client *DatabaseSecurityAlertPoliciesClient) listByDatabaseHandleResponse(resp *http.Response) (DatabaseSecurityAlertPoliciesClientListByDatabaseResponse, error) { + result := DatabaseSecurityAlertPoliciesClientListByDatabaseResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DatabaseSecurityAlertListResult); err != nil { + return DatabaseSecurityAlertPoliciesClientListByDatabaseResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/databasetables_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/databasetables_client.go new file mode 100644 index 000000000..501e80868 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/databasetables_client.go @@ -0,0 +1,203 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// DatabaseTablesClient contains the methods for the DatabaseTables group. +// Don't use this type directly, use NewDatabaseTablesClient() instead. +type DatabaseTablesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewDatabaseTablesClient creates a new instance of DatabaseTablesClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewDatabaseTablesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DatabaseTablesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &DatabaseTablesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Get database table +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database. +// - schemaName - The name of the schema. +// - tableName - The name of the table. +// - options - DatabaseTablesClientGetOptions contains the optional parameters for the DatabaseTablesClient.Get method. +func (client *DatabaseTablesClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, schemaName string, tableName string, options *DatabaseTablesClientGetOptions) (DatabaseTablesClientGetResponse, error) { + var err error + const operationName = "DatabaseTablesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serverName, databaseName, schemaName, tableName, options) + if err != nil { + return DatabaseTablesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return DatabaseTablesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DatabaseTablesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *DatabaseTablesClient) getCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, schemaName string, tableName string, options *DatabaseTablesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if schemaName == "" { + return nil, errors.New("parameter schemaName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{schemaName}", url.PathEscape(schemaName)) + if tableName == "" { + return nil, errors.New("parameter tableName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{tableName}", url.PathEscape(tableName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *DatabaseTablesClient) getHandleResponse(resp *http.Response) (DatabaseTablesClientGetResponse, error) { + result := DatabaseTablesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DatabaseTable); err != nil { + return DatabaseTablesClientGetResponse{}, err + } + return result, nil +} + +// NewListBySchemaPager - List database tables +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database. +// - schemaName - The name of the schema. +// - options - DatabaseTablesClientListBySchemaOptions contains the optional parameters for the DatabaseTablesClient.NewListBySchemaPager +// method. +func (client *DatabaseTablesClient) NewListBySchemaPager(resourceGroupName string, serverName string, databaseName string, schemaName string, options *DatabaseTablesClientListBySchemaOptions) *runtime.Pager[DatabaseTablesClientListBySchemaResponse] { + return runtime.NewPager(runtime.PagingHandler[DatabaseTablesClientListBySchemaResponse]{ + More: func(page DatabaseTablesClientListBySchemaResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *DatabaseTablesClientListBySchemaResponse) (DatabaseTablesClientListBySchemaResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DatabaseTablesClient.NewListBySchemaPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listBySchemaCreateRequest(ctx, resourceGroupName, serverName, databaseName, schemaName, options) + }, nil) + if err != nil { + return DatabaseTablesClientListBySchemaResponse{}, err + } + return client.listBySchemaHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listBySchemaCreateRequest creates the ListBySchema request. +func (client *DatabaseTablesClient) listBySchemaCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, schemaName string, options *DatabaseTablesClientListBySchemaOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if schemaName == "" { + return nil, errors.New("parameter schemaName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{schemaName}", url.PathEscape(schemaName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listBySchemaHandleResponse handles the ListBySchema response. +func (client *DatabaseTablesClient) listBySchemaHandleResponse(resp *http.Response) (DatabaseTablesClientListBySchemaResponse, error) { + result := DatabaseTablesClientListBySchemaResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DatabaseTableListResult); err != nil { + return DatabaseTablesClientListBySchemaResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/databaseusages_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/databaseusages_client.go new file mode 100644 index 000000000..a6ae6a649 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/databaseusages_client.go @@ -0,0 +1,115 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// DatabaseUsagesClient contains the methods for the DatabaseUsages group. +// Don't use this type directly, use NewDatabaseUsagesClient() instead. +type DatabaseUsagesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewDatabaseUsagesClient creates a new instance of DatabaseUsagesClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewDatabaseUsagesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DatabaseUsagesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &DatabaseUsagesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// NewListByDatabasePager - Gets database usages. +// +// Generated from API version 2021-02-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database. +// - options - DatabaseUsagesClientListByDatabaseOptions contains the optional parameters for the DatabaseUsagesClient.NewListByDatabasePager +// method. +func (client *DatabaseUsagesClient) NewListByDatabasePager(resourceGroupName string, serverName string, databaseName string, options *DatabaseUsagesClientListByDatabaseOptions) *runtime.Pager[DatabaseUsagesClientListByDatabaseResponse] { + return runtime.NewPager(runtime.PagingHandler[DatabaseUsagesClientListByDatabaseResponse]{ + More: func(page DatabaseUsagesClientListByDatabaseResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *DatabaseUsagesClientListByDatabaseResponse) (DatabaseUsagesClientListByDatabaseResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DatabaseUsagesClient.NewListByDatabasePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByDatabaseCreateRequest(ctx, resourceGroupName, serverName, databaseName, options) + }, nil) + if err != nil { + return DatabaseUsagesClientListByDatabaseResponse{}, err + } + return client.listByDatabaseHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByDatabaseCreateRequest creates the ListByDatabase request. +func (client *DatabaseUsagesClient) listByDatabaseCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, options *DatabaseUsagesClientListByDatabaseOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/usages" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-02-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByDatabaseHandleResponse handles the ListByDatabase response. +func (client *DatabaseUsagesClient) listByDatabaseHandleResponse(resp *http.Response) (DatabaseUsagesClientListByDatabaseResponse, error) { + result := DatabaseUsagesClientListByDatabaseResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DatabaseUsageListResult); err != nil { + return DatabaseUsagesClientListByDatabaseResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/databasevulnerabilityassessmentrulebaselines_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/databasevulnerabilityassessmentrulebaselines_client.go new file mode 100644 index 000000000..64a0cf936 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/databasevulnerabilityassessmentrulebaselines_client.go @@ -0,0 +1,298 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// DatabaseVulnerabilityAssessmentRuleBaselinesClient contains the methods for the DatabaseVulnerabilityAssessmentRuleBaselines group. +// Don't use this type directly, use NewDatabaseVulnerabilityAssessmentRuleBaselinesClient() instead. +type DatabaseVulnerabilityAssessmentRuleBaselinesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewDatabaseVulnerabilityAssessmentRuleBaselinesClient creates a new instance of DatabaseVulnerabilityAssessmentRuleBaselinesClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewDatabaseVulnerabilityAssessmentRuleBaselinesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DatabaseVulnerabilityAssessmentRuleBaselinesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &DatabaseVulnerabilityAssessmentRuleBaselinesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Creates or updates a database's vulnerability assessment rule baseline. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database for which the vulnerability assessment rule baseline is defined. +// - vulnerabilityAssessmentName - The name of the vulnerability assessment. +// - ruleID - The vulnerability assessment rule ID. +// - baselineName - The name of the vulnerability assessment rule baseline (default implies a baseline on a database level rule +// and master for server level rule). +// - parameters - The requested rule baseline resource. +// - options - DatabaseVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateOptions contains the optional parameters for +// the DatabaseVulnerabilityAssessmentRuleBaselinesClient.CreateOrUpdate method. +func (client *DatabaseVulnerabilityAssessmentRuleBaselinesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, ruleID string, baselineName VulnerabilityAssessmentPolicyBaselineName, parameters DatabaseVulnerabilityAssessmentRuleBaseline, options *DatabaseVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateOptions) (DatabaseVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateResponse, error) { + var err error + const operationName = "DatabaseVulnerabilityAssessmentRuleBaselinesClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, ruleID, baselineName, parameters, options) + if err != nil { + return DatabaseVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return DatabaseVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DatabaseVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *DatabaseVulnerabilityAssessmentRuleBaselinesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, ruleID string, baselineName VulnerabilityAssessmentPolicyBaselineName, parameters DatabaseVulnerabilityAssessmentRuleBaseline, options *DatabaseVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/rules/{ruleId}/baselines/{baselineName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if vulnerabilityAssessmentName == "" { + return nil, errors.New("parameter vulnerabilityAssessmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vulnerabilityAssessmentName}", url.PathEscape(string(vulnerabilityAssessmentName))) + if ruleID == "" { + return nil, errors.New("parameter ruleID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{ruleId}", url.PathEscape(ruleID)) + if baselineName == "" { + return nil, errors.New("parameter baselineName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{baselineName}", url.PathEscape(string(baselineName))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *DatabaseVulnerabilityAssessmentRuleBaselinesClient) createOrUpdateHandleResponse(resp *http.Response) (DatabaseVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateResponse, error) { + result := DatabaseVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DatabaseVulnerabilityAssessmentRuleBaseline); err != nil { + return DatabaseVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// Delete - Removes the database's vulnerability assessment rule baseline. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database for which the vulnerability assessment rule baseline is defined. +// - vulnerabilityAssessmentName - The name of the vulnerability assessment. +// - ruleID - The vulnerability assessment rule ID. +// - baselineName - The name of the vulnerability assessment rule baseline (default implies a baseline on a database level rule +// and master for server level rule). +// - options - DatabaseVulnerabilityAssessmentRuleBaselinesClientDeleteOptions contains the optional parameters for the DatabaseVulnerabilityAssessmentRuleBaselinesClient.Delete +// method. +func (client *DatabaseVulnerabilityAssessmentRuleBaselinesClient) Delete(ctx context.Context, resourceGroupName string, serverName string, databaseName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, ruleID string, baselineName VulnerabilityAssessmentPolicyBaselineName, options *DatabaseVulnerabilityAssessmentRuleBaselinesClientDeleteOptions) (DatabaseVulnerabilityAssessmentRuleBaselinesClientDeleteResponse, error) { + var err error + const operationName = "DatabaseVulnerabilityAssessmentRuleBaselinesClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, ruleID, baselineName, options) + if err != nil { + return DatabaseVulnerabilityAssessmentRuleBaselinesClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return DatabaseVulnerabilityAssessmentRuleBaselinesClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DatabaseVulnerabilityAssessmentRuleBaselinesClientDeleteResponse{}, err + } + return DatabaseVulnerabilityAssessmentRuleBaselinesClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *DatabaseVulnerabilityAssessmentRuleBaselinesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, ruleID string, baselineName VulnerabilityAssessmentPolicyBaselineName, options *DatabaseVulnerabilityAssessmentRuleBaselinesClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/rules/{ruleId}/baselines/{baselineName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if vulnerabilityAssessmentName == "" { + return nil, errors.New("parameter vulnerabilityAssessmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vulnerabilityAssessmentName}", url.PathEscape(string(vulnerabilityAssessmentName))) + if ruleID == "" { + return nil, errors.New("parameter ruleID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{ruleId}", url.PathEscape(ruleID)) + if baselineName == "" { + return nil, errors.New("parameter baselineName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{baselineName}", url.PathEscape(string(baselineName))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + return req, nil +} + +// Get - Gets a database's vulnerability assessment rule baseline. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database for which the vulnerability assessment rule baseline is defined. +// - vulnerabilityAssessmentName - The name of the vulnerability assessment. +// - ruleID - The vulnerability assessment rule ID. +// - baselineName - The name of the vulnerability assessment rule baseline (default implies a baseline on a database level rule +// and master for server level rule). +// - options - DatabaseVulnerabilityAssessmentRuleBaselinesClientGetOptions contains the optional parameters for the DatabaseVulnerabilityAssessmentRuleBaselinesClient.Get +// method. +func (client *DatabaseVulnerabilityAssessmentRuleBaselinesClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, ruleID string, baselineName VulnerabilityAssessmentPolicyBaselineName, options *DatabaseVulnerabilityAssessmentRuleBaselinesClientGetOptions) (DatabaseVulnerabilityAssessmentRuleBaselinesClientGetResponse, error) { + var err error + const operationName = "DatabaseVulnerabilityAssessmentRuleBaselinesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, ruleID, baselineName, options) + if err != nil { + return DatabaseVulnerabilityAssessmentRuleBaselinesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return DatabaseVulnerabilityAssessmentRuleBaselinesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DatabaseVulnerabilityAssessmentRuleBaselinesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *DatabaseVulnerabilityAssessmentRuleBaselinesClient) getCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, ruleID string, baselineName VulnerabilityAssessmentPolicyBaselineName, options *DatabaseVulnerabilityAssessmentRuleBaselinesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/rules/{ruleId}/baselines/{baselineName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if vulnerabilityAssessmentName == "" { + return nil, errors.New("parameter vulnerabilityAssessmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vulnerabilityAssessmentName}", url.PathEscape(string(vulnerabilityAssessmentName))) + if ruleID == "" { + return nil, errors.New("parameter ruleID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{ruleId}", url.PathEscape(ruleID)) + if baselineName == "" { + return nil, errors.New("parameter baselineName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{baselineName}", url.PathEscape(string(baselineName))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *DatabaseVulnerabilityAssessmentRuleBaselinesClient) getHandleResponse(resp *http.Response) (DatabaseVulnerabilityAssessmentRuleBaselinesClientGetResponse, error) { + result := DatabaseVulnerabilityAssessmentRuleBaselinesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DatabaseVulnerabilityAssessmentRuleBaseline); err != nil { + return DatabaseVulnerabilityAssessmentRuleBaselinesClientGetResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/databasevulnerabilityassessments_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/databasevulnerabilityassessments_client.go new file mode 100644 index 000000000..1b44c1364 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/databasevulnerabilityassessments_client.go @@ -0,0 +1,336 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// DatabaseVulnerabilityAssessmentsClient contains the methods for the DatabaseVulnerabilityAssessments group. +// Don't use this type directly, use NewDatabaseVulnerabilityAssessmentsClient() instead. +type DatabaseVulnerabilityAssessmentsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewDatabaseVulnerabilityAssessmentsClient creates a new instance of DatabaseVulnerabilityAssessmentsClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewDatabaseVulnerabilityAssessmentsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DatabaseVulnerabilityAssessmentsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &DatabaseVulnerabilityAssessmentsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Creates or updates the database's vulnerability assessment. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database for which the vulnerability assessment is defined. +// - vulnerabilityAssessmentName - The name of the vulnerability assessment. +// - parameters - The requested resource. +// - options - DatabaseVulnerabilityAssessmentsClientCreateOrUpdateOptions contains the optional parameters for the DatabaseVulnerabilityAssessmentsClient.CreateOrUpdate +// method. +func (client *DatabaseVulnerabilityAssessmentsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, parameters DatabaseVulnerabilityAssessment, options *DatabaseVulnerabilityAssessmentsClientCreateOrUpdateOptions) (DatabaseVulnerabilityAssessmentsClientCreateOrUpdateResponse, error) { + var err error + const operationName = "DatabaseVulnerabilityAssessmentsClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, parameters, options) + if err != nil { + return DatabaseVulnerabilityAssessmentsClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return DatabaseVulnerabilityAssessmentsClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return DatabaseVulnerabilityAssessmentsClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *DatabaseVulnerabilityAssessmentsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, parameters DatabaseVulnerabilityAssessment, options *DatabaseVulnerabilityAssessmentsClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if vulnerabilityAssessmentName == "" { + return nil, errors.New("parameter vulnerabilityAssessmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vulnerabilityAssessmentName}", url.PathEscape(string(vulnerabilityAssessmentName))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *DatabaseVulnerabilityAssessmentsClient) createOrUpdateHandleResponse(resp *http.Response) (DatabaseVulnerabilityAssessmentsClientCreateOrUpdateResponse, error) { + result := DatabaseVulnerabilityAssessmentsClientCreateOrUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DatabaseVulnerabilityAssessment); err != nil { + return DatabaseVulnerabilityAssessmentsClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// Delete - Removes the database's vulnerability assessment. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database for which the vulnerability assessment is defined. +// - vulnerabilityAssessmentName - The name of the vulnerability assessment. +// - options - DatabaseVulnerabilityAssessmentsClientDeleteOptions contains the optional parameters for the DatabaseVulnerabilityAssessmentsClient.Delete +// method. +func (client *DatabaseVulnerabilityAssessmentsClient) Delete(ctx context.Context, resourceGroupName string, serverName string, databaseName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, options *DatabaseVulnerabilityAssessmentsClientDeleteOptions) (DatabaseVulnerabilityAssessmentsClientDeleteResponse, error) { + var err error + const operationName = "DatabaseVulnerabilityAssessmentsClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, options) + if err != nil { + return DatabaseVulnerabilityAssessmentsClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return DatabaseVulnerabilityAssessmentsClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DatabaseVulnerabilityAssessmentsClientDeleteResponse{}, err + } + return DatabaseVulnerabilityAssessmentsClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *DatabaseVulnerabilityAssessmentsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, options *DatabaseVulnerabilityAssessmentsClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if vulnerabilityAssessmentName == "" { + return nil, errors.New("parameter vulnerabilityAssessmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vulnerabilityAssessmentName}", url.PathEscape(string(vulnerabilityAssessmentName))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + return req, nil +} + +// Get - Gets the database's vulnerability assessment. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database for which the vulnerability assessment is defined. +// - vulnerabilityAssessmentName - The name of the vulnerability assessment. +// - options - DatabaseVulnerabilityAssessmentsClientGetOptions contains the optional parameters for the DatabaseVulnerabilityAssessmentsClient.Get +// method. +func (client *DatabaseVulnerabilityAssessmentsClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, options *DatabaseVulnerabilityAssessmentsClientGetOptions) (DatabaseVulnerabilityAssessmentsClientGetResponse, error) { + var err error + const operationName = "DatabaseVulnerabilityAssessmentsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, options) + if err != nil { + return DatabaseVulnerabilityAssessmentsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return DatabaseVulnerabilityAssessmentsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DatabaseVulnerabilityAssessmentsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *DatabaseVulnerabilityAssessmentsClient) getCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, options *DatabaseVulnerabilityAssessmentsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if vulnerabilityAssessmentName == "" { + return nil, errors.New("parameter vulnerabilityAssessmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vulnerabilityAssessmentName}", url.PathEscape(string(vulnerabilityAssessmentName))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *DatabaseVulnerabilityAssessmentsClient) getHandleResponse(resp *http.Response) (DatabaseVulnerabilityAssessmentsClientGetResponse, error) { + result := DatabaseVulnerabilityAssessmentsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DatabaseVulnerabilityAssessment); err != nil { + return DatabaseVulnerabilityAssessmentsClientGetResponse{}, err + } + return result, nil +} + +// NewListByDatabasePager - Lists the vulnerability assessment policies associated with a database. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database for which the vulnerability assessment policies are defined. +// - options - DatabaseVulnerabilityAssessmentsClientListByDatabaseOptions contains the optional parameters for the DatabaseVulnerabilityAssessmentsClient.NewListByDatabasePager +// method. +func (client *DatabaseVulnerabilityAssessmentsClient) NewListByDatabasePager(resourceGroupName string, serverName string, databaseName string, options *DatabaseVulnerabilityAssessmentsClientListByDatabaseOptions) *runtime.Pager[DatabaseVulnerabilityAssessmentsClientListByDatabaseResponse] { + return runtime.NewPager(runtime.PagingHandler[DatabaseVulnerabilityAssessmentsClientListByDatabaseResponse]{ + More: func(page DatabaseVulnerabilityAssessmentsClientListByDatabaseResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *DatabaseVulnerabilityAssessmentsClientListByDatabaseResponse) (DatabaseVulnerabilityAssessmentsClientListByDatabaseResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DatabaseVulnerabilityAssessmentsClient.NewListByDatabasePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByDatabaseCreateRequest(ctx, resourceGroupName, serverName, databaseName, options) + }, nil) + if err != nil { + return DatabaseVulnerabilityAssessmentsClientListByDatabaseResponse{}, err + } + return client.listByDatabaseHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByDatabaseCreateRequest creates the ListByDatabase request. +func (client *DatabaseVulnerabilityAssessmentsClient) listByDatabaseCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, options *DatabaseVulnerabilityAssessmentsClientListByDatabaseOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByDatabaseHandleResponse handles the ListByDatabase response. +func (client *DatabaseVulnerabilityAssessmentsClient) listByDatabaseHandleResponse(resp *http.Response) (DatabaseVulnerabilityAssessmentsClientListByDatabaseResponse, error) { + result := DatabaseVulnerabilityAssessmentsClientListByDatabaseResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DatabaseVulnerabilityAssessmentListResult); err != nil { + return DatabaseVulnerabilityAssessmentsClientListByDatabaseResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/databasevulnerabilityassessmentscans_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/databasevulnerabilityassessmentscans_client.go new file mode 100644 index 000000000..19c83018f --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/databasevulnerabilityassessmentscans_client.go @@ -0,0 +1,373 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// DatabaseVulnerabilityAssessmentScansClient contains the methods for the DatabaseVulnerabilityAssessmentScans group. +// Don't use this type directly, use NewDatabaseVulnerabilityAssessmentScansClient() instead. +type DatabaseVulnerabilityAssessmentScansClient struct { + internal *arm.Client + subscriptionID string +} + +// NewDatabaseVulnerabilityAssessmentScansClient creates a new instance of DatabaseVulnerabilityAssessmentScansClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewDatabaseVulnerabilityAssessmentScansClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DatabaseVulnerabilityAssessmentScansClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &DatabaseVulnerabilityAssessmentScansClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Export - Convert an existing scan result to a human readable format. If already exists nothing happens +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the scanned database. +// - vulnerabilityAssessmentName - The name of the vulnerability assessment. +// - scanID - The vulnerability assessment scan Id. +// - options - DatabaseVulnerabilityAssessmentScansClientExportOptions contains the optional parameters for the DatabaseVulnerabilityAssessmentScansClient.Export +// method. +func (client *DatabaseVulnerabilityAssessmentScansClient) Export(ctx context.Context, resourceGroupName string, serverName string, databaseName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, scanID string, options *DatabaseVulnerabilityAssessmentScansClientExportOptions) (DatabaseVulnerabilityAssessmentScansClientExportResponse, error) { + var err error + const operationName = "DatabaseVulnerabilityAssessmentScansClient.Export" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.exportCreateRequest(ctx, resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, scanID, options) + if err != nil { + return DatabaseVulnerabilityAssessmentScansClientExportResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return DatabaseVulnerabilityAssessmentScansClientExportResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return DatabaseVulnerabilityAssessmentScansClientExportResponse{}, err + } + resp, err := client.exportHandleResponse(httpResp) + return resp, err +} + +// exportCreateRequest creates the Export request. +func (client *DatabaseVulnerabilityAssessmentScansClient) exportCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, scanID string, options *DatabaseVulnerabilityAssessmentScansClientExportOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}/export" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if vulnerabilityAssessmentName == "" { + return nil, errors.New("parameter vulnerabilityAssessmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vulnerabilityAssessmentName}", url.PathEscape(string(vulnerabilityAssessmentName))) + if scanID == "" { + return nil, errors.New("parameter scanID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{scanId}", url.PathEscape(scanID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// exportHandleResponse handles the Export response. +func (client *DatabaseVulnerabilityAssessmentScansClient) exportHandleResponse(resp *http.Response) (DatabaseVulnerabilityAssessmentScansClientExportResponse, error) { + result := DatabaseVulnerabilityAssessmentScansClientExportResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DatabaseVulnerabilityAssessmentScansExport); err != nil { + return DatabaseVulnerabilityAssessmentScansClientExportResponse{}, err + } + return result, nil +} + +// Get - Gets a vulnerability assessment scan record of a database. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database. +// - vulnerabilityAssessmentName - The name of the vulnerability assessment. +// - scanID - The vulnerability assessment scan Id of the scan to retrieve. +// - options - DatabaseVulnerabilityAssessmentScansClientGetOptions contains the optional parameters for the DatabaseVulnerabilityAssessmentScansClient.Get +// method. +func (client *DatabaseVulnerabilityAssessmentScansClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, scanID string, options *DatabaseVulnerabilityAssessmentScansClientGetOptions) (DatabaseVulnerabilityAssessmentScansClientGetResponse, error) { + var err error + const operationName = "DatabaseVulnerabilityAssessmentScansClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, scanID, options) + if err != nil { + return DatabaseVulnerabilityAssessmentScansClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return DatabaseVulnerabilityAssessmentScansClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DatabaseVulnerabilityAssessmentScansClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *DatabaseVulnerabilityAssessmentScansClient) getCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, scanID string, options *DatabaseVulnerabilityAssessmentScansClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if vulnerabilityAssessmentName == "" { + return nil, errors.New("parameter vulnerabilityAssessmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vulnerabilityAssessmentName}", url.PathEscape(string(vulnerabilityAssessmentName))) + if scanID == "" { + return nil, errors.New("parameter scanID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{scanId}", url.PathEscape(scanID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *DatabaseVulnerabilityAssessmentScansClient) getHandleResponse(resp *http.Response) (DatabaseVulnerabilityAssessmentScansClientGetResponse, error) { + result := DatabaseVulnerabilityAssessmentScansClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VulnerabilityAssessmentScanRecord); err != nil { + return DatabaseVulnerabilityAssessmentScansClientGetResponse{}, err + } + return result, nil +} + +// BeginInitiateScan - Executes a Vulnerability Assessment database scan. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database. +// - vulnerabilityAssessmentName - The name of the vulnerability assessment. +// - scanID - The vulnerability assessment scan Id of the scan to retrieve. +// - options - DatabaseVulnerabilityAssessmentScansClientBeginInitiateScanOptions contains the optional parameters for the DatabaseVulnerabilityAssessmentScansClient.BeginInitiateScan +// method. +func (client *DatabaseVulnerabilityAssessmentScansClient) BeginInitiateScan(ctx context.Context, resourceGroupName string, serverName string, databaseName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, scanID string, options *DatabaseVulnerabilityAssessmentScansClientBeginInitiateScanOptions) (*runtime.Poller[DatabaseVulnerabilityAssessmentScansClientInitiateScanResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.initiateScan(ctx, resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, scanID, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DatabaseVulnerabilityAssessmentScansClientInitiateScanResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DatabaseVulnerabilityAssessmentScansClientInitiateScanResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// InitiateScan - Executes a Vulnerability Assessment database scan. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +func (client *DatabaseVulnerabilityAssessmentScansClient) initiateScan(ctx context.Context, resourceGroupName string, serverName string, databaseName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, scanID string, options *DatabaseVulnerabilityAssessmentScansClientBeginInitiateScanOptions) (*http.Response, error) { + var err error + const operationName = "DatabaseVulnerabilityAssessmentScansClient.BeginInitiateScan" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.initiateScanCreateRequest(ctx, resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, scanID, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// initiateScanCreateRequest creates the InitiateScan request. +func (client *DatabaseVulnerabilityAssessmentScansClient) initiateScanCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, scanID string, options *DatabaseVulnerabilityAssessmentScansClientBeginInitiateScanOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}/initiateScan" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if vulnerabilityAssessmentName == "" { + return nil, errors.New("parameter vulnerabilityAssessmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vulnerabilityAssessmentName}", url.PathEscape(string(vulnerabilityAssessmentName))) + if scanID == "" { + return nil, errors.New("parameter scanID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{scanId}", url.PathEscape(scanID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + return req, nil +} + +// NewListByDatabasePager - Lists the vulnerability assessment scans of a database. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database. +// - vulnerabilityAssessmentName - The name of the vulnerability assessment. +// - options - DatabaseVulnerabilityAssessmentScansClientListByDatabaseOptions contains the optional parameters for the DatabaseVulnerabilityAssessmentScansClient.NewListByDatabasePager +// method. +func (client *DatabaseVulnerabilityAssessmentScansClient) NewListByDatabasePager(resourceGroupName string, serverName string, databaseName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, options *DatabaseVulnerabilityAssessmentScansClientListByDatabaseOptions) *runtime.Pager[DatabaseVulnerabilityAssessmentScansClientListByDatabaseResponse] { + return runtime.NewPager(runtime.PagingHandler[DatabaseVulnerabilityAssessmentScansClientListByDatabaseResponse]{ + More: func(page DatabaseVulnerabilityAssessmentScansClientListByDatabaseResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *DatabaseVulnerabilityAssessmentScansClientListByDatabaseResponse) (DatabaseVulnerabilityAssessmentScansClientListByDatabaseResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DatabaseVulnerabilityAssessmentScansClient.NewListByDatabasePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByDatabaseCreateRequest(ctx, resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, options) + }, nil) + if err != nil { + return DatabaseVulnerabilityAssessmentScansClientListByDatabaseResponse{}, err + } + return client.listByDatabaseHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByDatabaseCreateRequest creates the ListByDatabase request. +func (client *DatabaseVulnerabilityAssessmentScansClient) listByDatabaseCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, options *DatabaseVulnerabilityAssessmentScansClientListByDatabaseOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if vulnerabilityAssessmentName == "" { + return nil, errors.New("parameter vulnerabilityAssessmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vulnerabilityAssessmentName}", url.PathEscape(string(vulnerabilityAssessmentName))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByDatabaseHandleResponse handles the ListByDatabase response. +func (client *DatabaseVulnerabilityAssessmentScansClient) listByDatabaseHandleResponse(resp *http.Response) (DatabaseVulnerabilityAssessmentScansClientListByDatabaseResponse, error) { + result := DatabaseVulnerabilityAssessmentScansClientListByDatabaseResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VulnerabilityAssessmentScanRecordListResult); err != nil { + return DatabaseVulnerabilityAssessmentScansClientListByDatabaseResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/datamaskingpolicies_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/datamaskingpolicies_client.go new file mode 100644 index 000000000..cf77dc31b --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/datamaskingpolicies_client.go @@ -0,0 +1,191 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// DataMaskingPoliciesClient contains the methods for the DataMaskingPolicies group. +// Don't use this type directly, use NewDataMaskingPoliciesClient() instead. +type DataMaskingPoliciesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewDataMaskingPoliciesClient creates a new instance of DataMaskingPoliciesClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewDataMaskingPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DataMaskingPoliciesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &DataMaskingPoliciesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Creates or updates a database data masking policy +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2014-04-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database. +// - parameters - Parameters for creating or updating a data masking policy. +// - options - DataMaskingPoliciesClientCreateOrUpdateOptions contains the optional parameters for the DataMaskingPoliciesClient.CreateOrUpdate +// method. +func (client *DataMaskingPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters DataMaskingPolicy, options *DataMaskingPoliciesClientCreateOrUpdateOptions) (DataMaskingPoliciesClientCreateOrUpdateResponse, error) { + var err error + const operationName = "DataMaskingPoliciesClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serverName, databaseName, parameters, options) + if err != nil { + return DataMaskingPoliciesClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return DataMaskingPoliciesClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DataMaskingPoliciesClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *DataMaskingPoliciesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters DataMaskingPolicy, options *DataMaskingPoliciesClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/dataMaskingPolicies/{dataMaskingPolicyName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + urlPath = strings.ReplaceAll(urlPath, "{dataMaskingPolicyName}", url.PathEscape("Default")) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2014-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *DataMaskingPoliciesClient) createOrUpdateHandleResponse(resp *http.Response) (DataMaskingPoliciesClientCreateOrUpdateResponse, error) { + result := DataMaskingPoliciesClientCreateOrUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DataMaskingPolicy); err != nil { + return DataMaskingPoliciesClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// Get - Gets a database data masking policy. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2014-04-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database. +// - options - DataMaskingPoliciesClientGetOptions contains the optional parameters for the DataMaskingPoliciesClient.Get method. +func (client *DataMaskingPoliciesClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, options *DataMaskingPoliciesClientGetOptions) (DataMaskingPoliciesClientGetResponse, error) { + var err error + const operationName = "DataMaskingPoliciesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serverName, databaseName, options) + if err != nil { + return DataMaskingPoliciesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return DataMaskingPoliciesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DataMaskingPoliciesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *DataMaskingPoliciesClient) getCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, options *DataMaskingPoliciesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/dataMaskingPolicies/{dataMaskingPolicyName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + urlPath = strings.ReplaceAll(urlPath, "{dataMaskingPolicyName}", url.PathEscape("Default")) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2014-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *DataMaskingPoliciesClient) getHandleResponse(resp *http.Response) (DataMaskingPoliciesClientGetResponse, error) { + result := DataMaskingPoliciesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DataMaskingPolicy); err != nil { + return DataMaskingPoliciesClientGetResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/datamaskingrules_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/datamaskingrules_client.go new file mode 100644 index 000000000..d8cd0ec5f --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/datamaskingrules_client.go @@ -0,0 +1,198 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// DataMaskingRulesClient contains the methods for the DataMaskingRules group. +// Don't use this type directly, use NewDataMaskingRulesClient() instead. +type DataMaskingRulesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewDataMaskingRulesClient creates a new instance of DataMaskingRulesClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewDataMaskingRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DataMaskingRulesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &DataMaskingRulesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Creates or updates a database data masking rule. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2014-04-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database. +// - dataMaskingRuleName - The name of the data masking rule. +// - parameters - The required parameters for creating or updating a data masking rule. +// - options - DataMaskingRulesClientCreateOrUpdateOptions contains the optional parameters for the DataMaskingRulesClient.CreateOrUpdate +// method. +func (client *DataMaskingRulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, dataMaskingRuleName string, parameters DataMaskingRule, options *DataMaskingRulesClientCreateOrUpdateOptions) (DataMaskingRulesClientCreateOrUpdateResponse, error) { + var err error + const operationName = "DataMaskingRulesClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serverName, databaseName, dataMaskingRuleName, parameters, options) + if err != nil { + return DataMaskingRulesClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return DataMaskingRulesClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return DataMaskingRulesClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *DataMaskingRulesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, dataMaskingRuleName string, parameters DataMaskingRule, options *DataMaskingRulesClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/dataMaskingPolicies/{dataMaskingPolicyName}/rules/{dataMaskingRuleName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + urlPath = strings.ReplaceAll(urlPath, "{dataMaskingPolicyName}", url.PathEscape("Default")) + if dataMaskingRuleName == "" { + return nil, errors.New("parameter dataMaskingRuleName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{dataMaskingRuleName}", url.PathEscape(dataMaskingRuleName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2014-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *DataMaskingRulesClient) createOrUpdateHandleResponse(resp *http.Response) (DataMaskingRulesClientCreateOrUpdateResponse, error) { + result := DataMaskingRulesClientCreateOrUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DataMaskingRule); err != nil { + return DataMaskingRulesClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// NewListByDatabasePager - Gets a list of database data masking rules. +// +// Generated from API version 2014-04-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database. +// - options - DataMaskingRulesClientListByDatabaseOptions contains the optional parameters for the DataMaskingRulesClient.NewListByDatabasePager +// method. +func (client *DataMaskingRulesClient) NewListByDatabasePager(resourceGroupName string, serverName string, databaseName string, options *DataMaskingRulesClientListByDatabaseOptions) *runtime.Pager[DataMaskingRulesClientListByDatabaseResponse] { + return runtime.NewPager(runtime.PagingHandler[DataMaskingRulesClientListByDatabaseResponse]{ + More: func(page DataMaskingRulesClientListByDatabaseResponse) bool { + return false + }, + Fetcher: func(ctx context.Context, page *DataMaskingRulesClientListByDatabaseResponse) (DataMaskingRulesClientListByDatabaseResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DataMaskingRulesClient.NewListByDatabasePager") + req, err := client.listByDatabaseCreateRequest(ctx, resourceGroupName, serverName, databaseName, options) + if err != nil { + return DataMaskingRulesClientListByDatabaseResponse{}, err + } + resp, err := client.internal.Pipeline().Do(req) + if err != nil { + return DataMaskingRulesClientListByDatabaseResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return DataMaskingRulesClientListByDatabaseResponse{}, runtime.NewResponseError(resp) + } + return client.listByDatabaseHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByDatabaseCreateRequest creates the ListByDatabase request. +func (client *DataMaskingRulesClient) listByDatabaseCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, options *DataMaskingRulesClientListByDatabaseOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/dataMaskingPolicies/{dataMaskingPolicyName}/rules" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + urlPath = strings.ReplaceAll(urlPath, "{dataMaskingPolicyName}", url.PathEscape("Default")) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2014-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByDatabaseHandleResponse handles the ListByDatabase response. +func (client *DataMaskingRulesClient) listByDatabaseHandleResponse(resp *http.Response) (DataMaskingRulesClientListByDatabaseResponse, error) { + result := DataMaskingRulesClientListByDatabaseResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DataMaskingRuleListResult); err != nil { + return DataMaskingRulesClientListByDatabaseResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/datawarehouseuseractivities_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/datawarehouseuseractivities_client.go new file mode 100644 index 000000000..1d0d08569 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/datawarehouseuseractivities_client.go @@ -0,0 +1,191 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// DataWarehouseUserActivitiesClient contains the methods for the DataWarehouseUserActivities group. +// Don't use this type directly, use NewDataWarehouseUserActivitiesClient() instead. +type DataWarehouseUserActivitiesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewDataWarehouseUserActivitiesClient creates a new instance of DataWarehouseUserActivitiesClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewDataWarehouseUserActivitiesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DataWarehouseUserActivitiesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &DataWarehouseUserActivitiesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Gets the user activities of a data warehouse which includes running and suspended queries +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database. +// - dataWarehouseUserActivityName - The activity name of the data warehouse. +// - options - DataWarehouseUserActivitiesClientGetOptions contains the optional parameters for the DataWarehouseUserActivitiesClient.Get +// method. +func (client *DataWarehouseUserActivitiesClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, dataWarehouseUserActivityName DataWarehouseUserActivityName, options *DataWarehouseUserActivitiesClientGetOptions) (DataWarehouseUserActivitiesClientGetResponse, error) { + var err error + const operationName = "DataWarehouseUserActivitiesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serverName, databaseName, dataWarehouseUserActivityName, options) + if err != nil { + return DataWarehouseUserActivitiesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return DataWarehouseUserActivitiesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DataWarehouseUserActivitiesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *DataWarehouseUserActivitiesClient) getCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, dataWarehouseUserActivityName DataWarehouseUserActivityName, options *DataWarehouseUserActivitiesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/dataWarehouseUserActivities/{dataWarehouseUserActivityName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if dataWarehouseUserActivityName == "" { + return nil, errors.New("parameter dataWarehouseUserActivityName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{dataWarehouseUserActivityName}", url.PathEscape(string(dataWarehouseUserActivityName))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *DataWarehouseUserActivitiesClient) getHandleResponse(resp *http.Response) (DataWarehouseUserActivitiesClientGetResponse, error) { + result := DataWarehouseUserActivitiesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DataWarehouseUserActivities); err != nil { + return DataWarehouseUserActivitiesClientGetResponse{}, err + } + return result, nil +} + +// NewListByDatabasePager - List the user activities of a data warehouse which includes running and suspended queries +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database. +// - options - DataWarehouseUserActivitiesClientListByDatabaseOptions contains the optional parameters for the DataWarehouseUserActivitiesClient.NewListByDatabasePager +// method. +func (client *DataWarehouseUserActivitiesClient) NewListByDatabasePager(resourceGroupName string, serverName string, databaseName string, options *DataWarehouseUserActivitiesClientListByDatabaseOptions) *runtime.Pager[DataWarehouseUserActivitiesClientListByDatabaseResponse] { + return runtime.NewPager(runtime.PagingHandler[DataWarehouseUserActivitiesClientListByDatabaseResponse]{ + More: func(page DataWarehouseUserActivitiesClientListByDatabaseResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *DataWarehouseUserActivitiesClientListByDatabaseResponse) (DataWarehouseUserActivitiesClientListByDatabaseResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DataWarehouseUserActivitiesClient.NewListByDatabasePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByDatabaseCreateRequest(ctx, resourceGroupName, serverName, databaseName, options) + }, nil) + if err != nil { + return DataWarehouseUserActivitiesClientListByDatabaseResponse{}, err + } + return client.listByDatabaseHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByDatabaseCreateRequest creates the ListByDatabase request. +func (client *DataWarehouseUserActivitiesClient) listByDatabaseCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, options *DataWarehouseUserActivitiesClientListByDatabaseOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/dataWarehouseUserActivities" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByDatabaseHandleResponse handles the ListByDatabase response. +func (client *DataWarehouseUserActivitiesClient) listByDatabaseHandleResponse(resp *http.Response) (DataWarehouseUserActivitiesClientListByDatabaseResponse, error) { + result := DataWarehouseUserActivitiesClientListByDatabaseResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DataWarehouseUserActivitiesListResult); err != nil { + return DataWarehouseUserActivitiesClientListByDatabaseResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/deletedservers_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/deletedservers_client.go new file mode 100644 index 000000000..c5978f9f9 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/deletedservers_client.go @@ -0,0 +1,298 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// DeletedServersClient contains the methods for the DeletedServers group. +// Don't use this type directly, use NewDeletedServersClient() instead. +type DeletedServersClient struct { + internal *arm.Client + subscriptionID string +} + +// NewDeletedServersClient creates a new instance of DeletedServersClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewDeletedServersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DeletedServersClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &DeletedServersClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Gets a deleted server. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - locationName - The name of the region where the resource is located. +// - deletedServerName - The name of the deleted server. +// - options - DeletedServersClientGetOptions contains the optional parameters for the DeletedServersClient.Get method. +func (client *DeletedServersClient) Get(ctx context.Context, locationName string, deletedServerName string, options *DeletedServersClientGetOptions) (DeletedServersClientGetResponse, error) { + var err error + const operationName = "DeletedServersClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, locationName, deletedServerName, options) + if err != nil { + return DeletedServersClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return DeletedServersClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DeletedServersClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *DeletedServersClient) getCreateRequest(ctx context.Context, locationName string, deletedServerName string, options *DeletedServersClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/deletedServers/{deletedServerName}" + if locationName == "" { + return nil, errors.New("parameter locationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{locationName}", url.PathEscape(locationName)) + if deletedServerName == "" { + return nil, errors.New("parameter deletedServerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{deletedServerName}", url.PathEscape(deletedServerName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *DeletedServersClient) getHandleResponse(resp *http.Response) (DeletedServersClientGetResponse, error) { + result := DeletedServersClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DeletedServer); err != nil { + return DeletedServersClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Gets a list of all deleted servers in a subscription. +// +// Generated from API version 2020-11-01-preview +// - options - DeletedServersClientListOptions contains the optional parameters for the DeletedServersClient.NewListPager method. +func (client *DeletedServersClient) NewListPager(options *DeletedServersClientListOptions) *runtime.Pager[DeletedServersClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[DeletedServersClientListResponse]{ + More: func(page DeletedServersClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *DeletedServersClientListResponse) (DeletedServersClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DeletedServersClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) + if err != nil { + return DeletedServersClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *DeletedServersClient) listCreateRequest(ctx context.Context, options *DeletedServersClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/deletedServers" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *DeletedServersClient) listHandleResponse(resp *http.Response) (DeletedServersClientListResponse, error) { + result := DeletedServersClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DeletedServerListResult); err != nil { + return DeletedServersClientListResponse{}, err + } + return result, nil +} + +// NewListByLocationPager - Gets a list of deleted servers for a location. +// +// Generated from API version 2020-11-01-preview +// - locationName - The name of the region where the resource is located. +// - options - DeletedServersClientListByLocationOptions contains the optional parameters for the DeletedServersClient.NewListByLocationPager +// method. +func (client *DeletedServersClient) NewListByLocationPager(locationName string, options *DeletedServersClientListByLocationOptions) *runtime.Pager[DeletedServersClientListByLocationResponse] { + return runtime.NewPager(runtime.PagingHandler[DeletedServersClientListByLocationResponse]{ + More: func(page DeletedServersClientListByLocationResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *DeletedServersClientListByLocationResponse) (DeletedServersClientListByLocationResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DeletedServersClient.NewListByLocationPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByLocationCreateRequest(ctx, locationName, options) + }, nil) + if err != nil { + return DeletedServersClientListByLocationResponse{}, err + } + return client.listByLocationHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByLocationCreateRequest creates the ListByLocation request. +func (client *DeletedServersClient) listByLocationCreateRequest(ctx context.Context, locationName string, options *DeletedServersClientListByLocationOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/deletedServers" + if locationName == "" { + return nil, errors.New("parameter locationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{locationName}", url.PathEscape(locationName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByLocationHandleResponse handles the ListByLocation response. +func (client *DeletedServersClient) listByLocationHandleResponse(resp *http.Response) (DeletedServersClientListByLocationResponse, error) { + result := DeletedServersClientListByLocationResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DeletedServerListResult); err != nil { + return DeletedServersClientListByLocationResponse{}, err + } + return result, nil +} + +// BeginRecover - Recovers a deleted server. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - locationName - The name of the region where the resource is located. +// - deletedServerName - The name of the deleted server. +// - options - DeletedServersClientBeginRecoverOptions contains the optional parameters for the DeletedServersClient.BeginRecover +// method. +func (client *DeletedServersClient) BeginRecover(ctx context.Context, locationName string, deletedServerName string, options *DeletedServersClientBeginRecoverOptions) (*runtime.Poller[DeletedServersClientRecoverResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.recoverOperation(ctx, locationName, deletedServerName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DeletedServersClientRecoverResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DeletedServersClientRecoverResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Recover - Recovers a deleted server. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +func (client *DeletedServersClient) recoverOperation(ctx context.Context, locationName string, deletedServerName string, options *DeletedServersClientBeginRecoverOptions) (*http.Response, error) { + var err error + const operationName = "DeletedServersClient.BeginRecover" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.recoverCreateRequest(ctx, locationName, deletedServerName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// recoverCreateRequest creates the Recover request. +func (client *DeletedServersClient) recoverCreateRequest(ctx context.Context, locationName string, deletedServerName string, options *DeletedServersClientBeginRecoverOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/deletedServers/{deletedServerName}/recover" + if locationName == "" { + return nil, errors.New("parameter locationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{locationName}", url.PathEscape(locationName)) + if deletedServerName == "" { + return nil, errors.New("parameter deletedServerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{deletedServerName}", url.PathEscape(deletedServerName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/distributedavailabilitygroups_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/distributedavailabilitygroups_client.go new file mode 100644 index 000000000..6fa4adc2e --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/distributedavailabilitygroups_client.go @@ -0,0 +1,434 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// DistributedAvailabilityGroupsClient contains the methods for the DistributedAvailabilityGroups group. +// Don't use this type directly, use NewDistributedAvailabilityGroupsClient() instead. +type DistributedAvailabilityGroupsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewDistributedAvailabilityGroupsClient creates a new instance of DistributedAvailabilityGroupsClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewDistributedAvailabilityGroupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DistributedAvailabilityGroupsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &DistributedAvailabilityGroupsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates a distributed availability group between Sql On-Prem and Sql Managed Instance. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - distributedAvailabilityGroupName - The distributed availability group name. +// - parameters - The distributed availability group info. +// - options - DistributedAvailabilityGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the DistributedAvailabilityGroupsClient.BeginCreateOrUpdate +// method. +func (client *DistributedAvailabilityGroupsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, distributedAvailabilityGroupName string, parameters DistributedAvailabilityGroup, options *DistributedAvailabilityGroupsClientBeginCreateOrUpdateOptions) (*runtime.Poller[DistributedAvailabilityGroupsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, managedInstanceName, distributedAvailabilityGroupName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DistributedAvailabilityGroupsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DistributedAvailabilityGroupsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates a distributed availability group between Sql On-Prem and Sql Managed Instance. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-11-01-preview +func (client *DistributedAvailabilityGroupsClient) createOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, distributedAvailabilityGroupName string, parameters DistributedAvailabilityGroup, options *DistributedAvailabilityGroupsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "DistributedAvailabilityGroupsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, managedInstanceName, distributedAvailabilityGroupName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *DistributedAvailabilityGroupsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, distributedAvailabilityGroupName string, parameters DistributedAvailabilityGroup, options *DistributedAvailabilityGroupsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/distributedAvailabilityGroups/{distributedAvailabilityGroupName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if distributedAvailabilityGroupName == "" { + return nil, errors.New("parameter distributedAvailabilityGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{distributedAvailabilityGroupName}", url.PathEscape(distributedAvailabilityGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Drops a distributed availability group between Sql On-Prem and Sql Managed Instance. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - distributedAvailabilityGroupName - The distributed availability group name. +// - options - DistributedAvailabilityGroupsClientBeginDeleteOptions contains the optional parameters for the DistributedAvailabilityGroupsClient.BeginDelete +// method. +func (client *DistributedAvailabilityGroupsClient) BeginDelete(ctx context.Context, resourceGroupName string, managedInstanceName string, distributedAvailabilityGroupName string, options *DistributedAvailabilityGroupsClientBeginDeleteOptions) (*runtime.Poller[DistributedAvailabilityGroupsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, managedInstanceName, distributedAvailabilityGroupName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DistributedAvailabilityGroupsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DistributedAvailabilityGroupsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Drops a distributed availability group between Sql On-Prem and Sql Managed Instance. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-11-01-preview +func (client *DistributedAvailabilityGroupsClient) deleteOperation(ctx context.Context, resourceGroupName string, managedInstanceName string, distributedAvailabilityGroupName string, options *DistributedAvailabilityGroupsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "DistributedAvailabilityGroupsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, managedInstanceName, distributedAvailabilityGroupName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *DistributedAvailabilityGroupsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, distributedAvailabilityGroupName string, options *DistributedAvailabilityGroupsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/distributedAvailabilityGroups/{distributedAvailabilityGroupName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if distributedAvailabilityGroupName == "" { + return nil, errors.New("parameter distributedAvailabilityGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{distributedAvailabilityGroupName}", url.PathEscape(distributedAvailabilityGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + return req, nil +} + +// Get - Gets a distributed availability group info. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - distributedAvailabilityGroupName - The distributed availability group name. +// - options - DistributedAvailabilityGroupsClientGetOptions contains the optional parameters for the DistributedAvailabilityGroupsClient.Get +// method. +func (client *DistributedAvailabilityGroupsClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, distributedAvailabilityGroupName string, options *DistributedAvailabilityGroupsClientGetOptions) (DistributedAvailabilityGroupsClientGetResponse, error) { + var err error + const operationName = "DistributedAvailabilityGroupsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, managedInstanceName, distributedAvailabilityGroupName, options) + if err != nil { + return DistributedAvailabilityGroupsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return DistributedAvailabilityGroupsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DistributedAvailabilityGroupsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *DistributedAvailabilityGroupsClient) getCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, distributedAvailabilityGroupName string, options *DistributedAvailabilityGroupsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/distributedAvailabilityGroups/{distributedAvailabilityGroupName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if distributedAvailabilityGroupName == "" { + return nil, errors.New("parameter distributedAvailabilityGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{distributedAvailabilityGroupName}", url.PathEscape(distributedAvailabilityGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *DistributedAvailabilityGroupsClient) getHandleResponse(resp *http.Response) (DistributedAvailabilityGroupsClientGetResponse, error) { + result := DistributedAvailabilityGroupsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DistributedAvailabilityGroup); err != nil { + return DistributedAvailabilityGroupsClientGetResponse{}, err + } + return result, nil +} + +// NewListByInstancePager - Gets a list of a distributed availability groups in instance. +// +// Generated from API version 2021-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - options - DistributedAvailabilityGroupsClientListByInstanceOptions contains the optional parameters for the DistributedAvailabilityGroupsClient.NewListByInstancePager +// method. +func (client *DistributedAvailabilityGroupsClient) NewListByInstancePager(resourceGroupName string, managedInstanceName string, options *DistributedAvailabilityGroupsClientListByInstanceOptions) *runtime.Pager[DistributedAvailabilityGroupsClientListByInstanceResponse] { + return runtime.NewPager(runtime.PagingHandler[DistributedAvailabilityGroupsClientListByInstanceResponse]{ + More: func(page DistributedAvailabilityGroupsClientListByInstanceResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *DistributedAvailabilityGroupsClientListByInstanceResponse) (DistributedAvailabilityGroupsClientListByInstanceResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DistributedAvailabilityGroupsClient.NewListByInstancePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByInstanceCreateRequest(ctx, resourceGroupName, managedInstanceName, options) + }, nil) + if err != nil { + return DistributedAvailabilityGroupsClientListByInstanceResponse{}, err + } + return client.listByInstanceHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByInstanceCreateRequest creates the ListByInstance request. +func (client *DistributedAvailabilityGroupsClient) listByInstanceCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, options *DistributedAvailabilityGroupsClientListByInstanceOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/distributedAvailabilityGroups" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByInstanceHandleResponse handles the ListByInstance response. +func (client *DistributedAvailabilityGroupsClient) listByInstanceHandleResponse(resp *http.Response) (DistributedAvailabilityGroupsClientListByInstanceResponse, error) { + result := DistributedAvailabilityGroupsClientListByInstanceResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DistributedAvailabilityGroupsListResult); err != nil { + return DistributedAvailabilityGroupsClientListByInstanceResponse{}, err + } + return result, nil +} + +// BeginUpdate - Updates a distributed availability group replication mode. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - distributedAvailabilityGroupName - The distributed availability group name. +// - parameters - The distributed availability group info. +// - options - DistributedAvailabilityGroupsClientBeginUpdateOptions contains the optional parameters for the DistributedAvailabilityGroupsClient.BeginUpdate +// method. +func (client *DistributedAvailabilityGroupsClient) BeginUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, distributedAvailabilityGroupName string, parameters DistributedAvailabilityGroup, options *DistributedAvailabilityGroupsClientBeginUpdateOptions) (*runtime.Poller[DistributedAvailabilityGroupsClientUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.update(ctx, resourceGroupName, managedInstanceName, distributedAvailabilityGroupName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DistributedAvailabilityGroupsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DistributedAvailabilityGroupsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Update - Updates a distributed availability group replication mode. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-11-01-preview +func (client *DistributedAvailabilityGroupsClient) update(ctx context.Context, resourceGroupName string, managedInstanceName string, distributedAvailabilityGroupName string, parameters DistributedAvailabilityGroup, options *DistributedAvailabilityGroupsClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "DistributedAvailabilityGroupsClient.BeginUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, managedInstanceName, distributedAvailabilityGroupName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// updateCreateRequest creates the Update request. +func (client *DistributedAvailabilityGroupsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, distributedAvailabilityGroupName string, parameters DistributedAvailabilityGroup, options *DistributedAvailabilityGroupsClientBeginUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/distributedAvailabilityGroups/{distributedAvailabilityGroupName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if distributedAvailabilityGroupName == "" { + return nil, errors.New("parameter distributedAvailabilityGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{distributedAvailabilityGroupName}", url.PathEscape(distributedAvailabilityGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/elasticpoolactivities_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/elasticpoolactivities_client.go new file mode 100644 index 000000000..410f26fe2 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/elasticpoolactivities_client.go @@ -0,0 +1,116 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ElasticPoolActivitiesClient contains the methods for the ElasticPoolActivities group. +// Don't use this type directly, use NewElasticPoolActivitiesClient() instead. +type ElasticPoolActivitiesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewElasticPoolActivitiesClient creates a new instance of ElasticPoolActivitiesClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewElasticPoolActivitiesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ElasticPoolActivitiesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ElasticPoolActivitiesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// NewListByElasticPoolPager - Returns elastic pool activities. +// +// Generated from API version 2014-04-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - elasticPoolName - The name of the elastic pool for which to get the current activity. +// - options - ElasticPoolActivitiesClientListByElasticPoolOptions contains the optional parameters for the ElasticPoolActivitiesClient.NewListByElasticPoolPager +// method. +func (client *ElasticPoolActivitiesClient) NewListByElasticPoolPager(resourceGroupName string, serverName string, elasticPoolName string, options *ElasticPoolActivitiesClientListByElasticPoolOptions) *runtime.Pager[ElasticPoolActivitiesClientListByElasticPoolResponse] { + return runtime.NewPager(runtime.PagingHandler[ElasticPoolActivitiesClientListByElasticPoolResponse]{ + More: func(page ElasticPoolActivitiesClientListByElasticPoolResponse) bool { + return false + }, + Fetcher: func(ctx context.Context, page *ElasticPoolActivitiesClientListByElasticPoolResponse) (ElasticPoolActivitiesClientListByElasticPoolResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ElasticPoolActivitiesClient.NewListByElasticPoolPager") + req, err := client.listByElasticPoolCreateRequest(ctx, resourceGroupName, serverName, elasticPoolName, options) + if err != nil { + return ElasticPoolActivitiesClientListByElasticPoolResponse{}, err + } + resp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ElasticPoolActivitiesClientListByElasticPoolResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return ElasticPoolActivitiesClientListByElasticPoolResponse{}, runtime.NewResponseError(resp) + } + return client.listByElasticPoolHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByElasticPoolCreateRequest creates the ListByElasticPool request. +func (client *ElasticPoolActivitiesClient) listByElasticPoolCreateRequest(ctx context.Context, resourceGroupName string, serverName string, elasticPoolName string, options *ElasticPoolActivitiesClientListByElasticPoolOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/elasticPoolActivity" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if elasticPoolName == "" { + return nil, errors.New("parameter elasticPoolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{elasticPoolName}", url.PathEscape(elasticPoolName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2014-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByElasticPoolHandleResponse handles the ListByElasticPool response. +func (client *ElasticPoolActivitiesClient) listByElasticPoolHandleResponse(resp *http.Response) (ElasticPoolActivitiesClientListByElasticPoolResponse, error) { + result := ElasticPoolActivitiesClientListByElasticPoolResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ElasticPoolActivityListResult); err != nil { + return ElasticPoolActivitiesClientListByElasticPoolResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/elasticpooldatabaseactivities_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/elasticpooldatabaseactivities_client.go new file mode 100644 index 000000000..b56cc8336 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/elasticpooldatabaseactivities_client.go @@ -0,0 +1,116 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ElasticPoolDatabaseActivitiesClient contains the methods for the ElasticPoolDatabaseActivities group. +// Don't use this type directly, use NewElasticPoolDatabaseActivitiesClient() instead. +type ElasticPoolDatabaseActivitiesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewElasticPoolDatabaseActivitiesClient creates a new instance of ElasticPoolDatabaseActivitiesClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewElasticPoolDatabaseActivitiesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ElasticPoolDatabaseActivitiesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ElasticPoolDatabaseActivitiesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// NewListByElasticPoolPager - Returns activity on databases inside of an elastic pool. +// +// Generated from API version 2014-04-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - elasticPoolName - The name of the elastic pool. +// - options - ElasticPoolDatabaseActivitiesClientListByElasticPoolOptions contains the optional parameters for the ElasticPoolDatabaseActivitiesClient.NewListByElasticPoolPager +// method. +func (client *ElasticPoolDatabaseActivitiesClient) NewListByElasticPoolPager(resourceGroupName string, serverName string, elasticPoolName string, options *ElasticPoolDatabaseActivitiesClientListByElasticPoolOptions) *runtime.Pager[ElasticPoolDatabaseActivitiesClientListByElasticPoolResponse] { + return runtime.NewPager(runtime.PagingHandler[ElasticPoolDatabaseActivitiesClientListByElasticPoolResponse]{ + More: func(page ElasticPoolDatabaseActivitiesClientListByElasticPoolResponse) bool { + return false + }, + Fetcher: func(ctx context.Context, page *ElasticPoolDatabaseActivitiesClientListByElasticPoolResponse) (ElasticPoolDatabaseActivitiesClientListByElasticPoolResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ElasticPoolDatabaseActivitiesClient.NewListByElasticPoolPager") + req, err := client.listByElasticPoolCreateRequest(ctx, resourceGroupName, serverName, elasticPoolName, options) + if err != nil { + return ElasticPoolDatabaseActivitiesClientListByElasticPoolResponse{}, err + } + resp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ElasticPoolDatabaseActivitiesClientListByElasticPoolResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return ElasticPoolDatabaseActivitiesClientListByElasticPoolResponse{}, runtime.NewResponseError(resp) + } + return client.listByElasticPoolHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByElasticPoolCreateRequest creates the ListByElasticPool request. +func (client *ElasticPoolDatabaseActivitiesClient) listByElasticPoolCreateRequest(ctx context.Context, resourceGroupName string, serverName string, elasticPoolName string, options *ElasticPoolDatabaseActivitiesClientListByElasticPoolOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/elasticPoolDatabaseActivity" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if elasticPoolName == "" { + return nil, errors.New("parameter elasticPoolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{elasticPoolName}", url.PathEscape(elasticPoolName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2014-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByElasticPoolHandleResponse handles the ListByElasticPool response. +func (client *ElasticPoolDatabaseActivitiesClient) listByElasticPoolHandleResponse(resp *http.Response) (ElasticPoolDatabaseActivitiesClientListByElasticPoolResponse, error) { + result := ElasticPoolDatabaseActivitiesClientListByElasticPoolResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ElasticPoolDatabaseActivityListResult); err != nil { + return ElasticPoolDatabaseActivitiesClientListByElasticPoolResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/elasticpooloperations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/elasticpooloperations_client.go new file mode 100644 index 000000000..bc1b7b345 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/elasticpooloperations_client.go @@ -0,0 +1,178 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ElasticPoolOperationsClient contains the methods for the ElasticPoolOperations group. +// Don't use this type directly, use NewElasticPoolOperationsClient() instead. +type ElasticPoolOperationsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewElasticPoolOperationsClient creates a new instance of ElasticPoolOperationsClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewElasticPoolOperationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ElasticPoolOperationsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ElasticPoolOperationsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Cancel - Cancels the asynchronous operation on the elastic pool. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - operationID - The operation identifier. +// - options - ElasticPoolOperationsClientCancelOptions contains the optional parameters for the ElasticPoolOperationsClient.Cancel +// method. +func (client *ElasticPoolOperationsClient) Cancel(ctx context.Context, resourceGroupName string, serverName string, elasticPoolName string, operationID string, options *ElasticPoolOperationsClientCancelOptions) (ElasticPoolOperationsClientCancelResponse, error) { + var err error + const operationName = "ElasticPoolOperationsClient.Cancel" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.cancelCreateRequest(ctx, resourceGroupName, serverName, elasticPoolName, operationID, options) + if err != nil { + return ElasticPoolOperationsClientCancelResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ElasticPoolOperationsClientCancelResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ElasticPoolOperationsClientCancelResponse{}, err + } + return ElasticPoolOperationsClientCancelResponse{}, nil +} + +// cancelCreateRequest creates the Cancel request. +func (client *ElasticPoolOperationsClient) cancelCreateRequest(ctx context.Context, resourceGroupName string, serverName string, elasticPoolName string, operationID string, options *ElasticPoolOperationsClientCancelOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/operations/{operationId}/cancel" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if elasticPoolName == "" { + return nil, errors.New("parameter elasticPoolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{elasticPoolName}", url.PathEscape(elasticPoolName)) + if operationID == "" { + return nil, errors.New("parameter operationID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{operationId}", url.PathEscape(operationID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + return req, nil +} + +// NewListByElasticPoolPager - Gets a list of operations performed on the elastic pool. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - options - ElasticPoolOperationsClientListByElasticPoolOptions contains the optional parameters for the ElasticPoolOperationsClient.NewListByElasticPoolPager +// method. +func (client *ElasticPoolOperationsClient) NewListByElasticPoolPager(resourceGroupName string, serverName string, elasticPoolName string, options *ElasticPoolOperationsClientListByElasticPoolOptions) *runtime.Pager[ElasticPoolOperationsClientListByElasticPoolResponse] { + return runtime.NewPager(runtime.PagingHandler[ElasticPoolOperationsClientListByElasticPoolResponse]{ + More: func(page ElasticPoolOperationsClientListByElasticPoolResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ElasticPoolOperationsClientListByElasticPoolResponse) (ElasticPoolOperationsClientListByElasticPoolResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ElasticPoolOperationsClient.NewListByElasticPoolPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByElasticPoolCreateRequest(ctx, resourceGroupName, serverName, elasticPoolName, options) + }, nil) + if err != nil { + return ElasticPoolOperationsClientListByElasticPoolResponse{}, err + } + return client.listByElasticPoolHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByElasticPoolCreateRequest creates the ListByElasticPool request. +func (client *ElasticPoolOperationsClient) listByElasticPoolCreateRequest(ctx context.Context, resourceGroupName string, serverName string, elasticPoolName string, options *ElasticPoolOperationsClientListByElasticPoolOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/operations" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if elasticPoolName == "" { + return nil, errors.New("parameter elasticPoolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{elasticPoolName}", url.PathEscape(elasticPoolName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByElasticPoolHandleResponse handles the ListByElasticPool response. +func (client *ElasticPoolOperationsClient) listByElasticPoolHandleResponse(resp *http.Response) (ElasticPoolOperationsClientListByElasticPoolResponse, error) { + result := ElasticPoolOperationsClientListByElasticPoolResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ElasticPoolOperationListResult); err != nil { + return ElasticPoolOperationsClientListByElasticPoolResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/elasticpools_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/elasticpools_client.go new file mode 100644 index 000000000..165d827b3 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/elasticpools_client.go @@ -0,0 +1,664 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// ElasticPoolsClient contains the methods for the ElasticPools group. +// Don't use this type directly, use NewElasticPoolsClient() instead. +type ElasticPoolsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewElasticPoolsClient creates a new instance of ElasticPoolsClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewElasticPoolsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ElasticPoolsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ElasticPoolsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates or updates an elastic pool. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-08-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - elasticPoolName - The name of the elastic pool. +// - parameters - The elastic pool parameters. +// - options - ElasticPoolsClientBeginCreateOrUpdateOptions contains the optional parameters for the ElasticPoolsClient.BeginCreateOrUpdate +// method. +func (client *ElasticPoolsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, elasticPoolName string, parameters ElasticPool, options *ElasticPoolsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ElasticPoolsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, serverName, elasticPoolName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ElasticPoolsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ElasticPoolsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates or updates an elastic pool. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-08-01-preview +func (client *ElasticPoolsClient) createOrUpdate(ctx context.Context, resourceGroupName string, serverName string, elasticPoolName string, parameters ElasticPool, options *ElasticPoolsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ElasticPoolsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serverName, elasticPoolName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *ElasticPoolsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serverName string, elasticPoolName string, parameters ElasticPool, options *ElasticPoolsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if elasticPoolName == "" { + return nil, errors.New("parameter elasticPoolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{elasticPoolName}", url.PathEscape(elasticPoolName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-08-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes an elastic pool. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-08-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - elasticPoolName - The name of the elastic pool. +// - options - ElasticPoolsClientBeginDeleteOptions contains the optional parameters for the ElasticPoolsClient.BeginDelete +// method. +func (client *ElasticPoolsClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, elasticPoolName string, options *ElasticPoolsClientBeginDeleteOptions) (*runtime.Poller[ElasticPoolsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, serverName, elasticPoolName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ElasticPoolsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ElasticPoolsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes an elastic pool. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-08-01-preview +func (client *ElasticPoolsClient) deleteOperation(ctx context.Context, resourceGroupName string, serverName string, elasticPoolName string, options *ElasticPoolsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "ElasticPoolsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serverName, elasticPoolName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *ElasticPoolsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serverName string, elasticPoolName string, options *ElasticPoolsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if elasticPoolName == "" { + return nil, errors.New("parameter elasticPoolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{elasticPoolName}", url.PathEscape(elasticPoolName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-08-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + return req, nil +} + +// BeginFailover - Failovers an elastic pool. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-08-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - elasticPoolName - The name of the elastic pool to failover. +// - options - ElasticPoolsClientBeginFailoverOptions contains the optional parameters for the ElasticPoolsClient.BeginFailover +// method. +func (client *ElasticPoolsClient) BeginFailover(ctx context.Context, resourceGroupName string, serverName string, elasticPoolName string, options *ElasticPoolsClientBeginFailoverOptions) (*runtime.Poller[ElasticPoolsClientFailoverResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.failover(ctx, resourceGroupName, serverName, elasticPoolName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ElasticPoolsClientFailoverResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ElasticPoolsClientFailoverResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Failover - Failovers an elastic pool. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-08-01-preview +func (client *ElasticPoolsClient) failover(ctx context.Context, resourceGroupName string, serverName string, elasticPoolName string, options *ElasticPoolsClientBeginFailoverOptions) (*http.Response, error) { + var err error + const operationName = "ElasticPoolsClient.BeginFailover" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.failoverCreateRequest(ctx, resourceGroupName, serverName, elasticPoolName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// failoverCreateRequest creates the Failover request. +func (client *ElasticPoolsClient) failoverCreateRequest(ctx context.Context, resourceGroupName string, serverName string, elasticPoolName string, options *ElasticPoolsClientBeginFailoverOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/failover" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if elasticPoolName == "" { + return nil, errors.New("parameter elasticPoolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{elasticPoolName}", url.PathEscape(elasticPoolName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-08-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + return req, nil +} + +// Get - Gets an elastic pool. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-08-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - elasticPoolName - The name of the elastic pool. +// - options - ElasticPoolsClientGetOptions contains the optional parameters for the ElasticPoolsClient.Get method. +func (client *ElasticPoolsClient) Get(ctx context.Context, resourceGroupName string, serverName string, elasticPoolName string, options *ElasticPoolsClientGetOptions) (ElasticPoolsClientGetResponse, error) { + var err error + const operationName = "ElasticPoolsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serverName, elasticPoolName, options) + if err != nil { + return ElasticPoolsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ElasticPoolsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ElasticPoolsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ElasticPoolsClient) getCreateRequest(ctx context.Context, resourceGroupName string, serverName string, elasticPoolName string, options *ElasticPoolsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if elasticPoolName == "" { + return nil, errors.New("parameter elasticPoolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{elasticPoolName}", url.PathEscape(elasticPoolName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-08-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ElasticPoolsClient) getHandleResponse(resp *http.Response) (ElasticPoolsClientGetResponse, error) { + result := ElasticPoolsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ElasticPool); err != nil { + return ElasticPoolsClientGetResponse{}, err + } + return result, nil +} + +// NewListByServerPager - Gets all elastic pools in a server. +// +// Generated from API version 2021-08-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - options - ElasticPoolsClientListByServerOptions contains the optional parameters for the ElasticPoolsClient.NewListByServerPager +// method. +func (client *ElasticPoolsClient) NewListByServerPager(resourceGroupName string, serverName string, options *ElasticPoolsClientListByServerOptions) *runtime.Pager[ElasticPoolsClientListByServerResponse] { + return runtime.NewPager(runtime.PagingHandler[ElasticPoolsClientListByServerResponse]{ + More: func(page ElasticPoolsClientListByServerResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ElasticPoolsClientListByServerResponse) (ElasticPoolsClientListByServerResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ElasticPoolsClient.NewListByServerPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByServerCreateRequest(ctx, resourceGroupName, serverName, options) + }, nil) + if err != nil { + return ElasticPoolsClientListByServerResponse{}, err + } + return client.listByServerHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByServerCreateRequest creates the ListByServer request. +func (client *ElasticPoolsClient) listByServerCreateRequest(ctx context.Context, resourceGroupName string, serverName string, options *ElasticPoolsClientListByServerOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Skip != nil { + reqQP.Set("$skip", strconv.FormatInt(*options.Skip, 10)) + } + reqQP.Set("api-version", "2021-08-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByServerHandleResponse handles the ListByServer response. +func (client *ElasticPoolsClient) listByServerHandleResponse(resp *http.Response) (ElasticPoolsClientListByServerResponse, error) { + result := ElasticPoolsClientListByServerResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ElasticPoolListResult); err != nil { + return ElasticPoolsClientListByServerResponse{}, err + } + return result, nil +} + +// NewListMetricDefinitionsPager - Returns elastic pool metric definitions. +// +// Generated from API version 2014-04-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - elasticPoolName - The name of the elastic pool. +// - options - ElasticPoolsClientListMetricDefinitionsOptions contains the optional parameters for the ElasticPoolsClient.NewListMetricDefinitionsPager +// method. +func (client *ElasticPoolsClient) NewListMetricDefinitionsPager(resourceGroupName string, serverName string, elasticPoolName string, options *ElasticPoolsClientListMetricDefinitionsOptions) *runtime.Pager[ElasticPoolsClientListMetricDefinitionsResponse] { + return runtime.NewPager(runtime.PagingHandler[ElasticPoolsClientListMetricDefinitionsResponse]{ + More: func(page ElasticPoolsClientListMetricDefinitionsResponse) bool { + return false + }, + Fetcher: func(ctx context.Context, page *ElasticPoolsClientListMetricDefinitionsResponse) (ElasticPoolsClientListMetricDefinitionsResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ElasticPoolsClient.NewListMetricDefinitionsPager") + req, err := client.listMetricDefinitionsCreateRequest(ctx, resourceGroupName, serverName, elasticPoolName, options) + if err != nil { + return ElasticPoolsClientListMetricDefinitionsResponse{}, err + } + resp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ElasticPoolsClientListMetricDefinitionsResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return ElasticPoolsClientListMetricDefinitionsResponse{}, runtime.NewResponseError(resp) + } + return client.listMetricDefinitionsHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listMetricDefinitionsCreateRequest creates the ListMetricDefinitions request. +func (client *ElasticPoolsClient) listMetricDefinitionsCreateRequest(ctx context.Context, resourceGroupName string, serverName string, elasticPoolName string, options *ElasticPoolsClientListMetricDefinitionsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/metricDefinitions" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if elasticPoolName == "" { + return nil, errors.New("parameter elasticPoolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{elasticPoolName}", url.PathEscape(elasticPoolName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2014-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listMetricDefinitionsHandleResponse handles the ListMetricDefinitions response. +func (client *ElasticPoolsClient) listMetricDefinitionsHandleResponse(resp *http.Response) (ElasticPoolsClientListMetricDefinitionsResponse, error) { + result := ElasticPoolsClientListMetricDefinitionsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.MetricDefinitionListResult); err != nil { + return ElasticPoolsClientListMetricDefinitionsResponse{}, err + } + return result, nil +} + +// NewListMetricsPager - Returns elastic pool metrics. +// +// Generated from API version 2014-04-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - elasticPoolName - The name of the elastic pool. +// - filter - An OData filter expression that describes a subset of metrics to return. +// - options - ElasticPoolsClientListMetricsOptions contains the optional parameters for the ElasticPoolsClient.NewListMetricsPager +// method. +func (client *ElasticPoolsClient) NewListMetricsPager(resourceGroupName string, serverName string, elasticPoolName string, filter string, options *ElasticPoolsClientListMetricsOptions) *runtime.Pager[ElasticPoolsClientListMetricsResponse] { + return runtime.NewPager(runtime.PagingHandler[ElasticPoolsClientListMetricsResponse]{ + More: func(page ElasticPoolsClientListMetricsResponse) bool { + return false + }, + Fetcher: func(ctx context.Context, page *ElasticPoolsClientListMetricsResponse) (ElasticPoolsClientListMetricsResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ElasticPoolsClient.NewListMetricsPager") + req, err := client.listMetricsCreateRequest(ctx, resourceGroupName, serverName, elasticPoolName, filter, options) + if err != nil { + return ElasticPoolsClientListMetricsResponse{}, err + } + resp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ElasticPoolsClientListMetricsResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return ElasticPoolsClientListMetricsResponse{}, runtime.NewResponseError(resp) + } + return client.listMetricsHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listMetricsCreateRequest creates the ListMetrics request. +func (client *ElasticPoolsClient) listMetricsCreateRequest(ctx context.Context, resourceGroupName string, serverName string, elasticPoolName string, filter string, options *ElasticPoolsClientListMetricsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/metrics" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if elasticPoolName == "" { + return nil, errors.New("parameter elasticPoolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{elasticPoolName}", url.PathEscape(elasticPoolName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2014-04-01") + reqQP.Set("$filter", filter) + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listMetricsHandleResponse handles the ListMetrics response. +func (client *ElasticPoolsClient) listMetricsHandleResponse(resp *http.Response) (ElasticPoolsClientListMetricsResponse, error) { + result := ElasticPoolsClientListMetricsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.MetricListResult); err != nil { + return ElasticPoolsClientListMetricsResponse{}, err + } + return result, nil +} + +// BeginUpdate - Updates an elastic pool. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-08-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - elasticPoolName - The name of the elastic pool. +// - parameters - The elastic pool update parameters. +// - options - ElasticPoolsClientBeginUpdateOptions contains the optional parameters for the ElasticPoolsClient.BeginUpdate +// method. +func (client *ElasticPoolsClient) BeginUpdate(ctx context.Context, resourceGroupName string, serverName string, elasticPoolName string, parameters ElasticPoolUpdate, options *ElasticPoolsClientBeginUpdateOptions) (*runtime.Poller[ElasticPoolsClientUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.update(ctx, resourceGroupName, serverName, elasticPoolName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ElasticPoolsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ElasticPoolsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Update - Updates an elastic pool. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-08-01-preview +func (client *ElasticPoolsClient) update(ctx context.Context, resourceGroupName string, serverName string, elasticPoolName string, parameters ElasticPoolUpdate, options *ElasticPoolsClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ElasticPoolsClient.BeginUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, serverName, elasticPoolName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// updateCreateRequest creates the Update request. +func (client *ElasticPoolsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serverName string, elasticPoolName string, parameters ElasticPoolUpdate, options *ElasticPoolsClientBeginUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if elasticPoolName == "" { + return nil, errors.New("parameter elasticPoolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{elasticPoolName}", url.PathEscape(elasticPoolName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-08-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/encryptionprotectors_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/encryptionprotectors_client.go new file mode 100644 index 000000000..0ba9daa71 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/encryptionprotectors_client.go @@ -0,0 +1,348 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// EncryptionProtectorsClient contains the methods for the EncryptionProtectors group. +// Don't use this type directly, use NewEncryptionProtectorsClient() instead. +type EncryptionProtectorsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewEncryptionProtectorsClient creates a new instance of EncryptionProtectorsClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewEncryptionProtectorsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*EncryptionProtectorsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &EncryptionProtectorsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Updates an existing encryption protector. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - encryptionProtectorName - The name of the encryption protector to be updated. +// - parameters - The requested encryption protector resource state. +// - options - EncryptionProtectorsClientBeginCreateOrUpdateOptions contains the optional parameters for the EncryptionProtectorsClient.BeginCreateOrUpdate +// method. +func (client *EncryptionProtectorsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, encryptionProtectorName EncryptionProtectorName, parameters EncryptionProtector, options *EncryptionProtectorsClientBeginCreateOrUpdateOptions) (*runtime.Poller[EncryptionProtectorsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, serverName, encryptionProtectorName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[EncryptionProtectorsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[EncryptionProtectorsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Updates an existing encryption protector. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +func (client *EncryptionProtectorsClient) createOrUpdate(ctx context.Context, resourceGroupName string, serverName string, encryptionProtectorName EncryptionProtectorName, parameters EncryptionProtector, options *EncryptionProtectorsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "EncryptionProtectorsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serverName, encryptionProtectorName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *EncryptionProtectorsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serverName string, encryptionProtectorName EncryptionProtectorName, parameters EncryptionProtector, options *EncryptionProtectorsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/encryptionProtector/{encryptionProtectorName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if encryptionProtectorName == "" { + return nil, errors.New("parameter encryptionProtectorName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{encryptionProtectorName}", url.PathEscape(string(encryptionProtectorName))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// Get - Gets a server encryption protector. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - encryptionProtectorName - The name of the encryption protector to be retrieved. +// - options - EncryptionProtectorsClientGetOptions contains the optional parameters for the EncryptionProtectorsClient.Get +// method. +func (client *EncryptionProtectorsClient) Get(ctx context.Context, resourceGroupName string, serverName string, encryptionProtectorName EncryptionProtectorName, options *EncryptionProtectorsClientGetOptions) (EncryptionProtectorsClientGetResponse, error) { + var err error + const operationName = "EncryptionProtectorsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serverName, encryptionProtectorName, options) + if err != nil { + return EncryptionProtectorsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return EncryptionProtectorsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return EncryptionProtectorsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *EncryptionProtectorsClient) getCreateRequest(ctx context.Context, resourceGroupName string, serverName string, encryptionProtectorName EncryptionProtectorName, options *EncryptionProtectorsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/encryptionProtector/{encryptionProtectorName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if encryptionProtectorName == "" { + return nil, errors.New("parameter encryptionProtectorName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{encryptionProtectorName}", url.PathEscape(string(encryptionProtectorName))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *EncryptionProtectorsClient) getHandleResponse(resp *http.Response) (EncryptionProtectorsClientGetResponse, error) { + result := EncryptionProtectorsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.EncryptionProtector); err != nil { + return EncryptionProtectorsClientGetResponse{}, err + } + return result, nil +} + +// NewListByServerPager - Gets a list of server encryption protectors +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - options - EncryptionProtectorsClientListByServerOptions contains the optional parameters for the EncryptionProtectorsClient.NewListByServerPager +// method. +func (client *EncryptionProtectorsClient) NewListByServerPager(resourceGroupName string, serverName string, options *EncryptionProtectorsClientListByServerOptions) *runtime.Pager[EncryptionProtectorsClientListByServerResponse] { + return runtime.NewPager(runtime.PagingHandler[EncryptionProtectorsClientListByServerResponse]{ + More: func(page EncryptionProtectorsClientListByServerResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *EncryptionProtectorsClientListByServerResponse) (EncryptionProtectorsClientListByServerResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "EncryptionProtectorsClient.NewListByServerPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByServerCreateRequest(ctx, resourceGroupName, serverName, options) + }, nil) + if err != nil { + return EncryptionProtectorsClientListByServerResponse{}, err + } + return client.listByServerHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByServerCreateRequest creates the ListByServer request. +func (client *EncryptionProtectorsClient) listByServerCreateRequest(ctx context.Context, resourceGroupName string, serverName string, options *EncryptionProtectorsClientListByServerOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/encryptionProtector" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByServerHandleResponse handles the ListByServer response. +func (client *EncryptionProtectorsClient) listByServerHandleResponse(resp *http.Response) (EncryptionProtectorsClientListByServerResponse, error) { + result := EncryptionProtectorsClientListByServerResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.EncryptionProtectorListResult); err != nil { + return EncryptionProtectorsClientListByServerResponse{}, err + } + return result, nil +} + +// BeginRevalidate - Revalidates an existing encryption protector. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - encryptionProtectorName - The name of the encryption protector to be updated. +// - options - EncryptionProtectorsClientBeginRevalidateOptions contains the optional parameters for the EncryptionProtectorsClient.BeginRevalidate +// method. +func (client *EncryptionProtectorsClient) BeginRevalidate(ctx context.Context, resourceGroupName string, serverName string, encryptionProtectorName EncryptionProtectorName, options *EncryptionProtectorsClientBeginRevalidateOptions) (*runtime.Poller[EncryptionProtectorsClientRevalidateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.revalidate(ctx, resourceGroupName, serverName, encryptionProtectorName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[EncryptionProtectorsClientRevalidateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[EncryptionProtectorsClientRevalidateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Revalidate - Revalidates an existing encryption protector. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +func (client *EncryptionProtectorsClient) revalidate(ctx context.Context, resourceGroupName string, serverName string, encryptionProtectorName EncryptionProtectorName, options *EncryptionProtectorsClientBeginRevalidateOptions) (*http.Response, error) { + var err error + const operationName = "EncryptionProtectorsClient.BeginRevalidate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.revalidateCreateRequest(ctx, resourceGroupName, serverName, encryptionProtectorName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// revalidateCreateRequest creates the Revalidate request. +func (client *EncryptionProtectorsClient) revalidateCreateRequest(ctx context.Context, resourceGroupName string, serverName string, encryptionProtectorName EncryptionProtectorName, options *EncryptionProtectorsClientBeginRevalidateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/encryptionProtector/{encryptionProtectorName}/revalidate" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if encryptionProtectorName == "" { + return nil, errors.New("parameter encryptionProtectorName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{encryptionProtectorName}", url.PathEscape(string(encryptionProtectorName))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/endpointcertificates_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/endpointcertificates_client.go new file mode 100644 index 000000000..dacd79527 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/endpointcertificates_client.go @@ -0,0 +1,181 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// EndpointCertificatesClient contains the methods for the EndpointCertificates group. +// Don't use this type directly, use NewEndpointCertificatesClient() instead. +type EndpointCertificatesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewEndpointCertificatesClient creates a new instance of EndpointCertificatesClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewEndpointCertificatesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*EndpointCertificatesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &EndpointCertificatesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Gets a certificate used on the endpoint with the given id. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - endpointType - Type of the endpoint whose certificate the customer is looking for. +// - options - EndpointCertificatesClientGetOptions contains the optional parameters for the EndpointCertificatesClient.Get +// method. +func (client *EndpointCertificatesClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, endpointType string, options *EndpointCertificatesClientGetOptions) (EndpointCertificatesClientGetResponse, error) { + var err error + const operationName = "EndpointCertificatesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, managedInstanceName, endpointType, options) + if err != nil { + return EndpointCertificatesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return EndpointCertificatesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return EndpointCertificatesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *EndpointCertificatesClient) getCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, endpointType string, options *EndpointCertificatesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/endpointCertificates/{endpointType}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if endpointType == "" { + return nil, errors.New("parameter endpointType cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{endpointType}", url.PathEscape(endpointType)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *EndpointCertificatesClient) getHandleResponse(resp *http.Response) (EndpointCertificatesClientGetResponse, error) { + result := EndpointCertificatesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.EndpointCertificate); err != nil { + return EndpointCertificatesClientGetResponse{}, err + } + return result, nil +} + +// NewListByInstancePager - List certificates used on endpoints on the target instance. +// +// Generated from API version 2021-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - options - EndpointCertificatesClientListByInstanceOptions contains the optional parameters for the EndpointCertificatesClient.NewListByInstancePager +// method. +func (client *EndpointCertificatesClient) NewListByInstancePager(resourceGroupName string, managedInstanceName string, options *EndpointCertificatesClientListByInstanceOptions) *runtime.Pager[EndpointCertificatesClientListByInstanceResponse] { + return runtime.NewPager(runtime.PagingHandler[EndpointCertificatesClientListByInstanceResponse]{ + More: func(page EndpointCertificatesClientListByInstanceResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *EndpointCertificatesClientListByInstanceResponse) (EndpointCertificatesClientListByInstanceResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "EndpointCertificatesClient.NewListByInstancePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByInstanceCreateRequest(ctx, resourceGroupName, managedInstanceName, options) + }, nil) + if err != nil { + return EndpointCertificatesClientListByInstanceResponse{}, err + } + return client.listByInstanceHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByInstanceCreateRequest creates the ListByInstance request. +func (client *EndpointCertificatesClient) listByInstanceCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, options *EndpointCertificatesClientListByInstanceOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/endpointCertificates" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByInstanceHandleResponse handles the ListByInstance response. +func (client *EndpointCertificatesClient) listByInstanceHandleResponse(resp *http.Response) (EndpointCertificatesClientListByInstanceResponse, error) { + result := EndpointCertificatesClientListByInstanceResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.EndpointCertificateListResult); err != nil { + return EndpointCertificatesClientListByInstanceResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/extendeddatabaseblobauditingpolicies_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/extendeddatabaseblobauditingpolicies_client.go new file mode 100644 index 000000000..c18905c86 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/extendeddatabaseblobauditingpolicies_client.go @@ -0,0 +1,263 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ExtendedDatabaseBlobAuditingPoliciesClient contains the methods for the ExtendedDatabaseBlobAuditingPolicies group. +// Don't use this type directly, use NewExtendedDatabaseBlobAuditingPoliciesClient() instead. +type ExtendedDatabaseBlobAuditingPoliciesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewExtendedDatabaseBlobAuditingPoliciesClient creates a new instance of ExtendedDatabaseBlobAuditingPoliciesClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewExtendedDatabaseBlobAuditingPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExtendedDatabaseBlobAuditingPoliciesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ExtendedDatabaseBlobAuditingPoliciesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Creates or updates an extended database's blob auditing policy. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database. +// - parameters - The extended database blob auditing policy. +// - options - ExtendedDatabaseBlobAuditingPoliciesClientCreateOrUpdateOptions contains the optional parameters for the ExtendedDatabaseBlobAuditingPoliciesClient.CreateOrUpdate +// method. +func (client *ExtendedDatabaseBlobAuditingPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters ExtendedDatabaseBlobAuditingPolicy, options *ExtendedDatabaseBlobAuditingPoliciesClientCreateOrUpdateOptions) (ExtendedDatabaseBlobAuditingPoliciesClientCreateOrUpdateResponse, error) { + var err error + const operationName = "ExtendedDatabaseBlobAuditingPoliciesClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serverName, databaseName, parameters, options) + if err != nil { + return ExtendedDatabaseBlobAuditingPoliciesClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ExtendedDatabaseBlobAuditingPoliciesClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return ExtendedDatabaseBlobAuditingPoliciesClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *ExtendedDatabaseBlobAuditingPoliciesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters ExtendedDatabaseBlobAuditingPolicy, options *ExtendedDatabaseBlobAuditingPoliciesClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/extendedAuditingSettings/{blobAuditingPolicyName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + urlPath = strings.ReplaceAll(urlPath, "{blobAuditingPolicyName}", url.PathEscape("default")) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *ExtendedDatabaseBlobAuditingPoliciesClient) createOrUpdateHandleResponse(resp *http.Response) (ExtendedDatabaseBlobAuditingPoliciesClientCreateOrUpdateResponse, error) { + result := ExtendedDatabaseBlobAuditingPoliciesClientCreateOrUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ExtendedDatabaseBlobAuditingPolicy); err != nil { + return ExtendedDatabaseBlobAuditingPoliciesClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// Get - Gets an extended database's blob auditing policy. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database. +// - options - ExtendedDatabaseBlobAuditingPoliciesClientGetOptions contains the optional parameters for the ExtendedDatabaseBlobAuditingPoliciesClient.Get +// method. +func (client *ExtendedDatabaseBlobAuditingPoliciesClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, options *ExtendedDatabaseBlobAuditingPoliciesClientGetOptions) (ExtendedDatabaseBlobAuditingPoliciesClientGetResponse, error) { + var err error + const operationName = "ExtendedDatabaseBlobAuditingPoliciesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serverName, databaseName, options) + if err != nil { + return ExtendedDatabaseBlobAuditingPoliciesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ExtendedDatabaseBlobAuditingPoliciesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ExtendedDatabaseBlobAuditingPoliciesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ExtendedDatabaseBlobAuditingPoliciesClient) getCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, options *ExtendedDatabaseBlobAuditingPoliciesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/extendedAuditingSettings/{blobAuditingPolicyName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + urlPath = strings.ReplaceAll(urlPath, "{blobAuditingPolicyName}", url.PathEscape("default")) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ExtendedDatabaseBlobAuditingPoliciesClient) getHandleResponse(resp *http.Response) (ExtendedDatabaseBlobAuditingPoliciesClientGetResponse, error) { + result := ExtendedDatabaseBlobAuditingPoliciesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ExtendedDatabaseBlobAuditingPolicy); err != nil { + return ExtendedDatabaseBlobAuditingPoliciesClientGetResponse{}, err + } + return result, nil +} + +// NewListByDatabasePager - Lists extended auditing settings of a database. +// +// Generated from API version 2021-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database. +// - options - ExtendedDatabaseBlobAuditingPoliciesClientListByDatabaseOptions contains the optional parameters for the ExtendedDatabaseBlobAuditingPoliciesClient.NewListByDatabasePager +// method. +func (client *ExtendedDatabaseBlobAuditingPoliciesClient) NewListByDatabasePager(resourceGroupName string, serverName string, databaseName string, options *ExtendedDatabaseBlobAuditingPoliciesClientListByDatabaseOptions) *runtime.Pager[ExtendedDatabaseBlobAuditingPoliciesClientListByDatabaseResponse] { + return runtime.NewPager(runtime.PagingHandler[ExtendedDatabaseBlobAuditingPoliciesClientListByDatabaseResponse]{ + More: func(page ExtendedDatabaseBlobAuditingPoliciesClientListByDatabaseResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ExtendedDatabaseBlobAuditingPoliciesClientListByDatabaseResponse) (ExtendedDatabaseBlobAuditingPoliciesClientListByDatabaseResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ExtendedDatabaseBlobAuditingPoliciesClient.NewListByDatabasePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByDatabaseCreateRequest(ctx, resourceGroupName, serverName, databaseName, options) + }, nil) + if err != nil { + return ExtendedDatabaseBlobAuditingPoliciesClientListByDatabaseResponse{}, err + } + return client.listByDatabaseHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByDatabaseCreateRequest creates the ListByDatabase request. +func (client *ExtendedDatabaseBlobAuditingPoliciesClient) listByDatabaseCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, options *ExtendedDatabaseBlobAuditingPoliciesClientListByDatabaseOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/extendedAuditingSettings" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByDatabaseHandleResponse handles the ListByDatabase response. +func (client *ExtendedDatabaseBlobAuditingPoliciesClient) listByDatabaseHandleResponse(resp *http.Response) (ExtendedDatabaseBlobAuditingPoliciesClientListByDatabaseResponse, error) { + result := ExtendedDatabaseBlobAuditingPoliciesClientListByDatabaseResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ExtendedDatabaseBlobAuditingPolicyListResult); err != nil { + return ExtendedDatabaseBlobAuditingPoliciesClientListByDatabaseResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/extendedserverblobauditingpolicies_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/extendedserverblobauditingpolicies_client.go new file mode 100644 index 000000000..e8674ca0d --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/extendedserverblobauditingpolicies_client.go @@ -0,0 +1,259 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ExtendedServerBlobAuditingPoliciesClient contains the methods for the ExtendedServerBlobAuditingPolicies group. +// Don't use this type directly, use NewExtendedServerBlobAuditingPoliciesClient() instead. +type ExtendedServerBlobAuditingPoliciesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewExtendedServerBlobAuditingPoliciesClient creates a new instance of ExtendedServerBlobAuditingPoliciesClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewExtendedServerBlobAuditingPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExtendedServerBlobAuditingPoliciesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ExtendedServerBlobAuditingPoliciesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates or updates an extended server's blob auditing policy. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - parameters - Properties of extended blob auditing policy +// - options - ExtendedServerBlobAuditingPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the ExtendedServerBlobAuditingPoliciesClient.BeginCreateOrUpdate +// method. +func (client *ExtendedServerBlobAuditingPoliciesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, parameters ExtendedServerBlobAuditingPolicy, options *ExtendedServerBlobAuditingPoliciesClientBeginCreateOrUpdateOptions) (*runtime.Poller[ExtendedServerBlobAuditingPoliciesClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, serverName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ExtendedServerBlobAuditingPoliciesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ExtendedServerBlobAuditingPoliciesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates or updates an extended server's blob auditing policy. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-11-01-preview +func (client *ExtendedServerBlobAuditingPoliciesClient) createOrUpdate(ctx context.Context, resourceGroupName string, serverName string, parameters ExtendedServerBlobAuditingPolicy, options *ExtendedServerBlobAuditingPoliciesClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ExtendedServerBlobAuditingPoliciesClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serverName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *ExtendedServerBlobAuditingPoliciesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serverName string, parameters ExtendedServerBlobAuditingPolicy, options *ExtendedServerBlobAuditingPoliciesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/extendedAuditingSettings/{blobAuditingPolicyName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + urlPath = strings.ReplaceAll(urlPath, "{blobAuditingPolicyName}", url.PathEscape("default")) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// Get - Gets an extended server's blob auditing policy. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - options - ExtendedServerBlobAuditingPoliciesClientGetOptions contains the optional parameters for the ExtendedServerBlobAuditingPoliciesClient.Get +// method. +func (client *ExtendedServerBlobAuditingPoliciesClient) Get(ctx context.Context, resourceGroupName string, serverName string, options *ExtendedServerBlobAuditingPoliciesClientGetOptions) (ExtendedServerBlobAuditingPoliciesClientGetResponse, error) { + var err error + const operationName = "ExtendedServerBlobAuditingPoliciesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serverName, options) + if err != nil { + return ExtendedServerBlobAuditingPoliciesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ExtendedServerBlobAuditingPoliciesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ExtendedServerBlobAuditingPoliciesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ExtendedServerBlobAuditingPoliciesClient) getCreateRequest(ctx context.Context, resourceGroupName string, serverName string, options *ExtendedServerBlobAuditingPoliciesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/extendedAuditingSettings/{blobAuditingPolicyName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + urlPath = strings.ReplaceAll(urlPath, "{blobAuditingPolicyName}", url.PathEscape("default")) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ExtendedServerBlobAuditingPoliciesClient) getHandleResponse(resp *http.Response) (ExtendedServerBlobAuditingPoliciesClientGetResponse, error) { + result := ExtendedServerBlobAuditingPoliciesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ExtendedServerBlobAuditingPolicy); err != nil { + return ExtendedServerBlobAuditingPoliciesClientGetResponse{}, err + } + return result, nil +} + +// NewListByServerPager - Lists extended auditing settings of a server. +// +// Generated from API version 2021-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - options - ExtendedServerBlobAuditingPoliciesClientListByServerOptions contains the optional parameters for the ExtendedServerBlobAuditingPoliciesClient.NewListByServerPager +// method. +func (client *ExtendedServerBlobAuditingPoliciesClient) NewListByServerPager(resourceGroupName string, serverName string, options *ExtendedServerBlobAuditingPoliciesClientListByServerOptions) *runtime.Pager[ExtendedServerBlobAuditingPoliciesClientListByServerResponse] { + return runtime.NewPager(runtime.PagingHandler[ExtendedServerBlobAuditingPoliciesClientListByServerResponse]{ + More: func(page ExtendedServerBlobAuditingPoliciesClientListByServerResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ExtendedServerBlobAuditingPoliciesClientListByServerResponse) (ExtendedServerBlobAuditingPoliciesClientListByServerResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ExtendedServerBlobAuditingPoliciesClient.NewListByServerPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByServerCreateRequest(ctx, resourceGroupName, serverName, options) + }, nil) + if err != nil { + return ExtendedServerBlobAuditingPoliciesClientListByServerResponse{}, err + } + return client.listByServerHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByServerCreateRequest creates the ListByServer request. +func (client *ExtendedServerBlobAuditingPoliciesClient) listByServerCreateRequest(ctx context.Context, resourceGroupName string, serverName string, options *ExtendedServerBlobAuditingPoliciesClientListByServerOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/extendedAuditingSettings" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByServerHandleResponse handles the ListByServer response. +func (client *ExtendedServerBlobAuditingPoliciesClient) listByServerHandleResponse(resp *http.Response) (ExtendedServerBlobAuditingPoliciesClientListByServerResponse, error) { + result := ExtendedServerBlobAuditingPoliciesClientListByServerResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ExtendedServerBlobAuditingPolicyListResult); err != nil { + return ExtendedServerBlobAuditingPoliciesClientListByServerResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/failovergroups_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/failovergroups_client.go new file mode 100644 index 000000000..4086d1293 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/failovergroups_client.go @@ -0,0 +1,599 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// FailoverGroupsClient contains the methods for the FailoverGroups group. +// Don't use this type directly, use NewFailoverGroupsClient() instead. +type FailoverGroupsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewFailoverGroupsClient creates a new instance of FailoverGroupsClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewFailoverGroupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*FailoverGroupsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &FailoverGroupsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates or updates a failover group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server containing the failover group. +// - failoverGroupName - The name of the failover group. +// - parameters - The failover group parameters. +// - options - FailoverGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the FailoverGroupsClient.BeginCreateOrUpdate +// method. +func (client *FailoverGroupsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, failoverGroupName string, parameters FailoverGroup, options *FailoverGroupsClientBeginCreateOrUpdateOptions) (*runtime.Poller[FailoverGroupsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, serverName, failoverGroupName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[FailoverGroupsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[FailoverGroupsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates or updates a failover group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +func (client *FailoverGroupsClient) createOrUpdate(ctx context.Context, resourceGroupName string, serverName string, failoverGroupName string, parameters FailoverGroup, options *FailoverGroupsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "FailoverGroupsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serverName, failoverGroupName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *FailoverGroupsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serverName string, failoverGroupName string, parameters FailoverGroup, options *FailoverGroupsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/failoverGroups/{failoverGroupName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if failoverGroupName == "" { + return nil, errors.New("parameter failoverGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{failoverGroupName}", url.PathEscape(failoverGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes a failover group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server containing the failover group. +// - failoverGroupName - The name of the failover group. +// - options - FailoverGroupsClientBeginDeleteOptions contains the optional parameters for the FailoverGroupsClient.BeginDelete +// method. +func (client *FailoverGroupsClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, failoverGroupName string, options *FailoverGroupsClientBeginDeleteOptions) (*runtime.Poller[FailoverGroupsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, serverName, failoverGroupName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[FailoverGroupsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[FailoverGroupsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes a failover group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +func (client *FailoverGroupsClient) deleteOperation(ctx context.Context, resourceGroupName string, serverName string, failoverGroupName string, options *FailoverGroupsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "FailoverGroupsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serverName, failoverGroupName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *FailoverGroupsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serverName string, failoverGroupName string, options *FailoverGroupsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/failoverGroups/{failoverGroupName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if failoverGroupName == "" { + return nil, errors.New("parameter failoverGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{failoverGroupName}", url.PathEscape(failoverGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + return req, nil +} + +// BeginFailover - Fails over from the current primary server to this server. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server containing the failover group. +// - failoverGroupName - The name of the failover group. +// - options - FailoverGroupsClientBeginFailoverOptions contains the optional parameters for the FailoverGroupsClient.BeginFailover +// method. +func (client *FailoverGroupsClient) BeginFailover(ctx context.Context, resourceGroupName string, serverName string, failoverGroupName string, options *FailoverGroupsClientBeginFailoverOptions) (*runtime.Poller[FailoverGroupsClientFailoverResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.failover(ctx, resourceGroupName, serverName, failoverGroupName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[FailoverGroupsClientFailoverResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[FailoverGroupsClientFailoverResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Failover - Fails over from the current primary server to this server. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +func (client *FailoverGroupsClient) failover(ctx context.Context, resourceGroupName string, serverName string, failoverGroupName string, options *FailoverGroupsClientBeginFailoverOptions) (*http.Response, error) { + var err error + const operationName = "FailoverGroupsClient.BeginFailover" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.failoverCreateRequest(ctx, resourceGroupName, serverName, failoverGroupName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// failoverCreateRequest creates the Failover request. +func (client *FailoverGroupsClient) failoverCreateRequest(ctx context.Context, resourceGroupName string, serverName string, failoverGroupName string, options *FailoverGroupsClientBeginFailoverOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/failoverGroups/{failoverGroupName}/failover" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if failoverGroupName == "" { + return nil, errors.New("parameter failoverGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{failoverGroupName}", url.PathEscape(failoverGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginForceFailoverAllowDataLoss - Fails over from the current primary server to this server. This operation might result +// in data loss. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server containing the failover group. +// - failoverGroupName - The name of the failover group. +// - options - FailoverGroupsClientBeginForceFailoverAllowDataLossOptions contains the optional parameters for the FailoverGroupsClient.BeginForceFailoverAllowDataLoss +// method. +func (client *FailoverGroupsClient) BeginForceFailoverAllowDataLoss(ctx context.Context, resourceGroupName string, serverName string, failoverGroupName string, options *FailoverGroupsClientBeginForceFailoverAllowDataLossOptions) (*runtime.Poller[FailoverGroupsClientForceFailoverAllowDataLossResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.forceFailoverAllowDataLoss(ctx, resourceGroupName, serverName, failoverGroupName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[FailoverGroupsClientForceFailoverAllowDataLossResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[FailoverGroupsClientForceFailoverAllowDataLossResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// ForceFailoverAllowDataLoss - Fails over from the current primary server to this server. This operation might result in +// data loss. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +func (client *FailoverGroupsClient) forceFailoverAllowDataLoss(ctx context.Context, resourceGroupName string, serverName string, failoverGroupName string, options *FailoverGroupsClientBeginForceFailoverAllowDataLossOptions) (*http.Response, error) { + var err error + const operationName = "FailoverGroupsClient.BeginForceFailoverAllowDataLoss" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.forceFailoverAllowDataLossCreateRequest(ctx, resourceGroupName, serverName, failoverGroupName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// forceFailoverAllowDataLossCreateRequest creates the ForceFailoverAllowDataLoss request. +func (client *FailoverGroupsClient) forceFailoverAllowDataLossCreateRequest(ctx context.Context, resourceGroupName string, serverName string, failoverGroupName string, options *FailoverGroupsClientBeginForceFailoverAllowDataLossOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/failoverGroups/{failoverGroupName}/forceFailoverAllowDataLoss" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if failoverGroupName == "" { + return nil, errors.New("parameter failoverGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{failoverGroupName}", url.PathEscape(failoverGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets a failover group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server containing the failover group. +// - failoverGroupName - The name of the failover group. +// - options - FailoverGroupsClientGetOptions contains the optional parameters for the FailoverGroupsClient.Get method. +func (client *FailoverGroupsClient) Get(ctx context.Context, resourceGroupName string, serverName string, failoverGroupName string, options *FailoverGroupsClientGetOptions) (FailoverGroupsClientGetResponse, error) { + var err error + const operationName = "FailoverGroupsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serverName, failoverGroupName, options) + if err != nil { + return FailoverGroupsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return FailoverGroupsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return FailoverGroupsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *FailoverGroupsClient) getCreateRequest(ctx context.Context, resourceGroupName string, serverName string, failoverGroupName string, options *FailoverGroupsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/failoverGroups/{failoverGroupName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if failoverGroupName == "" { + return nil, errors.New("parameter failoverGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{failoverGroupName}", url.PathEscape(failoverGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *FailoverGroupsClient) getHandleResponse(resp *http.Response) (FailoverGroupsClientGetResponse, error) { + result := FailoverGroupsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.FailoverGroup); err != nil { + return FailoverGroupsClientGetResponse{}, err + } + return result, nil +} + +// NewListByServerPager - Lists the failover groups in a server. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server containing the failover group. +// - options - FailoverGroupsClientListByServerOptions contains the optional parameters for the FailoverGroupsClient.NewListByServerPager +// method. +func (client *FailoverGroupsClient) NewListByServerPager(resourceGroupName string, serverName string, options *FailoverGroupsClientListByServerOptions) *runtime.Pager[FailoverGroupsClientListByServerResponse] { + return runtime.NewPager(runtime.PagingHandler[FailoverGroupsClientListByServerResponse]{ + More: func(page FailoverGroupsClientListByServerResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *FailoverGroupsClientListByServerResponse) (FailoverGroupsClientListByServerResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "FailoverGroupsClient.NewListByServerPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByServerCreateRequest(ctx, resourceGroupName, serverName, options) + }, nil) + if err != nil { + return FailoverGroupsClientListByServerResponse{}, err + } + return client.listByServerHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByServerCreateRequest creates the ListByServer request. +func (client *FailoverGroupsClient) listByServerCreateRequest(ctx context.Context, resourceGroupName string, serverName string, options *FailoverGroupsClientListByServerOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/failoverGroups" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByServerHandleResponse handles the ListByServer response. +func (client *FailoverGroupsClient) listByServerHandleResponse(resp *http.Response) (FailoverGroupsClientListByServerResponse, error) { + result := FailoverGroupsClientListByServerResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.FailoverGroupListResult); err != nil { + return FailoverGroupsClientListByServerResponse{}, err + } + return result, nil +} + +// BeginUpdate - Updates a failover group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server containing the failover group. +// - failoverGroupName - The name of the failover group. +// - parameters - The failover group parameters. +// - options - FailoverGroupsClientBeginUpdateOptions contains the optional parameters for the FailoverGroupsClient.BeginUpdate +// method. +func (client *FailoverGroupsClient) BeginUpdate(ctx context.Context, resourceGroupName string, serverName string, failoverGroupName string, parameters FailoverGroupUpdate, options *FailoverGroupsClientBeginUpdateOptions) (*runtime.Poller[FailoverGroupsClientUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.update(ctx, resourceGroupName, serverName, failoverGroupName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[FailoverGroupsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[FailoverGroupsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Update - Updates a failover group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +func (client *FailoverGroupsClient) update(ctx context.Context, resourceGroupName string, serverName string, failoverGroupName string, parameters FailoverGroupUpdate, options *FailoverGroupsClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "FailoverGroupsClient.BeginUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, serverName, failoverGroupName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// updateCreateRequest creates the Update request. +func (client *FailoverGroupsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serverName string, failoverGroupName string, parameters FailoverGroupUpdate, options *FailoverGroupsClientBeginUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/failoverGroups/{failoverGroupName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if failoverGroupName == "" { + return nil, errors.New("parameter failoverGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{failoverGroupName}", url.PathEscape(failoverGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/firewallrules_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/firewallrules_client.go new file mode 100644 index 000000000..c489cf0b6 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/firewallrules_client.go @@ -0,0 +1,382 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// FirewallRulesClient contains the methods for the FirewallRules group. +// Don't use this type directly, use NewFirewallRulesClient() instead. +type FirewallRulesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewFirewallRulesClient creates a new instance of FirewallRulesClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewFirewallRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*FirewallRulesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &FirewallRulesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Creates or updates a firewall rule. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - firewallRuleName - The name of the firewall rule. +// - parameters - The required parameters for creating or updating a firewall rule. +// - options - FirewallRulesClientCreateOrUpdateOptions contains the optional parameters for the FirewallRulesClient.CreateOrUpdate +// method. +func (client *FirewallRulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, firewallRuleName string, parameters FirewallRule, options *FirewallRulesClientCreateOrUpdateOptions) (FirewallRulesClientCreateOrUpdateResponse, error) { + var err error + const operationName = "FirewallRulesClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serverName, firewallRuleName, parameters, options) + if err != nil { + return FirewallRulesClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return FirewallRulesClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return FirewallRulesClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *FirewallRulesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serverName string, firewallRuleName string, parameters FirewallRule, options *FirewallRulesClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/firewallRules/{firewallRuleName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if firewallRuleName == "" { + return nil, errors.New("parameter firewallRuleName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{firewallRuleName}", url.PathEscape(firewallRuleName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *FirewallRulesClient) createOrUpdateHandleResponse(resp *http.Response) (FirewallRulesClientCreateOrUpdateResponse, error) { + result := FirewallRulesClientCreateOrUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.FirewallRule); err != nil { + return FirewallRulesClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// Delete - Deletes a firewall rule. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - firewallRuleName - The name of the firewall rule. +// - options - FirewallRulesClientDeleteOptions contains the optional parameters for the FirewallRulesClient.Delete method. +func (client *FirewallRulesClient) Delete(ctx context.Context, resourceGroupName string, serverName string, firewallRuleName string, options *FirewallRulesClientDeleteOptions) (FirewallRulesClientDeleteResponse, error) { + var err error + const operationName = "FirewallRulesClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serverName, firewallRuleName, options) + if err != nil { + return FirewallRulesClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return FirewallRulesClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return FirewallRulesClientDeleteResponse{}, err + } + return FirewallRulesClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *FirewallRulesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serverName string, firewallRuleName string, options *FirewallRulesClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/firewallRules/{firewallRuleName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if firewallRuleName == "" { + return nil, errors.New("parameter firewallRuleName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{firewallRuleName}", url.PathEscape(firewallRuleName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + return req, nil +} + +// Get - Gets a firewall rule. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - firewallRuleName - The name of the firewall rule. +// - options - FirewallRulesClientGetOptions contains the optional parameters for the FirewallRulesClient.Get method. +func (client *FirewallRulesClient) Get(ctx context.Context, resourceGroupName string, serverName string, firewallRuleName string, options *FirewallRulesClientGetOptions) (FirewallRulesClientGetResponse, error) { + var err error + const operationName = "FirewallRulesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serverName, firewallRuleName, options) + if err != nil { + return FirewallRulesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return FirewallRulesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return FirewallRulesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *FirewallRulesClient) getCreateRequest(ctx context.Context, resourceGroupName string, serverName string, firewallRuleName string, options *FirewallRulesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/firewallRules/{firewallRuleName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if firewallRuleName == "" { + return nil, errors.New("parameter firewallRuleName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{firewallRuleName}", url.PathEscape(firewallRuleName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *FirewallRulesClient) getHandleResponse(resp *http.Response) (FirewallRulesClientGetResponse, error) { + result := FirewallRulesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.FirewallRule); err != nil { + return FirewallRulesClientGetResponse{}, err + } + return result, nil +} + +// NewListByServerPager - Gets a list of firewall rules. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - options - FirewallRulesClientListByServerOptions contains the optional parameters for the FirewallRulesClient.NewListByServerPager +// method. +func (client *FirewallRulesClient) NewListByServerPager(resourceGroupName string, serverName string, options *FirewallRulesClientListByServerOptions) *runtime.Pager[FirewallRulesClientListByServerResponse] { + return runtime.NewPager(runtime.PagingHandler[FirewallRulesClientListByServerResponse]{ + More: func(page FirewallRulesClientListByServerResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *FirewallRulesClientListByServerResponse) (FirewallRulesClientListByServerResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "FirewallRulesClient.NewListByServerPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByServerCreateRequest(ctx, resourceGroupName, serverName, options) + }, nil) + if err != nil { + return FirewallRulesClientListByServerResponse{}, err + } + return client.listByServerHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByServerCreateRequest creates the ListByServer request. +func (client *FirewallRulesClient) listByServerCreateRequest(ctx context.Context, resourceGroupName string, serverName string, options *FirewallRulesClientListByServerOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/firewallRules" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByServerHandleResponse handles the ListByServer response. +func (client *FirewallRulesClient) listByServerHandleResponse(resp *http.Response) (FirewallRulesClientListByServerResponse, error) { + result := FirewallRulesClientListByServerResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.FirewallRuleListResult); err != nil { + return FirewallRulesClientListByServerResponse{}, err + } + return result, nil +} + +// Replace - Replaces all firewall rules on the server. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - options - FirewallRulesClientReplaceOptions contains the optional parameters for the FirewallRulesClient.Replace method. +func (client *FirewallRulesClient) Replace(ctx context.Context, resourceGroupName string, serverName string, parameters FirewallRuleList, options *FirewallRulesClientReplaceOptions) (FirewallRulesClientReplaceResponse, error) { + var err error + const operationName = "FirewallRulesClient.Replace" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.replaceCreateRequest(ctx, resourceGroupName, serverName, parameters, options) + if err != nil { + return FirewallRulesClientReplaceResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return FirewallRulesClientReplaceResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return FirewallRulesClientReplaceResponse{}, err + } + resp, err := client.replaceHandleResponse(httpResp) + return resp, err +} + +// replaceCreateRequest creates the Replace request. +func (client *FirewallRulesClient) replaceCreateRequest(ctx context.Context, resourceGroupName string, serverName string, parameters FirewallRuleList, options *FirewallRulesClientReplaceOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/firewallRules" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// replaceHandleResponse handles the Replace response. +func (client *FirewallRulesClient) replaceHandleResponse(resp *http.Response) (FirewallRulesClientReplaceResponse, error) { + result := FirewallRulesClientReplaceResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.FirewallRule); err != nil { + return FirewallRulesClientReplaceResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/geobackuppolicies_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/geobackuppolicies_client.go new file mode 100644 index 000000000..1a8b346ab --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/geobackuppolicies_client.go @@ -0,0 +1,271 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// GeoBackupPoliciesClient contains the methods for the GeoBackupPolicies group. +// Don't use this type directly, use NewGeoBackupPoliciesClient() instead. +type GeoBackupPoliciesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewGeoBackupPoliciesClient creates a new instance of GeoBackupPoliciesClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewGeoBackupPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GeoBackupPoliciesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &GeoBackupPoliciesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Updates a database geo backup policy. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2014-04-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database. +// - geoBackupPolicyName - The name of the geo backup policy. +// - parameters - The required parameters for creating or updating the geo backup policy. +// - options - GeoBackupPoliciesClientCreateOrUpdateOptions contains the optional parameters for the GeoBackupPoliciesClient.CreateOrUpdate +// method. +func (client *GeoBackupPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, geoBackupPolicyName GeoBackupPolicyName, parameters GeoBackupPolicy, options *GeoBackupPoliciesClientCreateOrUpdateOptions) (GeoBackupPoliciesClientCreateOrUpdateResponse, error) { + var err error + const operationName = "GeoBackupPoliciesClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serverName, databaseName, geoBackupPolicyName, parameters, options) + if err != nil { + return GeoBackupPoliciesClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return GeoBackupPoliciesClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return GeoBackupPoliciesClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *GeoBackupPoliciesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, geoBackupPolicyName GeoBackupPolicyName, parameters GeoBackupPolicy, options *GeoBackupPoliciesClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/geoBackupPolicies/{geoBackupPolicyName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if geoBackupPolicyName == "" { + return nil, errors.New("parameter geoBackupPolicyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{geoBackupPolicyName}", url.PathEscape(string(geoBackupPolicyName))) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2014-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *GeoBackupPoliciesClient) createOrUpdateHandleResponse(resp *http.Response) (GeoBackupPoliciesClientCreateOrUpdateResponse, error) { + result := GeoBackupPoliciesClientCreateOrUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.GeoBackupPolicy); err != nil { + return GeoBackupPoliciesClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// Get - Gets a geo backup policy. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2014-04-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database. +// - geoBackupPolicyName - The name of the geo backup policy. +// - options - GeoBackupPoliciesClientGetOptions contains the optional parameters for the GeoBackupPoliciesClient.Get method. +func (client *GeoBackupPoliciesClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, geoBackupPolicyName GeoBackupPolicyName, options *GeoBackupPoliciesClientGetOptions) (GeoBackupPoliciesClientGetResponse, error) { + var err error + const operationName = "GeoBackupPoliciesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serverName, databaseName, geoBackupPolicyName, options) + if err != nil { + return GeoBackupPoliciesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return GeoBackupPoliciesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return GeoBackupPoliciesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *GeoBackupPoliciesClient) getCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, geoBackupPolicyName GeoBackupPolicyName, options *GeoBackupPoliciesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/geoBackupPolicies/{geoBackupPolicyName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if geoBackupPolicyName == "" { + return nil, errors.New("parameter geoBackupPolicyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{geoBackupPolicyName}", url.PathEscape(string(geoBackupPolicyName))) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2014-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *GeoBackupPoliciesClient) getHandleResponse(resp *http.Response) (GeoBackupPoliciesClientGetResponse, error) { + result := GeoBackupPoliciesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.GeoBackupPolicy); err != nil { + return GeoBackupPoliciesClientGetResponse{}, err + } + return result, nil +} + +// NewListByDatabasePager - Returns a list of geo backup policies. +// +// Generated from API version 2014-04-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database. +// - options - GeoBackupPoliciesClientListByDatabaseOptions contains the optional parameters for the GeoBackupPoliciesClient.NewListByDatabasePager +// method. +func (client *GeoBackupPoliciesClient) NewListByDatabasePager(resourceGroupName string, serverName string, databaseName string, options *GeoBackupPoliciesClientListByDatabaseOptions) *runtime.Pager[GeoBackupPoliciesClientListByDatabaseResponse] { + return runtime.NewPager(runtime.PagingHandler[GeoBackupPoliciesClientListByDatabaseResponse]{ + More: func(page GeoBackupPoliciesClientListByDatabaseResponse) bool { + return false + }, + Fetcher: func(ctx context.Context, page *GeoBackupPoliciesClientListByDatabaseResponse) (GeoBackupPoliciesClientListByDatabaseResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "GeoBackupPoliciesClient.NewListByDatabasePager") + req, err := client.listByDatabaseCreateRequest(ctx, resourceGroupName, serverName, databaseName, options) + if err != nil { + return GeoBackupPoliciesClientListByDatabaseResponse{}, err + } + resp, err := client.internal.Pipeline().Do(req) + if err != nil { + return GeoBackupPoliciesClientListByDatabaseResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return GeoBackupPoliciesClientListByDatabaseResponse{}, runtime.NewResponseError(resp) + } + return client.listByDatabaseHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByDatabaseCreateRequest creates the ListByDatabase request. +func (client *GeoBackupPoliciesClient) listByDatabaseCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, options *GeoBackupPoliciesClientListByDatabaseOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/geoBackupPolicies" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2014-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByDatabaseHandleResponse handles the ListByDatabase response. +func (client *GeoBackupPoliciesClient) listByDatabaseHandleResponse(resp *http.Response) (GeoBackupPoliciesClientListByDatabaseResponse, error) { + result := GeoBackupPoliciesClientListByDatabaseResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.GeoBackupPolicyListResult); err != nil { + return GeoBackupPoliciesClientListByDatabaseResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/instancefailovergroups_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/instancefailovergroups_client.go new file mode 100644 index 000000000..d4978da86 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/instancefailovergroups_client.go @@ -0,0 +1,514 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// InstanceFailoverGroupsClient contains the methods for the InstanceFailoverGroups group. +// Don't use this type directly, use NewInstanceFailoverGroupsClient() instead. +type InstanceFailoverGroupsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewInstanceFailoverGroupsClient creates a new instance of InstanceFailoverGroupsClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewInstanceFailoverGroupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*InstanceFailoverGroupsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &InstanceFailoverGroupsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates or updates a failover group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - locationName - The name of the region where the resource is located. +// - failoverGroupName - The name of the failover group. +// - parameters - The failover group parameters. +// - options - InstanceFailoverGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the InstanceFailoverGroupsClient.BeginCreateOrUpdate +// method. +func (client *InstanceFailoverGroupsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, locationName string, failoverGroupName string, parameters InstanceFailoverGroup, options *InstanceFailoverGroupsClientBeginCreateOrUpdateOptions) (*runtime.Poller[InstanceFailoverGroupsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, locationName, failoverGroupName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[InstanceFailoverGroupsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[InstanceFailoverGroupsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates or updates a failover group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +func (client *InstanceFailoverGroupsClient) createOrUpdate(ctx context.Context, resourceGroupName string, locationName string, failoverGroupName string, parameters InstanceFailoverGroup, options *InstanceFailoverGroupsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "InstanceFailoverGroupsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, locationName, failoverGroupName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *InstanceFailoverGroupsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, locationName string, failoverGroupName string, parameters InstanceFailoverGroup, options *InstanceFailoverGroupsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/instanceFailoverGroups/{failoverGroupName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if locationName == "" { + return nil, errors.New("parameter locationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{locationName}", url.PathEscape(locationName)) + if failoverGroupName == "" { + return nil, errors.New("parameter failoverGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{failoverGroupName}", url.PathEscape(failoverGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes a failover group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - locationName - The name of the region where the resource is located. +// - failoverGroupName - The name of the failover group. +// - options - InstanceFailoverGroupsClientBeginDeleteOptions contains the optional parameters for the InstanceFailoverGroupsClient.BeginDelete +// method. +func (client *InstanceFailoverGroupsClient) BeginDelete(ctx context.Context, resourceGroupName string, locationName string, failoverGroupName string, options *InstanceFailoverGroupsClientBeginDeleteOptions) (*runtime.Poller[InstanceFailoverGroupsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, locationName, failoverGroupName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[InstanceFailoverGroupsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[InstanceFailoverGroupsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes a failover group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +func (client *InstanceFailoverGroupsClient) deleteOperation(ctx context.Context, resourceGroupName string, locationName string, failoverGroupName string, options *InstanceFailoverGroupsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "InstanceFailoverGroupsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, locationName, failoverGroupName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *InstanceFailoverGroupsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, locationName string, failoverGroupName string, options *InstanceFailoverGroupsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/instanceFailoverGroups/{failoverGroupName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if locationName == "" { + return nil, errors.New("parameter locationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{locationName}", url.PathEscape(locationName)) + if failoverGroupName == "" { + return nil, errors.New("parameter failoverGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{failoverGroupName}", url.PathEscape(failoverGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + return req, nil +} + +// BeginFailover - Fails over from the current primary managed instance to this managed instance. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - locationName - The name of the region where the resource is located. +// - failoverGroupName - The name of the failover group. +// - options - InstanceFailoverGroupsClientBeginFailoverOptions contains the optional parameters for the InstanceFailoverGroupsClient.BeginFailover +// method. +func (client *InstanceFailoverGroupsClient) BeginFailover(ctx context.Context, resourceGroupName string, locationName string, failoverGroupName string, options *InstanceFailoverGroupsClientBeginFailoverOptions) (*runtime.Poller[InstanceFailoverGroupsClientFailoverResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.failover(ctx, resourceGroupName, locationName, failoverGroupName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[InstanceFailoverGroupsClientFailoverResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[InstanceFailoverGroupsClientFailoverResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Failover - Fails over from the current primary managed instance to this managed instance. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +func (client *InstanceFailoverGroupsClient) failover(ctx context.Context, resourceGroupName string, locationName string, failoverGroupName string, options *InstanceFailoverGroupsClientBeginFailoverOptions) (*http.Response, error) { + var err error + const operationName = "InstanceFailoverGroupsClient.BeginFailover" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.failoverCreateRequest(ctx, resourceGroupName, locationName, failoverGroupName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// failoverCreateRequest creates the Failover request. +func (client *InstanceFailoverGroupsClient) failoverCreateRequest(ctx context.Context, resourceGroupName string, locationName string, failoverGroupName string, options *InstanceFailoverGroupsClientBeginFailoverOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/instanceFailoverGroups/{failoverGroupName}/failover" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if locationName == "" { + return nil, errors.New("parameter locationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{locationName}", url.PathEscape(locationName)) + if failoverGroupName == "" { + return nil, errors.New("parameter failoverGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{failoverGroupName}", url.PathEscape(failoverGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginForceFailoverAllowDataLoss - Fails over from the current primary managed instance to this managed instance. This operation +// might result in data loss. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - locationName - The name of the region where the resource is located. +// - failoverGroupName - The name of the failover group. +// - options - InstanceFailoverGroupsClientBeginForceFailoverAllowDataLossOptions contains the optional parameters for the InstanceFailoverGroupsClient.BeginForceFailoverAllowDataLoss +// method. +func (client *InstanceFailoverGroupsClient) BeginForceFailoverAllowDataLoss(ctx context.Context, resourceGroupName string, locationName string, failoverGroupName string, options *InstanceFailoverGroupsClientBeginForceFailoverAllowDataLossOptions) (*runtime.Poller[InstanceFailoverGroupsClientForceFailoverAllowDataLossResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.forceFailoverAllowDataLoss(ctx, resourceGroupName, locationName, failoverGroupName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[InstanceFailoverGroupsClientForceFailoverAllowDataLossResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[InstanceFailoverGroupsClientForceFailoverAllowDataLossResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// ForceFailoverAllowDataLoss - Fails over from the current primary managed instance to this managed instance. This operation +// might result in data loss. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +func (client *InstanceFailoverGroupsClient) forceFailoverAllowDataLoss(ctx context.Context, resourceGroupName string, locationName string, failoverGroupName string, options *InstanceFailoverGroupsClientBeginForceFailoverAllowDataLossOptions) (*http.Response, error) { + var err error + const operationName = "InstanceFailoverGroupsClient.BeginForceFailoverAllowDataLoss" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.forceFailoverAllowDataLossCreateRequest(ctx, resourceGroupName, locationName, failoverGroupName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// forceFailoverAllowDataLossCreateRequest creates the ForceFailoverAllowDataLoss request. +func (client *InstanceFailoverGroupsClient) forceFailoverAllowDataLossCreateRequest(ctx context.Context, resourceGroupName string, locationName string, failoverGroupName string, options *InstanceFailoverGroupsClientBeginForceFailoverAllowDataLossOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/instanceFailoverGroups/{failoverGroupName}/forceFailoverAllowDataLoss" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if locationName == "" { + return nil, errors.New("parameter locationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{locationName}", url.PathEscape(locationName)) + if failoverGroupName == "" { + return nil, errors.New("parameter failoverGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{failoverGroupName}", url.PathEscape(failoverGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets a failover group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - locationName - The name of the region where the resource is located. +// - failoverGroupName - The name of the failover group. +// - options - InstanceFailoverGroupsClientGetOptions contains the optional parameters for the InstanceFailoverGroupsClient.Get +// method. +func (client *InstanceFailoverGroupsClient) Get(ctx context.Context, resourceGroupName string, locationName string, failoverGroupName string, options *InstanceFailoverGroupsClientGetOptions) (InstanceFailoverGroupsClientGetResponse, error) { + var err error + const operationName = "InstanceFailoverGroupsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, locationName, failoverGroupName, options) + if err != nil { + return InstanceFailoverGroupsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return InstanceFailoverGroupsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return InstanceFailoverGroupsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *InstanceFailoverGroupsClient) getCreateRequest(ctx context.Context, resourceGroupName string, locationName string, failoverGroupName string, options *InstanceFailoverGroupsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/instanceFailoverGroups/{failoverGroupName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if locationName == "" { + return nil, errors.New("parameter locationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{locationName}", url.PathEscape(locationName)) + if failoverGroupName == "" { + return nil, errors.New("parameter failoverGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{failoverGroupName}", url.PathEscape(failoverGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *InstanceFailoverGroupsClient) getHandleResponse(resp *http.Response) (InstanceFailoverGroupsClientGetResponse, error) { + result := InstanceFailoverGroupsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.InstanceFailoverGroup); err != nil { + return InstanceFailoverGroupsClientGetResponse{}, err + } + return result, nil +} + +// NewListByLocationPager - Lists the failover groups in a location. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - locationName - The name of the region where the resource is located. +// - options - InstanceFailoverGroupsClientListByLocationOptions contains the optional parameters for the InstanceFailoverGroupsClient.NewListByLocationPager +// method. +func (client *InstanceFailoverGroupsClient) NewListByLocationPager(resourceGroupName string, locationName string, options *InstanceFailoverGroupsClientListByLocationOptions) *runtime.Pager[InstanceFailoverGroupsClientListByLocationResponse] { + return runtime.NewPager(runtime.PagingHandler[InstanceFailoverGroupsClientListByLocationResponse]{ + More: func(page InstanceFailoverGroupsClientListByLocationResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *InstanceFailoverGroupsClientListByLocationResponse) (InstanceFailoverGroupsClientListByLocationResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "InstanceFailoverGroupsClient.NewListByLocationPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByLocationCreateRequest(ctx, resourceGroupName, locationName, options) + }, nil) + if err != nil { + return InstanceFailoverGroupsClientListByLocationResponse{}, err + } + return client.listByLocationHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByLocationCreateRequest creates the ListByLocation request. +func (client *InstanceFailoverGroupsClient) listByLocationCreateRequest(ctx context.Context, resourceGroupName string, locationName string, options *InstanceFailoverGroupsClientListByLocationOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/instanceFailoverGroups" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if locationName == "" { + return nil, errors.New("parameter locationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{locationName}", url.PathEscape(locationName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByLocationHandleResponse handles the ListByLocation response. +func (client *InstanceFailoverGroupsClient) listByLocationHandleResponse(resp *http.Response) (InstanceFailoverGroupsClientListByLocationResponse, error) { + result := InstanceFailoverGroupsClientListByLocationResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.InstanceFailoverGroupListResult); err != nil { + return InstanceFailoverGroupsClientListByLocationResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/instancepools_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/instancepools_client.go new file mode 100644 index 000000000..80d7a62d1 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/instancepools_client.go @@ -0,0 +1,462 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// InstancePoolsClient contains the methods for the InstancePools group. +// Don't use this type directly, use NewInstancePoolsClient() instead. +type InstancePoolsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewInstancePoolsClient creates a new instance of InstancePoolsClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewInstancePoolsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*InstancePoolsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &InstancePoolsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates or updates an instance pool. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - instancePoolName - The name of the instance pool to be created or updated. +// - parameters - The requested instance pool resource state. +// - options - InstancePoolsClientBeginCreateOrUpdateOptions contains the optional parameters for the InstancePoolsClient.BeginCreateOrUpdate +// method. +func (client *InstancePoolsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, instancePoolName string, parameters InstancePool, options *InstancePoolsClientBeginCreateOrUpdateOptions) (*runtime.Poller[InstancePoolsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, instancePoolName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[InstancePoolsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[InstancePoolsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates or updates an instance pool. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +func (client *InstancePoolsClient) createOrUpdate(ctx context.Context, resourceGroupName string, instancePoolName string, parameters InstancePool, options *InstancePoolsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "InstancePoolsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, instancePoolName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *InstancePoolsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, instancePoolName string, parameters InstancePool, options *InstancePoolsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if instancePoolName == "" { + return nil, errors.New("parameter instancePoolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{instancePoolName}", url.PathEscape(instancePoolName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes an instance pool +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - instancePoolName - The name of the instance pool to be deleted +// - options - InstancePoolsClientBeginDeleteOptions contains the optional parameters for the InstancePoolsClient.BeginDelete +// method. +func (client *InstancePoolsClient) BeginDelete(ctx context.Context, resourceGroupName string, instancePoolName string, options *InstancePoolsClientBeginDeleteOptions) (*runtime.Poller[InstancePoolsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, instancePoolName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[InstancePoolsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[InstancePoolsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes an instance pool +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +func (client *InstancePoolsClient) deleteOperation(ctx context.Context, resourceGroupName string, instancePoolName string, options *InstancePoolsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "InstancePoolsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, instancePoolName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *InstancePoolsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, instancePoolName string, options *InstancePoolsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if instancePoolName == "" { + return nil, errors.New("parameter instancePoolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{instancePoolName}", url.PathEscape(instancePoolName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + return req, nil +} + +// Get - Gets an instance pool. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - instancePoolName - The name of the instance pool to be retrieved. +// - options - InstancePoolsClientGetOptions contains the optional parameters for the InstancePoolsClient.Get method. +func (client *InstancePoolsClient) Get(ctx context.Context, resourceGroupName string, instancePoolName string, options *InstancePoolsClientGetOptions) (InstancePoolsClientGetResponse, error) { + var err error + const operationName = "InstancePoolsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, instancePoolName, options) + if err != nil { + return InstancePoolsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return InstancePoolsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return InstancePoolsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *InstancePoolsClient) getCreateRequest(ctx context.Context, resourceGroupName string, instancePoolName string, options *InstancePoolsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if instancePoolName == "" { + return nil, errors.New("parameter instancePoolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{instancePoolName}", url.PathEscape(instancePoolName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *InstancePoolsClient) getHandleResponse(resp *http.Response) (InstancePoolsClientGetResponse, error) { + result := InstancePoolsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.InstancePool); err != nil { + return InstancePoolsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Gets a list of all instance pools in the subscription. +// +// Generated from API version 2020-11-01-preview +// - options - InstancePoolsClientListOptions contains the optional parameters for the InstancePoolsClient.NewListPager method. +func (client *InstancePoolsClient) NewListPager(options *InstancePoolsClientListOptions) *runtime.Pager[InstancePoolsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[InstancePoolsClientListResponse]{ + More: func(page InstancePoolsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *InstancePoolsClientListResponse) (InstancePoolsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "InstancePoolsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) + if err != nil { + return InstancePoolsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *InstancePoolsClient) listCreateRequest(ctx context.Context, options *InstancePoolsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/instancePools" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *InstancePoolsClient) listHandleResponse(resp *http.Response) (InstancePoolsClientListResponse, error) { + result := InstancePoolsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.InstancePoolListResult); err != nil { + return InstancePoolsClientListResponse{}, err + } + return result, nil +} + +// NewListByResourceGroupPager - Gets a list of instance pools in the resource group +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - options - InstancePoolsClientListByResourceGroupOptions contains the optional parameters for the InstancePoolsClient.NewListByResourceGroupPager +// method. +func (client *InstancePoolsClient) NewListByResourceGroupPager(resourceGroupName string, options *InstancePoolsClientListByResourceGroupOptions) *runtime.Pager[InstancePoolsClientListByResourceGroupResponse] { + return runtime.NewPager(runtime.PagingHandler[InstancePoolsClientListByResourceGroupResponse]{ + More: func(page InstancePoolsClientListByResourceGroupResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *InstancePoolsClientListByResourceGroupResponse) (InstancePoolsClientListByResourceGroupResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "InstancePoolsClient.NewListByResourceGroupPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + }, nil) + if err != nil { + return InstancePoolsClientListByResourceGroupResponse{}, err + } + return client.listByResourceGroupHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByResourceGroupCreateRequest creates the ListByResourceGroup request. +func (client *InstancePoolsClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *InstancePoolsClientListByResourceGroupOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByResourceGroupHandleResponse handles the ListByResourceGroup response. +func (client *InstancePoolsClient) listByResourceGroupHandleResponse(resp *http.Response) (InstancePoolsClientListByResourceGroupResponse, error) { + result := InstancePoolsClientListByResourceGroupResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.InstancePoolListResult); err != nil { + return InstancePoolsClientListByResourceGroupResponse{}, err + } + return result, nil +} + +// BeginUpdate - Updates an instance pool. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - instancePoolName - The name of the instance pool to be updated. +// - parameters - The requested instance pool resource state. +// - options - InstancePoolsClientBeginUpdateOptions contains the optional parameters for the InstancePoolsClient.BeginUpdate +// method. +func (client *InstancePoolsClient) BeginUpdate(ctx context.Context, resourceGroupName string, instancePoolName string, parameters InstancePoolUpdate, options *InstancePoolsClientBeginUpdateOptions) (*runtime.Poller[InstancePoolsClientUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.update(ctx, resourceGroupName, instancePoolName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[InstancePoolsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[InstancePoolsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Update - Updates an instance pool. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +func (client *InstancePoolsClient) update(ctx context.Context, resourceGroupName string, instancePoolName string, parameters InstancePoolUpdate, options *InstancePoolsClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "InstancePoolsClient.BeginUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, instancePoolName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// updateCreateRequest creates the Update request. +func (client *InstancePoolsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, instancePoolName string, parameters InstancePoolUpdate, options *InstancePoolsClientBeginUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if instancePoolName == "" { + return nil, errors.New("parameter instancePoolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{instancePoolName}", url.PathEscape(instancePoolName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/ipv6firewallrules_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/ipv6firewallrules_client.go new file mode 100644 index 000000000..37c8bda6c --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/ipv6firewallrules_client.go @@ -0,0 +1,315 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// IPv6FirewallRulesClient contains the methods for the IPv6FirewallRules group. +// Don't use this type directly, use NewIPv6FirewallRulesClient() instead. +type IPv6FirewallRulesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewIPv6FirewallRulesClient creates a new instance of IPv6FirewallRulesClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewIPv6FirewallRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*IPv6FirewallRulesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &IPv6FirewallRulesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Creates or updates an IPv6 firewall rule. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - firewallRuleName - The name of the firewall rule. +// - parameters - The required parameters for creating or updating an IPv6 firewall rule. +// - options - IPv6FirewallRulesClientCreateOrUpdateOptions contains the optional parameters for the IPv6FirewallRulesClient.CreateOrUpdate +// method. +func (client *IPv6FirewallRulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, firewallRuleName string, parameters IPv6FirewallRule, options *IPv6FirewallRulesClientCreateOrUpdateOptions) (IPv6FirewallRulesClientCreateOrUpdateResponse, error) { + var err error + const operationName = "IPv6FirewallRulesClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serverName, firewallRuleName, parameters, options) + if err != nil { + return IPv6FirewallRulesClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return IPv6FirewallRulesClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return IPv6FirewallRulesClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *IPv6FirewallRulesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serverName string, firewallRuleName string, parameters IPv6FirewallRule, options *IPv6FirewallRulesClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/ipv6FirewallRules/{firewallRuleName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if firewallRuleName == "" { + return nil, errors.New("parameter firewallRuleName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{firewallRuleName}", url.PathEscape(firewallRuleName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *IPv6FirewallRulesClient) createOrUpdateHandleResponse(resp *http.Response) (IPv6FirewallRulesClientCreateOrUpdateResponse, error) { + result := IPv6FirewallRulesClientCreateOrUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.IPv6FirewallRule); err != nil { + return IPv6FirewallRulesClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// Delete - Deletes an IPv6 firewall rule. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - firewallRuleName - The name of the firewall rule. +// - options - IPv6FirewallRulesClientDeleteOptions contains the optional parameters for the IPv6FirewallRulesClient.Delete +// method. +func (client *IPv6FirewallRulesClient) Delete(ctx context.Context, resourceGroupName string, serverName string, firewallRuleName string, options *IPv6FirewallRulesClientDeleteOptions) (IPv6FirewallRulesClientDeleteResponse, error) { + var err error + const operationName = "IPv6FirewallRulesClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serverName, firewallRuleName, options) + if err != nil { + return IPv6FirewallRulesClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return IPv6FirewallRulesClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return IPv6FirewallRulesClientDeleteResponse{}, err + } + return IPv6FirewallRulesClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *IPv6FirewallRulesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serverName string, firewallRuleName string, options *IPv6FirewallRulesClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/ipv6FirewallRules/{firewallRuleName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if firewallRuleName == "" { + return nil, errors.New("parameter firewallRuleName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{firewallRuleName}", url.PathEscape(firewallRuleName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + return req, nil +} + +// Get - Gets an IPv6 firewall rule. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - firewallRuleName - The name of the firewall rule. +// - options - IPv6FirewallRulesClientGetOptions contains the optional parameters for the IPv6FirewallRulesClient.Get method. +func (client *IPv6FirewallRulesClient) Get(ctx context.Context, resourceGroupName string, serverName string, firewallRuleName string, options *IPv6FirewallRulesClientGetOptions) (IPv6FirewallRulesClientGetResponse, error) { + var err error + const operationName = "IPv6FirewallRulesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serverName, firewallRuleName, options) + if err != nil { + return IPv6FirewallRulesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return IPv6FirewallRulesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return IPv6FirewallRulesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *IPv6FirewallRulesClient) getCreateRequest(ctx context.Context, resourceGroupName string, serverName string, firewallRuleName string, options *IPv6FirewallRulesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/ipv6FirewallRules/{firewallRuleName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if firewallRuleName == "" { + return nil, errors.New("parameter firewallRuleName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{firewallRuleName}", url.PathEscape(firewallRuleName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *IPv6FirewallRulesClient) getHandleResponse(resp *http.Response) (IPv6FirewallRulesClientGetResponse, error) { + result := IPv6FirewallRulesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.IPv6FirewallRule); err != nil { + return IPv6FirewallRulesClientGetResponse{}, err + } + return result, nil +} + +// NewListByServerPager - Gets a list of IPv6 firewall rules. +// +// Generated from API version 2021-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - options - IPv6FirewallRulesClientListByServerOptions contains the optional parameters for the IPv6FirewallRulesClient.NewListByServerPager +// method. +func (client *IPv6FirewallRulesClient) NewListByServerPager(resourceGroupName string, serverName string, options *IPv6FirewallRulesClientListByServerOptions) *runtime.Pager[IPv6FirewallRulesClientListByServerResponse] { + return runtime.NewPager(runtime.PagingHandler[IPv6FirewallRulesClientListByServerResponse]{ + More: func(page IPv6FirewallRulesClientListByServerResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *IPv6FirewallRulesClientListByServerResponse) (IPv6FirewallRulesClientListByServerResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "IPv6FirewallRulesClient.NewListByServerPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByServerCreateRequest(ctx, resourceGroupName, serverName, options) + }, nil) + if err != nil { + return IPv6FirewallRulesClientListByServerResponse{}, err + } + return client.listByServerHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByServerCreateRequest creates the ListByServer request. +func (client *IPv6FirewallRulesClient) listByServerCreateRequest(ctx context.Context, resourceGroupName string, serverName string, options *IPv6FirewallRulesClientListByServerOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/ipv6FirewallRules" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByServerHandleResponse handles the ListByServer response. +func (client *IPv6FirewallRulesClient) listByServerHandleResponse(resp *http.Response) (IPv6FirewallRulesClientListByServerResponse, error) { + result := IPv6FirewallRulesClientListByServerResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.IPv6FirewallRuleListResult); err != nil { + return IPv6FirewallRulesClientListByServerResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/jobagents_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/jobagents_client.go new file mode 100644 index 000000000..093c9c2aa --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/jobagents_client.go @@ -0,0 +1,431 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// JobAgentsClient contains the methods for the JobAgents group. +// Don't use this type directly, use NewJobAgentsClient() instead. +type JobAgentsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewJobAgentsClient creates a new instance of JobAgentsClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewJobAgentsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*JobAgentsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &JobAgentsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates or updates a job agent. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - jobAgentName - The name of the job agent to be created or updated. +// - parameters - The requested job agent resource state. +// - options - JobAgentsClientBeginCreateOrUpdateOptions contains the optional parameters for the JobAgentsClient.BeginCreateOrUpdate +// method. +func (client *JobAgentsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, parameters JobAgent, options *JobAgentsClientBeginCreateOrUpdateOptions) (*runtime.Poller[JobAgentsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, serverName, jobAgentName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[JobAgentsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[JobAgentsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates or updates a job agent. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +func (client *JobAgentsClient) createOrUpdate(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, parameters JobAgent, options *JobAgentsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "JobAgentsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serverName, jobAgentName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *JobAgentsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, parameters JobAgent, options *JobAgentsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if jobAgentName == "" { + return nil, errors.New("parameter jobAgentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{jobAgentName}", url.PathEscape(jobAgentName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes a job agent. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - jobAgentName - The name of the job agent to be deleted. +// - options - JobAgentsClientBeginDeleteOptions contains the optional parameters for the JobAgentsClient.BeginDelete method. +func (client *JobAgentsClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, options *JobAgentsClientBeginDeleteOptions) (*runtime.Poller[JobAgentsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, serverName, jobAgentName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[JobAgentsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[JobAgentsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes a job agent. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +func (client *JobAgentsClient) deleteOperation(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, options *JobAgentsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "JobAgentsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serverName, jobAgentName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *JobAgentsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, options *JobAgentsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if jobAgentName == "" { + return nil, errors.New("parameter jobAgentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{jobAgentName}", url.PathEscape(jobAgentName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + return req, nil +} + +// Get - Gets a job agent. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - jobAgentName - The name of the job agent to be retrieved. +// - options - JobAgentsClientGetOptions contains the optional parameters for the JobAgentsClient.Get method. +func (client *JobAgentsClient) Get(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, options *JobAgentsClientGetOptions) (JobAgentsClientGetResponse, error) { + var err error + const operationName = "JobAgentsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serverName, jobAgentName, options) + if err != nil { + return JobAgentsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return JobAgentsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return JobAgentsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *JobAgentsClient) getCreateRequest(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, options *JobAgentsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if jobAgentName == "" { + return nil, errors.New("parameter jobAgentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{jobAgentName}", url.PathEscape(jobAgentName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *JobAgentsClient) getHandleResponse(resp *http.Response) (JobAgentsClientGetResponse, error) { + result := JobAgentsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.JobAgent); err != nil { + return JobAgentsClientGetResponse{}, err + } + return result, nil +} + +// NewListByServerPager - Gets a list of job agents in a server. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - options - JobAgentsClientListByServerOptions contains the optional parameters for the JobAgentsClient.NewListByServerPager +// method. +func (client *JobAgentsClient) NewListByServerPager(resourceGroupName string, serverName string, options *JobAgentsClientListByServerOptions) *runtime.Pager[JobAgentsClientListByServerResponse] { + return runtime.NewPager(runtime.PagingHandler[JobAgentsClientListByServerResponse]{ + More: func(page JobAgentsClientListByServerResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *JobAgentsClientListByServerResponse) (JobAgentsClientListByServerResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "JobAgentsClient.NewListByServerPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByServerCreateRequest(ctx, resourceGroupName, serverName, options) + }, nil) + if err != nil { + return JobAgentsClientListByServerResponse{}, err + } + return client.listByServerHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByServerCreateRequest creates the ListByServer request. +func (client *JobAgentsClient) listByServerCreateRequest(ctx context.Context, resourceGroupName string, serverName string, options *JobAgentsClientListByServerOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByServerHandleResponse handles the ListByServer response. +func (client *JobAgentsClient) listByServerHandleResponse(resp *http.Response) (JobAgentsClientListByServerResponse, error) { + result := JobAgentsClientListByServerResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.JobAgentListResult); err != nil { + return JobAgentsClientListByServerResponse{}, err + } + return result, nil +} + +// BeginUpdate - Updates a job agent. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - jobAgentName - The name of the job agent to be updated. +// - parameters - The update to the job agent. +// - options - JobAgentsClientBeginUpdateOptions contains the optional parameters for the JobAgentsClient.BeginUpdate method. +func (client *JobAgentsClient) BeginUpdate(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, parameters JobAgentUpdate, options *JobAgentsClientBeginUpdateOptions) (*runtime.Poller[JobAgentsClientUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.update(ctx, resourceGroupName, serverName, jobAgentName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[JobAgentsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[JobAgentsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Update - Updates a job agent. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +func (client *JobAgentsClient) update(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, parameters JobAgentUpdate, options *JobAgentsClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "JobAgentsClient.BeginUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, serverName, jobAgentName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// updateCreateRequest creates the Update request. +func (client *JobAgentsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, parameters JobAgentUpdate, options *JobAgentsClientBeginUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if jobAgentName == "" { + return nil, errors.New("parameter jobAgentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{jobAgentName}", url.PathEscape(jobAgentName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/jobcredentials_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/jobcredentials_client.go new file mode 100644 index 000000000..e19fea902 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/jobcredentials_client.go @@ -0,0 +1,334 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// JobCredentialsClient contains the methods for the JobCredentials group. +// Don't use this type directly, use NewJobCredentialsClient() instead. +type JobCredentialsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewJobCredentialsClient creates a new instance of JobCredentialsClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewJobCredentialsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*JobCredentialsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &JobCredentialsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Creates or updates a job credential. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - jobAgentName - The name of the job agent. +// - credentialName - The name of the credential. +// - parameters - The requested job credential state. +// - options - JobCredentialsClientCreateOrUpdateOptions contains the optional parameters for the JobCredentialsClient.CreateOrUpdate +// method. +func (client *JobCredentialsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, credentialName string, parameters JobCredential, options *JobCredentialsClientCreateOrUpdateOptions) (JobCredentialsClientCreateOrUpdateResponse, error) { + var err error + const operationName = "JobCredentialsClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serverName, jobAgentName, credentialName, parameters, options) + if err != nil { + return JobCredentialsClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return JobCredentialsClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return JobCredentialsClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *JobCredentialsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, credentialName string, parameters JobCredential, options *JobCredentialsClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/credentials/{credentialName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if jobAgentName == "" { + return nil, errors.New("parameter jobAgentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{jobAgentName}", url.PathEscape(jobAgentName)) + if credentialName == "" { + return nil, errors.New("parameter credentialName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{credentialName}", url.PathEscape(credentialName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *JobCredentialsClient) createOrUpdateHandleResponse(resp *http.Response) (JobCredentialsClientCreateOrUpdateResponse, error) { + result := JobCredentialsClientCreateOrUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.JobCredential); err != nil { + return JobCredentialsClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// Delete - Deletes a job credential. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - jobAgentName - The name of the job agent. +// - credentialName - The name of the credential. +// - options - JobCredentialsClientDeleteOptions contains the optional parameters for the JobCredentialsClient.Delete method. +func (client *JobCredentialsClient) Delete(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, credentialName string, options *JobCredentialsClientDeleteOptions) (JobCredentialsClientDeleteResponse, error) { + var err error + const operationName = "JobCredentialsClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serverName, jobAgentName, credentialName, options) + if err != nil { + return JobCredentialsClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return JobCredentialsClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return JobCredentialsClientDeleteResponse{}, err + } + return JobCredentialsClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *JobCredentialsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, credentialName string, options *JobCredentialsClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/credentials/{credentialName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if jobAgentName == "" { + return nil, errors.New("parameter jobAgentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{jobAgentName}", url.PathEscape(jobAgentName)) + if credentialName == "" { + return nil, errors.New("parameter credentialName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{credentialName}", url.PathEscape(credentialName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + return req, nil +} + +// Get - Gets a jobs credential. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - jobAgentName - The name of the job agent. +// - credentialName - The name of the credential. +// - options - JobCredentialsClientGetOptions contains the optional parameters for the JobCredentialsClient.Get method. +func (client *JobCredentialsClient) Get(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, credentialName string, options *JobCredentialsClientGetOptions) (JobCredentialsClientGetResponse, error) { + var err error + const operationName = "JobCredentialsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serverName, jobAgentName, credentialName, options) + if err != nil { + return JobCredentialsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return JobCredentialsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return JobCredentialsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *JobCredentialsClient) getCreateRequest(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, credentialName string, options *JobCredentialsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/credentials/{credentialName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if jobAgentName == "" { + return nil, errors.New("parameter jobAgentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{jobAgentName}", url.PathEscape(jobAgentName)) + if credentialName == "" { + return nil, errors.New("parameter credentialName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{credentialName}", url.PathEscape(credentialName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *JobCredentialsClient) getHandleResponse(resp *http.Response) (JobCredentialsClientGetResponse, error) { + result := JobCredentialsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.JobCredential); err != nil { + return JobCredentialsClientGetResponse{}, err + } + return result, nil +} + +// NewListByAgentPager - Gets a list of jobs credentials. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - jobAgentName - The name of the job agent. +// - options - JobCredentialsClientListByAgentOptions contains the optional parameters for the JobCredentialsClient.NewListByAgentPager +// method. +func (client *JobCredentialsClient) NewListByAgentPager(resourceGroupName string, serverName string, jobAgentName string, options *JobCredentialsClientListByAgentOptions) *runtime.Pager[JobCredentialsClientListByAgentResponse] { + return runtime.NewPager(runtime.PagingHandler[JobCredentialsClientListByAgentResponse]{ + More: func(page JobCredentialsClientListByAgentResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *JobCredentialsClientListByAgentResponse) (JobCredentialsClientListByAgentResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "JobCredentialsClient.NewListByAgentPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByAgentCreateRequest(ctx, resourceGroupName, serverName, jobAgentName, options) + }, nil) + if err != nil { + return JobCredentialsClientListByAgentResponse{}, err + } + return client.listByAgentHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByAgentCreateRequest creates the ListByAgent request. +func (client *JobCredentialsClient) listByAgentCreateRequest(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, options *JobCredentialsClientListByAgentOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/credentials" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if jobAgentName == "" { + return nil, errors.New("parameter jobAgentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{jobAgentName}", url.PathEscape(jobAgentName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByAgentHandleResponse handles the ListByAgent response. +func (client *JobCredentialsClient) listByAgentHandleResponse(resp *http.Response) (JobCredentialsClientListByAgentResponse, error) { + result := JobCredentialsClientListByAgentResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.JobCredentialListResult); err != nil { + return JobCredentialsClientListByAgentResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/jobexecutions_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/jobexecutions_client.go new file mode 100644 index 000000000..1c51ca3c0 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/jobexecutions_client.go @@ -0,0 +1,563 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" + "time" +) + +// JobExecutionsClient contains the methods for the JobExecutions group. +// Don't use this type directly, use NewJobExecutionsClient() instead. +type JobExecutionsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewJobExecutionsClient creates a new instance of JobExecutionsClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewJobExecutionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*JobExecutionsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &JobExecutionsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Cancel - Requests cancellation of a job execution. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - jobAgentName - The name of the job agent. +// - jobName - The name of the job. +// - jobExecutionID - The id of the job execution to cancel. +// - options - JobExecutionsClientCancelOptions contains the optional parameters for the JobExecutionsClient.Cancel method. +func (client *JobExecutionsClient) Cancel(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobExecutionID string, options *JobExecutionsClientCancelOptions) (JobExecutionsClientCancelResponse, error) { + var err error + const operationName = "JobExecutionsClient.Cancel" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.cancelCreateRequest(ctx, resourceGroupName, serverName, jobAgentName, jobName, jobExecutionID, options) + if err != nil { + return JobExecutionsClientCancelResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return JobExecutionsClientCancelResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return JobExecutionsClientCancelResponse{}, err + } + return JobExecutionsClientCancelResponse{}, nil +} + +// cancelCreateRequest creates the Cancel request. +func (client *JobExecutionsClient) cancelCreateRequest(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobExecutionID string, options *JobExecutionsClientCancelOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/cancel" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if jobAgentName == "" { + return nil, errors.New("parameter jobAgentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{jobAgentName}", url.PathEscape(jobAgentName)) + if jobName == "" { + return nil, errors.New("parameter jobName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{jobName}", url.PathEscape(jobName)) + if jobExecutionID == "" { + return nil, errors.New("parameter jobExecutionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{jobExecutionId}", url.PathEscape(jobExecutionID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + return req, nil +} + +// BeginCreate - Starts an elastic job execution. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - jobAgentName - The name of the job agent. +// - jobName - The name of the job to get. +// - options - JobExecutionsClientBeginCreateOptions contains the optional parameters for the JobExecutionsClient.BeginCreate +// method. +func (client *JobExecutionsClient) BeginCreate(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, options *JobExecutionsClientBeginCreateOptions) (*runtime.Poller[JobExecutionsClientCreateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.create(ctx, resourceGroupName, serverName, jobAgentName, jobName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[JobExecutionsClientCreateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[JobExecutionsClientCreateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Create - Starts an elastic job execution. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +func (client *JobExecutionsClient) create(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, options *JobExecutionsClientBeginCreateOptions) (*http.Response, error) { + var err error + const operationName = "JobExecutionsClient.BeginCreate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createCreateRequest(ctx, resourceGroupName, serverName, jobAgentName, jobName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createCreateRequest creates the Create request. +func (client *JobExecutionsClient) createCreateRequest(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, options *JobExecutionsClientBeginCreateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/start" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if jobAgentName == "" { + return nil, errors.New("parameter jobAgentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{jobAgentName}", url.PathEscape(jobAgentName)) + if jobName == "" { + return nil, errors.New("parameter jobName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{jobName}", url.PathEscape(jobName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginCreateOrUpdate - Creates or updates a job execution. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - jobAgentName - The name of the job agent. +// - jobName - The name of the job to get. +// - jobExecutionID - The job execution id to create the job execution under. +// - options - JobExecutionsClientBeginCreateOrUpdateOptions contains the optional parameters for the JobExecutionsClient.BeginCreateOrUpdate +// method. +func (client *JobExecutionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobExecutionID string, options *JobExecutionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[JobExecutionsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, serverName, jobAgentName, jobName, jobExecutionID, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[JobExecutionsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[JobExecutionsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates or updates a job execution. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +func (client *JobExecutionsClient) createOrUpdate(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobExecutionID string, options *JobExecutionsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "JobExecutionsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serverName, jobAgentName, jobName, jobExecutionID, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *JobExecutionsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobExecutionID string, options *JobExecutionsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if jobAgentName == "" { + return nil, errors.New("parameter jobAgentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{jobAgentName}", url.PathEscape(jobAgentName)) + if jobName == "" { + return nil, errors.New("parameter jobName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{jobName}", url.PathEscape(jobName)) + if jobExecutionID == "" { + return nil, errors.New("parameter jobExecutionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{jobExecutionId}", url.PathEscape(jobExecutionID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets a job execution. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - jobAgentName - The name of the job agent. +// - jobName - The name of the job. +// - jobExecutionID - The id of the job execution +// - options - JobExecutionsClientGetOptions contains the optional parameters for the JobExecutionsClient.Get method. +func (client *JobExecutionsClient) Get(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobExecutionID string, options *JobExecutionsClientGetOptions) (JobExecutionsClientGetResponse, error) { + var err error + const operationName = "JobExecutionsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serverName, jobAgentName, jobName, jobExecutionID, options) + if err != nil { + return JobExecutionsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return JobExecutionsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return JobExecutionsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *JobExecutionsClient) getCreateRequest(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobExecutionID string, options *JobExecutionsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if jobAgentName == "" { + return nil, errors.New("parameter jobAgentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{jobAgentName}", url.PathEscape(jobAgentName)) + if jobName == "" { + return nil, errors.New("parameter jobName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{jobName}", url.PathEscape(jobName)) + if jobExecutionID == "" { + return nil, errors.New("parameter jobExecutionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{jobExecutionId}", url.PathEscape(jobExecutionID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *JobExecutionsClient) getHandleResponse(resp *http.Response) (JobExecutionsClientGetResponse, error) { + result := JobExecutionsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.JobExecution); err != nil { + return JobExecutionsClientGetResponse{}, err + } + return result, nil +} + +// NewListByAgentPager - Lists all executions in a job agent. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - jobAgentName - The name of the job agent. +// - options - JobExecutionsClientListByAgentOptions contains the optional parameters for the JobExecutionsClient.NewListByAgentPager +// method. +func (client *JobExecutionsClient) NewListByAgentPager(resourceGroupName string, serverName string, jobAgentName string, options *JobExecutionsClientListByAgentOptions) *runtime.Pager[JobExecutionsClientListByAgentResponse] { + return runtime.NewPager(runtime.PagingHandler[JobExecutionsClientListByAgentResponse]{ + More: func(page JobExecutionsClientListByAgentResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *JobExecutionsClientListByAgentResponse) (JobExecutionsClientListByAgentResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "JobExecutionsClient.NewListByAgentPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByAgentCreateRequest(ctx, resourceGroupName, serverName, jobAgentName, options) + }, nil) + if err != nil { + return JobExecutionsClientListByAgentResponse{}, err + } + return client.listByAgentHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByAgentCreateRequest creates the ListByAgent request. +func (client *JobExecutionsClient) listByAgentCreateRequest(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, options *JobExecutionsClientListByAgentOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/executions" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if jobAgentName == "" { + return nil, errors.New("parameter jobAgentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{jobAgentName}", url.PathEscape(jobAgentName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.CreateTimeMin != nil { + reqQP.Set("createTimeMin", options.CreateTimeMin.Format(time.RFC3339Nano)) + } + if options != nil && options.CreateTimeMax != nil { + reqQP.Set("createTimeMax", options.CreateTimeMax.Format(time.RFC3339Nano)) + } + if options != nil && options.EndTimeMin != nil { + reqQP.Set("endTimeMin", options.EndTimeMin.Format(time.RFC3339Nano)) + } + if options != nil && options.EndTimeMax != nil { + reqQP.Set("endTimeMax", options.EndTimeMax.Format(time.RFC3339Nano)) + } + if options != nil && options.IsActive != nil { + reqQP.Set("isActive", strconv.FormatBool(*options.IsActive)) + } + if options != nil && options.Skip != nil { + reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) + } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByAgentHandleResponse handles the ListByAgent response. +func (client *JobExecutionsClient) listByAgentHandleResponse(resp *http.Response) (JobExecutionsClientListByAgentResponse, error) { + result := JobExecutionsClientListByAgentResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.JobExecutionListResult); err != nil { + return JobExecutionsClientListByAgentResponse{}, err + } + return result, nil +} + +// NewListByJobPager - Lists a job's executions. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - jobAgentName - The name of the job agent. +// - jobName - The name of the job to get. +// - options - JobExecutionsClientListByJobOptions contains the optional parameters for the JobExecutionsClient.NewListByJobPager +// method. +func (client *JobExecutionsClient) NewListByJobPager(resourceGroupName string, serverName string, jobAgentName string, jobName string, options *JobExecutionsClientListByJobOptions) *runtime.Pager[JobExecutionsClientListByJobResponse] { + return runtime.NewPager(runtime.PagingHandler[JobExecutionsClientListByJobResponse]{ + More: func(page JobExecutionsClientListByJobResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *JobExecutionsClientListByJobResponse) (JobExecutionsClientListByJobResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "JobExecutionsClient.NewListByJobPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByJobCreateRequest(ctx, resourceGroupName, serverName, jobAgentName, jobName, options) + }, nil) + if err != nil { + return JobExecutionsClientListByJobResponse{}, err + } + return client.listByJobHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByJobCreateRequest creates the ListByJob request. +func (client *JobExecutionsClient) listByJobCreateRequest(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, options *JobExecutionsClientListByJobOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if jobAgentName == "" { + return nil, errors.New("parameter jobAgentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{jobAgentName}", url.PathEscape(jobAgentName)) + if jobName == "" { + return nil, errors.New("parameter jobName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{jobName}", url.PathEscape(jobName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.CreateTimeMin != nil { + reqQP.Set("createTimeMin", options.CreateTimeMin.Format(time.RFC3339Nano)) + } + if options != nil && options.CreateTimeMax != nil { + reqQP.Set("createTimeMax", options.CreateTimeMax.Format(time.RFC3339Nano)) + } + if options != nil && options.EndTimeMin != nil { + reqQP.Set("endTimeMin", options.EndTimeMin.Format(time.RFC3339Nano)) + } + if options != nil && options.EndTimeMax != nil { + reqQP.Set("endTimeMax", options.EndTimeMax.Format(time.RFC3339Nano)) + } + if options != nil && options.IsActive != nil { + reqQP.Set("isActive", strconv.FormatBool(*options.IsActive)) + } + if options != nil && options.Skip != nil { + reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) + } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByJobHandleResponse handles the ListByJob response. +func (client *JobExecutionsClient) listByJobHandleResponse(resp *http.Response) (JobExecutionsClientListByJobResponse, error) { + result := JobExecutionsClientListByJobResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.JobExecutionListResult); err != nil { + return JobExecutionsClientListByJobResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/jobs_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/jobs_client.go new file mode 100644 index 000000000..6167a5d2b --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/jobs_client.go @@ -0,0 +1,332 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// JobsClient contains the methods for the Jobs group. +// Don't use this type directly, use NewJobsClient() instead. +type JobsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewJobsClient creates a new instance of JobsClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewJobsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*JobsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &JobsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Creates or updates a job. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - jobAgentName - The name of the job agent. +// - jobName - The name of the job to get. +// - parameters - The requested job state. +// - options - JobsClientCreateOrUpdateOptions contains the optional parameters for the JobsClient.CreateOrUpdate method. +func (client *JobsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, parameters Job, options *JobsClientCreateOrUpdateOptions) (JobsClientCreateOrUpdateResponse, error) { + var err error + const operationName = "JobsClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serverName, jobAgentName, jobName, parameters, options) + if err != nil { + return JobsClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return JobsClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return JobsClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *JobsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, parameters Job, options *JobsClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if jobAgentName == "" { + return nil, errors.New("parameter jobAgentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{jobAgentName}", url.PathEscape(jobAgentName)) + if jobName == "" { + return nil, errors.New("parameter jobName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{jobName}", url.PathEscape(jobName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *JobsClient) createOrUpdateHandleResponse(resp *http.Response) (JobsClientCreateOrUpdateResponse, error) { + result := JobsClientCreateOrUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Job); err != nil { + return JobsClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// Delete - Deletes a job. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - jobAgentName - The name of the job agent. +// - jobName - The name of the job to delete. +// - options - JobsClientDeleteOptions contains the optional parameters for the JobsClient.Delete method. +func (client *JobsClient) Delete(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, options *JobsClientDeleteOptions) (JobsClientDeleteResponse, error) { + var err error + const operationName = "JobsClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serverName, jobAgentName, jobName, options) + if err != nil { + return JobsClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return JobsClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return JobsClientDeleteResponse{}, err + } + return JobsClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *JobsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, options *JobsClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if jobAgentName == "" { + return nil, errors.New("parameter jobAgentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{jobAgentName}", url.PathEscape(jobAgentName)) + if jobName == "" { + return nil, errors.New("parameter jobName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{jobName}", url.PathEscape(jobName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + return req, nil +} + +// Get - Gets a job. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - jobAgentName - The name of the job agent. +// - jobName - The name of the job to get. +// - options - JobsClientGetOptions contains the optional parameters for the JobsClient.Get method. +func (client *JobsClient) Get(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, options *JobsClientGetOptions) (JobsClientGetResponse, error) { + var err error + const operationName = "JobsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serverName, jobAgentName, jobName, options) + if err != nil { + return JobsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return JobsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return JobsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *JobsClient) getCreateRequest(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, options *JobsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if jobAgentName == "" { + return nil, errors.New("parameter jobAgentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{jobAgentName}", url.PathEscape(jobAgentName)) + if jobName == "" { + return nil, errors.New("parameter jobName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{jobName}", url.PathEscape(jobName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *JobsClient) getHandleResponse(resp *http.Response) (JobsClientGetResponse, error) { + result := JobsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Job); err != nil { + return JobsClientGetResponse{}, err + } + return result, nil +} + +// NewListByAgentPager - Gets a list of jobs. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - jobAgentName - The name of the job agent. +// - options - JobsClientListByAgentOptions contains the optional parameters for the JobsClient.NewListByAgentPager method. +func (client *JobsClient) NewListByAgentPager(resourceGroupName string, serverName string, jobAgentName string, options *JobsClientListByAgentOptions) *runtime.Pager[JobsClientListByAgentResponse] { + return runtime.NewPager(runtime.PagingHandler[JobsClientListByAgentResponse]{ + More: func(page JobsClientListByAgentResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *JobsClientListByAgentResponse) (JobsClientListByAgentResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "JobsClient.NewListByAgentPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByAgentCreateRequest(ctx, resourceGroupName, serverName, jobAgentName, options) + }, nil) + if err != nil { + return JobsClientListByAgentResponse{}, err + } + return client.listByAgentHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByAgentCreateRequest creates the ListByAgent request. +func (client *JobsClient) listByAgentCreateRequest(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, options *JobsClientListByAgentOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if jobAgentName == "" { + return nil, errors.New("parameter jobAgentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{jobAgentName}", url.PathEscape(jobAgentName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByAgentHandleResponse handles the ListByAgent response. +func (client *JobsClient) listByAgentHandleResponse(resp *http.Response) (JobsClientListByAgentResponse, error) { + result := JobsClientListByAgentResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.JobListResult); err != nil { + return JobsClientListByAgentResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/jobstepexecutions_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/jobstepexecutions_client.go new file mode 100644 index 000000000..6aef86434 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/jobstepexecutions_client.go @@ -0,0 +1,233 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" + "time" +) + +// JobStepExecutionsClient contains the methods for the JobStepExecutions group. +// Don't use this type directly, use NewJobStepExecutionsClient() instead. +type JobStepExecutionsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewJobStepExecutionsClient creates a new instance of JobStepExecutionsClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewJobStepExecutionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*JobStepExecutionsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &JobStepExecutionsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Gets a step execution of a job execution. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - jobAgentName - The name of the job agent. +// - jobName - The name of the job to get. +// - jobExecutionID - The unique id of the job execution +// - stepName - The name of the step. +// - options - JobStepExecutionsClientGetOptions contains the optional parameters for the JobStepExecutionsClient.Get method. +func (client *JobStepExecutionsClient) Get(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobExecutionID string, stepName string, options *JobStepExecutionsClientGetOptions) (JobStepExecutionsClientGetResponse, error) { + var err error + const operationName = "JobStepExecutionsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serverName, jobAgentName, jobName, jobExecutionID, stepName, options) + if err != nil { + return JobStepExecutionsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return JobStepExecutionsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return JobStepExecutionsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *JobStepExecutionsClient) getCreateRequest(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobExecutionID string, stepName string, options *JobStepExecutionsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/steps/{stepName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if jobAgentName == "" { + return nil, errors.New("parameter jobAgentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{jobAgentName}", url.PathEscape(jobAgentName)) + if jobName == "" { + return nil, errors.New("parameter jobName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{jobName}", url.PathEscape(jobName)) + if jobExecutionID == "" { + return nil, errors.New("parameter jobExecutionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{jobExecutionId}", url.PathEscape(jobExecutionID)) + if stepName == "" { + return nil, errors.New("parameter stepName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{stepName}", url.PathEscape(stepName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *JobStepExecutionsClient) getHandleResponse(resp *http.Response) (JobStepExecutionsClientGetResponse, error) { + result := JobStepExecutionsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.JobExecution); err != nil { + return JobStepExecutionsClientGetResponse{}, err + } + return result, nil +} + +// NewListByJobExecutionPager - Lists the step executions of a job execution. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - jobAgentName - The name of the job agent. +// - jobName - The name of the job to get. +// - jobExecutionID - The id of the job execution +// - options - JobStepExecutionsClientListByJobExecutionOptions contains the optional parameters for the JobStepExecutionsClient.NewListByJobExecutionPager +// method. +func (client *JobStepExecutionsClient) NewListByJobExecutionPager(resourceGroupName string, serverName string, jobAgentName string, jobName string, jobExecutionID string, options *JobStepExecutionsClientListByJobExecutionOptions) *runtime.Pager[JobStepExecutionsClientListByJobExecutionResponse] { + return runtime.NewPager(runtime.PagingHandler[JobStepExecutionsClientListByJobExecutionResponse]{ + More: func(page JobStepExecutionsClientListByJobExecutionResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *JobStepExecutionsClientListByJobExecutionResponse) (JobStepExecutionsClientListByJobExecutionResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "JobStepExecutionsClient.NewListByJobExecutionPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByJobExecutionCreateRequest(ctx, resourceGroupName, serverName, jobAgentName, jobName, jobExecutionID, options) + }, nil) + if err != nil { + return JobStepExecutionsClientListByJobExecutionResponse{}, err + } + return client.listByJobExecutionHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByJobExecutionCreateRequest creates the ListByJobExecution request. +func (client *JobStepExecutionsClient) listByJobExecutionCreateRequest(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobExecutionID string, options *JobStepExecutionsClientListByJobExecutionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/steps" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if jobAgentName == "" { + return nil, errors.New("parameter jobAgentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{jobAgentName}", url.PathEscape(jobAgentName)) + if jobName == "" { + return nil, errors.New("parameter jobName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{jobName}", url.PathEscape(jobName)) + if jobExecutionID == "" { + return nil, errors.New("parameter jobExecutionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{jobExecutionId}", url.PathEscape(jobExecutionID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.CreateTimeMin != nil { + reqQP.Set("createTimeMin", options.CreateTimeMin.Format(time.RFC3339Nano)) + } + if options != nil && options.CreateTimeMax != nil { + reqQP.Set("createTimeMax", options.CreateTimeMax.Format(time.RFC3339Nano)) + } + if options != nil && options.EndTimeMin != nil { + reqQP.Set("endTimeMin", options.EndTimeMin.Format(time.RFC3339Nano)) + } + if options != nil && options.EndTimeMax != nil { + reqQP.Set("endTimeMax", options.EndTimeMax.Format(time.RFC3339Nano)) + } + if options != nil && options.IsActive != nil { + reqQP.Set("isActive", strconv.FormatBool(*options.IsActive)) + } + if options != nil && options.Skip != nil { + reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) + } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByJobExecutionHandleResponse handles the ListByJobExecution response. +func (client *JobStepExecutionsClient) listByJobExecutionHandleResponse(resp *http.Response) (JobStepExecutionsClientListByJobExecutionResponse, error) { + result := JobStepExecutionsClientListByJobExecutionResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.JobExecutionListResult); err != nil { + return JobStepExecutionsClientListByJobExecutionResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/jobsteps_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/jobsteps_client.go new file mode 100644 index 000000000..ffcd69833 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/jobsteps_client.go @@ -0,0 +1,513 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// JobStepsClient contains the methods for the JobSteps group. +// Don't use this type directly, use NewJobStepsClient() instead. +type JobStepsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewJobStepsClient creates a new instance of JobStepsClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewJobStepsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*JobStepsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &JobStepsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Creates or updates a job step. This will implicitly create a new job version. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - jobAgentName - The name of the job agent. +// - jobName - The name of the job. +// - stepName - The name of the job step. +// - parameters - The requested state of the job step. +// - options - JobStepsClientCreateOrUpdateOptions contains the optional parameters for the JobStepsClient.CreateOrUpdate method. +func (client *JobStepsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, stepName string, parameters JobStep, options *JobStepsClientCreateOrUpdateOptions) (JobStepsClientCreateOrUpdateResponse, error) { + var err error + const operationName = "JobStepsClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serverName, jobAgentName, jobName, stepName, parameters, options) + if err != nil { + return JobStepsClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return JobStepsClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return JobStepsClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *JobStepsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, stepName string, parameters JobStep, options *JobStepsClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/steps/{stepName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if jobAgentName == "" { + return nil, errors.New("parameter jobAgentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{jobAgentName}", url.PathEscape(jobAgentName)) + if jobName == "" { + return nil, errors.New("parameter jobName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{jobName}", url.PathEscape(jobName)) + if stepName == "" { + return nil, errors.New("parameter stepName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{stepName}", url.PathEscape(stepName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *JobStepsClient) createOrUpdateHandleResponse(resp *http.Response) (JobStepsClientCreateOrUpdateResponse, error) { + result := JobStepsClientCreateOrUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.JobStep); err != nil { + return JobStepsClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// Delete - Deletes a job step. This will implicitly create a new job version. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - jobAgentName - The name of the job agent. +// - jobName - The name of the job. +// - stepName - The name of the job step to delete. +// - options - JobStepsClientDeleteOptions contains the optional parameters for the JobStepsClient.Delete method. +func (client *JobStepsClient) Delete(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, stepName string, options *JobStepsClientDeleteOptions) (JobStepsClientDeleteResponse, error) { + var err error + const operationName = "JobStepsClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serverName, jobAgentName, jobName, stepName, options) + if err != nil { + return JobStepsClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return JobStepsClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return JobStepsClientDeleteResponse{}, err + } + return JobStepsClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *JobStepsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, stepName string, options *JobStepsClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/steps/{stepName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if jobAgentName == "" { + return nil, errors.New("parameter jobAgentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{jobAgentName}", url.PathEscape(jobAgentName)) + if jobName == "" { + return nil, errors.New("parameter jobName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{jobName}", url.PathEscape(jobName)) + if stepName == "" { + return nil, errors.New("parameter stepName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{stepName}", url.PathEscape(stepName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + return req, nil +} + +// Get - Gets a job step in a job's current version. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - jobAgentName - The name of the job agent. +// - jobName - The name of the job. +// - stepName - The name of the job step. +// - options - JobStepsClientGetOptions contains the optional parameters for the JobStepsClient.Get method. +func (client *JobStepsClient) Get(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, stepName string, options *JobStepsClientGetOptions) (JobStepsClientGetResponse, error) { + var err error + const operationName = "JobStepsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serverName, jobAgentName, jobName, stepName, options) + if err != nil { + return JobStepsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return JobStepsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return JobStepsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *JobStepsClient) getCreateRequest(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, stepName string, options *JobStepsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/steps/{stepName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if jobAgentName == "" { + return nil, errors.New("parameter jobAgentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{jobAgentName}", url.PathEscape(jobAgentName)) + if jobName == "" { + return nil, errors.New("parameter jobName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{jobName}", url.PathEscape(jobName)) + if stepName == "" { + return nil, errors.New("parameter stepName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{stepName}", url.PathEscape(stepName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *JobStepsClient) getHandleResponse(resp *http.Response) (JobStepsClientGetResponse, error) { + result := JobStepsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.JobStep); err != nil { + return JobStepsClientGetResponse{}, err + } + return result, nil +} + +// GetByVersion - Gets the specified version of a job step. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - jobAgentName - The name of the job agent. +// - jobName - The name of the job. +// - jobVersion - The version of the job to get. +// - stepName - The name of the job step. +// - options - JobStepsClientGetByVersionOptions contains the optional parameters for the JobStepsClient.GetByVersion method. +func (client *JobStepsClient) GetByVersion(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobVersion int32, stepName string, options *JobStepsClientGetByVersionOptions) (JobStepsClientGetByVersionResponse, error) { + var err error + const operationName = "JobStepsClient.GetByVersion" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getByVersionCreateRequest(ctx, resourceGroupName, serverName, jobAgentName, jobName, jobVersion, stepName, options) + if err != nil { + return JobStepsClientGetByVersionResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return JobStepsClientGetByVersionResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return JobStepsClientGetByVersionResponse{}, err + } + resp, err := client.getByVersionHandleResponse(httpResp) + return resp, err +} + +// getByVersionCreateRequest creates the GetByVersion request. +func (client *JobStepsClient) getByVersionCreateRequest(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobVersion int32, stepName string, options *JobStepsClientGetByVersionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/versions/{jobVersion}/steps/{stepName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if jobAgentName == "" { + return nil, errors.New("parameter jobAgentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{jobAgentName}", url.PathEscape(jobAgentName)) + if jobName == "" { + return nil, errors.New("parameter jobName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{jobName}", url.PathEscape(jobName)) + urlPath = strings.ReplaceAll(urlPath, "{jobVersion}", url.PathEscape(strconv.FormatInt(int64(jobVersion), 10))) + if stepName == "" { + return nil, errors.New("parameter stepName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{stepName}", url.PathEscape(stepName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getByVersionHandleResponse handles the GetByVersion response. +func (client *JobStepsClient) getByVersionHandleResponse(resp *http.Response) (JobStepsClientGetByVersionResponse, error) { + result := JobStepsClientGetByVersionResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.JobStep); err != nil { + return JobStepsClientGetByVersionResponse{}, err + } + return result, nil +} + +// NewListByJobPager - Gets all job steps for a job's current version. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - jobAgentName - The name of the job agent. +// - jobName - The name of the job to get. +// - options - JobStepsClientListByJobOptions contains the optional parameters for the JobStepsClient.NewListByJobPager method. +func (client *JobStepsClient) NewListByJobPager(resourceGroupName string, serverName string, jobAgentName string, jobName string, options *JobStepsClientListByJobOptions) *runtime.Pager[JobStepsClientListByJobResponse] { + return runtime.NewPager(runtime.PagingHandler[JobStepsClientListByJobResponse]{ + More: func(page JobStepsClientListByJobResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *JobStepsClientListByJobResponse) (JobStepsClientListByJobResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "JobStepsClient.NewListByJobPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByJobCreateRequest(ctx, resourceGroupName, serverName, jobAgentName, jobName, options) + }, nil) + if err != nil { + return JobStepsClientListByJobResponse{}, err + } + return client.listByJobHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByJobCreateRequest creates the ListByJob request. +func (client *JobStepsClient) listByJobCreateRequest(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, options *JobStepsClientListByJobOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/steps" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if jobAgentName == "" { + return nil, errors.New("parameter jobAgentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{jobAgentName}", url.PathEscape(jobAgentName)) + if jobName == "" { + return nil, errors.New("parameter jobName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{jobName}", url.PathEscape(jobName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByJobHandleResponse handles the ListByJob response. +func (client *JobStepsClient) listByJobHandleResponse(resp *http.Response) (JobStepsClientListByJobResponse, error) { + result := JobStepsClientListByJobResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.JobStepListResult); err != nil { + return JobStepsClientListByJobResponse{}, err + } + return result, nil +} + +// NewListByVersionPager - Gets all job steps in the specified job version. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - jobAgentName - The name of the job agent. +// - jobName - The name of the job to get. +// - jobVersion - The version of the job to get. +// - options - JobStepsClientListByVersionOptions contains the optional parameters for the JobStepsClient.NewListByVersionPager +// method. +func (client *JobStepsClient) NewListByVersionPager(resourceGroupName string, serverName string, jobAgentName string, jobName string, jobVersion int32, options *JobStepsClientListByVersionOptions) *runtime.Pager[JobStepsClientListByVersionResponse] { + return runtime.NewPager(runtime.PagingHandler[JobStepsClientListByVersionResponse]{ + More: func(page JobStepsClientListByVersionResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *JobStepsClientListByVersionResponse) (JobStepsClientListByVersionResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "JobStepsClient.NewListByVersionPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByVersionCreateRequest(ctx, resourceGroupName, serverName, jobAgentName, jobName, jobVersion, options) + }, nil) + if err != nil { + return JobStepsClientListByVersionResponse{}, err + } + return client.listByVersionHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByVersionCreateRequest creates the ListByVersion request. +func (client *JobStepsClient) listByVersionCreateRequest(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobVersion int32, options *JobStepsClientListByVersionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/versions/{jobVersion}/steps" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if jobAgentName == "" { + return nil, errors.New("parameter jobAgentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{jobAgentName}", url.PathEscape(jobAgentName)) + if jobName == "" { + return nil, errors.New("parameter jobName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{jobName}", url.PathEscape(jobName)) + urlPath = strings.ReplaceAll(urlPath, "{jobVersion}", url.PathEscape(strconv.FormatInt(int64(jobVersion), 10))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByVersionHandleResponse handles the ListByVersion response. +func (client *JobStepsClient) listByVersionHandleResponse(resp *http.Response) (JobStepsClientListByVersionResponse, error) { + result := JobStepsClientListByVersionResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.JobStepListResult); err != nil { + return JobStepsClientListByVersionResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/jobtargetexecutions_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/jobtargetexecutions_client.go new file mode 100644 index 000000000..c1a53b591 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/jobtargetexecutions_client.go @@ -0,0 +1,345 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" + "time" +) + +// JobTargetExecutionsClient contains the methods for the JobTargetExecutions group. +// Don't use this type directly, use NewJobTargetExecutionsClient() instead. +type JobTargetExecutionsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewJobTargetExecutionsClient creates a new instance of JobTargetExecutionsClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewJobTargetExecutionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*JobTargetExecutionsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &JobTargetExecutionsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Gets a target execution. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - jobAgentName - The name of the job agent. +// - jobName - The name of the job to get. +// - jobExecutionID - The unique id of the job execution +// - stepName - The name of the step. +// - targetID - The target id. +// - options - JobTargetExecutionsClientGetOptions contains the optional parameters for the JobTargetExecutionsClient.Get method. +func (client *JobTargetExecutionsClient) Get(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobExecutionID string, stepName string, targetID string, options *JobTargetExecutionsClientGetOptions) (JobTargetExecutionsClientGetResponse, error) { + var err error + const operationName = "JobTargetExecutionsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serverName, jobAgentName, jobName, jobExecutionID, stepName, targetID, options) + if err != nil { + return JobTargetExecutionsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return JobTargetExecutionsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return JobTargetExecutionsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *JobTargetExecutionsClient) getCreateRequest(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobExecutionID string, stepName string, targetID string, options *JobTargetExecutionsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/steps/{stepName}/targets/{targetId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if jobAgentName == "" { + return nil, errors.New("parameter jobAgentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{jobAgentName}", url.PathEscape(jobAgentName)) + if jobName == "" { + return nil, errors.New("parameter jobName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{jobName}", url.PathEscape(jobName)) + if jobExecutionID == "" { + return nil, errors.New("parameter jobExecutionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{jobExecutionId}", url.PathEscape(jobExecutionID)) + if stepName == "" { + return nil, errors.New("parameter stepName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{stepName}", url.PathEscape(stepName)) + if targetID == "" { + return nil, errors.New("parameter targetID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{targetId}", url.PathEscape(targetID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *JobTargetExecutionsClient) getHandleResponse(resp *http.Response) (JobTargetExecutionsClientGetResponse, error) { + result := JobTargetExecutionsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.JobExecution); err != nil { + return JobTargetExecutionsClientGetResponse{}, err + } + return result, nil +} + +// NewListByJobExecutionPager - Lists target executions for all steps of a job execution. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - jobAgentName - The name of the job agent. +// - jobName - The name of the job to get. +// - jobExecutionID - The id of the job execution +// - options - JobTargetExecutionsClientListByJobExecutionOptions contains the optional parameters for the JobTargetExecutionsClient.NewListByJobExecutionPager +// method. +func (client *JobTargetExecutionsClient) NewListByJobExecutionPager(resourceGroupName string, serverName string, jobAgentName string, jobName string, jobExecutionID string, options *JobTargetExecutionsClientListByJobExecutionOptions) *runtime.Pager[JobTargetExecutionsClientListByJobExecutionResponse] { + return runtime.NewPager(runtime.PagingHandler[JobTargetExecutionsClientListByJobExecutionResponse]{ + More: func(page JobTargetExecutionsClientListByJobExecutionResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *JobTargetExecutionsClientListByJobExecutionResponse) (JobTargetExecutionsClientListByJobExecutionResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "JobTargetExecutionsClient.NewListByJobExecutionPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByJobExecutionCreateRequest(ctx, resourceGroupName, serverName, jobAgentName, jobName, jobExecutionID, options) + }, nil) + if err != nil { + return JobTargetExecutionsClientListByJobExecutionResponse{}, err + } + return client.listByJobExecutionHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByJobExecutionCreateRequest creates the ListByJobExecution request. +func (client *JobTargetExecutionsClient) listByJobExecutionCreateRequest(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobExecutionID string, options *JobTargetExecutionsClientListByJobExecutionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/targets" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if jobAgentName == "" { + return nil, errors.New("parameter jobAgentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{jobAgentName}", url.PathEscape(jobAgentName)) + if jobName == "" { + return nil, errors.New("parameter jobName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{jobName}", url.PathEscape(jobName)) + if jobExecutionID == "" { + return nil, errors.New("parameter jobExecutionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{jobExecutionId}", url.PathEscape(jobExecutionID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.CreateTimeMin != nil { + reqQP.Set("createTimeMin", options.CreateTimeMin.Format(time.RFC3339Nano)) + } + if options != nil && options.CreateTimeMax != nil { + reqQP.Set("createTimeMax", options.CreateTimeMax.Format(time.RFC3339Nano)) + } + if options != nil && options.EndTimeMin != nil { + reqQP.Set("endTimeMin", options.EndTimeMin.Format(time.RFC3339Nano)) + } + if options != nil && options.EndTimeMax != nil { + reqQP.Set("endTimeMax", options.EndTimeMax.Format(time.RFC3339Nano)) + } + if options != nil && options.IsActive != nil { + reqQP.Set("isActive", strconv.FormatBool(*options.IsActive)) + } + if options != nil && options.Skip != nil { + reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) + } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByJobExecutionHandleResponse handles the ListByJobExecution response. +func (client *JobTargetExecutionsClient) listByJobExecutionHandleResponse(resp *http.Response) (JobTargetExecutionsClientListByJobExecutionResponse, error) { + result := JobTargetExecutionsClientListByJobExecutionResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.JobExecutionListResult); err != nil { + return JobTargetExecutionsClientListByJobExecutionResponse{}, err + } + return result, nil +} + +// NewListByStepPager - Lists the target executions of a job step execution. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - jobAgentName - The name of the job agent. +// - jobName - The name of the job to get. +// - jobExecutionID - The id of the job execution +// - stepName - The name of the step. +// - options - JobTargetExecutionsClientListByStepOptions contains the optional parameters for the JobTargetExecutionsClient.NewListByStepPager +// method. +func (client *JobTargetExecutionsClient) NewListByStepPager(resourceGroupName string, serverName string, jobAgentName string, jobName string, jobExecutionID string, stepName string, options *JobTargetExecutionsClientListByStepOptions) *runtime.Pager[JobTargetExecutionsClientListByStepResponse] { + return runtime.NewPager(runtime.PagingHandler[JobTargetExecutionsClientListByStepResponse]{ + More: func(page JobTargetExecutionsClientListByStepResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *JobTargetExecutionsClientListByStepResponse) (JobTargetExecutionsClientListByStepResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "JobTargetExecutionsClient.NewListByStepPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByStepCreateRequest(ctx, resourceGroupName, serverName, jobAgentName, jobName, jobExecutionID, stepName, options) + }, nil) + if err != nil { + return JobTargetExecutionsClientListByStepResponse{}, err + } + return client.listByStepHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByStepCreateRequest creates the ListByStep request. +func (client *JobTargetExecutionsClient) listByStepCreateRequest(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobExecutionID string, stepName string, options *JobTargetExecutionsClientListByStepOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/steps/{stepName}/targets" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if jobAgentName == "" { + return nil, errors.New("parameter jobAgentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{jobAgentName}", url.PathEscape(jobAgentName)) + if jobName == "" { + return nil, errors.New("parameter jobName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{jobName}", url.PathEscape(jobName)) + if jobExecutionID == "" { + return nil, errors.New("parameter jobExecutionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{jobExecutionId}", url.PathEscape(jobExecutionID)) + if stepName == "" { + return nil, errors.New("parameter stepName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{stepName}", url.PathEscape(stepName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.CreateTimeMin != nil { + reqQP.Set("createTimeMin", options.CreateTimeMin.Format(time.RFC3339Nano)) + } + if options != nil && options.CreateTimeMax != nil { + reqQP.Set("createTimeMax", options.CreateTimeMax.Format(time.RFC3339Nano)) + } + if options != nil && options.EndTimeMin != nil { + reqQP.Set("endTimeMin", options.EndTimeMin.Format(time.RFC3339Nano)) + } + if options != nil && options.EndTimeMax != nil { + reqQP.Set("endTimeMax", options.EndTimeMax.Format(time.RFC3339Nano)) + } + if options != nil && options.IsActive != nil { + reqQP.Set("isActive", strconv.FormatBool(*options.IsActive)) + } + if options != nil && options.Skip != nil { + reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) + } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByStepHandleResponse handles the ListByStep response. +func (client *JobTargetExecutionsClient) listByStepHandleResponse(resp *http.Response) (JobTargetExecutionsClientListByStepResponse, error) { + result := JobTargetExecutionsClientListByStepResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.JobExecutionListResult); err != nil { + return JobTargetExecutionsClientListByStepResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/jobtargetgroups_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/jobtargetgroups_client.go new file mode 100644 index 000000000..d90f504da --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/jobtargetgroups_client.go @@ -0,0 +1,334 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// JobTargetGroupsClient contains the methods for the JobTargetGroups group. +// Don't use this type directly, use NewJobTargetGroupsClient() instead. +type JobTargetGroupsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewJobTargetGroupsClient creates a new instance of JobTargetGroupsClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewJobTargetGroupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*JobTargetGroupsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &JobTargetGroupsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Creates or updates a target group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - jobAgentName - The name of the job agent. +// - targetGroupName - The name of the target group. +// - parameters - The requested state of the target group. +// - options - JobTargetGroupsClientCreateOrUpdateOptions contains the optional parameters for the JobTargetGroupsClient.CreateOrUpdate +// method. +func (client *JobTargetGroupsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, targetGroupName string, parameters JobTargetGroup, options *JobTargetGroupsClientCreateOrUpdateOptions) (JobTargetGroupsClientCreateOrUpdateResponse, error) { + var err error + const operationName = "JobTargetGroupsClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serverName, jobAgentName, targetGroupName, parameters, options) + if err != nil { + return JobTargetGroupsClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return JobTargetGroupsClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return JobTargetGroupsClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *JobTargetGroupsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, targetGroupName string, parameters JobTargetGroup, options *JobTargetGroupsClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/targetGroups/{targetGroupName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if jobAgentName == "" { + return nil, errors.New("parameter jobAgentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{jobAgentName}", url.PathEscape(jobAgentName)) + if targetGroupName == "" { + return nil, errors.New("parameter targetGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{targetGroupName}", url.PathEscape(targetGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *JobTargetGroupsClient) createOrUpdateHandleResponse(resp *http.Response) (JobTargetGroupsClientCreateOrUpdateResponse, error) { + result := JobTargetGroupsClientCreateOrUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.JobTargetGroup); err != nil { + return JobTargetGroupsClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// Delete - Deletes a target group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - jobAgentName - The name of the job agent. +// - targetGroupName - The name of the target group. +// - options - JobTargetGroupsClientDeleteOptions contains the optional parameters for the JobTargetGroupsClient.Delete method. +func (client *JobTargetGroupsClient) Delete(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, targetGroupName string, options *JobTargetGroupsClientDeleteOptions) (JobTargetGroupsClientDeleteResponse, error) { + var err error + const operationName = "JobTargetGroupsClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serverName, jobAgentName, targetGroupName, options) + if err != nil { + return JobTargetGroupsClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return JobTargetGroupsClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return JobTargetGroupsClientDeleteResponse{}, err + } + return JobTargetGroupsClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *JobTargetGroupsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, targetGroupName string, options *JobTargetGroupsClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/targetGroups/{targetGroupName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if jobAgentName == "" { + return nil, errors.New("parameter jobAgentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{jobAgentName}", url.PathEscape(jobAgentName)) + if targetGroupName == "" { + return nil, errors.New("parameter targetGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{targetGroupName}", url.PathEscape(targetGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + return req, nil +} + +// Get - Gets a target group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - jobAgentName - The name of the job agent. +// - targetGroupName - The name of the target group. +// - options - JobTargetGroupsClientGetOptions contains the optional parameters for the JobTargetGroupsClient.Get method. +func (client *JobTargetGroupsClient) Get(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, targetGroupName string, options *JobTargetGroupsClientGetOptions) (JobTargetGroupsClientGetResponse, error) { + var err error + const operationName = "JobTargetGroupsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serverName, jobAgentName, targetGroupName, options) + if err != nil { + return JobTargetGroupsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return JobTargetGroupsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return JobTargetGroupsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *JobTargetGroupsClient) getCreateRequest(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, targetGroupName string, options *JobTargetGroupsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/targetGroups/{targetGroupName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if jobAgentName == "" { + return nil, errors.New("parameter jobAgentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{jobAgentName}", url.PathEscape(jobAgentName)) + if targetGroupName == "" { + return nil, errors.New("parameter targetGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{targetGroupName}", url.PathEscape(targetGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *JobTargetGroupsClient) getHandleResponse(resp *http.Response) (JobTargetGroupsClientGetResponse, error) { + result := JobTargetGroupsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.JobTargetGroup); err != nil { + return JobTargetGroupsClientGetResponse{}, err + } + return result, nil +} + +// NewListByAgentPager - Gets all target groups in an agent. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - jobAgentName - The name of the job agent. +// - options - JobTargetGroupsClientListByAgentOptions contains the optional parameters for the JobTargetGroupsClient.NewListByAgentPager +// method. +func (client *JobTargetGroupsClient) NewListByAgentPager(resourceGroupName string, serverName string, jobAgentName string, options *JobTargetGroupsClientListByAgentOptions) *runtime.Pager[JobTargetGroupsClientListByAgentResponse] { + return runtime.NewPager(runtime.PagingHandler[JobTargetGroupsClientListByAgentResponse]{ + More: func(page JobTargetGroupsClientListByAgentResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *JobTargetGroupsClientListByAgentResponse) (JobTargetGroupsClientListByAgentResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "JobTargetGroupsClient.NewListByAgentPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByAgentCreateRequest(ctx, resourceGroupName, serverName, jobAgentName, options) + }, nil) + if err != nil { + return JobTargetGroupsClientListByAgentResponse{}, err + } + return client.listByAgentHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByAgentCreateRequest creates the ListByAgent request. +func (client *JobTargetGroupsClient) listByAgentCreateRequest(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, options *JobTargetGroupsClientListByAgentOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/targetGroups" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if jobAgentName == "" { + return nil, errors.New("parameter jobAgentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{jobAgentName}", url.PathEscape(jobAgentName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByAgentHandleResponse handles the ListByAgent response. +func (client *JobTargetGroupsClient) listByAgentHandleResponse(resp *http.Response) (JobTargetGroupsClientListByAgentResponse, error) { + result := JobTargetGroupsClientListByAgentResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.JobTargetGroupListResult); err != nil { + return JobTargetGroupsClientListByAgentResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/jobversions_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/jobversions_client.go new file mode 100644 index 000000000..cbed3af95 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/jobversions_client.go @@ -0,0 +1,198 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// JobVersionsClient contains the methods for the JobVersions group. +// Don't use this type directly, use NewJobVersionsClient() instead. +type JobVersionsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewJobVersionsClient creates a new instance of JobVersionsClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewJobVersionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*JobVersionsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &JobVersionsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Gets a job version. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - jobAgentName - The name of the job agent. +// - jobName - The name of the job. +// - jobVersion - The version of the job to get. +// - options - JobVersionsClientGetOptions contains the optional parameters for the JobVersionsClient.Get method. +func (client *JobVersionsClient) Get(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobVersion int32, options *JobVersionsClientGetOptions) (JobVersionsClientGetResponse, error) { + var err error + const operationName = "JobVersionsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serverName, jobAgentName, jobName, jobVersion, options) + if err != nil { + return JobVersionsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return JobVersionsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return JobVersionsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *JobVersionsClient) getCreateRequest(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobVersion int32, options *JobVersionsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/versions/{jobVersion}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if jobAgentName == "" { + return nil, errors.New("parameter jobAgentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{jobAgentName}", url.PathEscape(jobAgentName)) + if jobName == "" { + return nil, errors.New("parameter jobName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{jobName}", url.PathEscape(jobName)) + urlPath = strings.ReplaceAll(urlPath, "{jobVersion}", url.PathEscape(strconv.FormatInt(int64(jobVersion), 10))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *JobVersionsClient) getHandleResponse(resp *http.Response) (JobVersionsClientGetResponse, error) { + result := JobVersionsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.JobVersion); err != nil { + return JobVersionsClientGetResponse{}, err + } + return result, nil +} + +// NewListByJobPager - Gets all versions of a job. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - jobAgentName - The name of the job agent. +// - jobName - The name of the job to get. +// - options - JobVersionsClientListByJobOptions contains the optional parameters for the JobVersionsClient.NewListByJobPager +// method. +func (client *JobVersionsClient) NewListByJobPager(resourceGroupName string, serverName string, jobAgentName string, jobName string, options *JobVersionsClientListByJobOptions) *runtime.Pager[JobVersionsClientListByJobResponse] { + return runtime.NewPager(runtime.PagingHandler[JobVersionsClientListByJobResponse]{ + More: func(page JobVersionsClientListByJobResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *JobVersionsClientListByJobResponse) (JobVersionsClientListByJobResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "JobVersionsClient.NewListByJobPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByJobCreateRequest(ctx, resourceGroupName, serverName, jobAgentName, jobName, options) + }, nil) + if err != nil { + return JobVersionsClientListByJobResponse{}, err + } + return client.listByJobHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByJobCreateRequest creates the ListByJob request. +func (client *JobVersionsClient) listByJobCreateRequest(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, options *JobVersionsClientListByJobOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/versions" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if jobAgentName == "" { + return nil, errors.New("parameter jobAgentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{jobAgentName}", url.PathEscape(jobAgentName)) + if jobName == "" { + return nil, errors.New("parameter jobName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{jobName}", url.PathEscape(jobName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByJobHandleResponse handles the ListByJob response. +func (client *JobVersionsClient) listByJobHandleResponse(resp *http.Response) (JobVersionsClientListByJobResponse, error) { + result := JobVersionsClientListByJobResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.JobVersionListResult); err != nil { + return JobVersionsClientListByJobResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/ledgerdigestuploads_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/ledgerdigestuploads_client.go new file mode 100644 index 000000000..195849e4d --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/ledgerdigestuploads_client.go @@ -0,0 +1,364 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// LedgerDigestUploadsClient contains the methods for the LedgerDigestUploads group. +// Don't use this type directly, use NewLedgerDigestUploadsClient() instead. +type LedgerDigestUploadsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewLedgerDigestUploadsClient creates a new instance of LedgerDigestUploadsClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewLedgerDigestUploadsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LedgerDigestUploadsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &LedgerDigestUploadsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Enables upload ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-02-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database. +// - options - LedgerDigestUploadsClientBeginCreateOrUpdateOptions contains the optional parameters for the LedgerDigestUploadsClient.BeginCreateOrUpdate +// method. +func (client *LedgerDigestUploadsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, ledgerDigestUploads LedgerDigestUploadsName, parameters LedgerDigestUploads, options *LedgerDigestUploadsClientBeginCreateOrUpdateOptions) (*runtime.Poller[LedgerDigestUploadsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, serverName, databaseName, ledgerDigestUploads, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[LedgerDigestUploadsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[LedgerDigestUploadsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Enables upload ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-02-01-preview +func (client *LedgerDigestUploadsClient) createOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, ledgerDigestUploads LedgerDigestUploadsName, parameters LedgerDigestUploads, options *LedgerDigestUploadsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "LedgerDigestUploadsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serverName, databaseName, ledgerDigestUploads, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *LedgerDigestUploadsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, ledgerDigestUploads LedgerDigestUploadsName, parameters LedgerDigestUploads, options *LedgerDigestUploadsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/ledgerDigestUploads/{ledgerDigestUploads}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if ledgerDigestUploads == "" { + return nil, errors.New("parameter ledgerDigestUploads cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{ledgerDigestUploads}", url.PathEscape(string(ledgerDigestUploads))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-02-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDisable - Disables uploading ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-02-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database. +// - options - LedgerDigestUploadsClientBeginDisableOptions contains the optional parameters for the LedgerDigestUploadsClient.BeginDisable +// method. +func (client *LedgerDigestUploadsClient) BeginDisable(ctx context.Context, resourceGroupName string, serverName string, databaseName string, ledgerDigestUploads LedgerDigestUploadsName, options *LedgerDigestUploadsClientBeginDisableOptions) (*runtime.Poller[LedgerDigestUploadsClientDisableResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.disable(ctx, resourceGroupName, serverName, databaseName, ledgerDigestUploads, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[LedgerDigestUploadsClientDisableResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[LedgerDigestUploadsClientDisableResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Disable - Disables uploading ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-02-01-preview +func (client *LedgerDigestUploadsClient) disable(ctx context.Context, resourceGroupName string, serverName string, databaseName string, ledgerDigestUploads LedgerDigestUploadsName, options *LedgerDigestUploadsClientBeginDisableOptions) (*http.Response, error) { + var err error + const operationName = "LedgerDigestUploadsClient.BeginDisable" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.disableCreateRequest(ctx, resourceGroupName, serverName, databaseName, ledgerDigestUploads, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// disableCreateRequest creates the Disable request. +func (client *LedgerDigestUploadsClient) disableCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, ledgerDigestUploads LedgerDigestUploadsName, options *LedgerDigestUploadsClientBeginDisableOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/ledgerDigestUploads/{ledgerDigestUploads}/disable" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if ledgerDigestUploads == "" { + return nil, errors.New("parameter ledgerDigestUploads cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{ledgerDigestUploads}", url.PathEscape(string(ledgerDigestUploads))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-02-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets the current ledger digest upload configuration for a database. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-02-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database. +// - options - LedgerDigestUploadsClientGetOptions contains the optional parameters for the LedgerDigestUploadsClient.Get method. +func (client *LedgerDigestUploadsClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, ledgerDigestUploads LedgerDigestUploadsName, options *LedgerDigestUploadsClientGetOptions) (LedgerDigestUploadsClientGetResponse, error) { + var err error + const operationName = "LedgerDigestUploadsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serverName, databaseName, ledgerDigestUploads, options) + if err != nil { + return LedgerDigestUploadsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return LedgerDigestUploadsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return LedgerDigestUploadsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *LedgerDigestUploadsClient) getCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, ledgerDigestUploads LedgerDigestUploadsName, options *LedgerDigestUploadsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/ledgerDigestUploads/{ledgerDigestUploads}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if ledgerDigestUploads == "" { + return nil, errors.New("parameter ledgerDigestUploads cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{ledgerDigestUploads}", url.PathEscape(string(ledgerDigestUploads))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-02-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *LedgerDigestUploadsClient) getHandleResponse(resp *http.Response) (LedgerDigestUploadsClientGetResponse, error) { + result := LedgerDigestUploadsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.LedgerDigestUploads); err != nil { + return LedgerDigestUploadsClientGetResponse{}, err + } + return result, nil +} + +// NewListByDatabasePager - Gets all ledger digest upload settings on a database. +// +// Generated from API version 2021-02-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database. +// - options - LedgerDigestUploadsClientListByDatabaseOptions contains the optional parameters for the LedgerDigestUploadsClient.NewListByDatabasePager +// method. +func (client *LedgerDigestUploadsClient) NewListByDatabasePager(resourceGroupName string, serverName string, databaseName string, options *LedgerDigestUploadsClientListByDatabaseOptions) *runtime.Pager[LedgerDigestUploadsClientListByDatabaseResponse] { + return runtime.NewPager(runtime.PagingHandler[LedgerDigestUploadsClientListByDatabaseResponse]{ + More: func(page LedgerDigestUploadsClientListByDatabaseResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *LedgerDigestUploadsClientListByDatabaseResponse) (LedgerDigestUploadsClientListByDatabaseResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "LedgerDigestUploadsClient.NewListByDatabasePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByDatabaseCreateRequest(ctx, resourceGroupName, serverName, databaseName, options) + }, nil) + if err != nil { + return LedgerDigestUploadsClientListByDatabaseResponse{}, err + } + return client.listByDatabaseHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByDatabaseCreateRequest creates the ListByDatabase request. +func (client *LedgerDigestUploadsClient) listByDatabaseCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, options *LedgerDigestUploadsClientListByDatabaseOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/ledgerDigestUploads" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-02-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByDatabaseHandleResponse handles the ListByDatabase response. +func (client *LedgerDigestUploadsClient) listByDatabaseHandleResponse(resp *http.Response) (LedgerDigestUploadsClientListByDatabaseResponse, error) { + result := LedgerDigestUploadsClientListByDatabaseResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.LedgerDigestUploadsListResult); err != nil { + return LedgerDigestUploadsClientListByDatabaseResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/longtermretentionbackups_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/longtermretentionbackups_client.go new file mode 100644 index 000000000..fcd913833 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/longtermretentionbackups_client.go @@ -0,0 +1,1193 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// LongTermRetentionBackupsClient contains the methods for the LongTermRetentionBackups group. +// Don't use this type directly, use NewLongTermRetentionBackupsClient() instead. +type LongTermRetentionBackupsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewLongTermRetentionBackupsClient creates a new instance of LongTermRetentionBackupsClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewLongTermRetentionBackupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LongTermRetentionBackupsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &LongTermRetentionBackupsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCopy - Copy an existing long term retention backup. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-05-01-preview +// - locationName - The location of the database. +// - longTermRetentionServerName - The name of the server +// - longTermRetentionDatabaseName - The name of the database +// - backupName - The backup name. +// - parameters - The parameters needed for long term retention copy request +// - options - LongTermRetentionBackupsClientBeginCopyOptions contains the optional parameters for the LongTermRetentionBackupsClient.BeginCopy +// method. +func (client *LongTermRetentionBackupsClient) BeginCopy(ctx context.Context, locationName string, longTermRetentionServerName string, longTermRetentionDatabaseName string, backupName string, parameters CopyLongTermRetentionBackupParameters, options *LongTermRetentionBackupsClientBeginCopyOptions) (*runtime.Poller[LongTermRetentionBackupsClientCopyResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.copyOperation(ctx, locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[LongTermRetentionBackupsClientCopyResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[LongTermRetentionBackupsClientCopyResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Copy - Copy an existing long term retention backup. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-05-01-preview +func (client *LongTermRetentionBackupsClient) copyOperation(ctx context.Context, locationName string, longTermRetentionServerName string, longTermRetentionDatabaseName string, backupName string, parameters CopyLongTermRetentionBackupParameters, options *LongTermRetentionBackupsClientBeginCopyOptions) (*http.Response, error) { + var err error + const operationName = "LongTermRetentionBackupsClient.BeginCopy" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.copyCreateRequest(ctx, locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// copyCreateRequest creates the Copy request. +func (client *LongTermRetentionBackupsClient) copyCreateRequest(ctx context.Context, locationName string, longTermRetentionServerName string, longTermRetentionDatabaseName string, backupName string, parameters CopyLongTermRetentionBackupParameters, options *LongTermRetentionBackupsClientBeginCopyOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}/copy" + if locationName == "" { + return nil, errors.New("parameter locationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{locationName}", url.PathEscape(locationName)) + if longTermRetentionServerName == "" { + return nil, errors.New("parameter longTermRetentionServerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{longTermRetentionServerName}", url.PathEscape(longTermRetentionServerName)) + if longTermRetentionDatabaseName == "" { + return nil, errors.New("parameter longTermRetentionDatabaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{longTermRetentionDatabaseName}", url.PathEscape(longTermRetentionDatabaseName)) + if backupName == "" { + return nil, errors.New("parameter backupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{backupName}", url.PathEscape(backupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-05-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginCopyByResourceGroup - Copy an existing long term retention backup to a different server. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-05-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - locationName - The location of the database. +// - longTermRetentionServerName - The name of the server +// - longTermRetentionDatabaseName - The name of the database +// - backupName - The backup name. +// - parameters - The parameters needed for long term retention copy request +// - options - LongTermRetentionBackupsClientBeginCopyByResourceGroupOptions contains the optional parameters for the LongTermRetentionBackupsClient.BeginCopyByResourceGroup +// method. +func (client *LongTermRetentionBackupsClient) BeginCopyByResourceGroup(ctx context.Context, resourceGroupName string, locationName string, longTermRetentionServerName string, longTermRetentionDatabaseName string, backupName string, parameters CopyLongTermRetentionBackupParameters, options *LongTermRetentionBackupsClientBeginCopyByResourceGroupOptions) (*runtime.Poller[LongTermRetentionBackupsClientCopyByResourceGroupResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.copyByResourceGroup(ctx, resourceGroupName, locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[LongTermRetentionBackupsClientCopyByResourceGroupResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[LongTermRetentionBackupsClientCopyByResourceGroupResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CopyByResourceGroup - Copy an existing long term retention backup to a different server. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-05-01-preview +func (client *LongTermRetentionBackupsClient) copyByResourceGroup(ctx context.Context, resourceGroupName string, locationName string, longTermRetentionServerName string, longTermRetentionDatabaseName string, backupName string, parameters CopyLongTermRetentionBackupParameters, options *LongTermRetentionBackupsClientBeginCopyByResourceGroupOptions) (*http.Response, error) { + var err error + const operationName = "LongTermRetentionBackupsClient.BeginCopyByResourceGroup" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.copyByResourceGroupCreateRequest(ctx, resourceGroupName, locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// copyByResourceGroupCreateRequest creates the CopyByResourceGroup request. +func (client *LongTermRetentionBackupsClient) copyByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, locationName string, longTermRetentionServerName string, longTermRetentionDatabaseName string, backupName string, parameters CopyLongTermRetentionBackupParameters, options *LongTermRetentionBackupsClientBeginCopyByResourceGroupOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}/copy" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if locationName == "" { + return nil, errors.New("parameter locationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{locationName}", url.PathEscape(locationName)) + if longTermRetentionServerName == "" { + return nil, errors.New("parameter longTermRetentionServerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{longTermRetentionServerName}", url.PathEscape(longTermRetentionServerName)) + if longTermRetentionDatabaseName == "" { + return nil, errors.New("parameter longTermRetentionDatabaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{longTermRetentionDatabaseName}", url.PathEscape(longTermRetentionDatabaseName)) + if backupName == "" { + return nil, errors.New("parameter backupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{backupName}", url.PathEscape(backupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-05-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes a long term retention backup. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-05-01-preview +// - locationName - The location of the database +// - longTermRetentionServerName - The name of the server +// - longTermRetentionDatabaseName - The name of the database +// - backupName - The backup name. +// - options - LongTermRetentionBackupsClientBeginDeleteOptions contains the optional parameters for the LongTermRetentionBackupsClient.BeginDelete +// method. +func (client *LongTermRetentionBackupsClient) BeginDelete(ctx context.Context, locationName string, longTermRetentionServerName string, longTermRetentionDatabaseName string, backupName string, options *LongTermRetentionBackupsClientBeginDeleteOptions) (*runtime.Poller[LongTermRetentionBackupsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[LongTermRetentionBackupsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[LongTermRetentionBackupsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes a long term retention backup. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-05-01-preview +func (client *LongTermRetentionBackupsClient) deleteOperation(ctx context.Context, locationName string, longTermRetentionServerName string, longTermRetentionDatabaseName string, backupName string, options *LongTermRetentionBackupsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "LongTermRetentionBackupsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *LongTermRetentionBackupsClient) deleteCreateRequest(ctx context.Context, locationName string, longTermRetentionServerName string, longTermRetentionDatabaseName string, backupName string, options *LongTermRetentionBackupsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}" + if locationName == "" { + return nil, errors.New("parameter locationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{locationName}", url.PathEscape(locationName)) + if longTermRetentionServerName == "" { + return nil, errors.New("parameter longTermRetentionServerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{longTermRetentionServerName}", url.PathEscape(longTermRetentionServerName)) + if longTermRetentionDatabaseName == "" { + return nil, errors.New("parameter longTermRetentionDatabaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{longTermRetentionDatabaseName}", url.PathEscape(longTermRetentionDatabaseName)) + if backupName == "" { + return nil, errors.New("parameter backupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{backupName}", url.PathEscape(backupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-05-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + return req, nil +} + +// BeginDeleteByResourceGroup - Deletes a long term retention backup. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-05-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - locationName - The location of the database +// - longTermRetentionServerName - The name of the server +// - longTermRetentionDatabaseName - The name of the database +// - backupName - The backup name. +// - options - LongTermRetentionBackupsClientBeginDeleteByResourceGroupOptions contains the optional parameters for the LongTermRetentionBackupsClient.BeginDeleteByResourceGroup +// method. +func (client *LongTermRetentionBackupsClient) BeginDeleteByResourceGroup(ctx context.Context, resourceGroupName string, locationName string, longTermRetentionServerName string, longTermRetentionDatabaseName string, backupName string, options *LongTermRetentionBackupsClientBeginDeleteByResourceGroupOptions) (*runtime.Poller[LongTermRetentionBackupsClientDeleteByResourceGroupResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteByResourceGroup(ctx, resourceGroupName, locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[LongTermRetentionBackupsClientDeleteByResourceGroupResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[LongTermRetentionBackupsClientDeleteByResourceGroupResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// DeleteByResourceGroup - Deletes a long term retention backup. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-05-01-preview +func (client *LongTermRetentionBackupsClient) deleteByResourceGroup(ctx context.Context, resourceGroupName string, locationName string, longTermRetentionServerName string, longTermRetentionDatabaseName string, backupName string, options *LongTermRetentionBackupsClientBeginDeleteByResourceGroupOptions) (*http.Response, error) { + var err error + const operationName = "LongTermRetentionBackupsClient.BeginDeleteByResourceGroup" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteByResourceGroupCreateRequest(ctx, resourceGroupName, locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteByResourceGroupCreateRequest creates the DeleteByResourceGroup request. +func (client *LongTermRetentionBackupsClient) deleteByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, locationName string, longTermRetentionServerName string, longTermRetentionDatabaseName string, backupName string, options *LongTermRetentionBackupsClientBeginDeleteByResourceGroupOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if locationName == "" { + return nil, errors.New("parameter locationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{locationName}", url.PathEscape(locationName)) + if longTermRetentionServerName == "" { + return nil, errors.New("parameter longTermRetentionServerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{longTermRetentionServerName}", url.PathEscape(longTermRetentionServerName)) + if longTermRetentionDatabaseName == "" { + return nil, errors.New("parameter longTermRetentionDatabaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{longTermRetentionDatabaseName}", url.PathEscape(longTermRetentionDatabaseName)) + if backupName == "" { + return nil, errors.New("parameter backupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{backupName}", url.PathEscape(backupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-05-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + return req, nil +} + +// Get - Gets a long term retention backup. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-05-01-preview +// - locationName - The location of the database. +// - longTermRetentionServerName - The name of the server +// - longTermRetentionDatabaseName - The name of the database +// - backupName - The backup name. +// - options - LongTermRetentionBackupsClientGetOptions contains the optional parameters for the LongTermRetentionBackupsClient.Get +// method. +func (client *LongTermRetentionBackupsClient) Get(ctx context.Context, locationName string, longTermRetentionServerName string, longTermRetentionDatabaseName string, backupName string, options *LongTermRetentionBackupsClientGetOptions) (LongTermRetentionBackupsClientGetResponse, error) { + var err error + const operationName = "LongTermRetentionBackupsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, options) + if err != nil { + return LongTermRetentionBackupsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return LongTermRetentionBackupsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return LongTermRetentionBackupsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *LongTermRetentionBackupsClient) getCreateRequest(ctx context.Context, locationName string, longTermRetentionServerName string, longTermRetentionDatabaseName string, backupName string, options *LongTermRetentionBackupsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}" + if locationName == "" { + return nil, errors.New("parameter locationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{locationName}", url.PathEscape(locationName)) + if longTermRetentionServerName == "" { + return nil, errors.New("parameter longTermRetentionServerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{longTermRetentionServerName}", url.PathEscape(longTermRetentionServerName)) + if longTermRetentionDatabaseName == "" { + return nil, errors.New("parameter longTermRetentionDatabaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{longTermRetentionDatabaseName}", url.PathEscape(longTermRetentionDatabaseName)) + if backupName == "" { + return nil, errors.New("parameter backupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{backupName}", url.PathEscape(backupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-05-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *LongTermRetentionBackupsClient) getHandleResponse(resp *http.Response) (LongTermRetentionBackupsClientGetResponse, error) { + result := LongTermRetentionBackupsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.LongTermRetentionBackup); err != nil { + return LongTermRetentionBackupsClientGetResponse{}, err + } + return result, nil +} + +// GetByResourceGroup - Gets a long term retention backup. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-05-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - locationName - The location of the database. +// - longTermRetentionServerName - The name of the server +// - longTermRetentionDatabaseName - The name of the database +// - backupName - The backup name. +// - options - LongTermRetentionBackupsClientGetByResourceGroupOptions contains the optional parameters for the LongTermRetentionBackupsClient.GetByResourceGroup +// method. +func (client *LongTermRetentionBackupsClient) GetByResourceGroup(ctx context.Context, resourceGroupName string, locationName string, longTermRetentionServerName string, longTermRetentionDatabaseName string, backupName string, options *LongTermRetentionBackupsClientGetByResourceGroupOptions) (LongTermRetentionBackupsClientGetByResourceGroupResponse, error) { + var err error + const operationName = "LongTermRetentionBackupsClient.GetByResourceGroup" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getByResourceGroupCreateRequest(ctx, resourceGroupName, locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, options) + if err != nil { + return LongTermRetentionBackupsClientGetByResourceGroupResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return LongTermRetentionBackupsClientGetByResourceGroupResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return LongTermRetentionBackupsClientGetByResourceGroupResponse{}, err + } + resp, err := client.getByResourceGroupHandleResponse(httpResp) + return resp, err +} + +// getByResourceGroupCreateRequest creates the GetByResourceGroup request. +func (client *LongTermRetentionBackupsClient) getByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, locationName string, longTermRetentionServerName string, longTermRetentionDatabaseName string, backupName string, options *LongTermRetentionBackupsClientGetByResourceGroupOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if locationName == "" { + return nil, errors.New("parameter locationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{locationName}", url.PathEscape(locationName)) + if longTermRetentionServerName == "" { + return nil, errors.New("parameter longTermRetentionServerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{longTermRetentionServerName}", url.PathEscape(longTermRetentionServerName)) + if longTermRetentionDatabaseName == "" { + return nil, errors.New("parameter longTermRetentionDatabaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{longTermRetentionDatabaseName}", url.PathEscape(longTermRetentionDatabaseName)) + if backupName == "" { + return nil, errors.New("parameter backupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{backupName}", url.PathEscape(backupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-05-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getByResourceGroupHandleResponse handles the GetByResourceGroup response. +func (client *LongTermRetentionBackupsClient) getByResourceGroupHandleResponse(resp *http.Response) (LongTermRetentionBackupsClientGetByResourceGroupResponse, error) { + result := LongTermRetentionBackupsClientGetByResourceGroupResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.LongTermRetentionBackup); err != nil { + return LongTermRetentionBackupsClientGetByResourceGroupResponse{}, err + } + return result, nil +} + +// NewListByDatabasePager - Lists all long term retention backups for a database. +// +// Generated from API version 2021-05-01-preview +// - locationName - The location of the database +// - longTermRetentionServerName - The name of the server +// - longTermRetentionDatabaseName - The name of the database +// - options - LongTermRetentionBackupsClientListByDatabaseOptions contains the optional parameters for the LongTermRetentionBackupsClient.NewListByDatabasePager +// method. +func (client *LongTermRetentionBackupsClient) NewListByDatabasePager(locationName string, longTermRetentionServerName string, longTermRetentionDatabaseName string, options *LongTermRetentionBackupsClientListByDatabaseOptions) *runtime.Pager[LongTermRetentionBackupsClientListByDatabaseResponse] { + return runtime.NewPager(runtime.PagingHandler[LongTermRetentionBackupsClientListByDatabaseResponse]{ + More: func(page LongTermRetentionBackupsClientListByDatabaseResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *LongTermRetentionBackupsClientListByDatabaseResponse) (LongTermRetentionBackupsClientListByDatabaseResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "LongTermRetentionBackupsClient.NewListByDatabasePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByDatabaseCreateRequest(ctx, locationName, longTermRetentionServerName, longTermRetentionDatabaseName, options) + }, nil) + if err != nil { + return LongTermRetentionBackupsClientListByDatabaseResponse{}, err + } + return client.listByDatabaseHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByDatabaseCreateRequest creates the ListByDatabase request. +func (client *LongTermRetentionBackupsClient) listByDatabaseCreateRequest(ctx context.Context, locationName string, longTermRetentionServerName string, longTermRetentionDatabaseName string, options *LongTermRetentionBackupsClientListByDatabaseOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups" + if locationName == "" { + return nil, errors.New("parameter locationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{locationName}", url.PathEscape(locationName)) + if longTermRetentionServerName == "" { + return nil, errors.New("parameter longTermRetentionServerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{longTermRetentionServerName}", url.PathEscape(longTermRetentionServerName)) + if longTermRetentionDatabaseName == "" { + return nil, errors.New("parameter longTermRetentionDatabaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{longTermRetentionDatabaseName}", url.PathEscape(longTermRetentionDatabaseName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.OnlyLatestPerDatabase != nil { + reqQP.Set("onlyLatestPerDatabase", strconv.FormatBool(*options.OnlyLatestPerDatabase)) + } + if options != nil && options.DatabaseState != nil { + reqQP.Set("databaseState", string(*options.DatabaseState)) + } + reqQP.Set("api-version", "2021-05-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByDatabaseHandleResponse handles the ListByDatabase response. +func (client *LongTermRetentionBackupsClient) listByDatabaseHandleResponse(resp *http.Response) (LongTermRetentionBackupsClientListByDatabaseResponse, error) { + result := LongTermRetentionBackupsClientListByDatabaseResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.LongTermRetentionBackupListResult); err != nil { + return LongTermRetentionBackupsClientListByDatabaseResponse{}, err + } + return result, nil +} + +// NewListByLocationPager - Lists the long term retention backups for a given location. +// +// Generated from API version 2021-05-01-preview +// - locationName - The location of the database +// - options - LongTermRetentionBackupsClientListByLocationOptions contains the optional parameters for the LongTermRetentionBackupsClient.NewListByLocationPager +// method. +func (client *LongTermRetentionBackupsClient) NewListByLocationPager(locationName string, options *LongTermRetentionBackupsClientListByLocationOptions) *runtime.Pager[LongTermRetentionBackupsClientListByLocationResponse] { + return runtime.NewPager(runtime.PagingHandler[LongTermRetentionBackupsClientListByLocationResponse]{ + More: func(page LongTermRetentionBackupsClientListByLocationResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *LongTermRetentionBackupsClientListByLocationResponse) (LongTermRetentionBackupsClientListByLocationResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "LongTermRetentionBackupsClient.NewListByLocationPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByLocationCreateRequest(ctx, locationName, options) + }, nil) + if err != nil { + return LongTermRetentionBackupsClientListByLocationResponse{}, err + } + return client.listByLocationHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByLocationCreateRequest creates the ListByLocation request. +func (client *LongTermRetentionBackupsClient) listByLocationCreateRequest(ctx context.Context, locationName string, options *LongTermRetentionBackupsClientListByLocationOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionBackups" + if locationName == "" { + return nil, errors.New("parameter locationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{locationName}", url.PathEscape(locationName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.OnlyLatestPerDatabase != nil { + reqQP.Set("onlyLatestPerDatabase", strconv.FormatBool(*options.OnlyLatestPerDatabase)) + } + if options != nil && options.DatabaseState != nil { + reqQP.Set("databaseState", string(*options.DatabaseState)) + } + reqQP.Set("api-version", "2021-05-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByLocationHandleResponse handles the ListByLocation response. +func (client *LongTermRetentionBackupsClient) listByLocationHandleResponse(resp *http.Response) (LongTermRetentionBackupsClientListByLocationResponse, error) { + result := LongTermRetentionBackupsClientListByLocationResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.LongTermRetentionBackupListResult); err != nil { + return LongTermRetentionBackupsClientListByLocationResponse{}, err + } + return result, nil +} + +// NewListByResourceGroupDatabasePager - Lists all long term retention backups for a database. +// +// Generated from API version 2021-05-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - locationName - The location of the database +// - longTermRetentionServerName - The name of the server +// - longTermRetentionDatabaseName - The name of the database +// - options - LongTermRetentionBackupsClientListByResourceGroupDatabaseOptions contains the optional parameters for the LongTermRetentionBackupsClient.NewListByResourceGroupDatabasePager +// method. +func (client *LongTermRetentionBackupsClient) NewListByResourceGroupDatabasePager(resourceGroupName string, locationName string, longTermRetentionServerName string, longTermRetentionDatabaseName string, options *LongTermRetentionBackupsClientListByResourceGroupDatabaseOptions) *runtime.Pager[LongTermRetentionBackupsClientListByResourceGroupDatabaseResponse] { + return runtime.NewPager(runtime.PagingHandler[LongTermRetentionBackupsClientListByResourceGroupDatabaseResponse]{ + More: func(page LongTermRetentionBackupsClientListByResourceGroupDatabaseResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *LongTermRetentionBackupsClientListByResourceGroupDatabaseResponse) (LongTermRetentionBackupsClientListByResourceGroupDatabaseResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "LongTermRetentionBackupsClient.NewListByResourceGroupDatabasePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByResourceGroupDatabaseCreateRequest(ctx, resourceGroupName, locationName, longTermRetentionServerName, longTermRetentionDatabaseName, options) + }, nil) + if err != nil { + return LongTermRetentionBackupsClientListByResourceGroupDatabaseResponse{}, err + } + return client.listByResourceGroupDatabaseHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByResourceGroupDatabaseCreateRequest creates the ListByResourceGroupDatabase request. +func (client *LongTermRetentionBackupsClient) listByResourceGroupDatabaseCreateRequest(ctx context.Context, resourceGroupName string, locationName string, longTermRetentionServerName string, longTermRetentionDatabaseName string, options *LongTermRetentionBackupsClientListByResourceGroupDatabaseOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if locationName == "" { + return nil, errors.New("parameter locationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{locationName}", url.PathEscape(locationName)) + if longTermRetentionServerName == "" { + return nil, errors.New("parameter longTermRetentionServerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{longTermRetentionServerName}", url.PathEscape(longTermRetentionServerName)) + if longTermRetentionDatabaseName == "" { + return nil, errors.New("parameter longTermRetentionDatabaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{longTermRetentionDatabaseName}", url.PathEscape(longTermRetentionDatabaseName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.OnlyLatestPerDatabase != nil { + reqQP.Set("onlyLatestPerDatabase", strconv.FormatBool(*options.OnlyLatestPerDatabase)) + } + if options != nil && options.DatabaseState != nil { + reqQP.Set("databaseState", string(*options.DatabaseState)) + } + reqQP.Set("api-version", "2021-05-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByResourceGroupDatabaseHandleResponse handles the ListByResourceGroupDatabase response. +func (client *LongTermRetentionBackupsClient) listByResourceGroupDatabaseHandleResponse(resp *http.Response) (LongTermRetentionBackupsClientListByResourceGroupDatabaseResponse, error) { + result := LongTermRetentionBackupsClientListByResourceGroupDatabaseResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.LongTermRetentionBackupListResult); err != nil { + return LongTermRetentionBackupsClientListByResourceGroupDatabaseResponse{}, err + } + return result, nil +} + +// NewListByResourceGroupLocationPager - Lists the long term retention backups for a given location. +// +// Generated from API version 2021-05-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - locationName - The location of the database +// - options - LongTermRetentionBackupsClientListByResourceGroupLocationOptions contains the optional parameters for the LongTermRetentionBackupsClient.NewListByResourceGroupLocationPager +// method. +func (client *LongTermRetentionBackupsClient) NewListByResourceGroupLocationPager(resourceGroupName string, locationName string, options *LongTermRetentionBackupsClientListByResourceGroupLocationOptions) *runtime.Pager[LongTermRetentionBackupsClientListByResourceGroupLocationResponse] { + return runtime.NewPager(runtime.PagingHandler[LongTermRetentionBackupsClientListByResourceGroupLocationResponse]{ + More: func(page LongTermRetentionBackupsClientListByResourceGroupLocationResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *LongTermRetentionBackupsClientListByResourceGroupLocationResponse) (LongTermRetentionBackupsClientListByResourceGroupLocationResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "LongTermRetentionBackupsClient.NewListByResourceGroupLocationPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByResourceGroupLocationCreateRequest(ctx, resourceGroupName, locationName, options) + }, nil) + if err != nil { + return LongTermRetentionBackupsClientListByResourceGroupLocationResponse{}, err + } + return client.listByResourceGroupLocationHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByResourceGroupLocationCreateRequest creates the ListByResourceGroupLocation request. +func (client *LongTermRetentionBackupsClient) listByResourceGroupLocationCreateRequest(ctx context.Context, resourceGroupName string, locationName string, options *LongTermRetentionBackupsClientListByResourceGroupLocationOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionBackups" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if locationName == "" { + return nil, errors.New("parameter locationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{locationName}", url.PathEscape(locationName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.OnlyLatestPerDatabase != nil { + reqQP.Set("onlyLatestPerDatabase", strconv.FormatBool(*options.OnlyLatestPerDatabase)) + } + if options != nil && options.DatabaseState != nil { + reqQP.Set("databaseState", string(*options.DatabaseState)) + } + reqQP.Set("api-version", "2021-05-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByResourceGroupLocationHandleResponse handles the ListByResourceGroupLocation response. +func (client *LongTermRetentionBackupsClient) listByResourceGroupLocationHandleResponse(resp *http.Response) (LongTermRetentionBackupsClientListByResourceGroupLocationResponse, error) { + result := LongTermRetentionBackupsClientListByResourceGroupLocationResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.LongTermRetentionBackupListResult); err != nil { + return LongTermRetentionBackupsClientListByResourceGroupLocationResponse{}, err + } + return result, nil +} + +// NewListByResourceGroupServerPager - Lists the long term retention backups for a given server. +// +// Generated from API version 2021-05-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - locationName - The location of the database +// - longTermRetentionServerName - The name of the server +// - options - LongTermRetentionBackupsClientListByResourceGroupServerOptions contains the optional parameters for the LongTermRetentionBackupsClient.NewListByResourceGroupServerPager +// method. +func (client *LongTermRetentionBackupsClient) NewListByResourceGroupServerPager(resourceGroupName string, locationName string, longTermRetentionServerName string, options *LongTermRetentionBackupsClientListByResourceGroupServerOptions) *runtime.Pager[LongTermRetentionBackupsClientListByResourceGroupServerResponse] { + return runtime.NewPager(runtime.PagingHandler[LongTermRetentionBackupsClientListByResourceGroupServerResponse]{ + More: func(page LongTermRetentionBackupsClientListByResourceGroupServerResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *LongTermRetentionBackupsClientListByResourceGroupServerResponse) (LongTermRetentionBackupsClientListByResourceGroupServerResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "LongTermRetentionBackupsClient.NewListByResourceGroupServerPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByResourceGroupServerCreateRequest(ctx, resourceGroupName, locationName, longTermRetentionServerName, options) + }, nil) + if err != nil { + return LongTermRetentionBackupsClientListByResourceGroupServerResponse{}, err + } + return client.listByResourceGroupServerHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByResourceGroupServerCreateRequest creates the ListByResourceGroupServer request. +func (client *LongTermRetentionBackupsClient) listByResourceGroupServerCreateRequest(ctx context.Context, resourceGroupName string, locationName string, longTermRetentionServerName string, options *LongTermRetentionBackupsClientListByResourceGroupServerOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionBackups" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if locationName == "" { + return nil, errors.New("parameter locationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{locationName}", url.PathEscape(locationName)) + if longTermRetentionServerName == "" { + return nil, errors.New("parameter longTermRetentionServerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{longTermRetentionServerName}", url.PathEscape(longTermRetentionServerName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.OnlyLatestPerDatabase != nil { + reqQP.Set("onlyLatestPerDatabase", strconv.FormatBool(*options.OnlyLatestPerDatabase)) + } + if options != nil && options.DatabaseState != nil { + reqQP.Set("databaseState", string(*options.DatabaseState)) + } + reqQP.Set("api-version", "2021-05-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByResourceGroupServerHandleResponse handles the ListByResourceGroupServer response. +func (client *LongTermRetentionBackupsClient) listByResourceGroupServerHandleResponse(resp *http.Response) (LongTermRetentionBackupsClientListByResourceGroupServerResponse, error) { + result := LongTermRetentionBackupsClientListByResourceGroupServerResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.LongTermRetentionBackupListResult); err != nil { + return LongTermRetentionBackupsClientListByResourceGroupServerResponse{}, err + } + return result, nil +} + +// NewListByServerPager - Lists the long term retention backups for a given server. +// +// Generated from API version 2021-05-01-preview +// - locationName - The location of the database +// - longTermRetentionServerName - The name of the server +// - options - LongTermRetentionBackupsClientListByServerOptions contains the optional parameters for the LongTermRetentionBackupsClient.NewListByServerPager +// method. +func (client *LongTermRetentionBackupsClient) NewListByServerPager(locationName string, longTermRetentionServerName string, options *LongTermRetentionBackupsClientListByServerOptions) *runtime.Pager[LongTermRetentionBackupsClientListByServerResponse] { + return runtime.NewPager(runtime.PagingHandler[LongTermRetentionBackupsClientListByServerResponse]{ + More: func(page LongTermRetentionBackupsClientListByServerResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *LongTermRetentionBackupsClientListByServerResponse) (LongTermRetentionBackupsClientListByServerResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "LongTermRetentionBackupsClient.NewListByServerPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByServerCreateRequest(ctx, locationName, longTermRetentionServerName, options) + }, nil) + if err != nil { + return LongTermRetentionBackupsClientListByServerResponse{}, err + } + return client.listByServerHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByServerCreateRequest creates the ListByServer request. +func (client *LongTermRetentionBackupsClient) listByServerCreateRequest(ctx context.Context, locationName string, longTermRetentionServerName string, options *LongTermRetentionBackupsClientListByServerOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionBackups" + if locationName == "" { + return nil, errors.New("parameter locationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{locationName}", url.PathEscape(locationName)) + if longTermRetentionServerName == "" { + return nil, errors.New("parameter longTermRetentionServerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{longTermRetentionServerName}", url.PathEscape(longTermRetentionServerName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.OnlyLatestPerDatabase != nil { + reqQP.Set("onlyLatestPerDatabase", strconv.FormatBool(*options.OnlyLatestPerDatabase)) + } + if options != nil && options.DatabaseState != nil { + reqQP.Set("databaseState", string(*options.DatabaseState)) + } + reqQP.Set("api-version", "2021-05-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByServerHandleResponse handles the ListByServer response. +func (client *LongTermRetentionBackupsClient) listByServerHandleResponse(resp *http.Response) (LongTermRetentionBackupsClientListByServerResponse, error) { + result := LongTermRetentionBackupsClientListByServerResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.LongTermRetentionBackupListResult); err != nil { + return LongTermRetentionBackupsClientListByServerResponse{}, err + } + return result, nil +} + +// BeginUpdate - Updates an existing long term retention backup. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-05-01-preview +// - locationName - The location of the database. +// - longTermRetentionServerName - The name of the server +// - longTermRetentionDatabaseName - The name of the database +// - backupName - The backup name. +// - parameters - The requested backup resource state +// - options - LongTermRetentionBackupsClientBeginUpdateOptions contains the optional parameters for the LongTermRetentionBackupsClient.BeginUpdate +// method. +func (client *LongTermRetentionBackupsClient) BeginUpdate(ctx context.Context, locationName string, longTermRetentionServerName string, longTermRetentionDatabaseName string, backupName string, parameters UpdateLongTermRetentionBackupParameters, options *LongTermRetentionBackupsClientBeginUpdateOptions) (*runtime.Poller[LongTermRetentionBackupsClientUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.update(ctx, locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[LongTermRetentionBackupsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[LongTermRetentionBackupsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Update - Updates an existing long term retention backup. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-05-01-preview +func (client *LongTermRetentionBackupsClient) update(ctx context.Context, locationName string, longTermRetentionServerName string, longTermRetentionDatabaseName string, backupName string, parameters UpdateLongTermRetentionBackupParameters, options *LongTermRetentionBackupsClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "LongTermRetentionBackupsClient.BeginUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// updateCreateRequest creates the Update request. +func (client *LongTermRetentionBackupsClient) updateCreateRequest(ctx context.Context, locationName string, longTermRetentionServerName string, longTermRetentionDatabaseName string, backupName string, parameters UpdateLongTermRetentionBackupParameters, options *LongTermRetentionBackupsClientBeginUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}/update" + if locationName == "" { + return nil, errors.New("parameter locationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{locationName}", url.PathEscape(locationName)) + if longTermRetentionServerName == "" { + return nil, errors.New("parameter longTermRetentionServerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{longTermRetentionServerName}", url.PathEscape(longTermRetentionServerName)) + if longTermRetentionDatabaseName == "" { + return nil, errors.New("parameter longTermRetentionDatabaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{longTermRetentionDatabaseName}", url.PathEscape(longTermRetentionDatabaseName)) + if backupName == "" { + return nil, errors.New("parameter backupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{backupName}", url.PathEscape(backupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-05-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginUpdateByResourceGroup - Updates an existing long term retention backup. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-05-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - locationName - The location of the database. +// - longTermRetentionServerName - The name of the server +// - longTermRetentionDatabaseName - The name of the database +// - backupName - The backup name. +// - parameters - The requested backup resource state +// - options - LongTermRetentionBackupsClientBeginUpdateByResourceGroupOptions contains the optional parameters for the LongTermRetentionBackupsClient.BeginUpdateByResourceGroup +// method. +func (client *LongTermRetentionBackupsClient) BeginUpdateByResourceGroup(ctx context.Context, resourceGroupName string, locationName string, longTermRetentionServerName string, longTermRetentionDatabaseName string, backupName string, parameters UpdateLongTermRetentionBackupParameters, options *LongTermRetentionBackupsClientBeginUpdateByResourceGroupOptions) (*runtime.Poller[LongTermRetentionBackupsClientUpdateByResourceGroupResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.updateByResourceGroup(ctx, resourceGroupName, locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[LongTermRetentionBackupsClientUpdateByResourceGroupResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[LongTermRetentionBackupsClientUpdateByResourceGroupResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// UpdateByResourceGroup - Updates an existing long term retention backup. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-05-01-preview +func (client *LongTermRetentionBackupsClient) updateByResourceGroup(ctx context.Context, resourceGroupName string, locationName string, longTermRetentionServerName string, longTermRetentionDatabaseName string, backupName string, parameters UpdateLongTermRetentionBackupParameters, options *LongTermRetentionBackupsClientBeginUpdateByResourceGroupOptions) (*http.Response, error) { + var err error + const operationName = "LongTermRetentionBackupsClient.BeginUpdateByResourceGroup" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateByResourceGroupCreateRequest(ctx, resourceGroupName, locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// updateByResourceGroupCreateRequest creates the UpdateByResourceGroup request. +func (client *LongTermRetentionBackupsClient) updateByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, locationName string, longTermRetentionServerName string, longTermRetentionDatabaseName string, backupName string, parameters UpdateLongTermRetentionBackupParameters, options *LongTermRetentionBackupsClientBeginUpdateByResourceGroupOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}/update" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if locationName == "" { + return nil, errors.New("parameter locationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{locationName}", url.PathEscape(locationName)) + if longTermRetentionServerName == "" { + return nil, errors.New("parameter longTermRetentionServerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{longTermRetentionServerName}", url.PathEscape(longTermRetentionServerName)) + if longTermRetentionDatabaseName == "" { + return nil, errors.New("parameter longTermRetentionDatabaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{longTermRetentionDatabaseName}", url.PathEscape(longTermRetentionDatabaseName)) + if backupName == "" { + return nil, errors.New("parameter backupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{backupName}", url.PathEscape(backupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-05-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/longtermretentionmanagedinstancebackups_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/longtermretentionmanagedinstancebackups_client.go new file mode 100644 index 000000000..75a019cde --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/longtermretentionmanagedinstancebackups_client.go @@ -0,0 +1,821 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// LongTermRetentionManagedInstanceBackupsClient contains the methods for the LongTermRetentionManagedInstanceBackups group. +// Don't use this type directly, use NewLongTermRetentionManagedInstanceBackupsClient() instead. +type LongTermRetentionManagedInstanceBackupsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewLongTermRetentionManagedInstanceBackupsClient creates a new instance of LongTermRetentionManagedInstanceBackupsClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewLongTermRetentionManagedInstanceBackupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LongTermRetentionManagedInstanceBackupsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &LongTermRetentionManagedInstanceBackupsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginDelete - Deletes a long term retention backup. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-05-01-preview +// - locationName - The location of the database. +// - managedInstanceName - The name of the managed instance. +// - databaseName - The name of the managed database. +// - backupName - The backup name. +// - options - LongTermRetentionManagedInstanceBackupsClientBeginDeleteOptions contains the optional parameters for the LongTermRetentionManagedInstanceBackupsClient.BeginDelete +// method. +func (client *LongTermRetentionManagedInstanceBackupsClient) BeginDelete(ctx context.Context, locationName string, managedInstanceName string, databaseName string, backupName string, options *LongTermRetentionManagedInstanceBackupsClientBeginDeleteOptions) (*runtime.Poller[LongTermRetentionManagedInstanceBackupsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, locationName, managedInstanceName, databaseName, backupName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[LongTermRetentionManagedInstanceBackupsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[LongTermRetentionManagedInstanceBackupsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes a long term retention backup. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-05-01-preview +func (client *LongTermRetentionManagedInstanceBackupsClient) deleteOperation(ctx context.Context, locationName string, managedInstanceName string, databaseName string, backupName string, options *LongTermRetentionManagedInstanceBackupsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "LongTermRetentionManagedInstanceBackupsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, locationName, managedInstanceName, databaseName, backupName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *LongTermRetentionManagedInstanceBackupsClient) deleteCreateRequest(ctx context.Context, locationName string, managedInstanceName string, databaseName string, backupName string, options *LongTermRetentionManagedInstanceBackupsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstances/{managedInstanceName}/longTermRetentionDatabases/{databaseName}/longTermRetentionManagedInstanceBackups/{backupName}" + if locationName == "" { + return nil, errors.New("parameter locationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{locationName}", url.PathEscape(locationName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if backupName == "" { + return nil, errors.New("parameter backupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{backupName}", url.PathEscape(backupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-05-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + return req, nil +} + +// BeginDeleteByResourceGroup - Deletes a long term retention backup. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-05-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - locationName - The location of the database +// - managedInstanceName - The name of the managed instance. +// - databaseName - The name of the managed database. +// - backupName - The backup name. +// - options - LongTermRetentionManagedInstanceBackupsClientBeginDeleteByResourceGroupOptions contains the optional parameters +// for the LongTermRetentionManagedInstanceBackupsClient.BeginDeleteByResourceGroup method. +func (client *LongTermRetentionManagedInstanceBackupsClient) BeginDeleteByResourceGroup(ctx context.Context, resourceGroupName string, locationName string, managedInstanceName string, databaseName string, backupName string, options *LongTermRetentionManagedInstanceBackupsClientBeginDeleteByResourceGroupOptions) (*runtime.Poller[LongTermRetentionManagedInstanceBackupsClientDeleteByResourceGroupResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteByResourceGroup(ctx, resourceGroupName, locationName, managedInstanceName, databaseName, backupName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[LongTermRetentionManagedInstanceBackupsClientDeleteByResourceGroupResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[LongTermRetentionManagedInstanceBackupsClientDeleteByResourceGroupResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// DeleteByResourceGroup - Deletes a long term retention backup. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-05-01-preview +func (client *LongTermRetentionManagedInstanceBackupsClient) deleteByResourceGroup(ctx context.Context, resourceGroupName string, locationName string, managedInstanceName string, databaseName string, backupName string, options *LongTermRetentionManagedInstanceBackupsClientBeginDeleteByResourceGroupOptions) (*http.Response, error) { + var err error + const operationName = "LongTermRetentionManagedInstanceBackupsClient.BeginDeleteByResourceGroup" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteByResourceGroupCreateRequest(ctx, resourceGroupName, locationName, managedInstanceName, databaseName, backupName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteByResourceGroupCreateRequest creates the DeleteByResourceGroup request. +func (client *LongTermRetentionManagedInstanceBackupsClient) deleteByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, locationName string, managedInstanceName string, databaseName string, backupName string, options *LongTermRetentionManagedInstanceBackupsClientBeginDeleteByResourceGroupOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstances/{managedInstanceName}/longTermRetentionDatabases/{databaseName}/longTermRetentionManagedInstanceBackups/{backupName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if locationName == "" { + return nil, errors.New("parameter locationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{locationName}", url.PathEscape(locationName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if backupName == "" { + return nil, errors.New("parameter backupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{backupName}", url.PathEscape(backupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-05-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + return req, nil +} + +// Get - Gets a long term retention backup for a managed database. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-05-01-preview +// - locationName - The location of the database. +// - managedInstanceName - The name of the managed instance. +// - databaseName - The name of the managed database. +// - backupName - The backup name. +// - options - LongTermRetentionManagedInstanceBackupsClientGetOptions contains the optional parameters for the LongTermRetentionManagedInstanceBackupsClient.Get +// method. +func (client *LongTermRetentionManagedInstanceBackupsClient) Get(ctx context.Context, locationName string, managedInstanceName string, databaseName string, backupName string, options *LongTermRetentionManagedInstanceBackupsClientGetOptions) (LongTermRetentionManagedInstanceBackupsClientGetResponse, error) { + var err error + const operationName = "LongTermRetentionManagedInstanceBackupsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, locationName, managedInstanceName, databaseName, backupName, options) + if err != nil { + return LongTermRetentionManagedInstanceBackupsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return LongTermRetentionManagedInstanceBackupsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return LongTermRetentionManagedInstanceBackupsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *LongTermRetentionManagedInstanceBackupsClient) getCreateRequest(ctx context.Context, locationName string, managedInstanceName string, databaseName string, backupName string, options *LongTermRetentionManagedInstanceBackupsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstances/{managedInstanceName}/longTermRetentionDatabases/{databaseName}/longTermRetentionManagedInstanceBackups/{backupName}" + if locationName == "" { + return nil, errors.New("parameter locationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{locationName}", url.PathEscape(locationName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if backupName == "" { + return nil, errors.New("parameter backupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{backupName}", url.PathEscape(backupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-05-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *LongTermRetentionManagedInstanceBackupsClient) getHandleResponse(resp *http.Response) (LongTermRetentionManagedInstanceBackupsClientGetResponse, error) { + result := LongTermRetentionManagedInstanceBackupsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ManagedInstanceLongTermRetentionBackup); err != nil { + return LongTermRetentionManagedInstanceBackupsClientGetResponse{}, err + } + return result, nil +} + +// GetByResourceGroup - Gets a long term retention backup for a managed database. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-05-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - locationName - The location of the database. +// - managedInstanceName - The name of the managed instance. +// - databaseName - The name of the managed database. +// - backupName - The backup name. +// - options - LongTermRetentionManagedInstanceBackupsClientGetByResourceGroupOptions contains the optional parameters for the +// LongTermRetentionManagedInstanceBackupsClient.GetByResourceGroup method. +func (client *LongTermRetentionManagedInstanceBackupsClient) GetByResourceGroup(ctx context.Context, resourceGroupName string, locationName string, managedInstanceName string, databaseName string, backupName string, options *LongTermRetentionManagedInstanceBackupsClientGetByResourceGroupOptions) (LongTermRetentionManagedInstanceBackupsClientGetByResourceGroupResponse, error) { + var err error + const operationName = "LongTermRetentionManagedInstanceBackupsClient.GetByResourceGroup" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getByResourceGroupCreateRequest(ctx, resourceGroupName, locationName, managedInstanceName, databaseName, backupName, options) + if err != nil { + return LongTermRetentionManagedInstanceBackupsClientGetByResourceGroupResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return LongTermRetentionManagedInstanceBackupsClientGetByResourceGroupResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return LongTermRetentionManagedInstanceBackupsClientGetByResourceGroupResponse{}, err + } + resp, err := client.getByResourceGroupHandleResponse(httpResp) + return resp, err +} + +// getByResourceGroupCreateRequest creates the GetByResourceGroup request. +func (client *LongTermRetentionManagedInstanceBackupsClient) getByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, locationName string, managedInstanceName string, databaseName string, backupName string, options *LongTermRetentionManagedInstanceBackupsClientGetByResourceGroupOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstances/{managedInstanceName}/longTermRetentionDatabases/{databaseName}/longTermRetentionManagedInstanceBackups/{backupName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if locationName == "" { + return nil, errors.New("parameter locationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{locationName}", url.PathEscape(locationName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if backupName == "" { + return nil, errors.New("parameter backupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{backupName}", url.PathEscape(backupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-05-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getByResourceGroupHandleResponse handles the GetByResourceGroup response. +func (client *LongTermRetentionManagedInstanceBackupsClient) getByResourceGroupHandleResponse(resp *http.Response) (LongTermRetentionManagedInstanceBackupsClientGetByResourceGroupResponse, error) { + result := LongTermRetentionManagedInstanceBackupsClientGetByResourceGroupResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ManagedInstanceLongTermRetentionBackup); err != nil { + return LongTermRetentionManagedInstanceBackupsClientGetByResourceGroupResponse{}, err + } + return result, nil +} + +// NewListByDatabasePager - Lists all long term retention backups for a managed database. +// +// Generated from API version 2021-05-01-preview +// - locationName - The location of the database. +// - managedInstanceName - The name of the managed instance. +// - databaseName - The name of the managed database. +// - options - LongTermRetentionManagedInstanceBackupsClientListByDatabaseOptions contains the optional parameters for the LongTermRetentionManagedInstanceBackupsClient.NewListByDatabasePager +// method. +func (client *LongTermRetentionManagedInstanceBackupsClient) NewListByDatabasePager(locationName string, managedInstanceName string, databaseName string, options *LongTermRetentionManagedInstanceBackupsClientListByDatabaseOptions) *runtime.Pager[LongTermRetentionManagedInstanceBackupsClientListByDatabaseResponse] { + return runtime.NewPager(runtime.PagingHandler[LongTermRetentionManagedInstanceBackupsClientListByDatabaseResponse]{ + More: func(page LongTermRetentionManagedInstanceBackupsClientListByDatabaseResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *LongTermRetentionManagedInstanceBackupsClientListByDatabaseResponse) (LongTermRetentionManagedInstanceBackupsClientListByDatabaseResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "LongTermRetentionManagedInstanceBackupsClient.NewListByDatabasePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByDatabaseCreateRequest(ctx, locationName, managedInstanceName, databaseName, options) + }, nil) + if err != nil { + return LongTermRetentionManagedInstanceBackupsClientListByDatabaseResponse{}, err + } + return client.listByDatabaseHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByDatabaseCreateRequest creates the ListByDatabase request. +func (client *LongTermRetentionManagedInstanceBackupsClient) listByDatabaseCreateRequest(ctx context.Context, locationName string, managedInstanceName string, databaseName string, options *LongTermRetentionManagedInstanceBackupsClientListByDatabaseOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstances/{managedInstanceName}/longTermRetentionDatabases/{databaseName}/longTermRetentionManagedInstanceBackups" + if locationName == "" { + return nil, errors.New("parameter locationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{locationName}", url.PathEscape(locationName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.OnlyLatestPerDatabase != nil { + reqQP.Set("onlyLatestPerDatabase", strconv.FormatBool(*options.OnlyLatestPerDatabase)) + } + if options != nil && options.DatabaseState != nil { + reqQP.Set("databaseState", string(*options.DatabaseState)) + } + reqQP.Set("api-version", "2021-05-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByDatabaseHandleResponse handles the ListByDatabase response. +func (client *LongTermRetentionManagedInstanceBackupsClient) listByDatabaseHandleResponse(resp *http.Response) (LongTermRetentionManagedInstanceBackupsClientListByDatabaseResponse, error) { + result := LongTermRetentionManagedInstanceBackupsClientListByDatabaseResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ManagedInstanceLongTermRetentionBackupListResult); err != nil { + return LongTermRetentionManagedInstanceBackupsClientListByDatabaseResponse{}, err + } + return result, nil +} + +// NewListByInstancePager - Lists the long term retention backups for a given managed instance. +// +// Generated from API version 2021-05-01-preview +// - locationName - The location of the database +// - managedInstanceName - The name of the managed instance. +// - options - LongTermRetentionManagedInstanceBackupsClientListByInstanceOptions contains the optional parameters for the LongTermRetentionManagedInstanceBackupsClient.NewListByInstancePager +// method. +func (client *LongTermRetentionManagedInstanceBackupsClient) NewListByInstancePager(locationName string, managedInstanceName string, options *LongTermRetentionManagedInstanceBackupsClientListByInstanceOptions) *runtime.Pager[LongTermRetentionManagedInstanceBackupsClientListByInstanceResponse] { + return runtime.NewPager(runtime.PagingHandler[LongTermRetentionManagedInstanceBackupsClientListByInstanceResponse]{ + More: func(page LongTermRetentionManagedInstanceBackupsClientListByInstanceResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *LongTermRetentionManagedInstanceBackupsClientListByInstanceResponse) (LongTermRetentionManagedInstanceBackupsClientListByInstanceResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "LongTermRetentionManagedInstanceBackupsClient.NewListByInstancePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByInstanceCreateRequest(ctx, locationName, managedInstanceName, options) + }, nil) + if err != nil { + return LongTermRetentionManagedInstanceBackupsClientListByInstanceResponse{}, err + } + return client.listByInstanceHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByInstanceCreateRequest creates the ListByInstance request. +func (client *LongTermRetentionManagedInstanceBackupsClient) listByInstanceCreateRequest(ctx context.Context, locationName string, managedInstanceName string, options *LongTermRetentionManagedInstanceBackupsClientListByInstanceOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstances/{managedInstanceName}/longTermRetentionManagedInstanceBackups" + if locationName == "" { + return nil, errors.New("parameter locationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{locationName}", url.PathEscape(locationName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.OnlyLatestPerDatabase != nil { + reqQP.Set("onlyLatestPerDatabase", strconv.FormatBool(*options.OnlyLatestPerDatabase)) + } + if options != nil && options.DatabaseState != nil { + reqQP.Set("databaseState", string(*options.DatabaseState)) + } + reqQP.Set("api-version", "2021-05-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByInstanceHandleResponse handles the ListByInstance response. +func (client *LongTermRetentionManagedInstanceBackupsClient) listByInstanceHandleResponse(resp *http.Response) (LongTermRetentionManagedInstanceBackupsClientListByInstanceResponse, error) { + result := LongTermRetentionManagedInstanceBackupsClientListByInstanceResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ManagedInstanceLongTermRetentionBackupListResult); err != nil { + return LongTermRetentionManagedInstanceBackupsClientListByInstanceResponse{}, err + } + return result, nil +} + +// NewListByLocationPager - Lists the long term retention backups for managed databases in a given location. +// +// Generated from API version 2021-05-01-preview +// - locationName - The location of the database. +// - options - LongTermRetentionManagedInstanceBackupsClientListByLocationOptions contains the optional parameters for the LongTermRetentionManagedInstanceBackupsClient.NewListByLocationPager +// method. +func (client *LongTermRetentionManagedInstanceBackupsClient) NewListByLocationPager(locationName string, options *LongTermRetentionManagedInstanceBackupsClientListByLocationOptions) *runtime.Pager[LongTermRetentionManagedInstanceBackupsClientListByLocationResponse] { + return runtime.NewPager(runtime.PagingHandler[LongTermRetentionManagedInstanceBackupsClientListByLocationResponse]{ + More: func(page LongTermRetentionManagedInstanceBackupsClientListByLocationResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *LongTermRetentionManagedInstanceBackupsClientListByLocationResponse) (LongTermRetentionManagedInstanceBackupsClientListByLocationResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "LongTermRetentionManagedInstanceBackupsClient.NewListByLocationPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByLocationCreateRequest(ctx, locationName, options) + }, nil) + if err != nil { + return LongTermRetentionManagedInstanceBackupsClientListByLocationResponse{}, err + } + return client.listByLocationHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByLocationCreateRequest creates the ListByLocation request. +func (client *LongTermRetentionManagedInstanceBackupsClient) listByLocationCreateRequest(ctx context.Context, locationName string, options *LongTermRetentionManagedInstanceBackupsClientListByLocationOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstanceBackups" + if locationName == "" { + return nil, errors.New("parameter locationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{locationName}", url.PathEscape(locationName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.OnlyLatestPerDatabase != nil { + reqQP.Set("onlyLatestPerDatabase", strconv.FormatBool(*options.OnlyLatestPerDatabase)) + } + if options != nil && options.DatabaseState != nil { + reqQP.Set("databaseState", string(*options.DatabaseState)) + } + reqQP.Set("api-version", "2021-05-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByLocationHandleResponse handles the ListByLocation response. +func (client *LongTermRetentionManagedInstanceBackupsClient) listByLocationHandleResponse(resp *http.Response) (LongTermRetentionManagedInstanceBackupsClientListByLocationResponse, error) { + result := LongTermRetentionManagedInstanceBackupsClientListByLocationResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ManagedInstanceLongTermRetentionBackupListResult); err != nil { + return LongTermRetentionManagedInstanceBackupsClientListByLocationResponse{}, err + } + return result, nil +} + +// NewListByResourceGroupDatabasePager - Lists all long term retention backups for a managed database. +// +// Generated from API version 2021-05-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - locationName - The location of the database +// - managedInstanceName - The name of the managed instance. +// - databaseName - The name of the managed database. +// - options - LongTermRetentionManagedInstanceBackupsClientListByResourceGroupDatabaseOptions contains the optional parameters +// for the LongTermRetentionManagedInstanceBackupsClient.NewListByResourceGroupDatabasePager method. +func (client *LongTermRetentionManagedInstanceBackupsClient) NewListByResourceGroupDatabasePager(resourceGroupName string, locationName string, managedInstanceName string, databaseName string, options *LongTermRetentionManagedInstanceBackupsClientListByResourceGroupDatabaseOptions) *runtime.Pager[LongTermRetentionManagedInstanceBackupsClientListByResourceGroupDatabaseResponse] { + return runtime.NewPager(runtime.PagingHandler[LongTermRetentionManagedInstanceBackupsClientListByResourceGroupDatabaseResponse]{ + More: func(page LongTermRetentionManagedInstanceBackupsClientListByResourceGroupDatabaseResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *LongTermRetentionManagedInstanceBackupsClientListByResourceGroupDatabaseResponse) (LongTermRetentionManagedInstanceBackupsClientListByResourceGroupDatabaseResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "LongTermRetentionManagedInstanceBackupsClient.NewListByResourceGroupDatabasePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByResourceGroupDatabaseCreateRequest(ctx, resourceGroupName, locationName, managedInstanceName, databaseName, options) + }, nil) + if err != nil { + return LongTermRetentionManagedInstanceBackupsClientListByResourceGroupDatabaseResponse{}, err + } + return client.listByResourceGroupDatabaseHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByResourceGroupDatabaseCreateRequest creates the ListByResourceGroupDatabase request. +func (client *LongTermRetentionManagedInstanceBackupsClient) listByResourceGroupDatabaseCreateRequest(ctx context.Context, resourceGroupName string, locationName string, managedInstanceName string, databaseName string, options *LongTermRetentionManagedInstanceBackupsClientListByResourceGroupDatabaseOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstances/{managedInstanceName}/longTermRetentionDatabases/{databaseName}/longTermRetentionManagedInstanceBackups" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if locationName == "" { + return nil, errors.New("parameter locationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{locationName}", url.PathEscape(locationName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.OnlyLatestPerDatabase != nil { + reqQP.Set("onlyLatestPerDatabase", strconv.FormatBool(*options.OnlyLatestPerDatabase)) + } + if options != nil && options.DatabaseState != nil { + reqQP.Set("databaseState", string(*options.DatabaseState)) + } + reqQP.Set("api-version", "2021-05-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByResourceGroupDatabaseHandleResponse handles the ListByResourceGroupDatabase response. +func (client *LongTermRetentionManagedInstanceBackupsClient) listByResourceGroupDatabaseHandleResponse(resp *http.Response) (LongTermRetentionManagedInstanceBackupsClientListByResourceGroupDatabaseResponse, error) { + result := LongTermRetentionManagedInstanceBackupsClientListByResourceGroupDatabaseResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ManagedInstanceLongTermRetentionBackupListResult); err != nil { + return LongTermRetentionManagedInstanceBackupsClientListByResourceGroupDatabaseResponse{}, err + } + return result, nil +} + +// NewListByResourceGroupInstancePager - Lists the long term retention backups for a given managed instance. +// +// Generated from API version 2021-05-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - locationName - The location of the database. +// - managedInstanceName - The name of the managed instance. +// - options - LongTermRetentionManagedInstanceBackupsClientListByResourceGroupInstanceOptions contains the optional parameters +// for the LongTermRetentionManagedInstanceBackupsClient.NewListByResourceGroupInstancePager method. +func (client *LongTermRetentionManagedInstanceBackupsClient) NewListByResourceGroupInstancePager(resourceGroupName string, locationName string, managedInstanceName string, options *LongTermRetentionManagedInstanceBackupsClientListByResourceGroupInstanceOptions) *runtime.Pager[LongTermRetentionManagedInstanceBackupsClientListByResourceGroupInstanceResponse] { + return runtime.NewPager(runtime.PagingHandler[LongTermRetentionManagedInstanceBackupsClientListByResourceGroupInstanceResponse]{ + More: func(page LongTermRetentionManagedInstanceBackupsClientListByResourceGroupInstanceResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *LongTermRetentionManagedInstanceBackupsClientListByResourceGroupInstanceResponse) (LongTermRetentionManagedInstanceBackupsClientListByResourceGroupInstanceResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "LongTermRetentionManagedInstanceBackupsClient.NewListByResourceGroupInstancePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByResourceGroupInstanceCreateRequest(ctx, resourceGroupName, locationName, managedInstanceName, options) + }, nil) + if err != nil { + return LongTermRetentionManagedInstanceBackupsClientListByResourceGroupInstanceResponse{}, err + } + return client.listByResourceGroupInstanceHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByResourceGroupInstanceCreateRequest creates the ListByResourceGroupInstance request. +func (client *LongTermRetentionManagedInstanceBackupsClient) listByResourceGroupInstanceCreateRequest(ctx context.Context, resourceGroupName string, locationName string, managedInstanceName string, options *LongTermRetentionManagedInstanceBackupsClientListByResourceGroupInstanceOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstances/{managedInstanceName}/longTermRetentionManagedInstanceBackups" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if locationName == "" { + return nil, errors.New("parameter locationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{locationName}", url.PathEscape(locationName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.OnlyLatestPerDatabase != nil { + reqQP.Set("onlyLatestPerDatabase", strconv.FormatBool(*options.OnlyLatestPerDatabase)) + } + if options != nil && options.DatabaseState != nil { + reqQP.Set("databaseState", string(*options.DatabaseState)) + } + reqQP.Set("api-version", "2021-05-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByResourceGroupInstanceHandleResponse handles the ListByResourceGroupInstance response. +func (client *LongTermRetentionManagedInstanceBackupsClient) listByResourceGroupInstanceHandleResponse(resp *http.Response) (LongTermRetentionManagedInstanceBackupsClientListByResourceGroupInstanceResponse, error) { + result := LongTermRetentionManagedInstanceBackupsClientListByResourceGroupInstanceResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ManagedInstanceLongTermRetentionBackupListResult); err != nil { + return LongTermRetentionManagedInstanceBackupsClientListByResourceGroupInstanceResponse{}, err + } + return result, nil +} + +// NewListByResourceGroupLocationPager - Lists the long term retention backups for managed databases in a given location. +// +// Generated from API version 2021-05-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - locationName - The location of the database. +// - options - LongTermRetentionManagedInstanceBackupsClientListByResourceGroupLocationOptions contains the optional parameters +// for the LongTermRetentionManagedInstanceBackupsClient.NewListByResourceGroupLocationPager method. +func (client *LongTermRetentionManagedInstanceBackupsClient) NewListByResourceGroupLocationPager(resourceGroupName string, locationName string, options *LongTermRetentionManagedInstanceBackupsClientListByResourceGroupLocationOptions) *runtime.Pager[LongTermRetentionManagedInstanceBackupsClientListByResourceGroupLocationResponse] { + return runtime.NewPager(runtime.PagingHandler[LongTermRetentionManagedInstanceBackupsClientListByResourceGroupLocationResponse]{ + More: func(page LongTermRetentionManagedInstanceBackupsClientListByResourceGroupLocationResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *LongTermRetentionManagedInstanceBackupsClientListByResourceGroupLocationResponse) (LongTermRetentionManagedInstanceBackupsClientListByResourceGroupLocationResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "LongTermRetentionManagedInstanceBackupsClient.NewListByResourceGroupLocationPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByResourceGroupLocationCreateRequest(ctx, resourceGroupName, locationName, options) + }, nil) + if err != nil { + return LongTermRetentionManagedInstanceBackupsClientListByResourceGroupLocationResponse{}, err + } + return client.listByResourceGroupLocationHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByResourceGroupLocationCreateRequest creates the ListByResourceGroupLocation request. +func (client *LongTermRetentionManagedInstanceBackupsClient) listByResourceGroupLocationCreateRequest(ctx context.Context, resourceGroupName string, locationName string, options *LongTermRetentionManagedInstanceBackupsClientListByResourceGroupLocationOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstanceBackups" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if locationName == "" { + return nil, errors.New("parameter locationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{locationName}", url.PathEscape(locationName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.OnlyLatestPerDatabase != nil { + reqQP.Set("onlyLatestPerDatabase", strconv.FormatBool(*options.OnlyLatestPerDatabase)) + } + if options != nil && options.DatabaseState != nil { + reqQP.Set("databaseState", string(*options.DatabaseState)) + } + reqQP.Set("api-version", "2021-05-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByResourceGroupLocationHandleResponse handles the ListByResourceGroupLocation response. +func (client *LongTermRetentionManagedInstanceBackupsClient) listByResourceGroupLocationHandleResponse(resp *http.Response) (LongTermRetentionManagedInstanceBackupsClientListByResourceGroupLocationResponse, error) { + result := LongTermRetentionManagedInstanceBackupsClientListByResourceGroupLocationResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ManagedInstanceLongTermRetentionBackupListResult); err != nil { + return LongTermRetentionManagedInstanceBackupsClientListByResourceGroupLocationResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/longtermretentionpolicies_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/longtermretentionpolicies_client.go new file mode 100644 index 000000000..f4cc39f13 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/longtermretentionpolicies_client.go @@ -0,0 +1,282 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// LongTermRetentionPoliciesClient contains the methods for the LongTermRetentionPolicies group. +// Don't use this type directly, use NewLongTermRetentionPoliciesClient() instead. +type LongTermRetentionPoliciesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewLongTermRetentionPoliciesClient creates a new instance of LongTermRetentionPoliciesClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewLongTermRetentionPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LongTermRetentionPoliciesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &LongTermRetentionPoliciesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Sets a database's long term retention policy. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database. +// - policyName - The policy name. Should always be Default. +// - parameters - The long term retention policy info. +// - options - LongTermRetentionPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the LongTermRetentionPoliciesClient.BeginCreateOrUpdate +// method. +func (client *LongTermRetentionPoliciesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, policyName LongTermRetentionPolicyName, parameters LongTermRetentionPolicy, options *LongTermRetentionPoliciesClientBeginCreateOrUpdateOptions) (*runtime.Poller[LongTermRetentionPoliciesClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, serverName, databaseName, policyName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[LongTermRetentionPoliciesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[LongTermRetentionPoliciesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Sets a database's long term retention policy. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +func (client *LongTermRetentionPoliciesClient) createOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, policyName LongTermRetentionPolicyName, parameters LongTermRetentionPolicy, options *LongTermRetentionPoliciesClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "LongTermRetentionPoliciesClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serverName, databaseName, policyName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *LongTermRetentionPoliciesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, policyName LongTermRetentionPolicyName, parameters LongTermRetentionPolicy, options *LongTermRetentionPoliciesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupLongTermRetentionPolicies/{policyName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if policyName == "" { + return nil, errors.New("parameter policyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{policyName}", url.PathEscape(string(policyName))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// Get - Gets a database's long term retention policy. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database. +// - policyName - The policy name. Should always be Default. +// - options - LongTermRetentionPoliciesClientGetOptions contains the optional parameters for the LongTermRetentionPoliciesClient.Get +// method. +func (client *LongTermRetentionPoliciesClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, policyName LongTermRetentionPolicyName, options *LongTermRetentionPoliciesClientGetOptions) (LongTermRetentionPoliciesClientGetResponse, error) { + var err error + const operationName = "LongTermRetentionPoliciesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serverName, databaseName, policyName, options) + if err != nil { + return LongTermRetentionPoliciesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return LongTermRetentionPoliciesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return LongTermRetentionPoliciesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *LongTermRetentionPoliciesClient) getCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, policyName LongTermRetentionPolicyName, options *LongTermRetentionPoliciesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupLongTermRetentionPolicies/{policyName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if policyName == "" { + return nil, errors.New("parameter policyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{policyName}", url.PathEscape(string(policyName))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *LongTermRetentionPoliciesClient) getHandleResponse(resp *http.Response) (LongTermRetentionPoliciesClientGetResponse, error) { + result := LongTermRetentionPoliciesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.LongTermRetentionPolicy); err != nil { + return LongTermRetentionPoliciesClientGetResponse{}, err + } + return result, nil +} + +// NewListByDatabasePager - Gets a database's long term retention policy. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database. +// - options - LongTermRetentionPoliciesClientListByDatabaseOptions contains the optional parameters for the LongTermRetentionPoliciesClient.NewListByDatabasePager +// method. +func (client *LongTermRetentionPoliciesClient) NewListByDatabasePager(resourceGroupName string, serverName string, databaseName string, options *LongTermRetentionPoliciesClientListByDatabaseOptions) *runtime.Pager[LongTermRetentionPoliciesClientListByDatabaseResponse] { + return runtime.NewPager(runtime.PagingHandler[LongTermRetentionPoliciesClientListByDatabaseResponse]{ + More: func(page LongTermRetentionPoliciesClientListByDatabaseResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *LongTermRetentionPoliciesClientListByDatabaseResponse) (LongTermRetentionPoliciesClientListByDatabaseResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "LongTermRetentionPoliciesClient.NewListByDatabasePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByDatabaseCreateRequest(ctx, resourceGroupName, serverName, databaseName, options) + }, nil) + if err != nil { + return LongTermRetentionPoliciesClientListByDatabaseResponse{}, err + } + return client.listByDatabaseHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByDatabaseCreateRequest creates the ListByDatabase request. +func (client *LongTermRetentionPoliciesClient) listByDatabaseCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, options *LongTermRetentionPoliciesClientListByDatabaseOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupLongTermRetentionPolicies" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByDatabaseHandleResponse handles the ListByDatabase response. +func (client *LongTermRetentionPoliciesClient) listByDatabaseHandleResponse(resp *http.Response) (LongTermRetentionPoliciesClientListByDatabaseResponse, error) { + result := LongTermRetentionPoliciesClientListByDatabaseResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.LongTermRetentionPolicyListResult); err != nil { + return LongTermRetentionPoliciesClientListByDatabaseResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/maintenancewindowoptions_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/maintenancewindowoptions_client.go new file mode 100644 index 000000000..3d34ee555 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/maintenancewindowoptions_client.go @@ -0,0 +1,117 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// MaintenanceWindowOptionsClient contains the methods for the MaintenanceWindowOptions group. +// Don't use this type directly, use NewMaintenanceWindowOptionsClient() instead. +type MaintenanceWindowOptionsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewMaintenanceWindowOptionsClient creates a new instance of MaintenanceWindowOptionsClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewMaintenanceWindowOptionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*MaintenanceWindowOptionsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &MaintenanceWindowOptionsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Gets a list of available maintenance windows. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database to get maintenance windows options for. +// - maintenanceWindowOptionsName - Maintenance window options name. +// - options - MaintenanceWindowOptionsClientGetOptions contains the optional parameters for the MaintenanceWindowOptionsClient.Get +// method. +func (client *MaintenanceWindowOptionsClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, maintenanceWindowOptionsName string, options *MaintenanceWindowOptionsClientGetOptions) (MaintenanceWindowOptionsClientGetResponse, error) { + var err error + const operationName = "MaintenanceWindowOptionsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serverName, databaseName, maintenanceWindowOptionsName, options) + if err != nil { + return MaintenanceWindowOptionsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return MaintenanceWindowOptionsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return MaintenanceWindowOptionsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *MaintenanceWindowOptionsClient) getCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, maintenanceWindowOptionsName string, options *MaintenanceWindowOptionsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/maintenanceWindowOptions/current" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("maintenanceWindowOptionsName", maintenanceWindowOptionsName) + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *MaintenanceWindowOptionsClient) getHandleResponse(resp *http.Response) (MaintenanceWindowOptionsClientGetResponse, error) { + result := MaintenanceWindowOptionsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.MaintenanceWindowOptions); err != nil { + return MaintenanceWindowOptionsClientGetResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/maintenancewindows_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/maintenancewindows_client.go new file mode 100644 index 000000000..9e38104f2 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/maintenancewindows_client.go @@ -0,0 +1,181 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// MaintenanceWindowsClient contains the methods for the MaintenanceWindows group. +// Don't use this type directly, use NewMaintenanceWindowsClient() instead. +type MaintenanceWindowsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewMaintenanceWindowsClient creates a new instance of MaintenanceWindowsClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewMaintenanceWindowsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*MaintenanceWindowsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &MaintenanceWindowsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Sets maintenance windows settings for a database. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database to set maintenance windows for. +// - maintenanceWindowName - Maintenance window name. +// - options - MaintenanceWindowsClientCreateOrUpdateOptions contains the optional parameters for the MaintenanceWindowsClient.CreateOrUpdate +// method. +func (client *MaintenanceWindowsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, maintenanceWindowName string, parameters MaintenanceWindows, options *MaintenanceWindowsClientCreateOrUpdateOptions) (MaintenanceWindowsClientCreateOrUpdateResponse, error) { + var err error + const operationName = "MaintenanceWindowsClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serverName, databaseName, maintenanceWindowName, parameters, options) + if err != nil { + return MaintenanceWindowsClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return MaintenanceWindowsClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return MaintenanceWindowsClientCreateOrUpdateResponse{}, err + } + return MaintenanceWindowsClientCreateOrUpdateResponse{}, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *MaintenanceWindowsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, maintenanceWindowName string, parameters MaintenanceWindows, options *MaintenanceWindowsClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/maintenanceWindows/current" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("maintenanceWindowName", maintenanceWindowName) + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// Get - Gets maintenance windows settings for a database. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database to get maintenance windows for. +// - maintenanceWindowName - Maintenance window name. +// - options - MaintenanceWindowsClientGetOptions contains the optional parameters for the MaintenanceWindowsClient.Get method. +func (client *MaintenanceWindowsClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, maintenanceWindowName string, options *MaintenanceWindowsClientGetOptions) (MaintenanceWindowsClientGetResponse, error) { + var err error + const operationName = "MaintenanceWindowsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serverName, databaseName, maintenanceWindowName, options) + if err != nil { + return MaintenanceWindowsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return MaintenanceWindowsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return MaintenanceWindowsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *MaintenanceWindowsClient) getCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, maintenanceWindowName string, options *MaintenanceWindowsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/maintenanceWindows/current" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("maintenanceWindowName", maintenanceWindowName) + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *MaintenanceWindowsClient) getHandleResponse(resp *http.Response) (MaintenanceWindowsClientGetResponse, error) { + result := MaintenanceWindowsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.MaintenanceWindows); err != nil { + return MaintenanceWindowsClientGetResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/managedbackupshorttermretentionpolicies_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/managedbackupshorttermretentionpolicies_client.go new file mode 100644 index 000000000..bdd16cc35 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/managedbackupshorttermretentionpolicies_client.go @@ -0,0 +1,373 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ManagedBackupShortTermRetentionPoliciesClient contains the methods for the ManagedBackupShortTermRetentionPolicies group. +// Don't use this type directly, use NewManagedBackupShortTermRetentionPoliciesClient() instead. +type ManagedBackupShortTermRetentionPoliciesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewManagedBackupShortTermRetentionPoliciesClient creates a new instance of ManagedBackupShortTermRetentionPoliciesClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewManagedBackupShortTermRetentionPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedBackupShortTermRetentionPoliciesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ManagedBackupShortTermRetentionPoliciesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Updates a managed database's short term retention policy. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - databaseName - The name of the database. +// - policyName - The policy name. Should always be "default". +// - parameters - The short term retention policy info. +// - options - ManagedBackupShortTermRetentionPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for +// the ManagedBackupShortTermRetentionPoliciesClient.BeginCreateOrUpdate method. +func (client *ManagedBackupShortTermRetentionPoliciesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, policyName ManagedShortTermRetentionPolicyName, parameters ManagedBackupShortTermRetentionPolicy, options *ManagedBackupShortTermRetentionPoliciesClientBeginCreateOrUpdateOptions) (*runtime.Poller[ManagedBackupShortTermRetentionPoliciesClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, managedInstanceName, databaseName, policyName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ManagedBackupShortTermRetentionPoliciesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ManagedBackupShortTermRetentionPoliciesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Updates a managed database's short term retention policy. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +func (client *ManagedBackupShortTermRetentionPoliciesClient) createOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, policyName ManagedShortTermRetentionPolicyName, parameters ManagedBackupShortTermRetentionPolicy, options *ManagedBackupShortTermRetentionPoliciesClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ManagedBackupShortTermRetentionPoliciesClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, managedInstanceName, databaseName, policyName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *ManagedBackupShortTermRetentionPoliciesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, policyName ManagedShortTermRetentionPolicyName, parameters ManagedBackupShortTermRetentionPolicy, options *ManagedBackupShortTermRetentionPoliciesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/backupShortTermRetentionPolicies/{policyName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if policyName == "" { + return nil, errors.New("parameter policyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{policyName}", url.PathEscape(string(policyName))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// Get - Gets a managed database's short term retention policy. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - databaseName - The name of the database. +// - policyName - The policy name. +// - options - ManagedBackupShortTermRetentionPoliciesClientGetOptions contains the optional parameters for the ManagedBackupShortTermRetentionPoliciesClient.Get +// method. +func (client *ManagedBackupShortTermRetentionPoliciesClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, policyName ManagedShortTermRetentionPolicyName, options *ManagedBackupShortTermRetentionPoliciesClientGetOptions) (ManagedBackupShortTermRetentionPoliciesClientGetResponse, error) { + var err error + const operationName = "ManagedBackupShortTermRetentionPoliciesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, managedInstanceName, databaseName, policyName, options) + if err != nil { + return ManagedBackupShortTermRetentionPoliciesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ManagedBackupShortTermRetentionPoliciesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ManagedBackupShortTermRetentionPoliciesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ManagedBackupShortTermRetentionPoliciesClient) getCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, policyName ManagedShortTermRetentionPolicyName, options *ManagedBackupShortTermRetentionPoliciesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/backupShortTermRetentionPolicies/{policyName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if policyName == "" { + return nil, errors.New("parameter policyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{policyName}", url.PathEscape(string(policyName))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ManagedBackupShortTermRetentionPoliciesClient) getHandleResponse(resp *http.Response) (ManagedBackupShortTermRetentionPoliciesClientGetResponse, error) { + result := ManagedBackupShortTermRetentionPoliciesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ManagedBackupShortTermRetentionPolicy); err != nil { + return ManagedBackupShortTermRetentionPoliciesClientGetResponse{}, err + } + return result, nil +} + +// NewListByDatabasePager - Gets a managed database's short term retention policy list. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - databaseName - The name of the database. +// - options - ManagedBackupShortTermRetentionPoliciesClientListByDatabaseOptions contains the optional parameters for the ManagedBackupShortTermRetentionPoliciesClient.NewListByDatabasePager +// method. +func (client *ManagedBackupShortTermRetentionPoliciesClient) NewListByDatabasePager(resourceGroupName string, managedInstanceName string, databaseName string, options *ManagedBackupShortTermRetentionPoliciesClientListByDatabaseOptions) *runtime.Pager[ManagedBackupShortTermRetentionPoliciesClientListByDatabaseResponse] { + return runtime.NewPager(runtime.PagingHandler[ManagedBackupShortTermRetentionPoliciesClientListByDatabaseResponse]{ + More: func(page ManagedBackupShortTermRetentionPoliciesClientListByDatabaseResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ManagedBackupShortTermRetentionPoliciesClientListByDatabaseResponse) (ManagedBackupShortTermRetentionPoliciesClientListByDatabaseResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ManagedBackupShortTermRetentionPoliciesClient.NewListByDatabasePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByDatabaseCreateRequest(ctx, resourceGroupName, managedInstanceName, databaseName, options) + }, nil) + if err != nil { + return ManagedBackupShortTermRetentionPoliciesClientListByDatabaseResponse{}, err + } + return client.listByDatabaseHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByDatabaseCreateRequest creates the ListByDatabase request. +func (client *ManagedBackupShortTermRetentionPoliciesClient) listByDatabaseCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, options *ManagedBackupShortTermRetentionPoliciesClientListByDatabaseOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/backupShortTermRetentionPolicies" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByDatabaseHandleResponse handles the ListByDatabase response. +func (client *ManagedBackupShortTermRetentionPoliciesClient) listByDatabaseHandleResponse(resp *http.Response) (ManagedBackupShortTermRetentionPoliciesClientListByDatabaseResponse, error) { + result := ManagedBackupShortTermRetentionPoliciesClientListByDatabaseResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ManagedBackupShortTermRetentionPolicyListResult); err != nil { + return ManagedBackupShortTermRetentionPoliciesClientListByDatabaseResponse{}, err + } + return result, nil +} + +// BeginUpdate - Updates a managed database's short term retention policy. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - databaseName - The name of the database. +// - policyName - The policy name. Should always be "default". +// - parameters - The short term retention policy info. +// - options - ManagedBackupShortTermRetentionPoliciesClientBeginUpdateOptions contains the optional parameters for the ManagedBackupShortTermRetentionPoliciesClient.BeginUpdate +// method. +func (client *ManagedBackupShortTermRetentionPoliciesClient) BeginUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, policyName ManagedShortTermRetentionPolicyName, parameters ManagedBackupShortTermRetentionPolicy, options *ManagedBackupShortTermRetentionPoliciesClientBeginUpdateOptions) (*runtime.Poller[ManagedBackupShortTermRetentionPoliciesClientUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.update(ctx, resourceGroupName, managedInstanceName, databaseName, policyName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ManagedBackupShortTermRetentionPoliciesClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ManagedBackupShortTermRetentionPoliciesClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Update - Updates a managed database's short term retention policy. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +func (client *ManagedBackupShortTermRetentionPoliciesClient) update(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, policyName ManagedShortTermRetentionPolicyName, parameters ManagedBackupShortTermRetentionPolicy, options *ManagedBackupShortTermRetentionPoliciesClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ManagedBackupShortTermRetentionPoliciesClient.BeginUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, managedInstanceName, databaseName, policyName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// updateCreateRequest creates the Update request. +func (client *ManagedBackupShortTermRetentionPoliciesClient) updateCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, policyName ManagedShortTermRetentionPolicyName, parameters ManagedBackupShortTermRetentionPolicy, options *ManagedBackupShortTermRetentionPoliciesClientBeginUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/backupShortTermRetentionPolicies/{policyName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if policyName == "" { + return nil, errors.New("parameter policyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{policyName}", url.PathEscape(string(policyName))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/manageddatabasecolumns_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/manageddatabasecolumns_client.go new file mode 100644 index 000000000..97dc69b3e --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/manageddatabasecolumns_client.go @@ -0,0 +1,308 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ManagedDatabaseColumnsClient contains the methods for the ManagedDatabaseColumns group. +// Don't use this type directly, use NewManagedDatabaseColumnsClient() instead. +type ManagedDatabaseColumnsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewManagedDatabaseColumnsClient creates a new instance of ManagedDatabaseColumnsClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewManagedDatabaseColumnsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedDatabaseColumnsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ManagedDatabaseColumnsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Get managed database column +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - databaseName - The name of the database. +// - schemaName - The name of the schema. +// - tableName - The name of the table. +// - columnName - The name of the column. +// - options - ManagedDatabaseColumnsClientGetOptions contains the optional parameters for the ManagedDatabaseColumnsClient.Get +// method. +func (client *ManagedDatabaseColumnsClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, schemaName string, tableName string, columnName string, options *ManagedDatabaseColumnsClientGetOptions) (ManagedDatabaseColumnsClientGetResponse, error) { + var err error + const operationName = "ManagedDatabaseColumnsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, columnName, options) + if err != nil { + return ManagedDatabaseColumnsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ManagedDatabaseColumnsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ManagedDatabaseColumnsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ManagedDatabaseColumnsClient) getCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, schemaName string, tableName string, columnName string, options *ManagedDatabaseColumnsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if schemaName == "" { + return nil, errors.New("parameter schemaName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{schemaName}", url.PathEscape(schemaName)) + if tableName == "" { + return nil, errors.New("parameter tableName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{tableName}", url.PathEscape(tableName)) + if columnName == "" { + return nil, errors.New("parameter columnName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{columnName}", url.PathEscape(columnName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ManagedDatabaseColumnsClient) getHandleResponse(resp *http.Response) (ManagedDatabaseColumnsClientGetResponse, error) { + result := ManagedDatabaseColumnsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DatabaseColumn); err != nil { + return ManagedDatabaseColumnsClientGetResponse{}, err + } + return result, nil +} + +// NewListByDatabasePager - List managed database columns +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - databaseName - The name of the database. +// - options - ManagedDatabaseColumnsClientListByDatabaseOptions contains the optional parameters for the ManagedDatabaseColumnsClient.NewListByDatabasePager +// method. +func (client *ManagedDatabaseColumnsClient) NewListByDatabasePager(resourceGroupName string, managedInstanceName string, databaseName string, options *ManagedDatabaseColumnsClientListByDatabaseOptions) *runtime.Pager[ManagedDatabaseColumnsClientListByDatabaseResponse] { + return runtime.NewPager(runtime.PagingHandler[ManagedDatabaseColumnsClientListByDatabaseResponse]{ + More: func(page ManagedDatabaseColumnsClientListByDatabaseResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ManagedDatabaseColumnsClientListByDatabaseResponse) (ManagedDatabaseColumnsClientListByDatabaseResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ManagedDatabaseColumnsClient.NewListByDatabasePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByDatabaseCreateRequest(ctx, resourceGroupName, managedInstanceName, databaseName, options) + }, nil) + if err != nil { + return ManagedDatabaseColumnsClientListByDatabaseResponse{}, err + } + return client.listByDatabaseHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByDatabaseCreateRequest creates the ListByDatabase request. +func (client *ManagedDatabaseColumnsClient) listByDatabaseCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, options *ManagedDatabaseColumnsClientListByDatabaseOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/columns" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Schema != nil { + for _, qv := range options.Schema { + reqQP.Add("schema", qv) + } + } + if options != nil && options.Table != nil { + for _, qv := range options.Table { + reqQP.Add("table", qv) + } + } + if options != nil && options.Column != nil { + for _, qv := range options.Column { + reqQP.Add("column", qv) + } + } + if options != nil && options.OrderBy != nil { + for _, qv := range options.OrderBy { + reqQP.Add("orderBy", qv) + } + } + if options != nil && options.Skiptoken != nil { + reqQP.Set("$skiptoken", *options.Skiptoken) + } + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByDatabaseHandleResponse handles the ListByDatabase response. +func (client *ManagedDatabaseColumnsClient) listByDatabaseHandleResponse(resp *http.Response) (ManagedDatabaseColumnsClientListByDatabaseResponse, error) { + result := ManagedDatabaseColumnsClientListByDatabaseResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DatabaseColumnListResult); err != nil { + return ManagedDatabaseColumnsClientListByDatabaseResponse{}, err + } + return result, nil +} + +// NewListByTablePager - List managed database columns +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - databaseName - The name of the database. +// - schemaName - The name of the schema. +// - tableName - The name of the table. +// - options - ManagedDatabaseColumnsClientListByTableOptions contains the optional parameters for the ManagedDatabaseColumnsClient.NewListByTablePager +// method. +func (client *ManagedDatabaseColumnsClient) NewListByTablePager(resourceGroupName string, managedInstanceName string, databaseName string, schemaName string, tableName string, options *ManagedDatabaseColumnsClientListByTableOptions) *runtime.Pager[ManagedDatabaseColumnsClientListByTableResponse] { + return runtime.NewPager(runtime.PagingHandler[ManagedDatabaseColumnsClientListByTableResponse]{ + More: func(page ManagedDatabaseColumnsClientListByTableResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ManagedDatabaseColumnsClientListByTableResponse) (ManagedDatabaseColumnsClientListByTableResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ManagedDatabaseColumnsClient.NewListByTablePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByTableCreateRequest(ctx, resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, options) + }, nil) + if err != nil { + return ManagedDatabaseColumnsClientListByTableResponse{}, err + } + return client.listByTableHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByTableCreateRequest creates the ListByTable request. +func (client *ManagedDatabaseColumnsClient) listByTableCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, schemaName string, tableName string, options *ManagedDatabaseColumnsClientListByTableOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if schemaName == "" { + return nil, errors.New("parameter schemaName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{schemaName}", url.PathEscape(schemaName)) + if tableName == "" { + return nil, errors.New("parameter tableName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{tableName}", url.PathEscape(tableName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByTableHandleResponse handles the ListByTable response. +func (client *ManagedDatabaseColumnsClient) listByTableHandleResponse(resp *http.Response) (ManagedDatabaseColumnsClientListByTableResponse, error) { + result := ManagedDatabaseColumnsClientListByTableResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DatabaseColumnListResult); err != nil { + return ManagedDatabaseColumnsClientListByTableResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/manageddatabasequeries_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/manageddatabasequeries_client.go new file mode 100644 index 000000000..339e6ab8f --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/manageddatabasequeries_client.go @@ -0,0 +1,203 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ManagedDatabaseQueriesClient contains the methods for the ManagedDatabaseQueries group. +// Don't use this type directly, use NewManagedDatabaseQueriesClient() instead. +type ManagedDatabaseQueriesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewManagedDatabaseQueriesClient creates a new instance of ManagedDatabaseQueriesClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewManagedDatabaseQueriesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedDatabaseQueriesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ManagedDatabaseQueriesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Get query by query id. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - databaseName - The name of the database. +// - options - ManagedDatabaseQueriesClientGetOptions contains the optional parameters for the ManagedDatabaseQueriesClient.Get +// method. +func (client *ManagedDatabaseQueriesClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, queryID string, options *ManagedDatabaseQueriesClientGetOptions) (ManagedDatabaseQueriesClientGetResponse, error) { + var err error + const operationName = "ManagedDatabaseQueriesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, managedInstanceName, databaseName, queryID, options) + if err != nil { + return ManagedDatabaseQueriesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ManagedDatabaseQueriesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ManagedDatabaseQueriesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ManagedDatabaseQueriesClient) getCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, queryID string, options *ManagedDatabaseQueriesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/queries/{queryId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if queryID == "" { + return nil, errors.New("parameter queryID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{queryId}", url.PathEscape(queryID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ManagedDatabaseQueriesClient) getHandleResponse(resp *http.Response) (ManagedDatabaseQueriesClientGetResponse, error) { + result := ManagedDatabaseQueriesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ManagedInstanceQuery); err != nil { + return ManagedDatabaseQueriesClientGetResponse{}, err + } + return result, nil +} + +// NewListByQueryPager - Get query execution statistics by query id. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - databaseName - The name of the database. +// - options - ManagedDatabaseQueriesClientListByQueryOptions contains the optional parameters for the ManagedDatabaseQueriesClient.NewListByQueryPager +// method. +func (client *ManagedDatabaseQueriesClient) NewListByQueryPager(resourceGroupName string, managedInstanceName string, databaseName string, queryID string, options *ManagedDatabaseQueriesClientListByQueryOptions) *runtime.Pager[ManagedDatabaseQueriesClientListByQueryResponse] { + return runtime.NewPager(runtime.PagingHandler[ManagedDatabaseQueriesClientListByQueryResponse]{ + More: func(page ManagedDatabaseQueriesClientListByQueryResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ManagedDatabaseQueriesClientListByQueryResponse) (ManagedDatabaseQueriesClientListByQueryResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ManagedDatabaseQueriesClient.NewListByQueryPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByQueryCreateRequest(ctx, resourceGroupName, managedInstanceName, databaseName, queryID, options) + }, nil) + if err != nil { + return ManagedDatabaseQueriesClientListByQueryResponse{}, err + } + return client.listByQueryHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByQueryCreateRequest creates the ListByQuery request. +func (client *ManagedDatabaseQueriesClient) listByQueryCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, queryID string, options *ManagedDatabaseQueriesClientListByQueryOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/queries/{queryId}/statistics" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if queryID == "" { + return nil, errors.New("parameter queryID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{queryId}", url.PathEscape(queryID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.StartTime != nil { + reqQP.Set("startTime", *options.StartTime) + } + if options != nil && options.EndTime != nil { + reqQP.Set("endTime", *options.EndTime) + } + if options != nil && options.Interval != nil { + reqQP.Set("interval", string(*options.Interval)) + } + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByQueryHandleResponse handles the ListByQuery response. +func (client *ManagedDatabaseQueriesClient) listByQueryHandleResponse(resp *http.Response) (ManagedDatabaseQueriesClientListByQueryResponse, error) { + result := ManagedDatabaseQueriesClientListByQueryResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ManagedInstanceQueryStatistics); err != nil { + return ManagedDatabaseQueriesClientListByQueryResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/manageddatabaserecommendedsensitivitylabels_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/manageddatabaserecommendedsensitivitylabels_client.go new file mode 100644 index 000000000..877a8d5d4 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/manageddatabaserecommendedsensitivitylabels_client.go @@ -0,0 +1,107 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ManagedDatabaseRecommendedSensitivityLabelsClient contains the methods for the ManagedDatabaseRecommendedSensitivityLabels group. +// Don't use this type directly, use NewManagedDatabaseRecommendedSensitivityLabelsClient() instead. +type ManagedDatabaseRecommendedSensitivityLabelsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewManagedDatabaseRecommendedSensitivityLabelsClient creates a new instance of ManagedDatabaseRecommendedSensitivityLabelsClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewManagedDatabaseRecommendedSensitivityLabelsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedDatabaseRecommendedSensitivityLabelsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ManagedDatabaseRecommendedSensitivityLabelsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Update - Update recommended sensitivity labels states of a given database using an operations batch. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - databaseName - The name of the database. +// - options - ManagedDatabaseRecommendedSensitivityLabelsClientUpdateOptions contains the optional parameters for the ManagedDatabaseRecommendedSensitivityLabelsClient.Update +// method. +func (client *ManagedDatabaseRecommendedSensitivityLabelsClient) Update(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, parameters RecommendedSensitivityLabelUpdateList, options *ManagedDatabaseRecommendedSensitivityLabelsClientUpdateOptions) (ManagedDatabaseRecommendedSensitivityLabelsClientUpdateResponse, error) { + var err error + const operationName = "ManagedDatabaseRecommendedSensitivityLabelsClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, managedInstanceName, databaseName, parameters, options) + if err != nil { + return ManagedDatabaseRecommendedSensitivityLabelsClientUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ManagedDatabaseRecommendedSensitivityLabelsClientUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ManagedDatabaseRecommendedSensitivityLabelsClientUpdateResponse{}, err + } + return ManagedDatabaseRecommendedSensitivityLabelsClientUpdateResponse{}, nil +} + +// updateCreateRequest creates the Update request. +func (client *ManagedDatabaseRecommendedSensitivityLabelsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, parameters RecommendedSensitivityLabelUpdateList, options *ManagedDatabaseRecommendedSensitivityLabelsClientUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/recommendedSensitivityLabels" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/manageddatabaserestoredetails_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/manageddatabaserestoredetails_client.go new file mode 100644 index 000000000..5d7f344d3 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/manageddatabaserestoredetails_client.go @@ -0,0 +1,120 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ManagedDatabaseRestoreDetailsClient contains the methods for the ManagedDatabaseRestoreDetails group. +// Don't use this type directly, use NewManagedDatabaseRestoreDetailsClient() instead. +type ManagedDatabaseRestoreDetailsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewManagedDatabaseRestoreDetailsClient creates a new instance of ManagedDatabaseRestoreDetailsClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewManagedDatabaseRestoreDetailsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedDatabaseRestoreDetailsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ManagedDatabaseRestoreDetailsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Gets managed database restore details. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - databaseName - The name of the database. +// - restoreDetailsName - The name of the restore details to retrieve. +// - options - ManagedDatabaseRestoreDetailsClientGetOptions contains the optional parameters for the ManagedDatabaseRestoreDetailsClient.Get +// method. +func (client *ManagedDatabaseRestoreDetailsClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, restoreDetailsName RestoreDetailsName, options *ManagedDatabaseRestoreDetailsClientGetOptions) (ManagedDatabaseRestoreDetailsClientGetResponse, error) { + var err error + const operationName = "ManagedDatabaseRestoreDetailsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, managedInstanceName, databaseName, restoreDetailsName, options) + if err != nil { + return ManagedDatabaseRestoreDetailsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ManagedDatabaseRestoreDetailsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ManagedDatabaseRestoreDetailsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ManagedDatabaseRestoreDetailsClient) getCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, restoreDetailsName RestoreDetailsName, options *ManagedDatabaseRestoreDetailsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/restoreDetails/{restoreDetailsName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if restoreDetailsName == "" { + return nil, errors.New("parameter restoreDetailsName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{restoreDetailsName}", url.PathEscape(string(restoreDetailsName))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ManagedDatabaseRestoreDetailsClient) getHandleResponse(resp *http.Response) (ManagedDatabaseRestoreDetailsClientGetResponse, error) { + result := ManagedDatabaseRestoreDetailsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ManagedDatabaseRestoreDetailsResult); err != nil { + return ManagedDatabaseRestoreDetailsClientGetResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/manageddatabases_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/manageddatabases_client.go new file mode 100644 index 000000000..eb5bb8160 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/manageddatabases_client.go @@ -0,0 +1,584 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ManagedDatabasesClient contains the methods for the ManagedDatabases group. +// Don't use this type directly, use NewManagedDatabasesClient() instead. +type ManagedDatabasesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewManagedDatabasesClient creates a new instance of ManagedDatabasesClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewManagedDatabasesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedDatabasesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ManagedDatabasesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCompleteRestore - Completes the restore operation on a managed database. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - databaseName - The name of the database. +// - parameters - The definition for completing the restore of this managed database. +// - options - ManagedDatabasesClientBeginCompleteRestoreOptions contains the optional parameters for the ManagedDatabasesClient.BeginCompleteRestore +// method. +func (client *ManagedDatabasesClient) BeginCompleteRestore(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, parameters CompleteDatabaseRestoreDefinition, options *ManagedDatabasesClientBeginCompleteRestoreOptions) (*runtime.Poller[ManagedDatabasesClientCompleteRestoreResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.completeRestore(ctx, resourceGroupName, managedInstanceName, databaseName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ManagedDatabasesClientCompleteRestoreResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ManagedDatabasesClientCompleteRestoreResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CompleteRestore - Completes the restore operation on a managed database. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +func (client *ManagedDatabasesClient) completeRestore(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, parameters CompleteDatabaseRestoreDefinition, options *ManagedDatabasesClientBeginCompleteRestoreOptions) (*http.Response, error) { + var err error + const operationName = "ManagedDatabasesClient.BeginCompleteRestore" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.completeRestoreCreateRequest(ctx, resourceGroupName, managedInstanceName, databaseName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// completeRestoreCreateRequest creates the CompleteRestore request. +func (client *ManagedDatabasesClient) completeRestoreCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, parameters CompleteDatabaseRestoreDefinition, options *ManagedDatabasesClientBeginCompleteRestoreOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/completeRestore" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginCreateOrUpdate - Creates a new database or updates an existing database. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - databaseName - The name of the database. +// - parameters - The requested database resource state. +// - options - ManagedDatabasesClientBeginCreateOrUpdateOptions contains the optional parameters for the ManagedDatabasesClient.BeginCreateOrUpdate +// method. +func (client *ManagedDatabasesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, parameters ManagedDatabase, options *ManagedDatabasesClientBeginCreateOrUpdateOptions) (*runtime.Poller[ManagedDatabasesClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, managedInstanceName, databaseName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ManagedDatabasesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ManagedDatabasesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates a new database or updates an existing database. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +func (client *ManagedDatabasesClient) createOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, parameters ManagedDatabase, options *ManagedDatabasesClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ManagedDatabasesClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, managedInstanceName, databaseName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *ManagedDatabasesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, parameters ManagedDatabase, options *ManagedDatabasesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes a managed database. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - databaseName - The name of the database. +// - options - ManagedDatabasesClientBeginDeleteOptions contains the optional parameters for the ManagedDatabasesClient.BeginDelete +// method. +func (client *ManagedDatabasesClient) BeginDelete(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, options *ManagedDatabasesClientBeginDeleteOptions) (*runtime.Poller[ManagedDatabasesClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, managedInstanceName, databaseName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ManagedDatabasesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ManagedDatabasesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes a managed database. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +func (client *ManagedDatabasesClient) deleteOperation(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, options *ManagedDatabasesClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "ManagedDatabasesClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, managedInstanceName, databaseName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *ManagedDatabasesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, options *ManagedDatabasesClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + return req, nil +} + +// Get - Gets a managed database. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - databaseName - The name of the database. +// - options - ManagedDatabasesClientGetOptions contains the optional parameters for the ManagedDatabasesClient.Get method. +func (client *ManagedDatabasesClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, options *ManagedDatabasesClientGetOptions) (ManagedDatabasesClientGetResponse, error) { + var err error + const operationName = "ManagedDatabasesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, managedInstanceName, databaseName, options) + if err != nil { + return ManagedDatabasesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ManagedDatabasesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ManagedDatabasesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ManagedDatabasesClient) getCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, options *ManagedDatabasesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ManagedDatabasesClient) getHandleResponse(resp *http.Response) (ManagedDatabasesClientGetResponse, error) { + result := ManagedDatabasesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ManagedDatabase); err != nil { + return ManagedDatabasesClientGetResponse{}, err + } + return result, nil +} + +// NewListByInstancePager - Gets a list of managed databases. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - options - ManagedDatabasesClientListByInstanceOptions contains the optional parameters for the ManagedDatabasesClient.NewListByInstancePager +// method. +func (client *ManagedDatabasesClient) NewListByInstancePager(resourceGroupName string, managedInstanceName string, options *ManagedDatabasesClientListByInstanceOptions) *runtime.Pager[ManagedDatabasesClientListByInstanceResponse] { + return runtime.NewPager(runtime.PagingHandler[ManagedDatabasesClientListByInstanceResponse]{ + More: func(page ManagedDatabasesClientListByInstanceResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ManagedDatabasesClientListByInstanceResponse) (ManagedDatabasesClientListByInstanceResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ManagedDatabasesClient.NewListByInstancePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByInstanceCreateRequest(ctx, resourceGroupName, managedInstanceName, options) + }, nil) + if err != nil { + return ManagedDatabasesClientListByInstanceResponse{}, err + } + return client.listByInstanceHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByInstanceCreateRequest creates the ListByInstance request. +func (client *ManagedDatabasesClient) listByInstanceCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, options *ManagedDatabasesClientListByInstanceOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByInstanceHandleResponse handles the ListByInstance response. +func (client *ManagedDatabasesClient) listByInstanceHandleResponse(resp *http.Response) (ManagedDatabasesClientListByInstanceResponse, error) { + result := ManagedDatabasesClientListByInstanceResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ManagedDatabaseListResult); err != nil { + return ManagedDatabasesClientListByInstanceResponse{}, err + } + return result, nil +} + +// NewListInaccessibleByInstancePager - Gets a list of inaccessible managed databases in a managed instance +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - options - ManagedDatabasesClientListInaccessibleByInstanceOptions contains the optional parameters for the ManagedDatabasesClient.NewListInaccessibleByInstancePager +// method. +func (client *ManagedDatabasesClient) NewListInaccessibleByInstancePager(resourceGroupName string, managedInstanceName string, options *ManagedDatabasesClientListInaccessibleByInstanceOptions) *runtime.Pager[ManagedDatabasesClientListInaccessibleByInstanceResponse] { + return runtime.NewPager(runtime.PagingHandler[ManagedDatabasesClientListInaccessibleByInstanceResponse]{ + More: func(page ManagedDatabasesClientListInaccessibleByInstanceResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ManagedDatabasesClientListInaccessibleByInstanceResponse) (ManagedDatabasesClientListInaccessibleByInstanceResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ManagedDatabasesClient.NewListInaccessibleByInstancePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listInaccessibleByInstanceCreateRequest(ctx, resourceGroupName, managedInstanceName, options) + }, nil) + if err != nil { + return ManagedDatabasesClientListInaccessibleByInstanceResponse{}, err + } + return client.listInaccessibleByInstanceHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listInaccessibleByInstanceCreateRequest creates the ListInaccessibleByInstance request. +func (client *ManagedDatabasesClient) listInaccessibleByInstanceCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, options *ManagedDatabasesClientListInaccessibleByInstanceOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/inaccessibleManagedDatabases" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listInaccessibleByInstanceHandleResponse handles the ListInaccessibleByInstance response. +func (client *ManagedDatabasesClient) listInaccessibleByInstanceHandleResponse(resp *http.Response) (ManagedDatabasesClientListInaccessibleByInstanceResponse, error) { + result := ManagedDatabasesClientListInaccessibleByInstanceResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ManagedDatabaseListResult); err != nil { + return ManagedDatabasesClientListInaccessibleByInstanceResponse{}, err + } + return result, nil +} + +// BeginUpdate - Updates an existing database. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - databaseName - The name of the database. +// - parameters - The requested database resource state. +// - options - ManagedDatabasesClientBeginUpdateOptions contains the optional parameters for the ManagedDatabasesClient.BeginUpdate +// method. +func (client *ManagedDatabasesClient) BeginUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, parameters ManagedDatabaseUpdate, options *ManagedDatabasesClientBeginUpdateOptions) (*runtime.Poller[ManagedDatabasesClientUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.update(ctx, resourceGroupName, managedInstanceName, databaseName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ManagedDatabasesClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ManagedDatabasesClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Update - Updates an existing database. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +func (client *ManagedDatabasesClient) update(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, parameters ManagedDatabaseUpdate, options *ManagedDatabasesClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ManagedDatabasesClient.BeginUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, managedInstanceName, databaseName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// updateCreateRequest creates the Update request. +func (client *ManagedDatabasesClient) updateCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, parameters ManagedDatabaseUpdate, options *ManagedDatabasesClientBeginUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/manageddatabaseschemas_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/manageddatabaseschemas_client.go new file mode 100644 index 000000000..33c795f84 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/manageddatabaseschemas_client.go @@ -0,0 +1,194 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ManagedDatabaseSchemasClient contains the methods for the ManagedDatabaseSchemas group. +// Don't use this type directly, use NewManagedDatabaseSchemasClient() instead. +type ManagedDatabaseSchemasClient struct { + internal *arm.Client + subscriptionID string +} + +// NewManagedDatabaseSchemasClient creates a new instance of ManagedDatabaseSchemasClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewManagedDatabaseSchemasClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedDatabaseSchemasClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ManagedDatabaseSchemasClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Get managed database schema +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - databaseName - The name of the database. +// - schemaName - The name of the schema. +// - options - ManagedDatabaseSchemasClientGetOptions contains the optional parameters for the ManagedDatabaseSchemasClient.Get +// method. +func (client *ManagedDatabaseSchemasClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, schemaName string, options *ManagedDatabaseSchemasClientGetOptions) (ManagedDatabaseSchemasClientGetResponse, error) { + var err error + const operationName = "ManagedDatabaseSchemasClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, managedInstanceName, databaseName, schemaName, options) + if err != nil { + return ManagedDatabaseSchemasClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ManagedDatabaseSchemasClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ManagedDatabaseSchemasClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ManagedDatabaseSchemasClient) getCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, schemaName string, options *ManagedDatabaseSchemasClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if schemaName == "" { + return nil, errors.New("parameter schemaName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{schemaName}", url.PathEscape(schemaName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ManagedDatabaseSchemasClient) getHandleResponse(resp *http.Response) (ManagedDatabaseSchemasClientGetResponse, error) { + result := ManagedDatabaseSchemasClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DatabaseSchema); err != nil { + return ManagedDatabaseSchemasClientGetResponse{}, err + } + return result, nil +} + +// NewListByDatabasePager - List managed database schemas +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - databaseName - The name of the database. +// - options - ManagedDatabaseSchemasClientListByDatabaseOptions contains the optional parameters for the ManagedDatabaseSchemasClient.NewListByDatabasePager +// method. +func (client *ManagedDatabaseSchemasClient) NewListByDatabasePager(resourceGroupName string, managedInstanceName string, databaseName string, options *ManagedDatabaseSchemasClientListByDatabaseOptions) *runtime.Pager[ManagedDatabaseSchemasClientListByDatabaseResponse] { + return runtime.NewPager(runtime.PagingHandler[ManagedDatabaseSchemasClientListByDatabaseResponse]{ + More: func(page ManagedDatabaseSchemasClientListByDatabaseResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ManagedDatabaseSchemasClientListByDatabaseResponse) (ManagedDatabaseSchemasClientListByDatabaseResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ManagedDatabaseSchemasClient.NewListByDatabasePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByDatabaseCreateRequest(ctx, resourceGroupName, managedInstanceName, databaseName, options) + }, nil) + if err != nil { + return ManagedDatabaseSchemasClientListByDatabaseResponse{}, err + } + return client.listByDatabaseHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByDatabaseCreateRequest creates the ListByDatabase request. +func (client *ManagedDatabaseSchemasClient) listByDatabaseCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, options *ManagedDatabaseSchemasClientListByDatabaseOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByDatabaseHandleResponse handles the ListByDatabase response. +func (client *ManagedDatabaseSchemasClient) listByDatabaseHandleResponse(resp *http.Response) (ManagedDatabaseSchemasClientListByDatabaseResponse, error) { + result := ManagedDatabaseSchemasClientListByDatabaseResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DatabaseSchemaListResult); err != nil { + return ManagedDatabaseSchemasClientListByDatabaseResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/manageddatabasesecurityalertpolicies_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/manageddatabasesecurityalertpolicies_client.go new file mode 100644 index 000000000..6cc8fe394 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/manageddatabasesecurityalertpolicies_client.go @@ -0,0 +1,271 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ManagedDatabaseSecurityAlertPoliciesClient contains the methods for the ManagedDatabaseSecurityAlertPolicies group. +// Don't use this type directly, use NewManagedDatabaseSecurityAlertPoliciesClient() instead. +type ManagedDatabaseSecurityAlertPoliciesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewManagedDatabaseSecurityAlertPoliciesClient creates a new instance of ManagedDatabaseSecurityAlertPoliciesClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewManagedDatabaseSecurityAlertPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedDatabaseSecurityAlertPoliciesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ManagedDatabaseSecurityAlertPoliciesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Creates or updates a database's security alert policy. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - databaseName - The name of the managed database for which the security alert policy is defined. +// - securityAlertPolicyName - The name of the security alert policy. +// - parameters - The database security alert policy. +// - options - ManagedDatabaseSecurityAlertPoliciesClientCreateOrUpdateOptions contains the optional parameters for the ManagedDatabaseSecurityAlertPoliciesClient.CreateOrUpdate +// method. +func (client *ManagedDatabaseSecurityAlertPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, securityAlertPolicyName SecurityAlertPolicyName, parameters ManagedDatabaseSecurityAlertPolicy, options *ManagedDatabaseSecurityAlertPoliciesClientCreateOrUpdateOptions) (ManagedDatabaseSecurityAlertPoliciesClientCreateOrUpdateResponse, error) { + var err error + const operationName = "ManagedDatabaseSecurityAlertPoliciesClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, managedInstanceName, databaseName, securityAlertPolicyName, parameters, options) + if err != nil { + return ManagedDatabaseSecurityAlertPoliciesClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ManagedDatabaseSecurityAlertPoliciesClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return ManagedDatabaseSecurityAlertPoliciesClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *ManagedDatabaseSecurityAlertPoliciesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, securityAlertPolicyName SecurityAlertPolicyName, parameters ManagedDatabaseSecurityAlertPolicy, options *ManagedDatabaseSecurityAlertPoliciesClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/securityAlertPolicies/{securityAlertPolicyName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if securityAlertPolicyName == "" { + return nil, errors.New("parameter securityAlertPolicyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{securityAlertPolicyName}", url.PathEscape(string(securityAlertPolicyName))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *ManagedDatabaseSecurityAlertPoliciesClient) createOrUpdateHandleResponse(resp *http.Response) (ManagedDatabaseSecurityAlertPoliciesClientCreateOrUpdateResponse, error) { + result := ManagedDatabaseSecurityAlertPoliciesClientCreateOrUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ManagedDatabaseSecurityAlertPolicy); err != nil { + return ManagedDatabaseSecurityAlertPoliciesClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// Get - Gets a managed database's security alert policy. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - databaseName - The name of the managed database for which the security alert policy is defined. +// - securityAlertPolicyName - The name of the security alert policy. +// - options - ManagedDatabaseSecurityAlertPoliciesClientGetOptions contains the optional parameters for the ManagedDatabaseSecurityAlertPoliciesClient.Get +// method. +func (client *ManagedDatabaseSecurityAlertPoliciesClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, securityAlertPolicyName SecurityAlertPolicyName, options *ManagedDatabaseSecurityAlertPoliciesClientGetOptions) (ManagedDatabaseSecurityAlertPoliciesClientGetResponse, error) { + var err error + const operationName = "ManagedDatabaseSecurityAlertPoliciesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, managedInstanceName, databaseName, securityAlertPolicyName, options) + if err != nil { + return ManagedDatabaseSecurityAlertPoliciesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ManagedDatabaseSecurityAlertPoliciesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ManagedDatabaseSecurityAlertPoliciesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ManagedDatabaseSecurityAlertPoliciesClient) getCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, securityAlertPolicyName SecurityAlertPolicyName, options *ManagedDatabaseSecurityAlertPoliciesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/securityAlertPolicies/{securityAlertPolicyName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if securityAlertPolicyName == "" { + return nil, errors.New("parameter securityAlertPolicyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{securityAlertPolicyName}", url.PathEscape(string(securityAlertPolicyName))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ManagedDatabaseSecurityAlertPoliciesClient) getHandleResponse(resp *http.Response) (ManagedDatabaseSecurityAlertPoliciesClientGetResponse, error) { + result := ManagedDatabaseSecurityAlertPoliciesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ManagedDatabaseSecurityAlertPolicy); err != nil { + return ManagedDatabaseSecurityAlertPoliciesClientGetResponse{}, err + } + return result, nil +} + +// NewListByDatabasePager - Gets a list of managed database's security alert policies. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - databaseName - The name of the managed database for which the security alert policies are defined. +// - options - ManagedDatabaseSecurityAlertPoliciesClientListByDatabaseOptions contains the optional parameters for the ManagedDatabaseSecurityAlertPoliciesClient.NewListByDatabasePager +// method. +func (client *ManagedDatabaseSecurityAlertPoliciesClient) NewListByDatabasePager(resourceGroupName string, managedInstanceName string, databaseName string, options *ManagedDatabaseSecurityAlertPoliciesClientListByDatabaseOptions) *runtime.Pager[ManagedDatabaseSecurityAlertPoliciesClientListByDatabaseResponse] { + return runtime.NewPager(runtime.PagingHandler[ManagedDatabaseSecurityAlertPoliciesClientListByDatabaseResponse]{ + More: func(page ManagedDatabaseSecurityAlertPoliciesClientListByDatabaseResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ManagedDatabaseSecurityAlertPoliciesClientListByDatabaseResponse) (ManagedDatabaseSecurityAlertPoliciesClientListByDatabaseResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ManagedDatabaseSecurityAlertPoliciesClient.NewListByDatabasePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByDatabaseCreateRequest(ctx, resourceGroupName, managedInstanceName, databaseName, options) + }, nil) + if err != nil { + return ManagedDatabaseSecurityAlertPoliciesClientListByDatabaseResponse{}, err + } + return client.listByDatabaseHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByDatabaseCreateRequest creates the ListByDatabase request. +func (client *ManagedDatabaseSecurityAlertPoliciesClient) listByDatabaseCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, options *ManagedDatabaseSecurityAlertPoliciesClientListByDatabaseOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/securityAlertPolicies" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByDatabaseHandleResponse handles the ListByDatabase response. +func (client *ManagedDatabaseSecurityAlertPoliciesClient) listByDatabaseHandleResponse(resp *http.Response) (ManagedDatabaseSecurityAlertPoliciesClientListByDatabaseResponse, error) { + result := ManagedDatabaseSecurityAlertPoliciesClientListByDatabaseResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ManagedDatabaseSecurityAlertPolicyListResult); err != nil { + return ManagedDatabaseSecurityAlertPoliciesClientListByDatabaseResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/manageddatabasesecurityevents_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/manageddatabasesecurityevents_client.go new file mode 100644 index 000000000..c9651e20a --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/manageddatabasesecurityevents_client.go @@ -0,0 +1,128 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// ManagedDatabaseSecurityEventsClient contains the methods for the ManagedDatabaseSecurityEvents group. +// Don't use this type directly, use NewManagedDatabaseSecurityEventsClient() instead. +type ManagedDatabaseSecurityEventsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewManagedDatabaseSecurityEventsClient creates a new instance of ManagedDatabaseSecurityEventsClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewManagedDatabaseSecurityEventsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedDatabaseSecurityEventsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ManagedDatabaseSecurityEventsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// NewListByDatabasePager - Gets a list of security events. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - databaseName - The name of the managed database for which the security events are retrieved. +// - options - ManagedDatabaseSecurityEventsClientListByDatabaseOptions contains the optional parameters for the ManagedDatabaseSecurityEventsClient.NewListByDatabasePager +// method. +func (client *ManagedDatabaseSecurityEventsClient) NewListByDatabasePager(resourceGroupName string, managedInstanceName string, databaseName string, options *ManagedDatabaseSecurityEventsClientListByDatabaseOptions) *runtime.Pager[ManagedDatabaseSecurityEventsClientListByDatabaseResponse] { + return runtime.NewPager(runtime.PagingHandler[ManagedDatabaseSecurityEventsClientListByDatabaseResponse]{ + More: func(page ManagedDatabaseSecurityEventsClientListByDatabaseResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ManagedDatabaseSecurityEventsClientListByDatabaseResponse) (ManagedDatabaseSecurityEventsClientListByDatabaseResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ManagedDatabaseSecurityEventsClient.NewListByDatabasePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByDatabaseCreateRequest(ctx, resourceGroupName, managedInstanceName, databaseName, options) + }, nil) + if err != nil { + return ManagedDatabaseSecurityEventsClientListByDatabaseResponse{}, err + } + return client.listByDatabaseHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByDatabaseCreateRequest creates the ListByDatabase request. +func (client *ManagedDatabaseSecurityEventsClient) listByDatabaseCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, options *ManagedDatabaseSecurityEventsClientListByDatabaseOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/securityEvents" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + if options != nil && options.Skip != nil { + reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) + } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + if options != nil && options.Skiptoken != nil { + reqQP.Set("$skiptoken", *options.Skiptoken) + } + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByDatabaseHandleResponse handles the ListByDatabase response. +func (client *ManagedDatabaseSecurityEventsClient) listByDatabaseHandleResponse(resp *http.Response) (ManagedDatabaseSecurityEventsClientListByDatabaseResponse, error) { + result := ManagedDatabaseSecurityEventsClientListByDatabaseResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SecurityEventCollection); err != nil { + return ManagedDatabaseSecurityEventsClientListByDatabaseResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/manageddatabasesensitivitylabels_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/manageddatabasesensitivitylabels_client.go new file mode 100644 index 000000000..c16253956 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/manageddatabasesensitivitylabels_client.go @@ -0,0 +1,679 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// ManagedDatabaseSensitivityLabelsClient contains the methods for the ManagedDatabaseSensitivityLabels group. +// Don't use this type directly, use NewManagedDatabaseSensitivityLabelsClient() instead. +type ManagedDatabaseSensitivityLabelsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewManagedDatabaseSensitivityLabelsClient creates a new instance of ManagedDatabaseSensitivityLabelsClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewManagedDatabaseSensitivityLabelsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedDatabaseSensitivityLabelsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ManagedDatabaseSensitivityLabelsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Creates or updates the sensitivity label of a given column +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - databaseName - The name of the database. +// - schemaName - The name of the schema. +// - tableName - The name of the table. +// - columnName - The name of the column. +// - parameters - The column sensitivity label resource. +// - options - ManagedDatabaseSensitivityLabelsClientCreateOrUpdateOptions contains the optional parameters for the ManagedDatabaseSensitivityLabelsClient.CreateOrUpdate +// method. +func (client *ManagedDatabaseSensitivityLabelsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, schemaName string, tableName string, columnName string, parameters SensitivityLabel, options *ManagedDatabaseSensitivityLabelsClientCreateOrUpdateOptions) (ManagedDatabaseSensitivityLabelsClientCreateOrUpdateResponse, error) { + var err error + const operationName = "ManagedDatabaseSensitivityLabelsClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, columnName, parameters, options) + if err != nil { + return ManagedDatabaseSensitivityLabelsClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ManagedDatabaseSensitivityLabelsClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return ManagedDatabaseSensitivityLabelsClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *ManagedDatabaseSensitivityLabelsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, schemaName string, tableName string, columnName string, parameters SensitivityLabel, options *ManagedDatabaseSensitivityLabelsClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if schemaName == "" { + return nil, errors.New("parameter schemaName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{schemaName}", url.PathEscape(schemaName)) + if tableName == "" { + return nil, errors.New("parameter tableName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{tableName}", url.PathEscape(tableName)) + if columnName == "" { + return nil, errors.New("parameter columnName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{columnName}", url.PathEscape(columnName)) + urlPath = strings.ReplaceAll(urlPath, "{sensitivityLabelSource}", url.PathEscape("current")) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *ManagedDatabaseSensitivityLabelsClient) createOrUpdateHandleResponse(resp *http.Response) (ManagedDatabaseSensitivityLabelsClientCreateOrUpdateResponse, error) { + result := ManagedDatabaseSensitivityLabelsClientCreateOrUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SensitivityLabel); err != nil { + return ManagedDatabaseSensitivityLabelsClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// Delete - Deletes the sensitivity label of a given column +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - databaseName - The name of the database. +// - schemaName - The name of the schema. +// - tableName - The name of the table. +// - columnName - The name of the column. +// - options - ManagedDatabaseSensitivityLabelsClientDeleteOptions contains the optional parameters for the ManagedDatabaseSensitivityLabelsClient.Delete +// method. +func (client *ManagedDatabaseSensitivityLabelsClient) Delete(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, schemaName string, tableName string, columnName string, options *ManagedDatabaseSensitivityLabelsClientDeleteOptions) (ManagedDatabaseSensitivityLabelsClientDeleteResponse, error) { + var err error + const operationName = "ManagedDatabaseSensitivityLabelsClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, columnName, options) + if err != nil { + return ManagedDatabaseSensitivityLabelsClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ManagedDatabaseSensitivityLabelsClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ManagedDatabaseSensitivityLabelsClientDeleteResponse{}, err + } + return ManagedDatabaseSensitivityLabelsClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *ManagedDatabaseSensitivityLabelsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, schemaName string, tableName string, columnName string, options *ManagedDatabaseSensitivityLabelsClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if schemaName == "" { + return nil, errors.New("parameter schemaName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{schemaName}", url.PathEscape(schemaName)) + if tableName == "" { + return nil, errors.New("parameter tableName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{tableName}", url.PathEscape(tableName)) + if columnName == "" { + return nil, errors.New("parameter columnName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{columnName}", url.PathEscape(columnName)) + urlPath = strings.ReplaceAll(urlPath, "{sensitivityLabelSource}", url.PathEscape("current")) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + return req, nil +} + +// DisableRecommendation - Disables sensitivity recommendations on a given column +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - databaseName - The name of the database. +// - schemaName - The name of the schema. +// - tableName - The name of the table. +// - columnName - The name of the column. +// - options - ManagedDatabaseSensitivityLabelsClientDisableRecommendationOptions contains the optional parameters for the ManagedDatabaseSensitivityLabelsClient.DisableRecommendation +// method. +func (client *ManagedDatabaseSensitivityLabelsClient) DisableRecommendation(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, schemaName string, tableName string, columnName string, options *ManagedDatabaseSensitivityLabelsClientDisableRecommendationOptions) (ManagedDatabaseSensitivityLabelsClientDisableRecommendationResponse, error) { + var err error + const operationName = "ManagedDatabaseSensitivityLabelsClient.DisableRecommendation" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.disableRecommendationCreateRequest(ctx, resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, columnName, options) + if err != nil { + return ManagedDatabaseSensitivityLabelsClientDisableRecommendationResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ManagedDatabaseSensitivityLabelsClientDisableRecommendationResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ManagedDatabaseSensitivityLabelsClientDisableRecommendationResponse{}, err + } + return ManagedDatabaseSensitivityLabelsClientDisableRecommendationResponse{}, nil +} + +// disableRecommendationCreateRequest creates the DisableRecommendation request. +func (client *ManagedDatabaseSensitivityLabelsClient) disableRecommendationCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, schemaName string, tableName string, columnName string, options *ManagedDatabaseSensitivityLabelsClientDisableRecommendationOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}/disable" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if schemaName == "" { + return nil, errors.New("parameter schemaName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{schemaName}", url.PathEscape(schemaName)) + if tableName == "" { + return nil, errors.New("parameter tableName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{tableName}", url.PathEscape(tableName)) + if columnName == "" { + return nil, errors.New("parameter columnName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{columnName}", url.PathEscape(columnName)) + urlPath = strings.ReplaceAll(urlPath, "{sensitivityLabelSource}", url.PathEscape("recommended")) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + return req, nil +} + +// EnableRecommendation - Enables sensitivity recommendations on a given column (recommendations are enabled by default on +// all columns) +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - databaseName - The name of the database. +// - schemaName - The name of the schema. +// - tableName - The name of the table. +// - columnName - The name of the column. +// - options - ManagedDatabaseSensitivityLabelsClientEnableRecommendationOptions contains the optional parameters for the ManagedDatabaseSensitivityLabelsClient.EnableRecommendation +// method. +func (client *ManagedDatabaseSensitivityLabelsClient) EnableRecommendation(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, schemaName string, tableName string, columnName string, options *ManagedDatabaseSensitivityLabelsClientEnableRecommendationOptions) (ManagedDatabaseSensitivityLabelsClientEnableRecommendationResponse, error) { + var err error + const operationName = "ManagedDatabaseSensitivityLabelsClient.EnableRecommendation" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.enableRecommendationCreateRequest(ctx, resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, columnName, options) + if err != nil { + return ManagedDatabaseSensitivityLabelsClientEnableRecommendationResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ManagedDatabaseSensitivityLabelsClientEnableRecommendationResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ManagedDatabaseSensitivityLabelsClientEnableRecommendationResponse{}, err + } + return ManagedDatabaseSensitivityLabelsClientEnableRecommendationResponse{}, nil +} + +// enableRecommendationCreateRequest creates the EnableRecommendation request. +func (client *ManagedDatabaseSensitivityLabelsClient) enableRecommendationCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, schemaName string, tableName string, columnName string, options *ManagedDatabaseSensitivityLabelsClientEnableRecommendationOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}/enable" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if schemaName == "" { + return nil, errors.New("parameter schemaName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{schemaName}", url.PathEscape(schemaName)) + if tableName == "" { + return nil, errors.New("parameter tableName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{tableName}", url.PathEscape(tableName)) + if columnName == "" { + return nil, errors.New("parameter columnName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{columnName}", url.PathEscape(columnName)) + urlPath = strings.ReplaceAll(urlPath, "{sensitivityLabelSource}", url.PathEscape("recommended")) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + return req, nil +} + +// Get - Gets the sensitivity label of a given column +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - databaseName - The name of the database. +// - schemaName - The name of the schema. +// - tableName - The name of the table. +// - columnName - The name of the column. +// - sensitivityLabelSource - The source of the sensitivity label. +// - options - ManagedDatabaseSensitivityLabelsClientGetOptions contains the optional parameters for the ManagedDatabaseSensitivityLabelsClient.Get +// method. +func (client *ManagedDatabaseSensitivityLabelsClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, schemaName string, tableName string, columnName string, sensitivityLabelSource SensitivityLabelSource, options *ManagedDatabaseSensitivityLabelsClientGetOptions) (ManagedDatabaseSensitivityLabelsClientGetResponse, error) { + var err error + const operationName = "ManagedDatabaseSensitivityLabelsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, columnName, sensitivityLabelSource, options) + if err != nil { + return ManagedDatabaseSensitivityLabelsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ManagedDatabaseSensitivityLabelsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ManagedDatabaseSensitivityLabelsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ManagedDatabaseSensitivityLabelsClient) getCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, schemaName string, tableName string, columnName string, sensitivityLabelSource SensitivityLabelSource, options *ManagedDatabaseSensitivityLabelsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if schemaName == "" { + return nil, errors.New("parameter schemaName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{schemaName}", url.PathEscape(schemaName)) + if tableName == "" { + return nil, errors.New("parameter tableName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{tableName}", url.PathEscape(tableName)) + if columnName == "" { + return nil, errors.New("parameter columnName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{columnName}", url.PathEscape(columnName)) + if sensitivityLabelSource == "" { + return nil, errors.New("parameter sensitivityLabelSource cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{sensitivityLabelSource}", url.PathEscape(string(sensitivityLabelSource))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ManagedDatabaseSensitivityLabelsClient) getHandleResponse(resp *http.Response) (ManagedDatabaseSensitivityLabelsClientGetResponse, error) { + result := ManagedDatabaseSensitivityLabelsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SensitivityLabel); err != nil { + return ManagedDatabaseSensitivityLabelsClientGetResponse{}, err + } + return result, nil +} + +// NewListCurrentByDatabasePager - Gets the sensitivity labels of a given database +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - databaseName - The name of the database. +// - options - ManagedDatabaseSensitivityLabelsClientListCurrentByDatabaseOptions contains the optional parameters for the ManagedDatabaseSensitivityLabelsClient.NewListCurrentByDatabasePager +// method. +func (client *ManagedDatabaseSensitivityLabelsClient) NewListCurrentByDatabasePager(resourceGroupName string, managedInstanceName string, databaseName string, options *ManagedDatabaseSensitivityLabelsClientListCurrentByDatabaseOptions) *runtime.Pager[ManagedDatabaseSensitivityLabelsClientListCurrentByDatabaseResponse] { + return runtime.NewPager(runtime.PagingHandler[ManagedDatabaseSensitivityLabelsClientListCurrentByDatabaseResponse]{ + More: func(page ManagedDatabaseSensitivityLabelsClientListCurrentByDatabaseResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ManagedDatabaseSensitivityLabelsClientListCurrentByDatabaseResponse) (ManagedDatabaseSensitivityLabelsClientListCurrentByDatabaseResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ManagedDatabaseSensitivityLabelsClient.NewListCurrentByDatabasePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCurrentByDatabaseCreateRequest(ctx, resourceGroupName, managedInstanceName, databaseName, options) + }, nil) + if err != nil { + return ManagedDatabaseSensitivityLabelsClientListCurrentByDatabaseResponse{}, err + } + return client.listCurrentByDatabaseHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCurrentByDatabaseCreateRequest creates the ListCurrentByDatabase request. +func (client *ManagedDatabaseSensitivityLabelsClient) listCurrentByDatabaseCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, options *ManagedDatabaseSensitivityLabelsClientListCurrentByDatabaseOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/currentSensitivityLabels" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.SkipToken != nil { + reqQP.Set("$skipToken", *options.SkipToken) + } + if options != nil && options.Count != nil { + reqQP.Set("$count", strconv.FormatBool(*options.Count)) + } + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listCurrentByDatabaseHandleResponse handles the ListCurrentByDatabase response. +func (client *ManagedDatabaseSensitivityLabelsClient) listCurrentByDatabaseHandleResponse(resp *http.Response) (ManagedDatabaseSensitivityLabelsClientListCurrentByDatabaseResponse, error) { + result := ManagedDatabaseSensitivityLabelsClientListCurrentByDatabaseResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SensitivityLabelListResult); err != nil { + return ManagedDatabaseSensitivityLabelsClientListCurrentByDatabaseResponse{}, err + } + return result, nil +} + +// NewListRecommendedByDatabasePager - Gets the sensitivity labels of a given database +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - databaseName - The name of the database. +// - options - ManagedDatabaseSensitivityLabelsClientListRecommendedByDatabaseOptions contains the optional parameters for the +// ManagedDatabaseSensitivityLabelsClient.NewListRecommendedByDatabasePager method. +func (client *ManagedDatabaseSensitivityLabelsClient) NewListRecommendedByDatabasePager(resourceGroupName string, managedInstanceName string, databaseName string, options *ManagedDatabaseSensitivityLabelsClientListRecommendedByDatabaseOptions) *runtime.Pager[ManagedDatabaseSensitivityLabelsClientListRecommendedByDatabaseResponse] { + return runtime.NewPager(runtime.PagingHandler[ManagedDatabaseSensitivityLabelsClientListRecommendedByDatabaseResponse]{ + More: func(page ManagedDatabaseSensitivityLabelsClientListRecommendedByDatabaseResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ManagedDatabaseSensitivityLabelsClientListRecommendedByDatabaseResponse) (ManagedDatabaseSensitivityLabelsClientListRecommendedByDatabaseResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ManagedDatabaseSensitivityLabelsClient.NewListRecommendedByDatabasePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listRecommendedByDatabaseCreateRequest(ctx, resourceGroupName, managedInstanceName, databaseName, options) + }, nil) + if err != nil { + return ManagedDatabaseSensitivityLabelsClientListRecommendedByDatabaseResponse{}, err + } + return client.listRecommendedByDatabaseHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listRecommendedByDatabaseCreateRequest creates the ListRecommendedByDatabase request. +func (client *ManagedDatabaseSensitivityLabelsClient) listRecommendedByDatabaseCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, options *ManagedDatabaseSensitivityLabelsClientListRecommendedByDatabaseOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/recommendedSensitivityLabels" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.SkipToken != nil { + reqQP.Set("$skipToken", *options.SkipToken) + } + if options != nil && options.IncludeDisabledRecommendations != nil { + reqQP.Set("includeDisabledRecommendations", strconv.FormatBool(*options.IncludeDisabledRecommendations)) + } + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listRecommendedByDatabaseHandleResponse handles the ListRecommendedByDatabase response. +func (client *ManagedDatabaseSensitivityLabelsClient) listRecommendedByDatabaseHandleResponse(resp *http.Response) (ManagedDatabaseSensitivityLabelsClientListRecommendedByDatabaseResponse, error) { + result := ManagedDatabaseSensitivityLabelsClientListRecommendedByDatabaseResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SensitivityLabelListResult); err != nil { + return ManagedDatabaseSensitivityLabelsClientListRecommendedByDatabaseResponse{}, err + } + return result, nil +} + +// Update - Update sensitivity labels of a given database using an operations batch. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - databaseName - The name of the database. +// - options - ManagedDatabaseSensitivityLabelsClientUpdateOptions contains the optional parameters for the ManagedDatabaseSensitivityLabelsClient.Update +// method. +func (client *ManagedDatabaseSensitivityLabelsClient) Update(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, parameters SensitivityLabelUpdateList, options *ManagedDatabaseSensitivityLabelsClientUpdateOptions) (ManagedDatabaseSensitivityLabelsClientUpdateResponse, error) { + var err error + const operationName = "ManagedDatabaseSensitivityLabelsClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, managedInstanceName, databaseName, parameters, options) + if err != nil { + return ManagedDatabaseSensitivityLabelsClientUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ManagedDatabaseSensitivityLabelsClientUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ManagedDatabaseSensitivityLabelsClientUpdateResponse{}, err + } + return ManagedDatabaseSensitivityLabelsClientUpdateResponse{}, nil +} + +// updateCreateRequest creates the Update request. +func (client *ManagedDatabaseSensitivityLabelsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, parameters SensitivityLabelUpdateList, options *ManagedDatabaseSensitivityLabelsClientUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/currentSensitivityLabels" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/manageddatabasetables_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/manageddatabasetables_client.go new file mode 100644 index 000000000..f92de7039 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/manageddatabasetables_client.go @@ -0,0 +1,204 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ManagedDatabaseTablesClient contains the methods for the ManagedDatabaseTables group. +// Don't use this type directly, use NewManagedDatabaseTablesClient() instead. +type ManagedDatabaseTablesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewManagedDatabaseTablesClient creates a new instance of ManagedDatabaseTablesClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewManagedDatabaseTablesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedDatabaseTablesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ManagedDatabaseTablesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Get managed database table +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - databaseName - The name of the database. +// - schemaName - The name of the schema. +// - tableName - The name of the table. +// - options - ManagedDatabaseTablesClientGetOptions contains the optional parameters for the ManagedDatabaseTablesClient.Get +// method. +func (client *ManagedDatabaseTablesClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, schemaName string, tableName string, options *ManagedDatabaseTablesClientGetOptions) (ManagedDatabaseTablesClientGetResponse, error) { + var err error + const operationName = "ManagedDatabaseTablesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, options) + if err != nil { + return ManagedDatabaseTablesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ManagedDatabaseTablesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ManagedDatabaseTablesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ManagedDatabaseTablesClient) getCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, schemaName string, tableName string, options *ManagedDatabaseTablesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if schemaName == "" { + return nil, errors.New("parameter schemaName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{schemaName}", url.PathEscape(schemaName)) + if tableName == "" { + return nil, errors.New("parameter tableName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{tableName}", url.PathEscape(tableName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ManagedDatabaseTablesClient) getHandleResponse(resp *http.Response) (ManagedDatabaseTablesClientGetResponse, error) { + result := ManagedDatabaseTablesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DatabaseTable); err != nil { + return ManagedDatabaseTablesClientGetResponse{}, err + } + return result, nil +} + +// NewListBySchemaPager - List managed database tables +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - databaseName - The name of the database. +// - schemaName - The name of the schema. +// - options - ManagedDatabaseTablesClientListBySchemaOptions contains the optional parameters for the ManagedDatabaseTablesClient.NewListBySchemaPager +// method. +func (client *ManagedDatabaseTablesClient) NewListBySchemaPager(resourceGroupName string, managedInstanceName string, databaseName string, schemaName string, options *ManagedDatabaseTablesClientListBySchemaOptions) *runtime.Pager[ManagedDatabaseTablesClientListBySchemaResponse] { + return runtime.NewPager(runtime.PagingHandler[ManagedDatabaseTablesClientListBySchemaResponse]{ + More: func(page ManagedDatabaseTablesClientListBySchemaResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ManagedDatabaseTablesClientListBySchemaResponse) (ManagedDatabaseTablesClientListBySchemaResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ManagedDatabaseTablesClient.NewListBySchemaPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listBySchemaCreateRequest(ctx, resourceGroupName, managedInstanceName, databaseName, schemaName, options) + }, nil) + if err != nil { + return ManagedDatabaseTablesClientListBySchemaResponse{}, err + } + return client.listBySchemaHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listBySchemaCreateRequest creates the ListBySchema request. +func (client *ManagedDatabaseTablesClient) listBySchemaCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, schemaName string, options *ManagedDatabaseTablesClientListBySchemaOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if schemaName == "" { + return nil, errors.New("parameter schemaName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{schemaName}", url.PathEscape(schemaName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listBySchemaHandleResponse handles the ListBySchema response. +func (client *ManagedDatabaseTablesClient) listBySchemaHandleResponse(resp *http.Response) (ManagedDatabaseTablesClientListBySchemaResponse, error) { + result := ManagedDatabaseTablesClientListBySchemaResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DatabaseTableListResult); err != nil { + return ManagedDatabaseTablesClientListBySchemaResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/manageddatabasetransparentdataencryption_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/manageddatabasetransparentdataencryption_client.go new file mode 100644 index 000000000..1e1d8bb59 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/manageddatabasetransparentdataencryption_client.go @@ -0,0 +1,271 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ManagedDatabaseTransparentDataEncryptionClient contains the methods for the ManagedDatabaseTransparentDataEncryption group. +// Don't use this type directly, use NewManagedDatabaseTransparentDataEncryptionClient() instead. +type ManagedDatabaseTransparentDataEncryptionClient struct { + internal *arm.Client + subscriptionID string +} + +// NewManagedDatabaseTransparentDataEncryptionClient creates a new instance of ManagedDatabaseTransparentDataEncryptionClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewManagedDatabaseTransparentDataEncryptionClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedDatabaseTransparentDataEncryptionClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ManagedDatabaseTransparentDataEncryptionClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Updates a database's transparent data encryption configuration. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - databaseName - The name of the managed database for which the security alert policy is defined. +// - tdeName - The name of the transparent data encryption configuration. +// - parameters - The database transparent data encryption. +// - options - ManagedDatabaseTransparentDataEncryptionClientCreateOrUpdateOptions contains the optional parameters for the +// ManagedDatabaseTransparentDataEncryptionClient.CreateOrUpdate method. +func (client *ManagedDatabaseTransparentDataEncryptionClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, tdeName TransparentDataEncryptionName, parameters ManagedTransparentDataEncryption, options *ManagedDatabaseTransparentDataEncryptionClientCreateOrUpdateOptions) (ManagedDatabaseTransparentDataEncryptionClientCreateOrUpdateResponse, error) { + var err error + const operationName = "ManagedDatabaseTransparentDataEncryptionClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, managedInstanceName, databaseName, tdeName, parameters, options) + if err != nil { + return ManagedDatabaseTransparentDataEncryptionClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ManagedDatabaseTransparentDataEncryptionClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return ManagedDatabaseTransparentDataEncryptionClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *ManagedDatabaseTransparentDataEncryptionClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, tdeName TransparentDataEncryptionName, parameters ManagedTransparentDataEncryption, options *ManagedDatabaseTransparentDataEncryptionClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/transparentDataEncryption/{tdeName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if tdeName == "" { + return nil, errors.New("parameter tdeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{tdeName}", url.PathEscape(string(tdeName))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *ManagedDatabaseTransparentDataEncryptionClient) createOrUpdateHandleResponse(resp *http.Response) (ManagedDatabaseTransparentDataEncryptionClientCreateOrUpdateResponse, error) { + result := ManagedDatabaseTransparentDataEncryptionClientCreateOrUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ManagedTransparentDataEncryption); err != nil { + return ManagedDatabaseTransparentDataEncryptionClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// Get - Gets a managed database's transparent data encryption. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - databaseName - The name of the managed database for which the transparent data encryption is defined. +// - tdeName - The name of the transparent data encryption configuration. +// - options - ManagedDatabaseTransparentDataEncryptionClientGetOptions contains the optional parameters for the ManagedDatabaseTransparentDataEncryptionClient.Get +// method. +func (client *ManagedDatabaseTransparentDataEncryptionClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, tdeName TransparentDataEncryptionName, options *ManagedDatabaseTransparentDataEncryptionClientGetOptions) (ManagedDatabaseTransparentDataEncryptionClientGetResponse, error) { + var err error + const operationName = "ManagedDatabaseTransparentDataEncryptionClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, managedInstanceName, databaseName, tdeName, options) + if err != nil { + return ManagedDatabaseTransparentDataEncryptionClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ManagedDatabaseTransparentDataEncryptionClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ManagedDatabaseTransparentDataEncryptionClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ManagedDatabaseTransparentDataEncryptionClient) getCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, tdeName TransparentDataEncryptionName, options *ManagedDatabaseTransparentDataEncryptionClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/transparentDataEncryption/{tdeName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if tdeName == "" { + return nil, errors.New("parameter tdeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{tdeName}", url.PathEscape(string(tdeName))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ManagedDatabaseTransparentDataEncryptionClient) getHandleResponse(resp *http.Response) (ManagedDatabaseTransparentDataEncryptionClientGetResponse, error) { + result := ManagedDatabaseTransparentDataEncryptionClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ManagedTransparentDataEncryption); err != nil { + return ManagedDatabaseTransparentDataEncryptionClientGetResponse{}, err + } + return result, nil +} + +// NewListByDatabasePager - Gets a list of managed database's transparent data encryptions. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - databaseName - The name of the managed database for which the transparent data encryption is defined. +// - options - ManagedDatabaseTransparentDataEncryptionClientListByDatabaseOptions contains the optional parameters for the +// ManagedDatabaseTransparentDataEncryptionClient.NewListByDatabasePager method. +func (client *ManagedDatabaseTransparentDataEncryptionClient) NewListByDatabasePager(resourceGroupName string, managedInstanceName string, databaseName string, options *ManagedDatabaseTransparentDataEncryptionClientListByDatabaseOptions) *runtime.Pager[ManagedDatabaseTransparentDataEncryptionClientListByDatabaseResponse] { + return runtime.NewPager(runtime.PagingHandler[ManagedDatabaseTransparentDataEncryptionClientListByDatabaseResponse]{ + More: func(page ManagedDatabaseTransparentDataEncryptionClientListByDatabaseResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ManagedDatabaseTransparentDataEncryptionClientListByDatabaseResponse) (ManagedDatabaseTransparentDataEncryptionClientListByDatabaseResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ManagedDatabaseTransparentDataEncryptionClient.NewListByDatabasePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByDatabaseCreateRequest(ctx, resourceGroupName, managedInstanceName, databaseName, options) + }, nil) + if err != nil { + return ManagedDatabaseTransparentDataEncryptionClientListByDatabaseResponse{}, err + } + return client.listByDatabaseHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByDatabaseCreateRequest creates the ListByDatabase request. +func (client *ManagedDatabaseTransparentDataEncryptionClient) listByDatabaseCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, options *ManagedDatabaseTransparentDataEncryptionClientListByDatabaseOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/transparentDataEncryption" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByDatabaseHandleResponse handles the ListByDatabase response. +func (client *ManagedDatabaseTransparentDataEncryptionClient) listByDatabaseHandleResponse(resp *http.Response) (ManagedDatabaseTransparentDataEncryptionClientListByDatabaseResponse, error) { + result := ManagedDatabaseTransparentDataEncryptionClientListByDatabaseResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ManagedTransparentDataEncryptionListResult); err != nil { + return ManagedDatabaseTransparentDataEncryptionClientListByDatabaseResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/manageddatabasevulnerabilityassessmentrulebaselines_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/manageddatabasevulnerabilityassessmentrulebaselines_client.go new file mode 100644 index 000000000..832ddc988 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/manageddatabasevulnerabilityassessmentrulebaselines_client.go @@ -0,0 +1,298 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient contains the methods for the ManagedDatabaseVulnerabilityAssessmentRuleBaselines group. +// Don't use this type directly, use NewManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient() instead. +type ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient creates a new instance of ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Creates or updates a database's vulnerability assessment rule baseline. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - databaseName - The name of the database for which the vulnerability assessment rule baseline is defined. +// - vulnerabilityAssessmentName - The name of the vulnerability assessment. +// - ruleID - The vulnerability assessment rule ID. +// - baselineName - The name of the vulnerability assessment rule baseline (default implies a baseline on a database level rule +// and master for server level rule). +// - parameters - The requested rule baseline resource. +// - options - ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateOptions contains the optional parameters +// for the ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient.CreateOrUpdate method. +func (client *ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, ruleID string, baselineName VulnerabilityAssessmentPolicyBaselineName, parameters DatabaseVulnerabilityAssessmentRuleBaseline, options *ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateOptions) (ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateResponse, error) { + var err error + const operationName = "ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, managedInstanceName, databaseName, vulnerabilityAssessmentName, ruleID, baselineName, parameters, options) + if err != nil { + return ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, ruleID string, baselineName VulnerabilityAssessmentPolicyBaselineName, parameters DatabaseVulnerabilityAssessmentRuleBaseline, options *ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/rules/{ruleId}/baselines/{baselineName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if vulnerabilityAssessmentName == "" { + return nil, errors.New("parameter vulnerabilityAssessmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vulnerabilityAssessmentName}", url.PathEscape(string(vulnerabilityAssessmentName))) + if ruleID == "" { + return nil, errors.New("parameter ruleID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{ruleId}", url.PathEscape(ruleID)) + if baselineName == "" { + return nil, errors.New("parameter baselineName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{baselineName}", url.PathEscape(string(baselineName))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient) createOrUpdateHandleResponse(resp *http.Response) (ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateResponse, error) { + result := ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DatabaseVulnerabilityAssessmentRuleBaseline); err != nil { + return ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// Delete - Removes the database's vulnerability assessment rule baseline. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - databaseName - The name of the database for which the vulnerability assessment rule baseline is defined. +// - vulnerabilityAssessmentName - The name of the vulnerability assessment. +// - ruleID - The vulnerability assessment rule ID. +// - baselineName - The name of the vulnerability assessment rule baseline (default implies a baseline on a database level rule +// and master for server level rule). +// - options - ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientDeleteOptions contains the optional parameters for the +// ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient.Delete method. +func (client *ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient) Delete(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, ruleID string, baselineName VulnerabilityAssessmentPolicyBaselineName, options *ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientDeleteOptions) (ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientDeleteResponse, error) { + var err error + const operationName = "ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, managedInstanceName, databaseName, vulnerabilityAssessmentName, ruleID, baselineName, options) + if err != nil { + return ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientDeleteResponse{}, err + } + return ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, ruleID string, baselineName VulnerabilityAssessmentPolicyBaselineName, options *ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/rules/{ruleId}/baselines/{baselineName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if vulnerabilityAssessmentName == "" { + return nil, errors.New("parameter vulnerabilityAssessmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vulnerabilityAssessmentName}", url.PathEscape(string(vulnerabilityAssessmentName))) + if ruleID == "" { + return nil, errors.New("parameter ruleID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{ruleId}", url.PathEscape(ruleID)) + if baselineName == "" { + return nil, errors.New("parameter baselineName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{baselineName}", url.PathEscape(string(baselineName))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + return req, nil +} + +// Get - Gets a database's vulnerability assessment rule baseline. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - databaseName - The name of the database for which the vulnerability assessment rule baseline is defined. +// - vulnerabilityAssessmentName - The name of the vulnerability assessment. +// - ruleID - The vulnerability assessment rule ID. +// - baselineName - The name of the vulnerability assessment rule baseline (default implies a baseline on a database level rule +// and master for server level rule). +// - options - ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientGetOptions contains the optional parameters for the +// ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient.Get method. +func (client *ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, ruleID string, baselineName VulnerabilityAssessmentPolicyBaselineName, options *ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientGetOptions) (ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientGetResponse, error) { + var err error + const operationName = "ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, managedInstanceName, databaseName, vulnerabilityAssessmentName, ruleID, baselineName, options) + if err != nil { + return ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient) getCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, ruleID string, baselineName VulnerabilityAssessmentPolicyBaselineName, options *ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/rules/{ruleId}/baselines/{baselineName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if vulnerabilityAssessmentName == "" { + return nil, errors.New("parameter vulnerabilityAssessmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vulnerabilityAssessmentName}", url.PathEscape(string(vulnerabilityAssessmentName))) + if ruleID == "" { + return nil, errors.New("parameter ruleID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{ruleId}", url.PathEscape(ruleID)) + if baselineName == "" { + return nil, errors.New("parameter baselineName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{baselineName}", url.PathEscape(string(baselineName))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient) getHandleResponse(resp *http.Response) (ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientGetResponse, error) { + result := ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DatabaseVulnerabilityAssessmentRuleBaseline); err != nil { + return ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientGetResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/manageddatabasevulnerabilityassessments_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/manageddatabasevulnerabilityassessments_client.go new file mode 100644 index 000000000..e44754f9a --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/manageddatabasevulnerabilityassessments_client.go @@ -0,0 +1,336 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ManagedDatabaseVulnerabilityAssessmentsClient contains the methods for the ManagedDatabaseVulnerabilityAssessments group. +// Don't use this type directly, use NewManagedDatabaseVulnerabilityAssessmentsClient() instead. +type ManagedDatabaseVulnerabilityAssessmentsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewManagedDatabaseVulnerabilityAssessmentsClient creates a new instance of ManagedDatabaseVulnerabilityAssessmentsClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewManagedDatabaseVulnerabilityAssessmentsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedDatabaseVulnerabilityAssessmentsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ManagedDatabaseVulnerabilityAssessmentsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Creates or updates the database's vulnerability assessment. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - databaseName - The name of the database for which the vulnerability assessment is defined. +// - vulnerabilityAssessmentName - The name of the vulnerability assessment. +// - parameters - The requested resource. +// - options - ManagedDatabaseVulnerabilityAssessmentsClientCreateOrUpdateOptions contains the optional parameters for the ManagedDatabaseVulnerabilityAssessmentsClient.CreateOrUpdate +// method. +func (client *ManagedDatabaseVulnerabilityAssessmentsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, parameters DatabaseVulnerabilityAssessment, options *ManagedDatabaseVulnerabilityAssessmentsClientCreateOrUpdateOptions) (ManagedDatabaseVulnerabilityAssessmentsClientCreateOrUpdateResponse, error) { + var err error + const operationName = "ManagedDatabaseVulnerabilityAssessmentsClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, managedInstanceName, databaseName, vulnerabilityAssessmentName, parameters, options) + if err != nil { + return ManagedDatabaseVulnerabilityAssessmentsClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ManagedDatabaseVulnerabilityAssessmentsClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return ManagedDatabaseVulnerabilityAssessmentsClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *ManagedDatabaseVulnerabilityAssessmentsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, parameters DatabaseVulnerabilityAssessment, options *ManagedDatabaseVulnerabilityAssessmentsClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if vulnerabilityAssessmentName == "" { + return nil, errors.New("parameter vulnerabilityAssessmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vulnerabilityAssessmentName}", url.PathEscape(string(vulnerabilityAssessmentName))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *ManagedDatabaseVulnerabilityAssessmentsClient) createOrUpdateHandleResponse(resp *http.Response) (ManagedDatabaseVulnerabilityAssessmentsClientCreateOrUpdateResponse, error) { + result := ManagedDatabaseVulnerabilityAssessmentsClientCreateOrUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DatabaseVulnerabilityAssessment); err != nil { + return ManagedDatabaseVulnerabilityAssessmentsClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// Delete - Removes the database's vulnerability assessment. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - databaseName - The name of the database for which the vulnerability assessment is defined. +// - vulnerabilityAssessmentName - The name of the vulnerability assessment. +// - options - ManagedDatabaseVulnerabilityAssessmentsClientDeleteOptions contains the optional parameters for the ManagedDatabaseVulnerabilityAssessmentsClient.Delete +// method. +func (client *ManagedDatabaseVulnerabilityAssessmentsClient) Delete(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, options *ManagedDatabaseVulnerabilityAssessmentsClientDeleteOptions) (ManagedDatabaseVulnerabilityAssessmentsClientDeleteResponse, error) { + var err error + const operationName = "ManagedDatabaseVulnerabilityAssessmentsClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, managedInstanceName, databaseName, vulnerabilityAssessmentName, options) + if err != nil { + return ManagedDatabaseVulnerabilityAssessmentsClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ManagedDatabaseVulnerabilityAssessmentsClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ManagedDatabaseVulnerabilityAssessmentsClientDeleteResponse{}, err + } + return ManagedDatabaseVulnerabilityAssessmentsClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *ManagedDatabaseVulnerabilityAssessmentsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, options *ManagedDatabaseVulnerabilityAssessmentsClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if vulnerabilityAssessmentName == "" { + return nil, errors.New("parameter vulnerabilityAssessmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vulnerabilityAssessmentName}", url.PathEscape(string(vulnerabilityAssessmentName))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + return req, nil +} + +// Get - Gets the database's vulnerability assessment. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - databaseName - The name of the database for which the vulnerability assessment is defined. +// - vulnerabilityAssessmentName - The name of the vulnerability assessment. +// - options - ManagedDatabaseVulnerabilityAssessmentsClientGetOptions contains the optional parameters for the ManagedDatabaseVulnerabilityAssessmentsClient.Get +// method. +func (client *ManagedDatabaseVulnerabilityAssessmentsClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, options *ManagedDatabaseVulnerabilityAssessmentsClientGetOptions) (ManagedDatabaseVulnerabilityAssessmentsClientGetResponse, error) { + var err error + const operationName = "ManagedDatabaseVulnerabilityAssessmentsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, managedInstanceName, databaseName, vulnerabilityAssessmentName, options) + if err != nil { + return ManagedDatabaseVulnerabilityAssessmentsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ManagedDatabaseVulnerabilityAssessmentsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ManagedDatabaseVulnerabilityAssessmentsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ManagedDatabaseVulnerabilityAssessmentsClient) getCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, options *ManagedDatabaseVulnerabilityAssessmentsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if vulnerabilityAssessmentName == "" { + return nil, errors.New("parameter vulnerabilityAssessmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vulnerabilityAssessmentName}", url.PathEscape(string(vulnerabilityAssessmentName))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ManagedDatabaseVulnerabilityAssessmentsClient) getHandleResponse(resp *http.Response) (ManagedDatabaseVulnerabilityAssessmentsClientGetResponse, error) { + result := ManagedDatabaseVulnerabilityAssessmentsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DatabaseVulnerabilityAssessment); err != nil { + return ManagedDatabaseVulnerabilityAssessmentsClientGetResponse{}, err + } + return result, nil +} + +// NewListByDatabasePager - Lists the vulnerability assessments of a managed database. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - databaseName - The name of the database for which the vulnerability assessment is defined. +// - options - ManagedDatabaseVulnerabilityAssessmentsClientListByDatabaseOptions contains the optional parameters for the ManagedDatabaseVulnerabilityAssessmentsClient.NewListByDatabasePager +// method. +func (client *ManagedDatabaseVulnerabilityAssessmentsClient) NewListByDatabasePager(resourceGroupName string, managedInstanceName string, databaseName string, options *ManagedDatabaseVulnerabilityAssessmentsClientListByDatabaseOptions) *runtime.Pager[ManagedDatabaseVulnerabilityAssessmentsClientListByDatabaseResponse] { + return runtime.NewPager(runtime.PagingHandler[ManagedDatabaseVulnerabilityAssessmentsClientListByDatabaseResponse]{ + More: func(page ManagedDatabaseVulnerabilityAssessmentsClientListByDatabaseResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ManagedDatabaseVulnerabilityAssessmentsClientListByDatabaseResponse) (ManagedDatabaseVulnerabilityAssessmentsClientListByDatabaseResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ManagedDatabaseVulnerabilityAssessmentsClient.NewListByDatabasePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByDatabaseCreateRequest(ctx, resourceGroupName, managedInstanceName, databaseName, options) + }, nil) + if err != nil { + return ManagedDatabaseVulnerabilityAssessmentsClientListByDatabaseResponse{}, err + } + return client.listByDatabaseHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByDatabaseCreateRequest creates the ListByDatabase request. +func (client *ManagedDatabaseVulnerabilityAssessmentsClient) listByDatabaseCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, options *ManagedDatabaseVulnerabilityAssessmentsClientListByDatabaseOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByDatabaseHandleResponse handles the ListByDatabase response. +func (client *ManagedDatabaseVulnerabilityAssessmentsClient) listByDatabaseHandleResponse(resp *http.Response) (ManagedDatabaseVulnerabilityAssessmentsClientListByDatabaseResponse, error) { + result := ManagedDatabaseVulnerabilityAssessmentsClientListByDatabaseResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DatabaseVulnerabilityAssessmentListResult); err != nil { + return ManagedDatabaseVulnerabilityAssessmentsClientListByDatabaseResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/manageddatabasevulnerabilityassessmentscans_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/manageddatabasevulnerabilityassessmentscans_client.go new file mode 100644 index 000000000..6ea1679b3 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/manageddatabasevulnerabilityassessmentscans_client.go @@ -0,0 +1,373 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ManagedDatabaseVulnerabilityAssessmentScansClient contains the methods for the ManagedDatabaseVulnerabilityAssessmentScans group. +// Don't use this type directly, use NewManagedDatabaseVulnerabilityAssessmentScansClient() instead. +type ManagedDatabaseVulnerabilityAssessmentScansClient struct { + internal *arm.Client + subscriptionID string +} + +// NewManagedDatabaseVulnerabilityAssessmentScansClient creates a new instance of ManagedDatabaseVulnerabilityAssessmentScansClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewManagedDatabaseVulnerabilityAssessmentScansClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedDatabaseVulnerabilityAssessmentScansClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ManagedDatabaseVulnerabilityAssessmentScansClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Export - Convert an existing scan result to a human readable format. If already exists nothing happens +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - databaseName - The name of the scanned database. +// - vulnerabilityAssessmentName - The name of the vulnerability assessment. +// - scanID - The vulnerability assessment scan Id. +// - options - ManagedDatabaseVulnerabilityAssessmentScansClientExportOptions contains the optional parameters for the ManagedDatabaseVulnerabilityAssessmentScansClient.Export +// method. +func (client *ManagedDatabaseVulnerabilityAssessmentScansClient) Export(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, scanID string, options *ManagedDatabaseVulnerabilityAssessmentScansClientExportOptions) (ManagedDatabaseVulnerabilityAssessmentScansClientExportResponse, error) { + var err error + const operationName = "ManagedDatabaseVulnerabilityAssessmentScansClient.Export" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.exportCreateRequest(ctx, resourceGroupName, managedInstanceName, databaseName, vulnerabilityAssessmentName, scanID, options) + if err != nil { + return ManagedDatabaseVulnerabilityAssessmentScansClientExportResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ManagedDatabaseVulnerabilityAssessmentScansClientExportResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return ManagedDatabaseVulnerabilityAssessmentScansClientExportResponse{}, err + } + resp, err := client.exportHandleResponse(httpResp) + return resp, err +} + +// exportCreateRequest creates the Export request. +func (client *ManagedDatabaseVulnerabilityAssessmentScansClient) exportCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, scanID string, options *ManagedDatabaseVulnerabilityAssessmentScansClientExportOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}/export" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if vulnerabilityAssessmentName == "" { + return nil, errors.New("parameter vulnerabilityAssessmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vulnerabilityAssessmentName}", url.PathEscape(string(vulnerabilityAssessmentName))) + if scanID == "" { + return nil, errors.New("parameter scanID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{scanId}", url.PathEscape(scanID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// exportHandleResponse handles the Export response. +func (client *ManagedDatabaseVulnerabilityAssessmentScansClient) exportHandleResponse(resp *http.Response) (ManagedDatabaseVulnerabilityAssessmentScansClientExportResponse, error) { + result := ManagedDatabaseVulnerabilityAssessmentScansClientExportResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DatabaseVulnerabilityAssessmentScansExport); err != nil { + return ManagedDatabaseVulnerabilityAssessmentScansClientExportResponse{}, err + } + return result, nil +} + +// Get - Gets a vulnerability assessment scan record of a database. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - databaseName - The name of the database. +// - vulnerabilityAssessmentName - The name of the vulnerability assessment. +// - scanID - The vulnerability assessment scan Id of the scan to retrieve. +// - options - ManagedDatabaseVulnerabilityAssessmentScansClientGetOptions contains the optional parameters for the ManagedDatabaseVulnerabilityAssessmentScansClient.Get +// method. +func (client *ManagedDatabaseVulnerabilityAssessmentScansClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, scanID string, options *ManagedDatabaseVulnerabilityAssessmentScansClientGetOptions) (ManagedDatabaseVulnerabilityAssessmentScansClientGetResponse, error) { + var err error + const operationName = "ManagedDatabaseVulnerabilityAssessmentScansClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, managedInstanceName, databaseName, vulnerabilityAssessmentName, scanID, options) + if err != nil { + return ManagedDatabaseVulnerabilityAssessmentScansClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ManagedDatabaseVulnerabilityAssessmentScansClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ManagedDatabaseVulnerabilityAssessmentScansClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ManagedDatabaseVulnerabilityAssessmentScansClient) getCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, scanID string, options *ManagedDatabaseVulnerabilityAssessmentScansClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if vulnerabilityAssessmentName == "" { + return nil, errors.New("parameter vulnerabilityAssessmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vulnerabilityAssessmentName}", url.PathEscape(string(vulnerabilityAssessmentName))) + if scanID == "" { + return nil, errors.New("parameter scanID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{scanId}", url.PathEscape(scanID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ManagedDatabaseVulnerabilityAssessmentScansClient) getHandleResponse(resp *http.Response) (ManagedDatabaseVulnerabilityAssessmentScansClientGetResponse, error) { + result := ManagedDatabaseVulnerabilityAssessmentScansClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VulnerabilityAssessmentScanRecord); err != nil { + return ManagedDatabaseVulnerabilityAssessmentScansClientGetResponse{}, err + } + return result, nil +} + +// BeginInitiateScan - Executes a Vulnerability Assessment database scan. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - databaseName - The name of the database. +// - vulnerabilityAssessmentName - The name of the vulnerability assessment. +// - scanID - The vulnerability assessment scan Id of the scan to retrieve. +// - options - ManagedDatabaseVulnerabilityAssessmentScansClientBeginInitiateScanOptions contains the optional parameters for +// the ManagedDatabaseVulnerabilityAssessmentScansClient.BeginInitiateScan method. +func (client *ManagedDatabaseVulnerabilityAssessmentScansClient) BeginInitiateScan(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, scanID string, options *ManagedDatabaseVulnerabilityAssessmentScansClientBeginInitiateScanOptions) (*runtime.Poller[ManagedDatabaseVulnerabilityAssessmentScansClientInitiateScanResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.initiateScan(ctx, resourceGroupName, managedInstanceName, databaseName, vulnerabilityAssessmentName, scanID, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ManagedDatabaseVulnerabilityAssessmentScansClientInitiateScanResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ManagedDatabaseVulnerabilityAssessmentScansClientInitiateScanResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// InitiateScan - Executes a Vulnerability Assessment database scan. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +func (client *ManagedDatabaseVulnerabilityAssessmentScansClient) initiateScan(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, scanID string, options *ManagedDatabaseVulnerabilityAssessmentScansClientBeginInitiateScanOptions) (*http.Response, error) { + var err error + const operationName = "ManagedDatabaseVulnerabilityAssessmentScansClient.BeginInitiateScan" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.initiateScanCreateRequest(ctx, resourceGroupName, managedInstanceName, databaseName, vulnerabilityAssessmentName, scanID, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// initiateScanCreateRequest creates the InitiateScan request. +func (client *ManagedDatabaseVulnerabilityAssessmentScansClient) initiateScanCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, scanID string, options *ManagedDatabaseVulnerabilityAssessmentScansClientBeginInitiateScanOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}/initiateScan" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if vulnerabilityAssessmentName == "" { + return nil, errors.New("parameter vulnerabilityAssessmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vulnerabilityAssessmentName}", url.PathEscape(string(vulnerabilityAssessmentName))) + if scanID == "" { + return nil, errors.New("parameter scanID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{scanId}", url.PathEscape(scanID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + return req, nil +} + +// NewListByDatabasePager - Lists the vulnerability assessment scans of a database. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - databaseName - The name of the database. +// - vulnerabilityAssessmentName - The name of the vulnerability assessment. +// - options - ManagedDatabaseVulnerabilityAssessmentScansClientListByDatabaseOptions contains the optional parameters for the +// ManagedDatabaseVulnerabilityAssessmentScansClient.NewListByDatabasePager method. +func (client *ManagedDatabaseVulnerabilityAssessmentScansClient) NewListByDatabasePager(resourceGroupName string, managedInstanceName string, databaseName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, options *ManagedDatabaseVulnerabilityAssessmentScansClientListByDatabaseOptions) *runtime.Pager[ManagedDatabaseVulnerabilityAssessmentScansClientListByDatabaseResponse] { + return runtime.NewPager(runtime.PagingHandler[ManagedDatabaseVulnerabilityAssessmentScansClientListByDatabaseResponse]{ + More: func(page ManagedDatabaseVulnerabilityAssessmentScansClientListByDatabaseResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ManagedDatabaseVulnerabilityAssessmentScansClientListByDatabaseResponse) (ManagedDatabaseVulnerabilityAssessmentScansClientListByDatabaseResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ManagedDatabaseVulnerabilityAssessmentScansClient.NewListByDatabasePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByDatabaseCreateRequest(ctx, resourceGroupName, managedInstanceName, databaseName, vulnerabilityAssessmentName, options) + }, nil) + if err != nil { + return ManagedDatabaseVulnerabilityAssessmentScansClientListByDatabaseResponse{}, err + } + return client.listByDatabaseHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByDatabaseCreateRequest creates the ListByDatabase request. +func (client *ManagedDatabaseVulnerabilityAssessmentScansClient) listByDatabaseCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, options *ManagedDatabaseVulnerabilityAssessmentScansClientListByDatabaseOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if vulnerabilityAssessmentName == "" { + return nil, errors.New("parameter vulnerabilityAssessmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vulnerabilityAssessmentName}", url.PathEscape(string(vulnerabilityAssessmentName))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByDatabaseHandleResponse handles the ListByDatabase response. +func (client *ManagedDatabaseVulnerabilityAssessmentScansClient) listByDatabaseHandleResponse(resp *http.Response) (ManagedDatabaseVulnerabilityAssessmentScansClientListByDatabaseResponse, error) { + result := ManagedDatabaseVulnerabilityAssessmentScansClientListByDatabaseResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VulnerabilityAssessmentScanRecordListResult); err != nil { + return ManagedDatabaseVulnerabilityAssessmentScansClientListByDatabaseResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/managedinstanceadministrators_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/managedinstanceadministrators_client.go new file mode 100644 index 000000000..b9f2333f5 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/managedinstanceadministrators_client.go @@ -0,0 +1,345 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ManagedInstanceAdministratorsClient contains the methods for the ManagedInstanceAdministrators group. +// Don't use this type directly, use NewManagedInstanceAdministratorsClient() instead. +type ManagedInstanceAdministratorsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewManagedInstanceAdministratorsClient creates a new instance of ManagedInstanceAdministratorsClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewManagedInstanceAdministratorsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedInstanceAdministratorsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ManagedInstanceAdministratorsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates or updates a managed instance administrator. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - parameters - The requested administrator parameters. +// - options - ManagedInstanceAdministratorsClientBeginCreateOrUpdateOptions contains the optional parameters for the ManagedInstanceAdministratorsClient.BeginCreateOrUpdate +// method. +func (client *ManagedInstanceAdministratorsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, administratorName AdministratorName, parameters ManagedInstanceAdministrator, options *ManagedInstanceAdministratorsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ManagedInstanceAdministratorsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, managedInstanceName, administratorName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ManagedInstanceAdministratorsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ManagedInstanceAdministratorsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates or updates a managed instance administrator. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +func (client *ManagedInstanceAdministratorsClient) createOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, administratorName AdministratorName, parameters ManagedInstanceAdministrator, options *ManagedInstanceAdministratorsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ManagedInstanceAdministratorsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, managedInstanceName, administratorName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *ManagedInstanceAdministratorsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, administratorName AdministratorName, parameters ManagedInstanceAdministrator, options *ManagedInstanceAdministratorsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/administrators/{administratorName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if administratorName == "" { + return nil, errors.New("parameter administratorName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{administratorName}", url.PathEscape(string(administratorName))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes a managed instance administrator. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - options - ManagedInstanceAdministratorsClientBeginDeleteOptions contains the optional parameters for the ManagedInstanceAdministratorsClient.BeginDelete +// method. +func (client *ManagedInstanceAdministratorsClient) BeginDelete(ctx context.Context, resourceGroupName string, managedInstanceName string, administratorName AdministratorName, options *ManagedInstanceAdministratorsClientBeginDeleteOptions) (*runtime.Poller[ManagedInstanceAdministratorsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, managedInstanceName, administratorName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ManagedInstanceAdministratorsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ManagedInstanceAdministratorsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes a managed instance administrator. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +func (client *ManagedInstanceAdministratorsClient) deleteOperation(ctx context.Context, resourceGroupName string, managedInstanceName string, administratorName AdministratorName, options *ManagedInstanceAdministratorsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "ManagedInstanceAdministratorsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, managedInstanceName, administratorName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *ManagedInstanceAdministratorsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, administratorName AdministratorName, options *ManagedInstanceAdministratorsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/administrators/{administratorName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if administratorName == "" { + return nil, errors.New("parameter administratorName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{administratorName}", url.PathEscape(string(administratorName))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + return req, nil +} + +// Get - Gets a managed instance administrator. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - options - ManagedInstanceAdministratorsClientGetOptions contains the optional parameters for the ManagedInstanceAdministratorsClient.Get +// method. +func (client *ManagedInstanceAdministratorsClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, administratorName AdministratorName, options *ManagedInstanceAdministratorsClientGetOptions) (ManagedInstanceAdministratorsClientGetResponse, error) { + var err error + const operationName = "ManagedInstanceAdministratorsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, managedInstanceName, administratorName, options) + if err != nil { + return ManagedInstanceAdministratorsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ManagedInstanceAdministratorsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ManagedInstanceAdministratorsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ManagedInstanceAdministratorsClient) getCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, administratorName AdministratorName, options *ManagedInstanceAdministratorsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/administrators/{administratorName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if administratorName == "" { + return nil, errors.New("parameter administratorName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{administratorName}", url.PathEscape(string(administratorName))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ManagedInstanceAdministratorsClient) getHandleResponse(resp *http.Response) (ManagedInstanceAdministratorsClientGetResponse, error) { + result := ManagedInstanceAdministratorsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ManagedInstanceAdministrator); err != nil { + return ManagedInstanceAdministratorsClientGetResponse{}, err + } + return result, nil +} + +// NewListByInstancePager - Gets a list of managed instance administrators. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - options - ManagedInstanceAdministratorsClientListByInstanceOptions contains the optional parameters for the ManagedInstanceAdministratorsClient.NewListByInstancePager +// method. +func (client *ManagedInstanceAdministratorsClient) NewListByInstancePager(resourceGroupName string, managedInstanceName string, options *ManagedInstanceAdministratorsClientListByInstanceOptions) *runtime.Pager[ManagedInstanceAdministratorsClientListByInstanceResponse] { + return runtime.NewPager(runtime.PagingHandler[ManagedInstanceAdministratorsClientListByInstanceResponse]{ + More: func(page ManagedInstanceAdministratorsClientListByInstanceResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ManagedInstanceAdministratorsClientListByInstanceResponse) (ManagedInstanceAdministratorsClientListByInstanceResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ManagedInstanceAdministratorsClient.NewListByInstancePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByInstanceCreateRequest(ctx, resourceGroupName, managedInstanceName, options) + }, nil) + if err != nil { + return ManagedInstanceAdministratorsClientListByInstanceResponse{}, err + } + return client.listByInstanceHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByInstanceCreateRequest creates the ListByInstance request. +func (client *ManagedInstanceAdministratorsClient) listByInstanceCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, options *ManagedInstanceAdministratorsClientListByInstanceOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/administrators" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByInstanceHandleResponse handles the ListByInstance response. +func (client *ManagedInstanceAdministratorsClient) listByInstanceHandleResponse(resp *http.Response) (ManagedInstanceAdministratorsClientListByInstanceResponse, error) { + result := ManagedInstanceAdministratorsClientListByInstanceResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ManagedInstanceAdministratorListResult); err != nil { + return ManagedInstanceAdministratorsClientListByInstanceResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/managedinstanceazureadonlyauthentications_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/managedinstanceazureadonlyauthentications_client.go new file mode 100644 index 000000000..dd5e3ec63 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/managedinstanceazureadonlyauthentications_client.go @@ -0,0 +1,350 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ManagedInstanceAzureADOnlyAuthenticationsClient contains the methods for the ManagedInstanceAzureADOnlyAuthentications group. +// Don't use this type directly, use NewManagedInstanceAzureADOnlyAuthenticationsClient() instead. +type ManagedInstanceAzureADOnlyAuthenticationsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewManagedInstanceAzureADOnlyAuthenticationsClient creates a new instance of ManagedInstanceAzureADOnlyAuthenticationsClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewManagedInstanceAzureADOnlyAuthenticationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedInstanceAzureADOnlyAuthenticationsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ManagedInstanceAzureADOnlyAuthenticationsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Sets Server Active Directory only authentication property or updates an existing server Active Directory +// only authentication property. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - authenticationName - The name of server azure active directory only authentication. +// - parameters - The required parameters for creating or updating an Active Directory only authentication property. +// - options - ManagedInstanceAzureADOnlyAuthenticationsClientBeginCreateOrUpdateOptions contains the optional parameters for +// the ManagedInstanceAzureADOnlyAuthenticationsClient.BeginCreateOrUpdate method. +func (client *ManagedInstanceAzureADOnlyAuthenticationsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, authenticationName AuthenticationName, parameters ManagedInstanceAzureADOnlyAuthentication, options *ManagedInstanceAzureADOnlyAuthenticationsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ManagedInstanceAzureADOnlyAuthenticationsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, managedInstanceName, authenticationName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ManagedInstanceAzureADOnlyAuthenticationsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ManagedInstanceAzureADOnlyAuthenticationsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Sets Server Active Directory only authentication property or updates an existing server Active Directory +// only authentication property. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +func (client *ManagedInstanceAzureADOnlyAuthenticationsClient) createOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, authenticationName AuthenticationName, parameters ManagedInstanceAzureADOnlyAuthentication, options *ManagedInstanceAzureADOnlyAuthenticationsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ManagedInstanceAzureADOnlyAuthenticationsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, managedInstanceName, authenticationName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *ManagedInstanceAzureADOnlyAuthenticationsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, authenticationName AuthenticationName, parameters ManagedInstanceAzureADOnlyAuthentication, options *ManagedInstanceAzureADOnlyAuthenticationsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/azureADOnlyAuthentications/{authenticationName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if authenticationName == "" { + return nil, errors.New("parameter authenticationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{authenticationName}", url.PathEscape(string(authenticationName))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes an existing server Active Directory only authentication property. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - authenticationName - The name of server azure active directory only authentication. +// - options - ManagedInstanceAzureADOnlyAuthenticationsClientBeginDeleteOptions contains the optional parameters for the ManagedInstanceAzureADOnlyAuthenticationsClient.BeginDelete +// method. +func (client *ManagedInstanceAzureADOnlyAuthenticationsClient) BeginDelete(ctx context.Context, resourceGroupName string, managedInstanceName string, authenticationName AuthenticationName, options *ManagedInstanceAzureADOnlyAuthenticationsClientBeginDeleteOptions) (*runtime.Poller[ManagedInstanceAzureADOnlyAuthenticationsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, managedInstanceName, authenticationName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ManagedInstanceAzureADOnlyAuthenticationsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ManagedInstanceAzureADOnlyAuthenticationsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes an existing server Active Directory only authentication property. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +func (client *ManagedInstanceAzureADOnlyAuthenticationsClient) deleteOperation(ctx context.Context, resourceGroupName string, managedInstanceName string, authenticationName AuthenticationName, options *ManagedInstanceAzureADOnlyAuthenticationsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "ManagedInstanceAzureADOnlyAuthenticationsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, managedInstanceName, authenticationName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *ManagedInstanceAzureADOnlyAuthenticationsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, authenticationName AuthenticationName, options *ManagedInstanceAzureADOnlyAuthenticationsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/azureADOnlyAuthentications/{authenticationName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if authenticationName == "" { + return nil, errors.New("parameter authenticationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{authenticationName}", url.PathEscape(string(authenticationName))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + return req, nil +} + +// Get - Gets a specific Azure Active Directory only authentication property. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - authenticationName - The name of server azure active directory only authentication. +// - options - ManagedInstanceAzureADOnlyAuthenticationsClientGetOptions contains the optional parameters for the ManagedInstanceAzureADOnlyAuthenticationsClient.Get +// method. +func (client *ManagedInstanceAzureADOnlyAuthenticationsClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, authenticationName AuthenticationName, options *ManagedInstanceAzureADOnlyAuthenticationsClientGetOptions) (ManagedInstanceAzureADOnlyAuthenticationsClientGetResponse, error) { + var err error + const operationName = "ManagedInstanceAzureADOnlyAuthenticationsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, managedInstanceName, authenticationName, options) + if err != nil { + return ManagedInstanceAzureADOnlyAuthenticationsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ManagedInstanceAzureADOnlyAuthenticationsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ManagedInstanceAzureADOnlyAuthenticationsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ManagedInstanceAzureADOnlyAuthenticationsClient) getCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, authenticationName AuthenticationName, options *ManagedInstanceAzureADOnlyAuthenticationsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/azureADOnlyAuthentications/{authenticationName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if authenticationName == "" { + return nil, errors.New("parameter authenticationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{authenticationName}", url.PathEscape(string(authenticationName))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ManagedInstanceAzureADOnlyAuthenticationsClient) getHandleResponse(resp *http.Response) (ManagedInstanceAzureADOnlyAuthenticationsClientGetResponse, error) { + result := ManagedInstanceAzureADOnlyAuthenticationsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ManagedInstanceAzureADOnlyAuthentication); err != nil { + return ManagedInstanceAzureADOnlyAuthenticationsClientGetResponse{}, err + } + return result, nil +} + +// NewListByInstancePager - Gets a list of server Azure Active Directory only authentications. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - options - ManagedInstanceAzureADOnlyAuthenticationsClientListByInstanceOptions contains the optional parameters for the +// ManagedInstanceAzureADOnlyAuthenticationsClient.NewListByInstancePager method. +func (client *ManagedInstanceAzureADOnlyAuthenticationsClient) NewListByInstancePager(resourceGroupName string, managedInstanceName string, options *ManagedInstanceAzureADOnlyAuthenticationsClientListByInstanceOptions) *runtime.Pager[ManagedInstanceAzureADOnlyAuthenticationsClientListByInstanceResponse] { + return runtime.NewPager(runtime.PagingHandler[ManagedInstanceAzureADOnlyAuthenticationsClientListByInstanceResponse]{ + More: func(page ManagedInstanceAzureADOnlyAuthenticationsClientListByInstanceResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ManagedInstanceAzureADOnlyAuthenticationsClientListByInstanceResponse) (ManagedInstanceAzureADOnlyAuthenticationsClientListByInstanceResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ManagedInstanceAzureADOnlyAuthenticationsClient.NewListByInstancePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByInstanceCreateRequest(ctx, resourceGroupName, managedInstanceName, options) + }, nil) + if err != nil { + return ManagedInstanceAzureADOnlyAuthenticationsClientListByInstanceResponse{}, err + } + return client.listByInstanceHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByInstanceCreateRequest creates the ListByInstance request. +func (client *ManagedInstanceAzureADOnlyAuthenticationsClient) listByInstanceCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, options *ManagedInstanceAzureADOnlyAuthenticationsClientListByInstanceOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/azureADOnlyAuthentications" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByInstanceHandleResponse handles the ListByInstance response. +func (client *ManagedInstanceAzureADOnlyAuthenticationsClient) listByInstanceHandleResponse(resp *http.Response) (ManagedInstanceAzureADOnlyAuthenticationsClientListByInstanceResponse, error) { + result := ManagedInstanceAzureADOnlyAuthenticationsClientListByInstanceResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ManagedInstanceAzureADOnlyAuthListResult); err != nil { + return ManagedInstanceAzureADOnlyAuthenticationsClientListByInstanceResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/managedinstanceencryptionprotectors_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/managedinstanceencryptionprotectors_client.go new file mode 100644 index 000000000..12f8993bc --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/managedinstanceencryptionprotectors_client.go @@ -0,0 +1,348 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ManagedInstanceEncryptionProtectorsClient contains the methods for the ManagedInstanceEncryptionProtectors group. +// Don't use this type directly, use NewManagedInstanceEncryptionProtectorsClient() instead. +type ManagedInstanceEncryptionProtectorsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewManagedInstanceEncryptionProtectorsClient creates a new instance of ManagedInstanceEncryptionProtectorsClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewManagedInstanceEncryptionProtectorsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedInstanceEncryptionProtectorsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ManagedInstanceEncryptionProtectorsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Updates an existing encryption protector. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - encryptionProtectorName - The name of the encryption protector to be updated. +// - parameters - The requested encryption protector resource state. +// - options - ManagedInstanceEncryptionProtectorsClientBeginCreateOrUpdateOptions contains the optional parameters for the +// ManagedInstanceEncryptionProtectorsClient.BeginCreateOrUpdate method. +func (client *ManagedInstanceEncryptionProtectorsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, encryptionProtectorName EncryptionProtectorName, parameters ManagedInstanceEncryptionProtector, options *ManagedInstanceEncryptionProtectorsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ManagedInstanceEncryptionProtectorsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, managedInstanceName, encryptionProtectorName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ManagedInstanceEncryptionProtectorsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ManagedInstanceEncryptionProtectorsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Updates an existing encryption protector. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +func (client *ManagedInstanceEncryptionProtectorsClient) createOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, encryptionProtectorName EncryptionProtectorName, parameters ManagedInstanceEncryptionProtector, options *ManagedInstanceEncryptionProtectorsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ManagedInstanceEncryptionProtectorsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, managedInstanceName, encryptionProtectorName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *ManagedInstanceEncryptionProtectorsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, encryptionProtectorName EncryptionProtectorName, parameters ManagedInstanceEncryptionProtector, options *ManagedInstanceEncryptionProtectorsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/encryptionProtector/{encryptionProtectorName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if encryptionProtectorName == "" { + return nil, errors.New("parameter encryptionProtectorName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{encryptionProtectorName}", url.PathEscape(string(encryptionProtectorName))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// Get - Gets a managed instance encryption protector. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - encryptionProtectorName - The name of the encryption protector to be retrieved. +// - options - ManagedInstanceEncryptionProtectorsClientGetOptions contains the optional parameters for the ManagedInstanceEncryptionProtectorsClient.Get +// method. +func (client *ManagedInstanceEncryptionProtectorsClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, encryptionProtectorName EncryptionProtectorName, options *ManagedInstanceEncryptionProtectorsClientGetOptions) (ManagedInstanceEncryptionProtectorsClientGetResponse, error) { + var err error + const operationName = "ManagedInstanceEncryptionProtectorsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, managedInstanceName, encryptionProtectorName, options) + if err != nil { + return ManagedInstanceEncryptionProtectorsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ManagedInstanceEncryptionProtectorsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ManagedInstanceEncryptionProtectorsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ManagedInstanceEncryptionProtectorsClient) getCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, encryptionProtectorName EncryptionProtectorName, options *ManagedInstanceEncryptionProtectorsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/encryptionProtector/{encryptionProtectorName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if encryptionProtectorName == "" { + return nil, errors.New("parameter encryptionProtectorName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{encryptionProtectorName}", url.PathEscape(string(encryptionProtectorName))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ManagedInstanceEncryptionProtectorsClient) getHandleResponse(resp *http.Response) (ManagedInstanceEncryptionProtectorsClientGetResponse, error) { + result := ManagedInstanceEncryptionProtectorsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ManagedInstanceEncryptionProtector); err != nil { + return ManagedInstanceEncryptionProtectorsClientGetResponse{}, err + } + return result, nil +} + +// NewListByInstancePager - Gets a list of managed instance encryption protectors +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - options - ManagedInstanceEncryptionProtectorsClientListByInstanceOptions contains the optional parameters for the ManagedInstanceEncryptionProtectorsClient.NewListByInstancePager +// method. +func (client *ManagedInstanceEncryptionProtectorsClient) NewListByInstancePager(resourceGroupName string, managedInstanceName string, options *ManagedInstanceEncryptionProtectorsClientListByInstanceOptions) *runtime.Pager[ManagedInstanceEncryptionProtectorsClientListByInstanceResponse] { + return runtime.NewPager(runtime.PagingHandler[ManagedInstanceEncryptionProtectorsClientListByInstanceResponse]{ + More: func(page ManagedInstanceEncryptionProtectorsClientListByInstanceResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ManagedInstanceEncryptionProtectorsClientListByInstanceResponse) (ManagedInstanceEncryptionProtectorsClientListByInstanceResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ManagedInstanceEncryptionProtectorsClient.NewListByInstancePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByInstanceCreateRequest(ctx, resourceGroupName, managedInstanceName, options) + }, nil) + if err != nil { + return ManagedInstanceEncryptionProtectorsClientListByInstanceResponse{}, err + } + return client.listByInstanceHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByInstanceCreateRequest creates the ListByInstance request. +func (client *ManagedInstanceEncryptionProtectorsClient) listByInstanceCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, options *ManagedInstanceEncryptionProtectorsClientListByInstanceOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/encryptionProtector" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByInstanceHandleResponse handles the ListByInstance response. +func (client *ManagedInstanceEncryptionProtectorsClient) listByInstanceHandleResponse(resp *http.Response) (ManagedInstanceEncryptionProtectorsClientListByInstanceResponse, error) { + result := ManagedInstanceEncryptionProtectorsClientListByInstanceResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ManagedInstanceEncryptionProtectorListResult); err != nil { + return ManagedInstanceEncryptionProtectorsClientListByInstanceResponse{}, err + } + return result, nil +} + +// BeginRevalidate - Revalidates an existing encryption protector. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - encryptionProtectorName - The name of the encryption protector to be updated. +// - options - ManagedInstanceEncryptionProtectorsClientBeginRevalidateOptions contains the optional parameters for the ManagedInstanceEncryptionProtectorsClient.BeginRevalidate +// method. +func (client *ManagedInstanceEncryptionProtectorsClient) BeginRevalidate(ctx context.Context, resourceGroupName string, managedInstanceName string, encryptionProtectorName EncryptionProtectorName, options *ManagedInstanceEncryptionProtectorsClientBeginRevalidateOptions) (*runtime.Poller[ManagedInstanceEncryptionProtectorsClientRevalidateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.revalidate(ctx, resourceGroupName, managedInstanceName, encryptionProtectorName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ManagedInstanceEncryptionProtectorsClientRevalidateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ManagedInstanceEncryptionProtectorsClientRevalidateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Revalidate - Revalidates an existing encryption protector. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +func (client *ManagedInstanceEncryptionProtectorsClient) revalidate(ctx context.Context, resourceGroupName string, managedInstanceName string, encryptionProtectorName EncryptionProtectorName, options *ManagedInstanceEncryptionProtectorsClientBeginRevalidateOptions) (*http.Response, error) { + var err error + const operationName = "ManagedInstanceEncryptionProtectorsClient.BeginRevalidate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.revalidateCreateRequest(ctx, resourceGroupName, managedInstanceName, encryptionProtectorName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// revalidateCreateRequest creates the Revalidate request. +func (client *ManagedInstanceEncryptionProtectorsClient) revalidateCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, encryptionProtectorName EncryptionProtectorName, options *ManagedInstanceEncryptionProtectorsClientBeginRevalidateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/encryptionProtector/{encryptionProtectorName}/revalidate" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if encryptionProtectorName == "" { + return nil, errors.New("parameter encryptionProtectorName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{encryptionProtectorName}", url.PathEscape(string(encryptionProtectorName))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/managedinstancekeys_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/managedinstancekeys_client.go new file mode 100644 index 000000000..cb3f2f9eb --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/managedinstancekeys_client.go @@ -0,0 +1,350 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ManagedInstanceKeysClient contains the methods for the ManagedInstanceKeys group. +// Don't use this type directly, use NewManagedInstanceKeysClient() instead. +type ManagedInstanceKeysClient struct { + internal *arm.Client + subscriptionID string +} + +// NewManagedInstanceKeysClient creates a new instance of ManagedInstanceKeysClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewManagedInstanceKeysClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedInstanceKeysClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ManagedInstanceKeysClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates or updates a managed instance key. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - keyName - The name of the managed instance key to be operated on (updated or created). +// - parameters - The requested managed instance key resource state. +// - options - ManagedInstanceKeysClientBeginCreateOrUpdateOptions contains the optional parameters for the ManagedInstanceKeysClient.BeginCreateOrUpdate +// method. +func (client *ManagedInstanceKeysClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, keyName string, parameters ManagedInstanceKey, options *ManagedInstanceKeysClientBeginCreateOrUpdateOptions) (*runtime.Poller[ManagedInstanceKeysClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, managedInstanceName, keyName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ManagedInstanceKeysClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ManagedInstanceKeysClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates or updates a managed instance key. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +func (client *ManagedInstanceKeysClient) createOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, keyName string, parameters ManagedInstanceKey, options *ManagedInstanceKeysClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ManagedInstanceKeysClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, managedInstanceName, keyName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *ManagedInstanceKeysClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, keyName string, parameters ManagedInstanceKey, options *ManagedInstanceKeysClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/keys/{keyName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if keyName == "" { + return nil, errors.New("parameter keyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{keyName}", url.PathEscape(keyName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes the managed instance key with the given name. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - keyName - The name of the managed instance key to be deleted. +// - options - ManagedInstanceKeysClientBeginDeleteOptions contains the optional parameters for the ManagedInstanceKeysClient.BeginDelete +// method. +func (client *ManagedInstanceKeysClient) BeginDelete(ctx context.Context, resourceGroupName string, managedInstanceName string, keyName string, options *ManagedInstanceKeysClientBeginDeleteOptions) (*runtime.Poller[ManagedInstanceKeysClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, managedInstanceName, keyName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ManagedInstanceKeysClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ManagedInstanceKeysClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes the managed instance key with the given name. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +func (client *ManagedInstanceKeysClient) deleteOperation(ctx context.Context, resourceGroupName string, managedInstanceName string, keyName string, options *ManagedInstanceKeysClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "ManagedInstanceKeysClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, managedInstanceName, keyName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *ManagedInstanceKeysClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, keyName string, options *ManagedInstanceKeysClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/keys/{keyName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if keyName == "" { + return nil, errors.New("parameter keyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{keyName}", url.PathEscape(keyName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + return req, nil +} + +// Get - Gets a managed instance key. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - keyName - The name of the managed instance key to be retrieved. +// - options - ManagedInstanceKeysClientGetOptions contains the optional parameters for the ManagedInstanceKeysClient.Get method. +func (client *ManagedInstanceKeysClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, keyName string, options *ManagedInstanceKeysClientGetOptions) (ManagedInstanceKeysClientGetResponse, error) { + var err error + const operationName = "ManagedInstanceKeysClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, managedInstanceName, keyName, options) + if err != nil { + return ManagedInstanceKeysClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ManagedInstanceKeysClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ManagedInstanceKeysClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ManagedInstanceKeysClient) getCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, keyName string, options *ManagedInstanceKeysClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/keys/{keyName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if keyName == "" { + return nil, errors.New("parameter keyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{keyName}", url.PathEscape(keyName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ManagedInstanceKeysClient) getHandleResponse(resp *http.Response) (ManagedInstanceKeysClientGetResponse, error) { + result := ManagedInstanceKeysClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ManagedInstanceKey); err != nil { + return ManagedInstanceKeysClientGetResponse{}, err + } + return result, nil +} + +// NewListByInstancePager - Gets a list of managed instance keys. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - options - ManagedInstanceKeysClientListByInstanceOptions contains the optional parameters for the ManagedInstanceKeysClient.NewListByInstancePager +// method. +func (client *ManagedInstanceKeysClient) NewListByInstancePager(resourceGroupName string, managedInstanceName string, options *ManagedInstanceKeysClientListByInstanceOptions) *runtime.Pager[ManagedInstanceKeysClientListByInstanceResponse] { + return runtime.NewPager(runtime.PagingHandler[ManagedInstanceKeysClientListByInstanceResponse]{ + More: func(page ManagedInstanceKeysClientListByInstanceResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ManagedInstanceKeysClientListByInstanceResponse) (ManagedInstanceKeysClientListByInstanceResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ManagedInstanceKeysClient.NewListByInstancePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByInstanceCreateRequest(ctx, resourceGroupName, managedInstanceName, options) + }, nil) + if err != nil { + return ManagedInstanceKeysClientListByInstanceResponse{}, err + } + return client.listByInstanceHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByInstanceCreateRequest creates the ListByInstance request. +func (client *ManagedInstanceKeysClient) listByInstanceCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, options *ManagedInstanceKeysClientListByInstanceOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/keys" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByInstanceHandleResponse handles the ListByInstance response. +func (client *ManagedInstanceKeysClient) listByInstanceHandleResponse(resp *http.Response) (ManagedInstanceKeysClientListByInstanceResponse, error) { + result := ManagedInstanceKeysClientListByInstanceResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ManagedInstanceKeyListResult); err != nil { + return ManagedInstanceKeysClientListByInstanceResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/managedinstancelongtermretentionpolicies_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/managedinstancelongtermretentionpolicies_client.go new file mode 100644 index 000000000..5c3f82002 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/managedinstancelongtermretentionpolicies_client.go @@ -0,0 +1,282 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ManagedInstanceLongTermRetentionPoliciesClient contains the methods for the ManagedInstanceLongTermRetentionPolicies group. +// Don't use this type directly, use NewManagedInstanceLongTermRetentionPoliciesClient() instead. +type ManagedInstanceLongTermRetentionPoliciesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewManagedInstanceLongTermRetentionPoliciesClient creates a new instance of ManagedInstanceLongTermRetentionPoliciesClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewManagedInstanceLongTermRetentionPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedInstanceLongTermRetentionPoliciesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ManagedInstanceLongTermRetentionPoliciesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Sets a managed database's long term retention policy. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - databaseName - The name of the database. +// - policyName - The policy name. Should always be Default. +// - parameters - The long term retention policy info. +// - options - ManagedInstanceLongTermRetentionPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for +// the ManagedInstanceLongTermRetentionPoliciesClient.BeginCreateOrUpdate method. +func (client *ManagedInstanceLongTermRetentionPoliciesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, policyName ManagedInstanceLongTermRetentionPolicyName, parameters ManagedInstanceLongTermRetentionPolicy, options *ManagedInstanceLongTermRetentionPoliciesClientBeginCreateOrUpdateOptions) (*runtime.Poller[ManagedInstanceLongTermRetentionPoliciesClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, managedInstanceName, databaseName, policyName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ManagedInstanceLongTermRetentionPoliciesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ManagedInstanceLongTermRetentionPoliciesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Sets a managed database's long term retention policy. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +func (client *ManagedInstanceLongTermRetentionPoliciesClient) createOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, policyName ManagedInstanceLongTermRetentionPolicyName, parameters ManagedInstanceLongTermRetentionPolicy, options *ManagedInstanceLongTermRetentionPoliciesClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ManagedInstanceLongTermRetentionPoliciesClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, managedInstanceName, databaseName, policyName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *ManagedInstanceLongTermRetentionPoliciesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, policyName ManagedInstanceLongTermRetentionPolicyName, parameters ManagedInstanceLongTermRetentionPolicy, options *ManagedInstanceLongTermRetentionPoliciesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/backupLongTermRetentionPolicies/{policyName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if policyName == "" { + return nil, errors.New("parameter policyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{policyName}", url.PathEscape(string(policyName))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// Get - Gets a managed database's long term retention policy. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - databaseName - The name of the database. +// - policyName - The policy name. Should always be Default. +// - options - ManagedInstanceLongTermRetentionPoliciesClientGetOptions contains the optional parameters for the ManagedInstanceLongTermRetentionPoliciesClient.Get +// method. +func (client *ManagedInstanceLongTermRetentionPoliciesClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, policyName ManagedInstanceLongTermRetentionPolicyName, options *ManagedInstanceLongTermRetentionPoliciesClientGetOptions) (ManagedInstanceLongTermRetentionPoliciesClientGetResponse, error) { + var err error + const operationName = "ManagedInstanceLongTermRetentionPoliciesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, managedInstanceName, databaseName, policyName, options) + if err != nil { + return ManagedInstanceLongTermRetentionPoliciesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ManagedInstanceLongTermRetentionPoliciesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ManagedInstanceLongTermRetentionPoliciesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ManagedInstanceLongTermRetentionPoliciesClient) getCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, policyName ManagedInstanceLongTermRetentionPolicyName, options *ManagedInstanceLongTermRetentionPoliciesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/backupLongTermRetentionPolicies/{policyName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if policyName == "" { + return nil, errors.New("parameter policyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{policyName}", url.PathEscape(string(policyName))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ManagedInstanceLongTermRetentionPoliciesClient) getHandleResponse(resp *http.Response) (ManagedInstanceLongTermRetentionPoliciesClientGetResponse, error) { + result := ManagedInstanceLongTermRetentionPoliciesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ManagedInstanceLongTermRetentionPolicy); err != nil { + return ManagedInstanceLongTermRetentionPoliciesClientGetResponse{}, err + } + return result, nil +} + +// NewListByDatabasePager - Gets a database's long term retention policy. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - databaseName - The name of the database. +// - options - ManagedInstanceLongTermRetentionPoliciesClientListByDatabaseOptions contains the optional parameters for the +// ManagedInstanceLongTermRetentionPoliciesClient.NewListByDatabasePager method. +func (client *ManagedInstanceLongTermRetentionPoliciesClient) NewListByDatabasePager(resourceGroupName string, managedInstanceName string, databaseName string, options *ManagedInstanceLongTermRetentionPoliciesClientListByDatabaseOptions) *runtime.Pager[ManagedInstanceLongTermRetentionPoliciesClientListByDatabaseResponse] { + return runtime.NewPager(runtime.PagingHandler[ManagedInstanceLongTermRetentionPoliciesClientListByDatabaseResponse]{ + More: func(page ManagedInstanceLongTermRetentionPoliciesClientListByDatabaseResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ManagedInstanceLongTermRetentionPoliciesClientListByDatabaseResponse) (ManagedInstanceLongTermRetentionPoliciesClientListByDatabaseResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ManagedInstanceLongTermRetentionPoliciesClient.NewListByDatabasePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByDatabaseCreateRequest(ctx, resourceGroupName, managedInstanceName, databaseName, options) + }, nil) + if err != nil { + return ManagedInstanceLongTermRetentionPoliciesClientListByDatabaseResponse{}, err + } + return client.listByDatabaseHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByDatabaseCreateRequest creates the ListByDatabase request. +func (client *ManagedInstanceLongTermRetentionPoliciesClient) listByDatabaseCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, options *ManagedInstanceLongTermRetentionPoliciesClientListByDatabaseOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/backupLongTermRetentionPolicies" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByDatabaseHandleResponse handles the ListByDatabase response. +func (client *ManagedInstanceLongTermRetentionPoliciesClient) listByDatabaseHandleResponse(resp *http.Response) (ManagedInstanceLongTermRetentionPoliciesClientListByDatabaseResponse, error) { + result := ManagedInstanceLongTermRetentionPoliciesClientListByDatabaseResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ManagedInstanceLongTermRetentionPolicyListResult); err != nil { + return ManagedInstanceLongTermRetentionPoliciesClientListByDatabaseResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/managedinstanceoperations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/managedinstanceoperations_client.go new file mode 100644 index 000000000..55ba78aeb --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/managedinstanceoperations_client.go @@ -0,0 +1,239 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ManagedInstanceOperationsClient contains the methods for the ManagedInstanceOperations group. +// Don't use this type directly, use NewManagedInstanceOperationsClient() instead. +type ManagedInstanceOperationsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewManagedInstanceOperationsClient creates a new instance of ManagedInstanceOperationsClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewManagedInstanceOperationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedInstanceOperationsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ManagedInstanceOperationsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Cancel - Cancels the asynchronous operation on the managed instance. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - options - ManagedInstanceOperationsClientCancelOptions contains the optional parameters for the ManagedInstanceOperationsClient.Cancel +// method. +func (client *ManagedInstanceOperationsClient) Cancel(ctx context.Context, resourceGroupName string, managedInstanceName string, operationID string, options *ManagedInstanceOperationsClientCancelOptions) (ManagedInstanceOperationsClientCancelResponse, error) { + var err error + const operationName = "ManagedInstanceOperationsClient.Cancel" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.cancelCreateRequest(ctx, resourceGroupName, managedInstanceName, operationID, options) + if err != nil { + return ManagedInstanceOperationsClientCancelResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ManagedInstanceOperationsClientCancelResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ManagedInstanceOperationsClientCancelResponse{}, err + } + return ManagedInstanceOperationsClientCancelResponse{}, nil +} + +// cancelCreateRequest creates the Cancel request. +func (client *ManagedInstanceOperationsClient) cancelCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, operationID string, options *ManagedInstanceOperationsClientCancelOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/operations/{operationId}/cancel" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if operationID == "" { + return nil, errors.New("parameter operationID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{operationId}", url.PathEscape(operationID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + return req, nil +} + +// Get - Gets a management operation on a managed instance. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - options - ManagedInstanceOperationsClientGetOptions contains the optional parameters for the ManagedInstanceOperationsClient.Get +// method. +func (client *ManagedInstanceOperationsClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, operationID string, options *ManagedInstanceOperationsClientGetOptions) (ManagedInstanceOperationsClientGetResponse, error) { + var err error + const operationName = "ManagedInstanceOperationsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, managedInstanceName, operationID, options) + if err != nil { + return ManagedInstanceOperationsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ManagedInstanceOperationsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ManagedInstanceOperationsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ManagedInstanceOperationsClient) getCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, operationID string, options *ManagedInstanceOperationsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/operations/{operationId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if operationID == "" { + return nil, errors.New("parameter operationID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{operationId}", url.PathEscape(operationID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ManagedInstanceOperationsClient) getHandleResponse(resp *http.Response) (ManagedInstanceOperationsClientGetResponse, error) { + result := ManagedInstanceOperationsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ManagedInstanceOperation); err != nil { + return ManagedInstanceOperationsClientGetResponse{}, err + } + return result, nil +} + +// NewListByManagedInstancePager - Gets a list of operations performed on the managed instance. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - options - ManagedInstanceOperationsClientListByManagedInstanceOptions contains the optional parameters for the ManagedInstanceOperationsClient.NewListByManagedInstancePager +// method. +func (client *ManagedInstanceOperationsClient) NewListByManagedInstancePager(resourceGroupName string, managedInstanceName string, options *ManagedInstanceOperationsClientListByManagedInstanceOptions) *runtime.Pager[ManagedInstanceOperationsClientListByManagedInstanceResponse] { + return runtime.NewPager(runtime.PagingHandler[ManagedInstanceOperationsClientListByManagedInstanceResponse]{ + More: func(page ManagedInstanceOperationsClientListByManagedInstanceResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ManagedInstanceOperationsClientListByManagedInstanceResponse) (ManagedInstanceOperationsClientListByManagedInstanceResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ManagedInstanceOperationsClient.NewListByManagedInstancePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByManagedInstanceCreateRequest(ctx, resourceGroupName, managedInstanceName, options) + }, nil) + if err != nil { + return ManagedInstanceOperationsClientListByManagedInstanceResponse{}, err + } + return client.listByManagedInstanceHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByManagedInstanceCreateRequest creates the ListByManagedInstance request. +func (client *ManagedInstanceOperationsClient) listByManagedInstanceCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, options *ManagedInstanceOperationsClientListByManagedInstanceOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/operations" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByManagedInstanceHandleResponse handles the ListByManagedInstance response. +func (client *ManagedInstanceOperationsClient) listByManagedInstanceHandleResponse(resp *http.Response) (ManagedInstanceOperationsClientListByManagedInstanceResponse, error) { + result := ManagedInstanceOperationsClientListByManagedInstanceResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ManagedInstanceOperationListResult); err != nil { + return ManagedInstanceOperationsClientListByManagedInstanceResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/managedinstanceprivateendpointconnections_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/managedinstanceprivateendpointconnections_client.go new file mode 100644 index 000000000..912a16014 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/managedinstanceprivateendpointconnections_client.go @@ -0,0 +1,345 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ManagedInstancePrivateEndpointConnectionsClient contains the methods for the ManagedInstancePrivateEndpointConnections group. +// Don't use this type directly, use NewManagedInstancePrivateEndpointConnectionsClient() instead. +type ManagedInstancePrivateEndpointConnectionsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewManagedInstancePrivateEndpointConnectionsClient creates a new instance of ManagedInstancePrivateEndpointConnectionsClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewManagedInstancePrivateEndpointConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedInstancePrivateEndpointConnectionsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ManagedInstancePrivateEndpointConnectionsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Approve or reject a private endpoint connection with a given name. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - options - ManagedInstancePrivateEndpointConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for +// the ManagedInstancePrivateEndpointConnectionsClient.BeginCreateOrUpdate method. +func (client *ManagedInstancePrivateEndpointConnectionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, privateEndpointConnectionName string, parameters ManagedInstancePrivateEndpointConnection, options *ManagedInstancePrivateEndpointConnectionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ManagedInstancePrivateEndpointConnectionsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, managedInstanceName, privateEndpointConnectionName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ManagedInstancePrivateEndpointConnectionsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ManagedInstancePrivateEndpointConnectionsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Approve or reject a private endpoint connection with a given name. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +func (client *ManagedInstancePrivateEndpointConnectionsClient) createOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, privateEndpointConnectionName string, parameters ManagedInstancePrivateEndpointConnection, options *ManagedInstancePrivateEndpointConnectionsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ManagedInstancePrivateEndpointConnectionsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, managedInstanceName, privateEndpointConnectionName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *ManagedInstancePrivateEndpointConnectionsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, privateEndpointConnectionName string, parameters ManagedInstancePrivateEndpointConnection, options *ManagedInstancePrivateEndpointConnectionsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/privateEndpointConnections/{privateEndpointConnectionName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if privateEndpointConnectionName == "" { + return nil, errors.New("parameter privateEndpointConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{privateEndpointConnectionName}", url.PathEscape(privateEndpointConnectionName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes a private endpoint connection with a given name. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - options - ManagedInstancePrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the ManagedInstancePrivateEndpointConnectionsClient.BeginDelete +// method. +func (client *ManagedInstancePrivateEndpointConnectionsClient) BeginDelete(ctx context.Context, resourceGroupName string, managedInstanceName string, privateEndpointConnectionName string, options *ManagedInstancePrivateEndpointConnectionsClientBeginDeleteOptions) (*runtime.Poller[ManagedInstancePrivateEndpointConnectionsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, managedInstanceName, privateEndpointConnectionName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ManagedInstancePrivateEndpointConnectionsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ManagedInstancePrivateEndpointConnectionsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes a private endpoint connection with a given name. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +func (client *ManagedInstancePrivateEndpointConnectionsClient) deleteOperation(ctx context.Context, resourceGroupName string, managedInstanceName string, privateEndpointConnectionName string, options *ManagedInstancePrivateEndpointConnectionsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "ManagedInstancePrivateEndpointConnectionsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, managedInstanceName, privateEndpointConnectionName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *ManagedInstancePrivateEndpointConnectionsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, privateEndpointConnectionName string, options *ManagedInstancePrivateEndpointConnectionsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/privateEndpointConnections/{privateEndpointConnectionName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if privateEndpointConnectionName == "" { + return nil, errors.New("parameter privateEndpointConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{privateEndpointConnectionName}", url.PathEscape(privateEndpointConnectionName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + return req, nil +} + +// Get - Gets a private endpoint connection. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - privateEndpointConnectionName - The name of the private endpoint connection. +// - options - ManagedInstancePrivateEndpointConnectionsClientGetOptions contains the optional parameters for the ManagedInstancePrivateEndpointConnectionsClient.Get +// method. +func (client *ManagedInstancePrivateEndpointConnectionsClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, privateEndpointConnectionName string, options *ManagedInstancePrivateEndpointConnectionsClientGetOptions) (ManagedInstancePrivateEndpointConnectionsClientGetResponse, error) { + var err error + const operationName = "ManagedInstancePrivateEndpointConnectionsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, managedInstanceName, privateEndpointConnectionName, options) + if err != nil { + return ManagedInstancePrivateEndpointConnectionsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ManagedInstancePrivateEndpointConnectionsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ManagedInstancePrivateEndpointConnectionsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ManagedInstancePrivateEndpointConnectionsClient) getCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, privateEndpointConnectionName string, options *ManagedInstancePrivateEndpointConnectionsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/privateEndpointConnections/{privateEndpointConnectionName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if privateEndpointConnectionName == "" { + return nil, errors.New("parameter privateEndpointConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{privateEndpointConnectionName}", url.PathEscape(privateEndpointConnectionName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ManagedInstancePrivateEndpointConnectionsClient) getHandleResponse(resp *http.Response) (ManagedInstancePrivateEndpointConnectionsClientGetResponse, error) { + result := ManagedInstancePrivateEndpointConnectionsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ManagedInstancePrivateEndpointConnection); err != nil { + return ManagedInstancePrivateEndpointConnectionsClientGetResponse{}, err + } + return result, nil +} + +// NewListByManagedInstancePager - Gets all private endpoint connections on a server. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - options - ManagedInstancePrivateEndpointConnectionsClientListByManagedInstanceOptions contains the optional parameters +// for the ManagedInstancePrivateEndpointConnectionsClient.NewListByManagedInstancePager method. +func (client *ManagedInstancePrivateEndpointConnectionsClient) NewListByManagedInstancePager(resourceGroupName string, managedInstanceName string, options *ManagedInstancePrivateEndpointConnectionsClientListByManagedInstanceOptions) *runtime.Pager[ManagedInstancePrivateEndpointConnectionsClientListByManagedInstanceResponse] { + return runtime.NewPager(runtime.PagingHandler[ManagedInstancePrivateEndpointConnectionsClientListByManagedInstanceResponse]{ + More: func(page ManagedInstancePrivateEndpointConnectionsClientListByManagedInstanceResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ManagedInstancePrivateEndpointConnectionsClientListByManagedInstanceResponse) (ManagedInstancePrivateEndpointConnectionsClientListByManagedInstanceResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ManagedInstancePrivateEndpointConnectionsClient.NewListByManagedInstancePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByManagedInstanceCreateRequest(ctx, resourceGroupName, managedInstanceName, options) + }, nil) + if err != nil { + return ManagedInstancePrivateEndpointConnectionsClientListByManagedInstanceResponse{}, err + } + return client.listByManagedInstanceHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByManagedInstanceCreateRequest creates the ListByManagedInstance request. +func (client *ManagedInstancePrivateEndpointConnectionsClient) listByManagedInstanceCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, options *ManagedInstancePrivateEndpointConnectionsClientListByManagedInstanceOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/privateEndpointConnections" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByManagedInstanceHandleResponse handles the ListByManagedInstance response. +func (client *ManagedInstancePrivateEndpointConnectionsClient) listByManagedInstanceHandleResponse(resp *http.Response) (ManagedInstancePrivateEndpointConnectionsClientListByManagedInstanceResponse, error) { + result := ManagedInstancePrivateEndpointConnectionsClientListByManagedInstanceResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ManagedInstancePrivateEndpointConnectionListResult); err != nil { + return ManagedInstancePrivateEndpointConnectionsClientListByManagedInstanceResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/managedinstanceprivatelinkresources_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/managedinstanceprivatelinkresources_client.go new file mode 100644 index 000000000..0883c7b0f --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/managedinstanceprivatelinkresources_client.go @@ -0,0 +1,181 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ManagedInstancePrivateLinkResourcesClient contains the methods for the ManagedInstancePrivateLinkResources group. +// Don't use this type directly, use NewManagedInstancePrivateLinkResourcesClient() instead. +type ManagedInstancePrivateLinkResourcesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewManagedInstancePrivateLinkResourcesClient creates a new instance of ManagedInstancePrivateLinkResourcesClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewManagedInstancePrivateLinkResourcesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedInstancePrivateLinkResourcesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ManagedInstancePrivateLinkResourcesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Gets a private link resource for SQL server. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - groupName - The name of the private link resource. +// - options - ManagedInstancePrivateLinkResourcesClientGetOptions contains the optional parameters for the ManagedInstancePrivateLinkResourcesClient.Get +// method. +func (client *ManagedInstancePrivateLinkResourcesClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, groupName string, options *ManagedInstancePrivateLinkResourcesClientGetOptions) (ManagedInstancePrivateLinkResourcesClientGetResponse, error) { + var err error + const operationName = "ManagedInstancePrivateLinkResourcesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, managedInstanceName, groupName, options) + if err != nil { + return ManagedInstancePrivateLinkResourcesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ManagedInstancePrivateLinkResourcesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ManagedInstancePrivateLinkResourcesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ManagedInstancePrivateLinkResourcesClient) getCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, groupName string, options *ManagedInstancePrivateLinkResourcesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/privateLinkResources/{groupName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if groupName == "" { + return nil, errors.New("parameter groupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{groupName}", url.PathEscape(groupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ManagedInstancePrivateLinkResourcesClient) getHandleResponse(resp *http.Response) (ManagedInstancePrivateLinkResourcesClientGetResponse, error) { + result := ManagedInstancePrivateLinkResourcesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ManagedInstancePrivateLink); err != nil { + return ManagedInstancePrivateLinkResourcesClientGetResponse{}, err + } + return result, nil +} + +// NewListByManagedInstancePager - Gets the private link resources for SQL server. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - options - ManagedInstancePrivateLinkResourcesClientListByManagedInstanceOptions contains the optional parameters for the +// ManagedInstancePrivateLinkResourcesClient.NewListByManagedInstancePager method. +func (client *ManagedInstancePrivateLinkResourcesClient) NewListByManagedInstancePager(resourceGroupName string, managedInstanceName string, options *ManagedInstancePrivateLinkResourcesClientListByManagedInstanceOptions) *runtime.Pager[ManagedInstancePrivateLinkResourcesClientListByManagedInstanceResponse] { + return runtime.NewPager(runtime.PagingHandler[ManagedInstancePrivateLinkResourcesClientListByManagedInstanceResponse]{ + More: func(page ManagedInstancePrivateLinkResourcesClientListByManagedInstanceResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ManagedInstancePrivateLinkResourcesClientListByManagedInstanceResponse) (ManagedInstancePrivateLinkResourcesClientListByManagedInstanceResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ManagedInstancePrivateLinkResourcesClient.NewListByManagedInstancePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByManagedInstanceCreateRequest(ctx, resourceGroupName, managedInstanceName, options) + }, nil) + if err != nil { + return ManagedInstancePrivateLinkResourcesClientListByManagedInstanceResponse{}, err + } + return client.listByManagedInstanceHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByManagedInstanceCreateRequest creates the ListByManagedInstance request. +func (client *ManagedInstancePrivateLinkResourcesClient) listByManagedInstanceCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, options *ManagedInstancePrivateLinkResourcesClientListByManagedInstanceOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/privateLinkResources" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByManagedInstanceHandleResponse handles the ListByManagedInstance response. +func (client *ManagedInstancePrivateLinkResourcesClient) listByManagedInstanceHandleResponse(resp *http.Response) (ManagedInstancePrivateLinkResourcesClientListByManagedInstanceResponse, error) { + result := ManagedInstancePrivateLinkResourcesClientListByManagedInstanceResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ManagedInstancePrivateLinkListResult); err != nil { + return ManagedInstancePrivateLinkResourcesClientListByManagedInstanceResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/managedinstances_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/managedinstances_client.go new file mode 100644 index 000000000..764926d81 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/managedinstances_client.go @@ -0,0 +1,708 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// ManagedInstancesClient contains the methods for the ManagedInstances group. +// Don't use this type directly, use NewManagedInstancesClient() instead. +type ManagedInstancesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewManagedInstancesClient creates a new instance of ManagedInstancesClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewManagedInstancesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedInstancesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ManagedInstancesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates or updates a managed instance. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-05-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - parameters - The requested managed instance resource state. +// - options - ManagedInstancesClientBeginCreateOrUpdateOptions contains the optional parameters for the ManagedInstancesClient.BeginCreateOrUpdate +// method. +func (client *ManagedInstancesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, parameters ManagedInstance, options *ManagedInstancesClientBeginCreateOrUpdateOptions) (*runtime.Poller[ManagedInstancesClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, managedInstanceName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ManagedInstancesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ManagedInstancesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates or updates a managed instance. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-05-01-preview +func (client *ManagedInstancesClient) createOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, parameters ManagedInstance, options *ManagedInstancesClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ManagedInstancesClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, managedInstanceName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *ManagedInstancesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, parameters ManagedInstance, options *ManagedInstancesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-05-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes a managed instance. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-05-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - options - ManagedInstancesClientBeginDeleteOptions contains the optional parameters for the ManagedInstancesClient.BeginDelete +// method. +func (client *ManagedInstancesClient) BeginDelete(ctx context.Context, resourceGroupName string, managedInstanceName string, options *ManagedInstancesClientBeginDeleteOptions) (*runtime.Poller[ManagedInstancesClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, managedInstanceName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ManagedInstancesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ManagedInstancesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes a managed instance. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-05-01-preview +func (client *ManagedInstancesClient) deleteOperation(ctx context.Context, resourceGroupName string, managedInstanceName string, options *ManagedInstancesClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "ManagedInstancesClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, managedInstanceName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *ManagedInstancesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, options *ManagedInstancesClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-05-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + return req, nil +} + +// BeginFailover - Failovers a managed instance. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-05-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance to failover. +// - options - ManagedInstancesClientBeginFailoverOptions contains the optional parameters for the ManagedInstancesClient.BeginFailover +// method. +func (client *ManagedInstancesClient) BeginFailover(ctx context.Context, resourceGroupName string, managedInstanceName string, options *ManagedInstancesClientBeginFailoverOptions) (*runtime.Poller[ManagedInstancesClientFailoverResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.failover(ctx, resourceGroupName, managedInstanceName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ManagedInstancesClientFailoverResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ManagedInstancesClientFailoverResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Failover - Failovers a managed instance. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-05-01-preview +func (client *ManagedInstancesClient) failover(ctx context.Context, resourceGroupName string, managedInstanceName string, options *ManagedInstancesClientBeginFailoverOptions) (*http.Response, error) { + var err error + const operationName = "ManagedInstancesClient.BeginFailover" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.failoverCreateRequest(ctx, resourceGroupName, managedInstanceName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// failoverCreateRequest creates the Failover request. +func (client *ManagedInstancesClient) failoverCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, options *ManagedInstancesClientBeginFailoverOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/failover" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.ReplicaType != nil { + reqQP.Set("replicaType", string(*options.ReplicaType)) + } + reqQP.Set("api-version", "2021-05-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + return req, nil +} + +// Get - Gets a managed instance. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-05-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - options - ManagedInstancesClientGetOptions contains the optional parameters for the ManagedInstancesClient.Get method. +func (client *ManagedInstancesClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, options *ManagedInstancesClientGetOptions) (ManagedInstancesClientGetResponse, error) { + var err error + const operationName = "ManagedInstancesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, managedInstanceName, options) + if err != nil { + return ManagedInstancesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ManagedInstancesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ManagedInstancesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ManagedInstancesClient) getCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, options *ManagedInstancesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Expand != nil { + reqQP.Set("$expand", *options.Expand) + } + reqQP.Set("api-version", "2021-05-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ManagedInstancesClient) getHandleResponse(resp *http.Response) (ManagedInstancesClientGetResponse, error) { + result := ManagedInstancesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ManagedInstance); err != nil { + return ManagedInstancesClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Gets a list of all managed instances in the subscription. +// +// Generated from API version 2021-05-01-preview +// - options - ManagedInstancesClientListOptions contains the optional parameters for the ManagedInstancesClient.NewListPager +// method. +func (client *ManagedInstancesClient) NewListPager(options *ManagedInstancesClientListOptions) *runtime.Pager[ManagedInstancesClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[ManagedInstancesClientListResponse]{ + More: func(page ManagedInstancesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ManagedInstancesClientListResponse) (ManagedInstancesClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ManagedInstancesClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) + if err != nil { + return ManagedInstancesClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *ManagedInstancesClient) listCreateRequest(ctx context.Context, options *ManagedInstancesClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/managedInstances" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Expand != nil { + reqQP.Set("$expand", *options.Expand) + } + reqQP.Set("api-version", "2021-05-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *ManagedInstancesClient) listHandleResponse(resp *http.Response) (ManagedInstancesClientListResponse, error) { + result := ManagedInstancesClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ManagedInstanceListResult); err != nil { + return ManagedInstancesClientListResponse{}, err + } + return result, nil +} + +// NewListByInstancePoolPager - Gets a list of all managed instances in an instance pool. +// +// Generated from API version 2021-05-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - instancePoolName - The instance pool name. +// - options - ManagedInstancesClientListByInstancePoolOptions contains the optional parameters for the ManagedInstancesClient.NewListByInstancePoolPager +// method. +func (client *ManagedInstancesClient) NewListByInstancePoolPager(resourceGroupName string, instancePoolName string, options *ManagedInstancesClientListByInstancePoolOptions) *runtime.Pager[ManagedInstancesClientListByInstancePoolResponse] { + return runtime.NewPager(runtime.PagingHandler[ManagedInstancesClientListByInstancePoolResponse]{ + More: func(page ManagedInstancesClientListByInstancePoolResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ManagedInstancesClientListByInstancePoolResponse) (ManagedInstancesClientListByInstancePoolResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ManagedInstancesClient.NewListByInstancePoolPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByInstancePoolCreateRequest(ctx, resourceGroupName, instancePoolName, options) + }, nil) + if err != nil { + return ManagedInstancesClientListByInstancePoolResponse{}, err + } + return client.listByInstancePoolHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByInstancePoolCreateRequest creates the ListByInstancePool request. +func (client *ManagedInstancesClient) listByInstancePoolCreateRequest(ctx context.Context, resourceGroupName string, instancePoolName string, options *ManagedInstancesClientListByInstancePoolOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}/managedInstances" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if instancePoolName == "" { + return nil, errors.New("parameter instancePoolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{instancePoolName}", url.PathEscape(instancePoolName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Expand != nil { + reqQP.Set("$expand", *options.Expand) + } + reqQP.Set("api-version", "2021-05-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByInstancePoolHandleResponse handles the ListByInstancePool response. +func (client *ManagedInstancesClient) listByInstancePoolHandleResponse(resp *http.Response) (ManagedInstancesClientListByInstancePoolResponse, error) { + result := ManagedInstancesClientListByInstancePoolResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ManagedInstanceListResult); err != nil { + return ManagedInstancesClientListByInstancePoolResponse{}, err + } + return result, nil +} + +// NewListByManagedInstancePager - Get top resource consuming queries of a managed instance. +// +// Generated from API version 2021-05-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - options - ManagedInstancesClientListByManagedInstanceOptions contains the optional parameters for the ManagedInstancesClient.NewListByManagedInstancePager +// method. +func (client *ManagedInstancesClient) NewListByManagedInstancePager(resourceGroupName string, managedInstanceName string, options *ManagedInstancesClientListByManagedInstanceOptions) *runtime.Pager[ManagedInstancesClientListByManagedInstanceResponse] { + return runtime.NewPager(runtime.PagingHandler[ManagedInstancesClientListByManagedInstanceResponse]{ + More: func(page ManagedInstancesClientListByManagedInstanceResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ManagedInstancesClientListByManagedInstanceResponse) (ManagedInstancesClientListByManagedInstanceResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ManagedInstancesClient.NewListByManagedInstancePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByManagedInstanceCreateRequest(ctx, resourceGroupName, managedInstanceName, options) + }, nil) + if err != nil { + return ManagedInstancesClientListByManagedInstanceResponse{}, err + } + return client.listByManagedInstanceHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByManagedInstanceCreateRequest creates the ListByManagedInstance request. +func (client *ManagedInstancesClient) listByManagedInstanceCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, options *ManagedInstancesClientListByManagedInstanceOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/topqueries" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.NumberOfQueries != nil { + reqQP.Set("numberOfQueries", strconv.FormatInt(int64(*options.NumberOfQueries), 10)) + } + if options != nil && options.Databases != nil { + reqQP.Set("databases", *options.Databases) + } + if options != nil && options.StartTime != nil { + reqQP.Set("startTime", *options.StartTime) + } + if options != nil && options.EndTime != nil { + reqQP.Set("endTime", *options.EndTime) + } + if options != nil && options.Interval != nil { + reqQP.Set("interval", string(*options.Interval)) + } + if options != nil && options.AggregationFunction != nil { + reqQP.Set("aggregationFunction", string(*options.AggregationFunction)) + } + if options != nil && options.ObservationMetric != nil { + reqQP.Set("observationMetric", string(*options.ObservationMetric)) + } + reqQP.Set("api-version", "2021-05-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByManagedInstanceHandleResponse handles the ListByManagedInstance response. +func (client *ManagedInstancesClient) listByManagedInstanceHandleResponse(resp *http.Response) (ManagedInstancesClientListByManagedInstanceResponse, error) { + result := ManagedInstancesClientListByManagedInstanceResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.TopQueriesListResult); err != nil { + return ManagedInstancesClientListByManagedInstanceResponse{}, err + } + return result, nil +} + +// NewListByResourceGroupPager - Gets a list of managed instances in a resource group. +// +// Generated from API version 2021-05-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - options - ManagedInstancesClientListByResourceGroupOptions contains the optional parameters for the ManagedInstancesClient.NewListByResourceGroupPager +// method. +func (client *ManagedInstancesClient) NewListByResourceGroupPager(resourceGroupName string, options *ManagedInstancesClientListByResourceGroupOptions) *runtime.Pager[ManagedInstancesClientListByResourceGroupResponse] { + return runtime.NewPager(runtime.PagingHandler[ManagedInstancesClientListByResourceGroupResponse]{ + More: func(page ManagedInstancesClientListByResourceGroupResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ManagedInstancesClientListByResourceGroupResponse) (ManagedInstancesClientListByResourceGroupResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ManagedInstancesClient.NewListByResourceGroupPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + }, nil) + if err != nil { + return ManagedInstancesClientListByResourceGroupResponse{}, err + } + return client.listByResourceGroupHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByResourceGroupCreateRequest creates the ListByResourceGroup request. +func (client *ManagedInstancesClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *ManagedInstancesClientListByResourceGroupOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Expand != nil { + reqQP.Set("$expand", *options.Expand) + } + reqQP.Set("api-version", "2021-05-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByResourceGroupHandleResponse handles the ListByResourceGroup response. +func (client *ManagedInstancesClient) listByResourceGroupHandleResponse(resp *http.Response) (ManagedInstancesClientListByResourceGroupResponse, error) { + result := ManagedInstancesClientListByResourceGroupResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ManagedInstanceListResult); err != nil { + return ManagedInstancesClientListByResourceGroupResponse{}, err + } + return result, nil +} + +// BeginUpdate - Updates a managed instance. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-05-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - parameters - The requested managed instance resource state. +// - options - ManagedInstancesClientBeginUpdateOptions contains the optional parameters for the ManagedInstancesClient.BeginUpdate +// method. +func (client *ManagedInstancesClient) BeginUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, parameters ManagedInstanceUpdate, options *ManagedInstancesClientBeginUpdateOptions) (*runtime.Poller[ManagedInstancesClientUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.update(ctx, resourceGroupName, managedInstanceName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ManagedInstancesClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ManagedInstancesClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Update - Updates a managed instance. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-05-01-preview +func (client *ManagedInstancesClient) update(ctx context.Context, resourceGroupName string, managedInstanceName string, parameters ManagedInstanceUpdate, options *ManagedInstancesClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ManagedInstancesClient.BeginUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, managedInstanceName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// updateCreateRequest creates the Update request. +func (client *ManagedInstancesClient) updateCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, parameters ManagedInstanceUpdate, options *ManagedInstancesClientBeginUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-05-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/managedinstancetdecertificates_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/managedinstancetdecertificates_client.go new file mode 100644 index 000000000..a3023c615 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/managedinstancetdecertificates_client.go @@ -0,0 +1,124 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ManagedInstanceTdeCertificatesClient contains the methods for the ManagedInstanceTdeCertificates group. +// Don't use this type directly, use NewManagedInstanceTdeCertificatesClient() instead. +type ManagedInstanceTdeCertificatesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewManagedInstanceTdeCertificatesClient creates a new instance of ManagedInstanceTdeCertificatesClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewManagedInstanceTdeCertificatesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedInstanceTdeCertificatesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ManagedInstanceTdeCertificatesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreate - Creates a TDE certificate for a given server. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - parameters - The requested TDE certificate to be created or updated. +// - options - ManagedInstanceTdeCertificatesClientBeginCreateOptions contains the optional parameters for the ManagedInstanceTdeCertificatesClient.BeginCreate +// method. +func (client *ManagedInstanceTdeCertificatesClient) BeginCreate(ctx context.Context, resourceGroupName string, managedInstanceName string, parameters TdeCertificate, options *ManagedInstanceTdeCertificatesClientBeginCreateOptions) (*runtime.Poller[ManagedInstanceTdeCertificatesClientCreateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.create(ctx, resourceGroupName, managedInstanceName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ManagedInstanceTdeCertificatesClientCreateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ManagedInstanceTdeCertificatesClientCreateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Create - Creates a TDE certificate for a given server. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +func (client *ManagedInstanceTdeCertificatesClient) create(ctx context.Context, resourceGroupName string, managedInstanceName string, parameters TdeCertificate, options *ManagedInstanceTdeCertificatesClientBeginCreateOptions) (*http.Response, error) { + var err error + const operationName = "ManagedInstanceTdeCertificatesClient.BeginCreate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createCreateRequest(ctx, resourceGroupName, managedInstanceName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createCreateRequest creates the Create request. +func (client *ManagedInstanceTdeCertificatesClient) createCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, parameters TdeCertificate, options *ManagedInstanceTdeCertificatesClientBeginCreateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/tdeCertificates" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/managedinstancevulnerabilityassessments_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/managedinstancevulnerabilityassessments_client.go new file mode 100644 index 000000000..75d608016 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/managedinstancevulnerabilityassessments_client.go @@ -0,0 +1,318 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ManagedInstanceVulnerabilityAssessmentsClient contains the methods for the ManagedInstanceVulnerabilityAssessments group. +// Don't use this type directly, use NewManagedInstanceVulnerabilityAssessmentsClient() instead. +type ManagedInstanceVulnerabilityAssessmentsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewManagedInstanceVulnerabilityAssessmentsClient creates a new instance of ManagedInstanceVulnerabilityAssessmentsClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewManagedInstanceVulnerabilityAssessmentsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedInstanceVulnerabilityAssessmentsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ManagedInstanceVulnerabilityAssessmentsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Creates or updates the managed instance's vulnerability assessment. Learn more about setting SQL vulnerability +// assessment with managed identity - +// https://docs.microsoft.com/azure/azure-sql/database/sql-database-vulnerability-assessment-storage +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance for which the vulnerability assessment is defined. +// - vulnerabilityAssessmentName - The name of the vulnerability assessment. +// - parameters - The requested resource. +// - options - ManagedInstanceVulnerabilityAssessmentsClientCreateOrUpdateOptions contains the optional parameters for the ManagedInstanceVulnerabilityAssessmentsClient.CreateOrUpdate +// method. +func (client *ManagedInstanceVulnerabilityAssessmentsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, parameters ManagedInstanceVulnerabilityAssessment, options *ManagedInstanceVulnerabilityAssessmentsClientCreateOrUpdateOptions) (ManagedInstanceVulnerabilityAssessmentsClientCreateOrUpdateResponse, error) { + var err error + const operationName = "ManagedInstanceVulnerabilityAssessmentsClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, managedInstanceName, vulnerabilityAssessmentName, parameters, options) + if err != nil { + return ManagedInstanceVulnerabilityAssessmentsClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ManagedInstanceVulnerabilityAssessmentsClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return ManagedInstanceVulnerabilityAssessmentsClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *ManagedInstanceVulnerabilityAssessmentsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, parameters ManagedInstanceVulnerabilityAssessment, options *ManagedInstanceVulnerabilityAssessmentsClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if vulnerabilityAssessmentName == "" { + return nil, errors.New("parameter vulnerabilityAssessmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vulnerabilityAssessmentName}", url.PathEscape(string(vulnerabilityAssessmentName))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *ManagedInstanceVulnerabilityAssessmentsClient) createOrUpdateHandleResponse(resp *http.Response) (ManagedInstanceVulnerabilityAssessmentsClientCreateOrUpdateResponse, error) { + result := ManagedInstanceVulnerabilityAssessmentsClientCreateOrUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ManagedInstanceVulnerabilityAssessment); err != nil { + return ManagedInstanceVulnerabilityAssessmentsClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// Delete - Removes the managed instance's vulnerability assessment. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance for which the vulnerability assessment is defined. +// - vulnerabilityAssessmentName - The name of the vulnerability assessment. +// - options - ManagedInstanceVulnerabilityAssessmentsClientDeleteOptions contains the optional parameters for the ManagedInstanceVulnerabilityAssessmentsClient.Delete +// method. +func (client *ManagedInstanceVulnerabilityAssessmentsClient) Delete(ctx context.Context, resourceGroupName string, managedInstanceName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, options *ManagedInstanceVulnerabilityAssessmentsClientDeleteOptions) (ManagedInstanceVulnerabilityAssessmentsClientDeleteResponse, error) { + var err error + const operationName = "ManagedInstanceVulnerabilityAssessmentsClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, managedInstanceName, vulnerabilityAssessmentName, options) + if err != nil { + return ManagedInstanceVulnerabilityAssessmentsClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ManagedInstanceVulnerabilityAssessmentsClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ManagedInstanceVulnerabilityAssessmentsClientDeleteResponse{}, err + } + return ManagedInstanceVulnerabilityAssessmentsClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *ManagedInstanceVulnerabilityAssessmentsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, options *ManagedInstanceVulnerabilityAssessmentsClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if vulnerabilityAssessmentName == "" { + return nil, errors.New("parameter vulnerabilityAssessmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vulnerabilityAssessmentName}", url.PathEscape(string(vulnerabilityAssessmentName))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + return req, nil +} + +// Get - Gets the managed instance's vulnerability assessment. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance for which the vulnerability assessment is defined. +// - vulnerabilityAssessmentName - The name of the vulnerability assessment. +// - options - ManagedInstanceVulnerabilityAssessmentsClientGetOptions contains the optional parameters for the ManagedInstanceVulnerabilityAssessmentsClient.Get +// method. +func (client *ManagedInstanceVulnerabilityAssessmentsClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, options *ManagedInstanceVulnerabilityAssessmentsClientGetOptions) (ManagedInstanceVulnerabilityAssessmentsClientGetResponse, error) { + var err error + const operationName = "ManagedInstanceVulnerabilityAssessmentsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, managedInstanceName, vulnerabilityAssessmentName, options) + if err != nil { + return ManagedInstanceVulnerabilityAssessmentsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ManagedInstanceVulnerabilityAssessmentsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ManagedInstanceVulnerabilityAssessmentsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ManagedInstanceVulnerabilityAssessmentsClient) getCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, options *ManagedInstanceVulnerabilityAssessmentsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if vulnerabilityAssessmentName == "" { + return nil, errors.New("parameter vulnerabilityAssessmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vulnerabilityAssessmentName}", url.PathEscape(string(vulnerabilityAssessmentName))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ManagedInstanceVulnerabilityAssessmentsClient) getHandleResponse(resp *http.Response) (ManagedInstanceVulnerabilityAssessmentsClientGetResponse, error) { + result := ManagedInstanceVulnerabilityAssessmentsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ManagedInstanceVulnerabilityAssessment); err != nil { + return ManagedInstanceVulnerabilityAssessmentsClientGetResponse{}, err + } + return result, nil +} + +// NewListByInstancePager - Gets the managed instance's vulnerability assessment policies. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance for which the vulnerability assessments is defined. +// - options - ManagedInstanceVulnerabilityAssessmentsClientListByInstanceOptions contains the optional parameters for the ManagedInstanceVulnerabilityAssessmentsClient.NewListByInstancePager +// method. +func (client *ManagedInstanceVulnerabilityAssessmentsClient) NewListByInstancePager(resourceGroupName string, managedInstanceName string, options *ManagedInstanceVulnerabilityAssessmentsClientListByInstanceOptions) *runtime.Pager[ManagedInstanceVulnerabilityAssessmentsClientListByInstanceResponse] { + return runtime.NewPager(runtime.PagingHandler[ManagedInstanceVulnerabilityAssessmentsClientListByInstanceResponse]{ + More: func(page ManagedInstanceVulnerabilityAssessmentsClientListByInstanceResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ManagedInstanceVulnerabilityAssessmentsClientListByInstanceResponse) (ManagedInstanceVulnerabilityAssessmentsClientListByInstanceResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ManagedInstanceVulnerabilityAssessmentsClient.NewListByInstancePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByInstanceCreateRequest(ctx, resourceGroupName, managedInstanceName, options) + }, nil) + if err != nil { + return ManagedInstanceVulnerabilityAssessmentsClientListByInstanceResponse{}, err + } + return client.listByInstanceHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByInstanceCreateRequest creates the ListByInstance request. +func (client *ManagedInstanceVulnerabilityAssessmentsClient) listByInstanceCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, options *ManagedInstanceVulnerabilityAssessmentsClientListByInstanceOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/vulnerabilityAssessments" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByInstanceHandleResponse handles the ListByInstance response. +func (client *ManagedInstanceVulnerabilityAssessmentsClient) listByInstanceHandleResponse(resp *http.Response) (ManagedInstanceVulnerabilityAssessmentsClientListByInstanceResponse, error) { + result := ManagedInstanceVulnerabilityAssessmentsClientListByInstanceResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ManagedInstanceVulnerabilityAssessmentListResult); err != nil { + return ManagedInstanceVulnerabilityAssessmentsClientListByInstanceResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/managedrestorabledroppeddatabasebackupshorttermretentionpolicies_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/managedrestorabledroppeddatabasebackupshorttermretentionpolicies_client.go new file mode 100644 index 000000000..898d12879 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/managedrestorabledroppeddatabasebackupshorttermretentionpolicies_client.go @@ -0,0 +1,371 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient contains the methods for the ManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies group. +// Don't use this type directly, use NewManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient() instead. +type ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient creates a new instance of ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Sets a database's short term retention policy. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - policyName - The policy name. Should always be "default". +// - parameters - The short term retention policy info. +// - options - ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientBeginCreateOrUpdateOptions contains the +// optional parameters for the ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient.BeginCreateOrUpdate +// method. +func (client *ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, restorableDroppedDatabaseID string, policyName ManagedShortTermRetentionPolicyName, parameters ManagedBackupShortTermRetentionPolicy, options *ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientBeginCreateOrUpdateOptions) (*runtime.Poller[ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, managedInstanceName, restorableDroppedDatabaseID, policyName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Sets a database's short term retention policy. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +func (client *ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient) createOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, restorableDroppedDatabaseID string, policyName ManagedShortTermRetentionPolicyName, parameters ManagedBackupShortTermRetentionPolicy, options *ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, managedInstanceName, restorableDroppedDatabaseID, policyName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, restorableDroppedDatabaseID string, policyName ManagedShortTermRetentionPolicyName, parameters ManagedBackupShortTermRetentionPolicy, options *ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/restorableDroppedDatabases/{restorableDroppedDatabaseId}/backupShortTermRetentionPolicies/{policyName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if restorableDroppedDatabaseID == "" { + return nil, errors.New("parameter restorableDroppedDatabaseID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{restorableDroppedDatabaseId}", url.PathEscape(restorableDroppedDatabaseID)) + if policyName == "" { + return nil, errors.New("parameter policyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{policyName}", url.PathEscape(string(policyName))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// Get - Gets a dropped database's short term retention policy. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - policyName - The policy name. +// - options - ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientGetOptions contains the optional parameters +// for the ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient.Get method. +func (client *ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, restorableDroppedDatabaseID string, policyName ManagedShortTermRetentionPolicyName, options *ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientGetOptions) (ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientGetResponse, error) { + var err error + const operationName = "ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, managedInstanceName, restorableDroppedDatabaseID, policyName, options) + if err != nil { + return ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient) getCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, restorableDroppedDatabaseID string, policyName ManagedShortTermRetentionPolicyName, options *ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/restorableDroppedDatabases/{restorableDroppedDatabaseId}/backupShortTermRetentionPolicies/{policyName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if restorableDroppedDatabaseID == "" { + return nil, errors.New("parameter restorableDroppedDatabaseID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{restorableDroppedDatabaseId}", url.PathEscape(restorableDroppedDatabaseID)) + if policyName == "" { + return nil, errors.New("parameter policyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{policyName}", url.PathEscape(string(policyName))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient) getHandleResponse(resp *http.Response) (ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientGetResponse, error) { + result := ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ManagedBackupShortTermRetentionPolicy); err != nil { + return ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientGetResponse{}, err + } + return result, nil +} + +// NewListByRestorableDroppedDatabasePager - Gets a dropped database's short term retention policy list. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - options - ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientListByRestorableDroppedDatabaseOptions +// contains the optional parameters for the ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient.NewListByRestorableDroppedDatabasePager +// method. +func (client *ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient) NewListByRestorableDroppedDatabasePager(resourceGroupName string, managedInstanceName string, restorableDroppedDatabaseID string, options *ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientListByRestorableDroppedDatabaseOptions) *runtime.Pager[ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientListByRestorableDroppedDatabaseResponse] { + return runtime.NewPager(runtime.PagingHandler[ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientListByRestorableDroppedDatabaseResponse]{ + More: func(page ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientListByRestorableDroppedDatabaseResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientListByRestorableDroppedDatabaseResponse) (ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientListByRestorableDroppedDatabaseResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient.NewListByRestorableDroppedDatabasePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByRestorableDroppedDatabaseCreateRequest(ctx, resourceGroupName, managedInstanceName, restorableDroppedDatabaseID, options) + }, nil) + if err != nil { + return ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientListByRestorableDroppedDatabaseResponse{}, err + } + return client.listByRestorableDroppedDatabaseHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByRestorableDroppedDatabaseCreateRequest creates the ListByRestorableDroppedDatabase request. +func (client *ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient) listByRestorableDroppedDatabaseCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, restorableDroppedDatabaseID string, options *ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientListByRestorableDroppedDatabaseOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/restorableDroppedDatabases/{restorableDroppedDatabaseId}/backupShortTermRetentionPolicies" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if restorableDroppedDatabaseID == "" { + return nil, errors.New("parameter restorableDroppedDatabaseID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{restorableDroppedDatabaseId}", url.PathEscape(restorableDroppedDatabaseID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByRestorableDroppedDatabaseHandleResponse handles the ListByRestorableDroppedDatabase response. +func (client *ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient) listByRestorableDroppedDatabaseHandleResponse(resp *http.Response) (ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientListByRestorableDroppedDatabaseResponse, error) { + result := ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientListByRestorableDroppedDatabaseResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ManagedBackupShortTermRetentionPolicyListResult); err != nil { + return ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientListByRestorableDroppedDatabaseResponse{}, err + } + return result, nil +} + +// BeginUpdate - Sets a database's short term retention policy. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - policyName - The policy name. Should always be "default". +// - parameters - The short term retention policy info. +// - options - ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientBeginUpdateOptions contains the optional +// parameters for the ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient.BeginUpdate method. +func (client *ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient) BeginUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, restorableDroppedDatabaseID string, policyName ManagedShortTermRetentionPolicyName, parameters ManagedBackupShortTermRetentionPolicy, options *ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientBeginUpdateOptions) (*runtime.Poller[ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.update(ctx, resourceGroupName, managedInstanceName, restorableDroppedDatabaseID, policyName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Update - Sets a database's short term retention policy. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +func (client *ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient) update(ctx context.Context, resourceGroupName string, managedInstanceName string, restorableDroppedDatabaseID string, policyName ManagedShortTermRetentionPolicyName, parameters ManagedBackupShortTermRetentionPolicy, options *ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient.BeginUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, managedInstanceName, restorableDroppedDatabaseID, policyName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// updateCreateRequest creates the Update request. +func (client *ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient) updateCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, restorableDroppedDatabaseID string, policyName ManagedShortTermRetentionPolicyName, parameters ManagedBackupShortTermRetentionPolicy, options *ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientBeginUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/restorableDroppedDatabases/{restorableDroppedDatabaseId}/backupShortTermRetentionPolicies/{policyName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if restorableDroppedDatabaseID == "" { + return nil, errors.New("parameter restorableDroppedDatabaseID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{restorableDroppedDatabaseId}", url.PathEscape(restorableDroppedDatabaseID)) + if policyName == "" { + return nil, errors.New("parameter policyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{policyName}", url.PathEscape(string(policyName))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/managedserversecurityalertpolicies_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/managedserversecurityalertpolicies_client.go new file mode 100644 index 000000000..b59dd316e --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/managedserversecurityalertpolicies_client.go @@ -0,0 +1,267 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ManagedServerSecurityAlertPoliciesClient contains the methods for the ManagedServerSecurityAlertPolicies group. +// Don't use this type directly, use NewManagedServerSecurityAlertPoliciesClient() instead. +type ManagedServerSecurityAlertPoliciesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewManagedServerSecurityAlertPoliciesClient creates a new instance of ManagedServerSecurityAlertPoliciesClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewManagedServerSecurityAlertPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedServerSecurityAlertPoliciesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ManagedServerSecurityAlertPoliciesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates or updates a threat detection policy. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - securityAlertPolicyName - The name of the security alert policy. +// - parameters - The managed server security alert policy. +// - options - ManagedServerSecurityAlertPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the ManagedServerSecurityAlertPoliciesClient.BeginCreateOrUpdate +// method. +func (client *ManagedServerSecurityAlertPoliciesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, securityAlertPolicyName SecurityAlertPolicyName, parameters ManagedServerSecurityAlertPolicy, options *ManagedServerSecurityAlertPoliciesClientBeginCreateOrUpdateOptions) (*runtime.Poller[ManagedServerSecurityAlertPoliciesClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, managedInstanceName, securityAlertPolicyName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ManagedServerSecurityAlertPoliciesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ManagedServerSecurityAlertPoliciesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates or updates a threat detection policy. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +func (client *ManagedServerSecurityAlertPoliciesClient) createOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, securityAlertPolicyName SecurityAlertPolicyName, parameters ManagedServerSecurityAlertPolicy, options *ManagedServerSecurityAlertPoliciesClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ManagedServerSecurityAlertPoliciesClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, managedInstanceName, securityAlertPolicyName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *ManagedServerSecurityAlertPoliciesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, securityAlertPolicyName SecurityAlertPolicyName, parameters ManagedServerSecurityAlertPolicy, options *ManagedServerSecurityAlertPoliciesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/securityAlertPolicies/{securityAlertPolicyName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if securityAlertPolicyName == "" { + return nil, errors.New("parameter securityAlertPolicyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{securityAlertPolicyName}", url.PathEscape(string(securityAlertPolicyName))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// Get - Get a managed server's threat detection policy. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - securityAlertPolicyName - The name of the security alert policy. +// - options - ManagedServerSecurityAlertPoliciesClientGetOptions contains the optional parameters for the ManagedServerSecurityAlertPoliciesClient.Get +// method. +func (client *ManagedServerSecurityAlertPoliciesClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, securityAlertPolicyName SecurityAlertPolicyName, options *ManagedServerSecurityAlertPoliciesClientGetOptions) (ManagedServerSecurityAlertPoliciesClientGetResponse, error) { + var err error + const operationName = "ManagedServerSecurityAlertPoliciesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, managedInstanceName, securityAlertPolicyName, options) + if err != nil { + return ManagedServerSecurityAlertPoliciesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ManagedServerSecurityAlertPoliciesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ManagedServerSecurityAlertPoliciesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ManagedServerSecurityAlertPoliciesClient) getCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, securityAlertPolicyName SecurityAlertPolicyName, options *ManagedServerSecurityAlertPoliciesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/securityAlertPolicies/{securityAlertPolicyName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if securityAlertPolicyName == "" { + return nil, errors.New("parameter securityAlertPolicyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{securityAlertPolicyName}", url.PathEscape(string(securityAlertPolicyName))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ManagedServerSecurityAlertPoliciesClient) getHandleResponse(resp *http.Response) (ManagedServerSecurityAlertPoliciesClientGetResponse, error) { + result := ManagedServerSecurityAlertPoliciesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ManagedServerSecurityAlertPolicy); err != nil { + return ManagedServerSecurityAlertPoliciesClientGetResponse{}, err + } + return result, nil +} + +// NewListByInstancePager - Get the managed server's threat detection policies. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - options - ManagedServerSecurityAlertPoliciesClientListByInstanceOptions contains the optional parameters for the ManagedServerSecurityAlertPoliciesClient.NewListByInstancePager +// method. +func (client *ManagedServerSecurityAlertPoliciesClient) NewListByInstancePager(resourceGroupName string, managedInstanceName string, options *ManagedServerSecurityAlertPoliciesClientListByInstanceOptions) *runtime.Pager[ManagedServerSecurityAlertPoliciesClientListByInstanceResponse] { + return runtime.NewPager(runtime.PagingHandler[ManagedServerSecurityAlertPoliciesClientListByInstanceResponse]{ + More: func(page ManagedServerSecurityAlertPoliciesClientListByInstanceResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ManagedServerSecurityAlertPoliciesClientListByInstanceResponse) (ManagedServerSecurityAlertPoliciesClientListByInstanceResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ManagedServerSecurityAlertPoliciesClient.NewListByInstancePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByInstanceCreateRequest(ctx, resourceGroupName, managedInstanceName, options) + }, nil) + if err != nil { + return ManagedServerSecurityAlertPoliciesClientListByInstanceResponse{}, err + } + return client.listByInstanceHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByInstanceCreateRequest creates the ListByInstance request. +func (client *ManagedServerSecurityAlertPoliciesClient) listByInstanceCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, options *ManagedServerSecurityAlertPoliciesClientListByInstanceOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/securityAlertPolicies" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByInstanceHandleResponse handles the ListByInstance response. +func (client *ManagedServerSecurityAlertPoliciesClient) listByInstanceHandleResponse(resp *http.Response) (ManagedServerSecurityAlertPoliciesClientListByInstanceResponse, error) { + result := ManagedServerSecurityAlertPoliciesClientListByInstanceResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ManagedServerSecurityAlertPolicyListResult); err != nil { + return ManagedServerSecurityAlertPoliciesClientListByInstanceResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/models.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/models.go new file mode 100644 index 000000000..a134dc20a --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/models.go @@ -0,0 +1,7514 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import "time" + +// AdministratorListResult - A list of active directory administrators. +type AdministratorListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*ServerAzureADAdministrator +} + +// AdministratorProperties - Properties of a active directory administrator. +type AdministratorProperties struct { + // REQUIRED; Type of the sever administrator. + AdministratorType *AdministratorType + + // REQUIRED; Login name of the server administrator. + Login *string + + // REQUIRED; SID (object ID) of the server administrator. + Sid *string + + // Tenant ID of the administrator. + TenantID *string + + // READ-ONLY; Azure Active Directory only Authentication enabled. + AzureADOnlyAuthentication *bool +} + +// AdvancedThreatProtectionProperties - Properties of an Advanced Threat Protection state. +type AdvancedThreatProtectionProperties struct { + // REQUIRED; Specifies the state of the Advanced Threat Protection, whether it is enabled or disabled or a state has not been + // applied yet on the specific database or server. + State *AdvancedThreatProtectionState + + // READ-ONLY; Specifies the UTC creation time of the policy. + CreationTime *time.Time +} + +// Advisor - Database, Server or Elastic Pool Advisor. +type Advisor struct { + // Resource properties. + Properties *AdvisorProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource kind. + Kind *string + + // READ-ONLY; Resource location. + Location *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// AdvisorProperties - Properties for a Database, Server or Elastic Pool Advisor. +type AdvisorProperties struct { + // REQUIRED; Gets the auto-execute status (whether to let the system execute the recommendations) of this advisor. Possible + // values are 'Enabled' and 'Disabled' + AutoExecuteStatus *AutoExecuteStatus + + // READ-ONLY; Gets the status of availability of this advisor to customers. Possible values are 'GA', 'PublicPreview', 'LimitedPublicPreview' + // and 'PrivatePreview'. + AdvisorStatus *AdvisorStatus + + // READ-ONLY; Gets the resource from which current value of auto-execute status is inherited. Auto-execute status can be set + // on (and inherited from) different levels in the resource hierarchy. Possible values are + // 'Subscription', 'Server', 'ElasticPool', 'Database' and 'Default' (when status is not explicitly set on any level). + AutoExecuteStatusInheritedFrom *AutoExecuteStatusInheritedFrom + + // READ-ONLY; Gets the time when the current resource was analyzed for recommendations by this advisor. + LastChecked *time.Time + + // READ-ONLY; Gets that status of recommendations for this advisor and reason for not having any recommendations. Possible + // values include, but are not limited to, 'Ok' (Recommendations available),LowActivity (not + // enough workload to analyze), 'DbSeemsTuned' (Database is doing well), etc. + RecommendationsStatus *string + + // READ-ONLY; Gets the recommended actions for this advisor. + RecommendedActions []*RecommendedAction +} + +// AgentConfiguration - A recoverable managed database resource. +type AgentConfiguration struct { + // Resource properties. + Properties *AgentConfigurationProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// AgentConfigurationProperties - Sql agent configuration properties. +type AgentConfigurationProperties struct { + // The state of Sql Agent. + State *SQLAgentConfigurationPropertiesState +} + +// AutoPauseDelayTimeRange - Supported auto pause delay time range +type AutoPauseDelayTimeRange struct { + // READ-ONLY; Default value is no value is provided + Default *int32 + + // READ-ONLY; Value that is used to not pause (infinite delay before pause) + DoNotPauseValue *int32 + + // READ-ONLY; Maximum value + MaxValue *int32 + + // READ-ONLY; Minimum value + MinValue *int32 + + // READ-ONLY; Step value for discrete values between the minimum value and the maximum value. + StepSize *int32 + + // READ-ONLY; Unit of time that delay is expressed in + Unit *PauseDelayTimeUnit +} + +// AutomaticTuningOptions - Automatic tuning properties for individual advisors. +type AutomaticTuningOptions struct { + // Automatic tuning option desired state. + DesiredState *AutomaticTuningOptionModeDesired + + // READ-ONLY; Automatic tuning option actual state. + ActualState *AutomaticTuningOptionModeActual + + // READ-ONLY; Reason code if desired and actual state are different. + ReasonCode *int32 + + // READ-ONLY; Reason description if desired and actual state are different. + ReasonDesc *AutomaticTuningDisabledReason +} + +// AutomaticTuningServerOptions - Automatic tuning properties for individual advisors. +type AutomaticTuningServerOptions struct { + // Automatic tuning option desired state. + DesiredState *AutomaticTuningOptionModeDesired + + // READ-ONLY; Automatic tuning option actual state. + ActualState *AutomaticTuningOptionModeActual + + // READ-ONLY; Reason code if desired and actual state are different. + ReasonCode *int32 + + // READ-ONLY; Reason description if desired and actual state are different. + ReasonDesc *AutomaticTuningServerReason +} + +// AutomaticTuningServerProperties - Server-level Automatic Tuning properties. +type AutomaticTuningServerProperties struct { + // Automatic tuning desired state. + DesiredState *AutomaticTuningServerMode + + // Automatic tuning options definition. + Options map[string]*AutomaticTuningServerOptions + + // READ-ONLY; Automatic tuning actual state. + ActualState *AutomaticTuningServerMode +} + +// AzureADOnlyAuthListResult - A list of active directory only authentications. +type AzureADOnlyAuthListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*ServerAzureADOnlyAuthentication +} + +// AzureADOnlyAuthProperties - Properties of a active directory only authentication. +type AzureADOnlyAuthProperties struct { + // REQUIRED; Azure Active Directory only Authentication enabled. + AzureADOnlyAuthentication *bool +} + +// BackupShortTermRetentionPolicy - A short term retention policy. +type BackupShortTermRetentionPolicy struct { + // Resource properties. + Properties *BackupShortTermRetentionPolicyProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// BackupShortTermRetentionPolicyListResult - A list of short term retention policies. +type BackupShortTermRetentionPolicyListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*BackupShortTermRetentionPolicy +} + +// BackupShortTermRetentionPolicyProperties - Properties of a short term retention policy +type BackupShortTermRetentionPolicyProperties struct { + // The differential backup interval in hours. This is how many interval hours between each differential backup will be supported. + // This is only applicable to live databases but not dropped databases. + DiffBackupIntervalInHours *DiffBackupIntervalInHours + + // The backup retention period in days. This is how many days Point-in-Time Restore will be supported. + RetentionDays *int32 +} + +// BaseLongTermRetentionPolicyProperties - Properties of a long term retention policy +type BaseLongTermRetentionPolicyProperties struct { + // The monthly retention policy for an LTR backup in an ISO 8601 format. + MonthlyRetention *string + + // The week of year to take the yearly backup in an ISO 8601 format. + WeekOfYear *int32 + + // The weekly retention policy for an LTR backup in an ISO 8601 format. + WeeklyRetention *string + + // The yearly retention policy for an LTR backup in an ISO 8601 format. + YearlyRetention *string +} + +// CheckNameAvailabilityRequest - A request to check whether the specified name for a resource is available. +type CheckNameAvailabilityRequest struct { + // REQUIRED + Name *string + + // CONSTANT; Field has constant value "Microsoft.Sql/servers", any specified value is ignored. + Type *string +} + +// CheckNameAvailabilityResponse - The result of a name availability check. +type CheckNameAvailabilityResponse struct { + // READ-ONLY; True if the name is available, otherwise false. + Available *bool + + // READ-ONLY; A message explaining why the name is unavailable. Will be undefined if the name is available. + Message *string + + // READ-ONLY; The name whose availability was checked. + Name *string + + // READ-ONLY; The reason code explaining why the name is unavailable. Will be undefined if the name is available. + Reason *CheckNameAvailabilityReason +} + +// CompleteDatabaseRestoreDefinition - Contains the information necessary to perform a complete database restore operation. +type CompleteDatabaseRestoreDefinition struct { + // REQUIRED; The last backup name to apply + LastBackupName *string +} + +// CopyLongTermRetentionBackupParameters - Contains the information necessary to perform long term retention backup copy operation. +type CopyLongTermRetentionBackupParameters struct { + // Resource properties. + Properties *CopyLongTermRetentionBackupParametersProperties +} + +// CopyLongTermRetentionBackupParametersProperties - Contains the properties to perform long term retention backup copy operation. +type CopyLongTermRetentionBackupParametersProperties struct { + // The storage redundancy type of the copied backup + TargetBackupStorageRedundancy *BackupStorageRedundancy + + // The name of the database owns the copied backup. + TargetDatabaseName *string + + // The resource group that owns the target server + TargetResourceGroup *string + + // The fully qualified domain name of the target server + TargetServerFullyQualifiedDomainName *string + + // The resource Id of the target server that owns the database + TargetServerResourceID *string + + // The subscription that owns the target server + TargetSubscriptionID *string +} + +// CreateDatabaseRestorePointDefinition - Contains the information necessary to perform a create database restore point operation. +type CreateDatabaseRestorePointDefinition struct { + // REQUIRED; The restore point label to apply + RestorePointLabel *string +} + +// DNSRefreshConfigurationProperties - DNS refresh configuration properties. +type DNSRefreshConfigurationProperties struct { + // READ-ONLY; The status of the DNS refresh operation. + Status *DNSRefreshConfigurationPropertiesStatus +} + +// DataMaskingPolicy - Represents a database data masking policy. +type DataMaskingPolicy struct { + // The properties of the data masking policy. + Properties *DataMaskingPolicyProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; The kind of data masking policy. Metadata, used for Azure portal. + Kind *string + + // READ-ONLY; The location of the data masking policy. + Location *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// DataMaskingPolicyProperties - The properties of a database data masking policy. +type DataMaskingPolicyProperties struct { + // REQUIRED; The state of the data masking policy. + DataMaskingState *DataMaskingState + + // The list of the exempt principals. Specifies the semicolon-separated list of database users for which the data masking + // policy does not apply. The specified users receive data results without masking + // for all of the database queries. + ExemptPrincipals *string + + // READ-ONLY; The list of the application principals. This is a legacy parameter and is no longer used. + ApplicationPrincipals *string + + // READ-ONLY; The masking level. This is a legacy parameter and is no longer used. + MaskingLevel *string +} + +// DataMaskingRule - Represents a database data masking rule. +type DataMaskingRule struct { + // The properties of the resource. + Properties *DataMaskingRuleProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; The kind of Data Masking Rule. Metadata, used for Azure portal. + Kind *string + + // READ-ONLY; The location of the data masking rule. + Location *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// DataMaskingRuleListResult - The response to a list data masking rules request. +type DataMaskingRuleListResult struct { + // The list of database data masking rules. + Value []*DataMaskingRule +} + +// DataMaskingRuleProperties - The properties of a database data masking rule. +type DataMaskingRuleProperties struct { + // REQUIRED; The column name on which the data masking rule is applied. + ColumnName *string + + // REQUIRED; The masking function that is used for the data masking rule. + MaskingFunction *DataMaskingFunction + + // REQUIRED; The schema name on which the data masking rule is applied. + SchemaName *string + + // REQUIRED; The table name on which the data masking rule is applied. + TableName *string + + // The alias name. This is a legacy parameter and is no longer used. + AliasName *string + + // The numberFrom property of the masking rule. Required if maskingFunction is set to Number, otherwise this parameter will + // be ignored. + NumberFrom *string + + // The numberTo property of the data masking rule. Required if maskingFunction is set to Number, otherwise this parameter + // will be ignored. + NumberTo *string + + // If maskingFunction is set to Text, the number of characters to show unmasked in the beginning of the string. Otherwise, + // this parameter will be ignored. + PrefixSize *string + + // If maskingFunction is set to Text, the character to use for masking the unexposed part of the string. Otherwise, this parameter + // will be ignored. + ReplacementString *string + + // The rule state. Used to delete a rule. To delete an existing rule, specify the schemaName, tableName, columnName, maskingFunction, + // and specify ruleState as disabled. However, if the rule doesn't + // already exist, the rule will be created with ruleState set to enabled, regardless of the provided value of ruleState. + RuleState *DataMaskingRuleState + + // If maskingFunction is set to Text, the number of characters to show unmasked at the end of the string. Otherwise, this + // parameter will be ignored. + SuffixSize *string + + // READ-ONLY; The rule Id. + ID *string +} + +// DataWarehouseUserActivities - User activities of a data warehouse +type DataWarehouseUserActivities struct { + // Resource properties. + Properties *DataWarehouseUserActivitiesProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// DataWarehouseUserActivitiesListResult - User activities of a data warehouse +type DataWarehouseUserActivitiesListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*DataWarehouseUserActivities +} + +// DataWarehouseUserActivitiesProperties - User activities of a data warehouse. This currently includes the count of running +// or suspended queries. For more information, please view the sys.dmpdwexec_requests dynamic management view (DMV). +type DataWarehouseUserActivitiesProperties struct { + // READ-ONLY; Count of running and suspended queries. + ActiveQueriesCount *int32 +} + +// Database - A database resource. +type Database struct { + // REQUIRED; Resource location. + Location *string + + // The Azure Active Directory identity of the database. + Identity *DatabaseIdentity + + // Resource properties. + Properties *DatabaseProperties + + // The database SKU. + // The list of SKUs may vary by region and support offer. To determine the SKUs (including the SKU name, tier/edition, family, + // and capacity) that are available to your subscription in an Azure region, + // use the Capabilities_ListByLocation REST API or one of the following commands: + // az sql db list-editions -l -o table + // ` + // Get-AzSqlServerServiceObjective -Location + // ` + SKU *SKU + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Kind of database. This is metadata used for the Azure portal experience. + Kind *string + + // READ-ONLY; Resource that manages the database. + ManagedBy *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// DatabaseAdvancedThreatProtection - A database Advanced Threat Protection. +type DatabaseAdvancedThreatProtection struct { + // Resource properties. + Properties *AdvancedThreatProtectionProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; SystemData of AdvancedThreatProtectionResource. + SystemData *SystemData + + // READ-ONLY; Resource type. + Type *string +} + +// DatabaseAdvancedThreatProtectionListResult - A list of the database's Advanced Threat Protection configurations. +type DatabaseAdvancedThreatProtectionListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*DatabaseAdvancedThreatProtection +} + +// DatabaseAutomaticTuning - Database-level Automatic Tuning. +type DatabaseAutomaticTuning struct { + // Resource properties. + Properties *DatabaseAutomaticTuningProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// DatabaseAutomaticTuningProperties - Database-level Automatic Tuning properties. +type DatabaseAutomaticTuningProperties struct { + // Automatic tuning desired state. + DesiredState *AutomaticTuningMode + + // Automatic tuning options definition. + Options map[string]*AutomaticTuningOptions + + // READ-ONLY; Automatic tuning actual state. + ActualState *AutomaticTuningMode +} + +// DatabaseBlobAuditingPolicy - A database blob auditing policy. +type DatabaseBlobAuditingPolicy struct { + // Resource properties. + Properties *DatabaseBlobAuditingPolicyProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource kind. + Kind *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// DatabaseBlobAuditingPolicyListResult - A list of database auditing settings. +type DatabaseBlobAuditingPolicyListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*DatabaseBlobAuditingPolicy +} + +// DatabaseBlobAuditingPolicyProperties - Properties of a database blob auditing policy. +type DatabaseBlobAuditingPolicyProperties struct { + // REQUIRED; Specifies the state of the audit. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. + State *BlobAuditingPolicyState + + // Specifies the Actions-Groups and Actions to audit. + // The recommended set of action groups to use is the following combination - this will audit all the queries and stored procedures + // executed against the database, as well as successful and failed logins: + // BATCHCOMPLETEDGROUP, SUCCESSFULDATABASEAUTHENTICATIONGROUP, FAILEDDATABASEAUTHENTICATIONGROUP. + // This above combination is also the set that is configured by default when enabling auditing from the Azure portal. + // The supported action groups to audit are (note: choose only specific groups that cover your auditing needs. Using unnecessary + // groups could lead to very large quantities of audit records): + // APPLICATIONROLECHANGEPASSWORDGROUP BACKUPRESTOREGROUP DATABASELOGOUTGROUP DATABASEOBJECTCHANGEGROUP DATABASEOBJECTOWNERSHIPCHANGEGROUP + // DATABASEOBJECTPERMISSIONCHANGEGROUP DATABASEOPERATIONGROUP + // DATABASEPERMISSIONCHANGEGROUP DATABASEPRINCIPALCHANGEGROUP DATABASEPRINCIPALIMPERSONATIONGROUP DATABASEROLEMEMBERCHANGEGROUP + // FAILEDDATABASEAUTHENTICATIONGROUP SCHEMAOBJECTACCESSGROUP SCHEMAOBJECT + // CHANGEGROUP SCHEMAOBJECTOWNERSHIPCHANGEGROUP SCHEMAOBJECTPERMISSIONCHANGEGROUP SUCCESSFULDATABASEAUTHENTICATIONGROUP USERCHANGEPASSWORDGROUP + // BATCHSTARTEDGROUP BATCHCOMPLETEDGROUP DBCCGROUP DATABASE + // OWNERSHIPCHANGEGROUP DATABASECHANGEGROUP LEDGEROPERATION_GROUP + // These are groups that cover all sql statements and stored procedures executed against the database, and should not be used + // in combination with other groups as this will result in duplicate audit logs. + // For more information, see Database-Level Audit Action Groups + // [https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups]. + // For Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified for Server + // auditing policy). The supported actions to audit are: SELECT UPDATE INSERT DELETE + // EXECUTE RECEIVE REFERENCES + // The general form for defining an action to be audited is: {action} ON {object} BY {principal} + // Note that in the above format can refer to an object like a table, view, or stored procedure, or an entire database or + // schema. For the latter cases, the forms DATABASE::{dbname} and SCHEMA::{schema + // name} are used, respectively. + // For example: SELECT on dbo.myTable by public SELECT on DATABASE::myDatabase by public SELECT on SCHEMA::mySchema by public + // For more information, see Database-Level Audit Actions + // [https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions] + AuditActionsAndGroups []*string + + // Specifies whether audit events are sent to Azure Monitor. In order to send the events to Azure Monitor, specify 'State' + // as 'Enabled' and 'IsAzureMonitorTargetEnabled' as true. + // When using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs category on + // the database should be also created. Note that for server level audit you + // should use the 'master' database as {databaseName}. + // Diagnostic Settings URI format: PUT + // https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview + // For more information, see Diagnostic Settings REST API [https://go.microsoft.com/fwlink/?linkid=2033207]or Diagnostic Settings + // PowerShell [https://go.microsoft.com/fwlink/?linkid=2033043] + IsAzureMonitorTargetEnabled *bool + + // Specifies whether Managed Identity is used to access blob storage + IsManagedIdentityInUse *bool + + // Specifies whether storageAccountAccessKey value is the storage's secondary key. + IsStorageSecondaryKeyInUse *bool + + // Specifies the amount of time in milliseconds that can elapse before audit actions are forced to be processed. The default + // minimum value is 1000 (1 second). The maximum is 2,147,483,647. + QueueDelayMs *int32 + + // Specifies the number of days to keep in the audit logs in the storage account. + RetentionDays *int32 + + // Specifies the identifier key of the auditing storage account. If state is Enabled and storageEndpoint is specified, not + // specifying the storageAccountAccessKey will use SQL server system-assigned + // managed identity to access the storage. Prerequisites for using managed identity authentication: + // 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD). + // 2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server + // identity. For more information, see Auditing to storage using Managed + // Identity authentication [https://go.microsoft.com/fwlink/?linkid=2114355] + StorageAccountAccessKey *string + + // Specifies the blob storage subscription Id. + StorageAccountSubscriptionID *string + + // Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint + // or isAzureMonitorTargetEnabled is required. + StorageEndpoint *string +} + +// DatabaseColumn - A database column resource. +type DatabaseColumn struct { + // Resource properties. + Properties *DatabaseColumnProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// DatabaseColumnListResult - A list of database columns. +type DatabaseColumnListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*DatabaseColumn +} + +// DatabaseColumnProperties - Database column properties. +type DatabaseColumnProperties struct { + // The column data type. + ColumnType *ColumnDataType + + // Whether or not the column is computed. + IsComputed *bool + + // Whether or not the column belongs to a memory optimized table. + MemoryOptimized *bool + + // The table temporal type. + TemporalType *TableTemporalType +} + +// DatabaseExtensions - An export managed database operation result resource. +type DatabaseExtensions struct { + // Resource properties. + Properties *DatabaseExtensionsProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// DatabaseExtensionsProperties - Contains the database information after successful export. +type DatabaseExtensionsProperties struct { + // REQUIRED; Operation Mode. + OperationMode *OperationMode + + // REQUIRED; Storage key. + StorageKey *string + + // REQUIRED; Storage key type. + StorageKeyType *StorageKeyType + + // REQUIRED; Storage Uri. + StorageURI *string +} + +// DatabaseIdentity - Azure Active Directory identity configuration for a resource. +type DatabaseIdentity struct { + // The identity type + Type *DatabaseIdentityType + + // The resource ids of the user assigned identities to use + UserAssignedIdentities map[string]*DatabaseUserIdentity + + // READ-ONLY; The Azure Active Directory tenant id. + TenantID *string +} + +// DatabaseListResult - A list of databases. +type DatabaseListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*Database +} + +// DatabaseOperation - A database operation. +type DatabaseOperation struct { + // Resource properties. + Properties *DatabaseOperationProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// DatabaseOperationListResult - The response to a list database operations request +type DatabaseOperationListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*DatabaseOperation +} + +// DatabaseOperationProperties - The properties of a database operation. +type DatabaseOperationProperties struct { + // READ-ONLY; The name of the database the operation is being performed on. + DatabaseName *string + + // READ-ONLY; The operation description. + Description *string + + // READ-ONLY; The operation error code. + ErrorCode *int32 + + // READ-ONLY; The operation error description. + ErrorDescription *string + + // READ-ONLY; The operation error severity. + ErrorSeverity *int32 + + // READ-ONLY; The estimated completion time of the operation. + EstimatedCompletionTime *time.Time + + // READ-ONLY; Whether the operation can be cancelled. + IsCancellable *bool + + // READ-ONLY; Whether or not the error is a user error. + IsUserError *bool + + // READ-ONLY; The name of operation. + Operation *string + + // READ-ONLY; The friendly name of operation. + OperationFriendlyName *string + + // READ-ONLY; The percentage of the operation completed. + PercentComplete *int32 + + // READ-ONLY; The name of the server. + ServerName *string + + // READ-ONLY; The operation start time. + StartTime *time.Time + + // READ-ONLY; The operation state. + State *ManagementOperationState +} + +// DatabaseProperties - The database's properties. +type DatabaseProperties struct { + // Time in minutes after which database is automatically paused. A value of -1 means that automatic pause is disabled + AutoPauseDelay *int32 + + // Collation of the metadata catalog. + CatalogCollation *CatalogCollationType + + // The collation of the database. + Collation *string + + // Specifies the mode of database creation. + // Default: regular database creation. + // Copy: creates a database as a copy of an existing database. sourceDatabaseId must be specified as the resource ID of the + // source database. + // Secondary: creates a database as a secondary replica of an existing database. sourceDatabaseId must be specified as the + // resource ID of the existing primary database. + // PointInTimeRestore: Creates a database by restoring a point in time backup of an existing database. sourceDatabaseId must + // be specified as the resource ID of the existing database, and + // restorePointInTime must be specified. + // Recovery: Creates a database by restoring a geo-replicated backup. sourceDatabaseId must be specified as the recoverable + // database resource ID to restore. + // Restore: Creates a database by restoring a backup of a deleted database. sourceDatabaseId must be specified. If sourceDatabaseId + // is the database's original resource ID, then sourceDatabaseDeletionDate + // must be specified. Otherwise sourceDatabaseId must be the restorable dropped database resource ID and sourceDatabaseDeletionDate + // is ignored. restorePointInTime may also be specified to restore from an + // earlier point in time. + // RestoreLongTermRetentionBackup: Creates a database by restoring from a long term retention vault. recoveryServicesRecoveryPointResourceId + // must be specified as the recovery point resource ID. + // Copy, Secondary, and RestoreLongTermRetentionBackup are not supported for DataWarehouse edition. + CreateMode *CreateMode + + // The resource identifier of the elastic pool containing this database. + ElasticPoolID *string + + // The Client id used for cross tenant per database CMK scenario + FederatedClientID *string + + // The number of secondary replicas associated with the database that are used to provide high availability. Not applicable + // to a Hyperscale database within an elastic pool. + HighAvailabilityReplicaCount *int32 + + // Whether or not this database is a ledger database, which means all tables in the database are ledger tables. Note: the + // value of this property cannot be changed after the database has been created. + IsLedgerOn *bool + + // The license type to apply for this database. LicenseIncluded if you need a license, or BasePrice if you have a license + // and are eligible for the Azure Hybrid Benefit. + LicenseType *DatabaseLicenseType + + // The resource identifier of the long term retention backup associated with create operation of this database. + LongTermRetentionBackupResourceID *string + + // Maintenance configuration id assigned to the database. This configuration defines the period when the maintenance updates + // will occur. + MaintenanceConfigurationID *string + + // The max size of the database expressed in bytes. + MaxSizeBytes *int64 + + // Minimal capacity that database will always have allocated, if not paused + MinCapacity *float64 + + // The state of read-only routing. If enabled, connections that have application intent set to readonly in their connection + // string may be routed to a readonly secondary replica in the same region. Not + // applicable to a Hyperscale database within an elastic pool. + ReadScale *DatabaseReadScale + + // The resource identifier of the recoverable database associated with create operation of this database. + RecoverableDatabaseID *string + + // The resource identifier of the recovery point associated with create operation of this database. + RecoveryServicesRecoveryPointID *string + + // The storage account type to be used to store backups for this database. + RequestedBackupStorageRedundancy *BackupStorageRedundancy + + // The resource identifier of the restorable dropped database associated with create operation of this database. + RestorableDroppedDatabaseID *string + + // Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database. + RestorePointInTime *time.Time + + // The name of the sample schema to apply when creating this database. + SampleName *SampleName + + // The secondary type of the database if it is a secondary. Valid values are Geo and Named. + SecondaryType *SecondaryType + + // Specifies the time that the database was deleted. + SourceDatabaseDeletionDate *time.Time + + // The resource identifier of the source database associated with create operation of this database. + SourceDatabaseID *string + + // The resource identifier of the source associated with the create operation of this database. + // When sourceResourceId is specified, sourceDatabaseId, recoverableDatabaseId, restorableDroppedDatabaseId and sourceDatabaseDeletionDate + // must not be specified and CreateMode must be PointInTimeRestore, + // Restore or Recover. + // When createMode is PointInTimeRestore, sourceResourceId must be the resource ID of an existing database or existing sql + // pool, and restorePointInTime must be specified. + // When createMode is Restore, sourceResourceId must be the resource ID of restorable dropped database or restorable dropped + // sql pool. + // When createMode is Recover, sourceResourceId must be the resource ID of recoverable database or recoverable sql pool. + // This property allows to restore across subscriptions which is only supported for DataWarehouse edition. + // When source subscription belongs to a different tenant than target subscription, “x-ms-authorization-auxiliary” header + // must contain authentication token for the source tenant. For more details about + // “x-ms-authorization-auxiliary” header see https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/authenticate-multi-tenant + SourceResourceID *string + + // Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple + // availability zones. + ZoneRedundant *bool + + // READ-ONLY; The creation date of the database (ISO8601 format). + CreationDate *time.Time + + // READ-ONLY; The storage account type used to store backups for this database. + CurrentBackupStorageRedundancy *BackupStorageRedundancy + + // READ-ONLY; The name and tier of the SKU. + CurrentSKU *SKU + + // READ-ONLY; The current service level objective name of the database. + CurrentServiceObjectiveName *string + + // READ-ONLY; The ID of the database. + DatabaseID *string + + // READ-ONLY; The default secondary region for this database. + DefaultSecondaryLocation *string + + // READ-ONLY; This records the earliest start date and time that restore is available for this database (ISO8601 format). + EarliestRestoreDate *time.Time + + // READ-ONLY; Failover Group resource identifier that this database belongs to. + FailoverGroupID *string + + // READ-ONLY; Infra encryption is enabled for this database. + IsInfraEncryptionEnabled *bool + + // READ-ONLY; The max log size for this database. + MaxLogSizeBytes *int64 + + // READ-ONLY; The date when database was paused by user configuration or action(ISO8601 format). Null if the database is ready. + PausedDate *time.Time + + // READ-ONLY; The requested service level objective name of the database. + RequestedServiceObjectiveName *string + + // READ-ONLY; The date when database was resumed by user action or database login (ISO8601 format). Null if the database is + // paused. + ResumedDate *time.Time + + // READ-ONLY; The status of the database. + Status *DatabaseStatus +} + +// DatabaseSchema - A database schema resource. +type DatabaseSchema struct { + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// DatabaseSchemaListResult - A list of database schemas. +type DatabaseSchemaListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*DatabaseSchema +} + +// DatabaseSecurityAlertListResult - A list of the database's security alert policies. +type DatabaseSecurityAlertListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*DatabaseSecurityAlertPolicy +} + +// DatabaseSecurityAlertPolicy - A database security alert policy. +type DatabaseSecurityAlertPolicy struct { + // Resource properties. + Properties *SecurityAlertsPolicyProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; SystemData of SecurityAlertPolicyResource. + SystemData *SystemData + + // READ-ONLY; Resource type. + Type *string +} + +// DatabaseTable - A database table resource. +type DatabaseTable struct { + // Resource properties. + Properties *DatabaseTableProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// DatabaseTableListResult - A list of database tables. +type DatabaseTableListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*DatabaseTable +} + +// DatabaseTableProperties - Database table properties. +type DatabaseTableProperties struct { + // Whether or not the table is memory optimized. + MemoryOptimized *bool + + // The table temporal type. + TemporalType *TableTemporalType +} + +// DatabaseUpdate - A database update resource. +type DatabaseUpdate struct { + // Database identity + Identity *DatabaseIdentity + + // Resource properties. + Properties *DatabaseUpdateProperties + + // The name and tier of the SKU. + SKU *SKU + + // Resource tags. + Tags map[string]*string +} + +// DatabaseUpdateProperties - A database update properties. +type DatabaseUpdateProperties struct { + // Time in minutes after which database is automatically paused. A value of -1 means that automatic pause is disabled + AutoPauseDelay *int32 + + // Collation of the metadata catalog. + CatalogCollation *CatalogCollationType + + // The collation of the database. + Collation *string + + // Specifies the mode of database creation. + // Default: regular database creation. + // Copy: creates a database as a copy of an existing database. sourceDatabaseId must be specified as the resource ID of the + // source database. + // Secondary: creates a database as a secondary replica of an existing database. sourceDatabaseId must be specified as the + // resource ID of the existing primary database. + // PointInTimeRestore: Creates a database by restoring a point in time backup of an existing database. sourceDatabaseId must + // be specified as the resource ID of the existing database, and + // restorePointInTime must be specified. + // Recovery: Creates a database by restoring a geo-replicated backup. sourceDatabaseId must be specified as the recoverable + // database resource ID to restore. + // Restore: Creates a database by restoring a backup of a deleted database. sourceDatabaseId must be specified. If sourceDatabaseId + // is the database's original resource ID, then sourceDatabaseDeletionDate + // must be specified. Otherwise sourceDatabaseId must be the restorable dropped database resource ID and sourceDatabaseDeletionDate + // is ignored. restorePointInTime may also be specified to restore from an + // earlier point in time. + // RestoreLongTermRetentionBackup: Creates a database by restoring from a long term retention vault. recoveryServicesRecoveryPointResourceId + // must be specified as the recovery point resource ID. + // Copy, Secondary, and RestoreLongTermRetentionBackup are not supported for DataWarehouse edition. + CreateMode *CreateMode + + // The resource identifier of the elastic pool containing this database. + ElasticPoolID *string + + // The Client id used for cross tenant per database CMK scenario + FederatedClientID *string + + // The number of secondary replicas associated with the database that are used to provide high availability. Not applicable + // to a Hyperscale database within an elastic pool. + HighAvailabilityReplicaCount *int32 + + // Whether or not this database is a ledger database, which means all tables in the database are ledger tables. Note: the + // value of this property cannot be changed after the database has been created. + IsLedgerOn *bool + + // The license type to apply for this database. LicenseIncluded if you need a license, or BasePrice if you have a license + // and are eligible for the Azure Hybrid Benefit. + LicenseType *DatabaseLicenseType + + // The resource identifier of the long term retention backup associated with create operation of this database. + LongTermRetentionBackupResourceID *string + + // Maintenance configuration id assigned to the database. This configuration defines the period when the maintenance updates + // will occur. + MaintenanceConfigurationID *string + + // The max size of the database expressed in bytes. + MaxSizeBytes *int64 + + // Minimal capacity that database will always have allocated, if not paused + MinCapacity *float64 + + // The state of read-only routing. If enabled, connections that have application intent set to readonly in their connection + // string may be routed to a readonly secondary replica in the same region. Not + // applicable to a Hyperscale database within an elastic pool. + ReadScale *DatabaseReadScale + + // The resource identifier of the recoverable database associated with create operation of this database. + RecoverableDatabaseID *string + + // The resource identifier of the recovery point associated with create operation of this database. + RecoveryServicesRecoveryPointID *string + + // The storage account type to be used to store backups for this database. + RequestedBackupStorageRedundancy *BackupStorageRedundancy + + // The resource identifier of the restorable dropped database associated with create operation of this database. + RestorableDroppedDatabaseID *string + + // Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database. + RestorePointInTime *time.Time + + // The name of the sample schema to apply when creating this database. + SampleName *SampleName + + // The secondary type of the database if it is a secondary. Valid values are Geo and Named. + SecondaryType *SecondaryType + + // Specifies the time that the database was deleted. + SourceDatabaseDeletionDate *time.Time + + // The resource identifier of the source database associated with create operation of this database. + SourceDatabaseID *string + + // Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple + // availability zones. + ZoneRedundant *bool + + // READ-ONLY; The creation date of the database (ISO8601 format). + CreationDate *time.Time + + // READ-ONLY; The storage account type used to store backups for this database. + CurrentBackupStorageRedundancy *BackupStorageRedundancy + + // READ-ONLY; The name and tier of the SKU. + CurrentSKU *SKU + + // READ-ONLY; The current service level objective name of the database. + CurrentServiceObjectiveName *string + + // READ-ONLY; The ID of the database. + DatabaseID *string + + // READ-ONLY; The default secondary region for this database. + DefaultSecondaryLocation *string + + // READ-ONLY; This records the earliest start date and time that restore is available for this database (ISO8601 format). + EarliestRestoreDate *time.Time + + // READ-ONLY; Failover Group resource identifier that this database belongs to. + FailoverGroupID *string + + // READ-ONLY; Infra encryption is enabled for this database. + IsInfraEncryptionEnabled *bool + + // READ-ONLY; The max log size for this database. + MaxLogSizeBytes *int64 + + // READ-ONLY; The date when database was paused by user configuration or action(ISO8601 format). Null if the database is ready. + PausedDate *time.Time + + // READ-ONLY; The requested service level objective name of the database. + RequestedServiceObjectiveName *string + + // READ-ONLY; The date when database was resumed by user action or database login (ISO8601 format). Null if the database is + // paused. + ResumedDate *time.Time + + // READ-ONLY; The status of the database. + Status *DatabaseStatus +} + +// DatabaseUsage - Usage metric of a database. +type DatabaseUsage struct { + // Resource properties. + Properties *DatabaseUsageProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// DatabaseUsageListResult - A list of database usage metrics. +type DatabaseUsageListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*DatabaseUsage +} + +// DatabaseUsageProperties - Properties of a database usage. +type DatabaseUsageProperties struct { + // READ-ONLY; Current value of the metric. + CurrentValue *float64 + + // READ-ONLY; User-readable name of the metric. + DisplayName *string + + // READ-ONLY; Boundary value of the metric. + Limit *float64 + + // READ-ONLY; Unit of the metric. + Unit *string +} + +// DatabaseUserIdentity - Azure Active Directory identity configuration for a resource. +type DatabaseUserIdentity struct { + // READ-ONLY; The Azure Active Directory client id. + ClientID *string + + // READ-ONLY; The Azure Active Directory principal id. + PrincipalID *string +} + +// DatabaseVulnerabilityAssessment - A database vulnerability assessment. +type DatabaseVulnerabilityAssessment struct { + // Resource properties. + Properties *DatabaseVulnerabilityAssessmentProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// DatabaseVulnerabilityAssessmentListResult - A list of the database's vulnerability assessments. +type DatabaseVulnerabilityAssessmentListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*DatabaseVulnerabilityAssessment +} + +// DatabaseVulnerabilityAssessmentProperties - Properties of a database Vulnerability Assessment. +type DatabaseVulnerabilityAssessmentProperties struct { + // The recurring scans settings + RecurringScans *VulnerabilityAssessmentRecurringScansProperties + + // Specifies the identifier key of the storage account for vulnerability assessment scan results. If 'StorageContainerSasKey' + // isn't specified, storageAccountAccessKey is required. + StorageAccountAccessKey *string + + // A blob storage container path to hold the scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/). It is required + // if server level vulnerability assessment policy doesn't set + StorageContainerPath *string + + // A shared access signature (SAS Key) that has write access to the blob container specified in 'storageContainerPath' parameter. + // If 'storageAccountAccessKey' isn't specified, StorageContainerSasKey is + // required. + StorageContainerSasKey *string +} + +// DatabaseVulnerabilityAssessmentRuleBaseline - A database vulnerability assessment rule baseline. +type DatabaseVulnerabilityAssessmentRuleBaseline struct { + // Resource properties. + Properties *DatabaseVulnerabilityAssessmentRuleBaselineProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// DatabaseVulnerabilityAssessmentRuleBaselineItem - Properties for an Azure SQL Database Vulnerability Assessment rule baseline's +// result. +type DatabaseVulnerabilityAssessmentRuleBaselineItem struct { + // REQUIRED; The rule baseline result + Result []*string +} + +// DatabaseVulnerabilityAssessmentRuleBaselineProperties - Properties of a database Vulnerability Assessment rule baseline. +type DatabaseVulnerabilityAssessmentRuleBaselineProperties struct { + // REQUIRED; The rule baseline result + BaselineResults []*DatabaseVulnerabilityAssessmentRuleBaselineItem +} + +// DatabaseVulnerabilityAssessmentScanExportProperties - Properties of the export operation's result. +type DatabaseVulnerabilityAssessmentScanExportProperties struct { + // READ-ONLY; Location of the exported report (e.g. https://myStorage.blob.core.windows.net/VaScans/scans/serverName/databaseName/scan_scanId.xlsx). + ExportedReportLocation *string +} + +// DatabaseVulnerabilityAssessmentScansExport - A database Vulnerability Assessment scan export resource. +type DatabaseVulnerabilityAssessmentScansExport struct { + // Resource properties. + Properties *DatabaseVulnerabilityAssessmentScanExportProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// DeletedServer - A deleted server. +type DeletedServer struct { + // Resource properties. + Properties *DeletedServerProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// DeletedServerListResult - A list of deleted servers. +type DeletedServerListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*DeletedServer +} + +// DeletedServerProperties - The properties of a deleted server. +type DeletedServerProperties struct { + // READ-ONLY; The deletion time of the deleted server. + DeletionTime *time.Time + + // READ-ONLY; The fully qualified domain name of the server. + FullyQualifiedDomainName *string + + // READ-ONLY; The original ID of the server before deletion. + OriginalID *string + + // READ-ONLY; The version of the deleted server. + Version *string +} + +// DistributedAvailabilityGroup - Distributed availability group between box and Sql Managed Instance. +type DistributedAvailabilityGroup struct { + // Resource properties. + Properties *DistributedAvailabilityGroupProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// DistributedAvailabilityGroupProperties - The properties of a distributed availability group. +type DistributedAvailabilityGroupProperties struct { + // The primary availability group name + PrimaryAvailabilityGroupName *string + + // The replication mode of a distributed availability group. Parameter will be ignored during link creation. + ReplicationMode *ReplicationMode + + // The secondary availability group name + SecondaryAvailabilityGroupName *string + + // The source endpoint + SourceEndpoint *string + + // The name of the target database + TargetDatabase *string + + // READ-ONLY; The distributed availability group id + DistributedAvailabilityGroupID *string + + // READ-ONLY; The last hardened lsn + LastHardenedLsn *string + + // READ-ONLY; The link state + LinkState *string + + // READ-ONLY; The source replica id + SourceReplicaID *string + + // READ-ONLY; The target replica id + TargetReplicaID *string +} + +// DistributedAvailabilityGroupsListResult - A list of distributed availability groups in instance. +type DistributedAvailabilityGroupsListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*DistributedAvailabilityGroup +} + +// EditionCapability - The edition capability. +type EditionCapability struct { + // The reason for the capability not being available. + Reason *string + + // READ-ONLY; The database edition name. + Name *string + + // READ-ONLY; The read scale capability for the edition. + ReadScale *ReadScaleCapability + + // READ-ONLY; The status of the capability. + Status *CapabilityStatus + + // READ-ONLY; The list of supported service objectives for the edition. + SupportedServiceLevelObjectives []*ServiceObjectiveCapability + + // READ-ONLY; The list of supported storage capabilities for this edition + SupportedStorageCapabilities []*StorageCapability + + // READ-ONLY; Whether or not zone redundancy is supported for the edition. + ZoneRedundant *bool +} + +// ElasticPool - An elastic pool. +type ElasticPool struct { + // REQUIRED; Resource location. + Location *string + + // Resource properties. + Properties *ElasticPoolProperties + + // The elastic pool SKU. + // The list of SKUs may vary by region and support offer. To determine the SKUs (including the SKU name, tier/edition, family, + // and capacity) that are available to your subscription in an Azure region, + // use the Capabilities_ListByLocation REST API or the following command: + // az sql elastic-pool list-editions -l -o table + // ` + SKU *SKU + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Kind of elastic pool. This is metadata used for the Azure portal experience. + Kind *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// ElasticPoolActivity - Represents the activity on an elastic pool. +type ElasticPoolActivity struct { + // The geo-location where the resource lives + Location *string + + // The properties representing the resource. + Properties *ElasticPoolActivityProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// ElasticPoolActivityListResult - Represents the response to a list elastic pool activity request. +type ElasticPoolActivityListResult struct { + // REQUIRED; The list of elastic pool activities. + Value []*ElasticPoolActivity +} + +// ElasticPoolActivityProperties - Represents the properties of an elastic pool. +type ElasticPoolActivityProperties struct { + // READ-ONLY; The name of the elastic pool. + ElasticPoolName *string + + // READ-ONLY; The time the operation finished (ISO8601 format). + EndTime *time.Time + + // READ-ONLY; The error code if available. + ErrorCode *int32 + + // READ-ONLY; The error message if available. + ErrorMessage *string + + // READ-ONLY; The error severity if available. + ErrorSeverity *int32 + + // READ-ONLY; The operation name. + Operation *string + + // READ-ONLY; The unique operation ID. + OperationID *string + + // READ-ONLY; The percentage complete if available. + PercentComplete *int32 + + // READ-ONLY; The requested per database DTU cap. + RequestedDatabaseDtuCap *int32 + + // READ-ONLY; The requested per database DTU guarantee. + RequestedDatabaseDtuGuarantee *int32 + + // READ-ONLY; The requested max DTU per database if available. + RequestedDatabaseDtuMax *int32 + + // READ-ONLY; The requested min DTU per database if available. + RequestedDatabaseDtuMin *int32 + + // READ-ONLY; The requested DTU for the pool if available. + RequestedDtu *int32 + + // READ-ONLY; The requested DTU guarantee. + RequestedDtuGuarantee *int32 + + // READ-ONLY; The requested name for the elastic pool if available. + RequestedElasticPoolName *string + + // READ-ONLY; The requested storage limit for the pool in GB if available. + RequestedStorageLimitInGB *int64 + + // READ-ONLY; The requested storage limit in MB. + RequestedStorageLimitInMB *int32 + + // READ-ONLY; The name of the server the elastic pool is in. + ServerName *string + + // READ-ONLY; The time the operation started (ISO8601 format). + StartTime *time.Time + + // READ-ONLY; The current state of the operation. + State *string +} + +// ElasticPoolDatabaseActivity - Represents the activity on an elastic pool. +type ElasticPoolDatabaseActivity struct { + // The geo-location where the resource lives + Location *string + + // The properties representing the resource. + Properties *ElasticPoolDatabaseActivityProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// ElasticPoolDatabaseActivityListResult - Represents the response to a list elastic pool database activity request. +type ElasticPoolDatabaseActivityListResult struct { + // REQUIRED; The list of elastic pool database activities. + Value []*ElasticPoolDatabaseActivity +} + +// ElasticPoolDatabaseActivityProperties - Represents the properties of an elastic pool database activity. +type ElasticPoolDatabaseActivityProperties struct { + // READ-ONLY; The name of the current elastic pool the database is in if available. + CurrentElasticPoolName *string + + // READ-ONLY; The name of the current service objective if available. + CurrentServiceObjective *string + + // READ-ONLY; The database name. + DatabaseName *string + + // READ-ONLY; The time the operation finished (ISO8601 format). + EndTime *time.Time + + // READ-ONLY; The error code if available. + ErrorCode *int32 + + // READ-ONLY; The error message if available. + ErrorMessage *string + + // READ-ONLY; The error severity if available. + ErrorSeverity *int32 + + // READ-ONLY; The operation name. + Operation *string + + // READ-ONLY; The unique operation ID. + OperationID *string + + // READ-ONLY; The percentage complete if available. + PercentComplete *int32 + + // READ-ONLY; The name for the elastic pool the database is moving into if available. + RequestedElasticPoolName *string + + // READ-ONLY; The name of the requested service objective if available. + RequestedServiceObjective *string + + // READ-ONLY; The name of the server the elastic pool is in. + ServerName *string + + // READ-ONLY; The time the operation started (ISO8601 format). + StartTime *time.Time + + // READ-ONLY; The current state of the operation. + State *string +} + +// ElasticPoolEditionCapability - The elastic pool edition capability. +type ElasticPoolEditionCapability struct { + // The reason for the capability not being available. + Reason *string + + // READ-ONLY; The elastic pool edition name. + Name *string + + // READ-ONLY; The status of the capability. + Status *CapabilityStatus + + // READ-ONLY; The list of supported elastic pool DTU levels for the edition. + SupportedElasticPoolPerformanceLevels []*ElasticPoolPerformanceLevelCapability + + // READ-ONLY; Whether or not zone redundancy is supported for the edition. + ZoneRedundant *bool +} + +// ElasticPoolListResult - The result of an elastic pool list request. +type ElasticPoolListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*ElasticPool +} + +// ElasticPoolOperation - A elastic pool operation. +type ElasticPoolOperation struct { + // Resource properties. + Properties *ElasticPoolOperationProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// ElasticPoolOperationListResult - The response to a list elastic pool operations request +type ElasticPoolOperationListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*ElasticPoolOperation +} + +// ElasticPoolOperationProperties - The properties of a elastic pool operation. +type ElasticPoolOperationProperties struct { + // READ-ONLY; The operation description. + Description *string + + // READ-ONLY; The name of the elastic pool the operation is being performed on. + ElasticPoolName *string + + // READ-ONLY; The operation error code. + ErrorCode *int32 + + // READ-ONLY; The operation error description. + ErrorDescription *string + + // READ-ONLY; The operation error severity. + ErrorSeverity *int32 + + // READ-ONLY; The estimated completion time of the operation. + EstimatedCompletionTime *time.Time + + // READ-ONLY; Whether the operation can be cancelled. + IsCancellable *bool + + // READ-ONLY; Whether or not the error is a user error. + IsUserError *bool + + // READ-ONLY; The name of operation. + Operation *string + + // READ-ONLY; The friendly name of operation. + OperationFriendlyName *string + + // READ-ONLY; The percentage of the operation completed. + PercentComplete *int32 + + // READ-ONLY; The name of the server. + ServerName *string + + // READ-ONLY; The operation start time. + StartTime *time.Time + + // READ-ONLY; The operation state. + State *string +} + +// ElasticPoolPerDatabaseMaxPerformanceLevelCapability - The max per-database performance level capability. +type ElasticPoolPerDatabaseMaxPerformanceLevelCapability struct { + // The reason for the capability not being available. + Reason *string + + // READ-ONLY; The maximum performance level per database. + Limit *float64 + + // READ-ONLY; The status of the capability. + Status *CapabilityStatus + + // READ-ONLY; The list of supported min database performance levels. + SupportedPerDatabaseMinPerformanceLevels []*ElasticPoolPerDatabaseMinPerformanceLevelCapability + + // READ-ONLY; Unit type used to measure performance level. + Unit *PerformanceLevelUnit +} + +// ElasticPoolPerDatabaseMinPerformanceLevelCapability - The minimum per-database performance level capability. +type ElasticPoolPerDatabaseMinPerformanceLevelCapability struct { + // The reason for the capability not being available. + Reason *string + + // READ-ONLY; The minimum performance level per database. + Limit *float64 + + // READ-ONLY; The status of the capability. + Status *CapabilityStatus + + // READ-ONLY; Unit type used to measure performance level. + Unit *PerformanceLevelUnit +} + +// ElasticPoolPerDatabaseSettings - Per database settings of an elastic pool. +type ElasticPoolPerDatabaseSettings struct { + // The maximum capacity any one database can consume. + MaxCapacity *float64 + + // The minimum capacity all databases are guaranteed. + MinCapacity *float64 +} + +// ElasticPoolPerformanceLevelCapability - The Elastic Pool performance level capability. +type ElasticPoolPerformanceLevelCapability struct { + // The reason for the capability not being available. + Reason *string + + // READ-ONLY; The included (free) max size for this performance level. + IncludedMaxSize *MaxSizeCapability + + // READ-ONLY; The maximum number of databases supported. + MaxDatabaseCount *int32 + + // READ-ONLY; The performance level for the pool. + PerformanceLevel *PerformanceLevelCapability + + // READ-ONLY; The sku. + SKU *SKU + + // READ-ONLY; The status of the capability. + Status *CapabilityStatus + + // READ-ONLY; List of supported license types. + SupportedLicenseTypes []*LicenseTypeCapability + + // READ-ONLY; List of supported maintenance configurations + SupportedMaintenanceConfigurations []*MaintenanceConfigurationCapability + + // READ-ONLY; The list of supported max sizes. + SupportedMaxSizes []*MaxSizeRangeCapability + + // READ-ONLY; The list of supported per database max performance levels. + SupportedPerDatabaseMaxPerformanceLevels []*ElasticPoolPerDatabaseMaxPerformanceLevelCapability + + // READ-ONLY; The list of supported per database max sizes. + SupportedPerDatabaseMaxSizes []*MaxSizeRangeCapability + + // READ-ONLY; Whether or not zone redundancy is supported for the performance level. + ZoneRedundant *bool +} + +// ElasticPoolProperties - Properties of an elastic pool +type ElasticPoolProperties struct { + // The number of secondary replicas associated with the elastic pool that are used to provide high availability. + HighAvailabilityReplicaCount *int32 + + // The license type to apply for this elastic pool. + LicenseType *ElasticPoolLicenseType + + // Maintenance configuration id assigned to the elastic pool. This configuration defines the period when the maintenance updates + // will will occur. + MaintenanceConfigurationID *string + + // The storage limit for the database elastic pool in bytes. + MaxSizeBytes *int64 + + // The per database settings for the elastic pool. + PerDatabaseSettings *ElasticPoolPerDatabaseSettings + + // Whether or not this elastic pool is zone redundant, which means the replicas of this elastic pool will be spread across + // multiple availability zones. + ZoneRedundant *bool + + // READ-ONLY; The creation date of the elastic pool (ISO8601 format). + CreationDate *time.Time + + // READ-ONLY; The state of the elastic pool. + State *ElasticPoolState +} + +// ElasticPoolUpdate - An elastic pool update. +type ElasticPoolUpdate struct { + // Resource properties. + Properties *ElasticPoolUpdateProperties + + // An ARM Resource SKU. + SKU *SKU + + // Resource tags. + Tags map[string]*string +} + +// ElasticPoolUpdateProperties - Properties of an elastic pool +type ElasticPoolUpdateProperties struct { + // The number of secondary replicas associated with the elastic pool that are used to provide high availability. Applicable + // only to Hyperscale elastic pools. + HighAvailabilityReplicaCount *int32 + + // The license type to apply for this elastic pool. + LicenseType *ElasticPoolLicenseType + + // Maintenance configuration id assigned to the elastic pool. This configuration defines the period when the maintenance updates + // will will occur. + MaintenanceConfigurationID *string + + // The storage limit for the database elastic pool in bytes. + MaxSizeBytes *int64 + + // The per database settings for the elastic pool. + PerDatabaseSettings *ElasticPoolPerDatabaseSettings + + // Whether or not this elastic pool is zone redundant, which means the replicas of this elastic pool will be spread across + // multiple availability zones. + ZoneRedundant *bool +} + +// EncryptionProtector - The server encryption protector. +type EncryptionProtector struct { + // Resource properties. + Properties *EncryptionProtectorProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Kind of encryption protector. This is metadata used for the Azure portal experience. + Kind *string + + // READ-ONLY; Resource location. + Location *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// EncryptionProtectorListResult - A list of server encryption protectors. +type EncryptionProtectorListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*EncryptionProtector +} + +// EncryptionProtectorProperties - Properties for an encryption protector execution. +type EncryptionProtectorProperties struct { + // REQUIRED; The encryption protector type like 'ServiceManaged', 'AzureKeyVault'. + ServerKeyType *ServerKeyType + + // Key auto rotation opt-in flag. Either true or false. + AutoRotationEnabled *bool + + // The name of the server key. + ServerKeyName *string + + // READ-ONLY; Subregion of the encryption protector. + Subregion *string + + // READ-ONLY; Thumbprint of the server key. + Thumbprint *string + + // READ-ONLY; The URI of the server key. + URI *string +} + +// EndpointCertificate - Certificate used on an endpoint on the Managed Instance. +type EndpointCertificate struct { + // Resource properties. + Properties *EndpointCertificateProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// EndpointCertificateListResult - A list of endpoint certificates on the target instance. +type EndpointCertificateListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*EndpointCertificate +} + +// EndpointCertificateProperties - The properties of an endpoint certificate. +type EndpointCertificateProperties struct { + // The certificate public blob + PublicBlob *string +} + +// ExportDatabaseDefinition - Contains the information necessary to perform export database operation. +type ExportDatabaseDefinition struct { + // REQUIRED; Administrator login name. + AdministratorLogin *string + + // REQUIRED; Administrator login password. + AdministratorLoginPassword *string + + // REQUIRED; Storage key. + StorageKey *string + + // REQUIRED; Storage key type. + StorageKeyType *StorageKeyType + + // REQUIRED; Storage Uri. + StorageURI *string + + // Authentication type. + AuthenticationType *string + + // Optional resource information to enable network isolation for request. + NetworkIsolation *NetworkIsolationSettings +} + +// ExtendedDatabaseBlobAuditingPolicy - An extended database blob auditing policy. +type ExtendedDatabaseBlobAuditingPolicy struct { + // Resource properties. + Properties *ExtendedDatabaseBlobAuditingPolicyProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// ExtendedDatabaseBlobAuditingPolicyListResult - A list of database extended auditing settings. +type ExtendedDatabaseBlobAuditingPolicyListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*ExtendedDatabaseBlobAuditingPolicy +} + +// ExtendedDatabaseBlobAuditingPolicyProperties - Properties of an extended database blob auditing policy. +type ExtendedDatabaseBlobAuditingPolicyProperties struct { + // REQUIRED; Specifies the state of the audit. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. + State *BlobAuditingPolicyState + + // Specifies the Actions-Groups and Actions to audit. + // The recommended set of action groups to use is the following combination - this will audit all the queries and stored procedures + // executed against the database, as well as successful and failed logins: + // BATCHCOMPLETEDGROUP, SUCCESSFULDATABASEAUTHENTICATIONGROUP, FAILEDDATABASEAUTHENTICATIONGROUP. + // This above combination is also the set that is configured by default when enabling auditing from the Azure portal. + // The supported action groups to audit are (note: choose only specific groups that cover your auditing needs. Using unnecessary + // groups could lead to very large quantities of audit records): + // APPLICATIONROLECHANGEPASSWORDGROUP BACKUPRESTOREGROUP DATABASELOGOUTGROUP DATABASEOBJECTCHANGEGROUP DATABASEOBJECTOWNERSHIPCHANGEGROUP + // DATABASEOBJECTPERMISSIONCHANGEGROUP DATABASEOPERATIONGROUP + // DATABASEPERMISSIONCHANGEGROUP DATABASEPRINCIPALCHANGEGROUP DATABASEPRINCIPALIMPERSONATIONGROUP DATABASEROLEMEMBERCHANGEGROUP + // FAILEDDATABASEAUTHENTICATIONGROUP SCHEMAOBJECTACCESSGROUP SCHEMAOBJECT + // CHANGEGROUP SCHEMAOBJECTOWNERSHIPCHANGEGROUP SCHEMAOBJECTPERMISSIONCHANGEGROUP SUCCESSFULDATABASEAUTHENTICATIONGROUP USERCHANGEPASSWORDGROUP + // BATCHSTARTEDGROUP BATCHCOMPLETEDGROUP DBCCGROUP DATABASE + // OWNERSHIPCHANGEGROUP DATABASECHANGEGROUP LEDGEROPERATION_GROUP + // These are groups that cover all sql statements and stored procedures executed against the database, and should not be used + // in combination with other groups as this will result in duplicate audit logs. + // For more information, see Database-Level Audit Action Groups + // [https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups]. + // For Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified for Server + // auditing policy). The supported actions to audit are: SELECT UPDATE INSERT DELETE + // EXECUTE RECEIVE REFERENCES + // The general form for defining an action to be audited is: {action} ON {object} BY {principal} + // Note that in the above format can refer to an object like a table, view, or stored procedure, or an entire database or + // schema. For the latter cases, the forms DATABASE::{dbname} and SCHEMA::{schema + // name} are used, respectively. + // For example: SELECT on dbo.myTable by public SELECT on DATABASE::myDatabase by public SELECT on SCHEMA::mySchema by public + // For more information, see Database-Level Audit Actions + // [https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions] + AuditActionsAndGroups []*string + + // Specifies whether audit events are sent to Azure Monitor. In order to send the events to Azure Monitor, specify 'State' + // as 'Enabled' and 'IsAzureMonitorTargetEnabled' as true. + // When using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs category on + // the database should be also created. Note that for server level audit you + // should use the 'master' database as {databaseName}. + // Diagnostic Settings URI format: PUT + // https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview + // For more information, see Diagnostic Settings REST API [https://go.microsoft.com/fwlink/?linkid=2033207]or Diagnostic Settings + // PowerShell [https://go.microsoft.com/fwlink/?linkid=2033043] + IsAzureMonitorTargetEnabled *bool + + // Specifies whether Managed Identity is used to access blob storage + IsManagedIdentityInUse *bool + + // Specifies whether storageAccountAccessKey value is the storage's secondary key. + IsStorageSecondaryKeyInUse *bool + + // Specifies condition of where clause when creating an audit. + PredicateExpression *string + + // Specifies the amount of time in milliseconds that can elapse before audit actions are forced to be processed. The default + // minimum value is 1000 (1 second). The maximum is 2,147,483,647. + QueueDelayMs *int32 + + // Specifies the number of days to keep in the audit logs in the storage account. + RetentionDays *int32 + + // Specifies the identifier key of the auditing storage account. If state is Enabled and storageEndpoint is specified, not + // specifying the storageAccountAccessKey will use SQL server system-assigned + // managed identity to access the storage. Prerequisites for using managed identity authentication: + // 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD). + // 2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server + // identity. For more information, see Auditing to storage using Managed + // Identity authentication [https://go.microsoft.com/fwlink/?linkid=2114355] + StorageAccountAccessKey *string + + // Specifies the blob storage subscription Id. + StorageAccountSubscriptionID *string + + // Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint + // or isAzureMonitorTargetEnabled is required. + StorageEndpoint *string +} + +// ExtendedServerBlobAuditingPolicy - An extended server blob auditing policy. +type ExtendedServerBlobAuditingPolicy struct { + // Resource properties. + Properties *ExtendedServerBlobAuditingPolicyProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// ExtendedServerBlobAuditingPolicyListResult - A list of server extended auditing settings. +type ExtendedServerBlobAuditingPolicyListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*ExtendedServerBlobAuditingPolicy +} + +// ExtendedServerBlobAuditingPolicyProperties - Properties of an extended server blob auditing policy. +type ExtendedServerBlobAuditingPolicyProperties struct { + // REQUIRED; Specifies the state of the audit. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. + State *BlobAuditingPolicyState + + // Specifies the Actions-Groups and Actions to audit. + // The recommended set of action groups to use is the following combination - this will audit all the queries and stored procedures + // executed against the database, as well as successful and failed logins: + // BATCHCOMPLETEDGROUP, SUCCESSFULDATABASEAUTHENTICATIONGROUP, FAILEDDATABASEAUTHENTICATIONGROUP. + // This above combination is also the set that is configured by default when enabling auditing from the Azure portal. + // The supported action groups to audit are (note: choose only specific groups that cover your auditing needs. Using unnecessary + // groups could lead to very large quantities of audit records): + // APPLICATIONROLECHANGEPASSWORDGROUP BACKUPRESTOREGROUP DATABASELOGOUTGROUP DATABASEOBJECTCHANGEGROUP DATABASEOBJECTOWNERSHIPCHANGEGROUP + // DATABASEOBJECTPERMISSIONCHANGEGROUP DATABASEOPERATIONGROUP + // DATABASEPERMISSIONCHANGEGROUP DATABASEPRINCIPALCHANGEGROUP DATABASEPRINCIPALIMPERSONATIONGROUP DATABASEROLEMEMBERCHANGEGROUP + // FAILEDDATABASEAUTHENTICATIONGROUP SCHEMAOBJECTACCESSGROUP SCHEMAOBJECT + // CHANGEGROUP SCHEMAOBJECTOWNERSHIPCHANGEGROUP SCHEMAOBJECTPERMISSIONCHANGEGROUP SUCCESSFULDATABASEAUTHENTICATIONGROUP USERCHANGEPASSWORDGROUP + // BATCHSTARTEDGROUP BATCHCOMPLETEDGROUP DBCCGROUP DATABASE + // OWNERSHIPCHANGEGROUP DATABASECHANGEGROUP LEDGEROPERATION_GROUP + // These are groups that cover all sql statements and stored procedures executed against the database, and should not be used + // in combination with other groups as this will result in duplicate audit logs. + // For more information, see Database-Level Audit Action Groups + // [https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups]. + // For Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified for Server + // auditing policy). The supported actions to audit are: SELECT UPDATE INSERT DELETE + // EXECUTE RECEIVE REFERENCES + // The general form for defining an action to be audited is: {action} ON {object} BY {principal} + // Note that in the above format can refer to an object like a table, view, or stored procedure, or an entire database or + // schema. For the latter cases, the forms DATABASE::{dbname} and SCHEMA::{schema + // name} are used, respectively. + // For example: SELECT on dbo.myTable by public SELECT on DATABASE::myDatabase by public SELECT on SCHEMA::mySchema by public + // For more information, see Database-Level Audit Actions + // [https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions] + AuditActionsAndGroups []*string + + // Specifies whether audit events are sent to Azure Monitor. In order to send the events to Azure Monitor, specify 'State' + // as 'Enabled' and 'IsAzureMonitorTargetEnabled' as true. + // When using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs category on + // the database should be also created. Note that for server level audit you + // should use the 'master' database as {databaseName}. + // Diagnostic Settings URI format: PUT + // https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview + // For more information, see Diagnostic Settings REST API [https://go.microsoft.com/fwlink/?linkid=2033207]or Diagnostic Settings + // PowerShell [https://go.microsoft.com/fwlink/?linkid=2033043] + IsAzureMonitorTargetEnabled *bool + + // Specifies the state of devops audit. If state is Enabled, devops logs will be sent to Azure Monitor. In order to send the + // events to Azure Monitor, specify 'State' as 'Enabled', + // 'IsAzureMonitorTargetEnabled' as true and 'IsDevopsAuditEnabled' as true + // When using REST API to configure auditing, Diagnostic Settings with 'DevOpsOperationsAudit' diagnostic logs category on + // the master database should also be created. + // Diagnostic Settings URI format: PUT + // https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/master/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview + // For more information, see Diagnostic Settings REST API [https://go.microsoft.com/fwlink/?linkid=2033207]or Diagnostic Settings + // PowerShell [https://go.microsoft.com/fwlink/?linkid=2033043] + IsDevopsAuditEnabled *bool + + // Specifies whether Managed Identity is used to access blob storage + IsManagedIdentityInUse *bool + + // Specifies whether storageAccountAccessKey value is the storage's secondary key. + IsStorageSecondaryKeyInUse *bool + + // Specifies condition of where clause when creating an audit. + PredicateExpression *string + + // Specifies the amount of time in milliseconds that can elapse before audit actions are forced to be processed. The default + // minimum value is 1000 (1 second). The maximum is 2,147,483,647. + QueueDelayMs *int32 + + // Specifies the number of days to keep in the audit logs in the storage account. + RetentionDays *int32 + + // Specifies the identifier key of the auditing storage account. If state is Enabled and storageEndpoint is specified, not + // specifying the storageAccountAccessKey will use SQL server system-assigned + // managed identity to access the storage. Prerequisites for using managed identity authentication: + // 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD). + // 2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server + // identity. For more information, see Auditing to storage using Managed + // Identity authentication [https://go.microsoft.com/fwlink/?linkid=2114355] + StorageAccountAccessKey *string + + // Specifies the blob storage subscription Id. + StorageAccountSubscriptionID *string + + // Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint + // or isAzureMonitorTargetEnabled is required. + StorageEndpoint *string +} + +// FailoverGroup - A failover group. +type FailoverGroup struct { + // Resource properties. + Properties *FailoverGroupProperties + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource location. + Location *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// FailoverGroupListResult - A list of failover groups. +type FailoverGroupListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*FailoverGroup +} + +// FailoverGroupProperties - Properties of a failover group. +type FailoverGroupProperties struct { + // REQUIRED; List of partner server information for the failover group. + PartnerServers []*PartnerInfo + + // REQUIRED; Read-write endpoint of the failover group instance. + ReadWriteEndpoint *FailoverGroupReadWriteEndpoint + + // List of databases in the failover group. + Databases []*string + + // Read-only endpoint of the failover group instance. + ReadOnlyEndpoint *FailoverGroupReadOnlyEndpoint + + // READ-ONLY; Local replication role of the failover group instance. + ReplicationRole *FailoverGroupReplicationRole + + // READ-ONLY; Replication state of the failover group instance. + ReplicationState *string +} + +// FailoverGroupReadOnlyEndpoint - Read-only endpoint of the failover group instance. +type FailoverGroupReadOnlyEndpoint struct { + // Failover policy of the read-only endpoint for the failover group. + FailoverPolicy *ReadOnlyEndpointFailoverPolicy +} + +// FailoverGroupReadWriteEndpoint - Read-write endpoint of the failover group instance. +type FailoverGroupReadWriteEndpoint struct { + // REQUIRED; Failover policy of the read-write endpoint for the failover group. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes + // is required. + FailoverPolicy *ReadWriteEndpointFailoverPolicy + + // Grace period before failover with data loss is attempted for the read-write endpoint. If failoverPolicy is Automatic then + // failoverWithDataLossGracePeriodMinutes is required. + FailoverWithDataLossGracePeriodMinutes *int32 +} + +// FailoverGroupUpdate - A failover group update request. +type FailoverGroupUpdate struct { + // Resource properties. + Properties *FailoverGroupUpdateProperties + + // Resource tags. + Tags map[string]*string +} + +// FailoverGroupUpdateProperties - Properties of a failover group update. +type FailoverGroupUpdateProperties struct { + // List of databases in the failover group. + Databases []*string + + // Read-only endpoint of the failover group instance. + ReadOnlyEndpoint *FailoverGroupReadOnlyEndpoint + + // Read-write endpoint of the failover group instance. + ReadWriteEndpoint *FailoverGroupReadWriteEndpoint +} + +// FirewallRule - A server firewall rule. +type FirewallRule struct { + // Resource name. + Name *string + + // Resource properties. + Properties *ServerFirewallRuleProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource type. + Type *string +} + +// FirewallRuleList - A list of server firewall rules. +type FirewallRuleList struct { + Values []*FirewallRule +} + +// FirewallRuleListResult - The response to a list firewall rules request +type FirewallRuleListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*FirewallRule +} + +// GeoBackupPolicy - A database geo backup policy. +type GeoBackupPolicy struct { + // REQUIRED; The properties of the geo backup policy. + Properties *GeoBackupPolicyProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Kind of geo backup policy. This is metadata used for the Azure portal experience. + Kind *string + + // READ-ONLY; Backup policy location. + Location *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// GeoBackupPolicyListResult - The response to a list geo backup policies request. +type GeoBackupPolicyListResult struct { + // The list of geo backup policies. + Value []*GeoBackupPolicy +} + +// GeoBackupPolicyProperties - The properties of the geo backup policy. +type GeoBackupPolicyProperties struct { + // REQUIRED; The state of the geo backup policy. + State *GeoBackupPolicyState + + // READ-ONLY; The storage type of the geo backup policy. + StorageType *string +} + +// IPv6FirewallRule - An IPv6 server firewall rule. +type IPv6FirewallRule struct { + // Resource name. + Name *string + + // Resource properties. + Properties *IPv6ServerFirewallRuleProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource type. + Type *string +} + +// IPv6FirewallRuleListResult - The response to a list IPv6 firewall rules request +type IPv6FirewallRuleListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*IPv6FirewallRule +} + +// IPv6ServerFirewallRuleProperties - The properties of an IPv6 server firewall rule. +type IPv6ServerFirewallRuleProperties struct { + // The end IP address of the firewall rule. Must be IPv6 format. Must be greater than or equal to startIpAddress. + EndIPv6Address *string + + // The start IP address of the firewall rule. Must be IPv6 format. + StartIPv6Address *string +} + +// ImportExistingDatabaseDefinition - Contains the information necessary to perform import operation for existing database. +type ImportExistingDatabaseDefinition struct { + // REQUIRED; Administrator login name. + AdministratorLogin *string + + // REQUIRED; Administrator login password. + AdministratorLoginPassword *string + + // REQUIRED; Storage key. + StorageKey *string + + // REQUIRED; Storage key type. + StorageKeyType *StorageKeyType + + // REQUIRED; Storage Uri. + StorageURI *string + + // Authentication type. + AuthenticationType *string + + // Optional resource information to enable network isolation for request. + NetworkIsolation *NetworkIsolationSettings +} + +// ImportExportExtensionsOperationListResult - Import export operation extensions list. +type ImportExportExtensionsOperationListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*ImportExportExtensionsOperationResult +} + +// ImportExportExtensionsOperationResult - An Extension operation result resource. +type ImportExportExtensionsOperationResult struct { + // Resource properties. + Properties *ImportExportExtensionsOperationResultProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// ImportExportExtensionsOperationResultProperties - Contains the operation result properties for import/export operation. +type ImportExportExtensionsOperationResultProperties struct { + // READ-ONLY; Database name. + DatabaseName *string + + // READ-ONLY; Error message. + ErrorMessage *string + + // READ-ONLY; Last modified time. + LastModifiedTime *string + + // READ-ONLY; Request Id. + RequestID *string + + // READ-ONLY; Request type. + RequestType *string + + // READ-ONLY; Server name. + ServerName *string + + // READ-ONLY; Operation status. + Status *string +} + +// ImportExportOperationResult - An ImportExport operation result resource. +type ImportExportOperationResult struct { + // Resource properties. + Properties *ImportExportOperationResultProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// ImportExportOperationResultProperties - Contains the operation result properties for import/export operation. +type ImportExportOperationResultProperties struct { + // READ-ONLY; Blob Uri. + BlobURI *string + + // READ-ONLY; Database name. + DatabaseName *string + + // READ-ONLY; Error message. + ErrorMessage *string + + // READ-ONLY; Last modified time. + LastModifiedTime *string + + // READ-ONLY; Gets the status of private endpoints associated with this request. + PrivateEndpointConnections []*PrivateEndpointConnectionRequestStatus + + // READ-ONLY; Queued time. + QueuedTime *string + + // READ-ONLY; Request Id. + RequestID *string + + // READ-ONLY; Request type. + RequestType *string + + // READ-ONLY; Server name. + ServerName *string + + // READ-ONLY; Operation status. + Status *string +} + +// ImportNewDatabaseDefinition - Contains the information necessary to perform import operation for new database. +type ImportNewDatabaseDefinition struct { + // REQUIRED; Administrator login name. + AdministratorLogin *string + + // REQUIRED; Administrator login password. + AdministratorLoginPassword *string + + // REQUIRED; Storage key. + StorageKey *string + + // REQUIRED; Storage key type. + StorageKeyType *StorageKeyType + + // REQUIRED; Storage Uri. + StorageURI *string + + // Authentication type. + AuthenticationType *string + + // Name of the import database. + DatabaseName *string + + // Edition of the import database. + Edition *string + + // Max size in bytes for the import database. + MaxSizeBytes *string + + // Optional resource information to enable network isolation for request. + NetworkIsolation *NetworkIsolationSettings + + // Service level objective name of the import database. + ServiceObjectiveName *string +} + +// InstanceFailoverGroup - An instance failover group. +type InstanceFailoverGroup struct { + // Resource properties. + Properties *InstanceFailoverGroupProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// InstanceFailoverGroupListResult - A list of instance failover groups. +type InstanceFailoverGroupListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*InstanceFailoverGroup +} + +// InstanceFailoverGroupProperties - Properties of a instance failover group. +type InstanceFailoverGroupProperties struct { + // REQUIRED; List of managed instance pairs in the failover group. + ManagedInstancePairs []*ManagedInstancePairInfo + + // REQUIRED; Partner region information for the failover group. + PartnerRegions []*PartnerRegionInfo + + // REQUIRED; Read-write endpoint of the failover group instance. + ReadWriteEndpoint *InstanceFailoverGroupReadWriteEndpoint + + // Read-only endpoint of the failover group instance. + ReadOnlyEndpoint *InstanceFailoverGroupReadOnlyEndpoint + + // READ-ONLY; Local replication role of the failover group instance. + ReplicationRole *InstanceFailoverGroupReplicationRole + + // READ-ONLY; Replication state of the failover group instance. + ReplicationState *string +} + +// InstanceFailoverGroupReadOnlyEndpoint - Read-only endpoint of the failover group instance. +type InstanceFailoverGroupReadOnlyEndpoint struct { + // Failover policy of the read-only endpoint for the failover group. + FailoverPolicy *ReadOnlyEndpointFailoverPolicy +} + +// InstanceFailoverGroupReadWriteEndpoint - Read-write endpoint of the failover group instance. +type InstanceFailoverGroupReadWriteEndpoint struct { + // REQUIRED; Failover policy of the read-write endpoint for the failover group. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes + // is required. + FailoverPolicy *ReadWriteEndpointFailoverPolicy + + // Grace period before failover with data loss is attempted for the read-write endpoint. If failoverPolicy is Automatic then + // failoverWithDataLossGracePeriodMinutes is required. + FailoverWithDataLossGracePeriodMinutes *int32 +} + +// InstancePool - An Azure SQL instance pool. +type InstancePool struct { + // REQUIRED; Resource location. + Location *string + + // Resource properties. + Properties *InstancePoolProperties + + // The name and tier of the SKU. + SKU *SKU + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// InstancePoolEditionCapability - The instance pool capability +type InstancePoolEditionCapability struct { + // The reason for the capability not being available. + Reason *string + + // READ-ONLY; The instance pool version name. + Name *string + + // READ-ONLY; The status of the capability. + Status *CapabilityStatus + + // READ-ONLY; The supported families. + SupportedFamilies []*InstancePoolFamilyCapability +} + +// InstancePoolFamilyCapability - The instance pool family capability. +type InstancePoolFamilyCapability struct { + // The reason for the capability not being available. + Reason *string + + // READ-ONLY; Family name. + Name *string + + // READ-ONLY; The status of the capability. + Status *CapabilityStatus + + // READ-ONLY; List of supported license types. + SupportedLicenseTypes []*LicenseTypeCapability + + // READ-ONLY; List of supported virtual cores values. + SupportedVcoresValues []*InstancePoolVcoresCapability +} + +// InstancePoolListResult - A list of Azure SQL instance pools. +type InstancePoolListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*InstancePool +} + +// InstancePoolProperties - Properties of an instance pool. +type InstancePoolProperties struct { + // REQUIRED; The license type. Possible values are 'LicenseIncluded' (price for SQL license is included) and 'BasePrice' (without + // SQL license price). + LicenseType *InstancePoolLicenseType + + // REQUIRED; Resource ID of the subnet to place this instance pool in. + SubnetID *string + + // REQUIRED; Count of vCores belonging to this instance pool. + VCores *int32 +} + +// InstancePoolUpdate - An update to an Instance pool. +type InstancePoolUpdate struct { + // Resource tags. + Tags map[string]*string +} + +// InstancePoolVcoresCapability - The managed instance virtual cores capability. +type InstancePoolVcoresCapability struct { + // The reason for the capability not being available. + Reason *string + + // READ-ONLY; The virtual cores identifier. + Name *string + + // READ-ONLY; The status of the capability. + Status *CapabilityStatus + + // READ-ONLY; Storage limit. + StorageLimit *MaxSizeCapability + + // READ-ONLY; The virtual cores value. + Value *int32 +} + +// Job - A job. +type Job struct { + // Resource properties. + Properties *JobProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// JobAgent - An Azure SQL job agent. +type JobAgent struct { + // REQUIRED; Resource location. + Location *string + + // Resource properties. + Properties *JobAgentProperties + + // The name and tier of the SKU. + SKU *SKU + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// JobAgentListResult - A list of Azure SQL job agents. +type JobAgentListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*JobAgent +} + +// JobAgentProperties - Properties of a job agent. +type JobAgentProperties struct { + // REQUIRED; Resource ID of the database to store job metadata in. + DatabaseID *string + + // READ-ONLY; The state of the job agent. + State *JobAgentState +} + +// JobAgentUpdate - An update to an Azure SQL job agent. +type JobAgentUpdate struct { + // Resource tags. + Tags map[string]*string +} + +// JobCredential - A stored credential that can be used by a job to connect to target databases. +type JobCredential struct { + // Resource properties. + Properties *JobCredentialProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// JobCredentialListResult - A list of job credentials. +type JobCredentialListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*JobCredential +} + +// JobCredentialProperties - Properties of a job credential. +type JobCredentialProperties struct { + // REQUIRED; The credential password. + Password *string + + // REQUIRED; The credential user name. + Username *string +} + +// JobExecution - An execution of a job +type JobExecution struct { + // Resource properties. + Properties *JobExecutionProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// JobExecutionListResult - A list of job executions. +type JobExecutionListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*JobExecution +} + +// JobExecutionProperties - Properties for an Azure SQL Database Elastic job execution. +type JobExecutionProperties struct { + // Number of times the job execution has been attempted. + CurrentAttempts *int32 + + // READ-ONLY; The time that the job execution was created. + CreateTime *time.Time + + // READ-ONLY; Start time of the current attempt. + CurrentAttemptStartTime *time.Time + + // READ-ONLY; The time that the job execution completed. + EndTime *time.Time + + // READ-ONLY; The unique identifier of the job execution. + JobExecutionID *string + + // READ-ONLY; The job version number. + JobVersion *int32 + + // READ-ONLY; The last status or error message. + LastMessage *string + + // READ-ONLY; The detailed state of the job execution. + Lifecycle *JobExecutionLifecycle + + // READ-ONLY; The ARM provisioning state of the job execution. + ProvisioningState *ProvisioningState + + // READ-ONLY; The time that the job execution started. + StartTime *time.Time + + // READ-ONLY; The job step id. + StepID *int32 + + // READ-ONLY; The job step name. + StepName *string + + // READ-ONLY; The target that this execution is executed on. + Target *JobExecutionTarget +} + +// JobExecutionTarget - The target that a job execution is executed on. +type JobExecutionTarget struct { + // READ-ONLY; The database name. + DatabaseName *string + + // READ-ONLY; The server name. + ServerName *string + + // READ-ONLY; The type of the target. + Type *JobTargetType +} + +// JobListResult - A list of jobs. +type JobListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*Job +} + +// JobProperties - Properties of a job. +type JobProperties struct { + // User-defined description of the job. + Description *string + + // Schedule properties of the job. + Schedule *JobSchedule + + // READ-ONLY; The job version number. + Version *int32 +} + +// JobSchedule - Scheduling properties of a job. +type JobSchedule struct { + // Whether or not the schedule is enabled. + Enabled *bool + + // Schedule end time. + EndTime *time.Time + + // Value of the schedule's recurring interval, if the ScheduleType is recurring. ISO8601 duration format. + Interval *string + + // Schedule start time. + StartTime *time.Time + + // Schedule interval type + Type *JobScheduleType +} + +// JobStep - A job step. +type JobStep struct { + // Resource properties. + Properties *JobStepProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// JobStepAction - The action to be executed by a job step. +type JobStepAction struct { + // REQUIRED; The action value, for example the text of the T-SQL script to execute. + Value *string + + // The source of the action to execute. + Source *JobStepActionSource + + // Type of action being executed by the job step. + Type *JobStepActionType +} + +// JobStepExecutionOptions - The execution options of a job step. +type JobStepExecutionOptions struct { + // Initial delay between retries for job step execution. + InitialRetryIntervalSeconds *int32 + + // The maximum amount of time to wait between retries for job step execution. + MaximumRetryIntervalSeconds *int32 + + // Maximum number of times the job step will be reattempted if the first attempt fails. + RetryAttempts *int32 + + // The backoff multiplier for the time between retries. + RetryIntervalBackoffMultiplier *float32 + + // Execution timeout for the job step. + TimeoutSeconds *int32 +} + +// JobStepListResult - A list of job steps. +type JobStepListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*JobStep +} + +// JobStepOutput - The output configuration of a job step. +type JobStepOutput struct { + // REQUIRED; The resource ID of the credential to use to connect to the output destination. + Credential *string + + // REQUIRED; The output destination database. + DatabaseName *string + + // REQUIRED; The output destination server name. + ServerName *string + + // REQUIRED; The output destination table. + TableName *string + + // The output destination resource group. + ResourceGroupName *string + + // The output destination schema. + SchemaName *string + + // The output destination subscription id. + SubscriptionID *string + + // The output destination type. + Type *JobStepOutputType +} + +// JobStepProperties - Properties of a job step. +type JobStepProperties struct { + // REQUIRED; The action payload of the job step. + Action *JobStepAction + + // REQUIRED; The resource ID of the job credential that will be used to connect to the targets. + Credential *string + + // REQUIRED; The resource ID of the target group that the job step will be executed on. + TargetGroup *string + + // Execution options for the job step. + ExecutionOptions *JobStepExecutionOptions + + // Output destination properties of the job step. + Output *JobStepOutput + + // The job step's index within the job. If not specified when creating the job step, it will be created as the last step. + // If not specified when updating the job step, the step id is not modified. + StepID *int32 +} + +// JobTarget - A job target, for example a specific database or a container of databases that is evaluated during job execution. +type JobTarget struct { + // REQUIRED; The target type. + Type *JobTargetType + + // The target database name. + DatabaseName *string + + // The target elastic pool name. + ElasticPoolName *string + + // Whether the target is included or excluded from the group. + MembershipType *JobTargetGroupMembershipType + + // The resource ID of the credential that is used during job execution to connect to the target and determine the list of + // databases inside the target. + RefreshCredential *string + + // The target server name. + ServerName *string + + // The target shard map. + ShardMapName *string +} + +// JobTargetGroup - A group of job targets. +type JobTargetGroup struct { + // Resource properties. + Properties *JobTargetGroupProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// JobTargetGroupListResult - A list of target groups. +type JobTargetGroupListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*JobTargetGroup +} + +// JobTargetGroupProperties - Properties of job target group. +type JobTargetGroupProperties struct { + // REQUIRED; Members of the target group. + Members []*JobTarget +} + +// JobVersion - A job version. +type JobVersion struct { + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// JobVersionListResult - A list of job versions. +type JobVersionListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*JobVersion +} + +// LedgerDigestUploads - Azure SQL Database ledger digest upload settings. +type LedgerDigestUploads struct { + // Resource properties. + Properties *LedgerDigestUploadsProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// LedgerDigestUploadsListResult - A list of ledger digest upload settings. +type LedgerDigestUploadsListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*LedgerDigestUploads +} + +// LedgerDigestUploadsProperties - The properties of a database ledger digest upload settings. +type LedgerDigestUploadsProperties struct { + // The digest storage endpoint, which must be either an Azure blob storage endpoint or an URI for Azure Confidential Ledger. + DigestStorageEndpoint *string + + // READ-ONLY; Specifies the state of ledger digest upload. + State *LedgerDigestUploadsState +} + +// LicenseTypeCapability - The license type capability +type LicenseTypeCapability struct { + // The reason for the capability not being available. + Reason *string + + // READ-ONLY; License type identifier. + Name *string + + // READ-ONLY; The status of the capability. + Status *CapabilityStatus +} + +// LocationCapabilities - The location capability. +type LocationCapabilities struct { + // The reason for the capability not being available. + Reason *string + + // READ-ONLY; The location name. + Name *string + + // READ-ONLY; The status of the capability. + Status *CapabilityStatus + + // READ-ONLY; The list of supported managed instance versions. + SupportedManagedInstanceVersions []*ManagedInstanceVersionCapability + + // READ-ONLY; The list of supported server versions. + SupportedServerVersions []*ServerVersionCapability +} + +// LogSizeCapability - The log size capability. +type LogSizeCapability struct { + // READ-ONLY; The log size limit (see 'unit' for the units). + Limit *int32 + + // READ-ONLY; The units that the limit is expressed in. + Unit *LogSizeUnit +} + +// LogicalDatabaseTransparentDataEncryption - A logical database transparent data encryption state. +type LogicalDatabaseTransparentDataEncryption struct { + // Resource properties. + Properties *TransparentDataEncryptionProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// LogicalDatabaseTransparentDataEncryptionListResult - A list of transparent data encryptions +type LogicalDatabaseTransparentDataEncryptionListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*LogicalDatabaseTransparentDataEncryption +} + +// LogicalServerAdvancedThreatProtectionListResult - A list of the server's Advanced Threat Protection configurations. +type LogicalServerAdvancedThreatProtectionListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*ServerAdvancedThreatProtection +} + +// LogicalServerSecurityAlertPolicyListResult - A list of the server's security alert policies. +type LogicalServerSecurityAlertPolicyListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*ServerSecurityAlertPolicy +} + +// LongTermRetentionBackup - A long term retention backup. +type LongTermRetentionBackup struct { + // Resource properties. + Properties *LongTermRetentionBackupProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// LongTermRetentionBackupListResult - A list of long term retention backups. +type LongTermRetentionBackupListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*LongTermRetentionBackup +} + +// LongTermRetentionBackupOperationResult - A LongTermRetentionBackup operation result resource. +type LongTermRetentionBackupOperationResult struct { + // Resource properties. + Properties *LongTermRetentionOperationResultProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// LongTermRetentionBackupProperties - Properties of a long term retention backup +type LongTermRetentionBackupProperties struct { + // The storage redundancy type of the backup + RequestedBackupStorageRedundancy *BackupStorageRedundancy + + // READ-ONLY; The time the long term retention backup will expire. + BackupExpirationTime *time.Time + + // READ-ONLY; The storage redundancy type of the backup + BackupStorageRedundancy *BackupStorageRedundancy + + // READ-ONLY; The time the backup was taken + BackupTime *time.Time + + // READ-ONLY; The delete time of the database + DatabaseDeletionTime *time.Time + + // READ-ONLY; The name of the database the backup belong to + DatabaseName *string + + // READ-ONLY; The create time of the server. + ServerCreateTime *time.Time + + // READ-ONLY; The server name that the backup database belong to. + ServerName *string +} + +// LongTermRetentionOperationResultProperties - Contains the operation result properties for long term retention backup operation. +type LongTermRetentionOperationResultProperties struct { + // READ-ONLY; Source backup resource id + FromBackupResourceID *string + + // READ-ONLY; Progress message + Message *string + + // READ-ONLY; Operation type. + OperationType *string + + // READ-ONLY; Request Id. + RequestID *string + + // READ-ONLY; Operation status + Status *string + + // READ-ONLY; The storage redundancy type of the copied backup + TargetBackupStorageRedundancy *BackupStorageRedundancy + + // READ-ONLY; Target backup resource id + ToBackupResourceID *string +} + +// LongTermRetentionPolicy - A long term retention policy. +type LongTermRetentionPolicy struct { + // Resource properties. + Properties *BaseLongTermRetentionPolicyProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// LongTermRetentionPolicyListResult - A list of long term retention policies. +type LongTermRetentionPolicyListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*LongTermRetentionPolicy +} + +// MaintenanceConfigurationCapability - The maintenance configuration capability +type MaintenanceConfigurationCapability struct { + // The reason for the capability not being available. + Reason *string + + // READ-ONLY; Maintenance configuration name + Name *string + + // READ-ONLY; The status of the capability. + Status *CapabilityStatus + + // READ-ONLY; Whether or not zone redundancy is supported for the maintenance configuration. + ZoneRedundant *bool +} + +// MaintenanceWindowOptions - Maintenance window options. +type MaintenanceWindowOptions struct { + // Resource properties. + Properties *MaintenanceWindowOptionsProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// MaintenanceWindowOptionsProperties - Maintenance window options properties. +type MaintenanceWindowOptionsProperties struct { + // Whether we allow multiple maintenance windows per cycle. + AllowMultipleMaintenanceWindowsPerCycle *bool + + // Default duration for maintenance window. + DefaultDurationInMinutes *int32 + + // Whether maintenance windows are enabled for the database. + IsEnabled *bool + + // Available maintenance cycles e.g. {Saturday, 0, 4860}, {Wednesday, 0, 2460}. + MaintenanceWindowCycles []*MaintenanceWindowTimeRange + + // Minimum number of maintenance windows cycles to be set on the database. + MinCycles *int32 + + // Minimum duration of maintenance window. + MinDurationInMinutes *int32 + + // Time granularity in minutes for maintenance windows. + TimeGranularityInMinutes *int32 +} + +// MaintenanceWindowTimeRange - Maintenance window time range. +type MaintenanceWindowTimeRange struct { + // Day of maintenance window. + DayOfWeek *DayOfWeek + + // Duration of maintenance window in minutes. + Duration *string + + // Start time minutes offset from 12am. + StartTime *string +} + +// MaintenanceWindows - Maintenance windows. +type MaintenanceWindows struct { + // Resource properties. + Properties *MaintenanceWindowsProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// MaintenanceWindowsProperties - Maintenance windows resource properties. +type MaintenanceWindowsProperties struct { + TimeRanges []*MaintenanceWindowTimeRange +} + +// ManagedBackupShortTermRetentionPolicy - A short term retention policy. +type ManagedBackupShortTermRetentionPolicy struct { + // Resource properties. + Properties *ManagedBackupShortTermRetentionPolicyProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// ManagedBackupShortTermRetentionPolicyListResult - A list of short term retention policies. +type ManagedBackupShortTermRetentionPolicyListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*ManagedBackupShortTermRetentionPolicy +} + +// ManagedBackupShortTermRetentionPolicyProperties - Properties of a short term retention policy +type ManagedBackupShortTermRetentionPolicyProperties struct { + // The backup retention period in days. This is how many days Point-in-Time Restore will be supported. + RetentionDays *int32 +} + +// ManagedDatabase - A managed database resource. +type ManagedDatabase struct { + // REQUIRED; Resource location. + Location *string + + // Resource properties. + Properties *ManagedDatabaseProperties + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// ManagedDatabaseListResult - A list of managed databases. +type ManagedDatabaseListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*ManagedDatabase +} + +// ManagedDatabaseProperties - The managed database's properties. +type ManagedDatabaseProperties struct { + // Whether to auto complete restore of this managed database. + AutoCompleteRestore *bool + + // Collation of the metadata catalog. + CatalogCollation *CatalogCollationType + + // Collation of the managed database. + Collation *string + + // Managed database create mode. PointInTimeRestore: Create a database by restoring a point in time backup of an existing + // database. SourceDatabaseName, SourceManagedInstanceName and PointInTime must be + // specified. RestoreExternalBackup: Create a database by restoring from external backup files. Collation, StorageContainerUri + // and StorageContainerSasToken must be specified. Recovery: Creates a database + // by restoring a geo-replicated backup. RecoverableDatabaseId must be specified as the recoverable database resource ID to + // restore. RestoreLongTermRetentionBackup: Create a database by restoring from a + // long term retention backup (longTermRetentionBackupResourceId required). + CreateMode *ManagedDatabaseCreateMode + + // Last backup file name for restore of this managed database. + LastBackupName *string + + // The name of the Long Term Retention backup to be used for restore of this managed database. + LongTermRetentionBackupResourceID *string + + // The resource identifier of the recoverable database associated with create operation of this database. + RecoverableDatabaseID *string + + // The restorable dropped database resource id to restore when creating this database. + RestorableDroppedDatabaseID *string + + // Conditional. If createMode is PointInTimeRestore, this value is required. Specifies the point in time (ISO8601 format) + // of the source database that will be restored to create the new database. + RestorePointInTime *time.Time + + // The resource identifier of the source database associated with create operation of this database. + SourceDatabaseID *string + + // Conditional. If createMode is RestoreExternalBackup, this value is required. Specifies the storage container sas token. + StorageContainerSasToken *string + + // Conditional. If createMode is RestoreExternalBackup, this value is required. Specifies the uri of the storage container + // where backups for this restore are stored. + StorageContainerURI *string + + // READ-ONLY; Creation date of the database. + CreationDate *time.Time + + // READ-ONLY; Geo paired region. + DefaultSecondaryLocation *string + + // READ-ONLY; Earliest restore point in time for point in time restore. + EarliestRestorePoint *time.Time + + // READ-ONLY; Instance Failover Group resource identifier that this managed database belongs to. + FailoverGroupID *string + + // READ-ONLY; Status of the database. + Status *ManagedDatabaseStatus +} + +// ManagedDatabaseRestoreDetailsProperties - The managed database's restore details properties. +type ManagedDatabaseRestoreDetailsProperties struct { + // READ-ONLY; The reason why restore is in Blocked state. + BlockReason *string + + // READ-ONLY; Current restoring file name. + CurrentRestoringFileName *string + + // READ-ONLY; Last restored file name. + LastRestoredFileName *string + + // READ-ONLY; Last restored file time. + LastRestoredFileTime *time.Time + + // READ-ONLY; Last uploaded file name. + LastUploadedFileName *string + + // READ-ONLY; Last uploaded file time. + LastUploadedFileTime *time.Time + + // READ-ONLY; Number of files detected. + NumberOfFilesDetected *int64 + + // READ-ONLY; Percent completed. + PercentCompleted *float64 + + // READ-ONLY; Restore status. + Status *string + + // READ-ONLY; List of unrestorable files. + UnrestorableFiles []*string +} + +// ManagedDatabaseRestoreDetailsResult - A managed database restore details. +type ManagedDatabaseRestoreDetailsResult struct { + // Resource properties. + Properties *ManagedDatabaseRestoreDetailsProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// ManagedDatabaseSecurityAlertPolicy - A managed database security alert policy. +type ManagedDatabaseSecurityAlertPolicy struct { + // Resource properties. + Properties *SecurityAlertPolicyProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// ManagedDatabaseSecurityAlertPolicyListResult - A list of the managed database's security alert policies. +type ManagedDatabaseSecurityAlertPolicyListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*ManagedDatabaseSecurityAlertPolicy +} + +// ManagedDatabaseUpdate - An managed database update. +type ManagedDatabaseUpdate struct { + // Resource properties. + Properties *ManagedDatabaseProperties + + // Resource tags. + Tags map[string]*string +} + +// ManagedInstance - An Azure SQL managed instance. +type ManagedInstance struct { + // REQUIRED; Resource location. + Location *string + + // The Azure Active Directory identity of the managed instance. + Identity *ResourceIdentity + + // Resource properties. + Properties *ManagedInstanceProperties + + // Managed instance SKU. Allowed values for sku.name: GPGen4, GPGen5, BCGen4, BCGen5 + SKU *SKU + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// ManagedInstanceAdministrator - An Azure SQL managed instance administrator. +type ManagedInstanceAdministrator struct { + // Resource properties. + Properties *ManagedInstanceAdministratorProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// ManagedInstanceAdministratorListResult - A list of managed instance administrators. +type ManagedInstanceAdministratorListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*ManagedInstanceAdministrator +} + +// ManagedInstanceAdministratorProperties - The properties of a managed instance administrator. +type ManagedInstanceAdministratorProperties struct { + // REQUIRED; Type of the managed instance administrator. + AdministratorType *ManagedInstanceAdministratorType + + // REQUIRED; Login name of the managed instance administrator. + Login *string + + // REQUIRED; SID (object ID) of the managed instance administrator. + Sid *string + + // Tenant ID of the managed instance administrator. + TenantID *string +} + +// ManagedInstanceAzureADOnlyAuthListResult - A list of active directory only authentications. +type ManagedInstanceAzureADOnlyAuthListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*ManagedInstanceAzureADOnlyAuthentication +} + +// ManagedInstanceAzureADOnlyAuthProperties - Properties of a active directory only authentication for Managed Instance. +type ManagedInstanceAzureADOnlyAuthProperties struct { + // REQUIRED; Azure Active Directory only Authentication enabled. + AzureADOnlyAuthentication *bool +} + +// ManagedInstanceAzureADOnlyAuthentication - Azure Active Directory only authentication. +type ManagedInstanceAzureADOnlyAuthentication struct { + // Resource properties. + Properties *ManagedInstanceAzureADOnlyAuthProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// ManagedInstanceEditionCapability - The managed server capability +type ManagedInstanceEditionCapability struct { + // The reason for the capability not being available. + Reason *string + + // READ-ONLY; The managed server version name. + Name *string + + // READ-ONLY; The status of the capability. + Status *CapabilityStatus + + // READ-ONLY; The supported families. + SupportedFamilies []*ManagedInstanceFamilyCapability + + // READ-ONLY; The list of supported storage capabilities for this edition + SupportedStorageCapabilities []*StorageCapability + + // READ-ONLY; Whether or not zone redundancy is supported for the edition. + ZoneRedundant *bool +} + +// ManagedInstanceEncryptionProtector - The managed instance encryption protector. +type ManagedInstanceEncryptionProtector struct { + // Resource properties. + Properties *ManagedInstanceEncryptionProtectorProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Kind of encryption protector. This is metadata used for the Azure portal experience. + Kind *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// ManagedInstanceEncryptionProtectorListResult - A list of managed instance encryption protectors. +type ManagedInstanceEncryptionProtectorListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*ManagedInstanceEncryptionProtector +} + +// ManagedInstanceEncryptionProtectorProperties - Properties for an encryption protector execution. +type ManagedInstanceEncryptionProtectorProperties struct { + // REQUIRED; The encryption protector type like 'ServiceManaged', 'AzureKeyVault'. + ServerKeyType *ServerKeyType + + // Key auto rotation opt-in flag. Either true or false. + AutoRotationEnabled *bool + + // The name of the managed instance key. + ServerKeyName *string + + // READ-ONLY; Thumbprint of the server key. + Thumbprint *string + + // READ-ONLY; The URI of the server key. + URI *string +} + +// ManagedInstanceExternalAdministrator - Properties of a active directory administrator. +type ManagedInstanceExternalAdministrator struct { + // Type of the sever administrator. + AdministratorType *AdministratorType + + // Azure Active Directory only Authentication enabled. + AzureADOnlyAuthentication *bool + + // Login name of the server administrator. + Login *string + + // Principal Type of the sever administrator. + PrincipalType *PrincipalType + + // SID (object ID) of the server administrator. + Sid *string + + // Tenant ID of the administrator. + TenantID *string +} + +// ManagedInstanceFamilyCapability - The managed server family capability. +type ManagedInstanceFamilyCapability struct { + // The reason for the capability not being available. + Reason *string + + // READ-ONLY; Family name. + Name *string + + // READ-ONLY; SKU name. + SKU *string + + // READ-ONLY; The status of the capability. + Status *CapabilityStatus + + // READ-ONLY; List of supported license types. + SupportedLicenseTypes []*LicenseTypeCapability + + // READ-ONLY; List of supported virtual cores values. + SupportedVcoresValues []*ManagedInstanceVcoresCapability +} + +// ManagedInstanceKey - A managed instance key. +type ManagedInstanceKey struct { + // Resource properties. + Properties *ManagedInstanceKeyProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Kind of encryption protector. This is metadata used for the Azure portal experience. + Kind *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// ManagedInstanceKeyListResult - A list of managed instance keys. +type ManagedInstanceKeyListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*ManagedInstanceKey +} + +// ManagedInstanceKeyProperties - Properties for a key execution. +type ManagedInstanceKeyProperties struct { + // REQUIRED; The key type like 'ServiceManaged', 'AzureKeyVault'. + ServerKeyType *ServerKeyType + + // The URI of the key. If the ServerKeyType is AzureKeyVault, then the URI is required. + URI *string + + // READ-ONLY; Key auto rotation opt-in flag. Either true or false. + AutoRotationEnabled *bool + + // READ-ONLY; The key creation date. + CreationDate *time.Time + + // READ-ONLY; Thumbprint of the key. + Thumbprint *string +} + +// ManagedInstanceListResult - A list of managed instances. +type ManagedInstanceListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*ManagedInstance +} + +// ManagedInstanceLongTermRetentionBackup - A long term retention backup for a managed database. +type ManagedInstanceLongTermRetentionBackup struct { + // Resource properties. + Properties *ManagedInstanceLongTermRetentionBackupProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// ManagedInstanceLongTermRetentionBackupListResult - A list of long term retention backups for managed database(s). +type ManagedInstanceLongTermRetentionBackupListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*ManagedInstanceLongTermRetentionBackup +} + +// ManagedInstanceLongTermRetentionBackupProperties - Properties of a long term retention backup +type ManagedInstanceLongTermRetentionBackupProperties struct { + // READ-ONLY; The time the long term retention backup will expire. + BackupExpirationTime *time.Time + + // READ-ONLY; The storage redundancy type of the backup + BackupStorageRedundancy *BackupStorageRedundancy + + // READ-ONLY; The time the backup was taken + BackupTime *time.Time + + // READ-ONLY; The delete time of the database + DatabaseDeletionTime *time.Time + + // READ-ONLY; The name of the database the backup belong to + DatabaseName *string + + // READ-ONLY; The create time of the instance. + ManagedInstanceCreateTime *time.Time + + // READ-ONLY; The managed instance that the backup database belongs to. + ManagedInstanceName *string +} + +// ManagedInstanceLongTermRetentionPolicy - A long term retention policy. +type ManagedInstanceLongTermRetentionPolicy struct { + // Resource properties. + Properties *BaseLongTermRetentionPolicyProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// ManagedInstanceLongTermRetentionPolicyListResult - A list of long term retention policies. +type ManagedInstanceLongTermRetentionPolicyListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*ManagedInstanceLongTermRetentionPolicy +} + +// ManagedInstanceMaintenanceConfigurationCapability - The maintenance configuration capability +type ManagedInstanceMaintenanceConfigurationCapability struct { + // The reason for the capability not being available. + Reason *string + + // READ-ONLY; Maintenance configuration name + Name *string + + // READ-ONLY; The status of the capability. + Status *CapabilityStatus +} + +// ManagedInstanceOperation - A managed instance operation. +type ManagedInstanceOperation struct { + // Resource properties. + Properties *ManagedInstanceOperationProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// ManagedInstanceOperationListResult - The response to a list managed instance operations request +type ManagedInstanceOperationListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*ManagedInstanceOperation +} + +// ManagedInstanceOperationParametersPair - The parameters of a managed instance operation. +type ManagedInstanceOperationParametersPair struct { + // READ-ONLY; The current parameters. + CurrentParameters *UpsertManagedServerOperationParameters + + // READ-ONLY; The requested parameters. + RequestedParameters *UpsertManagedServerOperationParameters +} + +// ManagedInstanceOperationProperties - The properties of a managed instance operation. +type ManagedInstanceOperationProperties struct { + // READ-ONLY; The operation description. + Description *string + + // READ-ONLY; The operation error code. + ErrorCode *int32 + + // READ-ONLY; The operation error description. + ErrorDescription *string + + // READ-ONLY; The operation error severity. + ErrorSeverity *int32 + + // READ-ONLY; The estimated completion time of the operation. + EstimatedCompletionTime *time.Time + + // READ-ONLY; Whether the operation can be cancelled. + IsCancellable *bool + + // READ-ONLY; Whether or not the error is a user error. + IsUserError *bool + + // READ-ONLY; The name of the managed instance the operation is being performed on. + ManagedInstanceName *string + + // READ-ONLY; The name of operation. + Operation *string + + // READ-ONLY; The friendly name of operation. + OperationFriendlyName *string + + // READ-ONLY; The operation parameters. + OperationParameters *ManagedInstanceOperationParametersPair + + // READ-ONLY; The operation steps. + OperationSteps *ManagedInstanceOperationSteps + + // READ-ONLY; The percentage of the operation completed. + PercentComplete *int32 + + // READ-ONLY; The operation start time. + StartTime *time.Time + + // READ-ONLY; The operation state. + State *ManagementOperationState +} + +// ManagedInstanceOperationSteps - The steps of a managed instance operation. +type ManagedInstanceOperationSteps struct { + // READ-ONLY; The number of current operation steps. + CurrentStep *int32 + + // READ-ONLY; The operation steps list. + StepsList []*UpsertManagedServerOperationStep + + // READ-ONLY; The total number of operation steps. + TotalSteps *string +} + +// ManagedInstancePairInfo - Pairs of Managed Instances in the failover group. +type ManagedInstancePairInfo struct { + // Id of Partner Managed Instance in pair. + PartnerManagedInstanceID *string + + // Id of Primary Managed Instance in pair. + PrimaryManagedInstanceID *string +} + +// ManagedInstancePecProperty - A private endpoint connection under a managed instance +type ManagedInstancePecProperty struct { + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Private endpoint connection properties + Properties *ManagedInstancePrivateEndpointConnectionProperties +} + +// ManagedInstancePrivateEndpointConnection - A private endpoint connection +type ManagedInstancePrivateEndpointConnection struct { + // Resource properties. + Properties *ManagedInstancePrivateEndpointConnectionProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// ManagedInstancePrivateEndpointConnectionListResult - A list of private endpoint connections. +type ManagedInstancePrivateEndpointConnectionListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*ManagedInstancePrivateEndpointConnection +} + +// ManagedInstancePrivateEndpointConnectionProperties - Properties of a private endpoint connection. +type ManagedInstancePrivateEndpointConnectionProperties struct { + // Private endpoint which the connection belongs to. + PrivateEndpoint *ManagedInstancePrivateEndpointProperty + + // Connection State of the Private Endpoint Connection. + PrivateLinkServiceConnectionState *ManagedInstancePrivateLinkServiceConnectionStateProperty + + // READ-ONLY; State of the Private Endpoint Connection. + ProvisioningState *string +} + +type ManagedInstancePrivateEndpointProperty struct { + // Resource id of the private endpoint. + ID *string +} + +// ManagedInstancePrivateLink - A private link resource +type ManagedInstancePrivateLink struct { + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; The private link resource group id. + Properties *ManagedInstancePrivateLinkProperties + + // READ-ONLY; Resource type. + Type *string +} + +// ManagedInstancePrivateLinkListResult - A list of private link resources +type ManagedInstancePrivateLinkListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*ManagedInstancePrivateLink +} + +// ManagedInstancePrivateLinkProperties - Properties of a private link resource. +type ManagedInstancePrivateLinkProperties struct { + // READ-ONLY; The private link resource group id. + GroupID *string + + // READ-ONLY; The private link resource required member names. + RequiredMembers []*string +} + +type ManagedInstancePrivateLinkServiceConnectionStateProperty struct { + // REQUIRED; The private link service connection description. + Description *string + + // REQUIRED; The private link service connection status. + Status *string + + // READ-ONLY; The private link service connection description. + ActionsRequired *string +} + +// ManagedInstanceProperties - The properties of a managed instance. +type ManagedInstanceProperties struct { + // Administrator username for the managed instance. Can only be specified when the managed instance is being created (and + // is required for creation). + AdministratorLogin *string + + // The administrator login password (required for managed instance creation). + AdministratorLoginPassword *string + + // The Azure Active Directory administrator of the server. + Administrators *ManagedInstanceExternalAdministrator + + // Collation of the managed instance. + Collation *string + + // The resource id of another managed instance whose DNS zone this managed instance will share after creation. + DNSZonePartner *string + + // The Id of the instance pool this managed server belongs to. + InstancePoolID *string + + // A CMK URI of the key to use for encryption. + KeyID *string + + // The license type. Possible values are 'LicenseIncluded' (regular price inclusive of a new SQL license) and 'BasePrice' + // (discounted AHB price for bringing your own SQL licenses). + LicenseType *ManagedInstanceLicenseType + + // Specifies maintenance configuration id to apply to this managed instance. + MaintenanceConfigurationID *string + + // Specifies the mode of database creation. + // Default: Regular instance creation. + // Restore: Creates an instance by restoring a set of backups to specific point in time. RestorePointInTime and SourceManagedInstanceId + // must be specified. + ManagedInstanceCreateMode *ManagedServerCreateMode + + // Minimal TLS version. Allowed values: 'None', '1.0', '1.1', '1.2' + MinimalTLSVersion *string + + // The resource id of a user assigned identity to be used by default. + PrimaryUserAssignedIdentityID *string + + // Connection type used for connecting to the instance. + ProxyOverride *ManagedInstanceProxyOverride + + // Whether or not the public data endpoint is enabled. + PublicDataEndpointEnabled *bool + + // The storage account type to be used to store backups for this instance. The options are Local (LocallyRedundantStorage), + // Zone (ZoneRedundantStorage), Geo (GeoRedundantStorage) and + // GeoZone(GeoZoneRedundantStorage) + RequestedBackupStorageRedundancy *BackupStorageRedundancy + + // Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database. + RestorePointInTime *time.Time + + // The managed instance's service principal. + ServicePrincipal *ServicePrincipal + + // The resource identifier of the source managed instance associated with create operation of this instance. + SourceManagedInstanceID *string + + // Storage size in GB. Minimum value: 32. Maximum value: 8192. Increments of 32 GB allowed only. + StorageSizeInGB *int32 + + // Subnet resource ID for the managed instance. + SubnetID *string + + // Id of the timezone. Allowed values are timezones supported by Windows. Windows keeps details on supported timezones, including + // the id, in registry under KEYLOCALMACHINE\SOFTWARE\Microsoft\Windows + // NT\CurrentVersion\Time Zones. You can get those registry values via SQL Server by querying SELECT name AS timezoneid FROM + // sys.timezone_info. List of Ids can also be obtained by executing + // [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. An example of valid timezone id is "Pacific Standard Time" or + // "W. Europe Standard Time". + TimezoneID *string + + // The number of vCores. Allowed values: 8, 16, 24, 32, 40, 64, 80. + VCores *int32 + + // Whether or not the multi-az is enabled. + ZoneRedundant *bool + + // READ-ONLY; The storage account type used to store backups for this instance. The options are Local (LocallyRedundantStorage), + // Zone (ZoneRedundantStorage), Geo (GeoRedundantStorage) and + // GeoZone(GeoZoneRedundantStorage) + CurrentBackupStorageRedundancy *BackupStorageRedundancy + + // READ-ONLY; The Dns Zone that the managed instance is in. + DNSZone *string + + // READ-ONLY; The fully qualified domain name of the managed instance. + FullyQualifiedDomainName *string + + // READ-ONLY; List of private endpoint connections on a managed instance. + PrivateEndpointConnections []*ManagedInstancePecProperty + + // READ-ONLY + ProvisioningState *ManagedInstancePropertiesProvisioningState + + // READ-ONLY; The state of the managed instance. + State *string +} + +// ManagedInstanceQuery - Database query. +type ManagedInstanceQuery struct { + // Resource properties. + Properties *QueryProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// ManagedInstanceQueryStatistics - Execution statistics for one particular query +type ManagedInstanceQueryStatistics struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*QueryStatistics +} + +// ManagedInstanceUpdate - An update request for an Azure SQL Database managed instance. +type ManagedInstanceUpdate struct { + // Managed instance identity + Identity *ResourceIdentity + + // Resource properties. + Properties *ManagedInstanceProperties + + // Managed instance sku + SKU *SKU + + // Resource tags. + Tags map[string]*string +} + +// ManagedInstanceVcoresCapability - The managed instance virtual cores capability. +type ManagedInstanceVcoresCapability struct { + // The reason for the capability not being available. + Reason *string + + // READ-ONLY; Included size. + IncludedMaxSize *MaxSizeCapability + + // READ-ONLY; True if this service objective is supported for managed instances in an instance pool. + InstancePoolSupported *bool + + // READ-ONLY; The virtual cores identifier. + Name *string + + // READ-ONLY; True if this service objective is supported for standalone managed instances. + StandaloneSupported *bool + + // READ-ONLY; The status of the capability. + Status *CapabilityStatus + + // READ-ONLY; List of supported maintenance configurations + SupportedMaintenanceConfigurations []*ManagedInstanceMaintenanceConfigurationCapability + + // READ-ONLY; Storage size ranges. + SupportedStorageSizes []*MaxSizeRangeCapability + + // READ-ONLY; The virtual cores value. + Value *int32 +} + +// ManagedInstanceVersionCapability - The managed instance capability +type ManagedInstanceVersionCapability struct { + // The reason for the capability not being available. + Reason *string + + // READ-ONLY; The server version name. + Name *string + + // READ-ONLY; The status of the capability. + Status *CapabilityStatus + + // READ-ONLY; The list of supported managed instance editions. + SupportedEditions []*ManagedInstanceEditionCapability + + // READ-ONLY; The list of supported instance pool editions. + SupportedInstancePoolEditions []*InstancePoolEditionCapability +} + +// ManagedInstanceVulnerabilityAssessment - A managed instance vulnerability assessment. +type ManagedInstanceVulnerabilityAssessment struct { + // Resource properties. + Properties *ManagedInstanceVulnerabilityAssessmentProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// ManagedInstanceVulnerabilityAssessmentListResult - A list of the ManagedInstance's vulnerability assessments. +type ManagedInstanceVulnerabilityAssessmentListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*ManagedInstanceVulnerabilityAssessment +} + +// ManagedInstanceVulnerabilityAssessmentProperties - Properties of a managed instance vulnerability assessment. +type ManagedInstanceVulnerabilityAssessmentProperties struct { + // REQUIRED; A blob storage container path to hold the scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/). + StorageContainerPath *string + + // The recurring scans settings + RecurringScans *VulnerabilityAssessmentRecurringScansProperties + + // Specifies the identifier key of the storage account for vulnerability assessment scan results. If 'StorageContainerSasKey' + // isn't specified, storageAccountAccessKey is required. Applies only if the + // storage account is not behind a Vnet or a firewall + StorageAccountAccessKey *string + + // A shared access signature (SAS Key) that has write access to the blob container specified in 'storageContainerPath' parameter. + // If 'storageAccountAccessKey' isn't specified, StorageContainerSasKey is + // required. Applies only if the storage account is not behind a Vnet or a firewall + StorageContainerSasKey *string +} + +// ManagedServerSecurityAlertPolicy - A managed server security alert policy. +type ManagedServerSecurityAlertPolicy struct { + // Resource properties. + Properties *SecurityAlertsPolicyProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; SystemData of SecurityAlertPolicyResource. + SystemData *SystemData + + // READ-ONLY; Resource type. + Type *string +} + +// ManagedServerSecurityAlertPolicyListResult - A list of the managed Server's security alert policies. +type ManagedServerSecurityAlertPolicyListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*ManagedServerSecurityAlertPolicy +} + +// ManagedTransparentDataEncryption - A managed database transparent data encryption state. +type ManagedTransparentDataEncryption struct { + // Resource properties. + Properties *ManagedTransparentDataEncryptionProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// ManagedTransparentDataEncryptionListResult - A list of managed transparent data encryptions +type ManagedTransparentDataEncryptionListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*ManagedTransparentDataEncryption +} + +// ManagedTransparentDataEncryptionProperties - Properties of a transparent data encryption. +type ManagedTransparentDataEncryptionProperties struct { + // REQUIRED; Specifies the state of the transparent data encryption. + State *TransparentDataEncryptionState +} + +// MaxSizeCapability - The maximum size capability. +type MaxSizeCapability struct { + // READ-ONLY; The maximum size limit (see 'unit' for the units). + Limit *int32 + + // READ-ONLY; The units that the limit is expressed in. + Unit *MaxSizeUnit +} + +// MaxSizeRangeCapability - The maximum size range capability. +type MaxSizeRangeCapability struct { + // The reason for the capability not being available. + Reason *string + + // READ-ONLY; Size of transaction log. + LogSize *LogSizeCapability + + // READ-ONLY; Maximum value. + MaxValue *MaxSizeCapability + + // READ-ONLY; Minimum value. + MinValue *MaxSizeCapability + + // READ-ONLY; Scale/step size for discrete values between the minimum value and the maximum value. + ScaleSize *MaxSizeCapability + + // READ-ONLY; The status of the capability. + Status *CapabilityStatus +} + +// Metric - Database metrics. +type Metric struct { + // READ-ONLY; The end time for the metric (ISO-8601 format). + EndTime *time.Time + + // READ-ONLY; The metric values for the specified time window and timestep. + MetricValues []*MetricValue + + // READ-ONLY; The name information for the metric. + Name *MetricName + + // READ-ONLY; The start time for the metric (ISO-8601 format). + StartTime *time.Time + + // READ-ONLY; The time step to be used to summarize the metric values. + TimeGrain *string + + // READ-ONLY; The unit of the metric. + Unit *UnitType +} + +// MetricAvailability - A metric availability value. +type MetricAvailability struct { + // READ-ONLY; The length of retention for the database metric. + Retention *string + + // READ-ONLY; The granularity of the database metric. + TimeGrain *string +} + +// MetricDefinition - A database metric definition. +type MetricDefinition struct { + // READ-ONLY; The list of database metric availabilities for the metric. + MetricAvailabilities []*MetricAvailability + + // READ-ONLY; The name information for the metric. + Name *MetricName + + // READ-ONLY; The primary aggregation type defining how metric values are displayed. + PrimaryAggregationType *PrimaryAggregationType + + // READ-ONLY; The resource uri of the database. + ResourceURI *string + + // READ-ONLY; The unit of the metric. + Unit *UnitDefinitionType +} + +// MetricDefinitionListResult - The response to a list database metric definitions request. +type MetricDefinitionListResult struct { + // REQUIRED; The list of metric definitions for the database. + Value []*MetricDefinition +} + +// MetricListResult - The response to a list database metrics request. +type MetricListResult struct { + // REQUIRED; The list of metrics for the database. + Value []*Metric +} + +// MetricName - A database metric name. +type MetricName struct { + // READ-ONLY; The friendly name of the database metric. + LocalizedValue *string + + // READ-ONLY; The name of the database metric. + Value *string +} + +// MetricValue - Represents database metrics. +type MetricValue struct { + // READ-ONLY; The average value of the metric. + Average *float64 + + // READ-ONLY; The number of values for the metric. + Count *int32 + + // READ-ONLY; The max value of the metric. + Maximum *float64 + + // READ-ONLY; The min value of the metric. + Minimum *float64 + + // READ-ONLY; The metric timestamp (ISO-8601 format). + Timestamp *time.Time + + // READ-ONLY; The total value of the metric. + Total *float64 +} + +// MinCapacityCapability - The min capacity capability +type MinCapacityCapability struct { + // The reason for the capability not being available. + Reason *string + + // READ-ONLY; The status of the capability. + Status *CapabilityStatus + + // READ-ONLY; Min capacity value + Value *float64 +} + +// Name - ARM Usage Name +type Name struct { + // Usage name localized value. + LocalizedValue *string + + // Usage name value + Value *string +} + +// NetworkIsolationSettings - Contains the ARM resources for which to create private endpoint connection. +type NetworkIsolationSettings struct { + // The resource id for the SQL server which is the target of this request. If set, private endpoint connection will be created + // for the SQL server. Must match server which is target of the operation. + SQLServerResourceID *string + + // The resource id for the storage account used to store BACPAC file. If set, private endpoint connection will be created + // for the storage account. Must match storage account used for StorageUri + // parameter. + StorageAccountResourceID *string +} + +// Operation - SQL REST API operation definition. +type Operation struct { + // READ-ONLY; The localized display information for this particular operation / action. + Display *OperationDisplay + + // READ-ONLY; The name of the operation being performed on this particular object. + Name *string + + // READ-ONLY; The intended executor of the operation. + Origin *OperationOrigin + + // READ-ONLY; Additional descriptions for the operation. + Properties map[string]any +} + +// OperationDisplay - Display metadata associated with the operation. +type OperationDisplay struct { + // READ-ONLY; The localized friendly description for the operation. + Description *string + + // READ-ONLY; The localized friendly name for the operation. + Operation *string + + // READ-ONLY; The localized friendly form of the resource provider name. + Provider *string + + // READ-ONLY; The localized friendly form of the resource type related to this action/operation. + Resource *string +} + +// OperationImpact - The impact of an operation, both in absolute and relative terms. +type OperationImpact struct { + // READ-ONLY; The absolute impact to dimension. + ChangeValueAbsolute *float64 + + // READ-ONLY; The relative impact to dimension (null if not applicable) + ChangeValueRelative *float64 + + // READ-ONLY; The name of the impact dimension. + Name *string + + // READ-ONLY; The unit in which estimated impact to dimension is measured. + Unit *string +} + +// OperationListResult - Result of the request to list SQL operations. +type OperationListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*Operation +} + +// OutboundFirewallRule - An Azure SQL DB Server Outbound Firewall Rule. +type OutboundFirewallRule struct { + // Resource properties. + Properties *OutboundFirewallRuleProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// OutboundFirewallRuleListResult - A list of outbound rules. +type OutboundFirewallRuleListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*OutboundFirewallRule +} + +// OutboundFirewallRuleProperties - The properties of an outbound firewall rule. +type OutboundFirewallRuleProperties struct { + // READ-ONLY; The state of the outbound rule. + ProvisioningState *string +} + +// PartnerInfo - Partner server information for the failover group. +type PartnerInfo struct { + // REQUIRED; Resource identifier of the partner server. + ID *string + + // READ-ONLY; Geo location of the partner server. + Location *string + + // READ-ONLY; Replication role of the partner server. + ReplicationRole *FailoverGroupReplicationRole +} + +// PartnerRegionInfo - Partner region information for the failover group. +type PartnerRegionInfo struct { + // Geo location of the partner managed instances. + Location *string + + // READ-ONLY; Replication role of the partner managed instances. + ReplicationRole *InstanceFailoverGroupReplicationRole +} + +// PerformanceLevelCapability - The performance level capability. +type PerformanceLevelCapability struct { + // READ-ONLY; Unit type used to measure performance level. + Unit *PerformanceLevelUnit + + // READ-ONLY; Performance level value. + Value *float64 +} + +// PrivateEndpointConnection - A private endpoint connection +type PrivateEndpointConnection struct { + // Resource properties. + Properties *PrivateEndpointConnectionProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// PrivateEndpointConnectionListResult - A list of private endpoint connections. +type PrivateEndpointConnectionListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*PrivateEndpointConnection +} + +// PrivateEndpointConnectionProperties - Properties of a private endpoint connection. +type PrivateEndpointConnectionProperties struct { + // Private endpoint which the connection belongs to. + PrivateEndpoint *PrivateEndpointProperty + + // Connection state of the private endpoint connection. + PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionStateProperty + + // READ-ONLY; State of the private endpoint connection. + ProvisioningState *PrivateEndpointProvisioningState +} + +// PrivateEndpointConnectionRequestStatus - Contains the private endpoint connection requests status. +type PrivateEndpointConnectionRequestStatus struct { + // READ-ONLY; The connection name for the private endpoint. + PrivateEndpointConnectionName *string + + // READ-ONLY; Resource id for which the private endpoint is created. + PrivateLinkServiceID *string + + // READ-ONLY; Status of this private endpoint connection. + Status *string +} + +type PrivateEndpointProperty struct { + // Resource id of the private endpoint. + ID *string +} + +// PrivateLinkResource - A private link resource +type PrivateLinkResource struct { + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; The private link resource group id. + Properties *PrivateLinkResourceProperties + + // READ-ONLY; Resource type. + Type *string +} + +// PrivateLinkResourceListResult - A list of private link resources +type PrivateLinkResourceListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*PrivateLinkResource +} + +// PrivateLinkResourceProperties - Properties of a private link resource. +type PrivateLinkResourceProperties struct { + // READ-ONLY; The private link resource group id. + GroupID *string + + // READ-ONLY; The private link resource required member names. + RequiredMembers []*string + + // READ-ONLY; The private link resource required zone names. + RequiredZoneNames []*string +} + +type PrivateLinkServiceConnectionStateProperty struct { + // REQUIRED; The private link service connection description. + Description *string + + // REQUIRED; The private link service connection status. + Status *PrivateLinkServiceConnectionStateStatus + + // READ-ONLY; The actions required for private link service connection. + ActionsRequired *PrivateLinkServiceConnectionStateActionsRequire +} + +// ProxyResource - ARM proxy resource. +type ProxyResource struct { + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// ProxyResourceWithWritableName - ARM proxy resource. +type ProxyResourceWithWritableName struct { + // Resource name. + Name *string + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource type. + Type *string +} + +// QueryMetricInterval - Properties of a query metrics interval. +type QueryMetricInterval struct { + // List of metric objects for this interval + Metrics []*QueryMetricProperties + + // READ-ONLY; Execution count of a query in this interval. + ExecutionCount *int64 + + // READ-ONLY; The start time for the metric interval (ISO-8601 format). + IntervalStartTime *string + + // READ-ONLY; Interval type (length). + IntervalType *QueryTimeGrainType +} + +// QueryMetricProperties - Properties of a topquery metric in one interval. +type QueryMetricProperties struct { + // READ-ONLY; Metric value when avg() aggregate function is used over the interval. + Avg *float64 + + // READ-ONLY; The UI appropriate name for the metric. + DisplayName *string + + // READ-ONLY; Metric value when max() aggregate function is used over the interval. + Max *float64 + + // READ-ONLY; Metric value when min() aggregate function is used over the interval. + Min *float64 + + // READ-ONLY; The name information for the metric. + Name *string + + // READ-ONLY; Metric value when stdev aggregate function is used over the interval. + Stdev *float64 + + // READ-ONLY; Metric value when sum() aggregate function is used over the interval. + Sum *float64 + + // READ-ONLY; The unit of the metric. + Unit *QueryMetricUnitType + + // READ-ONLY; The value of the metric. + Value *float64 +} + +// QueryProperties - Properties of a database query. +type QueryProperties struct { + // Query text. + QueryText *string +} + +type QueryStatistics struct { + // Resource properties. + Properties *QueryStatisticsProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// QueryStatisticsProperties - Properties of a query execution statistics. +type QueryStatisticsProperties struct { + // List of intervals with appropriate metric data + Intervals []*QueryMetricInterval + + // READ-ONLY; Database name of the database in which this query was executed. + DatabaseName *string + + // READ-ONLY; The end time for the metric (ISO-8601 format). + EndTime *string + + // READ-ONLY; Unique query id (unique within one database). + QueryID *string + + // READ-ONLY; The start time for the metric (ISO-8601 format). + StartTime *string +} + +// ReadScaleCapability - The read scale capability. +type ReadScaleCapability struct { + // The reason for the capability not being available. + Reason *string + + // READ-ONLY; The maximum number of read scale replicas. + MaxNumberOfReplicas *int32 + + // READ-ONLY; The status of the capability. + Status *CapabilityStatus +} + +// RecommendedAction - Database, Server or Elastic Pool Recommended Action. +type RecommendedAction struct { + // Resource properties. + Properties *RecommendedActionProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource kind. + Kind *string + + // READ-ONLY; Resource location. + Location *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// RecommendedActionErrorInfo - Contains error information for an Azure SQL Database, Server or Elastic Pool Recommended Action. +type RecommendedActionErrorInfo struct { + // READ-ONLY; Gets the reason why the recommended action was put to error state. e.g., DatabaseHasQdsOff, IndexAlreadyExists + ErrorCode *string + + // READ-ONLY; Gets whether the error could be ignored and recommended action could be retried. Possible values are: Yes/No + IsRetryable *IsRetryable +} + +// RecommendedActionImpactRecord - Contains information of estimated or observed impact on various metrics for an Azure SQL +// Database, Server or Elastic Pool Recommended Action. +type RecommendedActionImpactRecord struct { + // READ-ONLY; Gets the absolute value of this dimension if applicable. e.g., Number of Queries affected + AbsoluteValue *float64 + + // READ-ONLY; Gets the absolute change in the value of this dimension. e.g., Absolute Disk space change in Megabytes + ChangeValueAbsolute *float64 + + // READ-ONLY; Gets the relative change in the value of this dimension. e.g., Relative Disk space change in Percentage + ChangeValueRelative *float64 + + // READ-ONLY; Gets the name of the impact dimension. e.g., CPUChange, DiskSpaceChange, NumberOfQueriesAffected. + DimensionName *string + + // READ-ONLY; Gets the name of the impact dimension. e.g., CPUChange, DiskSpaceChange, NumberOfQueriesAffected. + Unit *string +} + +// RecommendedActionImplementationInfo - Contains information for manual implementation for an Azure SQL Database, Server +// or Elastic Pool Recommended Action. +type RecommendedActionImplementationInfo struct { + // READ-ONLY; Gets the method in which this recommended action can be manually implemented. e.g., TSql, AzurePowerShell. + Method *ImplementationMethod + + // READ-ONLY; Gets the manual implementation script. e.g., T-SQL script that could be executed on the database. + Script *string +} + +// RecommendedActionMetricInfo - Contains time series of various impacted metrics for an Azure SQL Database, Server or Elastic +// Pool Recommended Action. +type RecommendedActionMetricInfo struct { + // READ-ONLY; Gets the name of the metric. e.g., CPU, Number of Queries. + MetricName *string + + // READ-ONLY; Gets the start time of time interval given by this MetricInfo. + StartTime *time.Time + + // READ-ONLY; Gets the duration of time interval for the value given by this MetricInfo. e.g., PT1H (1 hour) + TimeGrain *string + + // READ-ONLY; Gets the unit in which metric is measured. e.g., DTU, Frequency + Unit *string + + // READ-ONLY; Gets the value of the metric in the time interval given by this MetricInfo. + Value *float64 +} + +// RecommendedActionProperties - Properties for a Database, Server or Elastic Pool Recommended Action. +type RecommendedActionProperties struct { + // REQUIRED; Gets the info of the current state the recommended action is in. + State *RecommendedActionStateInfo + + // READ-ONLY; Gets additional details specific to this recommended action. + Details map[string]any + + // READ-ONLY; Gets the error details if and why this recommended action is put to error state. + ErrorDetails *RecommendedActionErrorInfo + + // READ-ONLY; Gets the estimated impact info for this recommended action e.g., Estimated CPU gain, Estimated Disk Space change + EstimatedImpact []*RecommendedActionImpactRecord + + // READ-ONLY; Gets the time taken for applying this recommended action on user resource. e.g., time taken for index creation + ExecuteActionDuration *string + + // READ-ONLY; Gets if approval for applying this recommended action was given by user/system. + ExecuteActionInitiatedBy *RecommendedActionInitiatedBy + + // READ-ONLY; Gets the time when this recommended action was approved for execution. + ExecuteActionInitiatedTime *time.Time + + // READ-ONLY; Gets the time when system started applying this recommended action on the user resource. e.g., index creation + // start time + ExecuteActionStartTime *time.Time + + // READ-ONLY; Gets the implementation details of this recommended action for user to apply it manually. + ImplementationDetails *RecommendedActionImplementationInfo + + // READ-ONLY; Gets if this recommended action was suggested some time ago but user chose to ignore this and system added a + // new recommended action again. + IsArchivedAction *bool + + // READ-ONLY; Gets if this recommended action is actionable by user + IsExecutableAction *bool + + // READ-ONLY; Gets if changes applied by this recommended action can be reverted by user + IsRevertableAction *bool + + // READ-ONLY; Gets time when this recommended action was last refreshed. + LastRefresh *time.Time + + // READ-ONLY; Gets the linked objects, if any. + LinkedObjects []*string + + // READ-ONLY; Gets the observed/actual impact info for this recommended action e.g., Actual CPU gain, Actual Disk Space change + ObservedImpact []*RecommendedActionImpactRecord + + // READ-ONLY; Gets the reason for recommending this action. e.g., DuplicateIndex + RecommendationReason *string + + // READ-ONLY; Gets the time taken for reverting changes of this recommended action on user resource. e.g., time taken for + // dropping the created index. + RevertActionDuration *string + + // READ-ONLY; Gets if approval for reverting this recommended action was given by user/system. + RevertActionInitiatedBy *RecommendedActionInitiatedBy + + // READ-ONLY; Gets the time when this recommended action was approved for revert. + RevertActionInitiatedTime *time.Time + + // READ-ONLY; Gets the time when system started reverting changes of this recommended action on user resource. e.g., time + // when index drop is executed. + RevertActionStartTime *time.Time + + // READ-ONLY; Gets the impact of this recommended action. Possible values are 1 - Low impact, 2 - Medium Impact and 3 - High + // Impact + Score *int32 + + // READ-ONLY; Gets the time series info of metrics for this recommended action e.g., CPU consumption time series + TimeSeries []*RecommendedActionMetricInfo + + // READ-ONLY; Gets the time since when this recommended action is valid. + ValidSince *time.Time +} + +// RecommendedActionStateInfo - Contains information of current state for an Azure SQL Database, Server or Elastic Pool Recommended +// Action. +type RecommendedActionStateInfo struct { + // REQUIRED; Current state the recommended action is in. Some commonly used states are: Active -> recommended action is active + // and no action has been taken yet. Pending -> recommended action is approved for and is + // awaiting execution. Executing -> recommended action is being applied on the user database. Verifying -> recommended action + // was applied and is being verified of its usefulness by the system. Success -> + // recommended action was applied and improvement found during verification. Pending Revert -> verification found little or + // no improvement so recommended action is queued for revert or user has manually + // reverted. Reverting -> changes made while applying recommended action are being reverted on the user database. Reverted + // -> successfully reverted the changes made by recommended action on user + // database. Ignored -> user explicitly ignored/discarded the recommended action. + CurrentValue *RecommendedActionCurrentState + + // READ-ONLY; Gets who initiated the execution of this recommended action. Possible Value are: User -> When user explicity + // notified system to apply the recommended action. System -> When auto-execute status of this + // advisor was set to 'Enabled', in which case the system applied it. + ActionInitiatedBy *RecommendedActionInitiatedBy + + // READ-ONLY; Gets the time when the state was last modified + LastModified *time.Time +} + +// RecommendedSensitivityLabelUpdate - A recommended sensitivity label update operation. +type RecommendedSensitivityLabelUpdate struct { + // Resource properties. + Properties *RecommendedSensitivityLabelUpdateProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// RecommendedSensitivityLabelUpdateList - A list of recommended sensitivity label update operations. +type RecommendedSensitivityLabelUpdateList struct { + Operations []*RecommendedSensitivityLabelUpdate +} + +// RecommendedSensitivityLabelUpdateProperties - Properties of an operation executed on a recommended sensitivity label. +type RecommendedSensitivityLabelUpdateProperties struct { + // REQUIRED; Column name to update. + Column *string + + // REQUIRED + Op *RecommendedSensitivityLabelUpdateKind + + // REQUIRED; Schema name of the column to update. + Schema *string + + // REQUIRED; Table name of the column to update. + Table *string +} + +// RecoverableDatabase - A recoverable database +type RecoverableDatabase struct { + // The properties of a recoverable database + Properties *RecoverableDatabaseProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// RecoverableDatabaseListResult - The response to a list recoverable databases request +type RecoverableDatabaseListResult struct { + // REQUIRED; A list of recoverable databases + Value []*RecoverableDatabase +} + +// RecoverableDatabaseProperties - The properties of a recoverable database +type RecoverableDatabaseProperties struct { + // READ-ONLY; The edition of the database + Edition *string + + // READ-ONLY; The elastic pool name of the database + ElasticPoolName *string + + // READ-ONLY; The last available backup date of the database (ISO8601 format) + LastAvailableBackupDate *time.Time + + // READ-ONLY; The service level objective name of the database + ServiceLevelObjective *string +} + +// RecoverableManagedDatabase - A recoverable managed database resource. +type RecoverableManagedDatabase struct { + // Resource properties. + Properties *RecoverableManagedDatabaseProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// RecoverableManagedDatabaseListResult - A list of recoverable managed databases. +type RecoverableManagedDatabaseListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*RecoverableManagedDatabase +} + +// RecoverableManagedDatabaseProperties - The recoverable managed database's properties. +type RecoverableManagedDatabaseProperties struct { + // READ-ONLY; The last available backup date. + LastAvailableBackupDate *string +} + +// ReplicationLink - A replication link. +type ReplicationLink struct { + // Resource properties. + Properties *ReplicationLinkProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// ReplicationLinkListResult - A list of replication links. +type ReplicationLinkListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*ReplicationLink +} + +// ReplicationLinkProperties - Properties of a replication link. +type ReplicationLinkProperties struct { + // READ-ONLY; Whether the user is currently allowed to terminate the link. + IsTerminationAllowed *bool + + // READ-ONLY; Link type (GEO, NAMED). + LinkType *ReplicationLinkType + + // READ-ONLY; Resource partner database. + PartnerDatabase *string + + // READ-ONLY; Resource partner location. + PartnerLocation *string + + // READ-ONLY; Partner replication role. + PartnerRole *ReplicationRole + + // READ-ONLY; Resource partner server. + PartnerServer *string + + // READ-ONLY; Seeding completion percentage for the link. + PercentComplete *int32 + + // READ-ONLY; Replication mode. + ReplicationMode *string + + // READ-ONLY; Replication state (PENDING, SEEDING, CATCHUP, SUSPENDED). + ReplicationState *ReplicationState + + // READ-ONLY; Local replication role. + Role *ReplicationRole + + // READ-ONLY; Time at which the link was created. + StartTime *time.Time +} + +// Resource - ARM resource. +type Resource struct { + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// ResourceIdentity - Azure Active Directory identity configuration for a resource. +type ResourceIdentity struct { + // The identity type. Set this to 'SystemAssigned' in order to automatically create and assign an Azure Active Directory principal + // for the resource. + Type *IdentityType + + // The resource ids of the user assigned identities to use + UserAssignedIdentities map[string]*UserIdentity + + // READ-ONLY; The Azure Active Directory principal id. + PrincipalID *string + + // READ-ONLY; The Azure Active Directory tenant id. + TenantID *string +} + +// ResourceMoveDefinition - Contains the information necessary to perform a resource move (rename). +type ResourceMoveDefinition struct { + // REQUIRED; The target ID for the resource + ID *string +} + +// ResourceWithWritableName - ARM resource. +type ResourceWithWritableName struct { + // Resource name. + Name *string + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource type. + Type *string +} + +// RestorableDroppedDatabase - A restorable dropped database resource. +type RestorableDroppedDatabase struct { + // Resource location. + Location *string + + // Resource properties. + Properties *RestorableDroppedDatabaseProperties + + // The name and tier of the SKU. + SKU *SKU + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// RestorableDroppedDatabaseListResult - A list of restorable dropped databases. +type RestorableDroppedDatabaseListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*RestorableDroppedDatabase +} + +// RestorableDroppedDatabaseProperties - The restorable dropped database's properties. +type RestorableDroppedDatabaseProperties struct { + // READ-ONLY; The storage account type used to store backups for this database. + BackupStorageRedundancy *BackupStorageRedundancy + + // READ-ONLY; The creation date of the database (ISO8601 format). + CreationDate *time.Time + + // READ-ONLY; The name of the database. + DatabaseName *string + + // READ-ONLY; The deletion date of the database (ISO8601 format). + DeletionDate *time.Time + + // READ-ONLY; The earliest restore date of the database (ISO8601 format). + EarliestRestoreDate *time.Time + + // READ-ONLY; The max size of the database expressed in bytes. + MaxSizeBytes *int64 +} + +// RestorableDroppedManagedDatabase - A restorable dropped managed database resource. +type RestorableDroppedManagedDatabase struct { + // REQUIRED; Resource location. + Location *string + + // Resource properties. + Properties *RestorableDroppedManagedDatabaseProperties + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// RestorableDroppedManagedDatabaseListResult - A list of restorable dropped managed databases. +type RestorableDroppedManagedDatabaseListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*RestorableDroppedManagedDatabase +} + +// RestorableDroppedManagedDatabaseProperties - The restorable dropped managed database's properties. +type RestorableDroppedManagedDatabaseProperties struct { + // READ-ONLY; The creation date of the database (ISO8601 format). + CreationDate *time.Time + + // READ-ONLY; The name of the database. + DatabaseName *string + + // READ-ONLY; The deletion date of the database (ISO8601 format). + DeletionDate *time.Time + + // READ-ONLY; The earliest restore date of the database (ISO8601 format). + EarliestRestoreDate *time.Time +} + +// RestorePoint - Database restore points. +type RestorePoint struct { + // Resource properties. + Properties *RestorePointProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource location. + Location *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// RestorePointListResult - A list of long term retention backups. +type RestorePointListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*RestorePoint +} + +// RestorePointProperties - Properties of a database restore point +type RestorePointProperties struct { + // READ-ONLY; The earliest time to which this database can be restored + EarliestRestoreDate *time.Time + + // READ-ONLY; The time the backup was taken + RestorePointCreationDate *time.Time + + // READ-ONLY; The label of restore point for backup request by user + RestorePointLabel *string + + // READ-ONLY; The type of restore point + RestorePointType *RestorePointType +} + +// SKU - An ARM Resource SKU. +type SKU struct { + // REQUIRED; The name of the SKU, typically, a letter + Number code, e.g. P3. + Name *string + + // Capacity of the particular SKU. + Capacity *int32 + + // If the service has different generations of hardware, for the same SKU, then that can be captured here. + Family *string + + // Size of the particular SKU + Size *string + + // The tier or edition of the particular SKU, e.g. Basic, Premium. + Tier *string +} + +// SecurityAlertPolicyProperties - Properties of a security alert policy. +type SecurityAlertPolicyProperties struct { + // REQUIRED; Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on + // the specific database. + State *SecurityAlertPolicyState + + // Specifies an array of alerts that are disabled. Allowed values are: SqlInjection, SqlInjectionVulnerability, AccessAnomaly, + // DataExfiltration, UnsafeAction, Brute_Force + DisabledAlerts []*string + + // Specifies that the alert is sent to the account administrators. + EmailAccountAdmins *bool + + // Specifies an array of e-mail addresses to which the alert is sent. + EmailAddresses []*string + + // Specifies the number of days to keep in the Threat Detection audit logs. + RetentionDays *int32 + + // Specifies the identifier key of the Threat Detection audit storage account. + StorageAccountAccessKey *string + + // Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat + // Detection audit logs. + StorageEndpoint *string + + // READ-ONLY; Specifies the UTC creation time of the policy. + CreationTime *time.Time +} + +// SecurityAlertsPolicyProperties - Properties of a security alert policy. +type SecurityAlertsPolicyProperties struct { + // REQUIRED; Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on + // the specific database. + State *SecurityAlertsPolicyState + + // Specifies an array of alerts that are disabled. Allowed values are: SqlInjection, SqlInjectionVulnerability, AccessAnomaly, + // DataExfiltration, UnsafeAction, Brute_Force + DisabledAlerts []*string + + // Specifies that the alert is sent to the account administrators. + EmailAccountAdmins *bool + + // Specifies an array of e-mail addresses to which the alert is sent. + EmailAddresses []*string + + // Specifies the number of days to keep in the Threat Detection audit logs. + RetentionDays *int32 + + // Specifies the identifier key of the Threat Detection audit storage account. + StorageAccountAccessKey *string + + // Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat + // Detection audit logs. + StorageEndpoint *string + + // READ-ONLY; Specifies the UTC creation time of the policy. + CreationTime *time.Time +} + +// SecurityEvent - A security event. +type SecurityEvent struct { + // Resource properties. + Properties *SecurityEventProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// SecurityEventCollection - A list of security events. +type SecurityEventCollection struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*SecurityEvent +} + +// SecurityEventProperties - The properties of a security event. +type SecurityEventProperties struct { + // READ-ONLY; The application used to execute the statement. + ApplicationName *string + + // READ-ONLY; The IP address of the client who executed the statement. + ClientIP *string + + // READ-ONLY; The database name + Database *string + + // READ-ONLY; The time when the security event occurred. + EventTime *time.Time + + // READ-ONLY; The principal user who executed the statement + PrincipalName *string + + // READ-ONLY; The sql injection additional properties, populated only if the type of the security event is sql injection. + SecurityEventSQLInjectionAdditionalProperties *SecurityEventSQLInjectionAdditionalProperties + + // READ-ONLY; The type of the security event. + SecurityEventType *SecurityEventType + + // READ-ONLY; The server name + Server *string + + // READ-ONLY; The subscription name + Subscription *string +} + +// SecurityEventSQLInjectionAdditionalProperties - The properties of a security event sql injection additional properties. +type SecurityEventSQLInjectionAdditionalProperties struct { + // READ-ONLY; The sql error code + ErrorCode *int32 + + // READ-ONLY; The sql error message + ErrorMessage *string + + // READ-ONLY; The sql error severity + ErrorSeverity *int32 + + // READ-ONLY; The statement + Statement *string + + // READ-ONLY; The statement highlight length + StatementHighlightLength *int32 + + // READ-ONLY; The statement highlight offset + StatementHighlightOffset *int32 + + // READ-ONLY; The threat ID. + ThreatID *string +} + +// SecurityEventsFilterParameters - The properties that are supported in the $filter operation. +type SecurityEventsFilterParameters struct { + // Filter on the event time. + EventTime *time.Time + + // Whether to show server records or not. + ShowServerRecords *bool +} + +// SensitivityLabel - A sensitivity label. +type SensitivityLabel struct { + // Resource properties. + Properties *SensitivityLabelProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource that manages the sensitivity label. + ManagedBy *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// SensitivityLabelListResult - A list of sensitivity labels. +type SensitivityLabelListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*SensitivityLabel +} + +// SensitivityLabelProperties - Properties of a sensitivity label. +type SensitivityLabelProperties struct { + // The information type. + InformationType *string + + // The information type ID. + InformationTypeID *string + + // The label ID. + LabelID *string + + // The label name. + LabelName *string + Rank *SensitivityLabelRank + + // READ-ONLY; The column name. + ColumnName *string + + // READ-ONLY; Is sensitivity recommendation disabled. Applicable for recommended sensitivity label only. Specifies whether + // the sensitivity recommendation on this column is disabled (dismissed) or not. + IsDisabled *bool + + // READ-ONLY; The schema name. + SchemaName *string + + // READ-ONLY; The table name. + TableName *string +} + +// SensitivityLabelUpdate - A sensitivity label update operation. +type SensitivityLabelUpdate struct { + // Resource properties. + Properties *SensitivityLabelUpdateProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// SensitivityLabelUpdateList - A list of sensitivity label update operations. +type SensitivityLabelUpdateList struct { + Operations []*SensitivityLabelUpdate +} + +// SensitivityLabelUpdateProperties - Properties of an operation executed on a sensitivity label. +type SensitivityLabelUpdateProperties struct { + // REQUIRED; Column name to update. + Column *string + + // REQUIRED + Op *SensitivityLabelUpdateKind + + // REQUIRED; Schema name of the column to update. + Schema *string + + // REQUIRED; Table name of the column to update. + Table *string + + // The sensitivity label information to apply on a column. + SensitivityLabel *SensitivityLabel +} + +// Server - An Azure SQL Database server. +type Server struct { + // REQUIRED; Resource location. + Location *string + + // The Azure Active Directory identity of the server. + Identity *ResourceIdentity + + // Resource properties. + Properties *ServerProperties + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Kind of sql server. This is metadata used for the Azure portal experience. + Kind *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// ServerAdvancedThreatProtection - A server Advanced Threat Protection. +type ServerAdvancedThreatProtection struct { + // Resource properties. + Properties *AdvancedThreatProtectionProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; SystemData of AdvancedThreatProtectionResource. + SystemData *SystemData + + // READ-ONLY; Resource type. + Type *string +} + +// ServerAutomaticTuning - Server-level Automatic Tuning. +type ServerAutomaticTuning struct { + // Resource properties. + Properties *AutomaticTuningServerProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// ServerAzureADAdministrator - Azure Active Directory administrator. +type ServerAzureADAdministrator struct { + // Resource properties. + Properties *AdministratorProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// ServerAzureADOnlyAuthentication - Azure Active Directory only authentication. +type ServerAzureADOnlyAuthentication struct { + // Resource properties. + Properties *AzureADOnlyAuthProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// ServerBlobAuditingPolicy - A server blob auditing policy. +type ServerBlobAuditingPolicy struct { + // Resource properties. + Properties *ServerBlobAuditingPolicyProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// ServerBlobAuditingPolicyListResult - A list of server auditing settings. +type ServerBlobAuditingPolicyListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*ServerBlobAuditingPolicy +} + +// ServerBlobAuditingPolicyProperties - Properties of a server blob auditing policy. +type ServerBlobAuditingPolicyProperties struct { + // REQUIRED; Specifies the state of the audit. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. + State *BlobAuditingPolicyState + + // Specifies the Actions-Groups and Actions to audit. + // The recommended set of action groups to use is the following combination - this will audit all the queries and stored procedures + // executed against the database, as well as successful and failed logins: + // BATCHCOMPLETEDGROUP, SUCCESSFULDATABASEAUTHENTICATIONGROUP, FAILEDDATABASEAUTHENTICATIONGROUP. + // This above combination is also the set that is configured by default when enabling auditing from the Azure portal. + // The supported action groups to audit are (note: choose only specific groups that cover your auditing needs. Using unnecessary + // groups could lead to very large quantities of audit records): + // APPLICATIONROLECHANGEPASSWORDGROUP BACKUPRESTOREGROUP DATABASELOGOUTGROUP DATABASEOBJECTCHANGEGROUP DATABASEOBJECTOWNERSHIPCHANGEGROUP + // DATABASEOBJECTPERMISSIONCHANGEGROUP DATABASEOPERATIONGROUP + // DATABASEPERMISSIONCHANGEGROUP DATABASEPRINCIPALCHANGEGROUP DATABASEPRINCIPALIMPERSONATIONGROUP DATABASEROLEMEMBERCHANGEGROUP + // FAILEDDATABASEAUTHENTICATIONGROUP SCHEMAOBJECTACCESSGROUP SCHEMAOBJECT + // CHANGEGROUP SCHEMAOBJECTOWNERSHIPCHANGEGROUP SCHEMAOBJECTPERMISSIONCHANGEGROUP SUCCESSFULDATABASEAUTHENTICATIONGROUP USERCHANGEPASSWORDGROUP + // BATCHSTARTEDGROUP BATCHCOMPLETEDGROUP DBCCGROUP DATABASE + // OWNERSHIPCHANGEGROUP DATABASECHANGEGROUP LEDGEROPERATION_GROUP + // These are groups that cover all sql statements and stored procedures executed against the database, and should not be used + // in combination with other groups as this will result in duplicate audit logs. + // For more information, see Database-Level Audit Action Groups + // [https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups]. + // For Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified for Server + // auditing policy). The supported actions to audit are: SELECT UPDATE INSERT DELETE + // EXECUTE RECEIVE REFERENCES + // The general form for defining an action to be audited is: {action} ON {object} BY {principal} + // Note that in the above format can refer to an object like a table, view, or stored procedure, or an entire database or + // schema. For the latter cases, the forms DATABASE::{dbname} and SCHEMA::{schema + // name} are used, respectively. + // For example: SELECT on dbo.myTable by public SELECT on DATABASE::myDatabase by public SELECT on SCHEMA::mySchema by public + // For more information, see Database-Level Audit Actions + // [https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions] + AuditActionsAndGroups []*string + + // Specifies whether audit events are sent to Azure Monitor. In order to send the events to Azure Monitor, specify 'State' + // as 'Enabled' and 'IsAzureMonitorTargetEnabled' as true. + // When using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs category on + // the database should be also created. Note that for server level audit you + // should use the 'master' database as {databaseName}. + // Diagnostic Settings URI format: PUT + // https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview + // For more information, see Diagnostic Settings REST API [https://go.microsoft.com/fwlink/?linkid=2033207]or Diagnostic Settings + // PowerShell [https://go.microsoft.com/fwlink/?linkid=2033043] + IsAzureMonitorTargetEnabled *bool + + // Specifies the state of devops audit. If state is Enabled, devops logs will be sent to Azure Monitor. In order to send the + // events to Azure Monitor, specify 'State' as 'Enabled', + // 'IsAzureMonitorTargetEnabled' as true and 'IsDevopsAuditEnabled' as true + // When using REST API to configure auditing, Diagnostic Settings with 'DevOpsOperationsAudit' diagnostic logs category on + // the master database should also be created. + // Diagnostic Settings URI format: PUT + // https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/master/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview + // For more information, see Diagnostic Settings REST API [https://go.microsoft.com/fwlink/?linkid=2033207]or Diagnostic Settings + // PowerShell [https://go.microsoft.com/fwlink/?linkid=2033043] + IsDevopsAuditEnabled *bool + + // Specifies whether Managed Identity is used to access blob storage + IsManagedIdentityInUse *bool + + // Specifies whether storageAccountAccessKey value is the storage's secondary key. + IsStorageSecondaryKeyInUse *bool + + // Specifies the amount of time in milliseconds that can elapse before audit actions are forced to be processed. The default + // minimum value is 1000 (1 second). The maximum is 2,147,483,647. + QueueDelayMs *int32 + + // Specifies the number of days to keep in the audit logs in the storage account. + RetentionDays *int32 + + // Specifies the identifier key of the auditing storage account. If state is Enabled and storageEndpoint is specified, not + // specifying the storageAccountAccessKey will use SQL server system-assigned + // managed identity to access the storage. Prerequisites for using managed identity authentication: + // 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD). + // 2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server + // identity. For more information, see Auditing to storage using Managed + // Identity authentication [https://go.microsoft.com/fwlink/?linkid=2114355] + StorageAccountAccessKey *string + + // Specifies the blob storage subscription Id. + StorageAccountSubscriptionID *string + + // Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint + // or isAzureMonitorTargetEnabled is required. + StorageEndpoint *string +} + +// ServerCommunicationLink - Server communication link. +type ServerCommunicationLink struct { + // The properties of resource. + Properties *ServerCommunicationLinkProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Communication link kind. This property is used for Azure Portal metadata. + Kind *string + + // READ-ONLY; Communication link location. + Location *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// ServerCommunicationLinkListResult - A list of server communication links. +type ServerCommunicationLinkListResult struct { + // The list of server communication links. + Value []*ServerCommunicationLink +} + +// ServerCommunicationLinkProperties - The properties of a server communication link. +type ServerCommunicationLinkProperties struct { + // REQUIRED; The name of the partner server. + PartnerServer *string + + // READ-ONLY; The state. + State *string +} + +// ServerConnectionPolicy - A server connection policy +type ServerConnectionPolicy struct { + // Resource properties. + Properties *ServerConnectionPolicyProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Metadata used for the Azure portal experience. + Kind *string + + // READ-ONLY; Resource location. + Location *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// ServerConnectionPolicyListResult - A list of server connection policy objects. +type ServerConnectionPolicyListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*ServerConnectionPolicy +} + +// ServerConnectionPolicyProperties - The properties of a server connection policy. +type ServerConnectionPolicyProperties struct { + // REQUIRED; The server connection type. + ConnectionType *ServerConnectionType +} + +// ServerDNSAlias - A server DNS alias. +type ServerDNSAlias struct { + // Resource properties. + Properties *ServerDNSAliasProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// ServerDNSAliasAcquisition - A server dns alias acquisition request. +type ServerDNSAliasAcquisition struct { + // REQUIRED; The id of the server alias that will be acquired to point to this server instead. + OldServerDNSAliasID *string +} + +// ServerDNSAliasListResult - A list of server DNS aliases. +type ServerDNSAliasListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*ServerDNSAlias +} + +// ServerDNSAliasProperties - Properties of a server DNS alias. +type ServerDNSAliasProperties struct { + // READ-ONLY; The fully qualified DNS record for alias + AzureDNSRecord *string +} + +// ServerDevOpsAuditSettingsListResult - A list of server DevOps audit settings. +type ServerDevOpsAuditSettingsListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*ServerDevOpsAuditingSettings +} + +// ServerDevOpsAuditSettingsProperties - Properties of a server DevOps audit settings. +type ServerDevOpsAuditSettingsProperties struct { + // REQUIRED; Specifies the state of the audit. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. + State *BlobAuditingPolicyState + + // Specifies whether DevOps audit events are sent to Azure Monitor. In order to send the events to Azure Monitor, specify + // 'State' as 'Enabled' and 'IsAzureMonitorTargetEnabled' as true. + // When using REST API to configure DevOps audit, Diagnostic Settings with 'DevOpsOperationsAudit' diagnostic logs category + // on the master database should be also created. + // Diagnostic Settings URI format: PUT + // https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/master/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview + // For more information, see Diagnostic Settings REST API [https://go.microsoft.com/fwlink/?linkid=2033207]or Diagnostic Settings + // PowerShell [https://go.microsoft.com/fwlink/?linkid=2033043] + IsAzureMonitorTargetEnabled *bool + + // Specifies the identifier key of the auditing storage account. If state is Enabled and storageEndpoint is specified, not + // specifying the storageAccountAccessKey will use SQL server system-assigned + // managed identity to access the storage. Prerequisites for using managed identity authentication: + // 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD). + // 2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server + // identity. For more information, see Auditing to storage using Managed + // Identity authentication [https://go.microsoft.com/fwlink/?linkid=2114355] + StorageAccountAccessKey *string + + // Specifies the blob storage subscription Id. + StorageAccountSubscriptionID *string + + // Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint + // or isAzureMonitorTargetEnabled is required. + StorageEndpoint *string +} + +// ServerDevOpsAuditingSettings - A server DevOps auditing settings. +type ServerDevOpsAuditingSettings struct { + // Resource properties. + Properties *ServerDevOpsAuditSettingsProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; SystemData of ServerDevOpsAuditSettingsResource. + SystemData *SystemData + + // READ-ONLY; Resource type. + Type *string +} + +// ServerExternalAdministrator - Properties of a active directory administrator. +type ServerExternalAdministrator struct { + // Type of the sever administrator. + AdministratorType *AdministratorType + + // Azure Active Directory only Authentication enabled. + AzureADOnlyAuthentication *bool + + // Login name of the server administrator. + Login *string + + // Principal Type of the sever administrator. + PrincipalType *PrincipalType + + // SID (object ID) of the server administrator. + Sid *string + + // Tenant ID of the administrator. + TenantID *string +} + +// ServerFirewallRuleProperties - The properties of a server firewall rule. +type ServerFirewallRuleProperties struct { + // The end IP address of the firewall rule. Must be IPv4 format. Must be greater than or equal to startIpAddress. Use value + // '0.0.0.0' for all Azure-internal IP addresses. + EndIPAddress *string + + // The start IP address of the firewall rule. Must be IPv4 format. Use value '0.0.0.0' for all Azure-internal IP addresses. + StartIPAddress *string +} + +// ServerInfo - Server info for the server trust group. +type ServerInfo struct { + // REQUIRED; Server Id. + ServerID *string +} + +// ServerKey - A server key. +type ServerKey struct { + // Resource properties. + Properties *ServerKeyProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Kind of encryption protector. This is metadata used for the Azure portal experience. + Kind *string + + // READ-ONLY; Resource location. + Location *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// ServerKeyListResult - A list of server keys. +type ServerKeyListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*ServerKey +} + +// ServerKeyProperties - Properties for a server key execution. +type ServerKeyProperties struct { + // REQUIRED; The server key type like 'ServiceManaged', 'AzureKeyVault'. + ServerKeyType *ServerKeyType + + // The URI of the server key. If the ServerKeyType is AzureKeyVault, then the URI is required. + URI *string + + // READ-ONLY; Key auto rotation opt-in flag. Either true or false. + AutoRotationEnabled *bool + + // READ-ONLY; The server key creation date. + CreationDate *time.Time + + // READ-ONLY; Subregion of the server key. + Subregion *string + + // READ-ONLY; Thumbprint of the server key. + Thumbprint *string +} + +// ServerListResult - A list of servers. +type ServerListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*Server +} + +// ServerOperation - A server operation. +type ServerOperation struct { + // Resource properties. + Properties *ServerOperationProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// ServerOperationListResult - The response to a list server operations request +type ServerOperationListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*ServerOperation +} + +// ServerOperationProperties - The properties of a server operation. +type ServerOperationProperties struct { + // READ-ONLY; The operation description. + Description *string + + // READ-ONLY; The operation error code. + ErrorCode *int32 + + // READ-ONLY; The operation error description. + ErrorDescription *string + + // READ-ONLY; The operation error severity. + ErrorSeverity *int32 + + // READ-ONLY; The estimated completion time of the operation. + EstimatedCompletionTime *time.Time + + // READ-ONLY; Whether the operation can be cancelled. + IsCancellable *bool + + // READ-ONLY; Whether or not the error is a user error. + IsUserError *bool + + // READ-ONLY; The name of operation. + Operation *string + + // READ-ONLY; The friendly name of operation. + OperationFriendlyName *string + + // READ-ONLY; The percentage of the operation completed. + PercentComplete *int32 + + // READ-ONLY; The name of the server. + ServerName *string + + // READ-ONLY; The operation start time. + StartTime *time.Time + + // READ-ONLY; The operation state. + State *ManagementOperationState +} + +// ServerPrivateEndpointConnection - A private endpoint connection under a server +type ServerPrivateEndpointConnection struct { + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Private endpoint connection properties + Properties *PrivateEndpointConnectionProperties +} + +// ServerProperties - The properties of a server. +type ServerProperties struct { + // Administrator username for the server. Once created it cannot be changed. + AdministratorLogin *string + + // The administrator login password (required for server creation). + AdministratorLoginPassword *string + + // The Azure Active Directory identity of the server. + Administrators *ServerExternalAdministrator + + // The Client id used for cross tenant CMK scenario + FederatedClientID *string + + // A CMK URI of the key to use for encryption. + KeyID *string + + // Minimal TLS version. Allowed values: '1.0', '1.1', '1.2' + MinimalTLSVersion *string + + // The resource id of a user assigned identity to be used by default. + PrimaryUserAssignedIdentityID *string + + // Whether or not public endpoint access is allowed for this server. Value is optional but if passed in, must be 'Enabled' + // or 'Disabled' + PublicNetworkAccess *ServerNetworkAccessFlag + + // Whether or not to restrict outbound network access for this server. Value is optional but if passed in, must be 'Enabled' + // or 'Disabled' + RestrictOutboundNetworkAccess *ServerNetworkAccessFlag + + // The version of the server. + Version *string + + // READ-ONLY; The fully qualified domain name of the server. + FullyQualifiedDomainName *string + + // READ-ONLY; List of private endpoint connections on a server + PrivateEndpointConnections []*ServerPrivateEndpointConnection + + // READ-ONLY; The state of the server. + State *string + + // READ-ONLY; Whether or not existing server has a workspace created and if it allows connection from workspace + WorkspaceFeature *ServerWorkspaceFeature +} + +// ServerSecurityAlertPolicy - A server security alert policy. +type ServerSecurityAlertPolicy struct { + // Resource properties. + Properties *SecurityAlertsPolicyProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; SystemData of SecurityAlertPolicyResource. + SystemData *SystemData + + // READ-ONLY; Resource type. + Type *string +} + +// ServerTrustCertificate - Server trust certificate imported from box to enable connection between box and Sql Managed Instance. +type ServerTrustCertificate struct { + // Resource properties. + Properties *ServerTrustCertificateProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// ServerTrustCertificateProperties - The properties of a server trust certificate. +type ServerTrustCertificateProperties struct { + // The certificate public blob + PublicBlob *string + + // READ-ONLY; The certificate name + CertificateName *string + + // READ-ONLY; The certificate thumbprint + Thumbprint *string +} + +// ServerTrustCertificatesListResult - A list of server trust certificates in instance. +type ServerTrustCertificatesListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*ServerTrustCertificate +} + +// ServerTrustGroup - A server trust group. +type ServerTrustGroup struct { + // Resource properties. + Properties *ServerTrustGroupProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// ServerTrustGroupListResult - A list of server trust groups. +type ServerTrustGroupListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*ServerTrustGroup +} + +// ServerTrustGroupProperties - Properties of a server trust group. +type ServerTrustGroupProperties struct { + // REQUIRED; Group members information for the server trust group. + GroupMembers []*ServerInfo + + // REQUIRED; Trust scope of the server trust group. + TrustScopes []*ServerTrustGroupPropertiesTrustScopesItem +} + +// ServerUpdate - An update request for an Azure SQL Database server. +type ServerUpdate struct { + // Server identity + Identity *ResourceIdentity + + // Resource properties. + Properties *ServerProperties + + // Resource tags. + Tags map[string]*string +} + +// ServerUsage - Represents server metrics. +type ServerUsage struct { + // READ-ONLY; The current value of the metric. + CurrentValue *float64 + + // READ-ONLY; The metric display name. + DisplayName *string + + // READ-ONLY; The current limit of the metric. + Limit *float64 + + // READ-ONLY; Name of the server usage metric. + Name *string + + // READ-ONLY; The next reset time for the metric (ISO8601 format). + NextResetTime *time.Time + + // READ-ONLY; The name of the resource. + ResourceName *string + + // READ-ONLY; The units of the metric. + Unit *string +} + +// ServerUsageListResult - Represents the response to a list server metrics request. +type ServerUsageListResult struct { + // REQUIRED; The list of server metrics for the server. + Value []*ServerUsage +} + +// ServerVersionCapability - The server capability +type ServerVersionCapability struct { + // The reason for the capability not being available. + Reason *string + + // READ-ONLY; The server version name. + Name *string + + // READ-ONLY; The status of the capability. + Status *CapabilityStatus + + // READ-ONLY; The list of supported database editions. + SupportedEditions []*EditionCapability + + // READ-ONLY; The list of supported elastic pool editions. + SupportedElasticPoolEditions []*ElasticPoolEditionCapability +} + +// ServerVulnerabilityAssessment - A server vulnerability assessment. +type ServerVulnerabilityAssessment struct { + // Resource properties. + Properties *ServerVulnerabilityAssessmentProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// ServerVulnerabilityAssessmentListResult - A list of the server's vulnerability assessments. +type ServerVulnerabilityAssessmentListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*ServerVulnerabilityAssessment +} + +// ServerVulnerabilityAssessmentProperties - Properties of a server Vulnerability Assessment. +type ServerVulnerabilityAssessmentProperties struct { + // REQUIRED; A blob storage container path to hold the scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/). + StorageContainerPath *string + + // The recurring scans settings + RecurringScans *VulnerabilityAssessmentRecurringScansProperties + + // Specifies the identifier key of the storage account for vulnerability assessment scan results. If 'StorageContainerSasKey' + // isn't specified, storageAccountAccessKey is required. Applies only if the + // storage account is not behind a Vnet or a firewall + StorageAccountAccessKey *string + + // A shared access signature (SAS Key) that has write access to the blob container specified in 'storageContainerPath' parameter. + // If 'storageAccountAccessKey' isn't specified, StorageContainerSasKey is + // required. Applies only if the storage account is not behind a Vnet or a firewall + StorageContainerSasKey *string +} + +// ServiceObjective - Represents a database service objective. +type ServiceObjective struct { + // Represents the properties of the resource. + Properties *ServiceObjectiveProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// ServiceObjectiveCapability - The service objectives capability. +type ServiceObjectiveCapability struct { + // The reason for the capability not being available. + Reason *string + + // READ-ONLY; The compute model + ComputeModel *string + + // READ-ONLY; The unique ID of the service objective. + ID *string + + // READ-ONLY; The included (free) max size. + IncludedMaxSize *MaxSizeCapability + + // READ-ONLY; The service objective name. + Name *string + + // READ-ONLY; The performance level. + PerformanceLevel *PerformanceLevelCapability + + // READ-ONLY; The sku. + SKU *SKU + + // READ-ONLY; The status of the capability. + Status *CapabilityStatus + + // READ-ONLY; Supported time range for auto pause delay + SupportedAutoPauseDelay *AutoPauseDelayTimeRange + + // READ-ONLY; List of supported license types. + SupportedLicenseTypes []*LicenseTypeCapability + + // READ-ONLY; List of supported maintenance configurations + SupportedMaintenanceConfigurations []*MaintenanceConfigurationCapability + + // READ-ONLY; The list of supported maximum database sizes. + SupportedMaxSizes []*MaxSizeRangeCapability + + // READ-ONLY; List of supported min capacities + SupportedMinCapacities []*MinCapacityCapability + + // READ-ONLY; Whether or not zone redundancy is supported for the service objective. + ZoneRedundant *bool +} + +// ServiceObjectiveListResult - Represents the response to a get database service objectives request. +type ServiceObjectiveListResult struct { + // REQUIRED; The list of database service objectives. + Value []*ServiceObjective +} + +// ServiceObjectiveProperties - Represents the properties of a database service objective. +type ServiceObjectiveProperties struct { + // READ-ONLY; The description for the service level objective. + Description *string + + // READ-ONLY; Gets whether the service level objective is enabled. + Enabled *bool + + // READ-ONLY; Gets whether the service level objective is the default service objective. + IsDefault *bool + + // READ-ONLY; Gets whether the service level objective is a system service objective. + IsSystem *bool + + // READ-ONLY; The name for the service objective. + ServiceObjectiveName *string +} + +// ServicePrincipal - The managed instance's service principal configuration for a resource. +type ServicePrincipal struct { + // Service principal type. + Type *ServicePrincipalType + + // READ-ONLY; The Azure Active Directory application client id. + ClientID *string + + // READ-ONLY; The Azure Active Directory application object id. + PrincipalID *string + + // READ-ONLY; The Azure Active Directory tenant id. + TenantID *string +} + +// SloUsageMetric - A Slo Usage Metric. +type SloUsageMetric struct { + // READ-ONLY; Gets or sets inRangeTimeRatio for SLO usage metric. + InRangeTimeRatio *float64 + + // READ-ONLY; The serviceLevelObjective for SLO usage metric. + ServiceLevelObjective *ServiceObjectiveName + + // READ-ONLY; The serviceLevelObjectiveId for SLO usage metric. + ServiceLevelObjectiveID *string +} + +// StorageCapability - The storage account type capability. +type StorageCapability struct { + // The reason for the capability not being available. + Reason *string + + // READ-ONLY; The status of the capability. + Status *CapabilityStatus + + // READ-ONLY; The storage account type for the database's backups. + StorageAccountType *StorageCapabilityStorageAccountType +} + +// SubscriptionUsage - Usage Metric of a Subscription in a Location. +type SubscriptionUsage struct { + // Resource properties. + Properties *SubscriptionUsageProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// SubscriptionUsageListResult - A list of subscription usage metrics in a location. +type SubscriptionUsageListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*SubscriptionUsage +} + +// SubscriptionUsageProperties - Properties of a subscription usage. +type SubscriptionUsageProperties struct { + // READ-ONLY; Current value of the metric. + CurrentValue *float64 + + // READ-ONLY; User-readable name of the metric. + DisplayName *string + + // READ-ONLY; Boundary value of the metric. + Limit *float64 + + // READ-ONLY; Unit of the metric. + Unit *string +} + +// SyncAgent - An Azure SQL Database sync agent. +type SyncAgent struct { + // Resource properties. + Properties *SyncAgentProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// SyncAgentKeyProperties - Properties of an Azure SQL Database sync agent key. +type SyncAgentKeyProperties struct { + // READ-ONLY; Key of sync agent. + SyncAgentKey *string +} + +// SyncAgentLinkedDatabase - An Azure SQL Database sync agent linked database. +type SyncAgentLinkedDatabase struct { + // Resource properties. + Properties *SyncAgentLinkedDatabaseProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// SyncAgentLinkedDatabaseListResult - A list of sync agent linked databases. +type SyncAgentLinkedDatabaseListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*SyncAgentLinkedDatabase +} + +// SyncAgentLinkedDatabaseProperties - Properties of an Azure SQL Database sync agent linked database. +type SyncAgentLinkedDatabaseProperties struct { + // READ-ONLY; Id of the sync agent linked database. + DatabaseID *string + + // READ-ONLY; Database name of the sync agent linked database. + DatabaseName *string + + // READ-ONLY; Type of the sync agent linked database. + DatabaseType *SyncMemberDbType + + // READ-ONLY; Description of the sync agent linked database. + Description *string + + // READ-ONLY; Server name of the sync agent linked database. + ServerName *string + + // READ-ONLY; User name of the sync agent linked database. + UserName *string +} + +// SyncAgentListResult - A list of sync agents. +type SyncAgentListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*SyncAgent +} + +// SyncAgentProperties - Properties of an Azure SQL Database sync agent. +type SyncAgentProperties struct { + // ARM resource id of the sync database in the sync agent. + SyncDatabaseID *string + + // READ-ONLY; Expiration time of the sync agent version. + ExpiryTime *time.Time + + // READ-ONLY; If the sync agent version is up to date. + IsUpToDate *bool + + // READ-ONLY; Last alive time of the sync agent. + LastAliveTime *time.Time + + // READ-ONLY; Name of the sync agent. + Name *string + + // READ-ONLY; State of the sync agent. + State *SyncAgentState + + // READ-ONLY; Version of the sync agent. + Version *string +} + +// SyncDatabaseIDListResult - A list of sync database ID properties. +type SyncDatabaseIDListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*SyncDatabaseIDProperties +} + +// SyncDatabaseIDProperties - Properties of the sync database id. +type SyncDatabaseIDProperties struct { + // READ-ONLY; ARM resource id of sync database. + ID *string +} + +// SyncFullSchemaProperties - Properties of the database full schema. +type SyncFullSchemaProperties struct { + // READ-ONLY; Last update time of the database schema. + LastUpdateTime *time.Time + + // READ-ONLY; List of tables in the database full schema. + Tables []*SyncFullSchemaTable +} + +// SyncFullSchemaPropertiesListResult - A list of sync schema properties. +type SyncFullSchemaPropertiesListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*SyncFullSchemaProperties +} + +// SyncFullSchemaTable - Properties of the table in the database full schema. +type SyncFullSchemaTable struct { + // READ-ONLY; List of columns in the table of database full schema. + Columns []*SyncFullSchemaTableColumn + + // READ-ONLY; Error id of the table. + ErrorID *string + + // READ-ONLY; If there is error in the table. + HasError *bool + + // READ-ONLY; Name of the table. + Name *string + + // READ-ONLY; Quoted name of the table. + QuotedName *string +} + +// SyncFullSchemaTableColumn - Properties of the column in the table of database full schema. +type SyncFullSchemaTableColumn struct { + // READ-ONLY; Data size of the column. + DataSize *string + + // READ-ONLY; Data type of the column. + DataType *string + + // READ-ONLY; Error id of the column. + ErrorID *string + + // READ-ONLY; If there is error in the table. + HasError *bool + + // READ-ONLY; If it is the primary key of the table. + IsPrimaryKey *bool + + // READ-ONLY; Name of the column. + Name *string + + // READ-ONLY; Quoted name of the column. + QuotedName *string +} + +// SyncGroup - An Azure SQL Database sync group. +type SyncGroup struct { + // Resource properties. + Properties *SyncGroupProperties + + // The name and capacity of the SKU. + SKU *SKU + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// SyncGroupListResult - A list of sync groups. +type SyncGroupListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*SyncGroup +} + +// SyncGroupLogListResult - A list of sync group log properties. +type SyncGroupLogListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*SyncGroupLogProperties +} + +// SyncGroupLogProperties - Properties of an Azure SQL Database sync group log. +type SyncGroupLogProperties struct { + // READ-ONLY; Details of the sync group log. + Details *string + + // READ-ONLY; OperationStatus of the sync group log. + OperationStatus *string + + // READ-ONLY; Source of the sync group log. + Source *string + + // READ-ONLY; Timestamp of the sync group log. + Timestamp *time.Time + + // READ-ONLY; TracingId of the sync group log. + TracingID *string + + // READ-ONLY; Type of the sync group log. + Type *SyncGroupLogType +} + +// SyncGroupProperties - Properties of a sync group. +type SyncGroupProperties struct { + // Conflict logging retention period. + ConflictLoggingRetentionInDays *int32 + + // Conflict resolution policy of the sync group. + ConflictResolutionPolicy *SyncConflictResolutionPolicy + + // If conflict logging is enabled. + EnableConflictLogging *bool + + // Password for the sync group hub database credential. + HubDatabasePassword *string + + // User name for the sync group hub database credential. + HubDatabaseUserName *string + + // Sync interval of the sync group. + Interval *int32 + + // Sync schema of the sync group. + Schema *SyncGroupSchema + + // ARM resource id of the sync database in the sync group. + SyncDatabaseID *string + + // If use private link connection is enabled. + UsePrivateLinkConnection *bool + + // READ-ONLY; Last sync time of the sync group. + LastSyncTime *time.Time + + // READ-ONLY; Private endpoint name of the sync group if use private link connection is enabled. + PrivateEndpointName *string + + // READ-ONLY; Sync state of the sync group. + SyncState *SyncGroupState +} + +// SyncGroupSchema - Properties of sync group schema. +type SyncGroupSchema struct { + // Name of master sync member where the schema is from. + MasterSyncMemberName *string + + // List of tables in sync group schema. + Tables []*SyncGroupSchemaTable +} + +// SyncGroupSchemaTable - Properties of table in sync group schema. +type SyncGroupSchemaTable struct { + // List of columns in sync group schema. + Columns []*SyncGroupSchemaTableColumn + + // Quoted name of sync group schema table. + QuotedName *string +} + +// SyncGroupSchemaTableColumn - Properties of column in sync group table. +type SyncGroupSchemaTableColumn struct { + // Data size of the column. + DataSize *string + + // Data type of the column. + DataType *string + + // Quoted name of sync group table column. + QuotedName *string +} + +// SyncMember - An Azure SQL Database sync member. +type SyncMember struct { + // Resource properties. + Properties *SyncMemberProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// SyncMemberListResult - A list of Azure SQL Database sync members. +type SyncMemberListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*SyncMember +} + +// SyncMemberProperties - Properties of a sync member. +type SyncMemberProperties struct { + // Database name of the member database in the sync member. + DatabaseName *string + + // Database type of the sync member. + DatabaseType *SyncMemberDbType + + // Password of the member database in the sync member. + Password *string + + // SQL Server database id of the sync member. + SQLServerDatabaseID *string + + // Server name of the member database in the sync member + ServerName *string + + // ARM resource id of the sync agent in the sync member. + SyncAgentID *string + + // Sync direction of the sync member. + SyncDirection *SyncDirection + + // ARM resource id of the sync member logical database, for sync members in Azure. + SyncMemberAzureDatabaseResourceID *string + + // Whether to use private link connection. + UsePrivateLinkConnection *bool + + // User name of the member database in the sync member. + UserName *string + + // READ-ONLY; Private endpoint name of the sync member if use private link connection is enabled, for sync members in Azure. + PrivateEndpointName *string + + // READ-ONLY; Sync state of the sync member. + SyncState *SyncMemberState +} + +// SystemData - Metadata pertaining to creation and last modification of the resource. +type SystemData struct { + // The timestamp of resource creation (UTC). + CreatedAt *time.Time + + // The identity that created the resource. + CreatedBy *string + + // The type of identity that created the resource. + CreatedByType *CreatedByType + + // The timestamp of resource last modification (UTC) + LastModifiedAt *time.Time + + // The identity that last modified the resource. + LastModifiedBy *string + + // The type of identity that last modified the resource. + LastModifiedByType *CreatedByType +} + +// TdeCertificate - A TDE certificate that can be uploaded into a server. +type TdeCertificate struct { + // Resource properties. + Properties *TdeCertificateProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// TdeCertificateProperties - Properties of a TDE certificate. +type TdeCertificateProperties struct { + // REQUIRED; The base64 encoded certificate private blob. + PrivateBlob *string + + // The certificate password. + CertPassword *string +} + +// TimeZone - Time Zone. +type TimeZone struct { + // Resource properties. + Properties *TimeZoneProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// TimeZoneListResult - A list of time zones. +type TimeZoneListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*TimeZone +} + +// TimeZoneProperties - The properties of a time zone. +type TimeZoneProperties struct { + // READ-ONLY; The time zone display name + DisplayName *string + + // READ-ONLY; The time zone id + TimeZoneID *string +} + +type TopQueries struct { + // List of top resource consuming queries with appropriate metric data + Queries []*QueryStatisticsProperties + + // READ-ONLY; Aggregation function used to calculate query metrics. + AggregationFunction *string + + // READ-ONLY; The end time for the metric (ISO-8601 format). + EndTime *string + + // READ-ONLY; Interval type (length). + IntervalType *QueryTimeGrainType + + // READ-ONLY; Requested number of top queries. + NumberOfQueries *int32 + + // READ-ONLY; Metric used to rank queries. + ObservationMetric *string + + // READ-ONLY; The start time for the metric (ISO-8601 format). + StartTime *string +} + +// TopQueriesListResult - A list of top resource consuming queries on managed instance +type TopQueriesListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*TopQueries +} + +// TrackedResource - ARM tracked top level resource. +type TrackedResource struct { + // REQUIRED; Resource location. + Location *string + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// TransparentDataEncryptionProperties - Properties of a transparent data encryption. +type TransparentDataEncryptionProperties struct { + // REQUIRED; Specifies the state of the transparent data encryption. + State *TransparentDataEncryptionState +} + +// UpdateLongTermRetentionBackupParameters - Contains the information necessary to perform long term retention backup update +// operation. +type UpdateLongTermRetentionBackupParameters struct { + // Resource properties. + Properties *UpdateLongTermRetentionBackupParametersProperties +} + +// UpdateLongTermRetentionBackupParametersProperties - Contains the properties to perform long term retention backup copy +// operation. +type UpdateLongTermRetentionBackupParametersProperties struct { + // The storage redundancy type of the copied backup + RequestedBackupStorageRedundancy *BackupStorageRedundancy +} + +// UpdateManagedInstanceDNSServersOperation - A recoverable managed database resource. +type UpdateManagedInstanceDNSServersOperation struct { + // Resource properties. + Properties *DNSRefreshConfigurationProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +type UpsertManagedServerOperationParameters struct { + Family *string + StorageSizeInGB *int32 + Tier *string + VCores *int32 +} + +type UpsertManagedServerOperationStep struct { + Name *string + Order *int32 + Status *UpsertManagedServerOperationStepStatus +} + +// Usage - ARM usage. +type Usage struct { + // READ-ONLY; Usage current value. + CurrentValue *int32 + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Usage limit. + Limit *int32 + + // READ-ONLY; Resource name. + Name *Name + + // READ-ONLY; Usage requested limit. + RequestedLimit *int32 + + // READ-ONLY; Resource type. + Type *string + + // READ-ONLY; Usage unit. + Unit *string +} + +// UsageListResult - A list of usages. +type UsageListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*Usage +} + +// UserIdentity - Azure Active Directory identity configuration for a resource. +type UserIdentity struct { + // READ-ONLY; The Azure Active Directory client id. + ClientID *string + + // READ-ONLY; The Azure Active Directory principal id. + PrincipalID *string +} + +// VirtualCluster - An Azure SQL virtual cluster. +type VirtualCluster struct { + // REQUIRED; Resource location. + Location *string + + // Resource properties. + Properties *VirtualClusterProperties + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// VirtualClusterListResult - A list of virtual clusters. +type VirtualClusterListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*VirtualCluster +} + +// VirtualClusterProperties - The properties of a virtual cluster. +type VirtualClusterProperties struct { + // If the service has different generations of hardware, for the same SKU, then that can be captured here. + Family *string + + // Specifies maintenance configuration id to apply to this virtual cluster. + MaintenanceConfigurationID *string + + // READ-ONLY; List of resources in this virtual cluster. + ChildResources []*string + + // READ-ONLY; Subnet resource ID for the virtual cluster. + SubnetID *string +} + +// VirtualClusterUpdate - An update request for an Azure SQL Database virtual cluster. +type VirtualClusterUpdate struct { + // Resource properties. + Properties *VirtualClusterProperties + + // Resource tags. + Tags map[string]*string +} + +// VirtualNetworkRule - A virtual network rule. +type VirtualNetworkRule struct { + // Resource properties. + Properties *VirtualNetworkRuleProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// VirtualNetworkRuleListResult - A list of virtual network rules. +type VirtualNetworkRuleListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*VirtualNetworkRule +} + +// VirtualNetworkRuleProperties - Properties of a virtual network rule. +type VirtualNetworkRuleProperties struct { + // REQUIRED; The ARM resource id of the virtual network subnet. + VirtualNetworkSubnetID *string + + // Create firewall rule before the virtual network has vnet service endpoint enabled. + IgnoreMissingVnetServiceEndpoint *bool + + // READ-ONLY; Virtual Network Rule State + State *VirtualNetworkRuleState +} + +// VulnerabilityAssessmentRecurringScansProperties - Properties of a Vulnerability Assessment recurring scans. +type VulnerabilityAssessmentRecurringScansProperties struct { + // Specifies that the schedule scan notification will be is sent to the subscription administrators. + EmailSubscriptionAdmins *bool + + // Specifies an array of e-mail addresses to which the scan notification is sent. + Emails []*string + + // Recurring scans state. + IsEnabled *bool +} + +// VulnerabilityAssessmentScanError - Properties of a vulnerability assessment scan error. +type VulnerabilityAssessmentScanError struct { + // READ-ONLY; The error code. + Code *string + + // READ-ONLY; The error message. + Message *string +} + +// VulnerabilityAssessmentScanRecord - A vulnerability assessment scan record. +type VulnerabilityAssessmentScanRecord struct { + // Resource properties. + Properties *VulnerabilityAssessmentScanRecordProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// VulnerabilityAssessmentScanRecordListResult - A list of vulnerability assessment scan records. +type VulnerabilityAssessmentScanRecordListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*VulnerabilityAssessmentScanRecord +} + +// VulnerabilityAssessmentScanRecordProperties - Properties of a vulnerability assessment scan record. +type VulnerabilityAssessmentScanRecordProperties struct { + // READ-ONLY; The scan end time (UTC). + EndTime *time.Time + + // READ-ONLY; The scan errors. + Errors []*VulnerabilityAssessmentScanError + + // READ-ONLY; The number of failed security checks. + NumberOfFailedSecurityChecks *int32 + + // READ-ONLY; The scan ID. + ScanID *string + + // READ-ONLY; The scan start time (UTC). + StartTime *time.Time + + // READ-ONLY; The scan status. + State *VulnerabilityAssessmentScanState + + // READ-ONLY; The scan results storage container path. + StorageContainerPath *string + + // READ-ONLY; The scan trigger type. + TriggerType *VulnerabilityAssessmentScanTriggerType +} + +// WorkloadClassifier - Workload classifier operations for a data warehouse +type WorkloadClassifier struct { + // Resource properties. + Properties *WorkloadClassifierProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// WorkloadClassifierListResult - A list of workload classifiers for a workload group. +type WorkloadClassifierListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*WorkloadClassifier +} + +// WorkloadClassifierProperties - Workload classifier definition. For more information look at sys.workloadmanagementworkload_classifiers +// (DMV). +type WorkloadClassifierProperties struct { + // REQUIRED; The workload classifier member name. + MemberName *string + + // The workload classifier context. + Context *string + + // The workload classifier end time for classification. + EndTime *string + + // The workload classifier importance. + Importance *string + + // The workload classifier label. + Label *string + + // The workload classifier start time for classification. + StartTime *string +} + +// WorkloadGroup - Workload group operations for a data warehouse +type WorkloadGroup struct { + // Resource properties. + Properties *WorkloadGroupProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// WorkloadGroupListResult - A list of workload groups. +type WorkloadGroupListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*WorkloadGroup +} + +// WorkloadGroupProperties - Workload group definition. For more information look at sys.workloadmanagementworkload_groups +// (DMV). +type WorkloadGroupProperties struct { + // REQUIRED; The workload group cap percentage resource. + MaxResourcePercent *int32 + + // REQUIRED; The workload group minimum percentage resource. + MinResourcePercent *int32 + + // REQUIRED; The workload group request minimum grant percentage. + MinResourcePercentPerRequest *float64 + + // The workload group importance level. + Importance *string + + // The workload group request maximum grant percentage. + MaxResourcePercentPerRequest *float64 + + // The workload group query execution timeout. + QueryExecutionTimeout *int32 +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/models_serde.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/models_serde.go new file mode 100644 index 000000000..ffb28e3df --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/models_serde.go @@ -0,0 +1,18327 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "encoding/json" + "fmt" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "reflect" +) + +// MarshalJSON implements the json.Marshaller interface for type AdministratorListResult. +func (a AdministratorListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", a.NextLink) + populate(objectMap, "value", a.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AdministratorListResult. +func (a *AdministratorListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &a.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &a.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AdministratorProperties. +func (a AdministratorProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "administratorType", a.AdministratorType) + populate(objectMap, "azureADOnlyAuthentication", a.AzureADOnlyAuthentication) + populate(objectMap, "login", a.Login) + populate(objectMap, "sid", a.Sid) + populate(objectMap, "tenantId", a.TenantID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AdministratorProperties. +func (a *AdministratorProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "administratorType": + err = unpopulate(val, "AdministratorType", &a.AdministratorType) + delete(rawMsg, key) + case "azureADOnlyAuthentication": + err = unpopulate(val, "AzureADOnlyAuthentication", &a.AzureADOnlyAuthentication) + delete(rawMsg, key) + case "login": + err = unpopulate(val, "Login", &a.Login) + delete(rawMsg, key) + case "sid": + err = unpopulate(val, "Sid", &a.Sid) + delete(rawMsg, key) + case "tenantId": + err = unpopulate(val, "TenantID", &a.TenantID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AdvancedThreatProtectionProperties. +func (a AdvancedThreatProtectionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "creationTime", a.CreationTime) + populate(objectMap, "state", a.State) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AdvancedThreatProtectionProperties. +func (a *AdvancedThreatProtectionProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "creationTime": + err = unpopulateDateTimeRFC3339(val, "CreationTime", &a.CreationTime) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &a.State) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Advisor. +func (a Advisor) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", a.ID) + populate(objectMap, "kind", a.Kind) + populate(objectMap, "location", a.Location) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Advisor. +func (a *Advisor) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &a.Kind) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &a.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AdvisorProperties. +func (a AdvisorProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "advisorStatus", a.AdvisorStatus) + populate(objectMap, "autoExecuteStatus", a.AutoExecuteStatus) + populate(objectMap, "autoExecuteStatusInheritedFrom", a.AutoExecuteStatusInheritedFrom) + populateDateTimeRFC3339(objectMap, "lastChecked", a.LastChecked) + populate(objectMap, "recommendationsStatus", a.RecommendationsStatus) + populate(objectMap, "recommendedActions", a.RecommendedActions) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AdvisorProperties. +func (a *AdvisorProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "advisorStatus": + err = unpopulate(val, "AdvisorStatus", &a.AdvisorStatus) + delete(rawMsg, key) + case "autoExecuteStatus": + err = unpopulate(val, "AutoExecuteStatus", &a.AutoExecuteStatus) + delete(rawMsg, key) + case "autoExecuteStatusInheritedFrom": + err = unpopulate(val, "AutoExecuteStatusInheritedFrom", &a.AutoExecuteStatusInheritedFrom) + delete(rawMsg, key) + case "lastChecked": + err = unpopulateDateTimeRFC3339(val, "LastChecked", &a.LastChecked) + delete(rawMsg, key) + case "recommendationsStatus": + err = unpopulate(val, "RecommendationsStatus", &a.RecommendationsStatus) + delete(rawMsg, key) + case "recommendedActions": + err = unpopulate(val, "RecommendedActions", &a.RecommendedActions) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AgentConfiguration. +func (a AgentConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", a.ID) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AgentConfiguration. +func (a *AgentConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AgentConfigurationProperties. +func (a AgentConfigurationProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "state", a.State) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AgentConfigurationProperties. +func (a *AgentConfigurationProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "state": + err = unpopulate(val, "State", &a.State) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AutoPauseDelayTimeRange. +func (a AutoPauseDelayTimeRange) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "default", a.Default) + populate(objectMap, "doNotPauseValue", a.DoNotPauseValue) + populate(objectMap, "maxValue", a.MaxValue) + populate(objectMap, "minValue", a.MinValue) + populate(objectMap, "stepSize", a.StepSize) + populate(objectMap, "unit", a.Unit) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AutoPauseDelayTimeRange. +func (a *AutoPauseDelayTimeRange) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "default": + err = unpopulate(val, "Default", &a.Default) + delete(rawMsg, key) + case "doNotPauseValue": + err = unpopulate(val, "DoNotPauseValue", &a.DoNotPauseValue) + delete(rawMsg, key) + case "maxValue": + err = unpopulate(val, "MaxValue", &a.MaxValue) + delete(rawMsg, key) + case "minValue": + err = unpopulate(val, "MinValue", &a.MinValue) + delete(rawMsg, key) + case "stepSize": + err = unpopulate(val, "StepSize", &a.StepSize) + delete(rawMsg, key) + case "unit": + err = unpopulate(val, "Unit", &a.Unit) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AutomaticTuningOptions. +func (a AutomaticTuningOptions) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "actualState", a.ActualState) + populate(objectMap, "desiredState", a.DesiredState) + populate(objectMap, "reasonCode", a.ReasonCode) + populate(objectMap, "reasonDesc", a.ReasonDesc) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AutomaticTuningOptions. +func (a *AutomaticTuningOptions) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "actualState": + err = unpopulate(val, "ActualState", &a.ActualState) + delete(rawMsg, key) + case "desiredState": + err = unpopulate(val, "DesiredState", &a.DesiredState) + delete(rawMsg, key) + case "reasonCode": + err = unpopulate(val, "ReasonCode", &a.ReasonCode) + delete(rawMsg, key) + case "reasonDesc": + err = unpopulate(val, "ReasonDesc", &a.ReasonDesc) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AutomaticTuningServerOptions. +func (a AutomaticTuningServerOptions) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "actualState", a.ActualState) + populate(objectMap, "desiredState", a.DesiredState) + populate(objectMap, "reasonCode", a.ReasonCode) + populate(objectMap, "reasonDesc", a.ReasonDesc) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AutomaticTuningServerOptions. +func (a *AutomaticTuningServerOptions) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "actualState": + err = unpopulate(val, "ActualState", &a.ActualState) + delete(rawMsg, key) + case "desiredState": + err = unpopulate(val, "DesiredState", &a.DesiredState) + delete(rawMsg, key) + case "reasonCode": + err = unpopulate(val, "ReasonCode", &a.ReasonCode) + delete(rawMsg, key) + case "reasonDesc": + err = unpopulate(val, "ReasonDesc", &a.ReasonDesc) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AutomaticTuningServerProperties. +func (a AutomaticTuningServerProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "actualState", a.ActualState) + populate(objectMap, "desiredState", a.DesiredState) + populate(objectMap, "options", a.Options) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AutomaticTuningServerProperties. +func (a *AutomaticTuningServerProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "actualState": + err = unpopulate(val, "ActualState", &a.ActualState) + delete(rawMsg, key) + case "desiredState": + err = unpopulate(val, "DesiredState", &a.DesiredState) + delete(rawMsg, key) + case "options": + err = unpopulate(val, "Options", &a.Options) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureADOnlyAuthListResult. +func (a AzureADOnlyAuthListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", a.NextLink) + populate(objectMap, "value", a.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureADOnlyAuthListResult. +func (a *AzureADOnlyAuthListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &a.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &a.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureADOnlyAuthProperties. +func (a AzureADOnlyAuthProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "azureADOnlyAuthentication", a.AzureADOnlyAuthentication) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureADOnlyAuthProperties. +func (a *AzureADOnlyAuthProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "azureADOnlyAuthentication": + err = unpopulate(val, "AzureADOnlyAuthentication", &a.AzureADOnlyAuthentication) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BackupShortTermRetentionPolicy. +func (b BackupShortTermRetentionPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", b.ID) + populate(objectMap, "name", b.Name) + populate(objectMap, "properties", b.Properties) + populate(objectMap, "type", b.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BackupShortTermRetentionPolicy. +func (b *BackupShortTermRetentionPolicy) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &b.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &b.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &b.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &b.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BackupShortTermRetentionPolicyListResult. +func (b BackupShortTermRetentionPolicyListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", b.NextLink) + populate(objectMap, "value", b.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BackupShortTermRetentionPolicyListResult. +func (b *BackupShortTermRetentionPolicyListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &b.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &b.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BackupShortTermRetentionPolicyProperties. +func (b BackupShortTermRetentionPolicyProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "diffBackupIntervalInHours", b.DiffBackupIntervalInHours) + populate(objectMap, "retentionDays", b.RetentionDays) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BackupShortTermRetentionPolicyProperties. +func (b *BackupShortTermRetentionPolicyProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "diffBackupIntervalInHours": + err = unpopulate(val, "DiffBackupIntervalInHours", &b.DiffBackupIntervalInHours) + delete(rawMsg, key) + case "retentionDays": + err = unpopulate(val, "RetentionDays", &b.RetentionDays) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BaseLongTermRetentionPolicyProperties. +func (b BaseLongTermRetentionPolicyProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "monthlyRetention", b.MonthlyRetention) + populate(objectMap, "weekOfYear", b.WeekOfYear) + populate(objectMap, "weeklyRetention", b.WeeklyRetention) + populate(objectMap, "yearlyRetention", b.YearlyRetention) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BaseLongTermRetentionPolicyProperties. +func (b *BaseLongTermRetentionPolicyProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "monthlyRetention": + err = unpopulate(val, "MonthlyRetention", &b.MonthlyRetention) + delete(rawMsg, key) + case "weekOfYear": + err = unpopulate(val, "WeekOfYear", &b.WeekOfYear) + delete(rawMsg, key) + case "weeklyRetention": + err = unpopulate(val, "WeeklyRetention", &b.WeeklyRetention) + delete(rawMsg, key) + case "yearlyRetention": + err = unpopulate(val, "YearlyRetention", &b.YearlyRetention) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CheckNameAvailabilityRequest. +func (c CheckNameAvailabilityRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", c.Name) + objectMap["type"] = "Microsoft.Sql/servers" + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CheckNameAvailabilityRequest. +func (c *CheckNameAvailabilityRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CheckNameAvailabilityResponse. +func (c CheckNameAvailabilityResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "available", c.Available) + populate(objectMap, "message", c.Message) + populate(objectMap, "name", c.Name) + populate(objectMap, "reason", c.Reason) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CheckNameAvailabilityResponse. +func (c *CheckNameAvailabilityResponse) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "available": + err = unpopulate(val, "Available", &c.Available) + delete(rawMsg, key) + case "message": + err = unpopulate(val, "Message", &c.Message) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "reason": + err = unpopulate(val, "Reason", &c.Reason) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CompleteDatabaseRestoreDefinition. +func (c CompleteDatabaseRestoreDefinition) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "lastBackupName", c.LastBackupName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CompleteDatabaseRestoreDefinition. +func (c *CompleteDatabaseRestoreDefinition) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "lastBackupName": + err = unpopulate(val, "LastBackupName", &c.LastBackupName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CopyLongTermRetentionBackupParameters. +func (c CopyLongTermRetentionBackupParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", c.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CopyLongTermRetentionBackupParameters. +func (c *CopyLongTermRetentionBackupParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &c.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CopyLongTermRetentionBackupParametersProperties. +func (c CopyLongTermRetentionBackupParametersProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "targetBackupStorageRedundancy", c.TargetBackupStorageRedundancy) + populate(objectMap, "targetDatabaseName", c.TargetDatabaseName) + populate(objectMap, "targetResourceGroup", c.TargetResourceGroup) + populate(objectMap, "targetServerFullyQualifiedDomainName", c.TargetServerFullyQualifiedDomainName) + populate(objectMap, "targetServerResourceId", c.TargetServerResourceID) + populate(objectMap, "targetSubscriptionId", c.TargetSubscriptionID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CopyLongTermRetentionBackupParametersProperties. +func (c *CopyLongTermRetentionBackupParametersProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "targetBackupStorageRedundancy": + err = unpopulate(val, "TargetBackupStorageRedundancy", &c.TargetBackupStorageRedundancy) + delete(rawMsg, key) + case "targetDatabaseName": + err = unpopulate(val, "TargetDatabaseName", &c.TargetDatabaseName) + delete(rawMsg, key) + case "targetResourceGroup": + err = unpopulate(val, "TargetResourceGroup", &c.TargetResourceGroup) + delete(rawMsg, key) + case "targetServerFullyQualifiedDomainName": + err = unpopulate(val, "TargetServerFullyQualifiedDomainName", &c.TargetServerFullyQualifiedDomainName) + delete(rawMsg, key) + case "targetServerResourceId": + err = unpopulate(val, "TargetServerResourceID", &c.TargetServerResourceID) + delete(rawMsg, key) + case "targetSubscriptionId": + err = unpopulate(val, "TargetSubscriptionID", &c.TargetSubscriptionID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CreateDatabaseRestorePointDefinition. +func (c CreateDatabaseRestorePointDefinition) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "restorePointLabel", c.RestorePointLabel) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CreateDatabaseRestorePointDefinition. +func (c *CreateDatabaseRestorePointDefinition) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "restorePointLabel": + err = unpopulate(val, "RestorePointLabel", &c.RestorePointLabel) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DNSRefreshConfigurationProperties. +func (d DNSRefreshConfigurationProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "status", d.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DNSRefreshConfigurationProperties. +func (d *DNSRefreshConfigurationProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "status": + err = unpopulate(val, "Status", &d.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DataMaskingPolicy. +func (d DataMaskingPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", d.ID) + populate(objectMap, "kind", d.Kind) + populate(objectMap, "location", d.Location) + populate(objectMap, "name", d.Name) + populate(objectMap, "properties", d.Properties) + populate(objectMap, "type", d.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DataMaskingPolicy. +func (d *DataMaskingPolicy) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &d.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &d.Kind) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &d.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DataMaskingPolicyProperties. +func (d DataMaskingPolicyProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "applicationPrincipals", d.ApplicationPrincipals) + populate(objectMap, "dataMaskingState", d.DataMaskingState) + populate(objectMap, "exemptPrincipals", d.ExemptPrincipals) + populate(objectMap, "maskingLevel", d.MaskingLevel) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DataMaskingPolicyProperties. +func (d *DataMaskingPolicyProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "applicationPrincipals": + err = unpopulate(val, "ApplicationPrincipals", &d.ApplicationPrincipals) + delete(rawMsg, key) + case "dataMaskingState": + err = unpopulate(val, "DataMaskingState", &d.DataMaskingState) + delete(rawMsg, key) + case "exemptPrincipals": + err = unpopulate(val, "ExemptPrincipals", &d.ExemptPrincipals) + delete(rawMsg, key) + case "maskingLevel": + err = unpopulate(val, "MaskingLevel", &d.MaskingLevel) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DataMaskingRule. +func (d DataMaskingRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", d.ID) + populate(objectMap, "kind", d.Kind) + populate(objectMap, "location", d.Location) + populate(objectMap, "name", d.Name) + populate(objectMap, "properties", d.Properties) + populate(objectMap, "type", d.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DataMaskingRule. +func (d *DataMaskingRule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &d.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &d.Kind) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &d.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DataMaskingRuleListResult. +func (d DataMaskingRuleListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", d.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DataMaskingRuleListResult. +func (d *DataMaskingRuleListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &d.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DataMaskingRuleProperties. +func (d DataMaskingRuleProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "aliasName", d.AliasName) + populate(objectMap, "columnName", d.ColumnName) + populate(objectMap, "id", d.ID) + populate(objectMap, "maskingFunction", d.MaskingFunction) + populate(objectMap, "numberFrom", d.NumberFrom) + populate(objectMap, "numberTo", d.NumberTo) + populate(objectMap, "prefixSize", d.PrefixSize) + populate(objectMap, "replacementString", d.ReplacementString) + populate(objectMap, "ruleState", d.RuleState) + populate(objectMap, "schemaName", d.SchemaName) + populate(objectMap, "suffixSize", d.SuffixSize) + populate(objectMap, "tableName", d.TableName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DataMaskingRuleProperties. +func (d *DataMaskingRuleProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "aliasName": + err = unpopulate(val, "AliasName", &d.AliasName) + delete(rawMsg, key) + case "columnName": + err = unpopulate(val, "ColumnName", &d.ColumnName) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &d.ID) + delete(rawMsg, key) + case "maskingFunction": + err = unpopulate(val, "MaskingFunction", &d.MaskingFunction) + delete(rawMsg, key) + case "numberFrom": + err = unpopulate(val, "NumberFrom", &d.NumberFrom) + delete(rawMsg, key) + case "numberTo": + err = unpopulate(val, "NumberTo", &d.NumberTo) + delete(rawMsg, key) + case "prefixSize": + err = unpopulate(val, "PrefixSize", &d.PrefixSize) + delete(rawMsg, key) + case "replacementString": + err = unpopulate(val, "ReplacementString", &d.ReplacementString) + delete(rawMsg, key) + case "ruleState": + err = unpopulate(val, "RuleState", &d.RuleState) + delete(rawMsg, key) + case "schemaName": + err = unpopulate(val, "SchemaName", &d.SchemaName) + delete(rawMsg, key) + case "suffixSize": + err = unpopulate(val, "SuffixSize", &d.SuffixSize) + delete(rawMsg, key) + case "tableName": + err = unpopulate(val, "TableName", &d.TableName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DataWarehouseUserActivities. +func (d DataWarehouseUserActivities) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", d.ID) + populate(objectMap, "name", d.Name) + populate(objectMap, "properties", d.Properties) + populate(objectMap, "type", d.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DataWarehouseUserActivities. +func (d *DataWarehouseUserActivities) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &d.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DataWarehouseUserActivitiesListResult. +func (d DataWarehouseUserActivitiesListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", d.NextLink) + populate(objectMap, "value", d.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DataWarehouseUserActivitiesListResult. +func (d *DataWarehouseUserActivitiesListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &d.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &d.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DataWarehouseUserActivitiesProperties. +func (d DataWarehouseUserActivitiesProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "activeQueriesCount", d.ActiveQueriesCount) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DataWarehouseUserActivitiesProperties. +func (d *DataWarehouseUserActivitiesProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "activeQueriesCount": + err = unpopulate(val, "ActiveQueriesCount", &d.ActiveQueriesCount) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Database. +func (d Database) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", d.ID) + populate(objectMap, "identity", d.Identity) + populate(objectMap, "kind", d.Kind) + populate(objectMap, "location", d.Location) + populate(objectMap, "managedBy", d.ManagedBy) + populate(objectMap, "name", d.Name) + populate(objectMap, "properties", d.Properties) + populate(objectMap, "sku", d.SKU) + populate(objectMap, "tags", d.Tags) + populate(objectMap, "type", d.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Database. +func (d *Database) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &d.ID) + delete(rawMsg, key) + case "identity": + err = unpopulate(val, "Identity", &d.Identity) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &d.Kind) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &d.Location) + delete(rawMsg, key) + case "managedBy": + err = unpopulate(val, "ManagedBy", &d.ManagedBy) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &d.SKU) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &d.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DatabaseAdvancedThreatProtection. +func (d DatabaseAdvancedThreatProtection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", d.ID) + populate(objectMap, "name", d.Name) + populate(objectMap, "properties", d.Properties) + populate(objectMap, "systemData", d.SystemData) + populate(objectMap, "type", d.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseAdvancedThreatProtection. +func (d *DatabaseAdvancedThreatProtection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &d.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &d.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DatabaseAdvancedThreatProtectionListResult. +func (d DatabaseAdvancedThreatProtectionListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", d.NextLink) + populate(objectMap, "value", d.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseAdvancedThreatProtectionListResult. +func (d *DatabaseAdvancedThreatProtectionListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &d.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &d.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DatabaseAutomaticTuning. +func (d DatabaseAutomaticTuning) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", d.ID) + populate(objectMap, "name", d.Name) + populate(objectMap, "properties", d.Properties) + populate(objectMap, "type", d.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseAutomaticTuning. +func (d *DatabaseAutomaticTuning) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &d.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DatabaseAutomaticTuningProperties. +func (d DatabaseAutomaticTuningProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "actualState", d.ActualState) + populate(objectMap, "desiredState", d.DesiredState) + populate(objectMap, "options", d.Options) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseAutomaticTuningProperties. +func (d *DatabaseAutomaticTuningProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "actualState": + err = unpopulate(val, "ActualState", &d.ActualState) + delete(rawMsg, key) + case "desiredState": + err = unpopulate(val, "DesiredState", &d.DesiredState) + delete(rawMsg, key) + case "options": + err = unpopulate(val, "Options", &d.Options) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DatabaseBlobAuditingPolicy. +func (d DatabaseBlobAuditingPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", d.ID) + populate(objectMap, "kind", d.Kind) + populate(objectMap, "name", d.Name) + populate(objectMap, "properties", d.Properties) + populate(objectMap, "type", d.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseBlobAuditingPolicy. +func (d *DatabaseBlobAuditingPolicy) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &d.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &d.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DatabaseBlobAuditingPolicyListResult. +func (d DatabaseBlobAuditingPolicyListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", d.NextLink) + populate(objectMap, "value", d.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseBlobAuditingPolicyListResult. +func (d *DatabaseBlobAuditingPolicyListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &d.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &d.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DatabaseBlobAuditingPolicyProperties. +func (d DatabaseBlobAuditingPolicyProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "auditActionsAndGroups", d.AuditActionsAndGroups) + populate(objectMap, "isAzureMonitorTargetEnabled", d.IsAzureMonitorTargetEnabled) + populate(objectMap, "isManagedIdentityInUse", d.IsManagedIdentityInUse) + populate(objectMap, "isStorageSecondaryKeyInUse", d.IsStorageSecondaryKeyInUse) + populate(objectMap, "queueDelayMs", d.QueueDelayMs) + populate(objectMap, "retentionDays", d.RetentionDays) + populate(objectMap, "state", d.State) + populate(objectMap, "storageAccountAccessKey", d.StorageAccountAccessKey) + populate(objectMap, "storageAccountSubscriptionId", d.StorageAccountSubscriptionID) + populate(objectMap, "storageEndpoint", d.StorageEndpoint) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseBlobAuditingPolicyProperties. +func (d *DatabaseBlobAuditingPolicyProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "auditActionsAndGroups": + err = unpopulate(val, "AuditActionsAndGroups", &d.AuditActionsAndGroups) + delete(rawMsg, key) + case "isAzureMonitorTargetEnabled": + err = unpopulate(val, "IsAzureMonitorTargetEnabled", &d.IsAzureMonitorTargetEnabled) + delete(rawMsg, key) + case "isManagedIdentityInUse": + err = unpopulate(val, "IsManagedIdentityInUse", &d.IsManagedIdentityInUse) + delete(rawMsg, key) + case "isStorageSecondaryKeyInUse": + err = unpopulate(val, "IsStorageSecondaryKeyInUse", &d.IsStorageSecondaryKeyInUse) + delete(rawMsg, key) + case "queueDelayMs": + err = unpopulate(val, "QueueDelayMs", &d.QueueDelayMs) + delete(rawMsg, key) + case "retentionDays": + err = unpopulate(val, "RetentionDays", &d.RetentionDays) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &d.State) + delete(rawMsg, key) + case "storageAccountAccessKey": + err = unpopulate(val, "StorageAccountAccessKey", &d.StorageAccountAccessKey) + delete(rawMsg, key) + case "storageAccountSubscriptionId": + err = unpopulate(val, "StorageAccountSubscriptionID", &d.StorageAccountSubscriptionID) + delete(rawMsg, key) + case "storageEndpoint": + err = unpopulate(val, "StorageEndpoint", &d.StorageEndpoint) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DatabaseColumn. +func (d DatabaseColumn) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", d.ID) + populate(objectMap, "name", d.Name) + populate(objectMap, "properties", d.Properties) + populate(objectMap, "type", d.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseColumn. +func (d *DatabaseColumn) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &d.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DatabaseColumnListResult. +func (d DatabaseColumnListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", d.NextLink) + populate(objectMap, "value", d.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseColumnListResult. +func (d *DatabaseColumnListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &d.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &d.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DatabaseColumnProperties. +func (d DatabaseColumnProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "columnType", d.ColumnType) + populate(objectMap, "isComputed", d.IsComputed) + populate(objectMap, "memoryOptimized", d.MemoryOptimized) + populate(objectMap, "temporalType", d.TemporalType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseColumnProperties. +func (d *DatabaseColumnProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "columnType": + err = unpopulate(val, "ColumnType", &d.ColumnType) + delete(rawMsg, key) + case "isComputed": + err = unpopulate(val, "IsComputed", &d.IsComputed) + delete(rawMsg, key) + case "memoryOptimized": + err = unpopulate(val, "MemoryOptimized", &d.MemoryOptimized) + delete(rawMsg, key) + case "temporalType": + err = unpopulate(val, "TemporalType", &d.TemporalType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DatabaseExtensions. +func (d DatabaseExtensions) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", d.ID) + populate(objectMap, "name", d.Name) + populate(objectMap, "properties", d.Properties) + populate(objectMap, "type", d.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseExtensions. +func (d *DatabaseExtensions) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &d.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DatabaseExtensionsProperties. +func (d DatabaseExtensionsProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "operationMode", d.OperationMode) + populate(objectMap, "storageKey", d.StorageKey) + populate(objectMap, "storageKeyType", d.StorageKeyType) + populate(objectMap, "storageUri", d.StorageURI) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseExtensionsProperties. +func (d *DatabaseExtensionsProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "operationMode": + err = unpopulate(val, "OperationMode", &d.OperationMode) + delete(rawMsg, key) + case "storageKey": + err = unpopulate(val, "StorageKey", &d.StorageKey) + delete(rawMsg, key) + case "storageKeyType": + err = unpopulate(val, "StorageKeyType", &d.StorageKeyType) + delete(rawMsg, key) + case "storageUri": + err = unpopulate(val, "StorageURI", &d.StorageURI) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DatabaseIdentity. +func (d DatabaseIdentity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "tenantId", d.TenantID) + populate(objectMap, "type", d.Type) + populate(objectMap, "userAssignedIdentities", d.UserAssignedIdentities) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseIdentity. +func (d *DatabaseIdentity) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "tenantId": + err = unpopulate(val, "TenantID", &d.TenantID) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + delete(rawMsg, key) + case "userAssignedIdentities": + err = unpopulate(val, "UserAssignedIdentities", &d.UserAssignedIdentities) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DatabaseListResult. +func (d DatabaseListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", d.NextLink) + populate(objectMap, "value", d.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseListResult. +func (d *DatabaseListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &d.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &d.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DatabaseOperation. +func (d DatabaseOperation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", d.ID) + populate(objectMap, "name", d.Name) + populate(objectMap, "properties", d.Properties) + populate(objectMap, "type", d.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseOperation. +func (d *DatabaseOperation) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &d.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DatabaseOperationListResult. +func (d DatabaseOperationListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", d.NextLink) + populate(objectMap, "value", d.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseOperationListResult. +func (d *DatabaseOperationListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &d.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &d.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DatabaseOperationProperties. +func (d DatabaseOperationProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "databaseName", d.DatabaseName) + populate(objectMap, "description", d.Description) + populate(objectMap, "errorCode", d.ErrorCode) + populate(objectMap, "errorDescription", d.ErrorDescription) + populate(objectMap, "errorSeverity", d.ErrorSeverity) + populateDateTimeRFC3339(objectMap, "estimatedCompletionTime", d.EstimatedCompletionTime) + populate(objectMap, "isCancellable", d.IsCancellable) + populate(objectMap, "isUserError", d.IsUserError) + populate(objectMap, "operation", d.Operation) + populate(objectMap, "operationFriendlyName", d.OperationFriendlyName) + populate(objectMap, "percentComplete", d.PercentComplete) + populate(objectMap, "serverName", d.ServerName) + populateDateTimeRFC3339(objectMap, "startTime", d.StartTime) + populate(objectMap, "state", d.State) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseOperationProperties. +func (d *DatabaseOperationProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "databaseName": + err = unpopulate(val, "DatabaseName", &d.DatabaseName) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &d.Description) + delete(rawMsg, key) + case "errorCode": + err = unpopulate(val, "ErrorCode", &d.ErrorCode) + delete(rawMsg, key) + case "errorDescription": + err = unpopulate(val, "ErrorDescription", &d.ErrorDescription) + delete(rawMsg, key) + case "errorSeverity": + err = unpopulate(val, "ErrorSeverity", &d.ErrorSeverity) + delete(rawMsg, key) + case "estimatedCompletionTime": + err = unpopulateDateTimeRFC3339(val, "EstimatedCompletionTime", &d.EstimatedCompletionTime) + delete(rawMsg, key) + case "isCancellable": + err = unpopulate(val, "IsCancellable", &d.IsCancellable) + delete(rawMsg, key) + case "isUserError": + err = unpopulate(val, "IsUserError", &d.IsUserError) + delete(rawMsg, key) + case "operation": + err = unpopulate(val, "Operation", &d.Operation) + delete(rawMsg, key) + case "operationFriendlyName": + err = unpopulate(val, "OperationFriendlyName", &d.OperationFriendlyName) + delete(rawMsg, key) + case "percentComplete": + err = unpopulate(val, "PercentComplete", &d.PercentComplete) + delete(rawMsg, key) + case "serverName": + err = unpopulate(val, "ServerName", &d.ServerName) + delete(rawMsg, key) + case "startTime": + err = unpopulateDateTimeRFC3339(val, "StartTime", &d.StartTime) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &d.State) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DatabaseProperties. +func (d DatabaseProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "autoPauseDelay", d.AutoPauseDelay) + populate(objectMap, "catalogCollation", d.CatalogCollation) + populate(objectMap, "collation", d.Collation) + populate(objectMap, "createMode", d.CreateMode) + populateDateTimeRFC3339(objectMap, "creationDate", d.CreationDate) + populate(objectMap, "currentBackupStorageRedundancy", d.CurrentBackupStorageRedundancy) + populate(objectMap, "currentSku", d.CurrentSKU) + populate(objectMap, "currentServiceObjectiveName", d.CurrentServiceObjectiveName) + populate(objectMap, "databaseId", d.DatabaseID) + populate(objectMap, "defaultSecondaryLocation", d.DefaultSecondaryLocation) + populateDateTimeRFC3339(objectMap, "earliestRestoreDate", d.EarliestRestoreDate) + populate(objectMap, "elasticPoolId", d.ElasticPoolID) + populate(objectMap, "failoverGroupId", d.FailoverGroupID) + populate(objectMap, "federatedClientId", d.FederatedClientID) + populate(objectMap, "highAvailabilityReplicaCount", d.HighAvailabilityReplicaCount) + populate(objectMap, "isInfraEncryptionEnabled", d.IsInfraEncryptionEnabled) + populate(objectMap, "isLedgerOn", d.IsLedgerOn) + populate(objectMap, "licenseType", d.LicenseType) + populate(objectMap, "longTermRetentionBackupResourceId", d.LongTermRetentionBackupResourceID) + populate(objectMap, "maintenanceConfigurationId", d.MaintenanceConfigurationID) + populate(objectMap, "maxLogSizeBytes", d.MaxLogSizeBytes) + populate(objectMap, "maxSizeBytes", d.MaxSizeBytes) + populate(objectMap, "minCapacity", d.MinCapacity) + populateDateTimeRFC3339(objectMap, "pausedDate", d.PausedDate) + populate(objectMap, "readScale", d.ReadScale) + populate(objectMap, "recoverableDatabaseId", d.RecoverableDatabaseID) + populate(objectMap, "recoveryServicesRecoveryPointId", d.RecoveryServicesRecoveryPointID) + populate(objectMap, "requestedBackupStorageRedundancy", d.RequestedBackupStorageRedundancy) + populate(objectMap, "requestedServiceObjectiveName", d.RequestedServiceObjectiveName) + populate(objectMap, "restorableDroppedDatabaseId", d.RestorableDroppedDatabaseID) + populateDateTimeRFC3339(objectMap, "restorePointInTime", d.RestorePointInTime) + populateDateTimeRFC3339(objectMap, "resumedDate", d.ResumedDate) + populate(objectMap, "sampleName", d.SampleName) + populate(objectMap, "secondaryType", d.SecondaryType) + populateDateTimeRFC3339(objectMap, "sourceDatabaseDeletionDate", d.SourceDatabaseDeletionDate) + populate(objectMap, "sourceDatabaseId", d.SourceDatabaseID) + populate(objectMap, "sourceResourceId", d.SourceResourceID) + populate(objectMap, "status", d.Status) + populate(objectMap, "zoneRedundant", d.ZoneRedundant) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseProperties. +func (d *DatabaseProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "autoPauseDelay": + err = unpopulate(val, "AutoPauseDelay", &d.AutoPauseDelay) + delete(rawMsg, key) + case "catalogCollation": + err = unpopulate(val, "CatalogCollation", &d.CatalogCollation) + delete(rawMsg, key) + case "collation": + err = unpopulate(val, "Collation", &d.Collation) + delete(rawMsg, key) + case "createMode": + err = unpopulate(val, "CreateMode", &d.CreateMode) + delete(rawMsg, key) + case "creationDate": + err = unpopulateDateTimeRFC3339(val, "CreationDate", &d.CreationDate) + delete(rawMsg, key) + case "currentBackupStorageRedundancy": + err = unpopulate(val, "CurrentBackupStorageRedundancy", &d.CurrentBackupStorageRedundancy) + delete(rawMsg, key) + case "currentSku": + err = unpopulate(val, "CurrentSKU", &d.CurrentSKU) + delete(rawMsg, key) + case "currentServiceObjectiveName": + err = unpopulate(val, "CurrentServiceObjectiveName", &d.CurrentServiceObjectiveName) + delete(rawMsg, key) + case "databaseId": + err = unpopulate(val, "DatabaseID", &d.DatabaseID) + delete(rawMsg, key) + case "defaultSecondaryLocation": + err = unpopulate(val, "DefaultSecondaryLocation", &d.DefaultSecondaryLocation) + delete(rawMsg, key) + case "earliestRestoreDate": + err = unpopulateDateTimeRFC3339(val, "EarliestRestoreDate", &d.EarliestRestoreDate) + delete(rawMsg, key) + case "elasticPoolId": + err = unpopulate(val, "ElasticPoolID", &d.ElasticPoolID) + delete(rawMsg, key) + case "failoverGroupId": + err = unpopulate(val, "FailoverGroupID", &d.FailoverGroupID) + delete(rawMsg, key) + case "federatedClientId": + err = unpopulate(val, "FederatedClientID", &d.FederatedClientID) + delete(rawMsg, key) + case "highAvailabilityReplicaCount": + err = unpopulate(val, "HighAvailabilityReplicaCount", &d.HighAvailabilityReplicaCount) + delete(rawMsg, key) + case "isInfraEncryptionEnabled": + err = unpopulate(val, "IsInfraEncryptionEnabled", &d.IsInfraEncryptionEnabled) + delete(rawMsg, key) + case "isLedgerOn": + err = unpopulate(val, "IsLedgerOn", &d.IsLedgerOn) + delete(rawMsg, key) + case "licenseType": + err = unpopulate(val, "LicenseType", &d.LicenseType) + delete(rawMsg, key) + case "longTermRetentionBackupResourceId": + err = unpopulate(val, "LongTermRetentionBackupResourceID", &d.LongTermRetentionBackupResourceID) + delete(rawMsg, key) + case "maintenanceConfigurationId": + err = unpopulate(val, "MaintenanceConfigurationID", &d.MaintenanceConfigurationID) + delete(rawMsg, key) + case "maxLogSizeBytes": + err = unpopulate(val, "MaxLogSizeBytes", &d.MaxLogSizeBytes) + delete(rawMsg, key) + case "maxSizeBytes": + err = unpopulate(val, "MaxSizeBytes", &d.MaxSizeBytes) + delete(rawMsg, key) + case "minCapacity": + err = unpopulate(val, "MinCapacity", &d.MinCapacity) + delete(rawMsg, key) + case "pausedDate": + err = unpopulateDateTimeRFC3339(val, "PausedDate", &d.PausedDate) + delete(rawMsg, key) + case "readScale": + err = unpopulate(val, "ReadScale", &d.ReadScale) + delete(rawMsg, key) + case "recoverableDatabaseId": + err = unpopulate(val, "RecoverableDatabaseID", &d.RecoverableDatabaseID) + delete(rawMsg, key) + case "recoveryServicesRecoveryPointId": + err = unpopulate(val, "RecoveryServicesRecoveryPointID", &d.RecoveryServicesRecoveryPointID) + delete(rawMsg, key) + case "requestedBackupStorageRedundancy": + err = unpopulate(val, "RequestedBackupStorageRedundancy", &d.RequestedBackupStorageRedundancy) + delete(rawMsg, key) + case "requestedServiceObjectiveName": + err = unpopulate(val, "RequestedServiceObjectiveName", &d.RequestedServiceObjectiveName) + delete(rawMsg, key) + case "restorableDroppedDatabaseId": + err = unpopulate(val, "RestorableDroppedDatabaseID", &d.RestorableDroppedDatabaseID) + delete(rawMsg, key) + case "restorePointInTime": + err = unpopulateDateTimeRFC3339(val, "RestorePointInTime", &d.RestorePointInTime) + delete(rawMsg, key) + case "resumedDate": + err = unpopulateDateTimeRFC3339(val, "ResumedDate", &d.ResumedDate) + delete(rawMsg, key) + case "sampleName": + err = unpopulate(val, "SampleName", &d.SampleName) + delete(rawMsg, key) + case "secondaryType": + err = unpopulate(val, "SecondaryType", &d.SecondaryType) + delete(rawMsg, key) + case "sourceDatabaseDeletionDate": + err = unpopulateDateTimeRFC3339(val, "SourceDatabaseDeletionDate", &d.SourceDatabaseDeletionDate) + delete(rawMsg, key) + case "sourceDatabaseId": + err = unpopulate(val, "SourceDatabaseID", &d.SourceDatabaseID) + delete(rawMsg, key) + case "sourceResourceId": + err = unpopulate(val, "SourceResourceID", &d.SourceResourceID) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &d.Status) + delete(rawMsg, key) + case "zoneRedundant": + err = unpopulate(val, "ZoneRedundant", &d.ZoneRedundant) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DatabaseSchema. +func (d DatabaseSchema) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", d.ID) + populate(objectMap, "name", d.Name) + populate(objectMap, "type", d.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseSchema. +func (d *DatabaseSchema) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &d.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DatabaseSchemaListResult. +func (d DatabaseSchemaListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", d.NextLink) + populate(objectMap, "value", d.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseSchemaListResult. +func (d *DatabaseSchemaListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &d.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &d.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DatabaseSecurityAlertListResult. +func (d DatabaseSecurityAlertListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", d.NextLink) + populate(objectMap, "value", d.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseSecurityAlertListResult. +func (d *DatabaseSecurityAlertListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &d.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &d.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DatabaseSecurityAlertPolicy. +func (d DatabaseSecurityAlertPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", d.ID) + populate(objectMap, "name", d.Name) + populate(objectMap, "properties", d.Properties) + populate(objectMap, "systemData", d.SystemData) + populate(objectMap, "type", d.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseSecurityAlertPolicy. +func (d *DatabaseSecurityAlertPolicy) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &d.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &d.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DatabaseTable. +func (d DatabaseTable) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", d.ID) + populate(objectMap, "name", d.Name) + populate(objectMap, "properties", d.Properties) + populate(objectMap, "type", d.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseTable. +func (d *DatabaseTable) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &d.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DatabaseTableListResult. +func (d DatabaseTableListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", d.NextLink) + populate(objectMap, "value", d.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseTableListResult. +func (d *DatabaseTableListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &d.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &d.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DatabaseTableProperties. +func (d DatabaseTableProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "memoryOptimized", d.MemoryOptimized) + populate(objectMap, "temporalType", d.TemporalType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseTableProperties. +func (d *DatabaseTableProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "memoryOptimized": + err = unpopulate(val, "MemoryOptimized", &d.MemoryOptimized) + delete(rawMsg, key) + case "temporalType": + err = unpopulate(val, "TemporalType", &d.TemporalType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DatabaseUpdate. +func (d DatabaseUpdate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "identity", d.Identity) + populate(objectMap, "properties", d.Properties) + populate(objectMap, "sku", d.SKU) + populate(objectMap, "tags", d.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseUpdate. +func (d *DatabaseUpdate) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "identity": + err = unpopulate(val, "Identity", &d.Identity) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &d.SKU) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &d.Tags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DatabaseUpdateProperties. +func (d DatabaseUpdateProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "autoPauseDelay", d.AutoPauseDelay) + populate(objectMap, "catalogCollation", d.CatalogCollation) + populate(objectMap, "collation", d.Collation) + populate(objectMap, "createMode", d.CreateMode) + populateDateTimeRFC3339(objectMap, "creationDate", d.CreationDate) + populate(objectMap, "currentBackupStorageRedundancy", d.CurrentBackupStorageRedundancy) + populate(objectMap, "currentSku", d.CurrentSKU) + populate(objectMap, "currentServiceObjectiveName", d.CurrentServiceObjectiveName) + populate(objectMap, "databaseId", d.DatabaseID) + populate(objectMap, "defaultSecondaryLocation", d.DefaultSecondaryLocation) + populateDateTimeRFC3339(objectMap, "earliestRestoreDate", d.EarliestRestoreDate) + populate(objectMap, "elasticPoolId", d.ElasticPoolID) + populate(objectMap, "failoverGroupId", d.FailoverGroupID) + populate(objectMap, "federatedClientId", d.FederatedClientID) + populate(objectMap, "highAvailabilityReplicaCount", d.HighAvailabilityReplicaCount) + populate(objectMap, "isInfraEncryptionEnabled", d.IsInfraEncryptionEnabled) + populate(objectMap, "isLedgerOn", d.IsLedgerOn) + populate(objectMap, "licenseType", d.LicenseType) + populate(objectMap, "longTermRetentionBackupResourceId", d.LongTermRetentionBackupResourceID) + populate(objectMap, "maintenanceConfigurationId", d.MaintenanceConfigurationID) + populate(objectMap, "maxLogSizeBytes", d.MaxLogSizeBytes) + populate(objectMap, "maxSizeBytes", d.MaxSizeBytes) + populate(objectMap, "minCapacity", d.MinCapacity) + populateDateTimeRFC3339(objectMap, "pausedDate", d.PausedDate) + populate(objectMap, "readScale", d.ReadScale) + populate(objectMap, "recoverableDatabaseId", d.RecoverableDatabaseID) + populate(objectMap, "recoveryServicesRecoveryPointId", d.RecoveryServicesRecoveryPointID) + populate(objectMap, "requestedBackupStorageRedundancy", d.RequestedBackupStorageRedundancy) + populate(objectMap, "requestedServiceObjectiveName", d.RequestedServiceObjectiveName) + populate(objectMap, "restorableDroppedDatabaseId", d.RestorableDroppedDatabaseID) + populateDateTimeRFC3339(objectMap, "restorePointInTime", d.RestorePointInTime) + populateDateTimeRFC3339(objectMap, "resumedDate", d.ResumedDate) + populate(objectMap, "sampleName", d.SampleName) + populate(objectMap, "secondaryType", d.SecondaryType) + populateDateTimeRFC3339(objectMap, "sourceDatabaseDeletionDate", d.SourceDatabaseDeletionDate) + populate(objectMap, "sourceDatabaseId", d.SourceDatabaseID) + populate(objectMap, "status", d.Status) + populate(objectMap, "zoneRedundant", d.ZoneRedundant) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseUpdateProperties. +func (d *DatabaseUpdateProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "autoPauseDelay": + err = unpopulate(val, "AutoPauseDelay", &d.AutoPauseDelay) + delete(rawMsg, key) + case "catalogCollation": + err = unpopulate(val, "CatalogCollation", &d.CatalogCollation) + delete(rawMsg, key) + case "collation": + err = unpopulate(val, "Collation", &d.Collation) + delete(rawMsg, key) + case "createMode": + err = unpopulate(val, "CreateMode", &d.CreateMode) + delete(rawMsg, key) + case "creationDate": + err = unpopulateDateTimeRFC3339(val, "CreationDate", &d.CreationDate) + delete(rawMsg, key) + case "currentBackupStorageRedundancy": + err = unpopulate(val, "CurrentBackupStorageRedundancy", &d.CurrentBackupStorageRedundancy) + delete(rawMsg, key) + case "currentSku": + err = unpopulate(val, "CurrentSKU", &d.CurrentSKU) + delete(rawMsg, key) + case "currentServiceObjectiveName": + err = unpopulate(val, "CurrentServiceObjectiveName", &d.CurrentServiceObjectiveName) + delete(rawMsg, key) + case "databaseId": + err = unpopulate(val, "DatabaseID", &d.DatabaseID) + delete(rawMsg, key) + case "defaultSecondaryLocation": + err = unpopulate(val, "DefaultSecondaryLocation", &d.DefaultSecondaryLocation) + delete(rawMsg, key) + case "earliestRestoreDate": + err = unpopulateDateTimeRFC3339(val, "EarliestRestoreDate", &d.EarliestRestoreDate) + delete(rawMsg, key) + case "elasticPoolId": + err = unpopulate(val, "ElasticPoolID", &d.ElasticPoolID) + delete(rawMsg, key) + case "failoverGroupId": + err = unpopulate(val, "FailoverGroupID", &d.FailoverGroupID) + delete(rawMsg, key) + case "federatedClientId": + err = unpopulate(val, "FederatedClientID", &d.FederatedClientID) + delete(rawMsg, key) + case "highAvailabilityReplicaCount": + err = unpopulate(val, "HighAvailabilityReplicaCount", &d.HighAvailabilityReplicaCount) + delete(rawMsg, key) + case "isInfraEncryptionEnabled": + err = unpopulate(val, "IsInfraEncryptionEnabled", &d.IsInfraEncryptionEnabled) + delete(rawMsg, key) + case "isLedgerOn": + err = unpopulate(val, "IsLedgerOn", &d.IsLedgerOn) + delete(rawMsg, key) + case "licenseType": + err = unpopulate(val, "LicenseType", &d.LicenseType) + delete(rawMsg, key) + case "longTermRetentionBackupResourceId": + err = unpopulate(val, "LongTermRetentionBackupResourceID", &d.LongTermRetentionBackupResourceID) + delete(rawMsg, key) + case "maintenanceConfigurationId": + err = unpopulate(val, "MaintenanceConfigurationID", &d.MaintenanceConfigurationID) + delete(rawMsg, key) + case "maxLogSizeBytes": + err = unpopulate(val, "MaxLogSizeBytes", &d.MaxLogSizeBytes) + delete(rawMsg, key) + case "maxSizeBytes": + err = unpopulate(val, "MaxSizeBytes", &d.MaxSizeBytes) + delete(rawMsg, key) + case "minCapacity": + err = unpopulate(val, "MinCapacity", &d.MinCapacity) + delete(rawMsg, key) + case "pausedDate": + err = unpopulateDateTimeRFC3339(val, "PausedDate", &d.PausedDate) + delete(rawMsg, key) + case "readScale": + err = unpopulate(val, "ReadScale", &d.ReadScale) + delete(rawMsg, key) + case "recoverableDatabaseId": + err = unpopulate(val, "RecoverableDatabaseID", &d.RecoverableDatabaseID) + delete(rawMsg, key) + case "recoveryServicesRecoveryPointId": + err = unpopulate(val, "RecoveryServicesRecoveryPointID", &d.RecoveryServicesRecoveryPointID) + delete(rawMsg, key) + case "requestedBackupStorageRedundancy": + err = unpopulate(val, "RequestedBackupStorageRedundancy", &d.RequestedBackupStorageRedundancy) + delete(rawMsg, key) + case "requestedServiceObjectiveName": + err = unpopulate(val, "RequestedServiceObjectiveName", &d.RequestedServiceObjectiveName) + delete(rawMsg, key) + case "restorableDroppedDatabaseId": + err = unpopulate(val, "RestorableDroppedDatabaseID", &d.RestorableDroppedDatabaseID) + delete(rawMsg, key) + case "restorePointInTime": + err = unpopulateDateTimeRFC3339(val, "RestorePointInTime", &d.RestorePointInTime) + delete(rawMsg, key) + case "resumedDate": + err = unpopulateDateTimeRFC3339(val, "ResumedDate", &d.ResumedDate) + delete(rawMsg, key) + case "sampleName": + err = unpopulate(val, "SampleName", &d.SampleName) + delete(rawMsg, key) + case "secondaryType": + err = unpopulate(val, "SecondaryType", &d.SecondaryType) + delete(rawMsg, key) + case "sourceDatabaseDeletionDate": + err = unpopulateDateTimeRFC3339(val, "SourceDatabaseDeletionDate", &d.SourceDatabaseDeletionDate) + delete(rawMsg, key) + case "sourceDatabaseId": + err = unpopulate(val, "SourceDatabaseID", &d.SourceDatabaseID) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &d.Status) + delete(rawMsg, key) + case "zoneRedundant": + err = unpopulate(val, "ZoneRedundant", &d.ZoneRedundant) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DatabaseUsage. +func (d DatabaseUsage) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", d.ID) + populate(objectMap, "name", d.Name) + populate(objectMap, "properties", d.Properties) + populate(objectMap, "type", d.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseUsage. +func (d *DatabaseUsage) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &d.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DatabaseUsageListResult. +func (d DatabaseUsageListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", d.NextLink) + populate(objectMap, "value", d.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseUsageListResult. +func (d *DatabaseUsageListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &d.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &d.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DatabaseUsageProperties. +func (d DatabaseUsageProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "currentValue", d.CurrentValue) + populate(objectMap, "displayName", d.DisplayName) + populate(objectMap, "limit", d.Limit) + populate(objectMap, "unit", d.Unit) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseUsageProperties. +func (d *DatabaseUsageProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "currentValue": + err = unpopulate(val, "CurrentValue", &d.CurrentValue) + delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &d.DisplayName) + delete(rawMsg, key) + case "limit": + err = unpopulate(val, "Limit", &d.Limit) + delete(rawMsg, key) + case "unit": + err = unpopulate(val, "Unit", &d.Unit) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DatabaseUserIdentity. +func (d DatabaseUserIdentity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "clientId", d.ClientID) + populate(objectMap, "principalId", d.PrincipalID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseUserIdentity. +func (d *DatabaseUserIdentity) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "clientId": + err = unpopulate(val, "ClientID", &d.ClientID) + delete(rawMsg, key) + case "principalId": + err = unpopulate(val, "PrincipalID", &d.PrincipalID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DatabaseVulnerabilityAssessment. +func (d DatabaseVulnerabilityAssessment) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", d.ID) + populate(objectMap, "name", d.Name) + populate(objectMap, "properties", d.Properties) + populate(objectMap, "type", d.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseVulnerabilityAssessment. +func (d *DatabaseVulnerabilityAssessment) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &d.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DatabaseVulnerabilityAssessmentListResult. +func (d DatabaseVulnerabilityAssessmentListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", d.NextLink) + populate(objectMap, "value", d.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseVulnerabilityAssessmentListResult. +func (d *DatabaseVulnerabilityAssessmentListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &d.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &d.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DatabaseVulnerabilityAssessmentProperties. +func (d DatabaseVulnerabilityAssessmentProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "recurringScans", d.RecurringScans) + populate(objectMap, "storageAccountAccessKey", d.StorageAccountAccessKey) + populate(objectMap, "storageContainerPath", d.StorageContainerPath) + populate(objectMap, "storageContainerSasKey", d.StorageContainerSasKey) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseVulnerabilityAssessmentProperties. +func (d *DatabaseVulnerabilityAssessmentProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "recurringScans": + err = unpopulate(val, "RecurringScans", &d.RecurringScans) + delete(rawMsg, key) + case "storageAccountAccessKey": + err = unpopulate(val, "StorageAccountAccessKey", &d.StorageAccountAccessKey) + delete(rawMsg, key) + case "storageContainerPath": + err = unpopulate(val, "StorageContainerPath", &d.StorageContainerPath) + delete(rawMsg, key) + case "storageContainerSasKey": + err = unpopulate(val, "StorageContainerSasKey", &d.StorageContainerSasKey) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DatabaseVulnerabilityAssessmentRuleBaseline. +func (d DatabaseVulnerabilityAssessmentRuleBaseline) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", d.ID) + populate(objectMap, "name", d.Name) + populate(objectMap, "properties", d.Properties) + populate(objectMap, "type", d.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseVulnerabilityAssessmentRuleBaseline. +func (d *DatabaseVulnerabilityAssessmentRuleBaseline) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &d.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DatabaseVulnerabilityAssessmentRuleBaselineItem. +func (d DatabaseVulnerabilityAssessmentRuleBaselineItem) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "result", d.Result) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseVulnerabilityAssessmentRuleBaselineItem. +func (d *DatabaseVulnerabilityAssessmentRuleBaselineItem) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "result": + err = unpopulate(val, "Result", &d.Result) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DatabaseVulnerabilityAssessmentRuleBaselineProperties. +func (d DatabaseVulnerabilityAssessmentRuleBaselineProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "baselineResults", d.BaselineResults) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseVulnerabilityAssessmentRuleBaselineProperties. +func (d *DatabaseVulnerabilityAssessmentRuleBaselineProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "baselineResults": + err = unpopulate(val, "BaselineResults", &d.BaselineResults) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DatabaseVulnerabilityAssessmentScanExportProperties. +func (d DatabaseVulnerabilityAssessmentScanExportProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "exportedReportLocation", d.ExportedReportLocation) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseVulnerabilityAssessmentScanExportProperties. +func (d *DatabaseVulnerabilityAssessmentScanExportProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "exportedReportLocation": + err = unpopulate(val, "ExportedReportLocation", &d.ExportedReportLocation) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DatabaseVulnerabilityAssessmentScansExport. +func (d DatabaseVulnerabilityAssessmentScansExport) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", d.ID) + populate(objectMap, "name", d.Name) + populate(objectMap, "properties", d.Properties) + populate(objectMap, "type", d.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseVulnerabilityAssessmentScansExport. +func (d *DatabaseVulnerabilityAssessmentScansExport) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &d.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DeletedServer. +func (d DeletedServer) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", d.ID) + populate(objectMap, "name", d.Name) + populate(objectMap, "properties", d.Properties) + populate(objectMap, "type", d.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DeletedServer. +func (d *DeletedServer) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &d.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DeletedServerListResult. +func (d DeletedServerListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", d.NextLink) + populate(objectMap, "value", d.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DeletedServerListResult. +func (d *DeletedServerListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &d.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &d.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DeletedServerProperties. +func (d DeletedServerProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "deletionTime", d.DeletionTime) + populate(objectMap, "fullyQualifiedDomainName", d.FullyQualifiedDomainName) + populate(objectMap, "originalId", d.OriginalID) + populate(objectMap, "version", d.Version) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DeletedServerProperties. +func (d *DeletedServerProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "deletionTime": + err = unpopulateDateTimeRFC3339(val, "DeletionTime", &d.DeletionTime) + delete(rawMsg, key) + case "fullyQualifiedDomainName": + err = unpopulate(val, "FullyQualifiedDomainName", &d.FullyQualifiedDomainName) + delete(rawMsg, key) + case "originalId": + err = unpopulate(val, "OriginalID", &d.OriginalID) + delete(rawMsg, key) + case "version": + err = unpopulate(val, "Version", &d.Version) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DistributedAvailabilityGroup. +func (d DistributedAvailabilityGroup) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", d.ID) + populate(objectMap, "name", d.Name) + populate(objectMap, "properties", d.Properties) + populate(objectMap, "type", d.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DistributedAvailabilityGroup. +func (d *DistributedAvailabilityGroup) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &d.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DistributedAvailabilityGroupProperties. +func (d DistributedAvailabilityGroupProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "distributedAvailabilityGroupId", d.DistributedAvailabilityGroupID) + populate(objectMap, "lastHardenedLsn", d.LastHardenedLsn) + populate(objectMap, "linkState", d.LinkState) + populate(objectMap, "primaryAvailabilityGroupName", d.PrimaryAvailabilityGroupName) + populate(objectMap, "replicationMode", d.ReplicationMode) + populate(objectMap, "secondaryAvailabilityGroupName", d.SecondaryAvailabilityGroupName) + populate(objectMap, "sourceEndpoint", d.SourceEndpoint) + populate(objectMap, "sourceReplicaId", d.SourceReplicaID) + populate(objectMap, "targetDatabase", d.TargetDatabase) + populate(objectMap, "targetReplicaId", d.TargetReplicaID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DistributedAvailabilityGroupProperties. +func (d *DistributedAvailabilityGroupProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "distributedAvailabilityGroupId": + err = unpopulate(val, "DistributedAvailabilityGroupID", &d.DistributedAvailabilityGroupID) + delete(rawMsg, key) + case "lastHardenedLsn": + err = unpopulate(val, "LastHardenedLsn", &d.LastHardenedLsn) + delete(rawMsg, key) + case "linkState": + err = unpopulate(val, "LinkState", &d.LinkState) + delete(rawMsg, key) + case "primaryAvailabilityGroupName": + err = unpopulate(val, "PrimaryAvailabilityGroupName", &d.PrimaryAvailabilityGroupName) + delete(rawMsg, key) + case "replicationMode": + err = unpopulate(val, "ReplicationMode", &d.ReplicationMode) + delete(rawMsg, key) + case "secondaryAvailabilityGroupName": + err = unpopulate(val, "SecondaryAvailabilityGroupName", &d.SecondaryAvailabilityGroupName) + delete(rawMsg, key) + case "sourceEndpoint": + err = unpopulate(val, "SourceEndpoint", &d.SourceEndpoint) + delete(rawMsg, key) + case "sourceReplicaId": + err = unpopulate(val, "SourceReplicaID", &d.SourceReplicaID) + delete(rawMsg, key) + case "targetDatabase": + err = unpopulate(val, "TargetDatabase", &d.TargetDatabase) + delete(rawMsg, key) + case "targetReplicaId": + err = unpopulate(val, "TargetReplicaID", &d.TargetReplicaID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DistributedAvailabilityGroupsListResult. +func (d DistributedAvailabilityGroupsListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", d.NextLink) + populate(objectMap, "value", d.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DistributedAvailabilityGroupsListResult. +func (d *DistributedAvailabilityGroupsListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &d.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &d.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EditionCapability. +func (e EditionCapability) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", e.Name) + populate(objectMap, "readScale", e.ReadScale) + populate(objectMap, "reason", e.Reason) + populate(objectMap, "status", e.Status) + populate(objectMap, "supportedServiceLevelObjectives", e.SupportedServiceLevelObjectives) + populate(objectMap, "supportedStorageCapabilities", e.SupportedStorageCapabilities) + populate(objectMap, "zoneRedundant", e.ZoneRedundant) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EditionCapability. +func (e *EditionCapability) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &e.Name) + delete(rawMsg, key) + case "readScale": + err = unpopulate(val, "ReadScale", &e.ReadScale) + delete(rawMsg, key) + case "reason": + err = unpopulate(val, "Reason", &e.Reason) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &e.Status) + delete(rawMsg, key) + case "supportedServiceLevelObjectives": + err = unpopulate(val, "SupportedServiceLevelObjectives", &e.SupportedServiceLevelObjectives) + delete(rawMsg, key) + case "supportedStorageCapabilities": + err = unpopulate(val, "SupportedStorageCapabilities", &e.SupportedStorageCapabilities) + delete(rawMsg, key) + case "zoneRedundant": + err = unpopulate(val, "ZoneRedundant", &e.ZoneRedundant) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ElasticPool. +func (e ElasticPool) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", e.ID) + populate(objectMap, "kind", e.Kind) + populate(objectMap, "location", e.Location) + populate(objectMap, "name", e.Name) + populate(objectMap, "properties", e.Properties) + populate(objectMap, "sku", e.SKU) + populate(objectMap, "tags", e.Tags) + populate(objectMap, "type", e.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ElasticPool. +func (e *ElasticPool) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &e.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &e.Kind) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &e.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &e.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &e.Properties) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &e.SKU) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &e.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &e.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ElasticPoolActivity. +func (e ElasticPoolActivity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", e.ID) + populate(objectMap, "location", e.Location) + populate(objectMap, "name", e.Name) + populate(objectMap, "properties", e.Properties) + populate(objectMap, "type", e.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ElasticPoolActivity. +func (e *ElasticPoolActivity) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &e.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &e.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &e.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &e.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &e.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ElasticPoolActivityListResult. +func (e ElasticPoolActivityListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", e.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ElasticPoolActivityListResult. +func (e *ElasticPoolActivityListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &e.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ElasticPoolActivityProperties. +func (e ElasticPoolActivityProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "elasticPoolName", e.ElasticPoolName) + populateDateTimeRFC3339(objectMap, "endTime", e.EndTime) + populate(objectMap, "errorCode", e.ErrorCode) + populate(objectMap, "errorMessage", e.ErrorMessage) + populate(objectMap, "errorSeverity", e.ErrorSeverity) + populate(objectMap, "operation", e.Operation) + populate(objectMap, "operationId", e.OperationID) + populate(objectMap, "percentComplete", e.PercentComplete) + populate(objectMap, "requestedDatabaseDtuCap", e.RequestedDatabaseDtuCap) + populate(objectMap, "requestedDatabaseDtuGuarantee", e.RequestedDatabaseDtuGuarantee) + populate(objectMap, "requestedDatabaseDtuMax", e.RequestedDatabaseDtuMax) + populate(objectMap, "requestedDatabaseDtuMin", e.RequestedDatabaseDtuMin) + populate(objectMap, "requestedDtu", e.RequestedDtu) + populate(objectMap, "requestedDtuGuarantee", e.RequestedDtuGuarantee) + populate(objectMap, "requestedElasticPoolName", e.RequestedElasticPoolName) + populate(objectMap, "requestedStorageLimitInGB", e.RequestedStorageLimitInGB) + populate(objectMap, "requestedStorageLimitInMB", e.RequestedStorageLimitInMB) + populate(objectMap, "serverName", e.ServerName) + populateDateTimeRFC3339(objectMap, "startTime", e.StartTime) + populate(objectMap, "state", e.State) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ElasticPoolActivityProperties. +func (e *ElasticPoolActivityProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "elasticPoolName": + err = unpopulate(val, "ElasticPoolName", &e.ElasticPoolName) + delete(rawMsg, key) + case "endTime": + err = unpopulateDateTimeRFC3339(val, "EndTime", &e.EndTime) + delete(rawMsg, key) + case "errorCode": + err = unpopulate(val, "ErrorCode", &e.ErrorCode) + delete(rawMsg, key) + case "errorMessage": + err = unpopulate(val, "ErrorMessage", &e.ErrorMessage) + delete(rawMsg, key) + case "errorSeverity": + err = unpopulate(val, "ErrorSeverity", &e.ErrorSeverity) + delete(rawMsg, key) + case "operation": + err = unpopulate(val, "Operation", &e.Operation) + delete(rawMsg, key) + case "operationId": + err = unpopulate(val, "OperationID", &e.OperationID) + delete(rawMsg, key) + case "percentComplete": + err = unpopulate(val, "PercentComplete", &e.PercentComplete) + delete(rawMsg, key) + case "requestedDatabaseDtuCap": + err = unpopulate(val, "RequestedDatabaseDtuCap", &e.RequestedDatabaseDtuCap) + delete(rawMsg, key) + case "requestedDatabaseDtuGuarantee": + err = unpopulate(val, "RequestedDatabaseDtuGuarantee", &e.RequestedDatabaseDtuGuarantee) + delete(rawMsg, key) + case "requestedDatabaseDtuMax": + err = unpopulate(val, "RequestedDatabaseDtuMax", &e.RequestedDatabaseDtuMax) + delete(rawMsg, key) + case "requestedDatabaseDtuMin": + err = unpopulate(val, "RequestedDatabaseDtuMin", &e.RequestedDatabaseDtuMin) + delete(rawMsg, key) + case "requestedDtu": + err = unpopulate(val, "RequestedDtu", &e.RequestedDtu) + delete(rawMsg, key) + case "requestedDtuGuarantee": + err = unpopulate(val, "RequestedDtuGuarantee", &e.RequestedDtuGuarantee) + delete(rawMsg, key) + case "requestedElasticPoolName": + err = unpopulate(val, "RequestedElasticPoolName", &e.RequestedElasticPoolName) + delete(rawMsg, key) + case "requestedStorageLimitInGB": + err = unpopulate(val, "RequestedStorageLimitInGB", &e.RequestedStorageLimitInGB) + delete(rawMsg, key) + case "requestedStorageLimitInMB": + err = unpopulate(val, "RequestedStorageLimitInMB", &e.RequestedStorageLimitInMB) + delete(rawMsg, key) + case "serverName": + err = unpopulate(val, "ServerName", &e.ServerName) + delete(rawMsg, key) + case "startTime": + err = unpopulateDateTimeRFC3339(val, "StartTime", &e.StartTime) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &e.State) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ElasticPoolDatabaseActivity. +func (e ElasticPoolDatabaseActivity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", e.ID) + populate(objectMap, "location", e.Location) + populate(objectMap, "name", e.Name) + populate(objectMap, "properties", e.Properties) + populate(objectMap, "type", e.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ElasticPoolDatabaseActivity. +func (e *ElasticPoolDatabaseActivity) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &e.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &e.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &e.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &e.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &e.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ElasticPoolDatabaseActivityListResult. +func (e ElasticPoolDatabaseActivityListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", e.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ElasticPoolDatabaseActivityListResult. +func (e *ElasticPoolDatabaseActivityListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &e.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ElasticPoolDatabaseActivityProperties. +func (e ElasticPoolDatabaseActivityProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "currentElasticPoolName", e.CurrentElasticPoolName) + populate(objectMap, "currentServiceObjective", e.CurrentServiceObjective) + populate(objectMap, "databaseName", e.DatabaseName) + populateDateTimeRFC3339(objectMap, "endTime", e.EndTime) + populate(objectMap, "errorCode", e.ErrorCode) + populate(objectMap, "errorMessage", e.ErrorMessage) + populate(objectMap, "errorSeverity", e.ErrorSeverity) + populate(objectMap, "operation", e.Operation) + populate(objectMap, "operationId", e.OperationID) + populate(objectMap, "percentComplete", e.PercentComplete) + populate(objectMap, "requestedElasticPoolName", e.RequestedElasticPoolName) + populate(objectMap, "requestedServiceObjective", e.RequestedServiceObjective) + populate(objectMap, "serverName", e.ServerName) + populateDateTimeRFC3339(objectMap, "startTime", e.StartTime) + populate(objectMap, "state", e.State) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ElasticPoolDatabaseActivityProperties. +func (e *ElasticPoolDatabaseActivityProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "currentElasticPoolName": + err = unpopulate(val, "CurrentElasticPoolName", &e.CurrentElasticPoolName) + delete(rawMsg, key) + case "currentServiceObjective": + err = unpopulate(val, "CurrentServiceObjective", &e.CurrentServiceObjective) + delete(rawMsg, key) + case "databaseName": + err = unpopulate(val, "DatabaseName", &e.DatabaseName) + delete(rawMsg, key) + case "endTime": + err = unpopulateDateTimeRFC3339(val, "EndTime", &e.EndTime) + delete(rawMsg, key) + case "errorCode": + err = unpopulate(val, "ErrorCode", &e.ErrorCode) + delete(rawMsg, key) + case "errorMessage": + err = unpopulate(val, "ErrorMessage", &e.ErrorMessage) + delete(rawMsg, key) + case "errorSeverity": + err = unpopulate(val, "ErrorSeverity", &e.ErrorSeverity) + delete(rawMsg, key) + case "operation": + err = unpopulate(val, "Operation", &e.Operation) + delete(rawMsg, key) + case "operationId": + err = unpopulate(val, "OperationID", &e.OperationID) + delete(rawMsg, key) + case "percentComplete": + err = unpopulate(val, "PercentComplete", &e.PercentComplete) + delete(rawMsg, key) + case "requestedElasticPoolName": + err = unpopulate(val, "RequestedElasticPoolName", &e.RequestedElasticPoolName) + delete(rawMsg, key) + case "requestedServiceObjective": + err = unpopulate(val, "RequestedServiceObjective", &e.RequestedServiceObjective) + delete(rawMsg, key) + case "serverName": + err = unpopulate(val, "ServerName", &e.ServerName) + delete(rawMsg, key) + case "startTime": + err = unpopulateDateTimeRFC3339(val, "StartTime", &e.StartTime) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &e.State) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ElasticPoolEditionCapability. +func (e ElasticPoolEditionCapability) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", e.Name) + populate(objectMap, "reason", e.Reason) + populate(objectMap, "status", e.Status) + populate(objectMap, "supportedElasticPoolPerformanceLevels", e.SupportedElasticPoolPerformanceLevels) + populate(objectMap, "zoneRedundant", e.ZoneRedundant) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ElasticPoolEditionCapability. +func (e *ElasticPoolEditionCapability) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &e.Name) + delete(rawMsg, key) + case "reason": + err = unpopulate(val, "Reason", &e.Reason) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &e.Status) + delete(rawMsg, key) + case "supportedElasticPoolPerformanceLevels": + err = unpopulate(val, "SupportedElasticPoolPerformanceLevels", &e.SupportedElasticPoolPerformanceLevels) + delete(rawMsg, key) + case "zoneRedundant": + err = unpopulate(val, "ZoneRedundant", &e.ZoneRedundant) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ElasticPoolListResult. +func (e ElasticPoolListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", e.NextLink) + populate(objectMap, "value", e.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ElasticPoolListResult. +func (e *ElasticPoolListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &e.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &e.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ElasticPoolOperation. +func (e ElasticPoolOperation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", e.ID) + populate(objectMap, "name", e.Name) + populate(objectMap, "properties", e.Properties) + populate(objectMap, "type", e.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ElasticPoolOperation. +func (e *ElasticPoolOperation) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &e.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &e.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &e.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &e.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ElasticPoolOperationListResult. +func (e ElasticPoolOperationListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", e.NextLink) + populate(objectMap, "value", e.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ElasticPoolOperationListResult. +func (e *ElasticPoolOperationListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &e.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &e.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ElasticPoolOperationProperties. +func (e ElasticPoolOperationProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", e.Description) + populate(objectMap, "elasticPoolName", e.ElasticPoolName) + populate(objectMap, "errorCode", e.ErrorCode) + populate(objectMap, "errorDescription", e.ErrorDescription) + populate(objectMap, "errorSeverity", e.ErrorSeverity) + populateDateTimeRFC3339(objectMap, "estimatedCompletionTime", e.EstimatedCompletionTime) + populate(objectMap, "isCancellable", e.IsCancellable) + populate(objectMap, "isUserError", e.IsUserError) + populate(objectMap, "operation", e.Operation) + populate(objectMap, "operationFriendlyName", e.OperationFriendlyName) + populate(objectMap, "percentComplete", e.PercentComplete) + populate(objectMap, "serverName", e.ServerName) + populateDateTimeRFC3339(objectMap, "startTime", e.StartTime) + populate(objectMap, "state", e.State) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ElasticPoolOperationProperties. +func (e *ElasticPoolOperationProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &e.Description) + delete(rawMsg, key) + case "elasticPoolName": + err = unpopulate(val, "ElasticPoolName", &e.ElasticPoolName) + delete(rawMsg, key) + case "errorCode": + err = unpopulate(val, "ErrorCode", &e.ErrorCode) + delete(rawMsg, key) + case "errorDescription": + err = unpopulate(val, "ErrorDescription", &e.ErrorDescription) + delete(rawMsg, key) + case "errorSeverity": + err = unpopulate(val, "ErrorSeverity", &e.ErrorSeverity) + delete(rawMsg, key) + case "estimatedCompletionTime": + err = unpopulateDateTimeRFC3339(val, "EstimatedCompletionTime", &e.EstimatedCompletionTime) + delete(rawMsg, key) + case "isCancellable": + err = unpopulate(val, "IsCancellable", &e.IsCancellable) + delete(rawMsg, key) + case "isUserError": + err = unpopulate(val, "IsUserError", &e.IsUserError) + delete(rawMsg, key) + case "operation": + err = unpopulate(val, "Operation", &e.Operation) + delete(rawMsg, key) + case "operationFriendlyName": + err = unpopulate(val, "OperationFriendlyName", &e.OperationFriendlyName) + delete(rawMsg, key) + case "percentComplete": + err = unpopulate(val, "PercentComplete", &e.PercentComplete) + delete(rawMsg, key) + case "serverName": + err = unpopulate(val, "ServerName", &e.ServerName) + delete(rawMsg, key) + case "startTime": + err = unpopulateDateTimeRFC3339(val, "StartTime", &e.StartTime) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &e.State) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ElasticPoolPerDatabaseMaxPerformanceLevelCapability. +func (e ElasticPoolPerDatabaseMaxPerformanceLevelCapability) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "limit", e.Limit) + populate(objectMap, "reason", e.Reason) + populate(objectMap, "status", e.Status) + populate(objectMap, "supportedPerDatabaseMinPerformanceLevels", e.SupportedPerDatabaseMinPerformanceLevels) + populate(objectMap, "unit", e.Unit) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ElasticPoolPerDatabaseMaxPerformanceLevelCapability. +func (e *ElasticPoolPerDatabaseMaxPerformanceLevelCapability) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "limit": + err = unpopulate(val, "Limit", &e.Limit) + delete(rawMsg, key) + case "reason": + err = unpopulate(val, "Reason", &e.Reason) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &e.Status) + delete(rawMsg, key) + case "supportedPerDatabaseMinPerformanceLevels": + err = unpopulate(val, "SupportedPerDatabaseMinPerformanceLevels", &e.SupportedPerDatabaseMinPerformanceLevels) + delete(rawMsg, key) + case "unit": + err = unpopulate(val, "Unit", &e.Unit) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ElasticPoolPerDatabaseMinPerformanceLevelCapability. +func (e ElasticPoolPerDatabaseMinPerformanceLevelCapability) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "limit", e.Limit) + populate(objectMap, "reason", e.Reason) + populate(objectMap, "status", e.Status) + populate(objectMap, "unit", e.Unit) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ElasticPoolPerDatabaseMinPerformanceLevelCapability. +func (e *ElasticPoolPerDatabaseMinPerformanceLevelCapability) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "limit": + err = unpopulate(val, "Limit", &e.Limit) + delete(rawMsg, key) + case "reason": + err = unpopulate(val, "Reason", &e.Reason) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &e.Status) + delete(rawMsg, key) + case "unit": + err = unpopulate(val, "Unit", &e.Unit) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ElasticPoolPerDatabaseSettings. +func (e ElasticPoolPerDatabaseSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "maxCapacity", e.MaxCapacity) + populate(objectMap, "minCapacity", e.MinCapacity) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ElasticPoolPerDatabaseSettings. +func (e *ElasticPoolPerDatabaseSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "maxCapacity": + err = unpopulate(val, "MaxCapacity", &e.MaxCapacity) + delete(rawMsg, key) + case "minCapacity": + err = unpopulate(val, "MinCapacity", &e.MinCapacity) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ElasticPoolPerformanceLevelCapability. +func (e ElasticPoolPerformanceLevelCapability) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "includedMaxSize", e.IncludedMaxSize) + populate(objectMap, "maxDatabaseCount", e.MaxDatabaseCount) + populate(objectMap, "performanceLevel", e.PerformanceLevel) + populate(objectMap, "reason", e.Reason) + populate(objectMap, "sku", e.SKU) + populate(objectMap, "status", e.Status) + populate(objectMap, "supportedLicenseTypes", e.SupportedLicenseTypes) + populate(objectMap, "supportedMaintenanceConfigurations", e.SupportedMaintenanceConfigurations) + populate(objectMap, "supportedMaxSizes", e.SupportedMaxSizes) + populate(objectMap, "supportedPerDatabaseMaxPerformanceLevels", e.SupportedPerDatabaseMaxPerformanceLevels) + populate(objectMap, "supportedPerDatabaseMaxSizes", e.SupportedPerDatabaseMaxSizes) + populate(objectMap, "zoneRedundant", e.ZoneRedundant) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ElasticPoolPerformanceLevelCapability. +func (e *ElasticPoolPerformanceLevelCapability) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "includedMaxSize": + err = unpopulate(val, "IncludedMaxSize", &e.IncludedMaxSize) + delete(rawMsg, key) + case "maxDatabaseCount": + err = unpopulate(val, "MaxDatabaseCount", &e.MaxDatabaseCount) + delete(rawMsg, key) + case "performanceLevel": + err = unpopulate(val, "PerformanceLevel", &e.PerformanceLevel) + delete(rawMsg, key) + case "reason": + err = unpopulate(val, "Reason", &e.Reason) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &e.SKU) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &e.Status) + delete(rawMsg, key) + case "supportedLicenseTypes": + err = unpopulate(val, "SupportedLicenseTypes", &e.SupportedLicenseTypes) + delete(rawMsg, key) + case "supportedMaintenanceConfigurations": + err = unpopulate(val, "SupportedMaintenanceConfigurations", &e.SupportedMaintenanceConfigurations) + delete(rawMsg, key) + case "supportedMaxSizes": + err = unpopulate(val, "SupportedMaxSizes", &e.SupportedMaxSizes) + delete(rawMsg, key) + case "supportedPerDatabaseMaxPerformanceLevels": + err = unpopulate(val, "SupportedPerDatabaseMaxPerformanceLevels", &e.SupportedPerDatabaseMaxPerformanceLevels) + delete(rawMsg, key) + case "supportedPerDatabaseMaxSizes": + err = unpopulate(val, "SupportedPerDatabaseMaxSizes", &e.SupportedPerDatabaseMaxSizes) + delete(rawMsg, key) + case "zoneRedundant": + err = unpopulate(val, "ZoneRedundant", &e.ZoneRedundant) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ElasticPoolProperties. +func (e ElasticPoolProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "creationDate", e.CreationDate) + populate(objectMap, "highAvailabilityReplicaCount", e.HighAvailabilityReplicaCount) + populate(objectMap, "licenseType", e.LicenseType) + populate(objectMap, "maintenanceConfigurationId", e.MaintenanceConfigurationID) + populate(objectMap, "maxSizeBytes", e.MaxSizeBytes) + populate(objectMap, "perDatabaseSettings", e.PerDatabaseSettings) + populate(objectMap, "state", e.State) + populate(objectMap, "zoneRedundant", e.ZoneRedundant) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ElasticPoolProperties. +func (e *ElasticPoolProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "creationDate": + err = unpopulateDateTimeRFC3339(val, "CreationDate", &e.CreationDate) + delete(rawMsg, key) + case "highAvailabilityReplicaCount": + err = unpopulate(val, "HighAvailabilityReplicaCount", &e.HighAvailabilityReplicaCount) + delete(rawMsg, key) + case "licenseType": + err = unpopulate(val, "LicenseType", &e.LicenseType) + delete(rawMsg, key) + case "maintenanceConfigurationId": + err = unpopulate(val, "MaintenanceConfigurationID", &e.MaintenanceConfigurationID) + delete(rawMsg, key) + case "maxSizeBytes": + err = unpopulate(val, "MaxSizeBytes", &e.MaxSizeBytes) + delete(rawMsg, key) + case "perDatabaseSettings": + err = unpopulate(val, "PerDatabaseSettings", &e.PerDatabaseSettings) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &e.State) + delete(rawMsg, key) + case "zoneRedundant": + err = unpopulate(val, "ZoneRedundant", &e.ZoneRedundant) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ElasticPoolUpdate. +func (e ElasticPoolUpdate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", e.Properties) + populate(objectMap, "sku", e.SKU) + populate(objectMap, "tags", e.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ElasticPoolUpdate. +func (e *ElasticPoolUpdate) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &e.Properties) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &e.SKU) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &e.Tags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ElasticPoolUpdateProperties. +func (e ElasticPoolUpdateProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "highAvailabilityReplicaCount", e.HighAvailabilityReplicaCount) + populate(objectMap, "licenseType", e.LicenseType) + populate(objectMap, "maintenanceConfigurationId", e.MaintenanceConfigurationID) + populate(objectMap, "maxSizeBytes", e.MaxSizeBytes) + populate(objectMap, "perDatabaseSettings", e.PerDatabaseSettings) + populate(objectMap, "zoneRedundant", e.ZoneRedundant) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ElasticPoolUpdateProperties. +func (e *ElasticPoolUpdateProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "highAvailabilityReplicaCount": + err = unpopulate(val, "HighAvailabilityReplicaCount", &e.HighAvailabilityReplicaCount) + delete(rawMsg, key) + case "licenseType": + err = unpopulate(val, "LicenseType", &e.LicenseType) + delete(rawMsg, key) + case "maintenanceConfigurationId": + err = unpopulate(val, "MaintenanceConfigurationID", &e.MaintenanceConfigurationID) + delete(rawMsg, key) + case "maxSizeBytes": + err = unpopulate(val, "MaxSizeBytes", &e.MaxSizeBytes) + delete(rawMsg, key) + case "perDatabaseSettings": + err = unpopulate(val, "PerDatabaseSettings", &e.PerDatabaseSettings) + delete(rawMsg, key) + case "zoneRedundant": + err = unpopulate(val, "ZoneRedundant", &e.ZoneRedundant) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EncryptionProtector. +func (e EncryptionProtector) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", e.ID) + populate(objectMap, "kind", e.Kind) + populate(objectMap, "location", e.Location) + populate(objectMap, "name", e.Name) + populate(objectMap, "properties", e.Properties) + populate(objectMap, "type", e.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EncryptionProtector. +func (e *EncryptionProtector) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &e.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &e.Kind) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &e.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &e.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &e.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &e.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EncryptionProtectorListResult. +func (e EncryptionProtectorListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", e.NextLink) + populate(objectMap, "value", e.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EncryptionProtectorListResult. +func (e *EncryptionProtectorListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &e.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &e.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EncryptionProtectorProperties. +func (e EncryptionProtectorProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "autoRotationEnabled", e.AutoRotationEnabled) + populate(objectMap, "serverKeyName", e.ServerKeyName) + populate(objectMap, "serverKeyType", e.ServerKeyType) + populate(objectMap, "subregion", e.Subregion) + populate(objectMap, "thumbprint", e.Thumbprint) + populate(objectMap, "uri", e.URI) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EncryptionProtectorProperties. +func (e *EncryptionProtectorProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "autoRotationEnabled": + err = unpopulate(val, "AutoRotationEnabled", &e.AutoRotationEnabled) + delete(rawMsg, key) + case "serverKeyName": + err = unpopulate(val, "ServerKeyName", &e.ServerKeyName) + delete(rawMsg, key) + case "serverKeyType": + err = unpopulate(val, "ServerKeyType", &e.ServerKeyType) + delete(rawMsg, key) + case "subregion": + err = unpopulate(val, "Subregion", &e.Subregion) + delete(rawMsg, key) + case "thumbprint": + err = unpopulate(val, "Thumbprint", &e.Thumbprint) + delete(rawMsg, key) + case "uri": + err = unpopulate(val, "URI", &e.URI) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EndpointCertificate. +func (e EndpointCertificate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", e.ID) + populate(objectMap, "name", e.Name) + populate(objectMap, "properties", e.Properties) + populate(objectMap, "type", e.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EndpointCertificate. +func (e *EndpointCertificate) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &e.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &e.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &e.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &e.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EndpointCertificateListResult. +func (e EndpointCertificateListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", e.NextLink) + populate(objectMap, "value", e.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EndpointCertificateListResult. +func (e *EndpointCertificateListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &e.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &e.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EndpointCertificateProperties. +func (e EndpointCertificateProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "publicBlob", e.PublicBlob) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EndpointCertificateProperties. +func (e *EndpointCertificateProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "publicBlob": + err = unpopulate(val, "PublicBlob", &e.PublicBlob) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExportDatabaseDefinition. +func (e ExportDatabaseDefinition) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "administratorLogin", e.AdministratorLogin) + populate(objectMap, "administratorLoginPassword", e.AdministratorLoginPassword) + populate(objectMap, "authenticationType", e.AuthenticationType) + populate(objectMap, "networkIsolation", e.NetworkIsolation) + populate(objectMap, "storageKey", e.StorageKey) + populate(objectMap, "storageKeyType", e.StorageKeyType) + populate(objectMap, "storageUri", e.StorageURI) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExportDatabaseDefinition. +func (e *ExportDatabaseDefinition) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "administratorLogin": + err = unpopulate(val, "AdministratorLogin", &e.AdministratorLogin) + delete(rawMsg, key) + case "administratorLoginPassword": + err = unpopulate(val, "AdministratorLoginPassword", &e.AdministratorLoginPassword) + delete(rawMsg, key) + case "authenticationType": + err = unpopulate(val, "AuthenticationType", &e.AuthenticationType) + delete(rawMsg, key) + case "networkIsolation": + err = unpopulate(val, "NetworkIsolation", &e.NetworkIsolation) + delete(rawMsg, key) + case "storageKey": + err = unpopulate(val, "StorageKey", &e.StorageKey) + delete(rawMsg, key) + case "storageKeyType": + err = unpopulate(val, "StorageKeyType", &e.StorageKeyType) + delete(rawMsg, key) + case "storageUri": + err = unpopulate(val, "StorageURI", &e.StorageURI) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExtendedDatabaseBlobAuditingPolicy. +func (e ExtendedDatabaseBlobAuditingPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", e.ID) + populate(objectMap, "name", e.Name) + populate(objectMap, "properties", e.Properties) + populate(objectMap, "type", e.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExtendedDatabaseBlobAuditingPolicy. +func (e *ExtendedDatabaseBlobAuditingPolicy) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &e.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &e.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &e.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &e.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExtendedDatabaseBlobAuditingPolicyListResult. +func (e ExtendedDatabaseBlobAuditingPolicyListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", e.NextLink) + populate(objectMap, "value", e.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExtendedDatabaseBlobAuditingPolicyListResult. +func (e *ExtendedDatabaseBlobAuditingPolicyListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &e.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &e.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExtendedDatabaseBlobAuditingPolicyProperties. +func (e ExtendedDatabaseBlobAuditingPolicyProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "auditActionsAndGroups", e.AuditActionsAndGroups) + populate(objectMap, "isAzureMonitorTargetEnabled", e.IsAzureMonitorTargetEnabled) + populate(objectMap, "isManagedIdentityInUse", e.IsManagedIdentityInUse) + populate(objectMap, "isStorageSecondaryKeyInUse", e.IsStorageSecondaryKeyInUse) + populate(objectMap, "predicateExpression", e.PredicateExpression) + populate(objectMap, "queueDelayMs", e.QueueDelayMs) + populate(objectMap, "retentionDays", e.RetentionDays) + populate(objectMap, "state", e.State) + populate(objectMap, "storageAccountAccessKey", e.StorageAccountAccessKey) + populate(objectMap, "storageAccountSubscriptionId", e.StorageAccountSubscriptionID) + populate(objectMap, "storageEndpoint", e.StorageEndpoint) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExtendedDatabaseBlobAuditingPolicyProperties. +func (e *ExtendedDatabaseBlobAuditingPolicyProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "auditActionsAndGroups": + err = unpopulate(val, "AuditActionsAndGroups", &e.AuditActionsAndGroups) + delete(rawMsg, key) + case "isAzureMonitorTargetEnabled": + err = unpopulate(val, "IsAzureMonitorTargetEnabled", &e.IsAzureMonitorTargetEnabled) + delete(rawMsg, key) + case "isManagedIdentityInUse": + err = unpopulate(val, "IsManagedIdentityInUse", &e.IsManagedIdentityInUse) + delete(rawMsg, key) + case "isStorageSecondaryKeyInUse": + err = unpopulate(val, "IsStorageSecondaryKeyInUse", &e.IsStorageSecondaryKeyInUse) + delete(rawMsg, key) + case "predicateExpression": + err = unpopulate(val, "PredicateExpression", &e.PredicateExpression) + delete(rawMsg, key) + case "queueDelayMs": + err = unpopulate(val, "QueueDelayMs", &e.QueueDelayMs) + delete(rawMsg, key) + case "retentionDays": + err = unpopulate(val, "RetentionDays", &e.RetentionDays) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &e.State) + delete(rawMsg, key) + case "storageAccountAccessKey": + err = unpopulate(val, "StorageAccountAccessKey", &e.StorageAccountAccessKey) + delete(rawMsg, key) + case "storageAccountSubscriptionId": + err = unpopulate(val, "StorageAccountSubscriptionID", &e.StorageAccountSubscriptionID) + delete(rawMsg, key) + case "storageEndpoint": + err = unpopulate(val, "StorageEndpoint", &e.StorageEndpoint) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExtendedServerBlobAuditingPolicy. +func (e ExtendedServerBlobAuditingPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", e.ID) + populate(objectMap, "name", e.Name) + populate(objectMap, "properties", e.Properties) + populate(objectMap, "type", e.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExtendedServerBlobAuditingPolicy. +func (e *ExtendedServerBlobAuditingPolicy) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &e.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &e.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &e.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &e.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExtendedServerBlobAuditingPolicyListResult. +func (e ExtendedServerBlobAuditingPolicyListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", e.NextLink) + populate(objectMap, "value", e.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExtendedServerBlobAuditingPolicyListResult. +func (e *ExtendedServerBlobAuditingPolicyListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &e.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &e.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExtendedServerBlobAuditingPolicyProperties. +func (e ExtendedServerBlobAuditingPolicyProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "auditActionsAndGroups", e.AuditActionsAndGroups) + populate(objectMap, "isAzureMonitorTargetEnabled", e.IsAzureMonitorTargetEnabled) + populate(objectMap, "isDevopsAuditEnabled", e.IsDevopsAuditEnabled) + populate(objectMap, "isManagedIdentityInUse", e.IsManagedIdentityInUse) + populate(objectMap, "isStorageSecondaryKeyInUse", e.IsStorageSecondaryKeyInUse) + populate(objectMap, "predicateExpression", e.PredicateExpression) + populate(objectMap, "queueDelayMs", e.QueueDelayMs) + populate(objectMap, "retentionDays", e.RetentionDays) + populate(objectMap, "state", e.State) + populate(objectMap, "storageAccountAccessKey", e.StorageAccountAccessKey) + populate(objectMap, "storageAccountSubscriptionId", e.StorageAccountSubscriptionID) + populate(objectMap, "storageEndpoint", e.StorageEndpoint) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExtendedServerBlobAuditingPolicyProperties. +func (e *ExtendedServerBlobAuditingPolicyProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "auditActionsAndGroups": + err = unpopulate(val, "AuditActionsAndGroups", &e.AuditActionsAndGroups) + delete(rawMsg, key) + case "isAzureMonitorTargetEnabled": + err = unpopulate(val, "IsAzureMonitorTargetEnabled", &e.IsAzureMonitorTargetEnabled) + delete(rawMsg, key) + case "isDevopsAuditEnabled": + err = unpopulate(val, "IsDevopsAuditEnabled", &e.IsDevopsAuditEnabled) + delete(rawMsg, key) + case "isManagedIdentityInUse": + err = unpopulate(val, "IsManagedIdentityInUse", &e.IsManagedIdentityInUse) + delete(rawMsg, key) + case "isStorageSecondaryKeyInUse": + err = unpopulate(val, "IsStorageSecondaryKeyInUse", &e.IsStorageSecondaryKeyInUse) + delete(rawMsg, key) + case "predicateExpression": + err = unpopulate(val, "PredicateExpression", &e.PredicateExpression) + delete(rawMsg, key) + case "queueDelayMs": + err = unpopulate(val, "QueueDelayMs", &e.QueueDelayMs) + delete(rawMsg, key) + case "retentionDays": + err = unpopulate(val, "RetentionDays", &e.RetentionDays) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &e.State) + delete(rawMsg, key) + case "storageAccountAccessKey": + err = unpopulate(val, "StorageAccountAccessKey", &e.StorageAccountAccessKey) + delete(rawMsg, key) + case "storageAccountSubscriptionId": + err = unpopulate(val, "StorageAccountSubscriptionID", &e.StorageAccountSubscriptionID) + delete(rawMsg, key) + case "storageEndpoint": + err = unpopulate(val, "StorageEndpoint", &e.StorageEndpoint) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FailoverGroup. +func (f FailoverGroup) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", f.ID) + populate(objectMap, "location", f.Location) + populate(objectMap, "name", f.Name) + populate(objectMap, "properties", f.Properties) + populate(objectMap, "tags", f.Tags) + populate(objectMap, "type", f.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FailoverGroup. +func (f *FailoverGroup) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &f.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &f.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &f.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &f.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &f.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &f.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FailoverGroupListResult. +func (f FailoverGroupListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", f.NextLink) + populate(objectMap, "value", f.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FailoverGroupListResult. +func (f *FailoverGroupListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &f.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &f.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FailoverGroupProperties. +func (f FailoverGroupProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "databases", f.Databases) + populate(objectMap, "partnerServers", f.PartnerServers) + populate(objectMap, "readOnlyEndpoint", f.ReadOnlyEndpoint) + populate(objectMap, "readWriteEndpoint", f.ReadWriteEndpoint) + populate(objectMap, "replicationRole", f.ReplicationRole) + populate(objectMap, "replicationState", f.ReplicationState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FailoverGroupProperties. +func (f *FailoverGroupProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "databases": + err = unpopulate(val, "Databases", &f.Databases) + delete(rawMsg, key) + case "partnerServers": + err = unpopulate(val, "PartnerServers", &f.PartnerServers) + delete(rawMsg, key) + case "readOnlyEndpoint": + err = unpopulate(val, "ReadOnlyEndpoint", &f.ReadOnlyEndpoint) + delete(rawMsg, key) + case "readWriteEndpoint": + err = unpopulate(val, "ReadWriteEndpoint", &f.ReadWriteEndpoint) + delete(rawMsg, key) + case "replicationRole": + err = unpopulate(val, "ReplicationRole", &f.ReplicationRole) + delete(rawMsg, key) + case "replicationState": + err = unpopulate(val, "ReplicationState", &f.ReplicationState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FailoverGroupReadOnlyEndpoint. +func (f FailoverGroupReadOnlyEndpoint) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "failoverPolicy", f.FailoverPolicy) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FailoverGroupReadOnlyEndpoint. +func (f *FailoverGroupReadOnlyEndpoint) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "failoverPolicy": + err = unpopulate(val, "FailoverPolicy", &f.FailoverPolicy) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FailoverGroupReadWriteEndpoint. +func (f FailoverGroupReadWriteEndpoint) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "failoverPolicy", f.FailoverPolicy) + populate(objectMap, "failoverWithDataLossGracePeriodMinutes", f.FailoverWithDataLossGracePeriodMinutes) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FailoverGroupReadWriteEndpoint. +func (f *FailoverGroupReadWriteEndpoint) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "failoverPolicy": + err = unpopulate(val, "FailoverPolicy", &f.FailoverPolicy) + delete(rawMsg, key) + case "failoverWithDataLossGracePeriodMinutes": + err = unpopulate(val, "FailoverWithDataLossGracePeriodMinutes", &f.FailoverWithDataLossGracePeriodMinutes) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FailoverGroupUpdate. +func (f FailoverGroupUpdate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", f.Properties) + populate(objectMap, "tags", f.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FailoverGroupUpdate. +func (f *FailoverGroupUpdate) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &f.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &f.Tags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FailoverGroupUpdateProperties. +func (f FailoverGroupUpdateProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "databases", f.Databases) + populate(objectMap, "readOnlyEndpoint", f.ReadOnlyEndpoint) + populate(objectMap, "readWriteEndpoint", f.ReadWriteEndpoint) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FailoverGroupUpdateProperties. +func (f *FailoverGroupUpdateProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "databases": + err = unpopulate(val, "Databases", &f.Databases) + delete(rawMsg, key) + case "readOnlyEndpoint": + err = unpopulate(val, "ReadOnlyEndpoint", &f.ReadOnlyEndpoint) + delete(rawMsg, key) + case "readWriteEndpoint": + err = unpopulate(val, "ReadWriteEndpoint", &f.ReadWriteEndpoint) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FirewallRule. +func (f FirewallRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", f.ID) + populate(objectMap, "name", f.Name) + populate(objectMap, "properties", f.Properties) + populate(objectMap, "type", f.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FirewallRule. +func (f *FirewallRule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &f.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &f.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &f.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &f.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FirewallRuleList. +func (f FirewallRuleList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "values", f.Values) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FirewallRuleList. +func (f *FirewallRuleList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "values": + err = unpopulate(val, "Values", &f.Values) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FirewallRuleListResult. +func (f FirewallRuleListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", f.NextLink) + populate(objectMap, "value", f.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FirewallRuleListResult. +func (f *FirewallRuleListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &f.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &f.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GeoBackupPolicy. +func (g GeoBackupPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", g.ID) + populate(objectMap, "kind", g.Kind) + populate(objectMap, "location", g.Location) + populate(objectMap, "name", g.Name) + populate(objectMap, "properties", g.Properties) + populate(objectMap, "type", g.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GeoBackupPolicy. +func (g *GeoBackupPolicy) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &g.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &g.Kind) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &g.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &g.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &g.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &g.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GeoBackupPolicyListResult. +func (g GeoBackupPolicyListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", g.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GeoBackupPolicyListResult. +func (g *GeoBackupPolicyListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &g.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GeoBackupPolicyProperties. +func (g GeoBackupPolicyProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "state", g.State) + populate(objectMap, "storageType", g.StorageType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GeoBackupPolicyProperties. +func (g *GeoBackupPolicyProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "state": + err = unpopulate(val, "State", &g.State) + delete(rawMsg, key) + case "storageType": + err = unpopulate(val, "StorageType", &g.StorageType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IPv6FirewallRule. +func (i IPv6FirewallRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", i.ID) + populate(objectMap, "name", i.Name) + populate(objectMap, "properties", i.Properties) + populate(objectMap, "type", i.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IPv6FirewallRule. +func (i *IPv6FirewallRule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &i.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &i.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &i.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &i.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IPv6FirewallRuleListResult. +func (i IPv6FirewallRuleListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", i.NextLink) + populate(objectMap, "value", i.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IPv6FirewallRuleListResult. +func (i *IPv6FirewallRuleListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &i.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &i.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IPv6ServerFirewallRuleProperties. +func (i IPv6ServerFirewallRuleProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "endIPv6Address", i.EndIPv6Address) + populate(objectMap, "startIPv6Address", i.StartIPv6Address) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IPv6ServerFirewallRuleProperties. +func (i *IPv6ServerFirewallRuleProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "endIPv6Address": + err = unpopulate(val, "EndIPv6Address", &i.EndIPv6Address) + delete(rawMsg, key) + case "startIPv6Address": + err = unpopulate(val, "StartIPv6Address", &i.StartIPv6Address) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ImportExistingDatabaseDefinition. +func (i ImportExistingDatabaseDefinition) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "administratorLogin", i.AdministratorLogin) + populate(objectMap, "administratorLoginPassword", i.AdministratorLoginPassword) + populate(objectMap, "authenticationType", i.AuthenticationType) + populate(objectMap, "networkIsolation", i.NetworkIsolation) + populate(objectMap, "storageKey", i.StorageKey) + populate(objectMap, "storageKeyType", i.StorageKeyType) + populate(objectMap, "storageUri", i.StorageURI) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ImportExistingDatabaseDefinition. +func (i *ImportExistingDatabaseDefinition) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "administratorLogin": + err = unpopulate(val, "AdministratorLogin", &i.AdministratorLogin) + delete(rawMsg, key) + case "administratorLoginPassword": + err = unpopulate(val, "AdministratorLoginPassword", &i.AdministratorLoginPassword) + delete(rawMsg, key) + case "authenticationType": + err = unpopulate(val, "AuthenticationType", &i.AuthenticationType) + delete(rawMsg, key) + case "networkIsolation": + err = unpopulate(val, "NetworkIsolation", &i.NetworkIsolation) + delete(rawMsg, key) + case "storageKey": + err = unpopulate(val, "StorageKey", &i.StorageKey) + delete(rawMsg, key) + case "storageKeyType": + err = unpopulate(val, "StorageKeyType", &i.StorageKeyType) + delete(rawMsg, key) + case "storageUri": + err = unpopulate(val, "StorageURI", &i.StorageURI) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ImportExportExtensionsOperationListResult. +func (i ImportExportExtensionsOperationListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", i.NextLink) + populate(objectMap, "value", i.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ImportExportExtensionsOperationListResult. +func (i *ImportExportExtensionsOperationListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &i.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &i.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ImportExportExtensionsOperationResult. +func (i ImportExportExtensionsOperationResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", i.ID) + populate(objectMap, "name", i.Name) + populate(objectMap, "properties", i.Properties) + populate(objectMap, "type", i.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ImportExportExtensionsOperationResult. +func (i *ImportExportExtensionsOperationResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &i.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &i.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &i.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &i.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ImportExportExtensionsOperationResultProperties. +func (i ImportExportExtensionsOperationResultProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "databaseName", i.DatabaseName) + populate(objectMap, "errorMessage", i.ErrorMessage) + populate(objectMap, "lastModifiedTime", i.LastModifiedTime) + populate(objectMap, "requestId", i.RequestID) + populate(objectMap, "requestType", i.RequestType) + populate(objectMap, "serverName", i.ServerName) + populate(objectMap, "status", i.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ImportExportExtensionsOperationResultProperties. +func (i *ImportExportExtensionsOperationResultProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "databaseName": + err = unpopulate(val, "DatabaseName", &i.DatabaseName) + delete(rawMsg, key) + case "errorMessage": + err = unpopulate(val, "ErrorMessage", &i.ErrorMessage) + delete(rawMsg, key) + case "lastModifiedTime": + err = unpopulate(val, "LastModifiedTime", &i.LastModifiedTime) + delete(rawMsg, key) + case "requestId": + err = unpopulate(val, "RequestID", &i.RequestID) + delete(rawMsg, key) + case "requestType": + err = unpopulate(val, "RequestType", &i.RequestType) + delete(rawMsg, key) + case "serverName": + err = unpopulate(val, "ServerName", &i.ServerName) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &i.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ImportExportOperationResult. +func (i ImportExportOperationResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", i.ID) + populate(objectMap, "name", i.Name) + populate(objectMap, "properties", i.Properties) + populate(objectMap, "type", i.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ImportExportOperationResult. +func (i *ImportExportOperationResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &i.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &i.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &i.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &i.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ImportExportOperationResultProperties. +func (i ImportExportOperationResultProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "blobUri", i.BlobURI) + populate(objectMap, "databaseName", i.DatabaseName) + populate(objectMap, "errorMessage", i.ErrorMessage) + populate(objectMap, "lastModifiedTime", i.LastModifiedTime) + populate(objectMap, "privateEndpointConnections", i.PrivateEndpointConnections) + populate(objectMap, "queuedTime", i.QueuedTime) + populate(objectMap, "requestId", i.RequestID) + populate(objectMap, "requestType", i.RequestType) + populate(objectMap, "serverName", i.ServerName) + populate(objectMap, "status", i.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ImportExportOperationResultProperties. +func (i *ImportExportOperationResultProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "blobUri": + err = unpopulate(val, "BlobURI", &i.BlobURI) + delete(rawMsg, key) + case "databaseName": + err = unpopulate(val, "DatabaseName", &i.DatabaseName) + delete(rawMsg, key) + case "errorMessage": + err = unpopulate(val, "ErrorMessage", &i.ErrorMessage) + delete(rawMsg, key) + case "lastModifiedTime": + err = unpopulate(val, "LastModifiedTime", &i.LastModifiedTime) + delete(rawMsg, key) + case "privateEndpointConnections": + err = unpopulate(val, "PrivateEndpointConnections", &i.PrivateEndpointConnections) + delete(rawMsg, key) + case "queuedTime": + err = unpopulate(val, "QueuedTime", &i.QueuedTime) + delete(rawMsg, key) + case "requestId": + err = unpopulate(val, "RequestID", &i.RequestID) + delete(rawMsg, key) + case "requestType": + err = unpopulate(val, "RequestType", &i.RequestType) + delete(rawMsg, key) + case "serverName": + err = unpopulate(val, "ServerName", &i.ServerName) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &i.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ImportNewDatabaseDefinition. +func (i ImportNewDatabaseDefinition) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "administratorLogin", i.AdministratorLogin) + populate(objectMap, "administratorLoginPassword", i.AdministratorLoginPassword) + populate(objectMap, "authenticationType", i.AuthenticationType) + populate(objectMap, "databaseName", i.DatabaseName) + populate(objectMap, "edition", i.Edition) + populate(objectMap, "maxSizeBytes", i.MaxSizeBytes) + populate(objectMap, "networkIsolation", i.NetworkIsolation) + populate(objectMap, "serviceObjectiveName", i.ServiceObjectiveName) + populate(objectMap, "storageKey", i.StorageKey) + populate(objectMap, "storageKeyType", i.StorageKeyType) + populate(objectMap, "storageUri", i.StorageURI) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ImportNewDatabaseDefinition. +func (i *ImportNewDatabaseDefinition) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "administratorLogin": + err = unpopulate(val, "AdministratorLogin", &i.AdministratorLogin) + delete(rawMsg, key) + case "administratorLoginPassword": + err = unpopulate(val, "AdministratorLoginPassword", &i.AdministratorLoginPassword) + delete(rawMsg, key) + case "authenticationType": + err = unpopulate(val, "AuthenticationType", &i.AuthenticationType) + delete(rawMsg, key) + case "databaseName": + err = unpopulate(val, "DatabaseName", &i.DatabaseName) + delete(rawMsg, key) + case "edition": + err = unpopulate(val, "Edition", &i.Edition) + delete(rawMsg, key) + case "maxSizeBytes": + err = unpopulate(val, "MaxSizeBytes", &i.MaxSizeBytes) + delete(rawMsg, key) + case "networkIsolation": + err = unpopulate(val, "NetworkIsolation", &i.NetworkIsolation) + delete(rawMsg, key) + case "serviceObjectiveName": + err = unpopulate(val, "ServiceObjectiveName", &i.ServiceObjectiveName) + delete(rawMsg, key) + case "storageKey": + err = unpopulate(val, "StorageKey", &i.StorageKey) + delete(rawMsg, key) + case "storageKeyType": + err = unpopulate(val, "StorageKeyType", &i.StorageKeyType) + delete(rawMsg, key) + case "storageUri": + err = unpopulate(val, "StorageURI", &i.StorageURI) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InstanceFailoverGroup. +func (i InstanceFailoverGroup) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", i.ID) + populate(objectMap, "name", i.Name) + populate(objectMap, "properties", i.Properties) + populate(objectMap, "type", i.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InstanceFailoverGroup. +func (i *InstanceFailoverGroup) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &i.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &i.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &i.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &i.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InstanceFailoverGroupListResult. +func (i InstanceFailoverGroupListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", i.NextLink) + populate(objectMap, "value", i.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InstanceFailoverGroupListResult. +func (i *InstanceFailoverGroupListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &i.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &i.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InstanceFailoverGroupProperties. +func (i InstanceFailoverGroupProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "managedInstancePairs", i.ManagedInstancePairs) + populate(objectMap, "partnerRegions", i.PartnerRegions) + populate(objectMap, "readOnlyEndpoint", i.ReadOnlyEndpoint) + populate(objectMap, "readWriteEndpoint", i.ReadWriteEndpoint) + populate(objectMap, "replicationRole", i.ReplicationRole) + populate(objectMap, "replicationState", i.ReplicationState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InstanceFailoverGroupProperties. +func (i *InstanceFailoverGroupProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "managedInstancePairs": + err = unpopulate(val, "ManagedInstancePairs", &i.ManagedInstancePairs) + delete(rawMsg, key) + case "partnerRegions": + err = unpopulate(val, "PartnerRegions", &i.PartnerRegions) + delete(rawMsg, key) + case "readOnlyEndpoint": + err = unpopulate(val, "ReadOnlyEndpoint", &i.ReadOnlyEndpoint) + delete(rawMsg, key) + case "readWriteEndpoint": + err = unpopulate(val, "ReadWriteEndpoint", &i.ReadWriteEndpoint) + delete(rawMsg, key) + case "replicationRole": + err = unpopulate(val, "ReplicationRole", &i.ReplicationRole) + delete(rawMsg, key) + case "replicationState": + err = unpopulate(val, "ReplicationState", &i.ReplicationState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InstanceFailoverGroupReadOnlyEndpoint. +func (i InstanceFailoverGroupReadOnlyEndpoint) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "failoverPolicy", i.FailoverPolicy) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InstanceFailoverGroupReadOnlyEndpoint. +func (i *InstanceFailoverGroupReadOnlyEndpoint) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "failoverPolicy": + err = unpopulate(val, "FailoverPolicy", &i.FailoverPolicy) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InstanceFailoverGroupReadWriteEndpoint. +func (i InstanceFailoverGroupReadWriteEndpoint) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "failoverPolicy", i.FailoverPolicy) + populate(objectMap, "failoverWithDataLossGracePeriodMinutes", i.FailoverWithDataLossGracePeriodMinutes) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InstanceFailoverGroupReadWriteEndpoint. +func (i *InstanceFailoverGroupReadWriteEndpoint) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "failoverPolicy": + err = unpopulate(val, "FailoverPolicy", &i.FailoverPolicy) + delete(rawMsg, key) + case "failoverWithDataLossGracePeriodMinutes": + err = unpopulate(val, "FailoverWithDataLossGracePeriodMinutes", &i.FailoverWithDataLossGracePeriodMinutes) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InstancePool. +func (i InstancePool) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", i.ID) + populate(objectMap, "location", i.Location) + populate(objectMap, "name", i.Name) + populate(objectMap, "properties", i.Properties) + populate(objectMap, "sku", i.SKU) + populate(objectMap, "tags", i.Tags) + populate(objectMap, "type", i.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InstancePool. +func (i *InstancePool) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &i.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &i.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &i.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &i.Properties) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &i.SKU) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &i.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &i.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InstancePoolEditionCapability. +func (i InstancePoolEditionCapability) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", i.Name) + populate(objectMap, "reason", i.Reason) + populate(objectMap, "status", i.Status) + populate(objectMap, "supportedFamilies", i.SupportedFamilies) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InstancePoolEditionCapability. +func (i *InstancePoolEditionCapability) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &i.Name) + delete(rawMsg, key) + case "reason": + err = unpopulate(val, "Reason", &i.Reason) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &i.Status) + delete(rawMsg, key) + case "supportedFamilies": + err = unpopulate(val, "SupportedFamilies", &i.SupportedFamilies) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InstancePoolFamilyCapability. +func (i InstancePoolFamilyCapability) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", i.Name) + populate(objectMap, "reason", i.Reason) + populate(objectMap, "status", i.Status) + populate(objectMap, "supportedLicenseTypes", i.SupportedLicenseTypes) + populate(objectMap, "supportedVcoresValues", i.SupportedVcoresValues) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InstancePoolFamilyCapability. +func (i *InstancePoolFamilyCapability) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &i.Name) + delete(rawMsg, key) + case "reason": + err = unpopulate(val, "Reason", &i.Reason) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &i.Status) + delete(rawMsg, key) + case "supportedLicenseTypes": + err = unpopulate(val, "SupportedLicenseTypes", &i.SupportedLicenseTypes) + delete(rawMsg, key) + case "supportedVcoresValues": + err = unpopulate(val, "SupportedVcoresValues", &i.SupportedVcoresValues) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InstancePoolListResult. +func (i InstancePoolListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", i.NextLink) + populate(objectMap, "value", i.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InstancePoolListResult. +func (i *InstancePoolListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &i.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &i.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InstancePoolProperties. +func (i InstancePoolProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "licenseType", i.LicenseType) + populate(objectMap, "subnetId", i.SubnetID) + populate(objectMap, "vCores", i.VCores) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InstancePoolProperties. +func (i *InstancePoolProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "licenseType": + err = unpopulate(val, "LicenseType", &i.LicenseType) + delete(rawMsg, key) + case "subnetId": + err = unpopulate(val, "SubnetID", &i.SubnetID) + delete(rawMsg, key) + case "vCores": + err = unpopulate(val, "VCores", &i.VCores) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InstancePoolUpdate. +func (i InstancePoolUpdate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "tags", i.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InstancePoolUpdate. +func (i *InstancePoolUpdate) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "tags": + err = unpopulate(val, "Tags", &i.Tags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InstancePoolVcoresCapability. +func (i InstancePoolVcoresCapability) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", i.Name) + populate(objectMap, "reason", i.Reason) + populate(objectMap, "status", i.Status) + populate(objectMap, "storageLimit", i.StorageLimit) + populate(objectMap, "value", i.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InstancePoolVcoresCapability. +func (i *InstancePoolVcoresCapability) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &i.Name) + delete(rawMsg, key) + case "reason": + err = unpopulate(val, "Reason", &i.Reason) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &i.Status) + delete(rawMsg, key) + case "storageLimit": + err = unpopulate(val, "StorageLimit", &i.StorageLimit) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &i.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Job. +func (j Job) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", j.ID) + populate(objectMap, "name", j.Name) + populate(objectMap, "properties", j.Properties) + populate(objectMap, "type", j.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Job. +func (j *Job) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &j.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &j.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &j.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &j.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type JobAgent. +func (j JobAgent) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", j.ID) + populate(objectMap, "location", j.Location) + populate(objectMap, "name", j.Name) + populate(objectMap, "properties", j.Properties) + populate(objectMap, "sku", j.SKU) + populate(objectMap, "tags", j.Tags) + populate(objectMap, "type", j.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type JobAgent. +func (j *JobAgent) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &j.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &j.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &j.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &j.Properties) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &j.SKU) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &j.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &j.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type JobAgentListResult. +func (j JobAgentListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", j.NextLink) + populate(objectMap, "value", j.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type JobAgentListResult. +func (j *JobAgentListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &j.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &j.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type JobAgentProperties. +func (j JobAgentProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "databaseId", j.DatabaseID) + populate(objectMap, "state", j.State) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type JobAgentProperties. +func (j *JobAgentProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "databaseId": + err = unpopulate(val, "DatabaseID", &j.DatabaseID) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &j.State) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type JobAgentUpdate. +func (j JobAgentUpdate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "tags", j.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type JobAgentUpdate. +func (j *JobAgentUpdate) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "tags": + err = unpopulate(val, "Tags", &j.Tags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type JobCredential. +func (j JobCredential) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", j.ID) + populate(objectMap, "name", j.Name) + populate(objectMap, "properties", j.Properties) + populate(objectMap, "type", j.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type JobCredential. +func (j *JobCredential) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &j.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &j.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &j.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &j.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type JobCredentialListResult. +func (j JobCredentialListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", j.NextLink) + populate(objectMap, "value", j.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type JobCredentialListResult. +func (j *JobCredentialListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &j.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &j.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type JobCredentialProperties. +func (j JobCredentialProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "password", j.Password) + populate(objectMap, "username", j.Username) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type JobCredentialProperties. +func (j *JobCredentialProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "password": + err = unpopulate(val, "Password", &j.Password) + delete(rawMsg, key) + case "username": + err = unpopulate(val, "Username", &j.Username) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type JobExecution. +func (j JobExecution) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", j.ID) + populate(objectMap, "name", j.Name) + populate(objectMap, "properties", j.Properties) + populate(objectMap, "type", j.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type JobExecution. +func (j *JobExecution) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &j.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &j.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &j.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &j.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type JobExecutionListResult. +func (j JobExecutionListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", j.NextLink) + populate(objectMap, "value", j.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type JobExecutionListResult. +func (j *JobExecutionListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &j.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &j.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type JobExecutionProperties. +func (j JobExecutionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "createTime", j.CreateTime) + populateDateTimeRFC3339(objectMap, "currentAttemptStartTime", j.CurrentAttemptStartTime) + populate(objectMap, "currentAttempts", j.CurrentAttempts) + populateDateTimeRFC3339(objectMap, "endTime", j.EndTime) + populate(objectMap, "jobExecutionId", j.JobExecutionID) + populate(objectMap, "jobVersion", j.JobVersion) + populate(objectMap, "lastMessage", j.LastMessage) + populate(objectMap, "lifecycle", j.Lifecycle) + populate(objectMap, "provisioningState", j.ProvisioningState) + populateDateTimeRFC3339(objectMap, "startTime", j.StartTime) + populate(objectMap, "stepId", j.StepID) + populate(objectMap, "stepName", j.StepName) + populate(objectMap, "target", j.Target) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type JobExecutionProperties. +func (j *JobExecutionProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "createTime": + err = unpopulateDateTimeRFC3339(val, "CreateTime", &j.CreateTime) + delete(rawMsg, key) + case "currentAttemptStartTime": + err = unpopulateDateTimeRFC3339(val, "CurrentAttemptStartTime", &j.CurrentAttemptStartTime) + delete(rawMsg, key) + case "currentAttempts": + err = unpopulate(val, "CurrentAttempts", &j.CurrentAttempts) + delete(rawMsg, key) + case "endTime": + err = unpopulateDateTimeRFC3339(val, "EndTime", &j.EndTime) + delete(rawMsg, key) + case "jobExecutionId": + err = unpopulate(val, "JobExecutionID", &j.JobExecutionID) + delete(rawMsg, key) + case "jobVersion": + err = unpopulate(val, "JobVersion", &j.JobVersion) + delete(rawMsg, key) + case "lastMessage": + err = unpopulate(val, "LastMessage", &j.LastMessage) + delete(rawMsg, key) + case "lifecycle": + err = unpopulate(val, "Lifecycle", &j.Lifecycle) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &j.ProvisioningState) + delete(rawMsg, key) + case "startTime": + err = unpopulateDateTimeRFC3339(val, "StartTime", &j.StartTime) + delete(rawMsg, key) + case "stepId": + err = unpopulate(val, "StepID", &j.StepID) + delete(rawMsg, key) + case "stepName": + err = unpopulate(val, "StepName", &j.StepName) + delete(rawMsg, key) + case "target": + err = unpopulate(val, "Target", &j.Target) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type JobExecutionTarget. +func (j JobExecutionTarget) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "databaseName", j.DatabaseName) + populate(objectMap, "serverName", j.ServerName) + populate(objectMap, "type", j.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type JobExecutionTarget. +func (j *JobExecutionTarget) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "databaseName": + err = unpopulate(val, "DatabaseName", &j.DatabaseName) + delete(rawMsg, key) + case "serverName": + err = unpopulate(val, "ServerName", &j.ServerName) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &j.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type JobListResult. +func (j JobListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", j.NextLink) + populate(objectMap, "value", j.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type JobListResult. +func (j *JobListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &j.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &j.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type JobProperties. +func (j JobProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", j.Description) + populate(objectMap, "schedule", j.Schedule) + populate(objectMap, "version", j.Version) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type JobProperties. +func (j *JobProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &j.Description) + delete(rawMsg, key) + case "schedule": + err = unpopulate(val, "Schedule", &j.Schedule) + delete(rawMsg, key) + case "version": + err = unpopulate(val, "Version", &j.Version) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type JobSchedule. +func (j JobSchedule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "enabled", j.Enabled) + populateDateTimeRFC3339(objectMap, "endTime", j.EndTime) + populate(objectMap, "interval", j.Interval) + populateDateTimeRFC3339(objectMap, "startTime", j.StartTime) + populate(objectMap, "type", j.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type JobSchedule. +func (j *JobSchedule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "enabled": + err = unpopulate(val, "Enabled", &j.Enabled) + delete(rawMsg, key) + case "endTime": + err = unpopulateDateTimeRFC3339(val, "EndTime", &j.EndTime) + delete(rawMsg, key) + case "interval": + err = unpopulate(val, "Interval", &j.Interval) + delete(rawMsg, key) + case "startTime": + err = unpopulateDateTimeRFC3339(val, "StartTime", &j.StartTime) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &j.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type JobStep. +func (j JobStep) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", j.ID) + populate(objectMap, "name", j.Name) + populate(objectMap, "properties", j.Properties) + populate(objectMap, "type", j.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type JobStep. +func (j *JobStep) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &j.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &j.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &j.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &j.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type JobStepAction. +func (j JobStepAction) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "source", j.Source) + populate(objectMap, "type", j.Type) + populate(objectMap, "value", j.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type JobStepAction. +func (j *JobStepAction) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "source": + err = unpopulate(val, "Source", &j.Source) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &j.Type) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &j.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type JobStepExecutionOptions. +func (j JobStepExecutionOptions) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "initialRetryIntervalSeconds", j.InitialRetryIntervalSeconds) + populate(objectMap, "maximumRetryIntervalSeconds", j.MaximumRetryIntervalSeconds) + populate(objectMap, "retryAttempts", j.RetryAttempts) + populate(objectMap, "retryIntervalBackoffMultiplier", j.RetryIntervalBackoffMultiplier) + populate(objectMap, "timeoutSeconds", j.TimeoutSeconds) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type JobStepExecutionOptions. +func (j *JobStepExecutionOptions) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "initialRetryIntervalSeconds": + err = unpopulate(val, "InitialRetryIntervalSeconds", &j.InitialRetryIntervalSeconds) + delete(rawMsg, key) + case "maximumRetryIntervalSeconds": + err = unpopulate(val, "MaximumRetryIntervalSeconds", &j.MaximumRetryIntervalSeconds) + delete(rawMsg, key) + case "retryAttempts": + err = unpopulate(val, "RetryAttempts", &j.RetryAttempts) + delete(rawMsg, key) + case "retryIntervalBackoffMultiplier": + err = unpopulate(val, "RetryIntervalBackoffMultiplier", &j.RetryIntervalBackoffMultiplier) + delete(rawMsg, key) + case "timeoutSeconds": + err = unpopulate(val, "TimeoutSeconds", &j.TimeoutSeconds) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type JobStepListResult. +func (j JobStepListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", j.NextLink) + populate(objectMap, "value", j.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type JobStepListResult. +func (j *JobStepListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &j.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &j.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type JobStepOutput. +func (j JobStepOutput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "credential", j.Credential) + populate(objectMap, "databaseName", j.DatabaseName) + populate(objectMap, "resourceGroupName", j.ResourceGroupName) + populate(objectMap, "schemaName", j.SchemaName) + populate(objectMap, "serverName", j.ServerName) + populate(objectMap, "subscriptionId", j.SubscriptionID) + populate(objectMap, "tableName", j.TableName) + populate(objectMap, "type", j.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type JobStepOutput. +func (j *JobStepOutput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "credential": + err = unpopulate(val, "Credential", &j.Credential) + delete(rawMsg, key) + case "databaseName": + err = unpopulate(val, "DatabaseName", &j.DatabaseName) + delete(rawMsg, key) + case "resourceGroupName": + err = unpopulate(val, "ResourceGroupName", &j.ResourceGroupName) + delete(rawMsg, key) + case "schemaName": + err = unpopulate(val, "SchemaName", &j.SchemaName) + delete(rawMsg, key) + case "serverName": + err = unpopulate(val, "ServerName", &j.ServerName) + delete(rawMsg, key) + case "subscriptionId": + err = unpopulate(val, "SubscriptionID", &j.SubscriptionID) + delete(rawMsg, key) + case "tableName": + err = unpopulate(val, "TableName", &j.TableName) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &j.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type JobStepProperties. +func (j JobStepProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "action", j.Action) + populate(objectMap, "credential", j.Credential) + populate(objectMap, "executionOptions", j.ExecutionOptions) + populate(objectMap, "output", j.Output) + populate(objectMap, "stepId", j.StepID) + populate(objectMap, "targetGroup", j.TargetGroup) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type JobStepProperties. +func (j *JobStepProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "action": + err = unpopulate(val, "Action", &j.Action) + delete(rawMsg, key) + case "credential": + err = unpopulate(val, "Credential", &j.Credential) + delete(rawMsg, key) + case "executionOptions": + err = unpopulate(val, "ExecutionOptions", &j.ExecutionOptions) + delete(rawMsg, key) + case "output": + err = unpopulate(val, "Output", &j.Output) + delete(rawMsg, key) + case "stepId": + err = unpopulate(val, "StepID", &j.StepID) + delete(rawMsg, key) + case "targetGroup": + err = unpopulate(val, "TargetGroup", &j.TargetGroup) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type JobTarget. +func (j JobTarget) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "databaseName", j.DatabaseName) + populate(objectMap, "elasticPoolName", j.ElasticPoolName) + populate(objectMap, "membershipType", j.MembershipType) + populate(objectMap, "refreshCredential", j.RefreshCredential) + populate(objectMap, "serverName", j.ServerName) + populate(objectMap, "shardMapName", j.ShardMapName) + populate(objectMap, "type", j.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type JobTarget. +func (j *JobTarget) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "databaseName": + err = unpopulate(val, "DatabaseName", &j.DatabaseName) + delete(rawMsg, key) + case "elasticPoolName": + err = unpopulate(val, "ElasticPoolName", &j.ElasticPoolName) + delete(rawMsg, key) + case "membershipType": + err = unpopulate(val, "MembershipType", &j.MembershipType) + delete(rawMsg, key) + case "refreshCredential": + err = unpopulate(val, "RefreshCredential", &j.RefreshCredential) + delete(rawMsg, key) + case "serverName": + err = unpopulate(val, "ServerName", &j.ServerName) + delete(rawMsg, key) + case "shardMapName": + err = unpopulate(val, "ShardMapName", &j.ShardMapName) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &j.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type JobTargetGroup. +func (j JobTargetGroup) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", j.ID) + populate(objectMap, "name", j.Name) + populate(objectMap, "properties", j.Properties) + populate(objectMap, "type", j.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type JobTargetGroup. +func (j *JobTargetGroup) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &j.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &j.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &j.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &j.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type JobTargetGroupListResult. +func (j JobTargetGroupListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", j.NextLink) + populate(objectMap, "value", j.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type JobTargetGroupListResult. +func (j *JobTargetGroupListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &j.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &j.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type JobTargetGroupProperties. +func (j JobTargetGroupProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "members", j.Members) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type JobTargetGroupProperties. +func (j *JobTargetGroupProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "members": + err = unpopulate(val, "Members", &j.Members) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type JobVersion. +func (j JobVersion) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", j.ID) + populate(objectMap, "name", j.Name) + populate(objectMap, "type", j.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type JobVersion. +func (j *JobVersion) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &j.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &j.Name) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &j.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type JobVersionListResult. +func (j JobVersionListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", j.NextLink) + populate(objectMap, "value", j.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type JobVersionListResult. +func (j *JobVersionListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &j.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &j.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LedgerDigestUploads. +func (l LedgerDigestUploads) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", l.ID) + populate(objectMap, "name", l.Name) + populate(objectMap, "properties", l.Properties) + populate(objectMap, "type", l.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LedgerDigestUploads. +func (l *LedgerDigestUploads) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &l.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &l.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &l.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &l.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LedgerDigestUploadsListResult. +func (l LedgerDigestUploadsListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", l.NextLink) + populate(objectMap, "value", l.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LedgerDigestUploadsListResult. +func (l *LedgerDigestUploadsListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &l.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &l.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LedgerDigestUploadsProperties. +func (l LedgerDigestUploadsProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "digestStorageEndpoint", l.DigestStorageEndpoint) + populate(objectMap, "state", l.State) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LedgerDigestUploadsProperties. +func (l *LedgerDigestUploadsProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "digestStorageEndpoint": + err = unpopulate(val, "DigestStorageEndpoint", &l.DigestStorageEndpoint) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &l.State) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LicenseTypeCapability. +func (l LicenseTypeCapability) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", l.Name) + populate(objectMap, "reason", l.Reason) + populate(objectMap, "status", l.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LicenseTypeCapability. +func (l *LicenseTypeCapability) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &l.Name) + delete(rawMsg, key) + case "reason": + err = unpopulate(val, "Reason", &l.Reason) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &l.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LocationCapabilities. +func (l LocationCapabilities) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", l.Name) + populate(objectMap, "reason", l.Reason) + populate(objectMap, "status", l.Status) + populate(objectMap, "supportedManagedInstanceVersions", l.SupportedManagedInstanceVersions) + populate(objectMap, "supportedServerVersions", l.SupportedServerVersions) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LocationCapabilities. +func (l *LocationCapabilities) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &l.Name) + delete(rawMsg, key) + case "reason": + err = unpopulate(val, "Reason", &l.Reason) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &l.Status) + delete(rawMsg, key) + case "supportedManagedInstanceVersions": + err = unpopulate(val, "SupportedManagedInstanceVersions", &l.SupportedManagedInstanceVersions) + delete(rawMsg, key) + case "supportedServerVersions": + err = unpopulate(val, "SupportedServerVersions", &l.SupportedServerVersions) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LogSizeCapability. +func (l LogSizeCapability) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "limit", l.Limit) + populate(objectMap, "unit", l.Unit) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LogSizeCapability. +func (l *LogSizeCapability) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "limit": + err = unpopulate(val, "Limit", &l.Limit) + delete(rawMsg, key) + case "unit": + err = unpopulate(val, "Unit", &l.Unit) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LogicalDatabaseTransparentDataEncryption. +func (l LogicalDatabaseTransparentDataEncryption) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", l.ID) + populate(objectMap, "name", l.Name) + populate(objectMap, "properties", l.Properties) + populate(objectMap, "type", l.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LogicalDatabaseTransparentDataEncryption. +func (l *LogicalDatabaseTransparentDataEncryption) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &l.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &l.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &l.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &l.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LogicalDatabaseTransparentDataEncryptionListResult. +func (l LogicalDatabaseTransparentDataEncryptionListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", l.NextLink) + populate(objectMap, "value", l.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LogicalDatabaseTransparentDataEncryptionListResult. +func (l *LogicalDatabaseTransparentDataEncryptionListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &l.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &l.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LogicalServerAdvancedThreatProtectionListResult. +func (l LogicalServerAdvancedThreatProtectionListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", l.NextLink) + populate(objectMap, "value", l.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LogicalServerAdvancedThreatProtectionListResult. +func (l *LogicalServerAdvancedThreatProtectionListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &l.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &l.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LogicalServerSecurityAlertPolicyListResult. +func (l LogicalServerSecurityAlertPolicyListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", l.NextLink) + populate(objectMap, "value", l.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LogicalServerSecurityAlertPolicyListResult. +func (l *LogicalServerSecurityAlertPolicyListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &l.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &l.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LongTermRetentionBackup. +func (l LongTermRetentionBackup) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", l.ID) + populate(objectMap, "name", l.Name) + populate(objectMap, "properties", l.Properties) + populate(objectMap, "type", l.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LongTermRetentionBackup. +func (l *LongTermRetentionBackup) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &l.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &l.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &l.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &l.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LongTermRetentionBackupListResult. +func (l LongTermRetentionBackupListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", l.NextLink) + populate(objectMap, "value", l.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LongTermRetentionBackupListResult. +func (l *LongTermRetentionBackupListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &l.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &l.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LongTermRetentionBackupOperationResult. +func (l LongTermRetentionBackupOperationResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", l.ID) + populate(objectMap, "name", l.Name) + populate(objectMap, "properties", l.Properties) + populate(objectMap, "type", l.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LongTermRetentionBackupOperationResult. +func (l *LongTermRetentionBackupOperationResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &l.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &l.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &l.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &l.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LongTermRetentionBackupProperties. +func (l LongTermRetentionBackupProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "backupExpirationTime", l.BackupExpirationTime) + populate(objectMap, "backupStorageRedundancy", l.BackupStorageRedundancy) + populateDateTimeRFC3339(objectMap, "backupTime", l.BackupTime) + populateDateTimeRFC3339(objectMap, "databaseDeletionTime", l.DatabaseDeletionTime) + populate(objectMap, "databaseName", l.DatabaseName) + populate(objectMap, "requestedBackupStorageRedundancy", l.RequestedBackupStorageRedundancy) + populateDateTimeRFC3339(objectMap, "serverCreateTime", l.ServerCreateTime) + populate(objectMap, "serverName", l.ServerName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LongTermRetentionBackupProperties. +func (l *LongTermRetentionBackupProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backupExpirationTime": + err = unpopulateDateTimeRFC3339(val, "BackupExpirationTime", &l.BackupExpirationTime) + delete(rawMsg, key) + case "backupStorageRedundancy": + err = unpopulate(val, "BackupStorageRedundancy", &l.BackupStorageRedundancy) + delete(rawMsg, key) + case "backupTime": + err = unpopulateDateTimeRFC3339(val, "BackupTime", &l.BackupTime) + delete(rawMsg, key) + case "databaseDeletionTime": + err = unpopulateDateTimeRFC3339(val, "DatabaseDeletionTime", &l.DatabaseDeletionTime) + delete(rawMsg, key) + case "databaseName": + err = unpopulate(val, "DatabaseName", &l.DatabaseName) + delete(rawMsg, key) + case "requestedBackupStorageRedundancy": + err = unpopulate(val, "RequestedBackupStorageRedundancy", &l.RequestedBackupStorageRedundancy) + delete(rawMsg, key) + case "serverCreateTime": + err = unpopulateDateTimeRFC3339(val, "ServerCreateTime", &l.ServerCreateTime) + delete(rawMsg, key) + case "serverName": + err = unpopulate(val, "ServerName", &l.ServerName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LongTermRetentionOperationResultProperties. +func (l LongTermRetentionOperationResultProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "fromBackupResourceId", l.FromBackupResourceID) + populate(objectMap, "message", l.Message) + populate(objectMap, "operationType", l.OperationType) + populate(objectMap, "requestId", l.RequestID) + populate(objectMap, "status", l.Status) + populate(objectMap, "targetBackupStorageRedundancy", l.TargetBackupStorageRedundancy) + populate(objectMap, "toBackupResourceId", l.ToBackupResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LongTermRetentionOperationResultProperties. +func (l *LongTermRetentionOperationResultProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "fromBackupResourceId": + err = unpopulate(val, "FromBackupResourceID", &l.FromBackupResourceID) + delete(rawMsg, key) + case "message": + err = unpopulate(val, "Message", &l.Message) + delete(rawMsg, key) + case "operationType": + err = unpopulate(val, "OperationType", &l.OperationType) + delete(rawMsg, key) + case "requestId": + err = unpopulate(val, "RequestID", &l.RequestID) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &l.Status) + delete(rawMsg, key) + case "targetBackupStorageRedundancy": + err = unpopulate(val, "TargetBackupStorageRedundancy", &l.TargetBackupStorageRedundancy) + delete(rawMsg, key) + case "toBackupResourceId": + err = unpopulate(val, "ToBackupResourceID", &l.ToBackupResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LongTermRetentionPolicy. +func (l LongTermRetentionPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", l.ID) + populate(objectMap, "name", l.Name) + populate(objectMap, "properties", l.Properties) + populate(objectMap, "type", l.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LongTermRetentionPolicy. +func (l *LongTermRetentionPolicy) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &l.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &l.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &l.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &l.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LongTermRetentionPolicyListResult. +func (l LongTermRetentionPolicyListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", l.NextLink) + populate(objectMap, "value", l.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LongTermRetentionPolicyListResult. +func (l *LongTermRetentionPolicyListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &l.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &l.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MaintenanceConfigurationCapability. +func (m MaintenanceConfigurationCapability) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", m.Name) + populate(objectMap, "reason", m.Reason) + populate(objectMap, "status", m.Status) + populate(objectMap, "zoneRedundant", m.ZoneRedundant) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MaintenanceConfigurationCapability. +func (m *MaintenanceConfigurationCapability) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "reason": + err = unpopulate(val, "Reason", &m.Reason) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &m.Status) + delete(rawMsg, key) + case "zoneRedundant": + err = unpopulate(val, "ZoneRedundant", &m.ZoneRedundant) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MaintenanceWindowOptions. +func (m MaintenanceWindowOptions) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", m.ID) + populate(objectMap, "name", m.Name) + populate(objectMap, "properties", m.Properties) + populate(objectMap, "type", m.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MaintenanceWindowOptions. +func (m *MaintenanceWindowOptions) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &m.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MaintenanceWindowOptionsProperties. +func (m MaintenanceWindowOptionsProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "allowMultipleMaintenanceWindowsPerCycle", m.AllowMultipleMaintenanceWindowsPerCycle) + populate(objectMap, "defaultDurationInMinutes", m.DefaultDurationInMinutes) + populate(objectMap, "isEnabled", m.IsEnabled) + populate(objectMap, "maintenanceWindowCycles", m.MaintenanceWindowCycles) + populate(objectMap, "minCycles", m.MinCycles) + populate(objectMap, "minDurationInMinutes", m.MinDurationInMinutes) + populate(objectMap, "timeGranularityInMinutes", m.TimeGranularityInMinutes) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MaintenanceWindowOptionsProperties. +func (m *MaintenanceWindowOptionsProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "allowMultipleMaintenanceWindowsPerCycle": + err = unpopulate(val, "AllowMultipleMaintenanceWindowsPerCycle", &m.AllowMultipleMaintenanceWindowsPerCycle) + delete(rawMsg, key) + case "defaultDurationInMinutes": + err = unpopulate(val, "DefaultDurationInMinutes", &m.DefaultDurationInMinutes) + delete(rawMsg, key) + case "isEnabled": + err = unpopulate(val, "IsEnabled", &m.IsEnabled) + delete(rawMsg, key) + case "maintenanceWindowCycles": + err = unpopulate(val, "MaintenanceWindowCycles", &m.MaintenanceWindowCycles) + delete(rawMsg, key) + case "minCycles": + err = unpopulate(val, "MinCycles", &m.MinCycles) + delete(rawMsg, key) + case "minDurationInMinutes": + err = unpopulate(val, "MinDurationInMinutes", &m.MinDurationInMinutes) + delete(rawMsg, key) + case "timeGranularityInMinutes": + err = unpopulate(val, "TimeGranularityInMinutes", &m.TimeGranularityInMinutes) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MaintenanceWindowTimeRange. +func (m MaintenanceWindowTimeRange) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "dayOfWeek", m.DayOfWeek) + populate(objectMap, "duration", m.Duration) + populate(objectMap, "startTime", m.StartTime) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MaintenanceWindowTimeRange. +func (m *MaintenanceWindowTimeRange) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "dayOfWeek": + err = unpopulate(val, "DayOfWeek", &m.DayOfWeek) + delete(rawMsg, key) + case "duration": + err = unpopulate(val, "Duration", &m.Duration) + delete(rawMsg, key) + case "startTime": + err = unpopulate(val, "StartTime", &m.StartTime) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MaintenanceWindows. +func (m MaintenanceWindows) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", m.ID) + populate(objectMap, "name", m.Name) + populate(objectMap, "properties", m.Properties) + populate(objectMap, "type", m.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MaintenanceWindows. +func (m *MaintenanceWindows) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &m.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MaintenanceWindowsProperties. +func (m MaintenanceWindowsProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "timeRanges", m.TimeRanges) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MaintenanceWindowsProperties. +func (m *MaintenanceWindowsProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "timeRanges": + err = unpopulate(val, "TimeRanges", &m.TimeRanges) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedBackupShortTermRetentionPolicy. +func (m ManagedBackupShortTermRetentionPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", m.ID) + populate(objectMap, "name", m.Name) + populate(objectMap, "properties", m.Properties) + populate(objectMap, "type", m.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedBackupShortTermRetentionPolicy. +func (m *ManagedBackupShortTermRetentionPolicy) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &m.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedBackupShortTermRetentionPolicyListResult. +func (m ManagedBackupShortTermRetentionPolicyListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", m.NextLink) + populate(objectMap, "value", m.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedBackupShortTermRetentionPolicyListResult. +func (m *ManagedBackupShortTermRetentionPolicyListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &m.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &m.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedBackupShortTermRetentionPolicyProperties. +func (m ManagedBackupShortTermRetentionPolicyProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "retentionDays", m.RetentionDays) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedBackupShortTermRetentionPolicyProperties. +func (m *ManagedBackupShortTermRetentionPolicyProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "retentionDays": + err = unpopulate(val, "RetentionDays", &m.RetentionDays) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedDatabase. +func (m ManagedDatabase) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", m.ID) + populate(objectMap, "location", m.Location) + populate(objectMap, "name", m.Name) + populate(objectMap, "properties", m.Properties) + populate(objectMap, "tags", m.Tags) + populate(objectMap, "type", m.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedDatabase. +func (m *ManagedDatabase) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &m.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &m.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &m.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedDatabaseListResult. +func (m ManagedDatabaseListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", m.NextLink) + populate(objectMap, "value", m.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedDatabaseListResult. +func (m *ManagedDatabaseListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &m.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &m.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedDatabaseProperties. +func (m ManagedDatabaseProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "autoCompleteRestore", m.AutoCompleteRestore) + populate(objectMap, "catalogCollation", m.CatalogCollation) + populate(objectMap, "collation", m.Collation) + populate(objectMap, "createMode", m.CreateMode) + populateDateTimeRFC3339(objectMap, "creationDate", m.CreationDate) + populate(objectMap, "defaultSecondaryLocation", m.DefaultSecondaryLocation) + populateDateTimeRFC3339(objectMap, "earliestRestorePoint", m.EarliestRestorePoint) + populate(objectMap, "failoverGroupId", m.FailoverGroupID) + populate(objectMap, "lastBackupName", m.LastBackupName) + populate(objectMap, "longTermRetentionBackupResourceId", m.LongTermRetentionBackupResourceID) + populate(objectMap, "recoverableDatabaseId", m.RecoverableDatabaseID) + populate(objectMap, "restorableDroppedDatabaseId", m.RestorableDroppedDatabaseID) + populateDateTimeRFC3339(objectMap, "restorePointInTime", m.RestorePointInTime) + populate(objectMap, "sourceDatabaseId", m.SourceDatabaseID) + populate(objectMap, "status", m.Status) + populate(objectMap, "storageContainerSasToken", m.StorageContainerSasToken) + populate(objectMap, "storageContainerUri", m.StorageContainerURI) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedDatabaseProperties. +func (m *ManagedDatabaseProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "autoCompleteRestore": + err = unpopulate(val, "AutoCompleteRestore", &m.AutoCompleteRestore) + delete(rawMsg, key) + case "catalogCollation": + err = unpopulate(val, "CatalogCollation", &m.CatalogCollation) + delete(rawMsg, key) + case "collation": + err = unpopulate(val, "Collation", &m.Collation) + delete(rawMsg, key) + case "createMode": + err = unpopulate(val, "CreateMode", &m.CreateMode) + delete(rawMsg, key) + case "creationDate": + err = unpopulateDateTimeRFC3339(val, "CreationDate", &m.CreationDate) + delete(rawMsg, key) + case "defaultSecondaryLocation": + err = unpopulate(val, "DefaultSecondaryLocation", &m.DefaultSecondaryLocation) + delete(rawMsg, key) + case "earliestRestorePoint": + err = unpopulateDateTimeRFC3339(val, "EarliestRestorePoint", &m.EarliestRestorePoint) + delete(rawMsg, key) + case "failoverGroupId": + err = unpopulate(val, "FailoverGroupID", &m.FailoverGroupID) + delete(rawMsg, key) + case "lastBackupName": + err = unpopulate(val, "LastBackupName", &m.LastBackupName) + delete(rawMsg, key) + case "longTermRetentionBackupResourceId": + err = unpopulate(val, "LongTermRetentionBackupResourceID", &m.LongTermRetentionBackupResourceID) + delete(rawMsg, key) + case "recoverableDatabaseId": + err = unpopulate(val, "RecoverableDatabaseID", &m.RecoverableDatabaseID) + delete(rawMsg, key) + case "restorableDroppedDatabaseId": + err = unpopulate(val, "RestorableDroppedDatabaseID", &m.RestorableDroppedDatabaseID) + delete(rawMsg, key) + case "restorePointInTime": + err = unpopulateDateTimeRFC3339(val, "RestorePointInTime", &m.RestorePointInTime) + delete(rawMsg, key) + case "sourceDatabaseId": + err = unpopulate(val, "SourceDatabaseID", &m.SourceDatabaseID) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &m.Status) + delete(rawMsg, key) + case "storageContainerSasToken": + err = unpopulate(val, "StorageContainerSasToken", &m.StorageContainerSasToken) + delete(rawMsg, key) + case "storageContainerUri": + err = unpopulate(val, "StorageContainerURI", &m.StorageContainerURI) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedDatabaseRestoreDetailsProperties. +func (m ManagedDatabaseRestoreDetailsProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "blockReason", m.BlockReason) + populate(objectMap, "currentRestoringFileName", m.CurrentRestoringFileName) + populate(objectMap, "lastRestoredFileName", m.LastRestoredFileName) + populateDateTimeRFC3339(objectMap, "lastRestoredFileTime", m.LastRestoredFileTime) + populate(objectMap, "lastUploadedFileName", m.LastUploadedFileName) + populateDateTimeRFC3339(objectMap, "lastUploadedFileTime", m.LastUploadedFileTime) + populate(objectMap, "numberOfFilesDetected", m.NumberOfFilesDetected) + populate(objectMap, "percentCompleted", m.PercentCompleted) + populate(objectMap, "status", m.Status) + populate(objectMap, "unrestorableFiles", m.UnrestorableFiles) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedDatabaseRestoreDetailsProperties. +func (m *ManagedDatabaseRestoreDetailsProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "blockReason": + err = unpopulate(val, "BlockReason", &m.BlockReason) + delete(rawMsg, key) + case "currentRestoringFileName": + err = unpopulate(val, "CurrentRestoringFileName", &m.CurrentRestoringFileName) + delete(rawMsg, key) + case "lastRestoredFileName": + err = unpopulate(val, "LastRestoredFileName", &m.LastRestoredFileName) + delete(rawMsg, key) + case "lastRestoredFileTime": + err = unpopulateDateTimeRFC3339(val, "LastRestoredFileTime", &m.LastRestoredFileTime) + delete(rawMsg, key) + case "lastUploadedFileName": + err = unpopulate(val, "LastUploadedFileName", &m.LastUploadedFileName) + delete(rawMsg, key) + case "lastUploadedFileTime": + err = unpopulateDateTimeRFC3339(val, "LastUploadedFileTime", &m.LastUploadedFileTime) + delete(rawMsg, key) + case "numberOfFilesDetected": + err = unpopulate(val, "NumberOfFilesDetected", &m.NumberOfFilesDetected) + delete(rawMsg, key) + case "percentCompleted": + err = unpopulate(val, "PercentCompleted", &m.PercentCompleted) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &m.Status) + delete(rawMsg, key) + case "unrestorableFiles": + err = unpopulate(val, "UnrestorableFiles", &m.UnrestorableFiles) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedDatabaseRestoreDetailsResult. +func (m ManagedDatabaseRestoreDetailsResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", m.ID) + populate(objectMap, "name", m.Name) + populate(objectMap, "properties", m.Properties) + populate(objectMap, "type", m.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedDatabaseRestoreDetailsResult. +func (m *ManagedDatabaseRestoreDetailsResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &m.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedDatabaseSecurityAlertPolicy. +func (m ManagedDatabaseSecurityAlertPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", m.ID) + populate(objectMap, "name", m.Name) + populate(objectMap, "properties", m.Properties) + populate(objectMap, "type", m.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedDatabaseSecurityAlertPolicy. +func (m *ManagedDatabaseSecurityAlertPolicy) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &m.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedDatabaseSecurityAlertPolicyListResult. +func (m ManagedDatabaseSecurityAlertPolicyListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", m.NextLink) + populate(objectMap, "value", m.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedDatabaseSecurityAlertPolicyListResult. +func (m *ManagedDatabaseSecurityAlertPolicyListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &m.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &m.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedDatabaseUpdate. +func (m ManagedDatabaseUpdate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", m.Properties) + populate(objectMap, "tags", m.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedDatabaseUpdate. +func (m *ManagedDatabaseUpdate) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &m.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &m.Tags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedInstance. +func (m ManagedInstance) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", m.ID) + populate(objectMap, "identity", m.Identity) + populate(objectMap, "location", m.Location) + populate(objectMap, "name", m.Name) + populate(objectMap, "properties", m.Properties) + populate(objectMap, "sku", m.SKU) + populate(objectMap, "tags", m.Tags) + populate(objectMap, "type", m.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstance. +func (m *ManagedInstance) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &m.ID) + delete(rawMsg, key) + case "identity": + err = unpopulate(val, "Identity", &m.Identity) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &m.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &m.SKU) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &m.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedInstanceAdministrator. +func (m ManagedInstanceAdministrator) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", m.ID) + populate(objectMap, "name", m.Name) + populate(objectMap, "properties", m.Properties) + populate(objectMap, "type", m.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstanceAdministrator. +func (m *ManagedInstanceAdministrator) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &m.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedInstanceAdministratorListResult. +func (m ManagedInstanceAdministratorListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", m.NextLink) + populate(objectMap, "value", m.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstanceAdministratorListResult. +func (m *ManagedInstanceAdministratorListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &m.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &m.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedInstanceAdministratorProperties. +func (m ManagedInstanceAdministratorProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "administratorType", m.AdministratorType) + populate(objectMap, "login", m.Login) + populate(objectMap, "sid", m.Sid) + populate(objectMap, "tenantId", m.TenantID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstanceAdministratorProperties. +func (m *ManagedInstanceAdministratorProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "administratorType": + err = unpopulate(val, "AdministratorType", &m.AdministratorType) + delete(rawMsg, key) + case "login": + err = unpopulate(val, "Login", &m.Login) + delete(rawMsg, key) + case "sid": + err = unpopulate(val, "Sid", &m.Sid) + delete(rawMsg, key) + case "tenantId": + err = unpopulate(val, "TenantID", &m.TenantID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedInstanceAzureADOnlyAuthListResult. +func (m ManagedInstanceAzureADOnlyAuthListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", m.NextLink) + populate(objectMap, "value", m.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstanceAzureADOnlyAuthListResult. +func (m *ManagedInstanceAzureADOnlyAuthListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &m.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &m.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedInstanceAzureADOnlyAuthProperties. +func (m ManagedInstanceAzureADOnlyAuthProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "azureADOnlyAuthentication", m.AzureADOnlyAuthentication) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstanceAzureADOnlyAuthProperties. +func (m *ManagedInstanceAzureADOnlyAuthProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "azureADOnlyAuthentication": + err = unpopulate(val, "AzureADOnlyAuthentication", &m.AzureADOnlyAuthentication) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedInstanceAzureADOnlyAuthentication. +func (m ManagedInstanceAzureADOnlyAuthentication) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", m.ID) + populate(objectMap, "name", m.Name) + populate(objectMap, "properties", m.Properties) + populate(objectMap, "type", m.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstanceAzureADOnlyAuthentication. +func (m *ManagedInstanceAzureADOnlyAuthentication) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &m.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedInstanceEditionCapability. +func (m ManagedInstanceEditionCapability) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", m.Name) + populate(objectMap, "reason", m.Reason) + populate(objectMap, "status", m.Status) + populate(objectMap, "supportedFamilies", m.SupportedFamilies) + populate(objectMap, "supportedStorageCapabilities", m.SupportedStorageCapabilities) + populate(objectMap, "zoneRedundant", m.ZoneRedundant) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstanceEditionCapability. +func (m *ManagedInstanceEditionCapability) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "reason": + err = unpopulate(val, "Reason", &m.Reason) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &m.Status) + delete(rawMsg, key) + case "supportedFamilies": + err = unpopulate(val, "SupportedFamilies", &m.SupportedFamilies) + delete(rawMsg, key) + case "supportedStorageCapabilities": + err = unpopulate(val, "SupportedStorageCapabilities", &m.SupportedStorageCapabilities) + delete(rawMsg, key) + case "zoneRedundant": + err = unpopulate(val, "ZoneRedundant", &m.ZoneRedundant) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedInstanceEncryptionProtector. +func (m ManagedInstanceEncryptionProtector) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", m.ID) + populate(objectMap, "kind", m.Kind) + populate(objectMap, "name", m.Name) + populate(objectMap, "properties", m.Properties) + populate(objectMap, "type", m.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstanceEncryptionProtector. +func (m *ManagedInstanceEncryptionProtector) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &m.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &m.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedInstanceEncryptionProtectorListResult. +func (m ManagedInstanceEncryptionProtectorListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", m.NextLink) + populate(objectMap, "value", m.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstanceEncryptionProtectorListResult. +func (m *ManagedInstanceEncryptionProtectorListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &m.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &m.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedInstanceEncryptionProtectorProperties. +func (m ManagedInstanceEncryptionProtectorProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "autoRotationEnabled", m.AutoRotationEnabled) + populate(objectMap, "serverKeyName", m.ServerKeyName) + populate(objectMap, "serverKeyType", m.ServerKeyType) + populate(objectMap, "thumbprint", m.Thumbprint) + populate(objectMap, "uri", m.URI) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstanceEncryptionProtectorProperties. +func (m *ManagedInstanceEncryptionProtectorProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "autoRotationEnabled": + err = unpopulate(val, "AutoRotationEnabled", &m.AutoRotationEnabled) + delete(rawMsg, key) + case "serverKeyName": + err = unpopulate(val, "ServerKeyName", &m.ServerKeyName) + delete(rawMsg, key) + case "serverKeyType": + err = unpopulate(val, "ServerKeyType", &m.ServerKeyType) + delete(rawMsg, key) + case "thumbprint": + err = unpopulate(val, "Thumbprint", &m.Thumbprint) + delete(rawMsg, key) + case "uri": + err = unpopulate(val, "URI", &m.URI) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedInstanceExternalAdministrator. +func (m ManagedInstanceExternalAdministrator) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "administratorType", m.AdministratorType) + populate(objectMap, "azureADOnlyAuthentication", m.AzureADOnlyAuthentication) + populate(objectMap, "login", m.Login) + populate(objectMap, "principalType", m.PrincipalType) + populate(objectMap, "sid", m.Sid) + populate(objectMap, "tenantId", m.TenantID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstanceExternalAdministrator. +func (m *ManagedInstanceExternalAdministrator) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "administratorType": + err = unpopulate(val, "AdministratorType", &m.AdministratorType) + delete(rawMsg, key) + case "azureADOnlyAuthentication": + err = unpopulate(val, "AzureADOnlyAuthentication", &m.AzureADOnlyAuthentication) + delete(rawMsg, key) + case "login": + err = unpopulate(val, "Login", &m.Login) + delete(rawMsg, key) + case "principalType": + err = unpopulate(val, "PrincipalType", &m.PrincipalType) + delete(rawMsg, key) + case "sid": + err = unpopulate(val, "Sid", &m.Sid) + delete(rawMsg, key) + case "tenantId": + err = unpopulate(val, "TenantID", &m.TenantID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedInstanceFamilyCapability. +func (m ManagedInstanceFamilyCapability) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", m.Name) + populate(objectMap, "reason", m.Reason) + populate(objectMap, "sku", m.SKU) + populate(objectMap, "status", m.Status) + populate(objectMap, "supportedLicenseTypes", m.SupportedLicenseTypes) + populate(objectMap, "supportedVcoresValues", m.SupportedVcoresValues) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstanceFamilyCapability. +func (m *ManagedInstanceFamilyCapability) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "reason": + err = unpopulate(val, "Reason", &m.Reason) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &m.SKU) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &m.Status) + delete(rawMsg, key) + case "supportedLicenseTypes": + err = unpopulate(val, "SupportedLicenseTypes", &m.SupportedLicenseTypes) + delete(rawMsg, key) + case "supportedVcoresValues": + err = unpopulate(val, "SupportedVcoresValues", &m.SupportedVcoresValues) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedInstanceKey. +func (m ManagedInstanceKey) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", m.ID) + populate(objectMap, "kind", m.Kind) + populate(objectMap, "name", m.Name) + populate(objectMap, "properties", m.Properties) + populate(objectMap, "type", m.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstanceKey. +func (m *ManagedInstanceKey) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &m.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &m.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedInstanceKeyListResult. +func (m ManagedInstanceKeyListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", m.NextLink) + populate(objectMap, "value", m.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstanceKeyListResult. +func (m *ManagedInstanceKeyListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &m.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &m.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedInstanceKeyProperties. +func (m ManagedInstanceKeyProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "autoRotationEnabled", m.AutoRotationEnabled) + populateDateTimeRFC3339(objectMap, "creationDate", m.CreationDate) + populate(objectMap, "serverKeyType", m.ServerKeyType) + populate(objectMap, "thumbprint", m.Thumbprint) + populate(objectMap, "uri", m.URI) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstanceKeyProperties. +func (m *ManagedInstanceKeyProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "autoRotationEnabled": + err = unpopulate(val, "AutoRotationEnabled", &m.AutoRotationEnabled) + delete(rawMsg, key) + case "creationDate": + err = unpopulateDateTimeRFC3339(val, "CreationDate", &m.CreationDate) + delete(rawMsg, key) + case "serverKeyType": + err = unpopulate(val, "ServerKeyType", &m.ServerKeyType) + delete(rawMsg, key) + case "thumbprint": + err = unpopulate(val, "Thumbprint", &m.Thumbprint) + delete(rawMsg, key) + case "uri": + err = unpopulate(val, "URI", &m.URI) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedInstanceListResult. +func (m ManagedInstanceListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", m.NextLink) + populate(objectMap, "value", m.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstanceListResult. +func (m *ManagedInstanceListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &m.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &m.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedInstanceLongTermRetentionBackup. +func (m ManagedInstanceLongTermRetentionBackup) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", m.ID) + populate(objectMap, "name", m.Name) + populate(objectMap, "properties", m.Properties) + populate(objectMap, "type", m.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstanceLongTermRetentionBackup. +func (m *ManagedInstanceLongTermRetentionBackup) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &m.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedInstanceLongTermRetentionBackupListResult. +func (m ManagedInstanceLongTermRetentionBackupListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", m.NextLink) + populate(objectMap, "value", m.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstanceLongTermRetentionBackupListResult. +func (m *ManagedInstanceLongTermRetentionBackupListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &m.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &m.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedInstanceLongTermRetentionBackupProperties. +func (m ManagedInstanceLongTermRetentionBackupProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "backupExpirationTime", m.BackupExpirationTime) + populate(objectMap, "backupStorageRedundancy", m.BackupStorageRedundancy) + populateDateTimeRFC3339(objectMap, "backupTime", m.BackupTime) + populateDateTimeRFC3339(objectMap, "databaseDeletionTime", m.DatabaseDeletionTime) + populate(objectMap, "databaseName", m.DatabaseName) + populateDateTimeRFC3339(objectMap, "managedInstanceCreateTime", m.ManagedInstanceCreateTime) + populate(objectMap, "managedInstanceName", m.ManagedInstanceName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstanceLongTermRetentionBackupProperties. +func (m *ManagedInstanceLongTermRetentionBackupProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backupExpirationTime": + err = unpopulateDateTimeRFC3339(val, "BackupExpirationTime", &m.BackupExpirationTime) + delete(rawMsg, key) + case "backupStorageRedundancy": + err = unpopulate(val, "BackupStorageRedundancy", &m.BackupStorageRedundancy) + delete(rawMsg, key) + case "backupTime": + err = unpopulateDateTimeRFC3339(val, "BackupTime", &m.BackupTime) + delete(rawMsg, key) + case "databaseDeletionTime": + err = unpopulateDateTimeRFC3339(val, "DatabaseDeletionTime", &m.DatabaseDeletionTime) + delete(rawMsg, key) + case "databaseName": + err = unpopulate(val, "DatabaseName", &m.DatabaseName) + delete(rawMsg, key) + case "managedInstanceCreateTime": + err = unpopulateDateTimeRFC3339(val, "ManagedInstanceCreateTime", &m.ManagedInstanceCreateTime) + delete(rawMsg, key) + case "managedInstanceName": + err = unpopulate(val, "ManagedInstanceName", &m.ManagedInstanceName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedInstanceLongTermRetentionPolicy. +func (m ManagedInstanceLongTermRetentionPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", m.ID) + populate(objectMap, "name", m.Name) + populate(objectMap, "properties", m.Properties) + populate(objectMap, "type", m.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstanceLongTermRetentionPolicy. +func (m *ManagedInstanceLongTermRetentionPolicy) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &m.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedInstanceLongTermRetentionPolicyListResult. +func (m ManagedInstanceLongTermRetentionPolicyListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", m.NextLink) + populate(objectMap, "value", m.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstanceLongTermRetentionPolicyListResult. +func (m *ManagedInstanceLongTermRetentionPolicyListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &m.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &m.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedInstanceMaintenanceConfigurationCapability. +func (m ManagedInstanceMaintenanceConfigurationCapability) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", m.Name) + populate(objectMap, "reason", m.Reason) + populate(objectMap, "status", m.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstanceMaintenanceConfigurationCapability. +func (m *ManagedInstanceMaintenanceConfigurationCapability) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "reason": + err = unpopulate(val, "Reason", &m.Reason) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &m.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedInstanceOperation. +func (m ManagedInstanceOperation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", m.ID) + populate(objectMap, "name", m.Name) + populate(objectMap, "properties", m.Properties) + populate(objectMap, "type", m.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstanceOperation. +func (m *ManagedInstanceOperation) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &m.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedInstanceOperationListResult. +func (m ManagedInstanceOperationListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", m.NextLink) + populate(objectMap, "value", m.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstanceOperationListResult. +func (m *ManagedInstanceOperationListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &m.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &m.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedInstanceOperationParametersPair. +func (m ManagedInstanceOperationParametersPair) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "currentParameters", m.CurrentParameters) + populate(objectMap, "requestedParameters", m.RequestedParameters) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstanceOperationParametersPair. +func (m *ManagedInstanceOperationParametersPair) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "currentParameters": + err = unpopulate(val, "CurrentParameters", &m.CurrentParameters) + delete(rawMsg, key) + case "requestedParameters": + err = unpopulate(val, "RequestedParameters", &m.RequestedParameters) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedInstanceOperationProperties. +func (m ManagedInstanceOperationProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", m.Description) + populate(objectMap, "errorCode", m.ErrorCode) + populate(objectMap, "errorDescription", m.ErrorDescription) + populate(objectMap, "errorSeverity", m.ErrorSeverity) + populateDateTimeRFC3339(objectMap, "estimatedCompletionTime", m.EstimatedCompletionTime) + populate(objectMap, "isCancellable", m.IsCancellable) + populate(objectMap, "isUserError", m.IsUserError) + populate(objectMap, "managedInstanceName", m.ManagedInstanceName) + populate(objectMap, "operation", m.Operation) + populate(objectMap, "operationFriendlyName", m.OperationFriendlyName) + populate(objectMap, "operationParameters", m.OperationParameters) + populate(objectMap, "operationSteps", m.OperationSteps) + populate(objectMap, "percentComplete", m.PercentComplete) + populateDateTimeRFC3339(objectMap, "startTime", m.StartTime) + populate(objectMap, "state", m.State) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstanceOperationProperties. +func (m *ManagedInstanceOperationProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &m.Description) + delete(rawMsg, key) + case "errorCode": + err = unpopulate(val, "ErrorCode", &m.ErrorCode) + delete(rawMsg, key) + case "errorDescription": + err = unpopulate(val, "ErrorDescription", &m.ErrorDescription) + delete(rawMsg, key) + case "errorSeverity": + err = unpopulate(val, "ErrorSeverity", &m.ErrorSeverity) + delete(rawMsg, key) + case "estimatedCompletionTime": + err = unpopulateDateTimeRFC3339(val, "EstimatedCompletionTime", &m.EstimatedCompletionTime) + delete(rawMsg, key) + case "isCancellable": + err = unpopulate(val, "IsCancellable", &m.IsCancellable) + delete(rawMsg, key) + case "isUserError": + err = unpopulate(val, "IsUserError", &m.IsUserError) + delete(rawMsg, key) + case "managedInstanceName": + err = unpopulate(val, "ManagedInstanceName", &m.ManagedInstanceName) + delete(rawMsg, key) + case "operation": + err = unpopulate(val, "Operation", &m.Operation) + delete(rawMsg, key) + case "operationFriendlyName": + err = unpopulate(val, "OperationFriendlyName", &m.OperationFriendlyName) + delete(rawMsg, key) + case "operationParameters": + err = unpopulate(val, "OperationParameters", &m.OperationParameters) + delete(rawMsg, key) + case "operationSteps": + err = unpopulate(val, "OperationSteps", &m.OperationSteps) + delete(rawMsg, key) + case "percentComplete": + err = unpopulate(val, "PercentComplete", &m.PercentComplete) + delete(rawMsg, key) + case "startTime": + err = unpopulateDateTimeRFC3339(val, "StartTime", &m.StartTime) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &m.State) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedInstanceOperationSteps. +func (m ManagedInstanceOperationSteps) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "currentStep", m.CurrentStep) + populate(objectMap, "stepsList", m.StepsList) + populate(objectMap, "totalSteps", m.TotalSteps) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstanceOperationSteps. +func (m *ManagedInstanceOperationSteps) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "currentStep": + err = unpopulate(val, "CurrentStep", &m.CurrentStep) + delete(rawMsg, key) + case "stepsList": + err = unpopulate(val, "StepsList", &m.StepsList) + delete(rawMsg, key) + case "totalSteps": + err = unpopulate(val, "TotalSteps", &m.TotalSteps) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedInstancePairInfo. +func (m ManagedInstancePairInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "partnerManagedInstanceId", m.PartnerManagedInstanceID) + populate(objectMap, "primaryManagedInstanceId", m.PrimaryManagedInstanceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstancePairInfo. +func (m *ManagedInstancePairInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "partnerManagedInstanceId": + err = unpopulate(val, "PartnerManagedInstanceID", &m.PartnerManagedInstanceID) + delete(rawMsg, key) + case "primaryManagedInstanceId": + err = unpopulate(val, "PrimaryManagedInstanceID", &m.PrimaryManagedInstanceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedInstancePecProperty. +func (m ManagedInstancePecProperty) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", m.ID) + populate(objectMap, "properties", m.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstancePecProperty. +func (m *ManagedInstancePecProperty) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &m.ID) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedInstancePrivateEndpointConnection. +func (m ManagedInstancePrivateEndpointConnection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", m.ID) + populate(objectMap, "name", m.Name) + populate(objectMap, "properties", m.Properties) + populate(objectMap, "type", m.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstancePrivateEndpointConnection. +func (m *ManagedInstancePrivateEndpointConnection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &m.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedInstancePrivateEndpointConnectionListResult. +func (m ManagedInstancePrivateEndpointConnectionListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", m.NextLink) + populate(objectMap, "value", m.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstancePrivateEndpointConnectionListResult. +func (m *ManagedInstancePrivateEndpointConnectionListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &m.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &m.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedInstancePrivateEndpointConnectionProperties. +func (m ManagedInstancePrivateEndpointConnectionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "privateEndpoint", m.PrivateEndpoint) + populate(objectMap, "privateLinkServiceConnectionState", m.PrivateLinkServiceConnectionState) + populate(objectMap, "provisioningState", m.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstancePrivateEndpointConnectionProperties. +func (m *ManagedInstancePrivateEndpointConnectionProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "privateEndpoint": + err = unpopulate(val, "PrivateEndpoint", &m.PrivateEndpoint) + delete(rawMsg, key) + case "privateLinkServiceConnectionState": + err = unpopulate(val, "PrivateLinkServiceConnectionState", &m.PrivateLinkServiceConnectionState) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &m.ProvisioningState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedInstancePrivateEndpointProperty. +func (m ManagedInstancePrivateEndpointProperty) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", m.ID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstancePrivateEndpointProperty. +func (m *ManagedInstancePrivateEndpointProperty) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &m.ID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedInstancePrivateLink. +func (m ManagedInstancePrivateLink) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", m.ID) + populate(objectMap, "name", m.Name) + populate(objectMap, "properties", m.Properties) + populate(objectMap, "type", m.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstancePrivateLink. +func (m *ManagedInstancePrivateLink) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &m.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedInstancePrivateLinkListResult. +func (m ManagedInstancePrivateLinkListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", m.NextLink) + populate(objectMap, "value", m.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstancePrivateLinkListResult. +func (m *ManagedInstancePrivateLinkListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &m.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &m.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedInstancePrivateLinkProperties. +func (m ManagedInstancePrivateLinkProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "groupId", m.GroupID) + populate(objectMap, "requiredMembers", m.RequiredMembers) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstancePrivateLinkProperties. +func (m *ManagedInstancePrivateLinkProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "groupId": + err = unpopulate(val, "GroupID", &m.GroupID) + delete(rawMsg, key) + case "requiredMembers": + err = unpopulate(val, "RequiredMembers", &m.RequiredMembers) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedInstancePrivateLinkServiceConnectionStateProperty. +func (m ManagedInstancePrivateLinkServiceConnectionStateProperty) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "actionsRequired", m.ActionsRequired) + populate(objectMap, "description", m.Description) + populate(objectMap, "status", m.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstancePrivateLinkServiceConnectionStateProperty. +func (m *ManagedInstancePrivateLinkServiceConnectionStateProperty) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "actionsRequired": + err = unpopulate(val, "ActionsRequired", &m.ActionsRequired) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &m.Description) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &m.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedInstanceProperties. +func (m ManagedInstanceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "administratorLogin", m.AdministratorLogin) + populate(objectMap, "administratorLoginPassword", m.AdministratorLoginPassword) + populate(objectMap, "administrators", m.Administrators) + populate(objectMap, "collation", m.Collation) + populate(objectMap, "currentBackupStorageRedundancy", m.CurrentBackupStorageRedundancy) + populate(objectMap, "dnsZone", m.DNSZone) + populate(objectMap, "dnsZonePartner", m.DNSZonePartner) + populate(objectMap, "fullyQualifiedDomainName", m.FullyQualifiedDomainName) + populate(objectMap, "instancePoolId", m.InstancePoolID) + populate(objectMap, "keyId", m.KeyID) + populate(objectMap, "licenseType", m.LicenseType) + populate(objectMap, "maintenanceConfigurationId", m.MaintenanceConfigurationID) + populate(objectMap, "managedInstanceCreateMode", m.ManagedInstanceCreateMode) + populate(objectMap, "minimalTlsVersion", m.MinimalTLSVersion) + populate(objectMap, "primaryUserAssignedIdentityId", m.PrimaryUserAssignedIdentityID) + populate(objectMap, "privateEndpointConnections", m.PrivateEndpointConnections) + populate(objectMap, "provisioningState", m.ProvisioningState) + populate(objectMap, "proxyOverride", m.ProxyOverride) + populate(objectMap, "publicDataEndpointEnabled", m.PublicDataEndpointEnabled) + populate(objectMap, "requestedBackupStorageRedundancy", m.RequestedBackupStorageRedundancy) + populateDateTimeRFC3339(objectMap, "restorePointInTime", m.RestorePointInTime) + populate(objectMap, "servicePrincipal", m.ServicePrincipal) + populate(objectMap, "sourceManagedInstanceId", m.SourceManagedInstanceID) + populate(objectMap, "state", m.State) + populate(objectMap, "storageSizeInGB", m.StorageSizeInGB) + populate(objectMap, "subnetId", m.SubnetID) + populate(objectMap, "timezoneId", m.TimezoneID) + populate(objectMap, "vCores", m.VCores) + populate(objectMap, "zoneRedundant", m.ZoneRedundant) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstanceProperties. +func (m *ManagedInstanceProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "administratorLogin": + err = unpopulate(val, "AdministratorLogin", &m.AdministratorLogin) + delete(rawMsg, key) + case "administratorLoginPassword": + err = unpopulate(val, "AdministratorLoginPassword", &m.AdministratorLoginPassword) + delete(rawMsg, key) + case "administrators": + err = unpopulate(val, "Administrators", &m.Administrators) + delete(rawMsg, key) + case "collation": + err = unpopulate(val, "Collation", &m.Collation) + delete(rawMsg, key) + case "currentBackupStorageRedundancy": + err = unpopulate(val, "CurrentBackupStorageRedundancy", &m.CurrentBackupStorageRedundancy) + delete(rawMsg, key) + case "dnsZone": + err = unpopulate(val, "DNSZone", &m.DNSZone) + delete(rawMsg, key) + case "dnsZonePartner": + err = unpopulate(val, "DNSZonePartner", &m.DNSZonePartner) + delete(rawMsg, key) + case "fullyQualifiedDomainName": + err = unpopulate(val, "FullyQualifiedDomainName", &m.FullyQualifiedDomainName) + delete(rawMsg, key) + case "instancePoolId": + err = unpopulate(val, "InstancePoolID", &m.InstancePoolID) + delete(rawMsg, key) + case "keyId": + err = unpopulate(val, "KeyID", &m.KeyID) + delete(rawMsg, key) + case "licenseType": + err = unpopulate(val, "LicenseType", &m.LicenseType) + delete(rawMsg, key) + case "maintenanceConfigurationId": + err = unpopulate(val, "MaintenanceConfigurationID", &m.MaintenanceConfigurationID) + delete(rawMsg, key) + case "managedInstanceCreateMode": + err = unpopulate(val, "ManagedInstanceCreateMode", &m.ManagedInstanceCreateMode) + delete(rawMsg, key) + case "minimalTlsVersion": + err = unpopulate(val, "MinimalTLSVersion", &m.MinimalTLSVersion) + delete(rawMsg, key) + case "primaryUserAssignedIdentityId": + err = unpopulate(val, "PrimaryUserAssignedIdentityID", &m.PrimaryUserAssignedIdentityID) + delete(rawMsg, key) + case "privateEndpointConnections": + err = unpopulate(val, "PrivateEndpointConnections", &m.PrivateEndpointConnections) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &m.ProvisioningState) + delete(rawMsg, key) + case "proxyOverride": + err = unpopulate(val, "ProxyOverride", &m.ProxyOverride) + delete(rawMsg, key) + case "publicDataEndpointEnabled": + err = unpopulate(val, "PublicDataEndpointEnabled", &m.PublicDataEndpointEnabled) + delete(rawMsg, key) + case "requestedBackupStorageRedundancy": + err = unpopulate(val, "RequestedBackupStorageRedundancy", &m.RequestedBackupStorageRedundancy) + delete(rawMsg, key) + case "restorePointInTime": + err = unpopulateDateTimeRFC3339(val, "RestorePointInTime", &m.RestorePointInTime) + delete(rawMsg, key) + case "servicePrincipal": + err = unpopulate(val, "ServicePrincipal", &m.ServicePrincipal) + delete(rawMsg, key) + case "sourceManagedInstanceId": + err = unpopulate(val, "SourceManagedInstanceID", &m.SourceManagedInstanceID) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &m.State) + delete(rawMsg, key) + case "storageSizeInGB": + err = unpopulate(val, "StorageSizeInGB", &m.StorageSizeInGB) + delete(rawMsg, key) + case "subnetId": + err = unpopulate(val, "SubnetID", &m.SubnetID) + delete(rawMsg, key) + case "timezoneId": + err = unpopulate(val, "TimezoneID", &m.TimezoneID) + delete(rawMsg, key) + case "vCores": + err = unpopulate(val, "VCores", &m.VCores) + delete(rawMsg, key) + case "zoneRedundant": + err = unpopulate(val, "ZoneRedundant", &m.ZoneRedundant) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedInstanceQuery. +func (m ManagedInstanceQuery) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", m.ID) + populate(objectMap, "name", m.Name) + populate(objectMap, "properties", m.Properties) + populate(objectMap, "type", m.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstanceQuery. +func (m *ManagedInstanceQuery) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &m.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedInstanceQueryStatistics. +func (m ManagedInstanceQueryStatistics) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", m.NextLink) + populate(objectMap, "value", m.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstanceQueryStatistics. +func (m *ManagedInstanceQueryStatistics) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &m.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &m.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedInstanceUpdate. +func (m ManagedInstanceUpdate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "identity", m.Identity) + populate(objectMap, "properties", m.Properties) + populate(objectMap, "sku", m.SKU) + populate(objectMap, "tags", m.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstanceUpdate. +func (m *ManagedInstanceUpdate) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "identity": + err = unpopulate(val, "Identity", &m.Identity) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &m.SKU) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &m.Tags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedInstanceVcoresCapability. +func (m ManagedInstanceVcoresCapability) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "includedMaxSize", m.IncludedMaxSize) + populate(objectMap, "instancePoolSupported", m.InstancePoolSupported) + populate(objectMap, "name", m.Name) + populate(objectMap, "reason", m.Reason) + populate(objectMap, "standaloneSupported", m.StandaloneSupported) + populate(objectMap, "status", m.Status) + populate(objectMap, "supportedMaintenanceConfigurations", m.SupportedMaintenanceConfigurations) + populate(objectMap, "supportedStorageSizes", m.SupportedStorageSizes) + populate(objectMap, "value", m.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstanceVcoresCapability. +func (m *ManagedInstanceVcoresCapability) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "includedMaxSize": + err = unpopulate(val, "IncludedMaxSize", &m.IncludedMaxSize) + delete(rawMsg, key) + case "instancePoolSupported": + err = unpopulate(val, "InstancePoolSupported", &m.InstancePoolSupported) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "reason": + err = unpopulate(val, "Reason", &m.Reason) + delete(rawMsg, key) + case "standaloneSupported": + err = unpopulate(val, "StandaloneSupported", &m.StandaloneSupported) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &m.Status) + delete(rawMsg, key) + case "supportedMaintenanceConfigurations": + err = unpopulate(val, "SupportedMaintenanceConfigurations", &m.SupportedMaintenanceConfigurations) + delete(rawMsg, key) + case "supportedStorageSizes": + err = unpopulate(val, "SupportedStorageSizes", &m.SupportedStorageSizes) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &m.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedInstanceVersionCapability. +func (m ManagedInstanceVersionCapability) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", m.Name) + populate(objectMap, "reason", m.Reason) + populate(objectMap, "status", m.Status) + populate(objectMap, "supportedEditions", m.SupportedEditions) + populate(objectMap, "supportedInstancePoolEditions", m.SupportedInstancePoolEditions) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstanceVersionCapability. +func (m *ManagedInstanceVersionCapability) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "reason": + err = unpopulate(val, "Reason", &m.Reason) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &m.Status) + delete(rawMsg, key) + case "supportedEditions": + err = unpopulate(val, "SupportedEditions", &m.SupportedEditions) + delete(rawMsg, key) + case "supportedInstancePoolEditions": + err = unpopulate(val, "SupportedInstancePoolEditions", &m.SupportedInstancePoolEditions) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedInstanceVulnerabilityAssessment. +func (m ManagedInstanceVulnerabilityAssessment) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", m.ID) + populate(objectMap, "name", m.Name) + populate(objectMap, "properties", m.Properties) + populate(objectMap, "type", m.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstanceVulnerabilityAssessment. +func (m *ManagedInstanceVulnerabilityAssessment) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &m.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedInstanceVulnerabilityAssessmentListResult. +func (m ManagedInstanceVulnerabilityAssessmentListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", m.NextLink) + populate(objectMap, "value", m.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstanceVulnerabilityAssessmentListResult. +func (m *ManagedInstanceVulnerabilityAssessmentListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &m.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &m.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedInstanceVulnerabilityAssessmentProperties. +func (m ManagedInstanceVulnerabilityAssessmentProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "recurringScans", m.RecurringScans) + populate(objectMap, "storageAccountAccessKey", m.StorageAccountAccessKey) + populate(objectMap, "storageContainerPath", m.StorageContainerPath) + populate(objectMap, "storageContainerSasKey", m.StorageContainerSasKey) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstanceVulnerabilityAssessmentProperties. +func (m *ManagedInstanceVulnerabilityAssessmentProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "recurringScans": + err = unpopulate(val, "RecurringScans", &m.RecurringScans) + delete(rawMsg, key) + case "storageAccountAccessKey": + err = unpopulate(val, "StorageAccountAccessKey", &m.StorageAccountAccessKey) + delete(rawMsg, key) + case "storageContainerPath": + err = unpopulate(val, "StorageContainerPath", &m.StorageContainerPath) + delete(rawMsg, key) + case "storageContainerSasKey": + err = unpopulate(val, "StorageContainerSasKey", &m.StorageContainerSasKey) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedServerSecurityAlertPolicy. +func (m ManagedServerSecurityAlertPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", m.ID) + populate(objectMap, "name", m.Name) + populate(objectMap, "properties", m.Properties) + populate(objectMap, "systemData", m.SystemData) + populate(objectMap, "type", m.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedServerSecurityAlertPolicy. +func (m *ManagedServerSecurityAlertPolicy) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &m.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &m.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedServerSecurityAlertPolicyListResult. +func (m ManagedServerSecurityAlertPolicyListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", m.NextLink) + populate(objectMap, "value", m.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedServerSecurityAlertPolicyListResult. +func (m *ManagedServerSecurityAlertPolicyListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &m.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &m.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedTransparentDataEncryption. +func (m ManagedTransparentDataEncryption) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", m.ID) + populate(objectMap, "name", m.Name) + populate(objectMap, "properties", m.Properties) + populate(objectMap, "type", m.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedTransparentDataEncryption. +func (m *ManagedTransparentDataEncryption) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &m.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedTransparentDataEncryptionListResult. +func (m ManagedTransparentDataEncryptionListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", m.NextLink) + populate(objectMap, "value", m.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedTransparentDataEncryptionListResult. +func (m *ManagedTransparentDataEncryptionListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &m.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &m.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedTransparentDataEncryptionProperties. +func (m ManagedTransparentDataEncryptionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "state", m.State) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedTransparentDataEncryptionProperties. +func (m *ManagedTransparentDataEncryptionProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "state": + err = unpopulate(val, "State", &m.State) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MaxSizeCapability. +func (m MaxSizeCapability) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "limit", m.Limit) + populate(objectMap, "unit", m.Unit) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MaxSizeCapability. +func (m *MaxSizeCapability) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "limit": + err = unpopulate(val, "Limit", &m.Limit) + delete(rawMsg, key) + case "unit": + err = unpopulate(val, "Unit", &m.Unit) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MaxSizeRangeCapability. +func (m MaxSizeRangeCapability) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "logSize", m.LogSize) + populate(objectMap, "maxValue", m.MaxValue) + populate(objectMap, "minValue", m.MinValue) + populate(objectMap, "reason", m.Reason) + populate(objectMap, "scaleSize", m.ScaleSize) + populate(objectMap, "status", m.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MaxSizeRangeCapability. +func (m *MaxSizeRangeCapability) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "logSize": + err = unpopulate(val, "LogSize", &m.LogSize) + delete(rawMsg, key) + case "maxValue": + err = unpopulate(val, "MaxValue", &m.MaxValue) + delete(rawMsg, key) + case "minValue": + err = unpopulate(val, "MinValue", &m.MinValue) + delete(rawMsg, key) + case "reason": + err = unpopulate(val, "Reason", &m.Reason) + delete(rawMsg, key) + case "scaleSize": + err = unpopulate(val, "ScaleSize", &m.ScaleSize) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &m.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Metric. +func (m Metric) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "endTime", m.EndTime) + populate(objectMap, "metricValues", m.MetricValues) + populate(objectMap, "name", m.Name) + populateDateTimeRFC3339(objectMap, "startTime", m.StartTime) + populate(objectMap, "timeGrain", m.TimeGrain) + populate(objectMap, "unit", m.Unit) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Metric. +func (m *Metric) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "endTime": + err = unpopulateDateTimeRFC3339(val, "EndTime", &m.EndTime) + delete(rawMsg, key) + case "metricValues": + err = unpopulate(val, "MetricValues", &m.MetricValues) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "startTime": + err = unpopulateDateTimeRFC3339(val, "StartTime", &m.StartTime) + delete(rawMsg, key) + case "timeGrain": + err = unpopulate(val, "TimeGrain", &m.TimeGrain) + delete(rawMsg, key) + case "unit": + err = unpopulate(val, "Unit", &m.Unit) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MetricAvailability. +func (m MetricAvailability) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "retention", m.Retention) + populate(objectMap, "timeGrain", m.TimeGrain) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MetricAvailability. +func (m *MetricAvailability) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "retention": + err = unpopulate(val, "Retention", &m.Retention) + delete(rawMsg, key) + case "timeGrain": + err = unpopulate(val, "TimeGrain", &m.TimeGrain) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MetricDefinition. +func (m MetricDefinition) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "metricAvailabilities", m.MetricAvailabilities) + populate(objectMap, "name", m.Name) + populate(objectMap, "primaryAggregationType", m.PrimaryAggregationType) + populate(objectMap, "resourceUri", m.ResourceURI) + populate(objectMap, "unit", m.Unit) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MetricDefinition. +func (m *MetricDefinition) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "metricAvailabilities": + err = unpopulate(val, "MetricAvailabilities", &m.MetricAvailabilities) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "primaryAggregationType": + err = unpopulate(val, "PrimaryAggregationType", &m.PrimaryAggregationType) + delete(rawMsg, key) + case "resourceUri": + err = unpopulate(val, "ResourceURI", &m.ResourceURI) + delete(rawMsg, key) + case "unit": + err = unpopulate(val, "Unit", &m.Unit) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MetricDefinitionListResult. +func (m MetricDefinitionListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", m.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MetricDefinitionListResult. +func (m *MetricDefinitionListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &m.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MetricListResult. +func (m MetricListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", m.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MetricListResult. +func (m *MetricListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &m.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MetricName. +func (m MetricName) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "localizedValue", m.LocalizedValue) + populate(objectMap, "value", m.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MetricName. +func (m *MetricName) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "localizedValue": + err = unpopulate(val, "LocalizedValue", &m.LocalizedValue) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &m.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MetricValue. +func (m MetricValue) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "average", m.Average) + populate(objectMap, "count", m.Count) + populate(objectMap, "maximum", m.Maximum) + populate(objectMap, "minimum", m.Minimum) + populateDateTimeRFC3339(objectMap, "timestamp", m.Timestamp) + populate(objectMap, "total", m.Total) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MetricValue. +func (m *MetricValue) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "average": + err = unpopulate(val, "Average", &m.Average) + delete(rawMsg, key) + case "count": + err = unpopulate(val, "Count", &m.Count) + delete(rawMsg, key) + case "maximum": + err = unpopulate(val, "Maximum", &m.Maximum) + delete(rawMsg, key) + case "minimum": + err = unpopulate(val, "Minimum", &m.Minimum) + delete(rawMsg, key) + case "timestamp": + err = unpopulateDateTimeRFC3339(val, "Timestamp", &m.Timestamp) + delete(rawMsg, key) + case "total": + err = unpopulate(val, "Total", &m.Total) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MinCapacityCapability. +func (m MinCapacityCapability) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "reason", m.Reason) + populate(objectMap, "status", m.Status) + populate(objectMap, "value", m.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MinCapacityCapability. +func (m *MinCapacityCapability) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "reason": + err = unpopulate(val, "Reason", &m.Reason) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &m.Status) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &m.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Name. +func (n Name) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "localizedValue", n.LocalizedValue) + populate(objectMap, "value", n.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Name. +func (n *Name) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "localizedValue": + err = unpopulate(val, "LocalizedValue", &n.LocalizedValue) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &n.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type NetworkIsolationSettings. +func (n NetworkIsolationSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "sqlServerResourceId", n.SQLServerResourceID) + populate(objectMap, "storageAccountResourceId", n.StorageAccountResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NetworkIsolationSettings. +func (n *NetworkIsolationSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "sqlServerResourceId": + err = unpopulate(val, "SQLServerResourceID", &n.SQLServerResourceID) + delete(rawMsg, key) + case "storageAccountResourceId": + err = unpopulate(val, "StorageAccountResourceID", &n.StorageAccountResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Operation. +func (o Operation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "display", o.Display) + populate(objectMap, "name", o.Name) + populate(objectMap, "origin", o.Origin) + populate(objectMap, "properties", o.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Operation. +func (o *Operation) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "display": + err = unpopulate(val, "Display", &o.Display) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &o.Name) + delete(rawMsg, key) + case "origin": + err = unpopulate(val, "Origin", &o.Origin) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &o.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OperationDisplay. +func (o OperationDisplay) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", o.Description) + populate(objectMap, "operation", o.Operation) + populate(objectMap, "provider", o.Provider) + populate(objectMap, "resource", o.Resource) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplay. +func (o *OperationDisplay) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &o.Description) + delete(rawMsg, key) + case "operation": + err = unpopulate(val, "Operation", &o.Operation) + delete(rawMsg, key) + case "provider": + err = unpopulate(val, "Provider", &o.Provider) + delete(rawMsg, key) + case "resource": + err = unpopulate(val, "Resource", &o.Resource) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OperationImpact. +func (o OperationImpact) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "changeValueAbsolute", o.ChangeValueAbsolute) + populate(objectMap, "changeValueRelative", o.ChangeValueRelative) + populate(objectMap, "name", o.Name) + populate(objectMap, "unit", o.Unit) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OperationImpact. +func (o *OperationImpact) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "changeValueAbsolute": + err = unpopulate(val, "ChangeValueAbsolute", &o.ChangeValueAbsolute) + delete(rawMsg, key) + case "changeValueRelative": + err = unpopulate(val, "ChangeValueRelative", &o.ChangeValueRelative) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &o.Name) + delete(rawMsg, key) + case "unit": + err = unpopulate(val, "Unit", &o.Unit) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OperationListResult. +func (o OperationListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", o.NextLink) + populate(objectMap, "value", o.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OperationListResult. +func (o *OperationListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &o.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &o.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OutboundFirewallRule. +func (o OutboundFirewallRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", o.ID) + populate(objectMap, "name", o.Name) + populate(objectMap, "properties", o.Properties) + populate(objectMap, "type", o.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OutboundFirewallRule. +func (o *OutboundFirewallRule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &o.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &o.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &o.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &o.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OutboundFirewallRuleListResult. +func (o OutboundFirewallRuleListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", o.NextLink) + populate(objectMap, "value", o.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OutboundFirewallRuleListResult. +func (o *OutboundFirewallRuleListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &o.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &o.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OutboundFirewallRuleProperties. +func (o OutboundFirewallRuleProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "provisioningState", o.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OutboundFirewallRuleProperties. +func (o *OutboundFirewallRuleProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &o.ProvisioningState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PartnerInfo. +func (p PartnerInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", p.ID) + populate(objectMap, "location", p.Location) + populate(objectMap, "replicationRole", p.ReplicationRole) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PartnerInfo. +func (p *PartnerInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &p.Location) + delete(rawMsg, key) + case "replicationRole": + err = unpopulate(val, "ReplicationRole", &p.ReplicationRole) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PartnerRegionInfo. +func (p PartnerRegionInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "location", p.Location) + populate(objectMap, "replicationRole", p.ReplicationRole) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PartnerRegionInfo. +func (p *PartnerRegionInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "location": + err = unpopulate(val, "Location", &p.Location) + delete(rawMsg, key) + case "replicationRole": + err = unpopulate(val, "ReplicationRole", &p.ReplicationRole) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PerformanceLevelCapability. +func (p PerformanceLevelCapability) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "unit", p.Unit) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PerformanceLevelCapability. +func (p *PerformanceLevelCapability) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "unit": + err = unpopulate(val, "Unit", &p.Unit) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &p.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnection. +func (p PrivateEndpointConnection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", p.ID) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnection. +func (p *PrivateEndpointConnection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionListResult. +func (p PrivateEndpointConnectionListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", p.NextLink) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionListResult. +func (p *PrivateEndpointConnectionListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &p.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &p.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionProperties. +func (p PrivateEndpointConnectionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "privateEndpoint", p.PrivateEndpoint) + populate(objectMap, "privateLinkServiceConnectionState", p.PrivateLinkServiceConnectionState) + populate(objectMap, "provisioningState", p.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionProperties. +func (p *PrivateEndpointConnectionProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "privateEndpoint": + err = unpopulate(val, "PrivateEndpoint", &p.PrivateEndpoint) + delete(rawMsg, key) + case "privateLinkServiceConnectionState": + err = unpopulate(val, "PrivateLinkServiceConnectionState", &p.PrivateLinkServiceConnectionState) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &p.ProvisioningState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionRequestStatus. +func (p PrivateEndpointConnectionRequestStatus) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "privateEndpointConnectionName", p.PrivateEndpointConnectionName) + populate(objectMap, "privateLinkServiceId", p.PrivateLinkServiceID) + populate(objectMap, "status", p.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionRequestStatus. +func (p *PrivateEndpointConnectionRequestStatus) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "privateEndpointConnectionName": + err = unpopulate(val, "PrivateEndpointConnectionName", &p.PrivateEndpointConnectionName) + delete(rawMsg, key) + case "privateLinkServiceId": + err = unpopulate(val, "PrivateLinkServiceID", &p.PrivateLinkServiceID) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &p.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointProperty. +func (p PrivateEndpointProperty) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", p.ID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointProperty. +func (p *PrivateEndpointProperty) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateLinkResource. +func (p PrivateLinkResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", p.ID) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResource. +func (p *PrivateLinkResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourceListResult. +func (p PrivateLinkResourceListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", p.NextLink) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResourceListResult. +func (p *PrivateLinkResourceListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &p.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &p.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourceProperties. +func (p PrivateLinkResourceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "groupId", p.GroupID) + populate(objectMap, "requiredMembers", p.RequiredMembers) + populate(objectMap, "requiredZoneNames", p.RequiredZoneNames) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResourceProperties. +func (p *PrivateLinkResourceProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "groupId": + err = unpopulate(val, "GroupID", &p.GroupID) + delete(rawMsg, key) + case "requiredMembers": + err = unpopulate(val, "RequiredMembers", &p.RequiredMembers) + delete(rawMsg, key) + case "requiredZoneNames": + err = unpopulate(val, "RequiredZoneNames", &p.RequiredZoneNames) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateLinkServiceConnectionStateProperty. +func (p PrivateLinkServiceConnectionStateProperty) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "actionsRequired", p.ActionsRequired) + populate(objectMap, "description", p.Description) + populate(objectMap, "status", p.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkServiceConnectionStateProperty. +func (p *PrivateLinkServiceConnectionStateProperty) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "actionsRequired": + err = unpopulate(val, "ActionsRequired", &p.ActionsRequired) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &p.Description) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &p.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProxyResource. +func (p ProxyResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", p.ID) + populate(objectMap, "name", p.Name) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProxyResource. +func (p *ProxyResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProxyResourceWithWritableName. +func (p ProxyResourceWithWritableName) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", p.ID) + populate(objectMap, "name", p.Name) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProxyResourceWithWritableName. +func (p *ProxyResourceWithWritableName) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type QueryMetricInterval. +func (q QueryMetricInterval) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "executionCount", q.ExecutionCount) + populate(objectMap, "intervalStartTime", q.IntervalStartTime) + populate(objectMap, "intervalType", q.IntervalType) + populate(objectMap, "metrics", q.Metrics) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type QueryMetricInterval. +func (q *QueryMetricInterval) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", q, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "executionCount": + err = unpopulate(val, "ExecutionCount", &q.ExecutionCount) + delete(rawMsg, key) + case "intervalStartTime": + err = unpopulate(val, "IntervalStartTime", &q.IntervalStartTime) + delete(rawMsg, key) + case "intervalType": + err = unpopulate(val, "IntervalType", &q.IntervalType) + delete(rawMsg, key) + case "metrics": + err = unpopulate(val, "Metrics", &q.Metrics) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", q, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type QueryMetricProperties. +func (q QueryMetricProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "avg", q.Avg) + populate(objectMap, "displayName", q.DisplayName) + populate(objectMap, "max", q.Max) + populate(objectMap, "min", q.Min) + populate(objectMap, "name", q.Name) + populate(objectMap, "stdev", q.Stdev) + populate(objectMap, "sum", q.Sum) + populate(objectMap, "unit", q.Unit) + populate(objectMap, "value", q.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type QueryMetricProperties. +func (q *QueryMetricProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", q, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "avg": + err = unpopulate(val, "Avg", &q.Avg) + delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &q.DisplayName) + delete(rawMsg, key) + case "max": + err = unpopulate(val, "Max", &q.Max) + delete(rawMsg, key) + case "min": + err = unpopulate(val, "Min", &q.Min) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &q.Name) + delete(rawMsg, key) + case "stdev": + err = unpopulate(val, "Stdev", &q.Stdev) + delete(rawMsg, key) + case "sum": + err = unpopulate(val, "Sum", &q.Sum) + delete(rawMsg, key) + case "unit": + err = unpopulate(val, "Unit", &q.Unit) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &q.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", q, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type QueryProperties. +func (q QueryProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "queryText", q.QueryText) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type QueryProperties. +func (q *QueryProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", q, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "queryText": + err = unpopulate(val, "QueryText", &q.QueryText) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", q, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type QueryStatistics. +func (q QueryStatistics) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", q.ID) + populate(objectMap, "name", q.Name) + populate(objectMap, "properties", q.Properties) + populate(objectMap, "type", q.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type QueryStatistics. +func (q *QueryStatistics) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", q, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &q.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &q.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &q.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &q.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", q, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type QueryStatisticsProperties. +func (q QueryStatisticsProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "databaseName", q.DatabaseName) + populate(objectMap, "endTime", q.EndTime) + populate(objectMap, "intervals", q.Intervals) + populate(objectMap, "queryId", q.QueryID) + populate(objectMap, "startTime", q.StartTime) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type QueryStatisticsProperties. +func (q *QueryStatisticsProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", q, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "databaseName": + err = unpopulate(val, "DatabaseName", &q.DatabaseName) + delete(rawMsg, key) + case "endTime": + err = unpopulate(val, "EndTime", &q.EndTime) + delete(rawMsg, key) + case "intervals": + err = unpopulate(val, "Intervals", &q.Intervals) + delete(rawMsg, key) + case "queryId": + err = unpopulate(val, "QueryID", &q.QueryID) + delete(rawMsg, key) + case "startTime": + err = unpopulate(val, "StartTime", &q.StartTime) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", q, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ReadScaleCapability. +func (r ReadScaleCapability) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "maxNumberOfReplicas", r.MaxNumberOfReplicas) + populate(objectMap, "reason", r.Reason) + populate(objectMap, "status", r.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ReadScaleCapability. +func (r *ReadScaleCapability) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "maxNumberOfReplicas": + err = unpopulate(val, "MaxNumberOfReplicas", &r.MaxNumberOfReplicas) + delete(rawMsg, key) + case "reason": + err = unpopulate(val, "Reason", &r.Reason) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &r.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RecommendedAction. +func (r RecommendedAction) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", r.ID) + populate(objectMap, "kind", r.Kind) + populate(objectMap, "location", r.Location) + populate(objectMap, "name", r.Name) + populate(objectMap, "properties", r.Properties) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecommendedAction. +func (r *RecommendedAction) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &r.Kind) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &r.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RecommendedActionErrorInfo. +func (r RecommendedActionErrorInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "errorCode", r.ErrorCode) + populate(objectMap, "isRetryable", r.IsRetryable) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecommendedActionErrorInfo. +func (r *RecommendedActionErrorInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "errorCode": + err = unpopulate(val, "ErrorCode", &r.ErrorCode) + delete(rawMsg, key) + case "isRetryable": + err = unpopulate(val, "IsRetryable", &r.IsRetryable) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RecommendedActionImpactRecord. +func (r RecommendedActionImpactRecord) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "absoluteValue", r.AbsoluteValue) + populate(objectMap, "changeValueAbsolute", r.ChangeValueAbsolute) + populate(objectMap, "changeValueRelative", r.ChangeValueRelative) + populate(objectMap, "dimensionName", r.DimensionName) + populate(objectMap, "unit", r.Unit) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecommendedActionImpactRecord. +func (r *RecommendedActionImpactRecord) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "absoluteValue": + err = unpopulate(val, "AbsoluteValue", &r.AbsoluteValue) + delete(rawMsg, key) + case "changeValueAbsolute": + err = unpopulate(val, "ChangeValueAbsolute", &r.ChangeValueAbsolute) + delete(rawMsg, key) + case "changeValueRelative": + err = unpopulate(val, "ChangeValueRelative", &r.ChangeValueRelative) + delete(rawMsg, key) + case "dimensionName": + err = unpopulate(val, "DimensionName", &r.DimensionName) + delete(rawMsg, key) + case "unit": + err = unpopulate(val, "Unit", &r.Unit) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RecommendedActionImplementationInfo. +func (r RecommendedActionImplementationInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "method", r.Method) + populate(objectMap, "script", r.Script) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecommendedActionImplementationInfo. +func (r *RecommendedActionImplementationInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "method": + err = unpopulate(val, "Method", &r.Method) + delete(rawMsg, key) + case "script": + err = unpopulate(val, "Script", &r.Script) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RecommendedActionMetricInfo. +func (r RecommendedActionMetricInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "metricName", r.MetricName) + populateDateTimeRFC3339(objectMap, "startTime", r.StartTime) + populate(objectMap, "timeGrain", r.TimeGrain) + populate(objectMap, "unit", r.Unit) + populate(objectMap, "value", r.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecommendedActionMetricInfo. +func (r *RecommendedActionMetricInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "metricName": + err = unpopulate(val, "MetricName", &r.MetricName) + delete(rawMsg, key) + case "startTime": + err = unpopulateDateTimeRFC3339(val, "StartTime", &r.StartTime) + delete(rawMsg, key) + case "timeGrain": + err = unpopulate(val, "TimeGrain", &r.TimeGrain) + delete(rawMsg, key) + case "unit": + err = unpopulate(val, "Unit", &r.Unit) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &r.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RecommendedActionProperties. +func (r RecommendedActionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "details", r.Details) + populate(objectMap, "errorDetails", r.ErrorDetails) + populate(objectMap, "estimatedImpact", r.EstimatedImpact) + populate(objectMap, "executeActionDuration", r.ExecuteActionDuration) + populate(objectMap, "executeActionInitiatedBy", r.ExecuteActionInitiatedBy) + populateDateTimeRFC3339(objectMap, "executeActionInitiatedTime", r.ExecuteActionInitiatedTime) + populateDateTimeRFC3339(objectMap, "executeActionStartTime", r.ExecuteActionStartTime) + populate(objectMap, "implementationDetails", r.ImplementationDetails) + populate(objectMap, "isArchivedAction", r.IsArchivedAction) + populate(objectMap, "isExecutableAction", r.IsExecutableAction) + populate(objectMap, "isRevertableAction", r.IsRevertableAction) + populateDateTimeRFC3339(objectMap, "lastRefresh", r.LastRefresh) + populate(objectMap, "linkedObjects", r.LinkedObjects) + populate(objectMap, "observedImpact", r.ObservedImpact) + populate(objectMap, "recommendationReason", r.RecommendationReason) + populate(objectMap, "revertActionDuration", r.RevertActionDuration) + populate(objectMap, "revertActionInitiatedBy", r.RevertActionInitiatedBy) + populateDateTimeRFC3339(objectMap, "revertActionInitiatedTime", r.RevertActionInitiatedTime) + populateDateTimeRFC3339(objectMap, "revertActionStartTime", r.RevertActionStartTime) + populate(objectMap, "score", r.Score) + populate(objectMap, "state", r.State) + populate(objectMap, "timeSeries", r.TimeSeries) + populateDateTimeRFC3339(objectMap, "validSince", r.ValidSince) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecommendedActionProperties. +func (r *RecommendedActionProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "details": + err = unpopulate(val, "Details", &r.Details) + delete(rawMsg, key) + case "errorDetails": + err = unpopulate(val, "ErrorDetails", &r.ErrorDetails) + delete(rawMsg, key) + case "estimatedImpact": + err = unpopulate(val, "EstimatedImpact", &r.EstimatedImpact) + delete(rawMsg, key) + case "executeActionDuration": + err = unpopulate(val, "ExecuteActionDuration", &r.ExecuteActionDuration) + delete(rawMsg, key) + case "executeActionInitiatedBy": + err = unpopulate(val, "ExecuteActionInitiatedBy", &r.ExecuteActionInitiatedBy) + delete(rawMsg, key) + case "executeActionInitiatedTime": + err = unpopulateDateTimeRFC3339(val, "ExecuteActionInitiatedTime", &r.ExecuteActionInitiatedTime) + delete(rawMsg, key) + case "executeActionStartTime": + err = unpopulateDateTimeRFC3339(val, "ExecuteActionStartTime", &r.ExecuteActionStartTime) + delete(rawMsg, key) + case "implementationDetails": + err = unpopulate(val, "ImplementationDetails", &r.ImplementationDetails) + delete(rawMsg, key) + case "isArchivedAction": + err = unpopulate(val, "IsArchivedAction", &r.IsArchivedAction) + delete(rawMsg, key) + case "isExecutableAction": + err = unpopulate(val, "IsExecutableAction", &r.IsExecutableAction) + delete(rawMsg, key) + case "isRevertableAction": + err = unpopulate(val, "IsRevertableAction", &r.IsRevertableAction) + delete(rawMsg, key) + case "lastRefresh": + err = unpopulateDateTimeRFC3339(val, "LastRefresh", &r.LastRefresh) + delete(rawMsg, key) + case "linkedObjects": + err = unpopulate(val, "LinkedObjects", &r.LinkedObjects) + delete(rawMsg, key) + case "observedImpact": + err = unpopulate(val, "ObservedImpact", &r.ObservedImpact) + delete(rawMsg, key) + case "recommendationReason": + err = unpopulate(val, "RecommendationReason", &r.RecommendationReason) + delete(rawMsg, key) + case "revertActionDuration": + err = unpopulate(val, "RevertActionDuration", &r.RevertActionDuration) + delete(rawMsg, key) + case "revertActionInitiatedBy": + err = unpopulate(val, "RevertActionInitiatedBy", &r.RevertActionInitiatedBy) + delete(rawMsg, key) + case "revertActionInitiatedTime": + err = unpopulateDateTimeRFC3339(val, "RevertActionInitiatedTime", &r.RevertActionInitiatedTime) + delete(rawMsg, key) + case "revertActionStartTime": + err = unpopulateDateTimeRFC3339(val, "RevertActionStartTime", &r.RevertActionStartTime) + delete(rawMsg, key) + case "score": + err = unpopulate(val, "Score", &r.Score) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &r.State) + delete(rawMsg, key) + case "timeSeries": + err = unpopulate(val, "TimeSeries", &r.TimeSeries) + delete(rawMsg, key) + case "validSince": + err = unpopulateDateTimeRFC3339(val, "ValidSince", &r.ValidSince) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RecommendedActionStateInfo. +func (r RecommendedActionStateInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "actionInitiatedBy", r.ActionInitiatedBy) + populate(objectMap, "currentValue", r.CurrentValue) + populateDateTimeRFC3339(objectMap, "lastModified", r.LastModified) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecommendedActionStateInfo. +func (r *RecommendedActionStateInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "actionInitiatedBy": + err = unpopulate(val, "ActionInitiatedBy", &r.ActionInitiatedBy) + delete(rawMsg, key) + case "currentValue": + err = unpopulate(val, "CurrentValue", &r.CurrentValue) + delete(rawMsg, key) + case "lastModified": + err = unpopulateDateTimeRFC3339(val, "LastModified", &r.LastModified) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RecommendedSensitivityLabelUpdate. +func (r RecommendedSensitivityLabelUpdate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", r.ID) + populate(objectMap, "name", r.Name) + populate(objectMap, "properties", r.Properties) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecommendedSensitivityLabelUpdate. +func (r *RecommendedSensitivityLabelUpdate) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RecommendedSensitivityLabelUpdateList. +func (r RecommendedSensitivityLabelUpdateList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "operations", r.Operations) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecommendedSensitivityLabelUpdateList. +func (r *RecommendedSensitivityLabelUpdateList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "operations": + err = unpopulate(val, "Operations", &r.Operations) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RecommendedSensitivityLabelUpdateProperties. +func (r RecommendedSensitivityLabelUpdateProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "column", r.Column) + populate(objectMap, "op", r.Op) + populate(objectMap, "schema", r.Schema) + populate(objectMap, "table", r.Table) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecommendedSensitivityLabelUpdateProperties. +func (r *RecommendedSensitivityLabelUpdateProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "column": + err = unpopulate(val, "Column", &r.Column) + delete(rawMsg, key) + case "op": + err = unpopulate(val, "Op", &r.Op) + delete(rawMsg, key) + case "schema": + err = unpopulate(val, "Schema", &r.Schema) + delete(rawMsg, key) + case "table": + err = unpopulate(val, "Table", &r.Table) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RecoverableDatabase. +func (r RecoverableDatabase) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", r.ID) + populate(objectMap, "name", r.Name) + populate(objectMap, "properties", r.Properties) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecoverableDatabase. +func (r *RecoverableDatabase) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RecoverableDatabaseListResult. +func (r RecoverableDatabaseListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", r.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecoverableDatabaseListResult. +func (r *RecoverableDatabaseListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &r.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RecoverableDatabaseProperties. +func (r RecoverableDatabaseProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "edition", r.Edition) + populate(objectMap, "elasticPoolName", r.ElasticPoolName) + populateDateTimeRFC3339(objectMap, "lastAvailableBackupDate", r.LastAvailableBackupDate) + populate(objectMap, "serviceLevelObjective", r.ServiceLevelObjective) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecoverableDatabaseProperties. +func (r *RecoverableDatabaseProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "edition": + err = unpopulate(val, "Edition", &r.Edition) + delete(rawMsg, key) + case "elasticPoolName": + err = unpopulate(val, "ElasticPoolName", &r.ElasticPoolName) + delete(rawMsg, key) + case "lastAvailableBackupDate": + err = unpopulateDateTimeRFC3339(val, "LastAvailableBackupDate", &r.LastAvailableBackupDate) + delete(rawMsg, key) + case "serviceLevelObjective": + err = unpopulate(val, "ServiceLevelObjective", &r.ServiceLevelObjective) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RecoverableManagedDatabase. +func (r RecoverableManagedDatabase) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", r.ID) + populate(objectMap, "name", r.Name) + populate(objectMap, "properties", r.Properties) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecoverableManagedDatabase. +func (r *RecoverableManagedDatabase) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RecoverableManagedDatabaseListResult. +func (r RecoverableManagedDatabaseListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", r.NextLink) + populate(objectMap, "value", r.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecoverableManagedDatabaseListResult. +func (r *RecoverableManagedDatabaseListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &r.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &r.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RecoverableManagedDatabaseProperties. +func (r RecoverableManagedDatabaseProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "lastAvailableBackupDate", r.LastAvailableBackupDate) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecoverableManagedDatabaseProperties. +func (r *RecoverableManagedDatabaseProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "lastAvailableBackupDate": + err = unpopulate(val, "LastAvailableBackupDate", &r.LastAvailableBackupDate) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ReplicationLink. +func (r ReplicationLink) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", r.ID) + populate(objectMap, "name", r.Name) + populate(objectMap, "properties", r.Properties) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ReplicationLink. +func (r *ReplicationLink) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ReplicationLinkListResult. +func (r ReplicationLinkListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", r.NextLink) + populate(objectMap, "value", r.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ReplicationLinkListResult. +func (r *ReplicationLinkListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &r.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &r.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ReplicationLinkProperties. +func (r ReplicationLinkProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "isTerminationAllowed", r.IsTerminationAllowed) + populate(objectMap, "linkType", r.LinkType) + populate(objectMap, "partnerDatabase", r.PartnerDatabase) + populate(objectMap, "partnerLocation", r.PartnerLocation) + populate(objectMap, "partnerRole", r.PartnerRole) + populate(objectMap, "partnerServer", r.PartnerServer) + populate(objectMap, "percentComplete", r.PercentComplete) + populate(objectMap, "replicationMode", r.ReplicationMode) + populate(objectMap, "replicationState", r.ReplicationState) + populate(objectMap, "role", r.Role) + populateDateTimeRFC3339(objectMap, "startTime", r.StartTime) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ReplicationLinkProperties. +func (r *ReplicationLinkProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "isTerminationAllowed": + err = unpopulate(val, "IsTerminationAllowed", &r.IsTerminationAllowed) + delete(rawMsg, key) + case "linkType": + err = unpopulate(val, "LinkType", &r.LinkType) + delete(rawMsg, key) + case "partnerDatabase": + err = unpopulate(val, "PartnerDatabase", &r.PartnerDatabase) + delete(rawMsg, key) + case "partnerLocation": + err = unpopulate(val, "PartnerLocation", &r.PartnerLocation) + delete(rawMsg, key) + case "partnerRole": + err = unpopulate(val, "PartnerRole", &r.PartnerRole) + delete(rawMsg, key) + case "partnerServer": + err = unpopulate(val, "PartnerServer", &r.PartnerServer) + delete(rawMsg, key) + case "percentComplete": + err = unpopulate(val, "PercentComplete", &r.PercentComplete) + delete(rawMsg, key) + case "replicationMode": + err = unpopulate(val, "ReplicationMode", &r.ReplicationMode) + delete(rawMsg, key) + case "replicationState": + err = unpopulate(val, "ReplicationState", &r.ReplicationState) + delete(rawMsg, key) + case "role": + err = unpopulate(val, "Role", &r.Role) + delete(rawMsg, key) + case "startTime": + err = unpopulateDateTimeRFC3339(val, "StartTime", &r.StartTime) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Resource. +func (r Resource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", r.ID) + populate(objectMap, "name", r.Name) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Resource. +func (r *Resource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResourceIdentity. +func (r ResourceIdentity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "principalId", r.PrincipalID) + populate(objectMap, "tenantId", r.TenantID) + populate(objectMap, "type", r.Type) + populate(objectMap, "userAssignedIdentities", r.UserAssignedIdentities) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceIdentity. +func (r *ResourceIdentity) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "principalId": + err = unpopulate(val, "PrincipalID", &r.PrincipalID) + delete(rawMsg, key) + case "tenantId": + err = unpopulate(val, "TenantID", &r.TenantID) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + case "userAssignedIdentities": + err = unpopulate(val, "UserAssignedIdentities", &r.UserAssignedIdentities) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResourceMoveDefinition. +func (r ResourceMoveDefinition) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", r.ID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceMoveDefinition. +func (r *ResourceMoveDefinition) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResourceWithWritableName. +func (r ResourceWithWritableName) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", r.ID) + populate(objectMap, "name", r.Name) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceWithWritableName. +func (r *ResourceWithWritableName) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RestorableDroppedDatabase. +func (r RestorableDroppedDatabase) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", r.ID) + populate(objectMap, "location", r.Location) + populate(objectMap, "name", r.Name) + populate(objectMap, "properties", r.Properties) + populate(objectMap, "sku", r.SKU) + populate(objectMap, "tags", r.Tags) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RestorableDroppedDatabase. +func (r *RestorableDroppedDatabase) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &r.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &r.SKU) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &r.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RestorableDroppedDatabaseListResult. +func (r RestorableDroppedDatabaseListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", r.NextLink) + populate(objectMap, "value", r.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RestorableDroppedDatabaseListResult. +func (r *RestorableDroppedDatabaseListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &r.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &r.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RestorableDroppedDatabaseProperties. +func (r RestorableDroppedDatabaseProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backupStorageRedundancy", r.BackupStorageRedundancy) + populateDateTimeRFC3339(objectMap, "creationDate", r.CreationDate) + populate(objectMap, "databaseName", r.DatabaseName) + populateDateTimeRFC3339(objectMap, "deletionDate", r.DeletionDate) + populateDateTimeRFC3339(objectMap, "earliestRestoreDate", r.EarliestRestoreDate) + populate(objectMap, "maxSizeBytes", r.MaxSizeBytes) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RestorableDroppedDatabaseProperties. +func (r *RestorableDroppedDatabaseProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backupStorageRedundancy": + err = unpopulate(val, "BackupStorageRedundancy", &r.BackupStorageRedundancy) + delete(rawMsg, key) + case "creationDate": + err = unpopulateDateTimeRFC3339(val, "CreationDate", &r.CreationDate) + delete(rawMsg, key) + case "databaseName": + err = unpopulate(val, "DatabaseName", &r.DatabaseName) + delete(rawMsg, key) + case "deletionDate": + err = unpopulateDateTimeRFC3339(val, "DeletionDate", &r.DeletionDate) + delete(rawMsg, key) + case "earliestRestoreDate": + err = unpopulateDateTimeRFC3339(val, "EarliestRestoreDate", &r.EarliestRestoreDate) + delete(rawMsg, key) + case "maxSizeBytes": + err = unpopulate(val, "MaxSizeBytes", &r.MaxSizeBytes) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RestorableDroppedManagedDatabase. +func (r RestorableDroppedManagedDatabase) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", r.ID) + populate(objectMap, "location", r.Location) + populate(objectMap, "name", r.Name) + populate(objectMap, "properties", r.Properties) + populate(objectMap, "tags", r.Tags) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RestorableDroppedManagedDatabase. +func (r *RestorableDroppedManagedDatabase) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &r.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &r.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RestorableDroppedManagedDatabaseListResult. +func (r RestorableDroppedManagedDatabaseListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", r.NextLink) + populate(objectMap, "value", r.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RestorableDroppedManagedDatabaseListResult. +func (r *RestorableDroppedManagedDatabaseListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &r.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &r.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RestorableDroppedManagedDatabaseProperties. +func (r RestorableDroppedManagedDatabaseProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "creationDate", r.CreationDate) + populate(objectMap, "databaseName", r.DatabaseName) + populateDateTimeRFC3339(objectMap, "deletionDate", r.DeletionDate) + populateDateTimeRFC3339(objectMap, "earliestRestoreDate", r.EarliestRestoreDate) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RestorableDroppedManagedDatabaseProperties. +func (r *RestorableDroppedManagedDatabaseProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "creationDate": + err = unpopulateDateTimeRFC3339(val, "CreationDate", &r.CreationDate) + delete(rawMsg, key) + case "databaseName": + err = unpopulate(val, "DatabaseName", &r.DatabaseName) + delete(rawMsg, key) + case "deletionDate": + err = unpopulateDateTimeRFC3339(val, "DeletionDate", &r.DeletionDate) + delete(rawMsg, key) + case "earliestRestoreDate": + err = unpopulateDateTimeRFC3339(val, "EarliestRestoreDate", &r.EarliestRestoreDate) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RestorePoint. +func (r RestorePoint) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", r.ID) + populate(objectMap, "location", r.Location) + populate(objectMap, "name", r.Name) + populate(objectMap, "properties", r.Properties) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RestorePoint. +func (r *RestorePoint) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &r.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RestorePointListResult. +func (r RestorePointListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", r.NextLink) + populate(objectMap, "value", r.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RestorePointListResult. +func (r *RestorePointListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &r.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &r.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RestorePointProperties. +func (r RestorePointProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "earliestRestoreDate", r.EarliestRestoreDate) + populateDateTimeRFC3339(objectMap, "restorePointCreationDate", r.RestorePointCreationDate) + populate(objectMap, "restorePointLabel", r.RestorePointLabel) + populate(objectMap, "restorePointType", r.RestorePointType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RestorePointProperties. +func (r *RestorePointProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "earliestRestoreDate": + err = unpopulateDateTimeRFC3339(val, "EarliestRestoreDate", &r.EarliestRestoreDate) + delete(rawMsg, key) + case "restorePointCreationDate": + err = unpopulateDateTimeRFC3339(val, "RestorePointCreationDate", &r.RestorePointCreationDate) + delete(rawMsg, key) + case "restorePointLabel": + err = unpopulate(val, "RestorePointLabel", &r.RestorePointLabel) + delete(rawMsg, key) + case "restorePointType": + err = unpopulate(val, "RestorePointType", &r.RestorePointType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SKU. +func (s SKU) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "capacity", s.Capacity) + populate(objectMap, "family", s.Family) + populate(objectMap, "name", s.Name) + populate(objectMap, "size", s.Size) + populate(objectMap, "tier", s.Tier) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SKU. +func (s *SKU) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "capacity": + err = unpopulate(val, "Capacity", &s.Capacity) + delete(rawMsg, key) + case "family": + err = unpopulate(val, "Family", &s.Family) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "size": + err = unpopulate(val, "Size", &s.Size) + delete(rawMsg, key) + case "tier": + err = unpopulate(val, "Tier", &s.Tier) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SecurityAlertPolicyProperties. +func (s SecurityAlertPolicyProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "creationTime", s.CreationTime) + populate(objectMap, "disabledAlerts", s.DisabledAlerts) + populate(objectMap, "emailAccountAdmins", s.EmailAccountAdmins) + populate(objectMap, "emailAddresses", s.EmailAddresses) + populate(objectMap, "retentionDays", s.RetentionDays) + populate(objectMap, "state", s.State) + populate(objectMap, "storageAccountAccessKey", s.StorageAccountAccessKey) + populate(objectMap, "storageEndpoint", s.StorageEndpoint) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SecurityAlertPolicyProperties. +func (s *SecurityAlertPolicyProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "creationTime": + err = unpopulateDateTimeRFC3339(val, "CreationTime", &s.CreationTime) + delete(rawMsg, key) + case "disabledAlerts": + err = unpopulate(val, "DisabledAlerts", &s.DisabledAlerts) + delete(rawMsg, key) + case "emailAccountAdmins": + err = unpopulate(val, "EmailAccountAdmins", &s.EmailAccountAdmins) + delete(rawMsg, key) + case "emailAddresses": + err = unpopulate(val, "EmailAddresses", &s.EmailAddresses) + delete(rawMsg, key) + case "retentionDays": + err = unpopulate(val, "RetentionDays", &s.RetentionDays) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &s.State) + delete(rawMsg, key) + case "storageAccountAccessKey": + err = unpopulate(val, "StorageAccountAccessKey", &s.StorageAccountAccessKey) + delete(rawMsg, key) + case "storageEndpoint": + err = unpopulate(val, "StorageEndpoint", &s.StorageEndpoint) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SecurityAlertsPolicyProperties. +func (s SecurityAlertsPolicyProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "creationTime", s.CreationTime) + populate(objectMap, "disabledAlerts", s.DisabledAlerts) + populate(objectMap, "emailAccountAdmins", s.EmailAccountAdmins) + populate(objectMap, "emailAddresses", s.EmailAddresses) + populate(objectMap, "retentionDays", s.RetentionDays) + populate(objectMap, "state", s.State) + populate(objectMap, "storageAccountAccessKey", s.StorageAccountAccessKey) + populate(objectMap, "storageEndpoint", s.StorageEndpoint) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SecurityAlertsPolicyProperties. +func (s *SecurityAlertsPolicyProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "creationTime": + err = unpopulateDateTimeRFC3339(val, "CreationTime", &s.CreationTime) + delete(rawMsg, key) + case "disabledAlerts": + err = unpopulate(val, "DisabledAlerts", &s.DisabledAlerts) + delete(rawMsg, key) + case "emailAccountAdmins": + err = unpopulate(val, "EmailAccountAdmins", &s.EmailAccountAdmins) + delete(rawMsg, key) + case "emailAddresses": + err = unpopulate(val, "EmailAddresses", &s.EmailAddresses) + delete(rawMsg, key) + case "retentionDays": + err = unpopulate(val, "RetentionDays", &s.RetentionDays) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &s.State) + delete(rawMsg, key) + case "storageAccountAccessKey": + err = unpopulate(val, "StorageAccountAccessKey", &s.StorageAccountAccessKey) + delete(rawMsg, key) + case "storageEndpoint": + err = unpopulate(val, "StorageEndpoint", &s.StorageEndpoint) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SecurityEvent. +func (s SecurityEvent) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SecurityEvent. +func (s *SecurityEvent) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SecurityEventCollection. +func (s SecurityEventCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SecurityEventCollection. +func (s *SecurityEventCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SecurityEventProperties. +func (s SecurityEventProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "applicationName", s.ApplicationName) + populate(objectMap, "clientIp", s.ClientIP) + populate(objectMap, "database", s.Database) + populateDateTimeRFC3339(objectMap, "eventTime", s.EventTime) + populate(objectMap, "principalName", s.PrincipalName) + populate(objectMap, "securityEventSqlInjectionAdditionalProperties", s.SecurityEventSQLInjectionAdditionalProperties) + populate(objectMap, "securityEventType", s.SecurityEventType) + populate(objectMap, "server", s.Server) + populate(objectMap, "subscription", s.Subscription) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SecurityEventProperties. +func (s *SecurityEventProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "applicationName": + err = unpopulate(val, "ApplicationName", &s.ApplicationName) + delete(rawMsg, key) + case "clientIp": + err = unpopulate(val, "ClientIP", &s.ClientIP) + delete(rawMsg, key) + case "database": + err = unpopulate(val, "Database", &s.Database) + delete(rawMsg, key) + case "eventTime": + err = unpopulateDateTimeRFC3339(val, "EventTime", &s.EventTime) + delete(rawMsg, key) + case "principalName": + err = unpopulate(val, "PrincipalName", &s.PrincipalName) + delete(rawMsg, key) + case "securityEventSqlInjectionAdditionalProperties": + err = unpopulate(val, "SecurityEventSQLInjectionAdditionalProperties", &s.SecurityEventSQLInjectionAdditionalProperties) + delete(rawMsg, key) + case "securityEventType": + err = unpopulate(val, "SecurityEventType", &s.SecurityEventType) + delete(rawMsg, key) + case "server": + err = unpopulate(val, "Server", &s.Server) + delete(rawMsg, key) + case "subscription": + err = unpopulate(val, "Subscription", &s.Subscription) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SecurityEventSQLInjectionAdditionalProperties. +func (s SecurityEventSQLInjectionAdditionalProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "errorCode", s.ErrorCode) + populate(objectMap, "errorMessage", s.ErrorMessage) + populate(objectMap, "errorSeverity", s.ErrorSeverity) + populate(objectMap, "statement", s.Statement) + populate(objectMap, "statementHighlightLength", s.StatementHighlightLength) + populate(objectMap, "statementHighlightOffset", s.StatementHighlightOffset) + populate(objectMap, "threatId", s.ThreatID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SecurityEventSQLInjectionAdditionalProperties. +func (s *SecurityEventSQLInjectionAdditionalProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "errorCode": + err = unpopulate(val, "ErrorCode", &s.ErrorCode) + delete(rawMsg, key) + case "errorMessage": + err = unpopulate(val, "ErrorMessage", &s.ErrorMessage) + delete(rawMsg, key) + case "errorSeverity": + err = unpopulate(val, "ErrorSeverity", &s.ErrorSeverity) + delete(rawMsg, key) + case "statement": + err = unpopulate(val, "Statement", &s.Statement) + delete(rawMsg, key) + case "statementHighlightLength": + err = unpopulate(val, "StatementHighlightLength", &s.StatementHighlightLength) + delete(rawMsg, key) + case "statementHighlightOffset": + err = unpopulate(val, "StatementHighlightOffset", &s.StatementHighlightOffset) + delete(rawMsg, key) + case "threatId": + err = unpopulate(val, "ThreatID", &s.ThreatID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SecurityEventsFilterParameters. +func (s SecurityEventsFilterParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "eventTime", s.EventTime) + populate(objectMap, "showServerRecords", s.ShowServerRecords) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SecurityEventsFilterParameters. +func (s *SecurityEventsFilterParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "eventTime": + err = unpopulateDateTimeRFC3339(val, "EventTime", &s.EventTime) + delete(rawMsg, key) + case "showServerRecords": + err = unpopulate(val, "ShowServerRecords", &s.ShowServerRecords) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SensitivityLabel. +func (s SensitivityLabel) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "managedBy", s.ManagedBy) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SensitivityLabel. +func (s *SensitivityLabel) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "managedBy": + err = unpopulate(val, "ManagedBy", &s.ManagedBy) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SensitivityLabelListResult. +func (s SensitivityLabelListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SensitivityLabelListResult. +func (s *SensitivityLabelListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SensitivityLabelProperties. +func (s SensitivityLabelProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "columnName", s.ColumnName) + populate(objectMap, "informationType", s.InformationType) + populate(objectMap, "informationTypeId", s.InformationTypeID) + populate(objectMap, "isDisabled", s.IsDisabled) + populate(objectMap, "labelId", s.LabelID) + populate(objectMap, "labelName", s.LabelName) + populate(objectMap, "rank", s.Rank) + populate(objectMap, "schemaName", s.SchemaName) + populate(objectMap, "tableName", s.TableName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SensitivityLabelProperties. +func (s *SensitivityLabelProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "columnName": + err = unpopulate(val, "ColumnName", &s.ColumnName) + delete(rawMsg, key) + case "informationType": + err = unpopulate(val, "InformationType", &s.InformationType) + delete(rawMsg, key) + case "informationTypeId": + err = unpopulate(val, "InformationTypeID", &s.InformationTypeID) + delete(rawMsg, key) + case "isDisabled": + err = unpopulate(val, "IsDisabled", &s.IsDisabled) + delete(rawMsg, key) + case "labelId": + err = unpopulate(val, "LabelID", &s.LabelID) + delete(rawMsg, key) + case "labelName": + err = unpopulate(val, "LabelName", &s.LabelName) + delete(rawMsg, key) + case "rank": + err = unpopulate(val, "Rank", &s.Rank) + delete(rawMsg, key) + case "schemaName": + err = unpopulate(val, "SchemaName", &s.SchemaName) + delete(rawMsg, key) + case "tableName": + err = unpopulate(val, "TableName", &s.TableName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SensitivityLabelUpdate. +func (s SensitivityLabelUpdate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SensitivityLabelUpdate. +func (s *SensitivityLabelUpdate) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SensitivityLabelUpdateList. +func (s SensitivityLabelUpdateList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "operations", s.Operations) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SensitivityLabelUpdateList. +func (s *SensitivityLabelUpdateList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "operations": + err = unpopulate(val, "Operations", &s.Operations) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SensitivityLabelUpdateProperties. +func (s SensitivityLabelUpdateProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "column", s.Column) + populate(objectMap, "op", s.Op) + populate(objectMap, "schema", s.Schema) + populate(objectMap, "sensitivityLabel", s.SensitivityLabel) + populate(objectMap, "table", s.Table) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SensitivityLabelUpdateProperties. +func (s *SensitivityLabelUpdateProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "column": + err = unpopulate(val, "Column", &s.Column) + delete(rawMsg, key) + case "op": + err = unpopulate(val, "Op", &s.Op) + delete(rawMsg, key) + case "schema": + err = unpopulate(val, "Schema", &s.Schema) + delete(rawMsg, key) + case "sensitivityLabel": + err = unpopulate(val, "SensitivityLabel", &s.SensitivityLabel) + delete(rawMsg, key) + case "table": + err = unpopulate(val, "Table", &s.Table) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Server. +func (s Server) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "identity", s.Identity) + populate(objectMap, "kind", s.Kind) + populate(objectMap, "location", s.Location) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "tags", s.Tags) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Server. +func (s *Server) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "identity": + err = unpopulate(val, "Identity", &s.Identity) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &s.Kind) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &s.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &s.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServerAdvancedThreatProtection. +func (s ServerAdvancedThreatProtection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "systemData", s.SystemData) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServerAdvancedThreatProtection. +func (s *ServerAdvancedThreatProtection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &s.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServerAutomaticTuning. +func (s ServerAutomaticTuning) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServerAutomaticTuning. +func (s *ServerAutomaticTuning) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServerAzureADAdministrator. +func (s ServerAzureADAdministrator) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServerAzureADAdministrator. +func (s *ServerAzureADAdministrator) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServerAzureADOnlyAuthentication. +func (s ServerAzureADOnlyAuthentication) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServerAzureADOnlyAuthentication. +func (s *ServerAzureADOnlyAuthentication) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServerBlobAuditingPolicy. +func (s ServerBlobAuditingPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServerBlobAuditingPolicy. +func (s *ServerBlobAuditingPolicy) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServerBlobAuditingPolicyListResult. +func (s ServerBlobAuditingPolicyListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServerBlobAuditingPolicyListResult. +func (s *ServerBlobAuditingPolicyListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServerBlobAuditingPolicyProperties. +func (s ServerBlobAuditingPolicyProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "auditActionsAndGroups", s.AuditActionsAndGroups) + populate(objectMap, "isAzureMonitorTargetEnabled", s.IsAzureMonitorTargetEnabled) + populate(objectMap, "isDevopsAuditEnabled", s.IsDevopsAuditEnabled) + populate(objectMap, "isManagedIdentityInUse", s.IsManagedIdentityInUse) + populate(objectMap, "isStorageSecondaryKeyInUse", s.IsStorageSecondaryKeyInUse) + populate(objectMap, "queueDelayMs", s.QueueDelayMs) + populate(objectMap, "retentionDays", s.RetentionDays) + populate(objectMap, "state", s.State) + populate(objectMap, "storageAccountAccessKey", s.StorageAccountAccessKey) + populate(objectMap, "storageAccountSubscriptionId", s.StorageAccountSubscriptionID) + populate(objectMap, "storageEndpoint", s.StorageEndpoint) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServerBlobAuditingPolicyProperties. +func (s *ServerBlobAuditingPolicyProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "auditActionsAndGroups": + err = unpopulate(val, "AuditActionsAndGroups", &s.AuditActionsAndGroups) + delete(rawMsg, key) + case "isAzureMonitorTargetEnabled": + err = unpopulate(val, "IsAzureMonitorTargetEnabled", &s.IsAzureMonitorTargetEnabled) + delete(rawMsg, key) + case "isDevopsAuditEnabled": + err = unpopulate(val, "IsDevopsAuditEnabled", &s.IsDevopsAuditEnabled) + delete(rawMsg, key) + case "isManagedIdentityInUse": + err = unpopulate(val, "IsManagedIdentityInUse", &s.IsManagedIdentityInUse) + delete(rawMsg, key) + case "isStorageSecondaryKeyInUse": + err = unpopulate(val, "IsStorageSecondaryKeyInUse", &s.IsStorageSecondaryKeyInUse) + delete(rawMsg, key) + case "queueDelayMs": + err = unpopulate(val, "QueueDelayMs", &s.QueueDelayMs) + delete(rawMsg, key) + case "retentionDays": + err = unpopulate(val, "RetentionDays", &s.RetentionDays) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &s.State) + delete(rawMsg, key) + case "storageAccountAccessKey": + err = unpopulate(val, "StorageAccountAccessKey", &s.StorageAccountAccessKey) + delete(rawMsg, key) + case "storageAccountSubscriptionId": + err = unpopulate(val, "StorageAccountSubscriptionID", &s.StorageAccountSubscriptionID) + delete(rawMsg, key) + case "storageEndpoint": + err = unpopulate(val, "StorageEndpoint", &s.StorageEndpoint) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServerCommunicationLink. +func (s ServerCommunicationLink) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "kind", s.Kind) + populate(objectMap, "location", s.Location) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServerCommunicationLink. +func (s *ServerCommunicationLink) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &s.Kind) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &s.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServerCommunicationLinkListResult. +func (s ServerCommunicationLinkListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServerCommunicationLinkListResult. +func (s *ServerCommunicationLinkListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServerCommunicationLinkProperties. +func (s ServerCommunicationLinkProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "partnerServer", s.PartnerServer) + populate(objectMap, "state", s.State) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServerCommunicationLinkProperties. +func (s *ServerCommunicationLinkProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "partnerServer": + err = unpopulate(val, "PartnerServer", &s.PartnerServer) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &s.State) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServerConnectionPolicy. +func (s ServerConnectionPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "kind", s.Kind) + populate(objectMap, "location", s.Location) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServerConnectionPolicy. +func (s *ServerConnectionPolicy) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &s.Kind) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &s.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServerConnectionPolicyListResult. +func (s ServerConnectionPolicyListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServerConnectionPolicyListResult. +func (s *ServerConnectionPolicyListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServerConnectionPolicyProperties. +func (s ServerConnectionPolicyProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "connectionType", s.ConnectionType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServerConnectionPolicyProperties. +func (s *ServerConnectionPolicyProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "connectionType": + err = unpopulate(val, "ConnectionType", &s.ConnectionType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServerDNSAlias. +func (s ServerDNSAlias) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServerDNSAlias. +func (s *ServerDNSAlias) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServerDNSAliasAcquisition. +func (s ServerDNSAliasAcquisition) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "oldServerDnsAliasId", s.OldServerDNSAliasID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServerDNSAliasAcquisition. +func (s *ServerDNSAliasAcquisition) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "oldServerDnsAliasId": + err = unpopulate(val, "OldServerDNSAliasID", &s.OldServerDNSAliasID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServerDNSAliasListResult. +func (s ServerDNSAliasListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServerDNSAliasListResult. +func (s *ServerDNSAliasListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServerDNSAliasProperties. +func (s ServerDNSAliasProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "azureDnsRecord", s.AzureDNSRecord) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServerDNSAliasProperties. +func (s *ServerDNSAliasProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "azureDnsRecord": + err = unpopulate(val, "AzureDNSRecord", &s.AzureDNSRecord) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServerDevOpsAuditSettingsListResult. +func (s ServerDevOpsAuditSettingsListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServerDevOpsAuditSettingsListResult. +func (s *ServerDevOpsAuditSettingsListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServerDevOpsAuditSettingsProperties. +func (s ServerDevOpsAuditSettingsProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "isAzureMonitorTargetEnabled", s.IsAzureMonitorTargetEnabled) + populate(objectMap, "state", s.State) + populate(objectMap, "storageAccountAccessKey", s.StorageAccountAccessKey) + populate(objectMap, "storageAccountSubscriptionId", s.StorageAccountSubscriptionID) + populate(objectMap, "storageEndpoint", s.StorageEndpoint) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServerDevOpsAuditSettingsProperties. +func (s *ServerDevOpsAuditSettingsProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "isAzureMonitorTargetEnabled": + err = unpopulate(val, "IsAzureMonitorTargetEnabled", &s.IsAzureMonitorTargetEnabled) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &s.State) + delete(rawMsg, key) + case "storageAccountAccessKey": + err = unpopulate(val, "StorageAccountAccessKey", &s.StorageAccountAccessKey) + delete(rawMsg, key) + case "storageAccountSubscriptionId": + err = unpopulate(val, "StorageAccountSubscriptionID", &s.StorageAccountSubscriptionID) + delete(rawMsg, key) + case "storageEndpoint": + err = unpopulate(val, "StorageEndpoint", &s.StorageEndpoint) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServerDevOpsAuditingSettings. +func (s ServerDevOpsAuditingSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "systemData", s.SystemData) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServerDevOpsAuditingSettings. +func (s *ServerDevOpsAuditingSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &s.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServerExternalAdministrator. +func (s ServerExternalAdministrator) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "administratorType", s.AdministratorType) + populate(objectMap, "azureADOnlyAuthentication", s.AzureADOnlyAuthentication) + populate(objectMap, "login", s.Login) + populate(objectMap, "principalType", s.PrincipalType) + populate(objectMap, "sid", s.Sid) + populate(objectMap, "tenantId", s.TenantID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServerExternalAdministrator. +func (s *ServerExternalAdministrator) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "administratorType": + err = unpopulate(val, "AdministratorType", &s.AdministratorType) + delete(rawMsg, key) + case "azureADOnlyAuthentication": + err = unpopulate(val, "AzureADOnlyAuthentication", &s.AzureADOnlyAuthentication) + delete(rawMsg, key) + case "login": + err = unpopulate(val, "Login", &s.Login) + delete(rawMsg, key) + case "principalType": + err = unpopulate(val, "PrincipalType", &s.PrincipalType) + delete(rawMsg, key) + case "sid": + err = unpopulate(val, "Sid", &s.Sid) + delete(rawMsg, key) + case "tenantId": + err = unpopulate(val, "TenantID", &s.TenantID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServerFirewallRuleProperties. +func (s ServerFirewallRuleProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "endIpAddress", s.EndIPAddress) + populate(objectMap, "startIpAddress", s.StartIPAddress) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServerFirewallRuleProperties. +func (s *ServerFirewallRuleProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "endIpAddress": + err = unpopulate(val, "EndIPAddress", &s.EndIPAddress) + delete(rawMsg, key) + case "startIpAddress": + err = unpopulate(val, "StartIPAddress", &s.StartIPAddress) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServerInfo. +func (s ServerInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "serverId", s.ServerID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServerInfo. +func (s *ServerInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "serverId": + err = unpopulate(val, "ServerID", &s.ServerID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServerKey. +func (s ServerKey) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "kind", s.Kind) + populate(objectMap, "location", s.Location) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServerKey. +func (s *ServerKey) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &s.Kind) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &s.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServerKeyListResult. +func (s ServerKeyListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServerKeyListResult. +func (s *ServerKeyListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServerKeyProperties. +func (s ServerKeyProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "autoRotationEnabled", s.AutoRotationEnabled) + populateDateTimeRFC3339(objectMap, "creationDate", s.CreationDate) + populate(objectMap, "serverKeyType", s.ServerKeyType) + populate(objectMap, "subregion", s.Subregion) + populate(objectMap, "thumbprint", s.Thumbprint) + populate(objectMap, "uri", s.URI) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServerKeyProperties. +func (s *ServerKeyProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "autoRotationEnabled": + err = unpopulate(val, "AutoRotationEnabled", &s.AutoRotationEnabled) + delete(rawMsg, key) + case "creationDate": + err = unpopulateDateTimeRFC3339(val, "CreationDate", &s.CreationDate) + delete(rawMsg, key) + case "serverKeyType": + err = unpopulate(val, "ServerKeyType", &s.ServerKeyType) + delete(rawMsg, key) + case "subregion": + err = unpopulate(val, "Subregion", &s.Subregion) + delete(rawMsg, key) + case "thumbprint": + err = unpopulate(val, "Thumbprint", &s.Thumbprint) + delete(rawMsg, key) + case "uri": + err = unpopulate(val, "URI", &s.URI) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServerListResult. +func (s ServerListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServerListResult. +func (s *ServerListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServerOperation. +func (s ServerOperation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServerOperation. +func (s *ServerOperation) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServerOperationListResult. +func (s ServerOperationListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServerOperationListResult. +func (s *ServerOperationListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServerOperationProperties. +func (s ServerOperationProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", s.Description) + populate(objectMap, "errorCode", s.ErrorCode) + populate(objectMap, "errorDescription", s.ErrorDescription) + populate(objectMap, "errorSeverity", s.ErrorSeverity) + populateDateTimeRFC3339(objectMap, "estimatedCompletionTime", s.EstimatedCompletionTime) + populate(objectMap, "isCancellable", s.IsCancellable) + populate(objectMap, "isUserError", s.IsUserError) + populate(objectMap, "operation", s.Operation) + populate(objectMap, "operationFriendlyName", s.OperationFriendlyName) + populate(objectMap, "percentComplete", s.PercentComplete) + populate(objectMap, "serverName", s.ServerName) + populateDateTimeRFC3339(objectMap, "startTime", s.StartTime) + populate(objectMap, "state", s.State) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServerOperationProperties. +func (s *ServerOperationProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &s.Description) + delete(rawMsg, key) + case "errorCode": + err = unpopulate(val, "ErrorCode", &s.ErrorCode) + delete(rawMsg, key) + case "errorDescription": + err = unpopulate(val, "ErrorDescription", &s.ErrorDescription) + delete(rawMsg, key) + case "errorSeverity": + err = unpopulate(val, "ErrorSeverity", &s.ErrorSeverity) + delete(rawMsg, key) + case "estimatedCompletionTime": + err = unpopulateDateTimeRFC3339(val, "EstimatedCompletionTime", &s.EstimatedCompletionTime) + delete(rawMsg, key) + case "isCancellable": + err = unpopulate(val, "IsCancellable", &s.IsCancellable) + delete(rawMsg, key) + case "isUserError": + err = unpopulate(val, "IsUserError", &s.IsUserError) + delete(rawMsg, key) + case "operation": + err = unpopulate(val, "Operation", &s.Operation) + delete(rawMsg, key) + case "operationFriendlyName": + err = unpopulate(val, "OperationFriendlyName", &s.OperationFriendlyName) + delete(rawMsg, key) + case "percentComplete": + err = unpopulate(val, "PercentComplete", &s.PercentComplete) + delete(rawMsg, key) + case "serverName": + err = unpopulate(val, "ServerName", &s.ServerName) + delete(rawMsg, key) + case "startTime": + err = unpopulateDateTimeRFC3339(val, "StartTime", &s.StartTime) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &s.State) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServerPrivateEndpointConnection. +func (s ServerPrivateEndpointConnection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "properties", s.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServerPrivateEndpointConnection. +func (s *ServerPrivateEndpointConnection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServerProperties. +func (s ServerProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "administratorLogin", s.AdministratorLogin) + populate(objectMap, "administratorLoginPassword", s.AdministratorLoginPassword) + populate(objectMap, "administrators", s.Administrators) + populate(objectMap, "federatedClientId", s.FederatedClientID) + populate(objectMap, "fullyQualifiedDomainName", s.FullyQualifiedDomainName) + populate(objectMap, "keyId", s.KeyID) + populate(objectMap, "minimalTlsVersion", s.MinimalTLSVersion) + populate(objectMap, "primaryUserAssignedIdentityId", s.PrimaryUserAssignedIdentityID) + populate(objectMap, "privateEndpointConnections", s.PrivateEndpointConnections) + populate(objectMap, "publicNetworkAccess", s.PublicNetworkAccess) + populate(objectMap, "restrictOutboundNetworkAccess", s.RestrictOutboundNetworkAccess) + populate(objectMap, "state", s.State) + populate(objectMap, "version", s.Version) + populate(objectMap, "workspaceFeature", s.WorkspaceFeature) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServerProperties. +func (s *ServerProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "administratorLogin": + err = unpopulate(val, "AdministratorLogin", &s.AdministratorLogin) + delete(rawMsg, key) + case "administratorLoginPassword": + err = unpopulate(val, "AdministratorLoginPassword", &s.AdministratorLoginPassword) + delete(rawMsg, key) + case "administrators": + err = unpopulate(val, "Administrators", &s.Administrators) + delete(rawMsg, key) + case "federatedClientId": + err = unpopulate(val, "FederatedClientID", &s.FederatedClientID) + delete(rawMsg, key) + case "fullyQualifiedDomainName": + err = unpopulate(val, "FullyQualifiedDomainName", &s.FullyQualifiedDomainName) + delete(rawMsg, key) + case "keyId": + err = unpopulate(val, "KeyID", &s.KeyID) + delete(rawMsg, key) + case "minimalTlsVersion": + err = unpopulate(val, "MinimalTLSVersion", &s.MinimalTLSVersion) + delete(rawMsg, key) + case "primaryUserAssignedIdentityId": + err = unpopulate(val, "PrimaryUserAssignedIdentityID", &s.PrimaryUserAssignedIdentityID) + delete(rawMsg, key) + case "privateEndpointConnections": + err = unpopulate(val, "PrivateEndpointConnections", &s.PrivateEndpointConnections) + delete(rawMsg, key) + case "publicNetworkAccess": + err = unpopulate(val, "PublicNetworkAccess", &s.PublicNetworkAccess) + delete(rawMsg, key) + case "restrictOutboundNetworkAccess": + err = unpopulate(val, "RestrictOutboundNetworkAccess", &s.RestrictOutboundNetworkAccess) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &s.State) + delete(rawMsg, key) + case "version": + err = unpopulate(val, "Version", &s.Version) + delete(rawMsg, key) + case "workspaceFeature": + err = unpopulate(val, "WorkspaceFeature", &s.WorkspaceFeature) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServerSecurityAlertPolicy. +func (s ServerSecurityAlertPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "systemData", s.SystemData) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServerSecurityAlertPolicy. +func (s *ServerSecurityAlertPolicy) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &s.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServerTrustCertificate. +func (s ServerTrustCertificate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServerTrustCertificate. +func (s *ServerTrustCertificate) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServerTrustCertificateProperties. +func (s ServerTrustCertificateProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "certificateName", s.CertificateName) + populate(objectMap, "publicBlob", s.PublicBlob) + populate(objectMap, "thumbprint", s.Thumbprint) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServerTrustCertificateProperties. +func (s *ServerTrustCertificateProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "certificateName": + err = unpopulate(val, "CertificateName", &s.CertificateName) + delete(rawMsg, key) + case "publicBlob": + err = unpopulate(val, "PublicBlob", &s.PublicBlob) + delete(rawMsg, key) + case "thumbprint": + err = unpopulate(val, "Thumbprint", &s.Thumbprint) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServerTrustCertificatesListResult. +func (s ServerTrustCertificatesListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServerTrustCertificatesListResult. +func (s *ServerTrustCertificatesListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServerTrustGroup. +func (s ServerTrustGroup) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServerTrustGroup. +func (s *ServerTrustGroup) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServerTrustGroupListResult. +func (s ServerTrustGroupListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServerTrustGroupListResult. +func (s *ServerTrustGroupListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServerTrustGroupProperties. +func (s ServerTrustGroupProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "groupMembers", s.GroupMembers) + populate(objectMap, "trustScopes", s.TrustScopes) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServerTrustGroupProperties. +func (s *ServerTrustGroupProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "groupMembers": + err = unpopulate(val, "GroupMembers", &s.GroupMembers) + delete(rawMsg, key) + case "trustScopes": + err = unpopulate(val, "TrustScopes", &s.TrustScopes) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServerUpdate. +func (s ServerUpdate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "identity", s.Identity) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "tags", s.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServerUpdate. +func (s *ServerUpdate) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "identity": + err = unpopulate(val, "Identity", &s.Identity) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &s.Tags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServerUsage. +func (s ServerUsage) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "currentValue", s.CurrentValue) + populate(objectMap, "displayName", s.DisplayName) + populate(objectMap, "limit", s.Limit) + populate(objectMap, "name", s.Name) + populateDateTimeRFC3339(objectMap, "nextResetTime", s.NextResetTime) + populate(objectMap, "resourceName", s.ResourceName) + populate(objectMap, "unit", s.Unit) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServerUsage. +func (s *ServerUsage) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "currentValue": + err = unpopulate(val, "CurrentValue", &s.CurrentValue) + delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &s.DisplayName) + delete(rawMsg, key) + case "limit": + err = unpopulate(val, "Limit", &s.Limit) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "nextResetTime": + err = unpopulateDateTimeRFC3339(val, "NextResetTime", &s.NextResetTime) + delete(rawMsg, key) + case "resourceName": + err = unpopulate(val, "ResourceName", &s.ResourceName) + delete(rawMsg, key) + case "unit": + err = unpopulate(val, "Unit", &s.Unit) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServerUsageListResult. +func (s ServerUsageListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServerUsageListResult. +func (s *ServerUsageListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServerVersionCapability. +func (s ServerVersionCapability) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", s.Name) + populate(objectMap, "reason", s.Reason) + populate(objectMap, "status", s.Status) + populate(objectMap, "supportedEditions", s.SupportedEditions) + populate(objectMap, "supportedElasticPoolEditions", s.SupportedElasticPoolEditions) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServerVersionCapability. +func (s *ServerVersionCapability) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "reason": + err = unpopulate(val, "Reason", &s.Reason) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &s.Status) + delete(rawMsg, key) + case "supportedEditions": + err = unpopulate(val, "SupportedEditions", &s.SupportedEditions) + delete(rawMsg, key) + case "supportedElasticPoolEditions": + err = unpopulate(val, "SupportedElasticPoolEditions", &s.SupportedElasticPoolEditions) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServerVulnerabilityAssessment. +func (s ServerVulnerabilityAssessment) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServerVulnerabilityAssessment. +func (s *ServerVulnerabilityAssessment) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServerVulnerabilityAssessmentListResult. +func (s ServerVulnerabilityAssessmentListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServerVulnerabilityAssessmentListResult. +func (s *ServerVulnerabilityAssessmentListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServerVulnerabilityAssessmentProperties. +func (s ServerVulnerabilityAssessmentProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "recurringScans", s.RecurringScans) + populate(objectMap, "storageAccountAccessKey", s.StorageAccountAccessKey) + populate(objectMap, "storageContainerPath", s.StorageContainerPath) + populate(objectMap, "storageContainerSasKey", s.StorageContainerSasKey) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServerVulnerabilityAssessmentProperties. +func (s *ServerVulnerabilityAssessmentProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "recurringScans": + err = unpopulate(val, "RecurringScans", &s.RecurringScans) + delete(rawMsg, key) + case "storageAccountAccessKey": + err = unpopulate(val, "StorageAccountAccessKey", &s.StorageAccountAccessKey) + delete(rawMsg, key) + case "storageContainerPath": + err = unpopulate(val, "StorageContainerPath", &s.StorageContainerPath) + delete(rawMsg, key) + case "storageContainerSasKey": + err = unpopulate(val, "StorageContainerSasKey", &s.StorageContainerSasKey) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServiceObjective. +func (s ServiceObjective) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceObjective. +func (s *ServiceObjective) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServiceObjectiveCapability. +func (s ServiceObjectiveCapability) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "computeModel", s.ComputeModel) + populate(objectMap, "id", s.ID) + populate(objectMap, "includedMaxSize", s.IncludedMaxSize) + populate(objectMap, "name", s.Name) + populate(objectMap, "performanceLevel", s.PerformanceLevel) + populate(objectMap, "reason", s.Reason) + populate(objectMap, "sku", s.SKU) + populate(objectMap, "status", s.Status) + populate(objectMap, "supportedAutoPauseDelay", s.SupportedAutoPauseDelay) + populate(objectMap, "supportedLicenseTypes", s.SupportedLicenseTypes) + populate(objectMap, "supportedMaintenanceConfigurations", s.SupportedMaintenanceConfigurations) + populate(objectMap, "supportedMaxSizes", s.SupportedMaxSizes) + populate(objectMap, "supportedMinCapacities", s.SupportedMinCapacities) + populate(objectMap, "zoneRedundant", s.ZoneRedundant) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceObjectiveCapability. +func (s *ServiceObjectiveCapability) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "computeModel": + err = unpopulate(val, "ComputeModel", &s.ComputeModel) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "includedMaxSize": + err = unpopulate(val, "IncludedMaxSize", &s.IncludedMaxSize) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "performanceLevel": + err = unpopulate(val, "PerformanceLevel", &s.PerformanceLevel) + delete(rawMsg, key) + case "reason": + err = unpopulate(val, "Reason", &s.Reason) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &s.SKU) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &s.Status) + delete(rawMsg, key) + case "supportedAutoPauseDelay": + err = unpopulate(val, "SupportedAutoPauseDelay", &s.SupportedAutoPauseDelay) + delete(rawMsg, key) + case "supportedLicenseTypes": + err = unpopulate(val, "SupportedLicenseTypes", &s.SupportedLicenseTypes) + delete(rawMsg, key) + case "supportedMaintenanceConfigurations": + err = unpopulate(val, "SupportedMaintenanceConfigurations", &s.SupportedMaintenanceConfigurations) + delete(rawMsg, key) + case "supportedMaxSizes": + err = unpopulate(val, "SupportedMaxSizes", &s.SupportedMaxSizes) + delete(rawMsg, key) + case "supportedMinCapacities": + err = unpopulate(val, "SupportedMinCapacities", &s.SupportedMinCapacities) + delete(rawMsg, key) + case "zoneRedundant": + err = unpopulate(val, "ZoneRedundant", &s.ZoneRedundant) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServiceObjectiveListResult. +func (s ServiceObjectiveListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceObjectiveListResult. +func (s *ServiceObjectiveListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServiceObjectiveProperties. +func (s ServiceObjectiveProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", s.Description) + populate(objectMap, "enabled", s.Enabled) + populate(objectMap, "isDefault", s.IsDefault) + populate(objectMap, "isSystem", s.IsSystem) + populate(objectMap, "serviceObjectiveName", s.ServiceObjectiveName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceObjectiveProperties. +func (s *ServiceObjectiveProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &s.Description) + delete(rawMsg, key) + case "enabled": + err = unpopulate(val, "Enabled", &s.Enabled) + delete(rawMsg, key) + case "isDefault": + err = unpopulate(val, "IsDefault", &s.IsDefault) + delete(rawMsg, key) + case "isSystem": + err = unpopulate(val, "IsSystem", &s.IsSystem) + delete(rawMsg, key) + case "serviceObjectiveName": + err = unpopulate(val, "ServiceObjectiveName", &s.ServiceObjectiveName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServicePrincipal. +func (s ServicePrincipal) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "clientId", s.ClientID) + populate(objectMap, "principalId", s.PrincipalID) + populate(objectMap, "tenantId", s.TenantID) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServicePrincipal. +func (s *ServicePrincipal) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "clientId": + err = unpopulate(val, "ClientID", &s.ClientID) + delete(rawMsg, key) + case "principalId": + err = unpopulate(val, "PrincipalID", &s.PrincipalID) + delete(rawMsg, key) + case "tenantId": + err = unpopulate(val, "TenantID", &s.TenantID) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SloUsageMetric. +func (s SloUsageMetric) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "inRangeTimeRatio", s.InRangeTimeRatio) + populate(objectMap, "serviceLevelObjective", s.ServiceLevelObjective) + populate(objectMap, "serviceLevelObjectiveId", s.ServiceLevelObjectiveID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SloUsageMetric. +func (s *SloUsageMetric) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "inRangeTimeRatio": + err = unpopulate(val, "InRangeTimeRatio", &s.InRangeTimeRatio) + delete(rawMsg, key) + case "serviceLevelObjective": + err = unpopulate(val, "ServiceLevelObjective", &s.ServiceLevelObjective) + delete(rawMsg, key) + case "serviceLevelObjectiveId": + err = unpopulate(val, "ServiceLevelObjectiveID", &s.ServiceLevelObjectiveID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StorageCapability. +func (s StorageCapability) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "reason", s.Reason) + populate(objectMap, "status", s.Status) + populate(objectMap, "storageAccountType", s.StorageAccountType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StorageCapability. +func (s *StorageCapability) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "reason": + err = unpopulate(val, "Reason", &s.Reason) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &s.Status) + delete(rawMsg, key) + case "storageAccountType": + err = unpopulate(val, "StorageAccountType", &s.StorageAccountType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SubscriptionUsage. +func (s SubscriptionUsage) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SubscriptionUsage. +func (s *SubscriptionUsage) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SubscriptionUsageListResult. +func (s SubscriptionUsageListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SubscriptionUsageListResult. +func (s *SubscriptionUsageListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SubscriptionUsageProperties. +func (s SubscriptionUsageProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "currentValue", s.CurrentValue) + populate(objectMap, "displayName", s.DisplayName) + populate(objectMap, "limit", s.Limit) + populate(objectMap, "unit", s.Unit) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SubscriptionUsageProperties. +func (s *SubscriptionUsageProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "currentValue": + err = unpopulate(val, "CurrentValue", &s.CurrentValue) + delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &s.DisplayName) + delete(rawMsg, key) + case "limit": + err = unpopulate(val, "Limit", &s.Limit) + delete(rawMsg, key) + case "unit": + err = unpopulate(val, "Unit", &s.Unit) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SyncAgent. +func (s SyncAgent) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SyncAgent. +func (s *SyncAgent) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SyncAgentKeyProperties. +func (s SyncAgentKeyProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "syncAgentKey", s.SyncAgentKey) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SyncAgentKeyProperties. +func (s *SyncAgentKeyProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "syncAgentKey": + err = unpopulate(val, "SyncAgentKey", &s.SyncAgentKey) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SyncAgentLinkedDatabase. +func (s SyncAgentLinkedDatabase) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SyncAgentLinkedDatabase. +func (s *SyncAgentLinkedDatabase) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SyncAgentLinkedDatabaseListResult. +func (s SyncAgentLinkedDatabaseListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SyncAgentLinkedDatabaseListResult. +func (s *SyncAgentLinkedDatabaseListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SyncAgentLinkedDatabaseProperties. +func (s SyncAgentLinkedDatabaseProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "databaseId", s.DatabaseID) + populate(objectMap, "databaseName", s.DatabaseName) + populate(objectMap, "databaseType", s.DatabaseType) + populate(objectMap, "description", s.Description) + populate(objectMap, "serverName", s.ServerName) + populate(objectMap, "userName", s.UserName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SyncAgentLinkedDatabaseProperties. +func (s *SyncAgentLinkedDatabaseProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "databaseId": + err = unpopulate(val, "DatabaseID", &s.DatabaseID) + delete(rawMsg, key) + case "databaseName": + err = unpopulate(val, "DatabaseName", &s.DatabaseName) + delete(rawMsg, key) + case "databaseType": + err = unpopulate(val, "DatabaseType", &s.DatabaseType) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &s.Description) + delete(rawMsg, key) + case "serverName": + err = unpopulate(val, "ServerName", &s.ServerName) + delete(rawMsg, key) + case "userName": + err = unpopulate(val, "UserName", &s.UserName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SyncAgentListResult. +func (s SyncAgentListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SyncAgentListResult. +func (s *SyncAgentListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SyncAgentProperties. +func (s SyncAgentProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "expiryTime", s.ExpiryTime) + populate(objectMap, "isUpToDate", s.IsUpToDate) + populateDateTimeRFC3339(objectMap, "lastAliveTime", s.LastAliveTime) + populate(objectMap, "name", s.Name) + populate(objectMap, "state", s.State) + populate(objectMap, "syncDatabaseId", s.SyncDatabaseID) + populate(objectMap, "version", s.Version) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SyncAgentProperties. +func (s *SyncAgentProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "expiryTime": + err = unpopulateDateTimeRFC3339(val, "ExpiryTime", &s.ExpiryTime) + delete(rawMsg, key) + case "isUpToDate": + err = unpopulate(val, "IsUpToDate", &s.IsUpToDate) + delete(rawMsg, key) + case "lastAliveTime": + err = unpopulateDateTimeRFC3339(val, "LastAliveTime", &s.LastAliveTime) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &s.State) + delete(rawMsg, key) + case "syncDatabaseId": + err = unpopulate(val, "SyncDatabaseID", &s.SyncDatabaseID) + delete(rawMsg, key) + case "version": + err = unpopulate(val, "Version", &s.Version) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SyncDatabaseIDListResult. +func (s SyncDatabaseIDListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SyncDatabaseIDListResult. +func (s *SyncDatabaseIDListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SyncDatabaseIDProperties. +func (s SyncDatabaseIDProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SyncDatabaseIDProperties. +func (s *SyncDatabaseIDProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SyncFullSchemaProperties. +func (s SyncFullSchemaProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "lastUpdateTime", s.LastUpdateTime) + populate(objectMap, "tables", s.Tables) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SyncFullSchemaProperties. +func (s *SyncFullSchemaProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "lastUpdateTime": + err = unpopulateDateTimeRFC3339(val, "LastUpdateTime", &s.LastUpdateTime) + delete(rawMsg, key) + case "tables": + err = unpopulate(val, "Tables", &s.Tables) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SyncFullSchemaPropertiesListResult. +func (s SyncFullSchemaPropertiesListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SyncFullSchemaPropertiesListResult. +func (s *SyncFullSchemaPropertiesListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SyncFullSchemaTable. +func (s SyncFullSchemaTable) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "columns", s.Columns) + populate(objectMap, "errorId", s.ErrorID) + populate(objectMap, "hasError", s.HasError) + populate(objectMap, "name", s.Name) + populate(objectMap, "quotedName", s.QuotedName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SyncFullSchemaTable. +func (s *SyncFullSchemaTable) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "columns": + err = unpopulate(val, "Columns", &s.Columns) + delete(rawMsg, key) + case "errorId": + err = unpopulate(val, "ErrorID", &s.ErrorID) + delete(rawMsg, key) + case "hasError": + err = unpopulate(val, "HasError", &s.HasError) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "quotedName": + err = unpopulate(val, "QuotedName", &s.QuotedName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SyncFullSchemaTableColumn. +func (s SyncFullSchemaTableColumn) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "dataSize", s.DataSize) + populate(objectMap, "dataType", s.DataType) + populate(objectMap, "errorId", s.ErrorID) + populate(objectMap, "hasError", s.HasError) + populate(objectMap, "isPrimaryKey", s.IsPrimaryKey) + populate(objectMap, "name", s.Name) + populate(objectMap, "quotedName", s.QuotedName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SyncFullSchemaTableColumn. +func (s *SyncFullSchemaTableColumn) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "dataSize": + err = unpopulate(val, "DataSize", &s.DataSize) + delete(rawMsg, key) + case "dataType": + err = unpopulate(val, "DataType", &s.DataType) + delete(rawMsg, key) + case "errorId": + err = unpopulate(val, "ErrorID", &s.ErrorID) + delete(rawMsg, key) + case "hasError": + err = unpopulate(val, "HasError", &s.HasError) + delete(rawMsg, key) + case "isPrimaryKey": + err = unpopulate(val, "IsPrimaryKey", &s.IsPrimaryKey) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "quotedName": + err = unpopulate(val, "QuotedName", &s.QuotedName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SyncGroup. +func (s SyncGroup) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "sku", s.SKU) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SyncGroup. +func (s *SyncGroup) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &s.SKU) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SyncGroupListResult. +func (s SyncGroupListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SyncGroupListResult. +func (s *SyncGroupListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SyncGroupLogListResult. +func (s SyncGroupLogListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SyncGroupLogListResult. +func (s *SyncGroupLogListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SyncGroupLogProperties. +func (s SyncGroupLogProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "details", s.Details) + populate(objectMap, "operationStatus", s.OperationStatus) + populate(objectMap, "source", s.Source) + populateDateTimeRFC3339(objectMap, "timestamp", s.Timestamp) + populate(objectMap, "tracingId", s.TracingID) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SyncGroupLogProperties. +func (s *SyncGroupLogProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "details": + err = unpopulate(val, "Details", &s.Details) + delete(rawMsg, key) + case "operationStatus": + err = unpopulate(val, "OperationStatus", &s.OperationStatus) + delete(rawMsg, key) + case "source": + err = unpopulate(val, "Source", &s.Source) + delete(rawMsg, key) + case "timestamp": + err = unpopulateDateTimeRFC3339(val, "Timestamp", &s.Timestamp) + delete(rawMsg, key) + case "tracingId": + err = unpopulate(val, "TracingID", &s.TracingID) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SyncGroupProperties. +func (s SyncGroupProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "conflictLoggingRetentionInDays", s.ConflictLoggingRetentionInDays) + populate(objectMap, "conflictResolutionPolicy", s.ConflictResolutionPolicy) + populate(objectMap, "enableConflictLogging", s.EnableConflictLogging) + populate(objectMap, "hubDatabasePassword", s.HubDatabasePassword) + populate(objectMap, "hubDatabaseUserName", s.HubDatabaseUserName) + populate(objectMap, "interval", s.Interval) + populateDateTimeRFC3339(objectMap, "lastSyncTime", s.LastSyncTime) + populate(objectMap, "privateEndpointName", s.PrivateEndpointName) + populate(objectMap, "schema", s.Schema) + populate(objectMap, "syncDatabaseId", s.SyncDatabaseID) + populate(objectMap, "syncState", s.SyncState) + populate(objectMap, "usePrivateLinkConnection", s.UsePrivateLinkConnection) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SyncGroupProperties. +func (s *SyncGroupProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "conflictLoggingRetentionInDays": + err = unpopulate(val, "ConflictLoggingRetentionInDays", &s.ConflictLoggingRetentionInDays) + delete(rawMsg, key) + case "conflictResolutionPolicy": + err = unpopulate(val, "ConflictResolutionPolicy", &s.ConflictResolutionPolicy) + delete(rawMsg, key) + case "enableConflictLogging": + err = unpopulate(val, "EnableConflictLogging", &s.EnableConflictLogging) + delete(rawMsg, key) + case "hubDatabasePassword": + err = unpopulate(val, "HubDatabasePassword", &s.HubDatabasePassword) + delete(rawMsg, key) + case "hubDatabaseUserName": + err = unpopulate(val, "HubDatabaseUserName", &s.HubDatabaseUserName) + delete(rawMsg, key) + case "interval": + err = unpopulate(val, "Interval", &s.Interval) + delete(rawMsg, key) + case "lastSyncTime": + err = unpopulateDateTimeRFC3339(val, "LastSyncTime", &s.LastSyncTime) + delete(rawMsg, key) + case "privateEndpointName": + err = unpopulate(val, "PrivateEndpointName", &s.PrivateEndpointName) + delete(rawMsg, key) + case "schema": + err = unpopulate(val, "Schema", &s.Schema) + delete(rawMsg, key) + case "syncDatabaseId": + err = unpopulate(val, "SyncDatabaseID", &s.SyncDatabaseID) + delete(rawMsg, key) + case "syncState": + err = unpopulate(val, "SyncState", &s.SyncState) + delete(rawMsg, key) + case "usePrivateLinkConnection": + err = unpopulate(val, "UsePrivateLinkConnection", &s.UsePrivateLinkConnection) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SyncGroupSchema. +func (s SyncGroupSchema) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "masterSyncMemberName", s.MasterSyncMemberName) + populate(objectMap, "tables", s.Tables) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SyncGroupSchema. +func (s *SyncGroupSchema) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "masterSyncMemberName": + err = unpopulate(val, "MasterSyncMemberName", &s.MasterSyncMemberName) + delete(rawMsg, key) + case "tables": + err = unpopulate(val, "Tables", &s.Tables) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SyncGroupSchemaTable. +func (s SyncGroupSchemaTable) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "columns", s.Columns) + populate(objectMap, "quotedName", s.QuotedName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SyncGroupSchemaTable. +func (s *SyncGroupSchemaTable) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "columns": + err = unpopulate(val, "Columns", &s.Columns) + delete(rawMsg, key) + case "quotedName": + err = unpopulate(val, "QuotedName", &s.QuotedName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SyncGroupSchemaTableColumn. +func (s SyncGroupSchemaTableColumn) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "dataSize", s.DataSize) + populate(objectMap, "dataType", s.DataType) + populate(objectMap, "quotedName", s.QuotedName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SyncGroupSchemaTableColumn. +func (s *SyncGroupSchemaTableColumn) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "dataSize": + err = unpopulate(val, "DataSize", &s.DataSize) + delete(rawMsg, key) + case "dataType": + err = unpopulate(val, "DataType", &s.DataType) + delete(rawMsg, key) + case "quotedName": + err = unpopulate(val, "QuotedName", &s.QuotedName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SyncMember. +func (s SyncMember) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SyncMember. +func (s *SyncMember) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SyncMemberListResult. +func (s SyncMemberListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SyncMemberListResult. +func (s *SyncMemberListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SyncMemberProperties. +func (s SyncMemberProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "databaseName", s.DatabaseName) + populate(objectMap, "databaseType", s.DatabaseType) + populate(objectMap, "password", s.Password) + populate(objectMap, "privateEndpointName", s.PrivateEndpointName) + populate(objectMap, "sqlServerDatabaseId", s.SQLServerDatabaseID) + populate(objectMap, "serverName", s.ServerName) + populate(objectMap, "syncAgentId", s.SyncAgentID) + populate(objectMap, "syncDirection", s.SyncDirection) + populate(objectMap, "syncMemberAzureDatabaseResourceId", s.SyncMemberAzureDatabaseResourceID) + populate(objectMap, "syncState", s.SyncState) + populate(objectMap, "usePrivateLinkConnection", s.UsePrivateLinkConnection) + populate(objectMap, "userName", s.UserName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SyncMemberProperties. +func (s *SyncMemberProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "databaseName": + err = unpopulate(val, "DatabaseName", &s.DatabaseName) + delete(rawMsg, key) + case "databaseType": + err = unpopulate(val, "DatabaseType", &s.DatabaseType) + delete(rawMsg, key) + case "password": + err = unpopulate(val, "Password", &s.Password) + delete(rawMsg, key) + case "privateEndpointName": + err = unpopulate(val, "PrivateEndpointName", &s.PrivateEndpointName) + delete(rawMsg, key) + case "sqlServerDatabaseId": + err = unpopulate(val, "SQLServerDatabaseID", &s.SQLServerDatabaseID) + delete(rawMsg, key) + case "serverName": + err = unpopulate(val, "ServerName", &s.ServerName) + delete(rawMsg, key) + case "syncAgentId": + err = unpopulate(val, "SyncAgentID", &s.SyncAgentID) + delete(rawMsg, key) + case "syncDirection": + err = unpopulate(val, "SyncDirection", &s.SyncDirection) + delete(rawMsg, key) + case "syncMemberAzureDatabaseResourceId": + err = unpopulate(val, "SyncMemberAzureDatabaseResourceID", &s.SyncMemberAzureDatabaseResourceID) + delete(rawMsg, key) + case "syncState": + err = unpopulate(val, "SyncState", &s.SyncState) + delete(rawMsg, key) + case "usePrivateLinkConnection": + err = unpopulate(val, "UsePrivateLinkConnection", &s.UsePrivateLinkConnection) + delete(rawMsg, key) + case "userName": + err = unpopulate(val, "UserName", &s.UserName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SystemData. +func (s SystemData) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "createdAt", s.CreatedAt) + populate(objectMap, "createdBy", s.CreatedBy) + populate(objectMap, "createdByType", s.CreatedByType) + populateDateTimeRFC3339(objectMap, "lastModifiedAt", s.LastModifiedAt) + populate(objectMap, "lastModifiedBy", s.LastModifiedBy) + populate(objectMap, "lastModifiedByType", s.LastModifiedByType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SystemData. +func (s *SystemData) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "createdAt": + err = unpopulateDateTimeRFC3339(val, "CreatedAt", &s.CreatedAt) + delete(rawMsg, key) + case "createdBy": + err = unpopulate(val, "CreatedBy", &s.CreatedBy) + delete(rawMsg, key) + case "createdByType": + err = unpopulate(val, "CreatedByType", &s.CreatedByType) + delete(rawMsg, key) + case "lastModifiedAt": + err = unpopulateDateTimeRFC3339(val, "LastModifiedAt", &s.LastModifiedAt) + delete(rawMsg, key) + case "lastModifiedBy": + err = unpopulate(val, "LastModifiedBy", &s.LastModifiedBy) + delete(rawMsg, key) + case "lastModifiedByType": + err = unpopulate(val, "LastModifiedByType", &s.LastModifiedByType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TdeCertificate. +func (t TdeCertificate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", t.ID) + populate(objectMap, "name", t.Name) + populate(objectMap, "properties", t.Properties) + populate(objectMap, "type", t.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TdeCertificate. +func (t *TdeCertificate) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &t.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &t.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &t.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &t.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TdeCertificateProperties. +func (t TdeCertificateProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "certPassword", t.CertPassword) + populate(objectMap, "privateBlob", t.PrivateBlob) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TdeCertificateProperties. +func (t *TdeCertificateProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "certPassword": + err = unpopulate(val, "CertPassword", &t.CertPassword) + delete(rawMsg, key) + case "privateBlob": + err = unpopulate(val, "PrivateBlob", &t.PrivateBlob) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TimeZone. +func (t TimeZone) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", t.ID) + populate(objectMap, "name", t.Name) + populate(objectMap, "properties", t.Properties) + populate(objectMap, "type", t.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TimeZone. +func (t *TimeZone) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &t.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &t.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &t.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &t.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TimeZoneListResult. +func (t TimeZoneListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", t.NextLink) + populate(objectMap, "value", t.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TimeZoneListResult. +func (t *TimeZoneListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &t.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &t.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TimeZoneProperties. +func (t TimeZoneProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "displayName", t.DisplayName) + populate(objectMap, "timeZoneId", t.TimeZoneID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TimeZoneProperties. +func (t *TimeZoneProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "displayName": + err = unpopulate(val, "DisplayName", &t.DisplayName) + delete(rawMsg, key) + case "timeZoneId": + err = unpopulate(val, "TimeZoneID", &t.TimeZoneID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TopQueries. +func (t TopQueries) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "aggregationFunction", t.AggregationFunction) + populate(objectMap, "endTime", t.EndTime) + populate(objectMap, "intervalType", t.IntervalType) + populate(objectMap, "numberOfQueries", t.NumberOfQueries) + populate(objectMap, "observationMetric", t.ObservationMetric) + populate(objectMap, "queries", t.Queries) + populate(objectMap, "startTime", t.StartTime) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TopQueries. +func (t *TopQueries) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "aggregationFunction": + err = unpopulate(val, "AggregationFunction", &t.AggregationFunction) + delete(rawMsg, key) + case "endTime": + err = unpopulate(val, "EndTime", &t.EndTime) + delete(rawMsg, key) + case "intervalType": + err = unpopulate(val, "IntervalType", &t.IntervalType) + delete(rawMsg, key) + case "numberOfQueries": + err = unpopulate(val, "NumberOfQueries", &t.NumberOfQueries) + delete(rawMsg, key) + case "observationMetric": + err = unpopulate(val, "ObservationMetric", &t.ObservationMetric) + delete(rawMsg, key) + case "queries": + err = unpopulate(val, "Queries", &t.Queries) + delete(rawMsg, key) + case "startTime": + err = unpopulate(val, "StartTime", &t.StartTime) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TopQueriesListResult. +func (t TopQueriesListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", t.NextLink) + populate(objectMap, "value", t.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TopQueriesListResult. +func (t *TopQueriesListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &t.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &t.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TrackedResource. +func (t TrackedResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", t.ID) + populate(objectMap, "location", t.Location) + populate(objectMap, "name", t.Name) + populate(objectMap, "tags", t.Tags) + populate(objectMap, "type", t.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TrackedResource. +func (t *TrackedResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &t.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &t.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &t.Name) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &t.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &t.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TransparentDataEncryptionProperties. +func (t TransparentDataEncryptionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "state", t.State) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TransparentDataEncryptionProperties. +func (t *TransparentDataEncryptionProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "state": + err = unpopulate(val, "State", &t.State) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UpdateLongTermRetentionBackupParameters. +func (u UpdateLongTermRetentionBackupParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", u.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UpdateLongTermRetentionBackupParameters. +func (u *UpdateLongTermRetentionBackupParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &u.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UpdateLongTermRetentionBackupParametersProperties. +func (u UpdateLongTermRetentionBackupParametersProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "requestedBackupStorageRedundancy", u.RequestedBackupStorageRedundancy) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UpdateLongTermRetentionBackupParametersProperties. +func (u *UpdateLongTermRetentionBackupParametersProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "requestedBackupStorageRedundancy": + err = unpopulate(val, "RequestedBackupStorageRedundancy", &u.RequestedBackupStorageRedundancy) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UpdateManagedInstanceDNSServersOperation. +func (u UpdateManagedInstanceDNSServersOperation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", u.ID) + populate(objectMap, "name", u.Name) + populate(objectMap, "properties", u.Properties) + populate(objectMap, "type", u.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UpdateManagedInstanceDNSServersOperation. +func (u *UpdateManagedInstanceDNSServersOperation) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &u.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &u.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &u.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &u.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UpsertManagedServerOperationParameters. +func (u UpsertManagedServerOperationParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "family", u.Family) + populate(objectMap, "storageSizeInGB", u.StorageSizeInGB) + populate(objectMap, "tier", u.Tier) + populate(objectMap, "vCores", u.VCores) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UpsertManagedServerOperationParameters. +func (u *UpsertManagedServerOperationParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "family": + err = unpopulate(val, "Family", &u.Family) + delete(rawMsg, key) + case "storageSizeInGB": + err = unpopulate(val, "StorageSizeInGB", &u.StorageSizeInGB) + delete(rawMsg, key) + case "tier": + err = unpopulate(val, "Tier", &u.Tier) + delete(rawMsg, key) + case "vCores": + err = unpopulate(val, "VCores", &u.VCores) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UpsertManagedServerOperationStep. +func (u UpsertManagedServerOperationStep) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", u.Name) + populate(objectMap, "order", u.Order) + populate(objectMap, "status", u.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UpsertManagedServerOperationStep. +func (u *UpsertManagedServerOperationStep) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &u.Name) + delete(rawMsg, key) + case "order": + err = unpopulate(val, "Order", &u.Order) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &u.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Usage. +func (u Usage) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "currentValue", u.CurrentValue) + populate(objectMap, "id", u.ID) + populate(objectMap, "limit", u.Limit) + populate(objectMap, "name", u.Name) + populate(objectMap, "requestedLimit", u.RequestedLimit) + populate(objectMap, "type", u.Type) + populate(objectMap, "unit", u.Unit) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Usage. +func (u *Usage) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "currentValue": + err = unpopulate(val, "CurrentValue", &u.CurrentValue) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &u.ID) + delete(rawMsg, key) + case "limit": + err = unpopulate(val, "Limit", &u.Limit) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &u.Name) + delete(rawMsg, key) + case "requestedLimit": + err = unpopulate(val, "RequestedLimit", &u.RequestedLimit) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &u.Type) + delete(rawMsg, key) + case "unit": + err = unpopulate(val, "Unit", &u.Unit) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UsageListResult. +func (u UsageListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", u.NextLink) + populate(objectMap, "value", u.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UsageListResult. +func (u *UsageListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &u.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &u.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UserIdentity. +func (u UserIdentity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "clientId", u.ClientID) + populate(objectMap, "principalId", u.PrincipalID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UserIdentity. +func (u *UserIdentity) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "clientId": + err = unpopulate(val, "ClientID", &u.ClientID) + delete(rawMsg, key) + case "principalId": + err = unpopulate(val, "PrincipalID", &u.PrincipalID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualCluster. +func (v VirtualCluster) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", v.ID) + populate(objectMap, "location", v.Location) + populate(objectMap, "name", v.Name) + populate(objectMap, "properties", v.Properties) + populate(objectMap, "tags", v.Tags) + populate(objectMap, "type", v.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualCluster. +func (v *VirtualCluster) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &v.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &v.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &v.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &v.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &v.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &v.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualClusterListResult. +func (v VirtualClusterListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", v.NextLink) + populate(objectMap, "value", v.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualClusterListResult. +func (v *VirtualClusterListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &v.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &v.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualClusterProperties. +func (v VirtualClusterProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "childResources", v.ChildResources) + populate(objectMap, "family", v.Family) + populate(objectMap, "maintenanceConfigurationId", v.MaintenanceConfigurationID) + populate(objectMap, "subnetId", v.SubnetID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualClusterProperties. +func (v *VirtualClusterProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "childResources": + err = unpopulate(val, "ChildResources", &v.ChildResources) + delete(rawMsg, key) + case "family": + err = unpopulate(val, "Family", &v.Family) + delete(rawMsg, key) + case "maintenanceConfigurationId": + err = unpopulate(val, "MaintenanceConfigurationID", &v.MaintenanceConfigurationID) + delete(rawMsg, key) + case "subnetId": + err = unpopulate(val, "SubnetID", &v.SubnetID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualClusterUpdate. +func (v VirtualClusterUpdate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", v.Properties) + populate(objectMap, "tags", v.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualClusterUpdate. +func (v *VirtualClusterUpdate) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &v.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &v.Tags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkRule. +func (v VirtualNetworkRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", v.ID) + populate(objectMap, "name", v.Name) + populate(objectMap, "properties", v.Properties) + populate(objectMap, "type", v.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkRule. +func (v *VirtualNetworkRule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &v.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &v.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &v.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &v.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkRuleListResult. +func (v VirtualNetworkRuleListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", v.NextLink) + populate(objectMap, "value", v.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkRuleListResult. +func (v *VirtualNetworkRuleListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &v.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &v.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkRuleProperties. +func (v VirtualNetworkRuleProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "ignoreMissingVnetServiceEndpoint", v.IgnoreMissingVnetServiceEndpoint) + populate(objectMap, "state", v.State) + populate(objectMap, "virtualNetworkSubnetId", v.VirtualNetworkSubnetID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkRuleProperties. +func (v *VirtualNetworkRuleProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "ignoreMissingVnetServiceEndpoint": + err = unpopulate(val, "IgnoreMissingVnetServiceEndpoint", &v.IgnoreMissingVnetServiceEndpoint) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &v.State) + delete(rawMsg, key) + case "virtualNetworkSubnetId": + err = unpopulate(val, "VirtualNetworkSubnetID", &v.VirtualNetworkSubnetID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VulnerabilityAssessmentRecurringScansProperties. +func (v VulnerabilityAssessmentRecurringScansProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "emailSubscriptionAdmins", v.EmailSubscriptionAdmins) + populate(objectMap, "emails", v.Emails) + populate(objectMap, "isEnabled", v.IsEnabled) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VulnerabilityAssessmentRecurringScansProperties. +func (v *VulnerabilityAssessmentRecurringScansProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "emailSubscriptionAdmins": + err = unpopulate(val, "EmailSubscriptionAdmins", &v.EmailSubscriptionAdmins) + delete(rawMsg, key) + case "emails": + err = unpopulate(val, "Emails", &v.Emails) + delete(rawMsg, key) + case "isEnabled": + err = unpopulate(val, "IsEnabled", &v.IsEnabled) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VulnerabilityAssessmentScanError. +func (v VulnerabilityAssessmentScanError) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "code", v.Code) + populate(objectMap, "message", v.Message) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VulnerabilityAssessmentScanError. +func (v *VulnerabilityAssessmentScanError) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "code": + err = unpopulate(val, "Code", &v.Code) + delete(rawMsg, key) + case "message": + err = unpopulate(val, "Message", &v.Message) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VulnerabilityAssessmentScanRecord. +func (v VulnerabilityAssessmentScanRecord) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", v.ID) + populate(objectMap, "name", v.Name) + populate(objectMap, "properties", v.Properties) + populate(objectMap, "type", v.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VulnerabilityAssessmentScanRecord. +func (v *VulnerabilityAssessmentScanRecord) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &v.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &v.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &v.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &v.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VulnerabilityAssessmentScanRecordListResult. +func (v VulnerabilityAssessmentScanRecordListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", v.NextLink) + populate(objectMap, "value", v.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VulnerabilityAssessmentScanRecordListResult. +func (v *VulnerabilityAssessmentScanRecordListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &v.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &v.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VulnerabilityAssessmentScanRecordProperties. +func (v VulnerabilityAssessmentScanRecordProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "endTime", v.EndTime) + populate(objectMap, "errors", v.Errors) + populate(objectMap, "numberOfFailedSecurityChecks", v.NumberOfFailedSecurityChecks) + populate(objectMap, "scanId", v.ScanID) + populateDateTimeRFC3339(objectMap, "startTime", v.StartTime) + populate(objectMap, "state", v.State) + populate(objectMap, "storageContainerPath", v.StorageContainerPath) + populate(objectMap, "triggerType", v.TriggerType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VulnerabilityAssessmentScanRecordProperties. +func (v *VulnerabilityAssessmentScanRecordProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "endTime": + err = unpopulateDateTimeRFC3339(val, "EndTime", &v.EndTime) + delete(rawMsg, key) + case "errors": + err = unpopulate(val, "Errors", &v.Errors) + delete(rawMsg, key) + case "numberOfFailedSecurityChecks": + err = unpopulate(val, "NumberOfFailedSecurityChecks", &v.NumberOfFailedSecurityChecks) + delete(rawMsg, key) + case "scanId": + err = unpopulate(val, "ScanID", &v.ScanID) + delete(rawMsg, key) + case "startTime": + err = unpopulateDateTimeRFC3339(val, "StartTime", &v.StartTime) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &v.State) + delete(rawMsg, key) + case "storageContainerPath": + err = unpopulate(val, "StorageContainerPath", &v.StorageContainerPath) + delete(rawMsg, key) + case "triggerType": + err = unpopulate(val, "TriggerType", &v.TriggerType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkloadClassifier. +func (w WorkloadClassifier) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", w.ID) + populate(objectMap, "name", w.Name) + populate(objectMap, "properties", w.Properties) + populate(objectMap, "type", w.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkloadClassifier. +func (w *WorkloadClassifier) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &w.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &w.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &w.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &w.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkloadClassifierListResult. +func (w WorkloadClassifierListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", w.NextLink) + populate(objectMap, "value", w.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkloadClassifierListResult. +func (w *WorkloadClassifierListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &w.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &w.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkloadClassifierProperties. +func (w WorkloadClassifierProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "context", w.Context) + populate(objectMap, "endTime", w.EndTime) + populate(objectMap, "importance", w.Importance) + populate(objectMap, "label", w.Label) + populate(objectMap, "memberName", w.MemberName) + populate(objectMap, "startTime", w.StartTime) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkloadClassifierProperties. +func (w *WorkloadClassifierProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "context": + err = unpopulate(val, "Context", &w.Context) + delete(rawMsg, key) + case "endTime": + err = unpopulate(val, "EndTime", &w.EndTime) + delete(rawMsg, key) + case "importance": + err = unpopulate(val, "Importance", &w.Importance) + delete(rawMsg, key) + case "label": + err = unpopulate(val, "Label", &w.Label) + delete(rawMsg, key) + case "memberName": + err = unpopulate(val, "MemberName", &w.MemberName) + delete(rawMsg, key) + case "startTime": + err = unpopulate(val, "StartTime", &w.StartTime) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkloadGroup. +func (w WorkloadGroup) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", w.ID) + populate(objectMap, "name", w.Name) + populate(objectMap, "properties", w.Properties) + populate(objectMap, "type", w.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkloadGroup. +func (w *WorkloadGroup) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &w.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &w.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &w.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &w.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkloadGroupListResult. +func (w WorkloadGroupListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", w.NextLink) + populate(objectMap, "value", w.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkloadGroupListResult. +func (w *WorkloadGroupListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &w.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &w.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkloadGroupProperties. +func (w WorkloadGroupProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "importance", w.Importance) + populate(objectMap, "maxResourcePercent", w.MaxResourcePercent) + populate(objectMap, "maxResourcePercentPerRequest", w.MaxResourcePercentPerRequest) + populate(objectMap, "minResourcePercent", w.MinResourcePercent) + populate(objectMap, "minResourcePercentPerRequest", w.MinResourcePercentPerRequest) + populate(objectMap, "queryExecutionTimeout", w.QueryExecutionTimeout) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkloadGroupProperties. +func (w *WorkloadGroupProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "importance": + err = unpopulate(val, "Importance", &w.Importance) + delete(rawMsg, key) + case "maxResourcePercent": + err = unpopulate(val, "MaxResourcePercent", &w.MaxResourcePercent) + delete(rawMsg, key) + case "maxResourcePercentPerRequest": + err = unpopulate(val, "MaxResourcePercentPerRequest", &w.MaxResourcePercentPerRequest) + delete(rawMsg, key) + case "minResourcePercent": + err = unpopulate(val, "MinResourcePercent", &w.MinResourcePercent) + delete(rawMsg, key) + case "minResourcePercentPerRequest": + err = unpopulate(val, "MinResourcePercentPerRequest", &w.MinResourcePercentPerRequest) + delete(rawMsg, key) + case "queryExecutionTimeout": + err = unpopulate(val, "QueryExecutionTimeout", &w.QueryExecutionTimeout) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +func populate(m map[string]any, k string, v any) { + if v == nil { + return + } else if azcore.IsNullValue(v) { + m[k] = nil + } else if !reflect.ValueOf(v).IsNil() { + m[k] = v + } +} + +func unpopulate(data json.RawMessage, fn string, v any) error { + if data == nil { + return nil + } + if err := json.Unmarshal(data, v); err != nil { + return fmt.Errorf("struct field %s: %v", fn, err) + } + return nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/operations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/operations_client.go new file mode 100644 index 000000000..0b551f9ed --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/operations_client.go @@ -0,0 +1,88 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" +) + +// OperationsClient contains the methods for the Operations group. +// Don't use this type directly, use NewOperationsClient() instead. +type OperationsClient struct { + internal *arm.Client +} + +// NewOperationsClient creates a new instance of OperationsClient with the specified values. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &OperationsClient{ + internal: cl, + } + return client, nil +} + +// NewListPager - Lists all of the available SQL Rest API operations. +// +// Generated from API version 2020-11-01-preview +// - options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. +func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[OperationsClientListResponse]{ + More: func(page OperationsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *OperationsClientListResponse) (OperationsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "OperationsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) + if err != nil { + return OperationsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *OperationsClient) listCreateRequest(ctx context.Context, options *OperationsClientListOptions) (*policy.Request, error) { + urlPath := "/providers/Microsoft.Sql/operations" + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *OperationsClient) listHandleResponse(resp *http.Response) (OperationsClientListResponse, error) { + result := OperationsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.OperationListResult); err != nil { + return OperationsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/options.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/options.go new file mode 100644 index 000000000..9422795bc --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/options.go @@ -0,0 +1,2960 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import "time" + +// AgentClientCreateOrUpdateOptions contains the optional parameters for the AgentClient.CreateOrUpdate method. +type AgentClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// AgentClientGetOptions contains the optional parameters for the AgentClient.Get method. +type AgentClientGetOptions struct { + // placeholder for future optional parameters +} + +// BackupShortTermRetentionPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the BackupShortTermRetentionPoliciesClient.BeginCreateOrUpdate +// method. +type BackupShortTermRetentionPoliciesClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// BackupShortTermRetentionPoliciesClientBeginUpdateOptions contains the optional parameters for the BackupShortTermRetentionPoliciesClient.BeginUpdate +// method. +type BackupShortTermRetentionPoliciesClientBeginUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// BackupShortTermRetentionPoliciesClientGetOptions contains the optional parameters for the BackupShortTermRetentionPoliciesClient.Get +// method. +type BackupShortTermRetentionPoliciesClientGetOptions struct { + // placeholder for future optional parameters +} + +// BackupShortTermRetentionPoliciesClientListByDatabaseOptions contains the optional parameters for the BackupShortTermRetentionPoliciesClient.NewListByDatabasePager +// method. +type BackupShortTermRetentionPoliciesClientListByDatabaseOptions struct { + // placeholder for future optional parameters +} + +// CapabilitiesClientListByLocationOptions contains the optional parameters for the CapabilitiesClient.ListByLocation method. +type CapabilitiesClientListByLocationOptions struct { + // If specified, restricts the response to only include the selected item. + Include *CapabilityGroup +} + +// DataMaskingPoliciesClientCreateOrUpdateOptions contains the optional parameters for the DataMaskingPoliciesClient.CreateOrUpdate +// method. +type DataMaskingPoliciesClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// DataMaskingPoliciesClientGetOptions contains the optional parameters for the DataMaskingPoliciesClient.Get method. +type DataMaskingPoliciesClientGetOptions struct { + // placeholder for future optional parameters +} + +// DataMaskingRulesClientCreateOrUpdateOptions contains the optional parameters for the DataMaskingRulesClient.CreateOrUpdate +// method. +type DataMaskingRulesClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// DataMaskingRulesClientListByDatabaseOptions contains the optional parameters for the DataMaskingRulesClient.NewListByDatabasePager +// method. +type DataMaskingRulesClientListByDatabaseOptions struct { + // placeholder for future optional parameters +} + +// DataWarehouseUserActivitiesClientGetOptions contains the optional parameters for the DataWarehouseUserActivitiesClient.Get +// method. +type DataWarehouseUserActivitiesClientGetOptions struct { + // placeholder for future optional parameters +} + +// DataWarehouseUserActivitiesClientListByDatabaseOptions contains the optional parameters for the DataWarehouseUserActivitiesClient.NewListByDatabasePager +// method. +type DataWarehouseUserActivitiesClientListByDatabaseOptions struct { + // placeholder for future optional parameters +} + +// DatabaseAdvancedThreatProtectionSettingsClientCreateOrUpdateOptions contains the optional parameters for the DatabaseAdvancedThreatProtectionSettingsClient.CreateOrUpdate +// method. +type DatabaseAdvancedThreatProtectionSettingsClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// DatabaseAdvancedThreatProtectionSettingsClientGetOptions contains the optional parameters for the DatabaseAdvancedThreatProtectionSettingsClient.Get +// method. +type DatabaseAdvancedThreatProtectionSettingsClientGetOptions struct { + // placeholder for future optional parameters +} + +// DatabaseAdvancedThreatProtectionSettingsClientListByDatabaseOptions contains the optional parameters for the DatabaseAdvancedThreatProtectionSettingsClient.NewListByDatabasePager +// method. +type DatabaseAdvancedThreatProtectionSettingsClientListByDatabaseOptions struct { + // placeholder for future optional parameters +} + +// DatabaseAdvisorsClientGetOptions contains the optional parameters for the DatabaseAdvisorsClient.Get method. +type DatabaseAdvisorsClientGetOptions struct { + // placeholder for future optional parameters +} + +// DatabaseAdvisorsClientListByDatabaseOptions contains the optional parameters for the DatabaseAdvisorsClient.ListByDatabase +// method. +type DatabaseAdvisorsClientListByDatabaseOptions struct { + // The child resources to include in the response. + Expand *string +} + +// DatabaseAdvisorsClientUpdateOptions contains the optional parameters for the DatabaseAdvisorsClient.Update method. +type DatabaseAdvisorsClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// DatabaseAutomaticTuningClientGetOptions contains the optional parameters for the DatabaseAutomaticTuningClient.Get method. +type DatabaseAutomaticTuningClientGetOptions struct { + // placeholder for future optional parameters +} + +// DatabaseAutomaticTuningClientUpdateOptions contains the optional parameters for the DatabaseAutomaticTuningClient.Update +// method. +type DatabaseAutomaticTuningClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// DatabaseBlobAuditingPoliciesClientCreateOrUpdateOptions contains the optional parameters for the DatabaseBlobAuditingPoliciesClient.CreateOrUpdate +// method. +type DatabaseBlobAuditingPoliciesClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// DatabaseBlobAuditingPoliciesClientGetOptions contains the optional parameters for the DatabaseBlobAuditingPoliciesClient.Get +// method. +type DatabaseBlobAuditingPoliciesClientGetOptions struct { + // placeholder for future optional parameters +} + +// DatabaseBlobAuditingPoliciesClientListByDatabaseOptions contains the optional parameters for the DatabaseBlobAuditingPoliciesClient.NewListByDatabasePager +// method. +type DatabaseBlobAuditingPoliciesClientListByDatabaseOptions struct { + // placeholder for future optional parameters +} + +// DatabaseColumnsClientGetOptions contains the optional parameters for the DatabaseColumnsClient.Get method. +type DatabaseColumnsClientGetOptions struct { + // placeholder for future optional parameters +} + +// DatabaseColumnsClientListByDatabaseOptions contains the optional parameters for the DatabaseColumnsClient.NewListByDatabasePager +// method. +type DatabaseColumnsClientListByDatabaseOptions struct { + Column []string + OrderBy []string + Schema []string + + // An opaque token that identifies a starting point in the collection. + Skiptoken *string + Table []string +} + +// DatabaseColumnsClientListByTableOptions contains the optional parameters for the DatabaseColumnsClient.NewListByTablePager +// method. +type DatabaseColumnsClientListByTableOptions struct { + // An OData filter expression that filters elements in the collection. + Filter *string +} + +// DatabaseExtensionsClientBeginCreateOrUpdateOptions contains the optional parameters for the DatabaseExtensionsClient.BeginCreateOrUpdate +// method. +type DatabaseExtensionsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// DatabaseExtensionsClientGetOptions contains the optional parameters for the DatabaseExtensionsClient.Get method. +type DatabaseExtensionsClientGetOptions struct { + // placeholder for future optional parameters +} + +// DatabaseExtensionsClientListByDatabaseOptions contains the optional parameters for the DatabaseExtensionsClient.NewListByDatabasePager +// method. +type DatabaseExtensionsClientListByDatabaseOptions struct { + // placeholder for future optional parameters +} + +// DatabaseOperationsClientCancelOptions contains the optional parameters for the DatabaseOperationsClient.Cancel method. +type DatabaseOperationsClientCancelOptions struct { + // placeholder for future optional parameters +} + +// DatabaseOperationsClientListByDatabaseOptions contains the optional parameters for the DatabaseOperationsClient.NewListByDatabasePager +// method. +type DatabaseOperationsClientListByDatabaseOptions struct { + // placeholder for future optional parameters +} + +// DatabaseRecommendedActionsClientGetOptions contains the optional parameters for the DatabaseRecommendedActionsClient.Get +// method. +type DatabaseRecommendedActionsClientGetOptions struct { + // placeholder for future optional parameters +} + +// DatabaseRecommendedActionsClientListByDatabaseAdvisorOptions contains the optional parameters for the DatabaseRecommendedActionsClient.ListByDatabaseAdvisor +// method. +type DatabaseRecommendedActionsClientListByDatabaseAdvisorOptions struct { + // placeholder for future optional parameters +} + +// DatabaseRecommendedActionsClientUpdateOptions contains the optional parameters for the DatabaseRecommendedActionsClient.Update +// method. +type DatabaseRecommendedActionsClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// DatabaseSchemasClientGetOptions contains the optional parameters for the DatabaseSchemasClient.Get method. +type DatabaseSchemasClientGetOptions struct { + // placeholder for future optional parameters +} + +// DatabaseSchemasClientListByDatabaseOptions contains the optional parameters for the DatabaseSchemasClient.NewListByDatabasePager +// method. +type DatabaseSchemasClientListByDatabaseOptions struct { + // An OData filter expression that filters elements in the collection. + Filter *string +} + +// DatabaseSecurityAlertPoliciesClientCreateOrUpdateOptions contains the optional parameters for the DatabaseSecurityAlertPoliciesClient.CreateOrUpdate +// method. +type DatabaseSecurityAlertPoliciesClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// DatabaseSecurityAlertPoliciesClientGetOptions contains the optional parameters for the DatabaseSecurityAlertPoliciesClient.Get +// method. +type DatabaseSecurityAlertPoliciesClientGetOptions struct { + // placeholder for future optional parameters +} + +// DatabaseSecurityAlertPoliciesClientListByDatabaseOptions contains the optional parameters for the DatabaseSecurityAlertPoliciesClient.NewListByDatabasePager +// method. +type DatabaseSecurityAlertPoliciesClientListByDatabaseOptions struct { + // placeholder for future optional parameters +} + +// DatabaseTablesClientGetOptions contains the optional parameters for the DatabaseTablesClient.Get method. +type DatabaseTablesClientGetOptions struct { + // placeholder for future optional parameters +} + +// DatabaseTablesClientListBySchemaOptions contains the optional parameters for the DatabaseTablesClient.NewListBySchemaPager +// method. +type DatabaseTablesClientListBySchemaOptions struct { + // An OData filter expression that filters elements in the collection. + Filter *string +} + +// DatabaseUsagesClientListByDatabaseOptions contains the optional parameters for the DatabaseUsagesClient.NewListByDatabasePager +// method. +type DatabaseUsagesClientListByDatabaseOptions struct { + // placeholder for future optional parameters +} + +// DatabaseVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateOptions contains the optional parameters for the DatabaseVulnerabilityAssessmentRuleBaselinesClient.CreateOrUpdate +// method. +type DatabaseVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// DatabaseVulnerabilityAssessmentRuleBaselinesClientDeleteOptions contains the optional parameters for the DatabaseVulnerabilityAssessmentRuleBaselinesClient.Delete +// method. +type DatabaseVulnerabilityAssessmentRuleBaselinesClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// DatabaseVulnerabilityAssessmentRuleBaselinesClientGetOptions contains the optional parameters for the DatabaseVulnerabilityAssessmentRuleBaselinesClient.Get +// method. +type DatabaseVulnerabilityAssessmentRuleBaselinesClientGetOptions struct { + // placeholder for future optional parameters +} + +// DatabaseVulnerabilityAssessmentScansClientBeginInitiateScanOptions contains the optional parameters for the DatabaseVulnerabilityAssessmentScansClient.BeginInitiateScan +// method. +type DatabaseVulnerabilityAssessmentScansClientBeginInitiateScanOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// DatabaseVulnerabilityAssessmentScansClientExportOptions contains the optional parameters for the DatabaseVulnerabilityAssessmentScansClient.Export +// method. +type DatabaseVulnerabilityAssessmentScansClientExportOptions struct { + // placeholder for future optional parameters +} + +// DatabaseVulnerabilityAssessmentScansClientGetOptions contains the optional parameters for the DatabaseVulnerabilityAssessmentScansClient.Get +// method. +type DatabaseVulnerabilityAssessmentScansClientGetOptions struct { + // placeholder for future optional parameters +} + +// DatabaseVulnerabilityAssessmentScansClientListByDatabaseOptions contains the optional parameters for the DatabaseVulnerabilityAssessmentScansClient.NewListByDatabasePager +// method. +type DatabaseVulnerabilityAssessmentScansClientListByDatabaseOptions struct { + // placeholder for future optional parameters +} + +// DatabaseVulnerabilityAssessmentsClientCreateOrUpdateOptions contains the optional parameters for the DatabaseVulnerabilityAssessmentsClient.CreateOrUpdate +// method. +type DatabaseVulnerabilityAssessmentsClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// DatabaseVulnerabilityAssessmentsClientDeleteOptions contains the optional parameters for the DatabaseVulnerabilityAssessmentsClient.Delete +// method. +type DatabaseVulnerabilityAssessmentsClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// DatabaseVulnerabilityAssessmentsClientGetOptions contains the optional parameters for the DatabaseVulnerabilityAssessmentsClient.Get +// method. +type DatabaseVulnerabilityAssessmentsClientGetOptions struct { + // placeholder for future optional parameters +} + +// DatabaseVulnerabilityAssessmentsClientListByDatabaseOptions contains the optional parameters for the DatabaseVulnerabilityAssessmentsClient.NewListByDatabasePager +// method. +type DatabaseVulnerabilityAssessmentsClientListByDatabaseOptions struct { + // placeholder for future optional parameters +} + +// DatabasesClientBeginCreateOrUpdateOptions contains the optional parameters for the DatabasesClient.BeginCreateOrUpdate +// method. +type DatabasesClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// DatabasesClientBeginDeleteOptions contains the optional parameters for the DatabasesClient.BeginDelete method. +type DatabasesClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// DatabasesClientBeginExportOptions contains the optional parameters for the DatabasesClient.BeginExport method. +type DatabasesClientBeginExportOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// DatabasesClientBeginFailoverOptions contains the optional parameters for the DatabasesClient.BeginFailover method. +type DatabasesClientBeginFailoverOptions struct { + // The type of replica to be failed over. + ReplicaType *ReplicaType + + // Resumes the LRO from the provided token. + ResumeToken string +} + +// DatabasesClientBeginImportOptions contains the optional parameters for the DatabasesClient.BeginImport method. +type DatabasesClientBeginImportOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// DatabasesClientBeginPauseOptions contains the optional parameters for the DatabasesClient.BeginPause method. +type DatabasesClientBeginPauseOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// DatabasesClientBeginResumeOptions contains the optional parameters for the DatabasesClient.BeginResume method. +type DatabasesClientBeginResumeOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// DatabasesClientBeginUpdateOptions contains the optional parameters for the DatabasesClient.BeginUpdate method. +type DatabasesClientBeginUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// DatabasesClientBeginUpgradeDataWarehouseOptions contains the optional parameters for the DatabasesClient.BeginUpgradeDataWarehouse +// method. +type DatabasesClientBeginUpgradeDataWarehouseOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// DatabasesClientGetOptions contains the optional parameters for the DatabasesClient.Get method. +type DatabasesClientGetOptions struct { + // placeholder for future optional parameters +} + +// DatabasesClientListByElasticPoolOptions contains the optional parameters for the DatabasesClient.NewListByElasticPoolPager +// method. +type DatabasesClientListByElasticPoolOptions struct { + // placeholder for future optional parameters +} + +// DatabasesClientListByServerOptions contains the optional parameters for the DatabasesClient.NewListByServerPager method. +type DatabasesClientListByServerOptions struct { + SkipToken *string +} + +// DatabasesClientListInaccessibleByServerOptions contains the optional parameters for the DatabasesClient.NewListInaccessibleByServerPager +// method. +type DatabasesClientListInaccessibleByServerOptions struct { + // placeholder for future optional parameters +} + +// DatabasesClientListMetricDefinitionsOptions contains the optional parameters for the DatabasesClient.NewListMetricDefinitionsPager +// method. +type DatabasesClientListMetricDefinitionsOptions struct { + // placeholder for future optional parameters +} + +// DatabasesClientListMetricsOptions contains the optional parameters for the DatabasesClient.NewListMetricsPager method. +type DatabasesClientListMetricsOptions struct { + // placeholder for future optional parameters +} + +// DatabasesClientRenameOptions contains the optional parameters for the DatabasesClient.Rename method. +type DatabasesClientRenameOptions struct { + // placeholder for future optional parameters +} + +// DeletedServersClientBeginRecoverOptions contains the optional parameters for the DeletedServersClient.BeginRecover method. +type DeletedServersClientBeginRecoverOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// DeletedServersClientGetOptions contains the optional parameters for the DeletedServersClient.Get method. +type DeletedServersClientGetOptions struct { + // placeholder for future optional parameters +} + +// DeletedServersClientListByLocationOptions contains the optional parameters for the DeletedServersClient.NewListByLocationPager +// method. +type DeletedServersClientListByLocationOptions struct { + // placeholder for future optional parameters +} + +// DeletedServersClientListOptions contains the optional parameters for the DeletedServersClient.NewListPager method. +type DeletedServersClientListOptions struct { + // placeholder for future optional parameters +} + +// DistributedAvailabilityGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the DistributedAvailabilityGroupsClient.BeginCreateOrUpdate +// method. +type DistributedAvailabilityGroupsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// DistributedAvailabilityGroupsClientBeginDeleteOptions contains the optional parameters for the DistributedAvailabilityGroupsClient.BeginDelete +// method. +type DistributedAvailabilityGroupsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// DistributedAvailabilityGroupsClientBeginUpdateOptions contains the optional parameters for the DistributedAvailabilityGroupsClient.BeginUpdate +// method. +type DistributedAvailabilityGroupsClientBeginUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// DistributedAvailabilityGroupsClientGetOptions contains the optional parameters for the DistributedAvailabilityGroupsClient.Get +// method. +type DistributedAvailabilityGroupsClientGetOptions struct { + // placeholder for future optional parameters +} + +// DistributedAvailabilityGroupsClientListByInstanceOptions contains the optional parameters for the DistributedAvailabilityGroupsClient.NewListByInstancePager +// method. +type DistributedAvailabilityGroupsClientListByInstanceOptions struct { + // placeholder for future optional parameters +} + +// ElasticPoolActivitiesClientListByElasticPoolOptions contains the optional parameters for the ElasticPoolActivitiesClient.NewListByElasticPoolPager +// method. +type ElasticPoolActivitiesClientListByElasticPoolOptions struct { + // placeholder for future optional parameters +} + +// ElasticPoolDatabaseActivitiesClientListByElasticPoolOptions contains the optional parameters for the ElasticPoolDatabaseActivitiesClient.NewListByElasticPoolPager +// method. +type ElasticPoolDatabaseActivitiesClientListByElasticPoolOptions struct { + // placeholder for future optional parameters +} + +// ElasticPoolOperationsClientCancelOptions contains the optional parameters for the ElasticPoolOperationsClient.Cancel method. +type ElasticPoolOperationsClientCancelOptions struct { + // placeholder for future optional parameters +} + +// ElasticPoolOperationsClientListByElasticPoolOptions contains the optional parameters for the ElasticPoolOperationsClient.NewListByElasticPoolPager +// method. +type ElasticPoolOperationsClientListByElasticPoolOptions struct { + // placeholder for future optional parameters +} + +// ElasticPoolsClientBeginCreateOrUpdateOptions contains the optional parameters for the ElasticPoolsClient.BeginCreateOrUpdate +// method. +type ElasticPoolsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ElasticPoolsClientBeginDeleteOptions contains the optional parameters for the ElasticPoolsClient.BeginDelete method. +type ElasticPoolsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ElasticPoolsClientBeginFailoverOptions contains the optional parameters for the ElasticPoolsClient.BeginFailover method. +type ElasticPoolsClientBeginFailoverOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ElasticPoolsClientBeginUpdateOptions contains the optional parameters for the ElasticPoolsClient.BeginUpdate method. +type ElasticPoolsClientBeginUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ElasticPoolsClientGetOptions contains the optional parameters for the ElasticPoolsClient.Get method. +type ElasticPoolsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ElasticPoolsClientListByServerOptions contains the optional parameters for the ElasticPoolsClient.NewListByServerPager +// method. +type ElasticPoolsClientListByServerOptions struct { + // The number of elements in the collection to skip. + Skip *int64 +} + +// ElasticPoolsClientListMetricDefinitionsOptions contains the optional parameters for the ElasticPoolsClient.NewListMetricDefinitionsPager +// method. +type ElasticPoolsClientListMetricDefinitionsOptions struct { + // placeholder for future optional parameters +} + +// ElasticPoolsClientListMetricsOptions contains the optional parameters for the ElasticPoolsClient.NewListMetricsPager method. +type ElasticPoolsClientListMetricsOptions struct { + // placeholder for future optional parameters +} + +// EncryptionProtectorsClientBeginCreateOrUpdateOptions contains the optional parameters for the EncryptionProtectorsClient.BeginCreateOrUpdate +// method. +type EncryptionProtectorsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// EncryptionProtectorsClientBeginRevalidateOptions contains the optional parameters for the EncryptionProtectorsClient.BeginRevalidate +// method. +type EncryptionProtectorsClientBeginRevalidateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// EncryptionProtectorsClientGetOptions contains the optional parameters for the EncryptionProtectorsClient.Get method. +type EncryptionProtectorsClientGetOptions struct { + // placeholder for future optional parameters +} + +// EncryptionProtectorsClientListByServerOptions contains the optional parameters for the EncryptionProtectorsClient.NewListByServerPager +// method. +type EncryptionProtectorsClientListByServerOptions struct { + // placeholder for future optional parameters +} + +// EndpointCertificatesClientGetOptions contains the optional parameters for the EndpointCertificatesClient.Get method. +type EndpointCertificatesClientGetOptions struct { + // placeholder for future optional parameters +} + +// EndpointCertificatesClientListByInstanceOptions contains the optional parameters for the EndpointCertificatesClient.NewListByInstancePager +// method. +type EndpointCertificatesClientListByInstanceOptions struct { + // placeholder for future optional parameters +} + +// ExtendedDatabaseBlobAuditingPoliciesClientCreateOrUpdateOptions contains the optional parameters for the ExtendedDatabaseBlobAuditingPoliciesClient.CreateOrUpdate +// method. +type ExtendedDatabaseBlobAuditingPoliciesClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// ExtendedDatabaseBlobAuditingPoliciesClientGetOptions contains the optional parameters for the ExtendedDatabaseBlobAuditingPoliciesClient.Get +// method. +type ExtendedDatabaseBlobAuditingPoliciesClientGetOptions struct { + // placeholder for future optional parameters +} + +// ExtendedDatabaseBlobAuditingPoliciesClientListByDatabaseOptions contains the optional parameters for the ExtendedDatabaseBlobAuditingPoliciesClient.NewListByDatabasePager +// method. +type ExtendedDatabaseBlobAuditingPoliciesClientListByDatabaseOptions struct { + // placeholder for future optional parameters +} + +// ExtendedServerBlobAuditingPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the ExtendedServerBlobAuditingPoliciesClient.BeginCreateOrUpdate +// method. +type ExtendedServerBlobAuditingPoliciesClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ExtendedServerBlobAuditingPoliciesClientGetOptions contains the optional parameters for the ExtendedServerBlobAuditingPoliciesClient.Get +// method. +type ExtendedServerBlobAuditingPoliciesClientGetOptions struct { + // placeholder for future optional parameters +} + +// ExtendedServerBlobAuditingPoliciesClientListByServerOptions contains the optional parameters for the ExtendedServerBlobAuditingPoliciesClient.NewListByServerPager +// method. +type ExtendedServerBlobAuditingPoliciesClientListByServerOptions struct { + // placeholder for future optional parameters +} + +// FailoverGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the FailoverGroupsClient.BeginCreateOrUpdate +// method. +type FailoverGroupsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// FailoverGroupsClientBeginDeleteOptions contains the optional parameters for the FailoverGroupsClient.BeginDelete method. +type FailoverGroupsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// FailoverGroupsClientBeginFailoverOptions contains the optional parameters for the FailoverGroupsClient.BeginFailover method. +type FailoverGroupsClientBeginFailoverOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// FailoverGroupsClientBeginForceFailoverAllowDataLossOptions contains the optional parameters for the FailoverGroupsClient.BeginForceFailoverAllowDataLoss +// method. +type FailoverGroupsClientBeginForceFailoverAllowDataLossOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// FailoverGroupsClientBeginUpdateOptions contains the optional parameters for the FailoverGroupsClient.BeginUpdate method. +type FailoverGroupsClientBeginUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// FailoverGroupsClientGetOptions contains the optional parameters for the FailoverGroupsClient.Get method. +type FailoverGroupsClientGetOptions struct { + // placeholder for future optional parameters +} + +// FailoverGroupsClientListByServerOptions contains the optional parameters for the FailoverGroupsClient.NewListByServerPager +// method. +type FailoverGroupsClientListByServerOptions struct { + // placeholder for future optional parameters +} + +// FirewallRulesClientCreateOrUpdateOptions contains the optional parameters for the FirewallRulesClient.CreateOrUpdate method. +type FirewallRulesClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// FirewallRulesClientDeleteOptions contains the optional parameters for the FirewallRulesClient.Delete method. +type FirewallRulesClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// FirewallRulesClientGetOptions contains the optional parameters for the FirewallRulesClient.Get method. +type FirewallRulesClientGetOptions struct { + // placeholder for future optional parameters +} + +// FirewallRulesClientListByServerOptions contains the optional parameters for the FirewallRulesClient.NewListByServerPager +// method. +type FirewallRulesClientListByServerOptions struct { + // placeholder for future optional parameters +} + +// FirewallRulesClientReplaceOptions contains the optional parameters for the FirewallRulesClient.Replace method. +type FirewallRulesClientReplaceOptions struct { + // placeholder for future optional parameters +} + +// GeoBackupPoliciesClientCreateOrUpdateOptions contains the optional parameters for the GeoBackupPoliciesClient.CreateOrUpdate +// method. +type GeoBackupPoliciesClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// GeoBackupPoliciesClientGetOptions contains the optional parameters for the GeoBackupPoliciesClient.Get method. +type GeoBackupPoliciesClientGetOptions struct { + // placeholder for future optional parameters +} + +// GeoBackupPoliciesClientListByDatabaseOptions contains the optional parameters for the GeoBackupPoliciesClient.NewListByDatabasePager +// method. +type GeoBackupPoliciesClientListByDatabaseOptions struct { + // placeholder for future optional parameters +} + +// IPv6FirewallRulesClientCreateOrUpdateOptions contains the optional parameters for the IPv6FirewallRulesClient.CreateOrUpdate +// method. +type IPv6FirewallRulesClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// IPv6FirewallRulesClientDeleteOptions contains the optional parameters for the IPv6FirewallRulesClient.Delete method. +type IPv6FirewallRulesClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// IPv6FirewallRulesClientGetOptions contains the optional parameters for the IPv6FirewallRulesClient.Get method. +type IPv6FirewallRulesClientGetOptions struct { + // placeholder for future optional parameters +} + +// IPv6FirewallRulesClientListByServerOptions contains the optional parameters for the IPv6FirewallRulesClient.NewListByServerPager +// method. +type IPv6FirewallRulesClientListByServerOptions struct { + // placeholder for future optional parameters +} + +// InstanceFailoverGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the InstanceFailoverGroupsClient.BeginCreateOrUpdate +// method. +type InstanceFailoverGroupsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// InstanceFailoverGroupsClientBeginDeleteOptions contains the optional parameters for the InstanceFailoverGroupsClient.BeginDelete +// method. +type InstanceFailoverGroupsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// InstanceFailoverGroupsClientBeginFailoverOptions contains the optional parameters for the InstanceFailoverGroupsClient.BeginFailover +// method. +type InstanceFailoverGroupsClientBeginFailoverOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// InstanceFailoverGroupsClientBeginForceFailoverAllowDataLossOptions contains the optional parameters for the InstanceFailoverGroupsClient.BeginForceFailoverAllowDataLoss +// method. +type InstanceFailoverGroupsClientBeginForceFailoverAllowDataLossOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// InstanceFailoverGroupsClientGetOptions contains the optional parameters for the InstanceFailoverGroupsClient.Get method. +type InstanceFailoverGroupsClientGetOptions struct { + // placeholder for future optional parameters +} + +// InstanceFailoverGroupsClientListByLocationOptions contains the optional parameters for the InstanceFailoverGroupsClient.NewListByLocationPager +// method. +type InstanceFailoverGroupsClientListByLocationOptions struct { + // placeholder for future optional parameters +} + +// InstancePoolsClientBeginCreateOrUpdateOptions contains the optional parameters for the InstancePoolsClient.BeginCreateOrUpdate +// method. +type InstancePoolsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// InstancePoolsClientBeginDeleteOptions contains the optional parameters for the InstancePoolsClient.BeginDelete method. +type InstancePoolsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// InstancePoolsClientBeginUpdateOptions contains the optional parameters for the InstancePoolsClient.BeginUpdate method. +type InstancePoolsClientBeginUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// InstancePoolsClientGetOptions contains the optional parameters for the InstancePoolsClient.Get method. +type InstancePoolsClientGetOptions struct { + // placeholder for future optional parameters +} + +// InstancePoolsClientListByResourceGroupOptions contains the optional parameters for the InstancePoolsClient.NewListByResourceGroupPager +// method. +type InstancePoolsClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// InstancePoolsClientListOptions contains the optional parameters for the InstancePoolsClient.NewListPager method. +type InstancePoolsClientListOptions struct { + // placeholder for future optional parameters +} + +// JobAgentsClientBeginCreateOrUpdateOptions contains the optional parameters for the JobAgentsClient.BeginCreateOrUpdate +// method. +type JobAgentsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// JobAgentsClientBeginDeleteOptions contains the optional parameters for the JobAgentsClient.BeginDelete method. +type JobAgentsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// JobAgentsClientBeginUpdateOptions contains the optional parameters for the JobAgentsClient.BeginUpdate method. +type JobAgentsClientBeginUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// JobAgentsClientGetOptions contains the optional parameters for the JobAgentsClient.Get method. +type JobAgentsClientGetOptions struct { + // placeholder for future optional parameters +} + +// JobAgentsClientListByServerOptions contains the optional parameters for the JobAgentsClient.NewListByServerPager method. +type JobAgentsClientListByServerOptions struct { + // placeholder for future optional parameters +} + +// JobCredentialsClientCreateOrUpdateOptions contains the optional parameters for the JobCredentialsClient.CreateOrUpdate +// method. +type JobCredentialsClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// JobCredentialsClientDeleteOptions contains the optional parameters for the JobCredentialsClient.Delete method. +type JobCredentialsClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// JobCredentialsClientGetOptions contains the optional parameters for the JobCredentialsClient.Get method. +type JobCredentialsClientGetOptions struct { + // placeholder for future optional parameters +} + +// JobCredentialsClientListByAgentOptions contains the optional parameters for the JobCredentialsClient.NewListByAgentPager +// method. +type JobCredentialsClientListByAgentOptions struct { + // placeholder for future optional parameters +} + +// JobExecutionsClientBeginCreateOptions contains the optional parameters for the JobExecutionsClient.BeginCreate method. +type JobExecutionsClientBeginCreateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// JobExecutionsClientBeginCreateOrUpdateOptions contains the optional parameters for the JobExecutionsClient.BeginCreateOrUpdate +// method. +type JobExecutionsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// JobExecutionsClientCancelOptions contains the optional parameters for the JobExecutionsClient.Cancel method. +type JobExecutionsClientCancelOptions struct { + // placeholder for future optional parameters +} + +// JobExecutionsClientGetOptions contains the optional parameters for the JobExecutionsClient.Get method. +type JobExecutionsClientGetOptions struct { + // placeholder for future optional parameters +} + +// JobExecutionsClientListByAgentOptions contains the optional parameters for the JobExecutionsClient.NewListByAgentPager +// method. +type JobExecutionsClientListByAgentOptions struct { + // If specified, only job executions created before the specified time are included. + CreateTimeMax *time.Time + + // If specified, only job executions created at or after the specified time are included. + CreateTimeMin *time.Time + + // If specified, only job executions completed before the specified time are included. + EndTimeMax *time.Time + + // If specified, only job executions completed at or after the specified time are included. + EndTimeMin *time.Time + + // If specified, only active or only completed job executions are included. + IsActive *bool + + // The number of elements in the collection to skip. + Skip *int32 + + // The number of elements to return from the collection. + Top *int32 +} + +// JobExecutionsClientListByJobOptions contains the optional parameters for the JobExecutionsClient.NewListByJobPager method. +type JobExecutionsClientListByJobOptions struct { + // If specified, only job executions created before the specified time are included. + CreateTimeMax *time.Time + + // If specified, only job executions created at or after the specified time are included. + CreateTimeMin *time.Time + + // If specified, only job executions completed before the specified time are included. + EndTimeMax *time.Time + + // If specified, only job executions completed at or after the specified time are included. + EndTimeMin *time.Time + + // If specified, only active or only completed job executions are included. + IsActive *bool + + // The number of elements in the collection to skip. + Skip *int32 + + // The number of elements to return from the collection. + Top *int32 +} + +// JobStepExecutionsClientGetOptions contains the optional parameters for the JobStepExecutionsClient.Get method. +type JobStepExecutionsClientGetOptions struct { + // placeholder for future optional parameters +} + +// JobStepExecutionsClientListByJobExecutionOptions contains the optional parameters for the JobStepExecutionsClient.NewListByJobExecutionPager +// method. +type JobStepExecutionsClientListByJobExecutionOptions struct { + // If specified, only job executions created before the specified time are included. + CreateTimeMax *time.Time + + // If specified, only job executions created at or after the specified time are included. + CreateTimeMin *time.Time + + // If specified, only job executions completed before the specified time are included. + EndTimeMax *time.Time + + // If specified, only job executions completed at or after the specified time are included. + EndTimeMin *time.Time + + // If specified, only active or only completed job executions are included. + IsActive *bool + + // The number of elements in the collection to skip. + Skip *int32 + + // The number of elements to return from the collection. + Top *int32 +} + +// JobStepsClientCreateOrUpdateOptions contains the optional parameters for the JobStepsClient.CreateOrUpdate method. +type JobStepsClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// JobStepsClientDeleteOptions contains the optional parameters for the JobStepsClient.Delete method. +type JobStepsClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// JobStepsClientGetByVersionOptions contains the optional parameters for the JobStepsClient.GetByVersion method. +type JobStepsClientGetByVersionOptions struct { + // placeholder for future optional parameters +} + +// JobStepsClientGetOptions contains the optional parameters for the JobStepsClient.Get method. +type JobStepsClientGetOptions struct { + // placeholder for future optional parameters +} + +// JobStepsClientListByJobOptions contains the optional parameters for the JobStepsClient.NewListByJobPager method. +type JobStepsClientListByJobOptions struct { + // placeholder for future optional parameters +} + +// JobStepsClientListByVersionOptions contains the optional parameters for the JobStepsClient.NewListByVersionPager method. +type JobStepsClientListByVersionOptions struct { + // placeholder for future optional parameters +} + +// JobTargetExecutionsClientGetOptions contains the optional parameters for the JobTargetExecutionsClient.Get method. +type JobTargetExecutionsClientGetOptions struct { + // placeholder for future optional parameters +} + +// JobTargetExecutionsClientListByJobExecutionOptions contains the optional parameters for the JobTargetExecutionsClient.NewListByJobExecutionPager +// method. +type JobTargetExecutionsClientListByJobExecutionOptions struct { + // If specified, only job executions created before the specified time are included. + CreateTimeMax *time.Time + + // If specified, only job executions created at or after the specified time are included. + CreateTimeMin *time.Time + + // If specified, only job executions completed before the specified time are included. + EndTimeMax *time.Time + + // If specified, only job executions completed at or after the specified time are included. + EndTimeMin *time.Time + + // If specified, only active or only completed job executions are included. + IsActive *bool + + // The number of elements in the collection to skip. + Skip *int32 + + // The number of elements to return from the collection. + Top *int32 +} + +// JobTargetExecutionsClientListByStepOptions contains the optional parameters for the JobTargetExecutionsClient.NewListByStepPager +// method. +type JobTargetExecutionsClientListByStepOptions struct { + // If specified, only job executions created before the specified time are included. + CreateTimeMax *time.Time + + // If specified, only job executions created at or after the specified time are included. + CreateTimeMin *time.Time + + // If specified, only job executions completed before the specified time are included. + EndTimeMax *time.Time + + // If specified, only job executions completed at or after the specified time are included. + EndTimeMin *time.Time + + // If specified, only active or only completed job executions are included. + IsActive *bool + + // The number of elements in the collection to skip. + Skip *int32 + + // The number of elements to return from the collection. + Top *int32 +} + +// JobTargetGroupsClientCreateOrUpdateOptions contains the optional parameters for the JobTargetGroupsClient.CreateOrUpdate +// method. +type JobTargetGroupsClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// JobTargetGroupsClientDeleteOptions contains the optional parameters for the JobTargetGroupsClient.Delete method. +type JobTargetGroupsClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// JobTargetGroupsClientGetOptions contains the optional parameters for the JobTargetGroupsClient.Get method. +type JobTargetGroupsClientGetOptions struct { + // placeholder for future optional parameters +} + +// JobTargetGroupsClientListByAgentOptions contains the optional parameters for the JobTargetGroupsClient.NewListByAgentPager +// method. +type JobTargetGroupsClientListByAgentOptions struct { + // placeholder for future optional parameters +} + +// JobVersionsClientGetOptions contains the optional parameters for the JobVersionsClient.Get method. +type JobVersionsClientGetOptions struct { + // placeholder for future optional parameters +} + +// JobVersionsClientListByJobOptions contains the optional parameters for the JobVersionsClient.NewListByJobPager method. +type JobVersionsClientListByJobOptions struct { + // placeholder for future optional parameters +} + +// JobsClientCreateOrUpdateOptions contains the optional parameters for the JobsClient.CreateOrUpdate method. +type JobsClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// JobsClientDeleteOptions contains the optional parameters for the JobsClient.Delete method. +type JobsClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// JobsClientGetOptions contains the optional parameters for the JobsClient.Get method. +type JobsClientGetOptions struct { + // placeholder for future optional parameters +} + +// JobsClientListByAgentOptions contains the optional parameters for the JobsClient.NewListByAgentPager method. +type JobsClientListByAgentOptions struct { + // placeholder for future optional parameters +} + +// LedgerDigestUploadsClientBeginCreateOrUpdateOptions contains the optional parameters for the LedgerDigestUploadsClient.BeginCreateOrUpdate +// method. +type LedgerDigestUploadsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// LedgerDigestUploadsClientBeginDisableOptions contains the optional parameters for the LedgerDigestUploadsClient.BeginDisable +// method. +type LedgerDigestUploadsClientBeginDisableOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// LedgerDigestUploadsClientGetOptions contains the optional parameters for the LedgerDigestUploadsClient.Get method. +type LedgerDigestUploadsClientGetOptions struct { + // placeholder for future optional parameters +} + +// LedgerDigestUploadsClientListByDatabaseOptions contains the optional parameters for the LedgerDigestUploadsClient.NewListByDatabasePager +// method. +type LedgerDigestUploadsClientListByDatabaseOptions struct { + // placeholder for future optional parameters +} + +// LongTermRetentionBackupsClientBeginCopyByResourceGroupOptions contains the optional parameters for the LongTermRetentionBackupsClient.BeginCopyByResourceGroup +// method. +type LongTermRetentionBackupsClientBeginCopyByResourceGroupOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// LongTermRetentionBackupsClientBeginCopyOptions contains the optional parameters for the LongTermRetentionBackupsClient.BeginCopy +// method. +type LongTermRetentionBackupsClientBeginCopyOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// LongTermRetentionBackupsClientBeginDeleteByResourceGroupOptions contains the optional parameters for the LongTermRetentionBackupsClient.BeginDeleteByResourceGroup +// method. +type LongTermRetentionBackupsClientBeginDeleteByResourceGroupOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// LongTermRetentionBackupsClientBeginDeleteOptions contains the optional parameters for the LongTermRetentionBackupsClient.BeginDelete +// method. +type LongTermRetentionBackupsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// LongTermRetentionBackupsClientBeginUpdateByResourceGroupOptions contains the optional parameters for the LongTermRetentionBackupsClient.BeginUpdateByResourceGroup +// method. +type LongTermRetentionBackupsClientBeginUpdateByResourceGroupOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// LongTermRetentionBackupsClientBeginUpdateOptions contains the optional parameters for the LongTermRetentionBackupsClient.BeginUpdate +// method. +type LongTermRetentionBackupsClientBeginUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// LongTermRetentionBackupsClientGetByResourceGroupOptions contains the optional parameters for the LongTermRetentionBackupsClient.GetByResourceGroup +// method. +type LongTermRetentionBackupsClientGetByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// LongTermRetentionBackupsClientGetOptions contains the optional parameters for the LongTermRetentionBackupsClient.Get method. +type LongTermRetentionBackupsClientGetOptions struct { + // placeholder for future optional parameters +} + +// LongTermRetentionBackupsClientListByDatabaseOptions contains the optional parameters for the LongTermRetentionBackupsClient.NewListByDatabasePager +// method. +type LongTermRetentionBackupsClientListByDatabaseOptions struct { + // Whether to query against just live databases, just deleted databases, or all databases. + DatabaseState *DatabaseState + + // Whether or not to only get the latest backup for each database. + OnlyLatestPerDatabase *bool +} + +// LongTermRetentionBackupsClientListByLocationOptions contains the optional parameters for the LongTermRetentionBackupsClient.NewListByLocationPager +// method. +type LongTermRetentionBackupsClientListByLocationOptions struct { + // Whether to query against just live databases, just deleted databases, or all databases. + DatabaseState *DatabaseState + + // Whether or not to only get the latest backup for each database. + OnlyLatestPerDatabase *bool +} + +// LongTermRetentionBackupsClientListByResourceGroupDatabaseOptions contains the optional parameters for the LongTermRetentionBackupsClient.NewListByResourceGroupDatabasePager +// method. +type LongTermRetentionBackupsClientListByResourceGroupDatabaseOptions struct { + // Whether to query against just live databases, just deleted databases, or all databases. + DatabaseState *DatabaseState + + // Whether or not to only get the latest backup for each database. + OnlyLatestPerDatabase *bool +} + +// LongTermRetentionBackupsClientListByResourceGroupLocationOptions contains the optional parameters for the LongTermRetentionBackupsClient.NewListByResourceGroupLocationPager +// method. +type LongTermRetentionBackupsClientListByResourceGroupLocationOptions struct { + // Whether to query against just live databases, just deleted databases, or all databases. + DatabaseState *DatabaseState + + // Whether or not to only get the latest backup for each database. + OnlyLatestPerDatabase *bool +} + +// LongTermRetentionBackupsClientListByResourceGroupServerOptions contains the optional parameters for the LongTermRetentionBackupsClient.NewListByResourceGroupServerPager +// method. +type LongTermRetentionBackupsClientListByResourceGroupServerOptions struct { + // Whether to query against just live databases, just deleted databases, or all databases. + DatabaseState *DatabaseState + + // Whether or not to only get the latest backup for each database. + OnlyLatestPerDatabase *bool +} + +// LongTermRetentionBackupsClientListByServerOptions contains the optional parameters for the LongTermRetentionBackupsClient.NewListByServerPager +// method. +type LongTermRetentionBackupsClientListByServerOptions struct { + // Whether to query against just live databases, just deleted databases, or all databases. + DatabaseState *DatabaseState + + // Whether or not to only get the latest backup for each database. + OnlyLatestPerDatabase *bool +} + +// LongTermRetentionManagedInstanceBackupsClientBeginDeleteByResourceGroupOptions contains the optional parameters for the +// LongTermRetentionManagedInstanceBackupsClient.BeginDeleteByResourceGroup method. +type LongTermRetentionManagedInstanceBackupsClientBeginDeleteByResourceGroupOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// LongTermRetentionManagedInstanceBackupsClientBeginDeleteOptions contains the optional parameters for the LongTermRetentionManagedInstanceBackupsClient.BeginDelete +// method. +type LongTermRetentionManagedInstanceBackupsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// LongTermRetentionManagedInstanceBackupsClientGetByResourceGroupOptions contains the optional parameters for the LongTermRetentionManagedInstanceBackupsClient.GetByResourceGroup +// method. +type LongTermRetentionManagedInstanceBackupsClientGetByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// LongTermRetentionManagedInstanceBackupsClientGetOptions contains the optional parameters for the LongTermRetentionManagedInstanceBackupsClient.Get +// method. +type LongTermRetentionManagedInstanceBackupsClientGetOptions struct { + // placeholder for future optional parameters +} + +// LongTermRetentionManagedInstanceBackupsClientListByDatabaseOptions contains the optional parameters for the LongTermRetentionManagedInstanceBackupsClient.NewListByDatabasePager +// method. +type LongTermRetentionManagedInstanceBackupsClientListByDatabaseOptions struct { + // Whether to query against just live databases, just deleted databases, or all databases. + DatabaseState *DatabaseState + + // Whether or not to only get the latest backup for each database. + OnlyLatestPerDatabase *bool +} + +// LongTermRetentionManagedInstanceBackupsClientListByInstanceOptions contains the optional parameters for the LongTermRetentionManagedInstanceBackupsClient.NewListByInstancePager +// method. +type LongTermRetentionManagedInstanceBackupsClientListByInstanceOptions struct { + // Whether to query against just live databases, just deleted databases, or all databases. + DatabaseState *DatabaseState + + // Whether or not to only get the latest backup for each database. + OnlyLatestPerDatabase *bool +} + +// LongTermRetentionManagedInstanceBackupsClientListByLocationOptions contains the optional parameters for the LongTermRetentionManagedInstanceBackupsClient.NewListByLocationPager +// method. +type LongTermRetentionManagedInstanceBackupsClientListByLocationOptions struct { + // Whether to query against just live databases, just deleted databases, or all databases. + DatabaseState *DatabaseState + + // Whether or not to only get the latest backup for each database. + OnlyLatestPerDatabase *bool +} + +// LongTermRetentionManagedInstanceBackupsClientListByResourceGroupDatabaseOptions contains the optional parameters for the +// LongTermRetentionManagedInstanceBackupsClient.NewListByResourceGroupDatabasePager method. +type LongTermRetentionManagedInstanceBackupsClientListByResourceGroupDatabaseOptions struct { + // Whether to query against just live databases, just deleted databases, or all databases. + DatabaseState *DatabaseState + + // Whether or not to only get the latest backup for each database. + OnlyLatestPerDatabase *bool +} + +// LongTermRetentionManagedInstanceBackupsClientListByResourceGroupInstanceOptions contains the optional parameters for the +// LongTermRetentionManagedInstanceBackupsClient.NewListByResourceGroupInstancePager method. +type LongTermRetentionManagedInstanceBackupsClientListByResourceGroupInstanceOptions struct { + // Whether to query against just live databases, just deleted databases, or all databases. + DatabaseState *DatabaseState + + // Whether or not to only get the latest backup for each database. + OnlyLatestPerDatabase *bool +} + +// LongTermRetentionManagedInstanceBackupsClientListByResourceGroupLocationOptions contains the optional parameters for the +// LongTermRetentionManagedInstanceBackupsClient.NewListByResourceGroupLocationPager method. +type LongTermRetentionManagedInstanceBackupsClientListByResourceGroupLocationOptions struct { + // Whether to query against just live databases, just deleted databases, or all databases. + DatabaseState *DatabaseState + + // Whether or not to only get the latest backup for each database. + OnlyLatestPerDatabase *bool +} + +// LongTermRetentionPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the LongTermRetentionPoliciesClient.BeginCreateOrUpdate +// method. +type LongTermRetentionPoliciesClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// LongTermRetentionPoliciesClientGetOptions contains the optional parameters for the LongTermRetentionPoliciesClient.Get +// method. +type LongTermRetentionPoliciesClientGetOptions struct { + // placeholder for future optional parameters +} + +// LongTermRetentionPoliciesClientListByDatabaseOptions contains the optional parameters for the LongTermRetentionPoliciesClient.NewListByDatabasePager +// method. +type LongTermRetentionPoliciesClientListByDatabaseOptions struct { + // placeholder for future optional parameters +} + +// MaintenanceWindowOptionsClientGetOptions contains the optional parameters for the MaintenanceWindowOptionsClient.Get method. +type MaintenanceWindowOptionsClientGetOptions struct { + // placeholder for future optional parameters +} + +// MaintenanceWindowsClientCreateOrUpdateOptions contains the optional parameters for the MaintenanceWindowsClient.CreateOrUpdate +// method. +type MaintenanceWindowsClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// MaintenanceWindowsClientGetOptions contains the optional parameters for the MaintenanceWindowsClient.Get method. +type MaintenanceWindowsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ManagedBackupShortTermRetentionPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the ManagedBackupShortTermRetentionPoliciesClient.BeginCreateOrUpdate +// method. +type ManagedBackupShortTermRetentionPoliciesClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ManagedBackupShortTermRetentionPoliciesClientBeginUpdateOptions contains the optional parameters for the ManagedBackupShortTermRetentionPoliciesClient.BeginUpdate +// method. +type ManagedBackupShortTermRetentionPoliciesClientBeginUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ManagedBackupShortTermRetentionPoliciesClientGetOptions contains the optional parameters for the ManagedBackupShortTermRetentionPoliciesClient.Get +// method. +type ManagedBackupShortTermRetentionPoliciesClientGetOptions struct { + // placeholder for future optional parameters +} + +// ManagedBackupShortTermRetentionPoliciesClientListByDatabaseOptions contains the optional parameters for the ManagedBackupShortTermRetentionPoliciesClient.NewListByDatabasePager +// method. +type ManagedBackupShortTermRetentionPoliciesClientListByDatabaseOptions struct { + // placeholder for future optional parameters +} + +// ManagedDatabaseColumnsClientGetOptions contains the optional parameters for the ManagedDatabaseColumnsClient.Get method. +type ManagedDatabaseColumnsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ManagedDatabaseColumnsClientListByDatabaseOptions contains the optional parameters for the ManagedDatabaseColumnsClient.NewListByDatabasePager +// method. +type ManagedDatabaseColumnsClientListByDatabaseOptions struct { + Column []string + OrderBy []string + Schema []string + + // An opaque token that identifies a starting point in the collection. + Skiptoken *string + Table []string +} + +// ManagedDatabaseColumnsClientListByTableOptions contains the optional parameters for the ManagedDatabaseColumnsClient.NewListByTablePager +// method. +type ManagedDatabaseColumnsClientListByTableOptions struct { + // An OData filter expression that filters elements in the collection. + Filter *string +} + +// ManagedDatabaseQueriesClientGetOptions contains the optional parameters for the ManagedDatabaseQueriesClient.Get method. +type ManagedDatabaseQueriesClientGetOptions struct { + // placeholder for future optional parameters +} + +// ManagedDatabaseQueriesClientListByQueryOptions contains the optional parameters for the ManagedDatabaseQueriesClient.NewListByQueryPager +// method. +type ManagedDatabaseQueriesClientListByQueryOptions struct { + // End time for observed period. + EndTime *string + + // The time step to be used to summarize the metric values. + Interval *QueryTimeGrainType + + // Start time for observed period. + StartTime *string +} + +// ManagedDatabaseRecommendedSensitivityLabelsClientUpdateOptions contains the optional parameters for the ManagedDatabaseRecommendedSensitivityLabelsClient.Update +// method. +type ManagedDatabaseRecommendedSensitivityLabelsClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// ManagedDatabaseRestoreDetailsClientGetOptions contains the optional parameters for the ManagedDatabaseRestoreDetailsClient.Get +// method. +type ManagedDatabaseRestoreDetailsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ManagedDatabaseSchemasClientGetOptions contains the optional parameters for the ManagedDatabaseSchemasClient.Get method. +type ManagedDatabaseSchemasClientGetOptions struct { + // placeholder for future optional parameters +} + +// ManagedDatabaseSchemasClientListByDatabaseOptions contains the optional parameters for the ManagedDatabaseSchemasClient.NewListByDatabasePager +// method. +type ManagedDatabaseSchemasClientListByDatabaseOptions struct { + // An OData filter expression that filters elements in the collection. + Filter *string +} + +// ManagedDatabaseSecurityAlertPoliciesClientCreateOrUpdateOptions contains the optional parameters for the ManagedDatabaseSecurityAlertPoliciesClient.CreateOrUpdate +// method. +type ManagedDatabaseSecurityAlertPoliciesClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// ManagedDatabaseSecurityAlertPoliciesClientGetOptions contains the optional parameters for the ManagedDatabaseSecurityAlertPoliciesClient.Get +// method. +type ManagedDatabaseSecurityAlertPoliciesClientGetOptions struct { + // placeholder for future optional parameters +} + +// ManagedDatabaseSecurityAlertPoliciesClientListByDatabaseOptions contains the optional parameters for the ManagedDatabaseSecurityAlertPoliciesClient.NewListByDatabasePager +// method. +type ManagedDatabaseSecurityAlertPoliciesClientListByDatabaseOptions struct { + // placeholder for future optional parameters +} + +// ManagedDatabaseSecurityEventsClientListByDatabaseOptions contains the optional parameters for the ManagedDatabaseSecurityEventsClient.NewListByDatabasePager +// method. +type ManagedDatabaseSecurityEventsClientListByDatabaseOptions struct { + // An OData filter expression that filters elements in the collection. + Filter *string + + // The number of elements in the collection to skip. + Skip *int32 + + // An opaque token that identifies a starting point in the collection. + Skiptoken *string + + // The number of elements to return from the collection. + Top *int32 +} + +// ManagedDatabaseSensitivityLabelsClientCreateOrUpdateOptions contains the optional parameters for the ManagedDatabaseSensitivityLabelsClient.CreateOrUpdate +// method. +type ManagedDatabaseSensitivityLabelsClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// ManagedDatabaseSensitivityLabelsClientDeleteOptions contains the optional parameters for the ManagedDatabaseSensitivityLabelsClient.Delete +// method. +type ManagedDatabaseSensitivityLabelsClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// ManagedDatabaseSensitivityLabelsClientDisableRecommendationOptions contains the optional parameters for the ManagedDatabaseSensitivityLabelsClient.DisableRecommendation +// method. +type ManagedDatabaseSensitivityLabelsClientDisableRecommendationOptions struct { + // placeholder for future optional parameters +} + +// ManagedDatabaseSensitivityLabelsClientEnableRecommendationOptions contains the optional parameters for the ManagedDatabaseSensitivityLabelsClient.EnableRecommendation +// method. +type ManagedDatabaseSensitivityLabelsClientEnableRecommendationOptions struct { + // placeholder for future optional parameters +} + +// ManagedDatabaseSensitivityLabelsClientGetOptions contains the optional parameters for the ManagedDatabaseSensitivityLabelsClient.Get +// method. +type ManagedDatabaseSensitivityLabelsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ManagedDatabaseSensitivityLabelsClientListCurrentByDatabaseOptions contains the optional parameters for the ManagedDatabaseSensitivityLabelsClient.NewListCurrentByDatabasePager +// method. +type ManagedDatabaseSensitivityLabelsClientListCurrentByDatabaseOptions struct { + Count *bool + + // An OData filter expression that filters elements in the collection. + Filter *string + SkipToken *string +} + +// ManagedDatabaseSensitivityLabelsClientListRecommendedByDatabaseOptions contains the optional parameters for the ManagedDatabaseSensitivityLabelsClient.NewListRecommendedByDatabasePager +// method. +type ManagedDatabaseSensitivityLabelsClientListRecommendedByDatabaseOptions struct { + // An OData filter expression that filters elements in the collection. + Filter *string + + // Specifies whether to include disabled recommendations or not. + IncludeDisabledRecommendations *bool + SkipToken *string +} + +// ManagedDatabaseSensitivityLabelsClientUpdateOptions contains the optional parameters for the ManagedDatabaseSensitivityLabelsClient.Update +// method. +type ManagedDatabaseSensitivityLabelsClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// ManagedDatabaseTablesClientGetOptions contains the optional parameters for the ManagedDatabaseTablesClient.Get method. +type ManagedDatabaseTablesClientGetOptions struct { + // placeholder for future optional parameters +} + +// ManagedDatabaseTablesClientListBySchemaOptions contains the optional parameters for the ManagedDatabaseTablesClient.NewListBySchemaPager +// method. +type ManagedDatabaseTablesClientListBySchemaOptions struct { + // An OData filter expression that filters elements in the collection. + Filter *string +} + +// ManagedDatabaseTransparentDataEncryptionClientCreateOrUpdateOptions contains the optional parameters for the ManagedDatabaseTransparentDataEncryptionClient.CreateOrUpdate +// method. +type ManagedDatabaseTransparentDataEncryptionClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// ManagedDatabaseTransparentDataEncryptionClientGetOptions contains the optional parameters for the ManagedDatabaseTransparentDataEncryptionClient.Get +// method. +type ManagedDatabaseTransparentDataEncryptionClientGetOptions struct { + // placeholder for future optional parameters +} + +// ManagedDatabaseTransparentDataEncryptionClientListByDatabaseOptions contains the optional parameters for the ManagedDatabaseTransparentDataEncryptionClient.NewListByDatabasePager +// method. +type ManagedDatabaseTransparentDataEncryptionClientListByDatabaseOptions struct { + // placeholder for future optional parameters +} + +// ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateOptions contains the optional parameters for the +// ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient.CreateOrUpdate method. +type ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientDeleteOptions contains the optional parameters for the ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient.Delete +// method. +type ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientGetOptions contains the optional parameters for the ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient.Get +// method. +type ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientGetOptions struct { + // placeholder for future optional parameters +} + +// ManagedDatabaseVulnerabilityAssessmentScansClientBeginInitiateScanOptions contains the optional parameters for the ManagedDatabaseVulnerabilityAssessmentScansClient.BeginInitiateScan +// method. +type ManagedDatabaseVulnerabilityAssessmentScansClientBeginInitiateScanOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ManagedDatabaseVulnerabilityAssessmentScansClientExportOptions contains the optional parameters for the ManagedDatabaseVulnerabilityAssessmentScansClient.Export +// method. +type ManagedDatabaseVulnerabilityAssessmentScansClientExportOptions struct { + // placeholder for future optional parameters +} + +// ManagedDatabaseVulnerabilityAssessmentScansClientGetOptions contains the optional parameters for the ManagedDatabaseVulnerabilityAssessmentScansClient.Get +// method. +type ManagedDatabaseVulnerabilityAssessmentScansClientGetOptions struct { + // placeholder for future optional parameters +} + +// ManagedDatabaseVulnerabilityAssessmentScansClientListByDatabaseOptions contains the optional parameters for the ManagedDatabaseVulnerabilityAssessmentScansClient.NewListByDatabasePager +// method. +type ManagedDatabaseVulnerabilityAssessmentScansClientListByDatabaseOptions struct { + // placeholder for future optional parameters +} + +// ManagedDatabaseVulnerabilityAssessmentsClientCreateOrUpdateOptions contains the optional parameters for the ManagedDatabaseVulnerabilityAssessmentsClient.CreateOrUpdate +// method. +type ManagedDatabaseVulnerabilityAssessmentsClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// ManagedDatabaseVulnerabilityAssessmentsClientDeleteOptions contains the optional parameters for the ManagedDatabaseVulnerabilityAssessmentsClient.Delete +// method. +type ManagedDatabaseVulnerabilityAssessmentsClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// ManagedDatabaseVulnerabilityAssessmentsClientGetOptions contains the optional parameters for the ManagedDatabaseVulnerabilityAssessmentsClient.Get +// method. +type ManagedDatabaseVulnerabilityAssessmentsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ManagedDatabaseVulnerabilityAssessmentsClientListByDatabaseOptions contains the optional parameters for the ManagedDatabaseVulnerabilityAssessmentsClient.NewListByDatabasePager +// method. +type ManagedDatabaseVulnerabilityAssessmentsClientListByDatabaseOptions struct { + // placeholder for future optional parameters +} + +// ManagedDatabasesClientBeginCompleteRestoreOptions contains the optional parameters for the ManagedDatabasesClient.BeginCompleteRestore +// method. +type ManagedDatabasesClientBeginCompleteRestoreOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ManagedDatabasesClientBeginCreateOrUpdateOptions contains the optional parameters for the ManagedDatabasesClient.BeginCreateOrUpdate +// method. +type ManagedDatabasesClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ManagedDatabasesClientBeginDeleteOptions contains the optional parameters for the ManagedDatabasesClient.BeginDelete method. +type ManagedDatabasesClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ManagedDatabasesClientBeginUpdateOptions contains the optional parameters for the ManagedDatabasesClient.BeginUpdate method. +type ManagedDatabasesClientBeginUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ManagedDatabasesClientGetOptions contains the optional parameters for the ManagedDatabasesClient.Get method. +type ManagedDatabasesClientGetOptions struct { + // placeholder for future optional parameters +} + +// ManagedDatabasesClientListByInstanceOptions contains the optional parameters for the ManagedDatabasesClient.NewListByInstancePager +// method. +type ManagedDatabasesClientListByInstanceOptions struct { + // placeholder for future optional parameters +} + +// ManagedDatabasesClientListInaccessibleByInstanceOptions contains the optional parameters for the ManagedDatabasesClient.NewListInaccessibleByInstancePager +// method. +type ManagedDatabasesClientListInaccessibleByInstanceOptions struct { + // placeholder for future optional parameters +} + +// ManagedInstanceAdministratorsClientBeginCreateOrUpdateOptions contains the optional parameters for the ManagedInstanceAdministratorsClient.BeginCreateOrUpdate +// method. +type ManagedInstanceAdministratorsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ManagedInstanceAdministratorsClientBeginDeleteOptions contains the optional parameters for the ManagedInstanceAdministratorsClient.BeginDelete +// method. +type ManagedInstanceAdministratorsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ManagedInstanceAdministratorsClientGetOptions contains the optional parameters for the ManagedInstanceAdministratorsClient.Get +// method. +type ManagedInstanceAdministratorsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ManagedInstanceAdministratorsClientListByInstanceOptions contains the optional parameters for the ManagedInstanceAdministratorsClient.NewListByInstancePager +// method. +type ManagedInstanceAdministratorsClientListByInstanceOptions struct { + // placeholder for future optional parameters +} + +// ManagedInstanceAzureADOnlyAuthenticationsClientBeginCreateOrUpdateOptions contains the optional parameters for the ManagedInstanceAzureADOnlyAuthenticationsClient.BeginCreateOrUpdate +// method. +type ManagedInstanceAzureADOnlyAuthenticationsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ManagedInstanceAzureADOnlyAuthenticationsClientBeginDeleteOptions contains the optional parameters for the ManagedInstanceAzureADOnlyAuthenticationsClient.BeginDelete +// method. +type ManagedInstanceAzureADOnlyAuthenticationsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ManagedInstanceAzureADOnlyAuthenticationsClientGetOptions contains the optional parameters for the ManagedInstanceAzureADOnlyAuthenticationsClient.Get +// method. +type ManagedInstanceAzureADOnlyAuthenticationsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ManagedInstanceAzureADOnlyAuthenticationsClientListByInstanceOptions contains the optional parameters for the ManagedInstanceAzureADOnlyAuthenticationsClient.NewListByInstancePager +// method. +type ManagedInstanceAzureADOnlyAuthenticationsClientListByInstanceOptions struct { + // placeholder for future optional parameters +} + +// ManagedInstanceEncryptionProtectorsClientBeginCreateOrUpdateOptions contains the optional parameters for the ManagedInstanceEncryptionProtectorsClient.BeginCreateOrUpdate +// method. +type ManagedInstanceEncryptionProtectorsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ManagedInstanceEncryptionProtectorsClientBeginRevalidateOptions contains the optional parameters for the ManagedInstanceEncryptionProtectorsClient.BeginRevalidate +// method. +type ManagedInstanceEncryptionProtectorsClientBeginRevalidateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ManagedInstanceEncryptionProtectorsClientGetOptions contains the optional parameters for the ManagedInstanceEncryptionProtectorsClient.Get +// method. +type ManagedInstanceEncryptionProtectorsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ManagedInstanceEncryptionProtectorsClientListByInstanceOptions contains the optional parameters for the ManagedInstanceEncryptionProtectorsClient.NewListByInstancePager +// method. +type ManagedInstanceEncryptionProtectorsClientListByInstanceOptions struct { + // placeholder for future optional parameters +} + +// ManagedInstanceKeysClientBeginCreateOrUpdateOptions contains the optional parameters for the ManagedInstanceKeysClient.BeginCreateOrUpdate +// method. +type ManagedInstanceKeysClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ManagedInstanceKeysClientBeginDeleteOptions contains the optional parameters for the ManagedInstanceKeysClient.BeginDelete +// method. +type ManagedInstanceKeysClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ManagedInstanceKeysClientGetOptions contains the optional parameters for the ManagedInstanceKeysClient.Get method. +type ManagedInstanceKeysClientGetOptions struct { + // placeholder for future optional parameters +} + +// ManagedInstanceKeysClientListByInstanceOptions contains the optional parameters for the ManagedInstanceKeysClient.NewListByInstancePager +// method. +type ManagedInstanceKeysClientListByInstanceOptions struct { + // An OData filter expression that filters elements in the collection. + Filter *string +} + +// ManagedInstanceLongTermRetentionPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the ManagedInstanceLongTermRetentionPoliciesClient.BeginCreateOrUpdate +// method. +type ManagedInstanceLongTermRetentionPoliciesClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ManagedInstanceLongTermRetentionPoliciesClientGetOptions contains the optional parameters for the ManagedInstanceLongTermRetentionPoliciesClient.Get +// method. +type ManagedInstanceLongTermRetentionPoliciesClientGetOptions struct { + // placeholder for future optional parameters +} + +// ManagedInstanceLongTermRetentionPoliciesClientListByDatabaseOptions contains the optional parameters for the ManagedInstanceLongTermRetentionPoliciesClient.NewListByDatabasePager +// method. +type ManagedInstanceLongTermRetentionPoliciesClientListByDatabaseOptions struct { + // placeholder for future optional parameters +} + +// ManagedInstanceOperationsClientCancelOptions contains the optional parameters for the ManagedInstanceOperationsClient.Cancel +// method. +type ManagedInstanceOperationsClientCancelOptions struct { + // placeholder for future optional parameters +} + +// ManagedInstanceOperationsClientGetOptions contains the optional parameters for the ManagedInstanceOperationsClient.Get +// method. +type ManagedInstanceOperationsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ManagedInstanceOperationsClientListByManagedInstanceOptions contains the optional parameters for the ManagedInstanceOperationsClient.NewListByManagedInstancePager +// method. +type ManagedInstanceOperationsClientListByManagedInstanceOptions struct { + // placeholder for future optional parameters +} + +// ManagedInstancePrivateEndpointConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the ManagedInstancePrivateEndpointConnectionsClient.BeginCreateOrUpdate +// method. +type ManagedInstancePrivateEndpointConnectionsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ManagedInstancePrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the ManagedInstancePrivateEndpointConnectionsClient.BeginDelete +// method. +type ManagedInstancePrivateEndpointConnectionsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ManagedInstancePrivateEndpointConnectionsClientGetOptions contains the optional parameters for the ManagedInstancePrivateEndpointConnectionsClient.Get +// method. +type ManagedInstancePrivateEndpointConnectionsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ManagedInstancePrivateEndpointConnectionsClientListByManagedInstanceOptions contains the optional parameters for the ManagedInstancePrivateEndpointConnectionsClient.NewListByManagedInstancePager +// method. +type ManagedInstancePrivateEndpointConnectionsClientListByManagedInstanceOptions struct { + // placeholder for future optional parameters +} + +// ManagedInstancePrivateLinkResourcesClientGetOptions contains the optional parameters for the ManagedInstancePrivateLinkResourcesClient.Get +// method. +type ManagedInstancePrivateLinkResourcesClientGetOptions struct { + // placeholder for future optional parameters +} + +// ManagedInstancePrivateLinkResourcesClientListByManagedInstanceOptions contains the optional parameters for the ManagedInstancePrivateLinkResourcesClient.NewListByManagedInstancePager +// method. +type ManagedInstancePrivateLinkResourcesClientListByManagedInstanceOptions struct { + // placeholder for future optional parameters +} + +// ManagedInstanceTdeCertificatesClientBeginCreateOptions contains the optional parameters for the ManagedInstanceTdeCertificatesClient.BeginCreate +// method. +type ManagedInstanceTdeCertificatesClientBeginCreateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ManagedInstanceVulnerabilityAssessmentsClientCreateOrUpdateOptions contains the optional parameters for the ManagedInstanceVulnerabilityAssessmentsClient.CreateOrUpdate +// method. +type ManagedInstanceVulnerabilityAssessmentsClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// ManagedInstanceVulnerabilityAssessmentsClientDeleteOptions contains the optional parameters for the ManagedInstanceVulnerabilityAssessmentsClient.Delete +// method. +type ManagedInstanceVulnerabilityAssessmentsClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// ManagedInstanceVulnerabilityAssessmentsClientGetOptions contains the optional parameters for the ManagedInstanceVulnerabilityAssessmentsClient.Get +// method. +type ManagedInstanceVulnerabilityAssessmentsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ManagedInstanceVulnerabilityAssessmentsClientListByInstanceOptions contains the optional parameters for the ManagedInstanceVulnerabilityAssessmentsClient.NewListByInstancePager +// method. +type ManagedInstanceVulnerabilityAssessmentsClientListByInstanceOptions struct { + // placeholder for future optional parameters +} + +// ManagedInstancesClientBeginCreateOrUpdateOptions contains the optional parameters for the ManagedInstancesClient.BeginCreateOrUpdate +// method. +type ManagedInstancesClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ManagedInstancesClientBeginDeleteOptions contains the optional parameters for the ManagedInstancesClient.BeginDelete method. +type ManagedInstancesClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ManagedInstancesClientBeginFailoverOptions contains the optional parameters for the ManagedInstancesClient.BeginFailover +// method. +type ManagedInstancesClientBeginFailoverOptions struct { + // The type of replica to be failed over. + ReplicaType *ReplicaType + + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ManagedInstancesClientBeginUpdateOptions contains the optional parameters for the ManagedInstancesClient.BeginUpdate method. +type ManagedInstancesClientBeginUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ManagedInstancesClientGetOptions contains the optional parameters for the ManagedInstancesClient.Get method. +type ManagedInstancesClientGetOptions struct { + // The child resources to include in the response. + Expand *string +} + +// ManagedInstancesClientListByInstancePoolOptions contains the optional parameters for the ManagedInstancesClient.NewListByInstancePoolPager +// method. +type ManagedInstancesClientListByInstancePoolOptions struct { + // The child resources to include in the response. + Expand *string +} + +// ManagedInstancesClientListByManagedInstanceOptions contains the optional parameters for the ManagedInstancesClient.NewListByManagedInstancePager +// method. +type ManagedInstancesClientListByManagedInstanceOptions struct { + // Aggregation function to be used, default value is 'sum' + AggregationFunction *AggregationFunctionType + + // Comma separated list of databases to be included into search. All DB's are included if this parameter is not specified. + Databases *string + + // End time for observed period. + EndTime *string + + // The time step to be used to summarize the metric values. Default value is PT1H + Interval *QueryTimeGrainType + + // How many 'top queries' to return. Default is 5. + NumberOfQueries *int32 + + // Metric to be used for ranking top queries. Default is 'cpu' + ObservationMetric *MetricType + + // Start time for observed period. + StartTime *string +} + +// ManagedInstancesClientListByResourceGroupOptions contains the optional parameters for the ManagedInstancesClient.NewListByResourceGroupPager +// method. +type ManagedInstancesClientListByResourceGroupOptions struct { + // The child resources to include in the response. + Expand *string +} + +// ManagedInstancesClientListOptions contains the optional parameters for the ManagedInstancesClient.NewListPager method. +type ManagedInstancesClientListOptions struct { + // The child resources to include in the response. + Expand *string +} + +// ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientBeginCreateOrUpdateOptions contains the optional +// parameters for the ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient.BeginCreateOrUpdate method. +type ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientBeginUpdateOptions contains the optional parameters +// for the ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient.BeginUpdate method. +type ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientBeginUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientGetOptions contains the optional parameters for the +// ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient.Get method. +type ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientGetOptions struct { + // placeholder for future optional parameters +} + +// ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientListByRestorableDroppedDatabaseOptions contains the +// optional parameters for the ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient.NewListByRestorableDroppedDatabasePager +// method. +type ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientListByRestorableDroppedDatabaseOptions struct { + // placeholder for future optional parameters +} + +// ManagedServerSecurityAlertPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the ManagedServerSecurityAlertPoliciesClient.BeginCreateOrUpdate +// method. +type ManagedServerSecurityAlertPoliciesClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ManagedServerSecurityAlertPoliciesClientGetOptions contains the optional parameters for the ManagedServerSecurityAlertPoliciesClient.Get +// method. +type ManagedServerSecurityAlertPoliciesClientGetOptions struct { + // placeholder for future optional parameters +} + +// ManagedServerSecurityAlertPoliciesClientListByInstanceOptions contains the optional parameters for the ManagedServerSecurityAlertPoliciesClient.NewListByInstancePager +// method. +type ManagedServerSecurityAlertPoliciesClientListByInstanceOptions struct { + // placeholder for future optional parameters +} + +// OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. +type OperationsClientListOptions struct { + // placeholder for future optional parameters +} + +// OutboundFirewallRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the OutboundFirewallRulesClient.BeginCreateOrUpdate +// method. +type OutboundFirewallRulesClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// OutboundFirewallRulesClientBeginDeleteOptions contains the optional parameters for the OutboundFirewallRulesClient.BeginDelete +// method. +type OutboundFirewallRulesClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// OutboundFirewallRulesClientGetOptions contains the optional parameters for the OutboundFirewallRulesClient.Get method. +type OutboundFirewallRulesClientGetOptions struct { + // placeholder for future optional parameters +} + +// OutboundFirewallRulesClientListByServerOptions contains the optional parameters for the OutboundFirewallRulesClient.NewListByServerPager +// method. +type OutboundFirewallRulesClientListByServerOptions struct { + // placeholder for future optional parameters +} + +// PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginCreateOrUpdate +// method. +type PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// PrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginDelete +// method. +type PrivateEndpointConnectionsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get +// method. +type PrivateEndpointConnectionsClientGetOptions struct { + // placeholder for future optional parameters +} + +// PrivateEndpointConnectionsClientListByServerOptions contains the optional parameters for the PrivateEndpointConnectionsClient.NewListByServerPager +// method. +type PrivateEndpointConnectionsClientListByServerOptions struct { + // placeholder for future optional parameters +} + +// PrivateLinkResourcesClientGetOptions contains the optional parameters for the PrivateLinkResourcesClient.Get method. +type PrivateLinkResourcesClientGetOptions struct { + // placeholder for future optional parameters +} + +// PrivateLinkResourcesClientListByServerOptions contains the optional parameters for the PrivateLinkResourcesClient.NewListByServerPager +// method. +type PrivateLinkResourcesClientListByServerOptions struct { + // placeholder for future optional parameters +} + +// RecommendedSensitivityLabelsClientUpdateOptions contains the optional parameters for the RecommendedSensitivityLabelsClient.Update +// method. +type RecommendedSensitivityLabelsClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// RecoverableDatabasesClientGetOptions contains the optional parameters for the RecoverableDatabasesClient.Get method. +type RecoverableDatabasesClientGetOptions struct { + // placeholder for future optional parameters +} + +// RecoverableDatabasesClientListByServerOptions contains the optional parameters for the RecoverableDatabasesClient.NewListByServerPager +// method. +type RecoverableDatabasesClientListByServerOptions struct { + // placeholder for future optional parameters +} + +// RecoverableManagedDatabasesClientGetOptions contains the optional parameters for the RecoverableManagedDatabasesClient.Get +// method. +type RecoverableManagedDatabasesClientGetOptions struct { + // placeholder for future optional parameters +} + +// RecoverableManagedDatabasesClientListByInstanceOptions contains the optional parameters for the RecoverableManagedDatabasesClient.NewListByInstancePager +// method. +type RecoverableManagedDatabasesClientListByInstanceOptions struct { + // placeholder for future optional parameters +} + +// ReplicationLinksClientBeginFailoverAllowDataLossOptions contains the optional parameters for the ReplicationLinksClient.BeginFailoverAllowDataLoss +// method. +type ReplicationLinksClientBeginFailoverAllowDataLossOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ReplicationLinksClientBeginFailoverOptions contains the optional parameters for the ReplicationLinksClient.BeginFailover +// method. +type ReplicationLinksClientBeginFailoverOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ReplicationLinksClientDeleteOptions contains the optional parameters for the ReplicationLinksClient.Delete method. +type ReplicationLinksClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// ReplicationLinksClientGetOptions contains the optional parameters for the ReplicationLinksClient.Get method. +type ReplicationLinksClientGetOptions struct { + // placeholder for future optional parameters +} + +// ReplicationLinksClientListByDatabaseOptions contains the optional parameters for the ReplicationLinksClient.NewListByDatabasePager +// method. +type ReplicationLinksClientListByDatabaseOptions struct { + // placeholder for future optional parameters +} + +// ReplicationLinksClientListByServerOptions contains the optional parameters for the ReplicationLinksClient.NewListByServerPager +// method. +type ReplicationLinksClientListByServerOptions struct { + // placeholder for future optional parameters +} + +// RestorableDroppedDatabasesClientGetOptions contains the optional parameters for the RestorableDroppedDatabasesClient.Get +// method. +type RestorableDroppedDatabasesClientGetOptions struct { + // placeholder for future optional parameters +} + +// RestorableDroppedDatabasesClientListByServerOptions contains the optional parameters for the RestorableDroppedDatabasesClient.NewListByServerPager +// method. +type RestorableDroppedDatabasesClientListByServerOptions struct { + // placeholder for future optional parameters +} + +// RestorableDroppedManagedDatabasesClientGetOptions contains the optional parameters for the RestorableDroppedManagedDatabasesClient.Get +// method. +type RestorableDroppedManagedDatabasesClientGetOptions struct { + // placeholder for future optional parameters +} + +// RestorableDroppedManagedDatabasesClientListByInstanceOptions contains the optional parameters for the RestorableDroppedManagedDatabasesClient.NewListByInstancePager +// method. +type RestorableDroppedManagedDatabasesClientListByInstanceOptions struct { + // placeholder for future optional parameters +} + +// RestorePointsClientBeginCreateOptions contains the optional parameters for the RestorePointsClient.BeginCreate method. +type RestorePointsClientBeginCreateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// RestorePointsClientDeleteOptions contains the optional parameters for the RestorePointsClient.Delete method. +type RestorePointsClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// RestorePointsClientGetOptions contains the optional parameters for the RestorePointsClient.Get method. +type RestorePointsClientGetOptions struct { + // placeholder for future optional parameters +} + +// RestorePointsClientListByDatabaseOptions contains the optional parameters for the RestorePointsClient.NewListByDatabasePager +// method. +type RestorePointsClientListByDatabaseOptions struct { + // placeholder for future optional parameters +} + +// SensitivityLabelsClientCreateOrUpdateOptions contains the optional parameters for the SensitivityLabelsClient.CreateOrUpdate +// method. +type SensitivityLabelsClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// SensitivityLabelsClientDeleteOptions contains the optional parameters for the SensitivityLabelsClient.Delete method. +type SensitivityLabelsClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// SensitivityLabelsClientDisableRecommendationOptions contains the optional parameters for the SensitivityLabelsClient.DisableRecommendation +// method. +type SensitivityLabelsClientDisableRecommendationOptions struct { + // placeholder for future optional parameters +} + +// SensitivityLabelsClientEnableRecommendationOptions contains the optional parameters for the SensitivityLabelsClient.EnableRecommendation +// method. +type SensitivityLabelsClientEnableRecommendationOptions struct { + // placeholder for future optional parameters +} + +// SensitivityLabelsClientGetOptions contains the optional parameters for the SensitivityLabelsClient.Get method. +type SensitivityLabelsClientGetOptions struct { + // placeholder for future optional parameters +} + +// SensitivityLabelsClientListCurrentByDatabaseOptions contains the optional parameters for the SensitivityLabelsClient.NewListCurrentByDatabasePager +// method. +type SensitivityLabelsClientListCurrentByDatabaseOptions struct { + Count *bool + + // An OData filter expression that filters elements in the collection. + Filter *string + SkipToken *string +} + +// SensitivityLabelsClientListRecommendedByDatabaseOptions contains the optional parameters for the SensitivityLabelsClient.NewListRecommendedByDatabasePager +// method. +type SensitivityLabelsClientListRecommendedByDatabaseOptions struct { + // An OData filter expression that filters elements in the collection. + Filter *string + + // Specifies whether to include disabled recommendations or not. + IncludeDisabledRecommendations *bool + SkipToken *string +} + +// SensitivityLabelsClientUpdateOptions contains the optional parameters for the SensitivityLabelsClient.Update method. +type SensitivityLabelsClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// ServerAdvancedThreatProtectionSettingsClientBeginCreateOrUpdateOptions contains the optional parameters for the ServerAdvancedThreatProtectionSettingsClient.BeginCreateOrUpdate +// method. +type ServerAdvancedThreatProtectionSettingsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ServerAdvancedThreatProtectionSettingsClientGetOptions contains the optional parameters for the ServerAdvancedThreatProtectionSettingsClient.Get +// method. +type ServerAdvancedThreatProtectionSettingsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ServerAdvancedThreatProtectionSettingsClientListByServerOptions contains the optional parameters for the ServerAdvancedThreatProtectionSettingsClient.NewListByServerPager +// method. +type ServerAdvancedThreatProtectionSettingsClientListByServerOptions struct { + // placeholder for future optional parameters +} + +// ServerAdvisorsClientGetOptions contains the optional parameters for the ServerAdvisorsClient.Get method. +type ServerAdvisorsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ServerAdvisorsClientListByServerOptions contains the optional parameters for the ServerAdvisorsClient.ListByServer method. +type ServerAdvisorsClientListByServerOptions struct { + // The child resources to include in the response. + Expand *string +} + +// ServerAdvisorsClientUpdateOptions contains the optional parameters for the ServerAdvisorsClient.Update method. +type ServerAdvisorsClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// ServerAutomaticTuningClientGetOptions contains the optional parameters for the ServerAutomaticTuningClient.Get method. +type ServerAutomaticTuningClientGetOptions struct { + // placeholder for future optional parameters +} + +// ServerAutomaticTuningClientUpdateOptions contains the optional parameters for the ServerAutomaticTuningClient.Update method. +type ServerAutomaticTuningClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// ServerAzureADAdministratorsClientBeginCreateOrUpdateOptions contains the optional parameters for the ServerAzureADAdministratorsClient.BeginCreateOrUpdate +// method. +type ServerAzureADAdministratorsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ServerAzureADAdministratorsClientBeginDeleteOptions contains the optional parameters for the ServerAzureADAdministratorsClient.BeginDelete +// method. +type ServerAzureADAdministratorsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ServerAzureADAdministratorsClientGetOptions contains the optional parameters for the ServerAzureADAdministratorsClient.Get +// method. +type ServerAzureADAdministratorsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ServerAzureADAdministratorsClientListByServerOptions contains the optional parameters for the ServerAzureADAdministratorsClient.NewListByServerPager +// method. +type ServerAzureADAdministratorsClientListByServerOptions struct { + // placeholder for future optional parameters +} + +// ServerAzureADOnlyAuthenticationsClientBeginCreateOrUpdateOptions contains the optional parameters for the ServerAzureADOnlyAuthenticationsClient.BeginCreateOrUpdate +// method. +type ServerAzureADOnlyAuthenticationsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ServerAzureADOnlyAuthenticationsClientBeginDeleteOptions contains the optional parameters for the ServerAzureADOnlyAuthenticationsClient.BeginDelete +// method. +type ServerAzureADOnlyAuthenticationsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ServerAzureADOnlyAuthenticationsClientGetOptions contains the optional parameters for the ServerAzureADOnlyAuthenticationsClient.Get +// method. +type ServerAzureADOnlyAuthenticationsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ServerAzureADOnlyAuthenticationsClientListByServerOptions contains the optional parameters for the ServerAzureADOnlyAuthenticationsClient.NewListByServerPager +// method. +type ServerAzureADOnlyAuthenticationsClientListByServerOptions struct { + // placeholder for future optional parameters +} + +// ServerBlobAuditingPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the ServerBlobAuditingPoliciesClient.BeginCreateOrUpdate +// method. +type ServerBlobAuditingPoliciesClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ServerBlobAuditingPoliciesClientGetOptions contains the optional parameters for the ServerBlobAuditingPoliciesClient.Get +// method. +type ServerBlobAuditingPoliciesClientGetOptions struct { + // placeholder for future optional parameters +} + +// ServerBlobAuditingPoliciesClientListByServerOptions contains the optional parameters for the ServerBlobAuditingPoliciesClient.NewListByServerPager +// method. +type ServerBlobAuditingPoliciesClientListByServerOptions struct { + // placeholder for future optional parameters +} + +// ServerCommunicationLinksClientBeginCreateOrUpdateOptions contains the optional parameters for the ServerCommunicationLinksClient.BeginCreateOrUpdate +// method. +type ServerCommunicationLinksClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ServerCommunicationLinksClientDeleteOptions contains the optional parameters for the ServerCommunicationLinksClient.Delete +// method. +type ServerCommunicationLinksClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// ServerCommunicationLinksClientGetOptions contains the optional parameters for the ServerCommunicationLinksClient.Get method. +type ServerCommunicationLinksClientGetOptions struct { + // placeholder for future optional parameters +} + +// ServerCommunicationLinksClientListByServerOptions contains the optional parameters for the ServerCommunicationLinksClient.NewListByServerPager +// method. +type ServerCommunicationLinksClientListByServerOptions struct { + // placeholder for future optional parameters +} + +// ServerConnectionPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the ServerConnectionPoliciesClient.BeginCreateOrUpdate +// method. +type ServerConnectionPoliciesClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ServerConnectionPoliciesClientGetOptions contains the optional parameters for the ServerConnectionPoliciesClient.Get method. +type ServerConnectionPoliciesClientGetOptions struct { + // placeholder for future optional parameters +} + +// ServerConnectionPoliciesClientListByServerOptions contains the optional parameters for the ServerConnectionPoliciesClient.NewListByServerPager +// method. +type ServerConnectionPoliciesClientListByServerOptions struct { + // placeholder for future optional parameters +} + +// ServerDNSAliasesClientBeginAcquireOptions contains the optional parameters for the ServerDNSAliasesClient.BeginAcquire +// method. +type ServerDNSAliasesClientBeginAcquireOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ServerDNSAliasesClientBeginCreateOrUpdateOptions contains the optional parameters for the ServerDNSAliasesClient.BeginCreateOrUpdate +// method. +type ServerDNSAliasesClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ServerDNSAliasesClientBeginDeleteOptions contains the optional parameters for the ServerDNSAliasesClient.BeginDelete method. +type ServerDNSAliasesClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ServerDNSAliasesClientGetOptions contains the optional parameters for the ServerDNSAliasesClient.Get method. +type ServerDNSAliasesClientGetOptions struct { + // placeholder for future optional parameters +} + +// ServerDNSAliasesClientListByServerOptions contains the optional parameters for the ServerDNSAliasesClient.NewListByServerPager +// method. +type ServerDNSAliasesClientListByServerOptions struct { + // placeholder for future optional parameters +} + +// ServerDevOpsAuditSettingsClientBeginCreateOrUpdateOptions contains the optional parameters for the ServerDevOpsAuditSettingsClient.BeginCreateOrUpdate +// method. +type ServerDevOpsAuditSettingsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ServerDevOpsAuditSettingsClientGetOptions contains the optional parameters for the ServerDevOpsAuditSettingsClient.Get +// method. +type ServerDevOpsAuditSettingsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ServerDevOpsAuditSettingsClientListByServerOptions contains the optional parameters for the ServerDevOpsAuditSettingsClient.NewListByServerPager +// method. +type ServerDevOpsAuditSettingsClientListByServerOptions struct { + // placeholder for future optional parameters +} + +// ServerKeysClientBeginCreateOrUpdateOptions contains the optional parameters for the ServerKeysClient.BeginCreateOrUpdate +// method. +type ServerKeysClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ServerKeysClientBeginDeleteOptions contains the optional parameters for the ServerKeysClient.BeginDelete method. +type ServerKeysClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ServerKeysClientGetOptions contains the optional parameters for the ServerKeysClient.Get method. +type ServerKeysClientGetOptions struct { + // placeholder for future optional parameters +} + +// ServerKeysClientListByServerOptions contains the optional parameters for the ServerKeysClient.NewListByServerPager method. +type ServerKeysClientListByServerOptions struct { + // placeholder for future optional parameters +} + +// ServerOperationsClientListByServerOptions contains the optional parameters for the ServerOperationsClient.NewListByServerPager +// method. +type ServerOperationsClientListByServerOptions struct { + // placeholder for future optional parameters +} + +// ServerSecurityAlertPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the ServerSecurityAlertPoliciesClient.BeginCreateOrUpdate +// method. +type ServerSecurityAlertPoliciesClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ServerSecurityAlertPoliciesClientGetOptions contains the optional parameters for the ServerSecurityAlertPoliciesClient.Get +// method. +type ServerSecurityAlertPoliciesClientGetOptions struct { + // placeholder for future optional parameters +} + +// ServerSecurityAlertPoliciesClientListByServerOptions contains the optional parameters for the ServerSecurityAlertPoliciesClient.NewListByServerPager +// method. +type ServerSecurityAlertPoliciesClientListByServerOptions struct { + // placeholder for future optional parameters +} + +// ServerTrustCertificatesClientBeginCreateOrUpdateOptions contains the optional parameters for the ServerTrustCertificatesClient.BeginCreateOrUpdate +// method. +type ServerTrustCertificatesClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ServerTrustCertificatesClientBeginDeleteOptions contains the optional parameters for the ServerTrustCertificatesClient.BeginDelete +// method. +type ServerTrustCertificatesClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ServerTrustCertificatesClientGetOptions contains the optional parameters for the ServerTrustCertificatesClient.Get method. +type ServerTrustCertificatesClientGetOptions struct { + // placeholder for future optional parameters +} + +// ServerTrustCertificatesClientListByInstanceOptions contains the optional parameters for the ServerTrustCertificatesClient.NewListByInstancePager +// method. +type ServerTrustCertificatesClientListByInstanceOptions struct { + // placeholder for future optional parameters +} + +// ServerTrustGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the ServerTrustGroupsClient.BeginCreateOrUpdate +// method. +type ServerTrustGroupsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ServerTrustGroupsClientBeginDeleteOptions contains the optional parameters for the ServerTrustGroupsClient.BeginDelete +// method. +type ServerTrustGroupsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ServerTrustGroupsClientGetOptions contains the optional parameters for the ServerTrustGroupsClient.Get method. +type ServerTrustGroupsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ServerTrustGroupsClientListByInstanceOptions contains the optional parameters for the ServerTrustGroupsClient.NewListByInstancePager +// method. +type ServerTrustGroupsClientListByInstanceOptions struct { + // placeholder for future optional parameters +} + +// ServerTrustGroupsClientListByLocationOptions contains the optional parameters for the ServerTrustGroupsClient.NewListByLocationPager +// method. +type ServerTrustGroupsClientListByLocationOptions struct { + // placeholder for future optional parameters +} + +// ServerUsagesClientListByServerOptions contains the optional parameters for the ServerUsagesClient.NewListByServerPager +// method. +type ServerUsagesClientListByServerOptions struct { + // placeholder for future optional parameters +} + +// ServerVulnerabilityAssessmentsClientCreateOrUpdateOptions contains the optional parameters for the ServerVulnerabilityAssessmentsClient.CreateOrUpdate +// method. +type ServerVulnerabilityAssessmentsClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// ServerVulnerabilityAssessmentsClientDeleteOptions contains the optional parameters for the ServerVulnerabilityAssessmentsClient.Delete +// method. +type ServerVulnerabilityAssessmentsClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// ServerVulnerabilityAssessmentsClientGetOptions contains the optional parameters for the ServerVulnerabilityAssessmentsClient.Get +// method. +type ServerVulnerabilityAssessmentsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ServerVulnerabilityAssessmentsClientListByServerOptions contains the optional parameters for the ServerVulnerabilityAssessmentsClient.NewListByServerPager +// method. +type ServerVulnerabilityAssessmentsClientListByServerOptions struct { + // placeholder for future optional parameters +} + +// ServersClientBeginCreateOrUpdateOptions contains the optional parameters for the ServersClient.BeginCreateOrUpdate method. +type ServersClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ServersClientBeginDeleteOptions contains the optional parameters for the ServersClient.BeginDelete method. +type ServersClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ServersClientBeginImportDatabaseOptions contains the optional parameters for the ServersClient.BeginImportDatabase method. +type ServersClientBeginImportDatabaseOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ServersClientBeginUpdateOptions contains the optional parameters for the ServersClient.BeginUpdate method. +type ServersClientBeginUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ServersClientCheckNameAvailabilityOptions contains the optional parameters for the ServersClient.CheckNameAvailability +// method. +type ServersClientCheckNameAvailabilityOptions struct { + // placeholder for future optional parameters +} + +// ServersClientGetOptions contains the optional parameters for the ServersClient.Get method. +type ServersClientGetOptions struct { + // The child resources to include in the response. + Expand *string +} + +// ServersClientListByResourceGroupOptions contains the optional parameters for the ServersClient.NewListByResourceGroupPager +// method. +type ServersClientListByResourceGroupOptions struct { + // The child resources to include in the response. + Expand *string +} + +// ServersClientListOptions contains the optional parameters for the ServersClient.NewListPager method. +type ServersClientListOptions struct { + // The child resources to include in the response. + Expand *string +} + +// ServiceObjectivesClientGetOptions contains the optional parameters for the ServiceObjectivesClient.Get method. +type ServiceObjectivesClientGetOptions struct { + // placeholder for future optional parameters +} + +// ServiceObjectivesClientListByServerOptions contains the optional parameters for the ServiceObjectivesClient.NewListByServerPager +// method. +type ServiceObjectivesClientListByServerOptions struct { + // placeholder for future optional parameters +} + +// SubscriptionUsagesClientGetOptions contains the optional parameters for the SubscriptionUsagesClient.Get method. +type SubscriptionUsagesClientGetOptions struct { + // placeholder for future optional parameters +} + +// SubscriptionUsagesClientListByLocationOptions contains the optional parameters for the SubscriptionUsagesClient.NewListByLocationPager +// method. +type SubscriptionUsagesClientListByLocationOptions struct { + // placeholder for future optional parameters +} + +// SyncAgentsClientBeginCreateOrUpdateOptions contains the optional parameters for the SyncAgentsClient.BeginCreateOrUpdate +// method. +type SyncAgentsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// SyncAgentsClientBeginDeleteOptions contains the optional parameters for the SyncAgentsClient.BeginDelete method. +type SyncAgentsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// SyncAgentsClientGenerateKeyOptions contains the optional parameters for the SyncAgentsClient.GenerateKey method. +type SyncAgentsClientGenerateKeyOptions struct { + // placeholder for future optional parameters +} + +// SyncAgentsClientGetOptions contains the optional parameters for the SyncAgentsClient.Get method. +type SyncAgentsClientGetOptions struct { + // placeholder for future optional parameters +} + +// SyncAgentsClientListByServerOptions contains the optional parameters for the SyncAgentsClient.NewListByServerPager method. +type SyncAgentsClientListByServerOptions struct { + // placeholder for future optional parameters +} + +// SyncAgentsClientListLinkedDatabasesOptions contains the optional parameters for the SyncAgentsClient.NewListLinkedDatabasesPager +// method. +type SyncAgentsClientListLinkedDatabasesOptions struct { + // placeholder for future optional parameters +} + +// SyncGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the SyncGroupsClient.BeginCreateOrUpdate +// method. +type SyncGroupsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// SyncGroupsClientBeginDeleteOptions contains the optional parameters for the SyncGroupsClient.BeginDelete method. +type SyncGroupsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// SyncGroupsClientBeginRefreshHubSchemaOptions contains the optional parameters for the SyncGroupsClient.BeginRefreshHubSchema +// method. +type SyncGroupsClientBeginRefreshHubSchemaOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// SyncGroupsClientBeginUpdateOptions contains the optional parameters for the SyncGroupsClient.BeginUpdate method. +type SyncGroupsClientBeginUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// SyncGroupsClientCancelSyncOptions contains the optional parameters for the SyncGroupsClient.CancelSync method. +type SyncGroupsClientCancelSyncOptions struct { + // placeholder for future optional parameters +} + +// SyncGroupsClientGetOptions contains the optional parameters for the SyncGroupsClient.Get method. +type SyncGroupsClientGetOptions struct { + // placeholder for future optional parameters +} + +// SyncGroupsClientListByDatabaseOptions contains the optional parameters for the SyncGroupsClient.NewListByDatabasePager +// method. +type SyncGroupsClientListByDatabaseOptions struct { + // placeholder for future optional parameters +} + +// SyncGroupsClientListHubSchemasOptions contains the optional parameters for the SyncGroupsClient.NewListHubSchemasPager +// method. +type SyncGroupsClientListHubSchemasOptions struct { + // placeholder for future optional parameters +} + +// SyncGroupsClientListLogsOptions contains the optional parameters for the SyncGroupsClient.NewListLogsPager method. +type SyncGroupsClientListLogsOptions struct { + // The continuation token for this operation. + ContinuationToken *string +} + +// SyncGroupsClientListSyncDatabaseIDsOptions contains the optional parameters for the SyncGroupsClient.NewListSyncDatabaseIDsPager +// method. +type SyncGroupsClientListSyncDatabaseIDsOptions struct { + // placeholder for future optional parameters +} + +// SyncGroupsClientTriggerSyncOptions contains the optional parameters for the SyncGroupsClient.TriggerSync method. +type SyncGroupsClientTriggerSyncOptions struct { + // placeholder for future optional parameters +} + +// SyncMembersClientBeginCreateOrUpdateOptions contains the optional parameters for the SyncMembersClient.BeginCreateOrUpdate +// method. +type SyncMembersClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// SyncMembersClientBeginDeleteOptions contains the optional parameters for the SyncMembersClient.BeginDelete method. +type SyncMembersClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// SyncMembersClientBeginRefreshMemberSchemaOptions contains the optional parameters for the SyncMembersClient.BeginRefreshMemberSchema +// method. +type SyncMembersClientBeginRefreshMemberSchemaOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// SyncMembersClientBeginUpdateOptions contains the optional parameters for the SyncMembersClient.BeginUpdate method. +type SyncMembersClientBeginUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// SyncMembersClientGetOptions contains the optional parameters for the SyncMembersClient.Get method. +type SyncMembersClientGetOptions struct { + // placeholder for future optional parameters +} + +// SyncMembersClientListBySyncGroupOptions contains the optional parameters for the SyncMembersClient.NewListBySyncGroupPager +// method. +type SyncMembersClientListBySyncGroupOptions struct { + // placeholder for future optional parameters +} + +// SyncMembersClientListMemberSchemasOptions contains the optional parameters for the SyncMembersClient.NewListMemberSchemasPager +// method. +type SyncMembersClientListMemberSchemasOptions struct { + // placeholder for future optional parameters +} + +// TdeCertificatesClientBeginCreateOptions contains the optional parameters for the TdeCertificatesClient.BeginCreate method. +type TdeCertificatesClientBeginCreateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// TimeZonesClientGetOptions contains the optional parameters for the TimeZonesClient.Get method. +type TimeZonesClientGetOptions struct { + // placeholder for future optional parameters +} + +// TimeZonesClientListByLocationOptions contains the optional parameters for the TimeZonesClient.NewListByLocationPager method. +type TimeZonesClientListByLocationOptions struct { + // placeholder for future optional parameters +} + +// TransparentDataEncryptionsClientCreateOrUpdateOptions contains the optional parameters for the TransparentDataEncryptionsClient.CreateOrUpdate +// method. +type TransparentDataEncryptionsClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// TransparentDataEncryptionsClientGetOptions contains the optional parameters for the TransparentDataEncryptionsClient.Get +// method. +type TransparentDataEncryptionsClientGetOptions struct { + // placeholder for future optional parameters +} + +// TransparentDataEncryptionsClientListByDatabaseOptions contains the optional parameters for the TransparentDataEncryptionsClient.NewListByDatabasePager +// method. +type TransparentDataEncryptionsClientListByDatabaseOptions struct { + // placeholder for future optional parameters +} + +// UsagesClientListByInstancePoolOptions contains the optional parameters for the UsagesClient.NewListByInstancePoolPager +// method. +type UsagesClientListByInstancePoolOptions struct { + // Optional request parameter to include managed instance usages within the instance pool. + ExpandChildren *bool +} + +// VirtualClustersClientBeginDeleteOptions contains the optional parameters for the VirtualClustersClient.BeginDelete method. +type VirtualClustersClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualClustersClientBeginUpdateOptions contains the optional parameters for the VirtualClustersClient.BeginUpdate method. +type VirtualClustersClientBeginUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualClustersClientGetOptions contains the optional parameters for the VirtualClustersClient.Get method. +type VirtualClustersClientGetOptions struct { + // placeholder for future optional parameters +} + +// VirtualClustersClientListByResourceGroupOptions contains the optional parameters for the VirtualClustersClient.NewListByResourceGroupPager +// method. +type VirtualClustersClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// VirtualClustersClientListOptions contains the optional parameters for the VirtualClustersClient.NewListPager method. +type VirtualClustersClientListOptions struct { + // placeholder for future optional parameters +} + +// VirtualClustersClientUpdateDNSServersOptions contains the optional parameters for the VirtualClustersClient.UpdateDNSServers +// method. +type VirtualClustersClientUpdateDNSServersOptions struct { + // placeholder for future optional parameters +} + +// VirtualNetworkRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualNetworkRulesClient.BeginCreateOrUpdate +// method. +type VirtualNetworkRulesClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualNetworkRulesClientBeginDeleteOptions contains the optional parameters for the VirtualNetworkRulesClient.BeginDelete +// method. +type VirtualNetworkRulesClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualNetworkRulesClientGetOptions contains the optional parameters for the VirtualNetworkRulesClient.Get method. +type VirtualNetworkRulesClientGetOptions struct { + // placeholder for future optional parameters +} + +// VirtualNetworkRulesClientListByServerOptions contains the optional parameters for the VirtualNetworkRulesClient.NewListByServerPager +// method. +type VirtualNetworkRulesClientListByServerOptions struct { + // placeholder for future optional parameters +} + +// WorkloadClassifiersClientBeginCreateOrUpdateOptions contains the optional parameters for the WorkloadClassifiersClient.BeginCreateOrUpdate +// method. +type WorkloadClassifiersClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WorkloadClassifiersClientBeginDeleteOptions contains the optional parameters for the WorkloadClassifiersClient.BeginDelete +// method. +type WorkloadClassifiersClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WorkloadClassifiersClientGetOptions contains the optional parameters for the WorkloadClassifiersClient.Get method. +type WorkloadClassifiersClientGetOptions struct { + // placeholder for future optional parameters +} + +// WorkloadClassifiersClientListByWorkloadGroupOptions contains the optional parameters for the WorkloadClassifiersClient.NewListByWorkloadGroupPager +// method. +type WorkloadClassifiersClientListByWorkloadGroupOptions struct { + // placeholder for future optional parameters +} + +// WorkloadGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the WorkloadGroupsClient.BeginCreateOrUpdate +// method. +type WorkloadGroupsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WorkloadGroupsClientBeginDeleteOptions contains the optional parameters for the WorkloadGroupsClient.BeginDelete method. +type WorkloadGroupsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WorkloadGroupsClientGetOptions contains the optional parameters for the WorkloadGroupsClient.Get method. +type WorkloadGroupsClientGetOptions struct { + // placeholder for future optional parameters +} + +// WorkloadGroupsClientListByDatabaseOptions contains the optional parameters for the WorkloadGroupsClient.NewListByDatabasePager +// method. +type WorkloadGroupsClientListByDatabaseOptions struct { + // placeholder for future optional parameters +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/outboundfirewallrules_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/outboundfirewallrules_client.go new file mode 100644 index 000000000..15800e9d2 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/outboundfirewallrules_client.go @@ -0,0 +1,344 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// OutboundFirewallRulesClient contains the methods for the OutboundFirewallRules group. +// Don't use this type directly, use NewOutboundFirewallRulesClient() instead. +type OutboundFirewallRulesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewOutboundFirewallRulesClient creates a new instance of OutboundFirewallRulesClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewOutboundFirewallRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*OutboundFirewallRulesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &OutboundFirewallRulesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Create a outbound firewall rule with a given name. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-02-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - options - OutboundFirewallRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the OutboundFirewallRulesClient.BeginCreateOrUpdate +// method. +func (client *OutboundFirewallRulesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, outboundRuleFqdn string, parameters OutboundFirewallRule, options *OutboundFirewallRulesClientBeginCreateOrUpdateOptions) (*runtime.Poller[OutboundFirewallRulesClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, serverName, outboundRuleFqdn, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[OutboundFirewallRulesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[OutboundFirewallRulesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Create a outbound firewall rule with a given name. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-02-01-preview +func (client *OutboundFirewallRulesClient) createOrUpdate(ctx context.Context, resourceGroupName string, serverName string, outboundRuleFqdn string, parameters OutboundFirewallRule, options *OutboundFirewallRulesClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "OutboundFirewallRulesClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serverName, outboundRuleFqdn, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *OutboundFirewallRulesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serverName string, outboundRuleFqdn string, parameters OutboundFirewallRule, options *OutboundFirewallRulesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/outboundFirewallRules/{outboundRuleFqdn}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if outboundRuleFqdn == "" { + return nil, errors.New("parameter outboundRuleFqdn cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{outboundRuleFqdn}", url.PathEscape(outboundRuleFqdn)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-02-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes a outbound firewall rule with a given name. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-02-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - options - OutboundFirewallRulesClientBeginDeleteOptions contains the optional parameters for the OutboundFirewallRulesClient.BeginDelete +// method. +func (client *OutboundFirewallRulesClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, outboundRuleFqdn string, options *OutboundFirewallRulesClientBeginDeleteOptions) (*runtime.Poller[OutboundFirewallRulesClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, serverName, outboundRuleFqdn, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[OutboundFirewallRulesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[OutboundFirewallRulesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes a outbound firewall rule with a given name. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-02-01-preview +func (client *OutboundFirewallRulesClient) deleteOperation(ctx context.Context, resourceGroupName string, serverName string, outboundRuleFqdn string, options *OutboundFirewallRulesClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "OutboundFirewallRulesClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serverName, outboundRuleFqdn, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *OutboundFirewallRulesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serverName string, outboundRuleFqdn string, options *OutboundFirewallRulesClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/outboundFirewallRules/{outboundRuleFqdn}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if outboundRuleFqdn == "" { + return nil, errors.New("parameter outboundRuleFqdn cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{outboundRuleFqdn}", url.PathEscape(outboundRuleFqdn)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-02-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + return req, nil +} + +// Get - Gets an outbound firewall rule. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-02-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - options - OutboundFirewallRulesClientGetOptions contains the optional parameters for the OutboundFirewallRulesClient.Get +// method. +func (client *OutboundFirewallRulesClient) Get(ctx context.Context, resourceGroupName string, serverName string, outboundRuleFqdn string, options *OutboundFirewallRulesClientGetOptions) (OutboundFirewallRulesClientGetResponse, error) { + var err error + const operationName = "OutboundFirewallRulesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serverName, outboundRuleFqdn, options) + if err != nil { + return OutboundFirewallRulesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return OutboundFirewallRulesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return OutboundFirewallRulesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *OutboundFirewallRulesClient) getCreateRequest(ctx context.Context, resourceGroupName string, serverName string, outboundRuleFqdn string, options *OutboundFirewallRulesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/outboundFirewallRules/{outboundRuleFqdn}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if outboundRuleFqdn == "" { + return nil, errors.New("parameter outboundRuleFqdn cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{outboundRuleFqdn}", url.PathEscape(outboundRuleFqdn)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-02-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *OutboundFirewallRulesClient) getHandleResponse(resp *http.Response) (OutboundFirewallRulesClientGetResponse, error) { + result := OutboundFirewallRulesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.OutboundFirewallRule); err != nil { + return OutboundFirewallRulesClientGetResponse{}, err + } + return result, nil +} + +// NewListByServerPager - Gets all outbound firewall rules on a server. +// +// Generated from API version 2021-02-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - options - OutboundFirewallRulesClientListByServerOptions contains the optional parameters for the OutboundFirewallRulesClient.NewListByServerPager +// method. +func (client *OutboundFirewallRulesClient) NewListByServerPager(resourceGroupName string, serverName string, options *OutboundFirewallRulesClientListByServerOptions) *runtime.Pager[OutboundFirewallRulesClientListByServerResponse] { + return runtime.NewPager(runtime.PagingHandler[OutboundFirewallRulesClientListByServerResponse]{ + More: func(page OutboundFirewallRulesClientListByServerResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *OutboundFirewallRulesClientListByServerResponse) (OutboundFirewallRulesClientListByServerResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "OutboundFirewallRulesClient.NewListByServerPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByServerCreateRequest(ctx, resourceGroupName, serverName, options) + }, nil) + if err != nil { + return OutboundFirewallRulesClientListByServerResponse{}, err + } + return client.listByServerHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByServerCreateRequest creates the ListByServer request. +func (client *OutboundFirewallRulesClient) listByServerCreateRequest(ctx context.Context, resourceGroupName string, serverName string, options *OutboundFirewallRulesClientListByServerOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/outboundFirewallRules" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-02-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByServerHandleResponse handles the ListByServer response. +func (client *OutboundFirewallRulesClient) listByServerHandleResponse(resp *http.Response) (OutboundFirewallRulesClientListByServerResponse, error) { + result := OutboundFirewallRulesClientListByServerResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.OutboundFirewallRuleListResult); err != nil { + return OutboundFirewallRulesClientListByServerResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/privateendpointconnections_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/privateendpointconnections_client.go new file mode 100644 index 000000000..ba2316d9d --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/privateendpointconnections_client.go @@ -0,0 +1,345 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// PrivateEndpointConnectionsClient contains the methods for the PrivateEndpointConnections group. +// Don't use this type directly, use NewPrivateEndpointConnectionsClient() instead. +type PrivateEndpointConnectionsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewPrivateEndpointConnectionsClient creates a new instance of PrivateEndpointConnectionsClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewPrivateEndpointConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateEndpointConnectionsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &PrivateEndpointConnectionsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Approve or reject a private endpoint connection with a given name. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - options - PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginCreateOrUpdate +// method. +func (client *PrivateEndpointConnectionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, privateEndpointConnectionName string, parameters PrivateEndpointConnection, options *PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[PrivateEndpointConnectionsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, serverName, privateEndpointConnectionName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PrivateEndpointConnectionsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[PrivateEndpointConnectionsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Approve or reject a private endpoint connection with a given name. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +func (client *PrivateEndpointConnectionsClient) createOrUpdate(ctx context.Context, resourceGroupName string, serverName string, privateEndpointConnectionName string, parameters PrivateEndpointConnection, options *PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "PrivateEndpointConnectionsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serverName, privateEndpointConnectionName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *PrivateEndpointConnectionsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serverName string, privateEndpointConnectionName string, parameters PrivateEndpointConnection, options *PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if privateEndpointConnectionName == "" { + return nil, errors.New("parameter privateEndpointConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{privateEndpointConnectionName}", url.PathEscape(privateEndpointConnectionName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes a private endpoint connection with a given name. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - options - PrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginDelete +// method. +func (client *PrivateEndpointConnectionsClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientBeginDeleteOptions) (*runtime.Poller[PrivateEndpointConnectionsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, serverName, privateEndpointConnectionName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PrivateEndpointConnectionsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[PrivateEndpointConnectionsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes a private endpoint connection with a given name. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +func (client *PrivateEndpointConnectionsClient) deleteOperation(ctx context.Context, resourceGroupName string, serverName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "PrivateEndpointConnectionsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serverName, privateEndpointConnectionName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *PrivateEndpointConnectionsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serverName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if privateEndpointConnectionName == "" { + return nil, errors.New("parameter privateEndpointConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{privateEndpointConnectionName}", url.PathEscape(privateEndpointConnectionName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + return req, nil +} + +// Get - Gets a private endpoint connection. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - privateEndpointConnectionName - The name of the private endpoint connection. +// - options - PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get +// method. +func (client *PrivateEndpointConnectionsClient) Get(ctx context.Context, resourceGroupName string, serverName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientGetOptions) (PrivateEndpointConnectionsClientGetResponse, error) { + var err error + const operationName = "PrivateEndpointConnectionsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serverName, privateEndpointConnectionName, options) + if err != nil { + return PrivateEndpointConnectionsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return PrivateEndpointConnectionsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PrivateEndpointConnectionsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *PrivateEndpointConnectionsClient) getCreateRequest(ctx context.Context, resourceGroupName string, serverName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if privateEndpointConnectionName == "" { + return nil, errors.New("parameter privateEndpointConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{privateEndpointConnectionName}", url.PathEscape(privateEndpointConnectionName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *PrivateEndpointConnectionsClient) getHandleResponse(resp *http.Response) (PrivateEndpointConnectionsClientGetResponse, error) { + result := PrivateEndpointConnectionsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PrivateEndpointConnection); err != nil { + return PrivateEndpointConnectionsClientGetResponse{}, err + } + return result, nil +} + +// NewListByServerPager - Gets all private endpoint connections on a server. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - options - PrivateEndpointConnectionsClientListByServerOptions contains the optional parameters for the PrivateEndpointConnectionsClient.NewListByServerPager +// method. +func (client *PrivateEndpointConnectionsClient) NewListByServerPager(resourceGroupName string, serverName string, options *PrivateEndpointConnectionsClientListByServerOptions) *runtime.Pager[PrivateEndpointConnectionsClientListByServerResponse] { + return runtime.NewPager(runtime.PagingHandler[PrivateEndpointConnectionsClientListByServerResponse]{ + More: func(page PrivateEndpointConnectionsClientListByServerResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *PrivateEndpointConnectionsClientListByServerResponse) (PrivateEndpointConnectionsClientListByServerResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "PrivateEndpointConnectionsClient.NewListByServerPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByServerCreateRequest(ctx, resourceGroupName, serverName, options) + }, nil) + if err != nil { + return PrivateEndpointConnectionsClientListByServerResponse{}, err + } + return client.listByServerHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByServerCreateRequest creates the ListByServer request. +func (client *PrivateEndpointConnectionsClient) listByServerCreateRequest(ctx context.Context, resourceGroupName string, serverName string, options *PrivateEndpointConnectionsClientListByServerOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/privateEndpointConnections" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByServerHandleResponse handles the ListByServer response. +func (client *PrivateEndpointConnectionsClient) listByServerHandleResponse(resp *http.Response) (PrivateEndpointConnectionsClientListByServerResponse, error) { + result := PrivateEndpointConnectionsClientListByServerResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PrivateEndpointConnectionListResult); err != nil { + return PrivateEndpointConnectionsClientListByServerResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/privatelinkresources_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/privatelinkresources_client.go new file mode 100644 index 000000000..4810b0dde --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/privatelinkresources_client.go @@ -0,0 +1,181 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// PrivateLinkResourcesClient contains the methods for the PrivateLinkResources group. +// Don't use this type directly, use NewPrivateLinkResourcesClient() instead. +type PrivateLinkResourcesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewPrivateLinkResourcesClient creates a new instance of PrivateLinkResourcesClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewPrivateLinkResourcesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateLinkResourcesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &PrivateLinkResourcesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Gets a private link resource for SQL server. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - groupName - The name of the private link resource. +// - options - PrivateLinkResourcesClientGetOptions contains the optional parameters for the PrivateLinkResourcesClient.Get +// method. +func (client *PrivateLinkResourcesClient) Get(ctx context.Context, resourceGroupName string, serverName string, groupName string, options *PrivateLinkResourcesClientGetOptions) (PrivateLinkResourcesClientGetResponse, error) { + var err error + const operationName = "PrivateLinkResourcesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serverName, groupName, options) + if err != nil { + return PrivateLinkResourcesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return PrivateLinkResourcesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PrivateLinkResourcesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *PrivateLinkResourcesClient) getCreateRequest(ctx context.Context, resourceGroupName string, serverName string, groupName string, options *PrivateLinkResourcesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/privateLinkResources/{groupName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if groupName == "" { + return nil, errors.New("parameter groupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{groupName}", url.PathEscape(groupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *PrivateLinkResourcesClient) getHandleResponse(resp *http.Response) (PrivateLinkResourcesClientGetResponse, error) { + result := PrivateLinkResourcesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PrivateLinkResource); err != nil { + return PrivateLinkResourcesClientGetResponse{}, err + } + return result, nil +} + +// NewListByServerPager - Gets the private link resources for SQL server. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - options - PrivateLinkResourcesClientListByServerOptions contains the optional parameters for the PrivateLinkResourcesClient.NewListByServerPager +// method. +func (client *PrivateLinkResourcesClient) NewListByServerPager(resourceGroupName string, serverName string, options *PrivateLinkResourcesClientListByServerOptions) *runtime.Pager[PrivateLinkResourcesClientListByServerResponse] { + return runtime.NewPager(runtime.PagingHandler[PrivateLinkResourcesClientListByServerResponse]{ + More: func(page PrivateLinkResourcesClientListByServerResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *PrivateLinkResourcesClientListByServerResponse) (PrivateLinkResourcesClientListByServerResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "PrivateLinkResourcesClient.NewListByServerPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByServerCreateRequest(ctx, resourceGroupName, serverName, options) + }, nil) + if err != nil { + return PrivateLinkResourcesClientListByServerResponse{}, err + } + return client.listByServerHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByServerCreateRequest creates the ListByServer request. +func (client *PrivateLinkResourcesClient) listByServerCreateRequest(ctx context.Context, resourceGroupName string, serverName string, options *PrivateLinkResourcesClientListByServerOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/privateLinkResources" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByServerHandleResponse handles the ListByServer response. +func (client *PrivateLinkResourcesClient) listByServerHandleResponse(resp *http.Response) (PrivateLinkResourcesClientListByServerResponse, error) { + result := PrivateLinkResourcesClientListByServerResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PrivateLinkResourceListResult); err != nil { + return PrivateLinkResourcesClientListByServerResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/recommendedsensitivitylabels_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/recommendedsensitivitylabels_client.go new file mode 100644 index 000000000..71cf31925 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/recommendedsensitivitylabels_client.go @@ -0,0 +1,107 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// RecommendedSensitivityLabelsClient contains the methods for the RecommendedSensitivityLabels group. +// Don't use this type directly, use NewRecommendedSensitivityLabelsClient() instead. +type RecommendedSensitivityLabelsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewRecommendedSensitivityLabelsClient creates a new instance of RecommendedSensitivityLabelsClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewRecommendedSensitivityLabelsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RecommendedSensitivityLabelsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &RecommendedSensitivityLabelsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Update - Update recommended sensitivity labels states of a given database using an operations batch. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database. +// - options - RecommendedSensitivityLabelsClientUpdateOptions contains the optional parameters for the RecommendedSensitivityLabelsClient.Update +// method. +func (client *RecommendedSensitivityLabelsClient) Update(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters RecommendedSensitivityLabelUpdateList, options *RecommendedSensitivityLabelsClientUpdateOptions) (RecommendedSensitivityLabelsClientUpdateResponse, error) { + var err error + const operationName = "RecommendedSensitivityLabelsClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, serverName, databaseName, parameters, options) + if err != nil { + return RecommendedSensitivityLabelsClientUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return RecommendedSensitivityLabelsClientUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return RecommendedSensitivityLabelsClientUpdateResponse{}, err + } + return RecommendedSensitivityLabelsClientUpdateResponse{}, nil +} + +// updateCreateRequest creates the Update request. +func (client *RecommendedSensitivityLabelsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters RecommendedSensitivityLabelUpdateList, options *RecommendedSensitivityLabelsClientUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/recommendedSensitivityLabels" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/recoverabledatabases_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/recoverabledatabases_client.go new file mode 100644 index 000000000..c43db46a5 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/recoverabledatabases_client.go @@ -0,0 +1,182 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// RecoverableDatabasesClient contains the methods for the RecoverableDatabases group. +// Don't use this type directly, use NewRecoverableDatabasesClient() instead. +type RecoverableDatabasesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewRecoverableDatabasesClient creates a new instance of RecoverableDatabasesClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewRecoverableDatabasesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RecoverableDatabasesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &RecoverableDatabasesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Gets a recoverable database, which is a resource representing a database's geo backup +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2014-04-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database +// - options - RecoverableDatabasesClientGetOptions contains the optional parameters for the RecoverableDatabasesClient.Get +// method. +func (client *RecoverableDatabasesClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, options *RecoverableDatabasesClientGetOptions) (RecoverableDatabasesClientGetResponse, error) { + var err error + const operationName = "RecoverableDatabasesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serverName, databaseName, options) + if err != nil { + return RecoverableDatabasesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return RecoverableDatabasesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return RecoverableDatabasesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *RecoverableDatabasesClient) getCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, options *RecoverableDatabasesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/recoverableDatabases/{databaseName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2014-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *RecoverableDatabasesClient) getHandleResponse(resp *http.Response) (RecoverableDatabasesClientGetResponse, error) { + result := RecoverableDatabasesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RecoverableDatabase); err != nil { + return RecoverableDatabasesClientGetResponse{}, err + } + return result, nil +} + +// NewListByServerPager - Gets a list of recoverable databases +// +// Generated from API version 2014-04-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - options - RecoverableDatabasesClientListByServerOptions contains the optional parameters for the RecoverableDatabasesClient.NewListByServerPager +// method. +func (client *RecoverableDatabasesClient) NewListByServerPager(resourceGroupName string, serverName string, options *RecoverableDatabasesClientListByServerOptions) *runtime.Pager[RecoverableDatabasesClientListByServerResponse] { + return runtime.NewPager(runtime.PagingHandler[RecoverableDatabasesClientListByServerResponse]{ + More: func(page RecoverableDatabasesClientListByServerResponse) bool { + return false + }, + Fetcher: func(ctx context.Context, page *RecoverableDatabasesClientListByServerResponse) (RecoverableDatabasesClientListByServerResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "RecoverableDatabasesClient.NewListByServerPager") + req, err := client.listByServerCreateRequest(ctx, resourceGroupName, serverName, options) + if err != nil { + return RecoverableDatabasesClientListByServerResponse{}, err + } + resp, err := client.internal.Pipeline().Do(req) + if err != nil { + return RecoverableDatabasesClientListByServerResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return RecoverableDatabasesClientListByServerResponse{}, runtime.NewResponseError(resp) + } + return client.listByServerHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByServerCreateRequest creates the ListByServer request. +func (client *RecoverableDatabasesClient) listByServerCreateRequest(ctx context.Context, resourceGroupName string, serverName string, options *RecoverableDatabasesClientListByServerOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/recoverableDatabases" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2014-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByServerHandleResponse handles the ListByServer response. +func (client *RecoverableDatabasesClient) listByServerHandleResponse(resp *http.Response) (RecoverableDatabasesClientListByServerResponse, error) { + result := RecoverableDatabasesClientListByServerResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RecoverableDatabaseListResult); err != nil { + return RecoverableDatabasesClientListByServerResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/recoverablemanageddatabases_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/recoverablemanageddatabases_client.go new file mode 100644 index 000000000..83dd3eaa5 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/recoverablemanageddatabases_client.go @@ -0,0 +1,180 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// RecoverableManagedDatabasesClient contains the methods for the RecoverableManagedDatabases group. +// Don't use this type directly, use NewRecoverableManagedDatabasesClient() instead. +type RecoverableManagedDatabasesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewRecoverableManagedDatabasesClient creates a new instance of RecoverableManagedDatabasesClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewRecoverableManagedDatabasesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RecoverableManagedDatabasesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &RecoverableManagedDatabasesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Gets a recoverable managed database. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - options - RecoverableManagedDatabasesClientGetOptions contains the optional parameters for the RecoverableManagedDatabasesClient.Get +// method. +func (client *RecoverableManagedDatabasesClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, recoverableDatabaseName string, options *RecoverableManagedDatabasesClientGetOptions) (RecoverableManagedDatabasesClientGetResponse, error) { + var err error + const operationName = "RecoverableManagedDatabasesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, managedInstanceName, recoverableDatabaseName, options) + if err != nil { + return RecoverableManagedDatabasesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return RecoverableManagedDatabasesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return RecoverableManagedDatabasesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *RecoverableManagedDatabasesClient) getCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, recoverableDatabaseName string, options *RecoverableManagedDatabasesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/recoverableDatabases/{recoverableDatabaseName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if recoverableDatabaseName == "" { + return nil, errors.New("parameter recoverableDatabaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{recoverableDatabaseName}", url.PathEscape(recoverableDatabaseName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *RecoverableManagedDatabasesClient) getHandleResponse(resp *http.Response) (RecoverableManagedDatabasesClientGetResponse, error) { + result := RecoverableManagedDatabasesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RecoverableManagedDatabase); err != nil { + return RecoverableManagedDatabasesClientGetResponse{}, err + } + return result, nil +} + +// NewListByInstancePager - Gets a list of recoverable managed databases. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - options - RecoverableManagedDatabasesClientListByInstanceOptions contains the optional parameters for the RecoverableManagedDatabasesClient.NewListByInstancePager +// method. +func (client *RecoverableManagedDatabasesClient) NewListByInstancePager(resourceGroupName string, managedInstanceName string, options *RecoverableManagedDatabasesClientListByInstanceOptions) *runtime.Pager[RecoverableManagedDatabasesClientListByInstanceResponse] { + return runtime.NewPager(runtime.PagingHandler[RecoverableManagedDatabasesClientListByInstanceResponse]{ + More: func(page RecoverableManagedDatabasesClientListByInstanceResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *RecoverableManagedDatabasesClientListByInstanceResponse) (RecoverableManagedDatabasesClientListByInstanceResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "RecoverableManagedDatabasesClient.NewListByInstancePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByInstanceCreateRequest(ctx, resourceGroupName, managedInstanceName, options) + }, nil) + if err != nil { + return RecoverableManagedDatabasesClientListByInstanceResponse{}, err + } + return client.listByInstanceHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByInstanceCreateRequest creates the ListByInstance request. +func (client *RecoverableManagedDatabasesClient) listByInstanceCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, options *RecoverableManagedDatabasesClientListByInstanceOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/recoverableDatabases" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByInstanceHandleResponse handles the ListByInstance response. +func (client *RecoverableManagedDatabasesClient) listByInstanceHandleResponse(resp *http.Response) (RecoverableManagedDatabasesClientListByInstanceResponse, error) { + result := RecoverableManagedDatabasesClientListByInstanceResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RecoverableManagedDatabaseListResult); err != nil { + return RecoverableManagedDatabasesClientListByInstanceResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/replicationlinks_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/replicationlinks_client.go new file mode 100644 index 000000000..dac987743 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/replicationlinks_client.go @@ -0,0 +1,493 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ReplicationLinksClient contains the methods for the ReplicationLinks group. +// Don't use this type directly, use NewReplicationLinksClient() instead. +type ReplicationLinksClient struct { + internal *arm.Client + subscriptionID string +} + +// NewReplicationLinksClient creates a new instance of ReplicationLinksClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewReplicationLinksClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ReplicationLinksClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ReplicationLinksClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Delete - Deletes the replication link. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database. +// - options - ReplicationLinksClientDeleteOptions contains the optional parameters for the ReplicationLinksClient.Delete method. +func (client *ReplicationLinksClient) Delete(ctx context.Context, resourceGroupName string, serverName string, databaseName string, linkID string, options *ReplicationLinksClientDeleteOptions) (ReplicationLinksClientDeleteResponse, error) { + var err error + const operationName = "ReplicationLinksClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serverName, databaseName, linkID, options) + if err != nil { + return ReplicationLinksClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ReplicationLinksClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ReplicationLinksClientDeleteResponse{}, err + } + return ReplicationLinksClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *ReplicationLinksClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, linkID string, options *ReplicationLinksClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if linkID == "" { + return nil, errors.New("parameter linkID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{linkId}", url.PathEscape(linkID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + return req, nil +} + +// BeginFailover - Fails over from the current primary server to this server. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database. +// - linkID - The name of the replication link. +// - options - ReplicationLinksClientBeginFailoverOptions contains the optional parameters for the ReplicationLinksClient.BeginFailover +// method. +func (client *ReplicationLinksClient) BeginFailover(ctx context.Context, resourceGroupName string, serverName string, databaseName string, linkID string, options *ReplicationLinksClientBeginFailoverOptions) (*runtime.Poller[ReplicationLinksClientFailoverResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.failover(ctx, resourceGroupName, serverName, databaseName, linkID, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ReplicationLinksClientFailoverResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ReplicationLinksClientFailoverResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Failover - Fails over from the current primary server to this server. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-11-01-preview +func (client *ReplicationLinksClient) failover(ctx context.Context, resourceGroupName string, serverName string, databaseName string, linkID string, options *ReplicationLinksClientBeginFailoverOptions) (*http.Response, error) { + var err error + const operationName = "ReplicationLinksClient.BeginFailover" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.failoverCreateRequest(ctx, resourceGroupName, serverName, databaseName, linkID, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// failoverCreateRequest creates the Failover request. +func (client *ReplicationLinksClient) failoverCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, linkID string, options *ReplicationLinksClientBeginFailoverOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}/failover" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if linkID == "" { + return nil, errors.New("parameter linkID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{linkId}", url.PathEscape(linkID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginFailoverAllowDataLoss - Fails over from the current primary server to this server allowing data loss. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database. +// - linkID - The name of the replication link. +// - options - ReplicationLinksClientBeginFailoverAllowDataLossOptions contains the optional parameters for the ReplicationLinksClient.BeginFailoverAllowDataLoss +// method. +func (client *ReplicationLinksClient) BeginFailoverAllowDataLoss(ctx context.Context, resourceGroupName string, serverName string, databaseName string, linkID string, options *ReplicationLinksClientBeginFailoverAllowDataLossOptions) (*runtime.Poller[ReplicationLinksClientFailoverAllowDataLossResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.failoverAllowDataLoss(ctx, resourceGroupName, serverName, databaseName, linkID, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ReplicationLinksClientFailoverAllowDataLossResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ReplicationLinksClientFailoverAllowDataLossResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// FailoverAllowDataLoss - Fails over from the current primary server to this server allowing data loss. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-11-01-preview +func (client *ReplicationLinksClient) failoverAllowDataLoss(ctx context.Context, resourceGroupName string, serverName string, databaseName string, linkID string, options *ReplicationLinksClientBeginFailoverAllowDataLossOptions) (*http.Response, error) { + var err error + const operationName = "ReplicationLinksClient.BeginFailoverAllowDataLoss" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.failoverAllowDataLossCreateRequest(ctx, resourceGroupName, serverName, databaseName, linkID, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// failoverAllowDataLossCreateRequest creates the FailoverAllowDataLoss request. +func (client *ReplicationLinksClient) failoverAllowDataLossCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, linkID string, options *ReplicationLinksClientBeginFailoverAllowDataLossOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}/forceFailoverAllowDataLoss" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if linkID == "" { + return nil, errors.New("parameter linkID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{linkId}", url.PathEscape(linkID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets a replication link. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database. +// - linkID - The name of the replication link. +// - options - ReplicationLinksClientGetOptions contains the optional parameters for the ReplicationLinksClient.Get method. +func (client *ReplicationLinksClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, linkID string, options *ReplicationLinksClientGetOptions) (ReplicationLinksClientGetResponse, error) { + var err error + const operationName = "ReplicationLinksClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serverName, databaseName, linkID, options) + if err != nil { + return ReplicationLinksClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ReplicationLinksClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ReplicationLinksClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ReplicationLinksClient) getCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, linkID string, options *ReplicationLinksClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if linkID == "" { + return nil, errors.New("parameter linkID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{linkId}", url.PathEscape(linkID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ReplicationLinksClient) getHandleResponse(resp *http.Response) (ReplicationLinksClientGetResponse, error) { + result := ReplicationLinksClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ReplicationLink); err != nil { + return ReplicationLinksClientGetResponse{}, err + } + return result, nil +} + +// NewListByDatabasePager - Gets a list of replication links on database. +// +// Generated from API version 2021-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database. +// - options - ReplicationLinksClientListByDatabaseOptions contains the optional parameters for the ReplicationLinksClient.NewListByDatabasePager +// method. +func (client *ReplicationLinksClient) NewListByDatabasePager(resourceGroupName string, serverName string, databaseName string, options *ReplicationLinksClientListByDatabaseOptions) *runtime.Pager[ReplicationLinksClientListByDatabaseResponse] { + return runtime.NewPager(runtime.PagingHandler[ReplicationLinksClientListByDatabaseResponse]{ + More: func(page ReplicationLinksClientListByDatabaseResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ReplicationLinksClientListByDatabaseResponse) (ReplicationLinksClientListByDatabaseResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ReplicationLinksClient.NewListByDatabasePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByDatabaseCreateRequest(ctx, resourceGroupName, serverName, databaseName, options) + }, nil) + if err != nil { + return ReplicationLinksClientListByDatabaseResponse{}, err + } + return client.listByDatabaseHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByDatabaseCreateRequest creates the ListByDatabase request. +func (client *ReplicationLinksClient) listByDatabaseCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, options *ReplicationLinksClientListByDatabaseOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByDatabaseHandleResponse handles the ListByDatabase response. +func (client *ReplicationLinksClient) listByDatabaseHandleResponse(resp *http.Response) (ReplicationLinksClientListByDatabaseResponse, error) { + result := ReplicationLinksClientListByDatabaseResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ReplicationLinkListResult); err != nil { + return ReplicationLinksClientListByDatabaseResponse{}, err + } + return result, nil +} + +// NewListByServerPager - Gets a list of replication links. +// +// Generated from API version 2021-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - options - ReplicationLinksClientListByServerOptions contains the optional parameters for the ReplicationLinksClient.NewListByServerPager +// method. +func (client *ReplicationLinksClient) NewListByServerPager(resourceGroupName string, serverName string, options *ReplicationLinksClientListByServerOptions) *runtime.Pager[ReplicationLinksClientListByServerResponse] { + return runtime.NewPager(runtime.PagingHandler[ReplicationLinksClientListByServerResponse]{ + More: func(page ReplicationLinksClientListByServerResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ReplicationLinksClientListByServerResponse) (ReplicationLinksClientListByServerResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ReplicationLinksClient.NewListByServerPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByServerCreateRequest(ctx, resourceGroupName, serverName, options) + }, nil) + if err != nil { + return ReplicationLinksClientListByServerResponse{}, err + } + return client.listByServerHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByServerCreateRequest creates the ListByServer request. +func (client *ReplicationLinksClient) listByServerCreateRequest(ctx context.Context, resourceGroupName string, serverName string, options *ReplicationLinksClientListByServerOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/replicationLinks" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByServerHandleResponse handles the ListByServer response. +func (client *ReplicationLinksClient) listByServerHandleResponse(resp *http.Response) (ReplicationLinksClientListByServerResponse, error) { + result := ReplicationLinksClientListByServerResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ReplicationLinkListResult); err != nil { + return ReplicationLinksClientListByServerResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/response_types.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/response_types.go new file mode 100644 index 000000000..7ce24b7e8 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/response_types.go @@ -0,0 +1,2668 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +// AgentClientCreateOrUpdateResponse contains the response from method AgentClient.CreateOrUpdate. +type AgentClientCreateOrUpdateResponse struct { + // A recoverable managed database resource. + AgentConfiguration +} + +// AgentClientGetResponse contains the response from method AgentClient.Get. +type AgentClientGetResponse struct { + // A recoverable managed database resource. + AgentConfiguration +} + +// BackupShortTermRetentionPoliciesClientCreateOrUpdateResponse contains the response from method BackupShortTermRetentionPoliciesClient.BeginCreateOrUpdate. +type BackupShortTermRetentionPoliciesClientCreateOrUpdateResponse struct { + // A short term retention policy. + BackupShortTermRetentionPolicy +} + +// BackupShortTermRetentionPoliciesClientGetResponse contains the response from method BackupShortTermRetentionPoliciesClient.Get. +type BackupShortTermRetentionPoliciesClientGetResponse struct { + // A short term retention policy. + BackupShortTermRetentionPolicy +} + +// BackupShortTermRetentionPoliciesClientListByDatabaseResponse contains the response from method BackupShortTermRetentionPoliciesClient.NewListByDatabasePager. +type BackupShortTermRetentionPoliciesClientListByDatabaseResponse struct { + // A list of short term retention policies. + BackupShortTermRetentionPolicyListResult +} + +// BackupShortTermRetentionPoliciesClientUpdateResponse contains the response from method BackupShortTermRetentionPoliciesClient.BeginUpdate. +type BackupShortTermRetentionPoliciesClientUpdateResponse struct { + // A short term retention policy. + BackupShortTermRetentionPolicy +} + +// CapabilitiesClientListByLocationResponse contains the response from method CapabilitiesClient.ListByLocation. +type CapabilitiesClientListByLocationResponse struct { + // The location capability. + LocationCapabilities +} + +// DataMaskingPoliciesClientCreateOrUpdateResponse contains the response from method DataMaskingPoliciesClient.CreateOrUpdate. +type DataMaskingPoliciesClientCreateOrUpdateResponse struct { + // Represents a database data masking policy. + DataMaskingPolicy +} + +// DataMaskingPoliciesClientGetResponse contains the response from method DataMaskingPoliciesClient.Get. +type DataMaskingPoliciesClientGetResponse struct { + // Represents a database data masking policy. + DataMaskingPolicy +} + +// DataMaskingRulesClientCreateOrUpdateResponse contains the response from method DataMaskingRulesClient.CreateOrUpdate. +type DataMaskingRulesClientCreateOrUpdateResponse struct { + // Represents a database data masking rule. + DataMaskingRule +} + +// DataMaskingRulesClientListByDatabaseResponse contains the response from method DataMaskingRulesClient.NewListByDatabasePager. +type DataMaskingRulesClientListByDatabaseResponse struct { + // The response to a list data masking rules request. + DataMaskingRuleListResult +} + +// DataWarehouseUserActivitiesClientGetResponse contains the response from method DataWarehouseUserActivitiesClient.Get. +type DataWarehouseUserActivitiesClientGetResponse struct { + // User activities of a data warehouse + DataWarehouseUserActivities +} + +// DataWarehouseUserActivitiesClientListByDatabaseResponse contains the response from method DataWarehouseUserActivitiesClient.NewListByDatabasePager. +type DataWarehouseUserActivitiesClientListByDatabaseResponse struct { + // User activities of a data warehouse + DataWarehouseUserActivitiesListResult +} + +// DatabaseAdvancedThreatProtectionSettingsClientCreateOrUpdateResponse contains the response from method DatabaseAdvancedThreatProtectionSettingsClient.CreateOrUpdate. +type DatabaseAdvancedThreatProtectionSettingsClientCreateOrUpdateResponse struct { + // A database Advanced Threat Protection. + DatabaseAdvancedThreatProtection +} + +// DatabaseAdvancedThreatProtectionSettingsClientGetResponse contains the response from method DatabaseAdvancedThreatProtectionSettingsClient.Get. +type DatabaseAdvancedThreatProtectionSettingsClientGetResponse struct { + // A database Advanced Threat Protection. + DatabaseAdvancedThreatProtection +} + +// DatabaseAdvancedThreatProtectionSettingsClientListByDatabaseResponse contains the response from method DatabaseAdvancedThreatProtectionSettingsClient.NewListByDatabasePager. +type DatabaseAdvancedThreatProtectionSettingsClientListByDatabaseResponse struct { + // A list of the database's Advanced Threat Protection configurations. + DatabaseAdvancedThreatProtectionListResult +} + +// DatabaseAdvisorsClientGetResponse contains the response from method DatabaseAdvisorsClient.Get. +type DatabaseAdvisorsClientGetResponse struct { + // Database, Server or Elastic Pool Advisor. + Advisor +} + +// DatabaseAdvisorsClientListByDatabaseResponse contains the response from method DatabaseAdvisorsClient.ListByDatabase. +type DatabaseAdvisorsClientListByDatabaseResponse struct { + // Array of Advisor + AdvisorArray []*Advisor +} + +// DatabaseAdvisorsClientUpdateResponse contains the response from method DatabaseAdvisorsClient.Update. +type DatabaseAdvisorsClientUpdateResponse struct { + // Database, Server or Elastic Pool Advisor. + Advisor +} + +// DatabaseAutomaticTuningClientGetResponse contains the response from method DatabaseAutomaticTuningClient.Get. +type DatabaseAutomaticTuningClientGetResponse struct { + // Database-level Automatic Tuning. + DatabaseAutomaticTuning +} + +// DatabaseAutomaticTuningClientUpdateResponse contains the response from method DatabaseAutomaticTuningClient.Update. +type DatabaseAutomaticTuningClientUpdateResponse struct { + // Database-level Automatic Tuning. + DatabaseAutomaticTuning +} + +// DatabaseBlobAuditingPoliciesClientCreateOrUpdateResponse contains the response from method DatabaseBlobAuditingPoliciesClient.CreateOrUpdate. +type DatabaseBlobAuditingPoliciesClientCreateOrUpdateResponse struct { + // A database blob auditing policy. + DatabaseBlobAuditingPolicy +} + +// DatabaseBlobAuditingPoliciesClientGetResponse contains the response from method DatabaseBlobAuditingPoliciesClient.Get. +type DatabaseBlobAuditingPoliciesClientGetResponse struct { + // A database blob auditing policy. + DatabaseBlobAuditingPolicy +} + +// DatabaseBlobAuditingPoliciesClientListByDatabaseResponse contains the response from method DatabaseBlobAuditingPoliciesClient.NewListByDatabasePager. +type DatabaseBlobAuditingPoliciesClientListByDatabaseResponse struct { + // A list of database auditing settings. + DatabaseBlobAuditingPolicyListResult +} + +// DatabaseColumnsClientGetResponse contains the response from method DatabaseColumnsClient.Get. +type DatabaseColumnsClientGetResponse struct { + // A database column resource. + DatabaseColumn +} + +// DatabaseColumnsClientListByDatabaseResponse contains the response from method DatabaseColumnsClient.NewListByDatabasePager. +type DatabaseColumnsClientListByDatabaseResponse struct { + // A list of database columns. + DatabaseColumnListResult +} + +// DatabaseColumnsClientListByTableResponse contains the response from method DatabaseColumnsClient.NewListByTablePager. +type DatabaseColumnsClientListByTableResponse struct { + // A list of database columns. + DatabaseColumnListResult +} + +// DatabaseExtensionsClientCreateOrUpdateResponse contains the response from method DatabaseExtensionsClient.BeginCreateOrUpdate. +type DatabaseExtensionsClientCreateOrUpdateResponse struct { + // An Extension operation result resource. + ImportExportExtensionsOperationResult +} + +// DatabaseExtensionsClientGetResponse contains the response from method DatabaseExtensionsClient.Get. +type DatabaseExtensionsClientGetResponse struct { + // placeholder for future response values +} + +// DatabaseExtensionsClientListByDatabaseResponse contains the response from method DatabaseExtensionsClient.NewListByDatabasePager. +type DatabaseExtensionsClientListByDatabaseResponse struct { + // Import export operation extensions list. + ImportExportExtensionsOperationListResult +} + +// DatabaseOperationsClientCancelResponse contains the response from method DatabaseOperationsClient.Cancel. +type DatabaseOperationsClientCancelResponse struct { + // placeholder for future response values +} + +// DatabaseOperationsClientListByDatabaseResponse contains the response from method DatabaseOperationsClient.NewListByDatabasePager. +type DatabaseOperationsClientListByDatabaseResponse struct { + // The response to a list database operations request + DatabaseOperationListResult +} + +// DatabaseRecommendedActionsClientGetResponse contains the response from method DatabaseRecommendedActionsClient.Get. +type DatabaseRecommendedActionsClientGetResponse struct { + // Database, Server or Elastic Pool Recommended Action. + RecommendedAction +} + +// DatabaseRecommendedActionsClientListByDatabaseAdvisorResponse contains the response from method DatabaseRecommendedActionsClient.ListByDatabaseAdvisor. +type DatabaseRecommendedActionsClientListByDatabaseAdvisorResponse struct { + // Array of RecommendedAction + RecommendedActionArray []*RecommendedAction +} + +// DatabaseRecommendedActionsClientUpdateResponse contains the response from method DatabaseRecommendedActionsClient.Update. +type DatabaseRecommendedActionsClientUpdateResponse struct { + // Database, Server or Elastic Pool Recommended Action. + RecommendedAction +} + +// DatabaseSchemasClientGetResponse contains the response from method DatabaseSchemasClient.Get. +type DatabaseSchemasClientGetResponse struct { + // A database schema resource. + DatabaseSchema +} + +// DatabaseSchemasClientListByDatabaseResponse contains the response from method DatabaseSchemasClient.NewListByDatabasePager. +type DatabaseSchemasClientListByDatabaseResponse struct { + // A list of database schemas. + DatabaseSchemaListResult +} + +// DatabaseSecurityAlertPoliciesClientCreateOrUpdateResponse contains the response from method DatabaseSecurityAlertPoliciesClient.CreateOrUpdate. +type DatabaseSecurityAlertPoliciesClientCreateOrUpdateResponse struct { + // A database security alert policy. + DatabaseSecurityAlertPolicy +} + +// DatabaseSecurityAlertPoliciesClientGetResponse contains the response from method DatabaseSecurityAlertPoliciesClient.Get. +type DatabaseSecurityAlertPoliciesClientGetResponse struct { + // A database security alert policy. + DatabaseSecurityAlertPolicy +} + +// DatabaseSecurityAlertPoliciesClientListByDatabaseResponse contains the response from method DatabaseSecurityAlertPoliciesClient.NewListByDatabasePager. +type DatabaseSecurityAlertPoliciesClientListByDatabaseResponse struct { + // A list of the database's security alert policies. + DatabaseSecurityAlertListResult +} + +// DatabaseTablesClientGetResponse contains the response from method DatabaseTablesClient.Get. +type DatabaseTablesClientGetResponse struct { + // A database table resource. + DatabaseTable +} + +// DatabaseTablesClientListBySchemaResponse contains the response from method DatabaseTablesClient.NewListBySchemaPager. +type DatabaseTablesClientListBySchemaResponse struct { + // A list of database tables. + DatabaseTableListResult +} + +// DatabaseUsagesClientListByDatabaseResponse contains the response from method DatabaseUsagesClient.NewListByDatabasePager. +type DatabaseUsagesClientListByDatabaseResponse struct { + // A list of database usage metrics. + DatabaseUsageListResult +} + +// DatabaseVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateResponse contains the response from method DatabaseVulnerabilityAssessmentRuleBaselinesClient.CreateOrUpdate. +type DatabaseVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateResponse struct { + // A database vulnerability assessment rule baseline. + DatabaseVulnerabilityAssessmentRuleBaseline +} + +// DatabaseVulnerabilityAssessmentRuleBaselinesClientDeleteResponse contains the response from method DatabaseVulnerabilityAssessmentRuleBaselinesClient.Delete. +type DatabaseVulnerabilityAssessmentRuleBaselinesClientDeleteResponse struct { + // placeholder for future response values +} + +// DatabaseVulnerabilityAssessmentRuleBaselinesClientGetResponse contains the response from method DatabaseVulnerabilityAssessmentRuleBaselinesClient.Get. +type DatabaseVulnerabilityAssessmentRuleBaselinesClientGetResponse struct { + // A database vulnerability assessment rule baseline. + DatabaseVulnerabilityAssessmentRuleBaseline +} + +// DatabaseVulnerabilityAssessmentScansClientExportResponse contains the response from method DatabaseVulnerabilityAssessmentScansClient.Export. +type DatabaseVulnerabilityAssessmentScansClientExportResponse struct { + // A database Vulnerability Assessment scan export resource. + DatabaseVulnerabilityAssessmentScansExport +} + +// DatabaseVulnerabilityAssessmentScansClientGetResponse contains the response from method DatabaseVulnerabilityAssessmentScansClient.Get. +type DatabaseVulnerabilityAssessmentScansClientGetResponse struct { + // A vulnerability assessment scan record. + VulnerabilityAssessmentScanRecord +} + +// DatabaseVulnerabilityAssessmentScansClientInitiateScanResponse contains the response from method DatabaseVulnerabilityAssessmentScansClient.BeginInitiateScan. +type DatabaseVulnerabilityAssessmentScansClientInitiateScanResponse struct { + // placeholder for future response values +} + +// DatabaseVulnerabilityAssessmentScansClientListByDatabaseResponse contains the response from method DatabaseVulnerabilityAssessmentScansClient.NewListByDatabasePager. +type DatabaseVulnerabilityAssessmentScansClientListByDatabaseResponse struct { + // A list of vulnerability assessment scan records. + VulnerabilityAssessmentScanRecordListResult +} + +// DatabaseVulnerabilityAssessmentsClientCreateOrUpdateResponse contains the response from method DatabaseVulnerabilityAssessmentsClient.CreateOrUpdate. +type DatabaseVulnerabilityAssessmentsClientCreateOrUpdateResponse struct { + // A database vulnerability assessment. + DatabaseVulnerabilityAssessment +} + +// DatabaseVulnerabilityAssessmentsClientDeleteResponse contains the response from method DatabaseVulnerabilityAssessmentsClient.Delete. +type DatabaseVulnerabilityAssessmentsClientDeleteResponse struct { + // placeholder for future response values +} + +// DatabaseVulnerabilityAssessmentsClientGetResponse contains the response from method DatabaseVulnerabilityAssessmentsClient.Get. +type DatabaseVulnerabilityAssessmentsClientGetResponse struct { + // A database vulnerability assessment. + DatabaseVulnerabilityAssessment +} + +// DatabaseVulnerabilityAssessmentsClientListByDatabaseResponse contains the response from method DatabaseVulnerabilityAssessmentsClient.NewListByDatabasePager. +type DatabaseVulnerabilityAssessmentsClientListByDatabaseResponse struct { + // A list of the database's vulnerability assessments. + DatabaseVulnerabilityAssessmentListResult +} + +// DatabasesClientCreateOrUpdateResponse contains the response from method DatabasesClient.BeginCreateOrUpdate. +type DatabasesClientCreateOrUpdateResponse struct { + // A database resource. + Database +} + +// DatabasesClientDeleteResponse contains the response from method DatabasesClient.BeginDelete. +type DatabasesClientDeleteResponse struct { + // placeholder for future response values +} + +// DatabasesClientExportResponse contains the response from method DatabasesClient.BeginExport. +type DatabasesClientExportResponse struct { + // An ImportExport operation result resource. + ImportExportOperationResult +} + +// DatabasesClientFailoverResponse contains the response from method DatabasesClient.BeginFailover. +type DatabasesClientFailoverResponse struct { + // placeholder for future response values +} + +// DatabasesClientGetResponse contains the response from method DatabasesClient.Get. +type DatabasesClientGetResponse struct { + // A database resource. + Database +} + +// DatabasesClientImportResponse contains the response from method DatabasesClient.BeginImport. +type DatabasesClientImportResponse struct { + // An ImportExport operation result resource. + ImportExportOperationResult +} + +// DatabasesClientListByElasticPoolResponse contains the response from method DatabasesClient.NewListByElasticPoolPager. +type DatabasesClientListByElasticPoolResponse struct { + // A list of databases. + DatabaseListResult +} + +// DatabasesClientListByServerResponse contains the response from method DatabasesClient.NewListByServerPager. +type DatabasesClientListByServerResponse struct { + // A list of databases. + DatabaseListResult +} + +// DatabasesClientListInaccessibleByServerResponse contains the response from method DatabasesClient.NewListInaccessibleByServerPager. +type DatabasesClientListInaccessibleByServerResponse struct { + // A list of databases. + DatabaseListResult +} + +// DatabasesClientListMetricDefinitionsResponse contains the response from method DatabasesClient.NewListMetricDefinitionsPager. +type DatabasesClientListMetricDefinitionsResponse struct { + // The response to a list database metric definitions request. + MetricDefinitionListResult +} + +// DatabasesClientListMetricsResponse contains the response from method DatabasesClient.NewListMetricsPager. +type DatabasesClientListMetricsResponse struct { + // The response to a list database metrics request. + MetricListResult +} + +// DatabasesClientPauseResponse contains the response from method DatabasesClient.BeginPause. +type DatabasesClientPauseResponse struct { + // A database resource. + Database +} + +// DatabasesClientRenameResponse contains the response from method DatabasesClient.Rename. +type DatabasesClientRenameResponse struct { + // placeholder for future response values +} + +// DatabasesClientResumeResponse contains the response from method DatabasesClient.BeginResume. +type DatabasesClientResumeResponse struct { + // A database resource. + Database +} + +// DatabasesClientUpdateResponse contains the response from method DatabasesClient.BeginUpdate. +type DatabasesClientUpdateResponse struct { + // A database resource. + Database +} + +// DatabasesClientUpgradeDataWarehouseResponse contains the response from method DatabasesClient.BeginUpgradeDataWarehouse. +type DatabasesClientUpgradeDataWarehouseResponse struct { + // placeholder for future response values +} + +// DeletedServersClientGetResponse contains the response from method DeletedServersClient.Get. +type DeletedServersClientGetResponse struct { + // A deleted server. + DeletedServer +} + +// DeletedServersClientListByLocationResponse contains the response from method DeletedServersClient.NewListByLocationPager. +type DeletedServersClientListByLocationResponse struct { + // A list of deleted servers. + DeletedServerListResult +} + +// DeletedServersClientListResponse contains the response from method DeletedServersClient.NewListPager. +type DeletedServersClientListResponse struct { + // A list of deleted servers. + DeletedServerListResult +} + +// DeletedServersClientRecoverResponse contains the response from method DeletedServersClient.BeginRecover. +type DeletedServersClientRecoverResponse struct { + // A deleted server. + DeletedServer +} + +// DistributedAvailabilityGroupsClientCreateOrUpdateResponse contains the response from method DistributedAvailabilityGroupsClient.BeginCreateOrUpdate. +type DistributedAvailabilityGroupsClientCreateOrUpdateResponse struct { + // Distributed availability group between box and Sql Managed Instance. + DistributedAvailabilityGroup +} + +// DistributedAvailabilityGroupsClientDeleteResponse contains the response from method DistributedAvailabilityGroupsClient.BeginDelete. +type DistributedAvailabilityGroupsClientDeleteResponse struct { + // placeholder for future response values +} + +// DistributedAvailabilityGroupsClientGetResponse contains the response from method DistributedAvailabilityGroupsClient.Get. +type DistributedAvailabilityGroupsClientGetResponse struct { + // Distributed availability group between box and Sql Managed Instance. + DistributedAvailabilityGroup +} + +// DistributedAvailabilityGroupsClientListByInstanceResponse contains the response from method DistributedAvailabilityGroupsClient.NewListByInstancePager. +type DistributedAvailabilityGroupsClientListByInstanceResponse struct { + // A list of distributed availability groups in instance. + DistributedAvailabilityGroupsListResult +} + +// DistributedAvailabilityGroupsClientUpdateResponse contains the response from method DistributedAvailabilityGroupsClient.BeginUpdate. +type DistributedAvailabilityGroupsClientUpdateResponse struct { + // Distributed availability group between box and Sql Managed Instance. + DistributedAvailabilityGroup +} + +// ElasticPoolActivitiesClientListByElasticPoolResponse contains the response from method ElasticPoolActivitiesClient.NewListByElasticPoolPager. +type ElasticPoolActivitiesClientListByElasticPoolResponse struct { + // Represents the response to a list elastic pool activity request. + ElasticPoolActivityListResult +} + +// ElasticPoolDatabaseActivitiesClientListByElasticPoolResponse contains the response from method ElasticPoolDatabaseActivitiesClient.NewListByElasticPoolPager. +type ElasticPoolDatabaseActivitiesClientListByElasticPoolResponse struct { + // Represents the response to a list elastic pool database activity request. + ElasticPoolDatabaseActivityListResult +} + +// ElasticPoolOperationsClientCancelResponse contains the response from method ElasticPoolOperationsClient.Cancel. +type ElasticPoolOperationsClientCancelResponse struct { + // placeholder for future response values +} + +// ElasticPoolOperationsClientListByElasticPoolResponse contains the response from method ElasticPoolOperationsClient.NewListByElasticPoolPager. +type ElasticPoolOperationsClientListByElasticPoolResponse struct { + // The response to a list elastic pool operations request + ElasticPoolOperationListResult +} + +// ElasticPoolsClientCreateOrUpdateResponse contains the response from method ElasticPoolsClient.BeginCreateOrUpdate. +type ElasticPoolsClientCreateOrUpdateResponse struct { + // An elastic pool. + ElasticPool +} + +// ElasticPoolsClientDeleteResponse contains the response from method ElasticPoolsClient.BeginDelete. +type ElasticPoolsClientDeleteResponse struct { + // placeholder for future response values +} + +// ElasticPoolsClientFailoverResponse contains the response from method ElasticPoolsClient.BeginFailover. +type ElasticPoolsClientFailoverResponse struct { + // placeholder for future response values +} + +// ElasticPoolsClientGetResponse contains the response from method ElasticPoolsClient.Get. +type ElasticPoolsClientGetResponse struct { + // An elastic pool. + ElasticPool +} + +// ElasticPoolsClientListByServerResponse contains the response from method ElasticPoolsClient.NewListByServerPager. +type ElasticPoolsClientListByServerResponse struct { + // The result of an elastic pool list request. + ElasticPoolListResult +} + +// ElasticPoolsClientListMetricDefinitionsResponse contains the response from method ElasticPoolsClient.NewListMetricDefinitionsPager. +type ElasticPoolsClientListMetricDefinitionsResponse struct { + // The response to a list database metric definitions request. + MetricDefinitionListResult +} + +// ElasticPoolsClientListMetricsResponse contains the response from method ElasticPoolsClient.NewListMetricsPager. +type ElasticPoolsClientListMetricsResponse struct { + // The response to a list database metrics request. + MetricListResult +} + +// ElasticPoolsClientUpdateResponse contains the response from method ElasticPoolsClient.BeginUpdate. +type ElasticPoolsClientUpdateResponse struct { + // An elastic pool. + ElasticPool +} + +// EncryptionProtectorsClientCreateOrUpdateResponse contains the response from method EncryptionProtectorsClient.BeginCreateOrUpdate. +type EncryptionProtectorsClientCreateOrUpdateResponse struct { + // The server encryption protector. + EncryptionProtector +} + +// EncryptionProtectorsClientGetResponse contains the response from method EncryptionProtectorsClient.Get. +type EncryptionProtectorsClientGetResponse struct { + // The server encryption protector. + EncryptionProtector +} + +// EncryptionProtectorsClientListByServerResponse contains the response from method EncryptionProtectorsClient.NewListByServerPager. +type EncryptionProtectorsClientListByServerResponse struct { + // A list of server encryption protectors. + EncryptionProtectorListResult +} + +// EncryptionProtectorsClientRevalidateResponse contains the response from method EncryptionProtectorsClient.BeginRevalidate. +type EncryptionProtectorsClientRevalidateResponse struct { + // placeholder for future response values +} + +// EndpointCertificatesClientGetResponse contains the response from method EndpointCertificatesClient.Get. +type EndpointCertificatesClientGetResponse struct { + // Certificate used on an endpoint on the Managed Instance. + EndpointCertificate +} + +// EndpointCertificatesClientListByInstanceResponse contains the response from method EndpointCertificatesClient.NewListByInstancePager. +type EndpointCertificatesClientListByInstanceResponse struct { + // A list of endpoint certificates on the target instance. + EndpointCertificateListResult +} + +// ExtendedDatabaseBlobAuditingPoliciesClientCreateOrUpdateResponse contains the response from method ExtendedDatabaseBlobAuditingPoliciesClient.CreateOrUpdate. +type ExtendedDatabaseBlobAuditingPoliciesClientCreateOrUpdateResponse struct { + // An extended database blob auditing policy. + ExtendedDatabaseBlobAuditingPolicy +} + +// ExtendedDatabaseBlobAuditingPoliciesClientGetResponse contains the response from method ExtendedDatabaseBlobAuditingPoliciesClient.Get. +type ExtendedDatabaseBlobAuditingPoliciesClientGetResponse struct { + // An extended database blob auditing policy. + ExtendedDatabaseBlobAuditingPolicy +} + +// ExtendedDatabaseBlobAuditingPoliciesClientListByDatabaseResponse contains the response from method ExtendedDatabaseBlobAuditingPoliciesClient.NewListByDatabasePager. +type ExtendedDatabaseBlobAuditingPoliciesClientListByDatabaseResponse struct { + // A list of database extended auditing settings. + ExtendedDatabaseBlobAuditingPolicyListResult +} + +// ExtendedServerBlobAuditingPoliciesClientCreateOrUpdateResponse contains the response from method ExtendedServerBlobAuditingPoliciesClient.BeginCreateOrUpdate. +type ExtendedServerBlobAuditingPoliciesClientCreateOrUpdateResponse struct { + // An extended server blob auditing policy. + ExtendedServerBlobAuditingPolicy +} + +// ExtendedServerBlobAuditingPoliciesClientGetResponse contains the response from method ExtendedServerBlobAuditingPoliciesClient.Get. +type ExtendedServerBlobAuditingPoliciesClientGetResponse struct { + // An extended server blob auditing policy. + ExtendedServerBlobAuditingPolicy +} + +// ExtendedServerBlobAuditingPoliciesClientListByServerResponse contains the response from method ExtendedServerBlobAuditingPoliciesClient.NewListByServerPager. +type ExtendedServerBlobAuditingPoliciesClientListByServerResponse struct { + // A list of server extended auditing settings. + ExtendedServerBlobAuditingPolicyListResult +} + +// FailoverGroupsClientCreateOrUpdateResponse contains the response from method FailoverGroupsClient.BeginCreateOrUpdate. +type FailoverGroupsClientCreateOrUpdateResponse struct { + // A failover group. + FailoverGroup +} + +// FailoverGroupsClientDeleteResponse contains the response from method FailoverGroupsClient.BeginDelete. +type FailoverGroupsClientDeleteResponse struct { + // placeholder for future response values +} + +// FailoverGroupsClientFailoverResponse contains the response from method FailoverGroupsClient.BeginFailover. +type FailoverGroupsClientFailoverResponse struct { + // A failover group. + FailoverGroup +} + +// FailoverGroupsClientForceFailoverAllowDataLossResponse contains the response from method FailoverGroupsClient.BeginForceFailoverAllowDataLoss. +type FailoverGroupsClientForceFailoverAllowDataLossResponse struct { + // A failover group. + FailoverGroup +} + +// FailoverGroupsClientGetResponse contains the response from method FailoverGroupsClient.Get. +type FailoverGroupsClientGetResponse struct { + // A failover group. + FailoverGroup +} + +// FailoverGroupsClientListByServerResponse contains the response from method FailoverGroupsClient.NewListByServerPager. +type FailoverGroupsClientListByServerResponse struct { + // A list of failover groups. + FailoverGroupListResult +} + +// FailoverGroupsClientUpdateResponse contains the response from method FailoverGroupsClient.BeginUpdate. +type FailoverGroupsClientUpdateResponse struct { + // A failover group. + FailoverGroup +} + +// FirewallRulesClientCreateOrUpdateResponse contains the response from method FirewallRulesClient.CreateOrUpdate. +type FirewallRulesClientCreateOrUpdateResponse struct { + // A server firewall rule. + FirewallRule +} + +// FirewallRulesClientDeleteResponse contains the response from method FirewallRulesClient.Delete. +type FirewallRulesClientDeleteResponse struct { + // placeholder for future response values +} + +// FirewallRulesClientGetResponse contains the response from method FirewallRulesClient.Get. +type FirewallRulesClientGetResponse struct { + // A server firewall rule. + FirewallRule +} + +// FirewallRulesClientListByServerResponse contains the response from method FirewallRulesClient.NewListByServerPager. +type FirewallRulesClientListByServerResponse struct { + // The response to a list firewall rules request + FirewallRuleListResult +} + +// FirewallRulesClientReplaceResponse contains the response from method FirewallRulesClient.Replace. +type FirewallRulesClientReplaceResponse struct { + // A server firewall rule. + FirewallRule +} + +// GeoBackupPoliciesClientCreateOrUpdateResponse contains the response from method GeoBackupPoliciesClient.CreateOrUpdate. +type GeoBackupPoliciesClientCreateOrUpdateResponse struct { + // A database geo backup policy. + GeoBackupPolicy +} + +// GeoBackupPoliciesClientGetResponse contains the response from method GeoBackupPoliciesClient.Get. +type GeoBackupPoliciesClientGetResponse struct { + // A database geo backup policy. + GeoBackupPolicy +} + +// GeoBackupPoliciesClientListByDatabaseResponse contains the response from method GeoBackupPoliciesClient.NewListByDatabasePager. +type GeoBackupPoliciesClientListByDatabaseResponse struct { + // The response to a list geo backup policies request. + GeoBackupPolicyListResult +} + +// IPv6FirewallRulesClientCreateOrUpdateResponse contains the response from method IPv6FirewallRulesClient.CreateOrUpdate. +type IPv6FirewallRulesClientCreateOrUpdateResponse struct { + // An IPv6 server firewall rule. + IPv6FirewallRule +} + +// IPv6FirewallRulesClientDeleteResponse contains the response from method IPv6FirewallRulesClient.Delete. +type IPv6FirewallRulesClientDeleteResponse struct { + // placeholder for future response values +} + +// IPv6FirewallRulesClientGetResponse contains the response from method IPv6FirewallRulesClient.Get. +type IPv6FirewallRulesClientGetResponse struct { + // An IPv6 server firewall rule. + IPv6FirewallRule +} + +// IPv6FirewallRulesClientListByServerResponse contains the response from method IPv6FirewallRulesClient.NewListByServerPager. +type IPv6FirewallRulesClientListByServerResponse struct { + // The response to a list IPv6 firewall rules request + IPv6FirewallRuleListResult +} + +// InstanceFailoverGroupsClientCreateOrUpdateResponse contains the response from method InstanceFailoverGroupsClient.BeginCreateOrUpdate. +type InstanceFailoverGroupsClientCreateOrUpdateResponse struct { + // An instance failover group. + InstanceFailoverGroup +} + +// InstanceFailoverGroupsClientDeleteResponse contains the response from method InstanceFailoverGroupsClient.BeginDelete. +type InstanceFailoverGroupsClientDeleteResponse struct { + // placeholder for future response values +} + +// InstanceFailoverGroupsClientFailoverResponse contains the response from method InstanceFailoverGroupsClient.BeginFailover. +type InstanceFailoverGroupsClientFailoverResponse struct { + // An instance failover group. + InstanceFailoverGroup +} + +// InstanceFailoverGroupsClientForceFailoverAllowDataLossResponse contains the response from method InstanceFailoverGroupsClient.BeginForceFailoverAllowDataLoss. +type InstanceFailoverGroupsClientForceFailoverAllowDataLossResponse struct { + // An instance failover group. + InstanceFailoverGroup +} + +// InstanceFailoverGroupsClientGetResponse contains the response from method InstanceFailoverGroupsClient.Get. +type InstanceFailoverGroupsClientGetResponse struct { + // An instance failover group. + InstanceFailoverGroup +} + +// InstanceFailoverGroupsClientListByLocationResponse contains the response from method InstanceFailoverGroupsClient.NewListByLocationPager. +type InstanceFailoverGroupsClientListByLocationResponse struct { + // A list of instance failover groups. + InstanceFailoverGroupListResult +} + +// InstancePoolsClientCreateOrUpdateResponse contains the response from method InstancePoolsClient.BeginCreateOrUpdate. +type InstancePoolsClientCreateOrUpdateResponse struct { + // An Azure SQL instance pool. + InstancePool +} + +// InstancePoolsClientDeleteResponse contains the response from method InstancePoolsClient.BeginDelete. +type InstancePoolsClientDeleteResponse struct { + // placeholder for future response values +} + +// InstancePoolsClientGetResponse contains the response from method InstancePoolsClient.Get. +type InstancePoolsClientGetResponse struct { + // An Azure SQL instance pool. + InstancePool +} + +// InstancePoolsClientListByResourceGroupResponse contains the response from method InstancePoolsClient.NewListByResourceGroupPager. +type InstancePoolsClientListByResourceGroupResponse struct { + // A list of Azure SQL instance pools. + InstancePoolListResult +} + +// InstancePoolsClientListResponse contains the response from method InstancePoolsClient.NewListPager. +type InstancePoolsClientListResponse struct { + // A list of Azure SQL instance pools. + InstancePoolListResult +} + +// InstancePoolsClientUpdateResponse contains the response from method InstancePoolsClient.BeginUpdate. +type InstancePoolsClientUpdateResponse struct { + // An Azure SQL instance pool. + InstancePool +} + +// JobAgentsClientCreateOrUpdateResponse contains the response from method JobAgentsClient.BeginCreateOrUpdate. +type JobAgentsClientCreateOrUpdateResponse struct { + // An Azure SQL job agent. + JobAgent +} + +// JobAgentsClientDeleteResponse contains the response from method JobAgentsClient.BeginDelete. +type JobAgentsClientDeleteResponse struct { + // placeholder for future response values +} + +// JobAgentsClientGetResponse contains the response from method JobAgentsClient.Get. +type JobAgentsClientGetResponse struct { + // An Azure SQL job agent. + JobAgent +} + +// JobAgentsClientListByServerResponse contains the response from method JobAgentsClient.NewListByServerPager. +type JobAgentsClientListByServerResponse struct { + // A list of Azure SQL job agents. + JobAgentListResult +} + +// JobAgentsClientUpdateResponse contains the response from method JobAgentsClient.BeginUpdate. +type JobAgentsClientUpdateResponse struct { + // An Azure SQL job agent. + JobAgent +} + +// JobCredentialsClientCreateOrUpdateResponse contains the response from method JobCredentialsClient.CreateOrUpdate. +type JobCredentialsClientCreateOrUpdateResponse struct { + // A stored credential that can be used by a job to connect to target databases. + JobCredential +} + +// JobCredentialsClientDeleteResponse contains the response from method JobCredentialsClient.Delete. +type JobCredentialsClientDeleteResponse struct { + // placeholder for future response values +} + +// JobCredentialsClientGetResponse contains the response from method JobCredentialsClient.Get. +type JobCredentialsClientGetResponse struct { + // A stored credential that can be used by a job to connect to target databases. + JobCredential +} + +// JobCredentialsClientListByAgentResponse contains the response from method JobCredentialsClient.NewListByAgentPager. +type JobCredentialsClientListByAgentResponse struct { + // A list of job credentials. + JobCredentialListResult +} + +// JobExecutionsClientCancelResponse contains the response from method JobExecutionsClient.Cancel. +type JobExecutionsClientCancelResponse struct { + // placeholder for future response values +} + +// JobExecutionsClientCreateOrUpdateResponse contains the response from method JobExecutionsClient.BeginCreateOrUpdate. +type JobExecutionsClientCreateOrUpdateResponse struct { + // An execution of a job + JobExecution +} + +// JobExecutionsClientCreateResponse contains the response from method JobExecutionsClient.BeginCreate. +type JobExecutionsClientCreateResponse struct { + // An execution of a job + JobExecution +} + +// JobExecutionsClientGetResponse contains the response from method JobExecutionsClient.Get. +type JobExecutionsClientGetResponse struct { + // An execution of a job + JobExecution +} + +// JobExecutionsClientListByAgentResponse contains the response from method JobExecutionsClient.NewListByAgentPager. +type JobExecutionsClientListByAgentResponse struct { + // A list of job executions. + JobExecutionListResult +} + +// JobExecutionsClientListByJobResponse contains the response from method JobExecutionsClient.NewListByJobPager. +type JobExecutionsClientListByJobResponse struct { + // A list of job executions. + JobExecutionListResult +} + +// JobStepExecutionsClientGetResponse contains the response from method JobStepExecutionsClient.Get. +type JobStepExecutionsClientGetResponse struct { + // An execution of a job + JobExecution +} + +// JobStepExecutionsClientListByJobExecutionResponse contains the response from method JobStepExecutionsClient.NewListByJobExecutionPager. +type JobStepExecutionsClientListByJobExecutionResponse struct { + // A list of job executions. + JobExecutionListResult +} + +// JobStepsClientCreateOrUpdateResponse contains the response from method JobStepsClient.CreateOrUpdate. +type JobStepsClientCreateOrUpdateResponse struct { + // A job step. + JobStep +} + +// JobStepsClientDeleteResponse contains the response from method JobStepsClient.Delete. +type JobStepsClientDeleteResponse struct { + // placeholder for future response values +} + +// JobStepsClientGetByVersionResponse contains the response from method JobStepsClient.GetByVersion. +type JobStepsClientGetByVersionResponse struct { + // A job step. + JobStep +} + +// JobStepsClientGetResponse contains the response from method JobStepsClient.Get. +type JobStepsClientGetResponse struct { + // A job step. + JobStep +} + +// JobStepsClientListByJobResponse contains the response from method JobStepsClient.NewListByJobPager. +type JobStepsClientListByJobResponse struct { + // A list of job steps. + JobStepListResult +} + +// JobStepsClientListByVersionResponse contains the response from method JobStepsClient.NewListByVersionPager. +type JobStepsClientListByVersionResponse struct { + // A list of job steps. + JobStepListResult +} + +// JobTargetExecutionsClientGetResponse contains the response from method JobTargetExecutionsClient.Get. +type JobTargetExecutionsClientGetResponse struct { + // An execution of a job + JobExecution +} + +// JobTargetExecutionsClientListByJobExecutionResponse contains the response from method JobTargetExecutionsClient.NewListByJobExecutionPager. +type JobTargetExecutionsClientListByJobExecutionResponse struct { + // A list of job executions. + JobExecutionListResult +} + +// JobTargetExecutionsClientListByStepResponse contains the response from method JobTargetExecutionsClient.NewListByStepPager. +type JobTargetExecutionsClientListByStepResponse struct { + // A list of job executions. + JobExecutionListResult +} + +// JobTargetGroupsClientCreateOrUpdateResponse contains the response from method JobTargetGroupsClient.CreateOrUpdate. +type JobTargetGroupsClientCreateOrUpdateResponse struct { + // A group of job targets. + JobTargetGroup +} + +// JobTargetGroupsClientDeleteResponse contains the response from method JobTargetGroupsClient.Delete. +type JobTargetGroupsClientDeleteResponse struct { + // placeholder for future response values +} + +// JobTargetGroupsClientGetResponse contains the response from method JobTargetGroupsClient.Get. +type JobTargetGroupsClientGetResponse struct { + // A group of job targets. + JobTargetGroup +} + +// JobTargetGroupsClientListByAgentResponse contains the response from method JobTargetGroupsClient.NewListByAgentPager. +type JobTargetGroupsClientListByAgentResponse struct { + // A list of target groups. + JobTargetGroupListResult +} + +// JobVersionsClientGetResponse contains the response from method JobVersionsClient.Get. +type JobVersionsClientGetResponse struct { + // A job version. + JobVersion +} + +// JobVersionsClientListByJobResponse contains the response from method JobVersionsClient.NewListByJobPager. +type JobVersionsClientListByJobResponse struct { + // A list of job versions. + JobVersionListResult +} + +// JobsClientCreateOrUpdateResponse contains the response from method JobsClient.CreateOrUpdate. +type JobsClientCreateOrUpdateResponse struct { + // A job. + Job +} + +// JobsClientDeleteResponse contains the response from method JobsClient.Delete. +type JobsClientDeleteResponse struct { + // placeholder for future response values +} + +// JobsClientGetResponse contains the response from method JobsClient.Get. +type JobsClientGetResponse struct { + // A job. + Job +} + +// JobsClientListByAgentResponse contains the response from method JobsClient.NewListByAgentPager. +type JobsClientListByAgentResponse struct { + // A list of jobs. + JobListResult +} + +// LedgerDigestUploadsClientCreateOrUpdateResponse contains the response from method LedgerDigestUploadsClient.BeginCreateOrUpdate. +type LedgerDigestUploadsClientCreateOrUpdateResponse struct { + // Azure SQL Database ledger digest upload settings. + LedgerDigestUploads +} + +// LedgerDigestUploadsClientDisableResponse contains the response from method LedgerDigestUploadsClient.BeginDisable. +type LedgerDigestUploadsClientDisableResponse struct { + // Azure SQL Database ledger digest upload settings. + LedgerDigestUploads +} + +// LedgerDigestUploadsClientGetResponse contains the response from method LedgerDigestUploadsClient.Get. +type LedgerDigestUploadsClientGetResponse struct { + // Azure SQL Database ledger digest upload settings. + LedgerDigestUploads +} + +// LedgerDigestUploadsClientListByDatabaseResponse contains the response from method LedgerDigestUploadsClient.NewListByDatabasePager. +type LedgerDigestUploadsClientListByDatabaseResponse struct { + // A list of ledger digest upload settings. + LedgerDigestUploadsListResult +} + +// LongTermRetentionBackupsClientCopyByResourceGroupResponse contains the response from method LongTermRetentionBackupsClient.BeginCopyByResourceGroup. +type LongTermRetentionBackupsClientCopyByResourceGroupResponse struct { + // A LongTermRetentionBackup operation result resource. + LongTermRetentionBackupOperationResult +} + +// LongTermRetentionBackupsClientCopyResponse contains the response from method LongTermRetentionBackupsClient.BeginCopy. +type LongTermRetentionBackupsClientCopyResponse struct { + // A LongTermRetentionBackup operation result resource. + LongTermRetentionBackupOperationResult +} + +// LongTermRetentionBackupsClientDeleteByResourceGroupResponse contains the response from method LongTermRetentionBackupsClient.BeginDeleteByResourceGroup. +type LongTermRetentionBackupsClientDeleteByResourceGroupResponse struct { + // placeholder for future response values +} + +// LongTermRetentionBackupsClientDeleteResponse contains the response from method LongTermRetentionBackupsClient.BeginDelete. +type LongTermRetentionBackupsClientDeleteResponse struct { + // placeholder for future response values +} + +// LongTermRetentionBackupsClientGetByResourceGroupResponse contains the response from method LongTermRetentionBackupsClient.GetByResourceGroup. +type LongTermRetentionBackupsClientGetByResourceGroupResponse struct { + // A long term retention backup. + LongTermRetentionBackup +} + +// LongTermRetentionBackupsClientGetResponse contains the response from method LongTermRetentionBackupsClient.Get. +type LongTermRetentionBackupsClientGetResponse struct { + // A long term retention backup. + LongTermRetentionBackup +} + +// LongTermRetentionBackupsClientListByDatabaseResponse contains the response from method LongTermRetentionBackupsClient.NewListByDatabasePager. +type LongTermRetentionBackupsClientListByDatabaseResponse struct { + // A list of long term retention backups. + LongTermRetentionBackupListResult +} + +// LongTermRetentionBackupsClientListByLocationResponse contains the response from method LongTermRetentionBackupsClient.NewListByLocationPager. +type LongTermRetentionBackupsClientListByLocationResponse struct { + // A list of long term retention backups. + LongTermRetentionBackupListResult +} + +// LongTermRetentionBackupsClientListByResourceGroupDatabaseResponse contains the response from method LongTermRetentionBackupsClient.NewListByResourceGroupDatabasePager. +type LongTermRetentionBackupsClientListByResourceGroupDatabaseResponse struct { + // A list of long term retention backups. + LongTermRetentionBackupListResult +} + +// LongTermRetentionBackupsClientListByResourceGroupLocationResponse contains the response from method LongTermRetentionBackupsClient.NewListByResourceGroupLocationPager. +type LongTermRetentionBackupsClientListByResourceGroupLocationResponse struct { + // A list of long term retention backups. + LongTermRetentionBackupListResult +} + +// LongTermRetentionBackupsClientListByResourceGroupServerResponse contains the response from method LongTermRetentionBackupsClient.NewListByResourceGroupServerPager. +type LongTermRetentionBackupsClientListByResourceGroupServerResponse struct { + // A list of long term retention backups. + LongTermRetentionBackupListResult +} + +// LongTermRetentionBackupsClientListByServerResponse contains the response from method LongTermRetentionBackupsClient.NewListByServerPager. +type LongTermRetentionBackupsClientListByServerResponse struct { + // A list of long term retention backups. + LongTermRetentionBackupListResult +} + +// LongTermRetentionBackupsClientUpdateByResourceGroupResponse contains the response from method LongTermRetentionBackupsClient.BeginUpdateByResourceGroup. +type LongTermRetentionBackupsClientUpdateByResourceGroupResponse struct { + // A LongTermRetentionBackup operation result resource. + LongTermRetentionBackupOperationResult +} + +// LongTermRetentionBackupsClientUpdateResponse contains the response from method LongTermRetentionBackupsClient.BeginUpdate. +type LongTermRetentionBackupsClientUpdateResponse struct { + // A LongTermRetentionBackup operation result resource. + LongTermRetentionBackupOperationResult +} + +// LongTermRetentionManagedInstanceBackupsClientDeleteByResourceGroupResponse contains the response from method LongTermRetentionManagedInstanceBackupsClient.BeginDeleteByResourceGroup. +type LongTermRetentionManagedInstanceBackupsClientDeleteByResourceGroupResponse struct { + // placeholder for future response values +} + +// LongTermRetentionManagedInstanceBackupsClientDeleteResponse contains the response from method LongTermRetentionManagedInstanceBackupsClient.BeginDelete. +type LongTermRetentionManagedInstanceBackupsClientDeleteResponse struct { + // placeholder for future response values +} + +// LongTermRetentionManagedInstanceBackupsClientGetByResourceGroupResponse contains the response from method LongTermRetentionManagedInstanceBackupsClient.GetByResourceGroup. +type LongTermRetentionManagedInstanceBackupsClientGetByResourceGroupResponse struct { + // A long term retention backup for a managed database. + ManagedInstanceLongTermRetentionBackup +} + +// LongTermRetentionManagedInstanceBackupsClientGetResponse contains the response from method LongTermRetentionManagedInstanceBackupsClient.Get. +type LongTermRetentionManagedInstanceBackupsClientGetResponse struct { + // A long term retention backup for a managed database. + ManagedInstanceLongTermRetentionBackup +} + +// LongTermRetentionManagedInstanceBackupsClientListByDatabaseResponse contains the response from method LongTermRetentionManagedInstanceBackupsClient.NewListByDatabasePager. +type LongTermRetentionManagedInstanceBackupsClientListByDatabaseResponse struct { + // A list of long term retention backups for managed database(s). + ManagedInstanceLongTermRetentionBackupListResult +} + +// LongTermRetentionManagedInstanceBackupsClientListByInstanceResponse contains the response from method LongTermRetentionManagedInstanceBackupsClient.NewListByInstancePager. +type LongTermRetentionManagedInstanceBackupsClientListByInstanceResponse struct { + // A list of long term retention backups for managed database(s). + ManagedInstanceLongTermRetentionBackupListResult +} + +// LongTermRetentionManagedInstanceBackupsClientListByLocationResponse contains the response from method LongTermRetentionManagedInstanceBackupsClient.NewListByLocationPager. +type LongTermRetentionManagedInstanceBackupsClientListByLocationResponse struct { + // A list of long term retention backups for managed database(s). + ManagedInstanceLongTermRetentionBackupListResult +} + +// LongTermRetentionManagedInstanceBackupsClientListByResourceGroupDatabaseResponse contains the response from method LongTermRetentionManagedInstanceBackupsClient.NewListByResourceGroupDatabasePager. +type LongTermRetentionManagedInstanceBackupsClientListByResourceGroupDatabaseResponse struct { + // A list of long term retention backups for managed database(s). + ManagedInstanceLongTermRetentionBackupListResult +} + +// LongTermRetentionManagedInstanceBackupsClientListByResourceGroupInstanceResponse contains the response from method LongTermRetentionManagedInstanceBackupsClient.NewListByResourceGroupInstancePager. +type LongTermRetentionManagedInstanceBackupsClientListByResourceGroupInstanceResponse struct { + // A list of long term retention backups for managed database(s). + ManagedInstanceLongTermRetentionBackupListResult +} + +// LongTermRetentionManagedInstanceBackupsClientListByResourceGroupLocationResponse contains the response from method LongTermRetentionManagedInstanceBackupsClient.NewListByResourceGroupLocationPager. +type LongTermRetentionManagedInstanceBackupsClientListByResourceGroupLocationResponse struct { + // A list of long term retention backups for managed database(s). + ManagedInstanceLongTermRetentionBackupListResult +} + +// LongTermRetentionPoliciesClientCreateOrUpdateResponse contains the response from method LongTermRetentionPoliciesClient.BeginCreateOrUpdate. +type LongTermRetentionPoliciesClientCreateOrUpdateResponse struct { + // A long term retention policy. + LongTermRetentionPolicy +} + +// LongTermRetentionPoliciesClientGetResponse contains the response from method LongTermRetentionPoliciesClient.Get. +type LongTermRetentionPoliciesClientGetResponse struct { + // A long term retention policy. + LongTermRetentionPolicy +} + +// LongTermRetentionPoliciesClientListByDatabaseResponse contains the response from method LongTermRetentionPoliciesClient.NewListByDatabasePager. +type LongTermRetentionPoliciesClientListByDatabaseResponse struct { + // A list of long term retention policies. + LongTermRetentionPolicyListResult +} + +// MaintenanceWindowOptionsClientGetResponse contains the response from method MaintenanceWindowOptionsClient.Get. +type MaintenanceWindowOptionsClientGetResponse struct { + // Maintenance window options. + MaintenanceWindowOptions +} + +// MaintenanceWindowsClientCreateOrUpdateResponse contains the response from method MaintenanceWindowsClient.CreateOrUpdate. +type MaintenanceWindowsClientCreateOrUpdateResponse struct { + // placeholder for future response values +} + +// MaintenanceWindowsClientGetResponse contains the response from method MaintenanceWindowsClient.Get. +type MaintenanceWindowsClientGetResponse struct { + // Maintenance windows. + MaintenanceWindows +} + +// ManagedBackupShortTermRetentionPoliciesClientCreateOrUpdateResponse contains the response from method ManagedBackupShortTermRetentionPoliciesClient.BeginCreateOrUpdate. +type ManagedBackupShortTermRetentionPoliciesClientCreateOrUpdateResponse struct { + // A short term retention policy. + ManagedBackupShortTermRetentionPolicy +} + +// ManagedBackupShortTermRetentionPoliciesClientGetResponse contains the response from method ManagedBackupShortTermRetentionPoliciesClient.Get. +type ManagedBackupShortTermRetentionPoliciesClientGetResponse struct { + // A short term retention policy. + ManagedBackupShortTermRetentionPolicy +} + +// ManagedBackupShortTermRetentionPoliciesClientListByDatabaseResponse contains the response from method ManagedBackupShortTermRetentionPoliciesClient.NewListByDatabasePager. +type ManagedBackupShortTermRetentionPoliciesClientListByDatabaseResponse struct { + // A list of short term retention policies. + ManagedBackupShortTermRetentionPolicyListResult +} + +// ManagedBackupShortTermRetentionPoliciesClientUpdateResponse contains the response from method ManagedBackupShortTermRetentionPoliciesClient.BeginUpdate. +type ManagedBackupShortTermRetentionPoliciesClientUpdateResponse struct { + // A short term retention policy. + ManagedBackupShortTermRetentionPolicy +} + +// ManagedDatabaseColumnsClientGetResponse contains the response from method ManagedDatabaseColumnsClient.Get. +type ManagedDatabaseColumnsClientGetResponse struct { + // A database column resource. + DatabaseColumn +} + +// ManagedDatabaseColumnsClientListByDatabaseResponse contains the response from method ManagedDatabaseColumnsClient.NewListByDatabasePager. +type ManagedDatabaseColumnsClientListByDatabaseResponse struct { + // A list of database columns. + DatabaseColumnListResult +} + +// ManagedDatabaseColumnsClientListByTableResponse contains the response from method ManagedDatabaseColumnsClient.NewListByTablePager. +type ManagedDatabaseColumnsClientListByTableResponse struct { + // A list of database columns. + DatabaseColumnListResult +} + +// ManagedDatabaseQueriesClientGetResponse contains the response from method ManagedDatabaseQueriesClient.Get. +type ManagedDatabaseQueriesClientGetResponse struct { + // Database query. + ManagedInstanceQuery +} + +// ManagedDatabaseQueriesClientListByQueryResponse contains the response from method ManagedDatabaseQueriesClient.NewListByQueryPager. +type ManagedDatabaseQueriesClientListByQueryResponse struct { + // Execution statistics for one particular query + ManagedInstanceQueryStatistics +} + +// ManagedDatabaseRecommendedSensitivityLabelsClientUpdateResponse contains the response from method ManagedDatabaseRecommendedSensitivityLabelsClient.Update. +type ManagedDatabaseRecommendedSensitivityLabelsClientUpdateResponse struct { + // placeholder for future response values +} + +// ManagedDatabaseRestoreDetailsClientGetResponse contains the response from method ManagedDatabaseRestoreDetailsClient.Get. +type ManagedDatabaseRestoreDetailsClientGetResponse struct { + // A managed database restore details. + ManagedDatabaseRestoreDetailsResult +} + +// ManagedDatabaseSchemasClientGetResponse contains the response from method ManagedDatabaseSchemasClient.Get. +type ManagedDatabaseSchemasClientGetResponse struct { + // A database schema resource. + DatabaseSchema +} + +// ManagedDatabaseSchemasClientListByDatabaseResponse contains the response from method ManagedDatabaseSchemasClient.NewListByDatabasePager. +type ManagedDatabaseSchemasClientListByDatabaseResponse struct { + // A list of database schemas. + DatabaseSchemaListResult +} + +// ManagedDatabaseSecurityAlertPoliciesClientCreateOrUpdateResponse contains the response from method ManagedDatabaseSecurityAlertPoliciesClient.CreateOrUpdate. +type ManagedDatabaseSecurityAlertPoliciesClientCreateOrUpdateResponse struct { + // A managed database security alert policy. + ManagedDatabaseSecurityAlertPolicy +} + +// ManagedDatabaseSecurityAlertPoliciesClientGetResponse contains the response from method ManagedDatabaseSecurityAlertPoliciesClient.Get. +type ManagedDatabaseSecurityAlertPoliciesClientGetResponse struct { + // A managed database security alert policy. + ManagedDatabaseSecurityAlertPolicy +} + +// ManagedDatabaseSecurityAlertPoliciesClientListByDatabaseResponse contains the response from method ManagedDatabaseSecurityAlertPoliciesClient.NewListByDatabasePager. +type ManagedDatabaseSecurityAlertPoliciesClientListByDatabaseResponse struct { + // A list of the managed database's security alert policies. + ManagedDatabaseSecurityAlertPolicyListResult +} + +// ManagedDatabaseSecurityEventsClientListByDatabaseResponse contains the response from method ManagedDatabaseSecurityEventsClient.NewListByDatabasePager. +type ManagedDatabaseSecurityEventsClientListByDatabaseResponse struct { + // A list of security events. + SecurityEventCollection +} + +// ManagedDatabaseSensitivityLabelsClientCreateOrUpdateResponse contains the response from method ManagedDatabaseSensitivityLabelsClient.CreateOrUpdate. +type ManagedDatabaseSensitivityLabelsClientCreateOrUpdateResponse struct { + // A sensitivity label. + SensitivityLabel +} + +// ManagedDatabaseSensitivityLabelsClientDeleteResponse contains the response from method ManagedDatabaseSensitivityLabelsClient.Delete. +type ManagedDatabaseSensitivityLabelsClientDeleteResponse struct { + // placeholder for future response values +} + +// ManagedDatabaseSensitivityLabelsClientDisableRecommendationResponse contains the response from method ManagedDatabaseSensitivityLabelsClient.DisableRecommendation. +type ManagedDatabaseSensitivityLabelsClientDisableRecommendationResponse struct { + // placeholder for future response values +} + +// ManagedDatabaseSensitivityLabelsClientEnableRecommendationResponse contains the response from method ManagedDatabaseSensitivityLabelsClient.EnableRecommendation. +type ManagedDatabaseSensitivityLabelsClientEnableRecommendationResponse struct { + // placeholder for future response values +} + +// ManagedDatabaseSensitivityLabelsClientGetResponse contains the response from method ManagedDatabaseSensitivityLabelsClient.Get. +type ManagedDatabaseSensitivityLabelsClientGetResponse struct { + // A sensitivity label. + SensitivityLabel +} + +// ManagedDatabaseSensitivityLabelsClientListCurrentByDatabaseResponse contains the response from method ManagedDatabaseSensitivityLabelsClient.NewListCurrentByDatabasePager. +type ManagedDatabaseSensitivityLabelsClientListCurrentByDatabaseResponse struct { + // A list of sensitivity labels. + SensitivityLabelListResult +} + +// ManagedDatabaseSensitivityLabelsClientListRecommendedByDatabaseResponse contains the response from method ManagedDatabaseSensitivityLabelsClient.NewListRecommendedByDatabasePager. +type ManagedDatabaseSensitivityLabelsClientListRecommendedByDatabaseResponse struct { + // A list of sensitivity labels. + SensitivityLabelListResult +} + +// ManagedDatabaseSensitivityLabelsClientUpdateResponse contains the response from method ManagedDatabaseSensitivityLabelsClient.Update. +type ManagedDatabaseSensitivityLabelsClientUpdateResponse struct { + // placeholder for future response values +} + +// ManagedDatabaseTablesClientGetResponse contains the response from method ManagedDatabaseTablesClient.Get. +type ManagedDatabaseTablesClientGetResponse struct { + // A database table resource. + DatabaseTable +} + +// ManagedDatabaseTablesClientListBySchemaResponse contains the response from method ManagedDatabaseTablesClient.NewListBySchemaPager. +type ManagedDatabaseTablesClientListBySchemaResponse struct { + // A list of database tables. + DatabaseTableListResult +} + +// ManagedDatabaseTransparentDataEncryptionClientCreateOrUpdateResponse contains the response from method ManagedDatabaseTransparentDataEncryptionClient.CreateOrUpdate. +type ManagedDatabaseTransparentDataEncryptionClientCreateOrUpdateResponse struct { + // A managed database transparent data encryption state. + ManagedTransparentDataEncryption +} + +// ManagedDatabaseTransparentDataEncryptionClientGetResponse contains the response from method ManagedDatabaseTransparentDataEncryptionClient.Get. +type ManagedDatabaseTransparentDataEncryptionClientGetResponse struct { + // A managed database transparent data encryption state. + ManagedTransparentDataEncryption +} + +// ManagedDatabaseTransparentDataEncryptionClientListByDatabaseResponse contains the response from method ManagedDatabaseTransparentDataEncryptionClient.NewListByDatabasePager. +type ManagedDatabaseTransparentDataEncryptionClientListByDatabaseResponse struct { + // A list of managed transparent data encryptions + ManagedTransparentDataEncryptionListResult +} + +// ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateResponse contains the response from method ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient.CreateOrUpdate. +type ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateResponse struct { + // A database vulnerability assessment rule baseline. + DatabaseVulnerabilityAssessmentRuleBaseline +} + +// ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientDeleteResponse contains the response from method ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient.Delete. +type ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientDeleteResponse struct { + // placeholder for future response values +} + +// ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientGetResponse contains the response from method ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient.Get. +type ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientGetResponse struct { + // A database vulnerability assessment rule baseline. + DatabaseVulnerabilityAssessmentRuleBaseline +} + +// ManagedDatabaseVulnerabilityAssessmentScansClientExportResponse contains the response from method ManagedDatabaseVulnerabilityAssessmentScansClient.Export. +type ManagedDatabaseVulnerabilityAssessmentScansClientExportResponse struct { + // A database Vulnerability Assessment scan export resource. + DatabaseVulnerabilityAssessmentScansExport +} + +// ManagedDatabaseVulnerabilityAssessmentScansClientGetResponse contains the response from method ManagedDatabaseVulnerabilityAssessmentScansClient.Get. +type ManagedDatabaseVulnerabilityAssessmentScansClientGetResponse struct { + // A vulnerability assessment scan record. + VulnerabilityAssessmentScanRecord +} + +// ManagedDatabaseVulnerabilityAssessmentScansClientInitiateScanResponse contains the response from method ManagedDatabaseVulnerabilityAssessmentScansClient.BeginInitiateScan. +type ManagedDatabaseVulnerabilityAssessmentScansClientInitiateScanResponse struct { + // placeholder for future response values +} + +// ManagedDatabaseVulnerabilityAssessmentScansClientListByDatabaseResponse contains the response from method ManagedDatabaseVulnerabilityAssessmentScansClient.NewListByDatabasePager. +type ManagedDatabaseVulnerabilityAssessmentScansClientListByDatabaseResponse struct { + // A list of vulnerability assessment scan records. + VulnerabilityAssessmentScanRecordListResult +} + +// ManagedDatabaseVulnerabilityAssessmentsClientCreateOrUpdateResponse contains the response from method ManagedDatabaseVulnerabilityAssessmentsClient.CreateOrUpdate. +type ManagedDatabaseVulnerabilityAssessmentsClientCreateOrUpdateResponse struct { + // A database vulnerability assessment. + DatabaseVulnerabilityAssessment +} + +// ManagedDatabaseVulnerabilityAssessmentsClientDeleteResponse contains the response from method ManagedDatabaseVulnerabilityAssessmentsClient.Delete. +type ManagedDatabaseVulnerabilityAssessmentsClientDeleteResponse struct { + // placeholder for future response values +} + +// ManagedDatabaseVulnerabilityAssessmentsClientGetResponse contains the response from method ManagedDatabaseVulnerabilityAssessmentsClient.Get. +type ManagedDatabaseVulnerabilityAssessmentsClientGetResponse struct { + // A database vulnerability assessment. + DatabaseVulnerabilityAssessment +} + +// ManagedDatabaseVulnerabilityAssessmentsClientListByDatabaseResponse contains the response from method ManagedDatabaseVulnerabilityAssessmentsClient.NewListByDatabasePager. +type ManagedDatabaseVulnerabilityAssessmentsClientListByDatabaseResponse struct { + // A list of the database's vulnerability assessments. + DatabaseVulnerabilityAssessmentListResult +} + +// ManagedDatabasesClientCompleteRestoreResponse contains the response from method ManagedDatabasesClient.BeginCompleteRestore. +type ManagedDatabasesClientCompleteRestoreResponse struct { + // placeholder for future response values +} + +// ManagedDatabasesClientCreateOrUpdateResponse contains the response from method ManagedDatabasesClient.BeginCreateOrUpdate. +type ManagedDatabasesClientCreateOrUpdateResponse struct { + // A managed database resource. + ManagedDatabase +} + +// ManagedDatabasesClientDeleteResponse contains the response from method ManagedDatabasesClient.BeginDelete. +type ManagedDatabasesClientDeleteResponse struct { + // placeholder for future response values +} + +// ManagedDatabasesClientGetResponse contains the response from method ManagedDatabasesClient.Get. +type ManagedDatabasesClientGetResponse struct { + // A managed database resource. + ManagedDatabase +} + +// ManagedDatabasesClientListByInstanceResponse contains the response from method ManagedDatabasesClient.NewListByInstancePager. +type ManagedDatabasesClientListByInstanceResponse struct { + // A list of managed databases. + ManagedDatabaseListResult +} + +// ManagedDatabasesClientListInaccessibleByInstanceResponse contains the response from method ManagedDatabasesClient.NewListInaccessibleByInstancePager. +type ManagedDatabasesClientListInaccessibleByInstanceResponse struct { + // A list of managed databases. + ManagedDatabaseListResult +} + +// ManagedDatabasesClientUpdateResponse contains the response from method ManagedDatabasesClient.BeginUpdate. +type ManagedDatabasesClientUpdateResponse struct { + // A managed database resource. + ManagedDatabase +} + +// ManagedInstanceAdministratorsClientCreateOrUpdateResponse contains the response from method ManagedInstanceAdministratorsClient.BeginCreateOrUpdate. +type ManagedInstanceAdministratorsClientCreateOrUpdateResponse struct { + // An Azure SQL managed instance administrator. + ManagedInstanceAdministrator +} + +// ManagedInstanceAdministratorsClientDeleteResponse contains the response from method ManagedInstanceAdministratorsClient.BeginDelete. +type ManagedInstanceAdministratorsClientDeleteResponse struct { + // placeholder for future response values +} + +// ManagedInstanceAdministratorsClientGetResponse contains the response from method ManagedInstanceAdministratorsClient.Get. +type ManagedInstanceAdministratorsClientGetResponse struct { + // An Azure SQL managed instance administrator. + ManagedInstanceAdministrator +} + +// ManagedInstanceAdministratorsClientListByInstanceResponse contains the response from method ManagedInstanceAdministratorsClient.NewListByInstancePager. +type ManagedInstanceAdministratorsClientListByInstanceResponse struct { + // A list of managed instance administrators. + ManagedInstanceAdministratorListResult +} + +// ManagedInstanceAzureADOnlyAuthenticationsClientCreateOrUpdateResponse contains the response from method ManagedInstanceAzureADOnlyAuthenticationsClient.BeginCreateOrUpdate. +type ManagedInstanceAzureADOnlyAuthenticationsClientCreateOrUpdateResponse struct { + // Azure Active Directory only authentication. + ManagedInstanceAzureADOnlyAuthentication +} + +// ManagedInstanceAzureADOnlyAuthenticationsClientDeleteResponse contains the response from method ManagedInstanceAzureADOnlyAuthenticationsClient.BeginDelete. +type ManagedInstanceAzureADOnlyAuthenticationsClientDeleteResponse struct { + // placeholder for future response values +} + +// ManagedInstanceAzureADOnlyAuthenticationsClientGetResponse contains the response from method ManagedInstanceAzureADOnlyAuthenticationsClient.Get. +type ManagedInstanceAzureADOnlyAuthenticationsClientGetResponse struct { + // Azure Active Directory only authentication. + ManagedInstanceAzureADOnlyAuthentication +} + +// ManagedInstanceAzureADOnlyAuthenticationsClientListByInstanceResponse contains the response from method ManagedInstanceAzureADOnlyAuthenticationsClient.NewListByInstancePager. +type ManagedInstanceAzureADOnlyAuthenticationsClientListByInstanceResponse struct { + // A list of active directory only authentications. + ManagedInstanceAzureADOnlyAuthListResult +} + +// ManagedInstanceEncryptionProtectorsClientCreateOrUpdateResponse contains the response from method ManagedInstanceEncryptionProtectorsClient.BeginCreateOrUpdate. +type ManagedInstanceEncryptionProtectorsClientCreateOrUpdateResponse struct { + // The managed instance encryption protector. + ManagedInstanceEncryptionProtector +} + +// ManagedInstanceEncryptionProtectorsClientGetResponse contains the response from method ManagedInstanceEncryptionProtectorsClient.Get. +type ManagedInstanceEncryptionProtectorsClientGetResponse struct { + // The managed instance encryption protector. + ManagedInstanceEncryptionProtector +} + +// ManagedInstanceEncryptionProtectorsClientListByInstanceResponse contains the response from method ManagedInstanceEncryptionProtectorsClient.NewListByInstancePager. +type ManagedInstanceEncryptionProtectorsClientListByInstanceResponse struct { + // A list of managed instance encryption protectors. + ManagedInstanceEncryptionProtectorListResult +} + +// ManagedInstanceEncryptionProtectorsClientRevalidateResponse contains the response from method ManagedInstanceEncryptionProtectorsClient.BeginRevalidate. +type ManagedInstanceEncryptionProtectorsClientRevalidateResponse struct { + // placeholder for future response values +} + +// ManagedInstanceKeysClientCreateOrUpdateResponse contains the response from method ManagedInstanceKeysClient.BeginCreateOrUpdate. +type ManagedInstanceKeysClientCreateOrUpdateResponse struct { + // A managed instance key. + ManagedInstanceKey +} + +// ManagedInstanceKeysClientDeleteResponse contains the response from method ManagedInstanceKeysClient.BeginDelete. +type ManagedInstanceKeysClientDeleteResponse struct { + // placeholder for future response values +} + +// ManagedInstanceKeysClientGetResponse contains the response from method ManagedInstanceKeysClient.Get. +type ManagedInstanceKeysClientGetResponse struct { + // A managed instance key. + ManagedInstanceKey +} + +// ManagedInstanceKeysClientListByInstanceResponse contains the response from method ManagedInstanceKeysClient.NewListByInstancePager. +type ManagedInstanceKeysClientListByInstanceResponse struct { + // A list of managed instance keys. + ManagedInstanceKeyListResult +} + +// ManagedInstanceLongTermRetentionPoliciesClientCreateOrUpdateResponse contains the response from method ManagedInstanceLongTermRetentionPoliciesClient.BeginCreateOrUpdate. +type ManagedInstanceLongTermRetentionPoliciesClientCreateOrUpdateResponse struct { + // A long term retention policy. + ManagedInstanceLongTermRetentionPolicy +} + +// ManagedInstanceLongTermRetentionPoliciesClientGetResponse contains the response from method ManagedInstanceLongTermRetentionPoliciesClient.Get. +type ManagedInstanceLongTermRetentionPoliciesClientGetResponse struct { + // A long term retention policy. + ManagedInstanceLongTermRetentionPolicy +} + +// ManagedInstanceLongTermRetentionPoliciesClientListByDatabaseResponse contains the response from method ManagedInstanceLongTermRetentionPoliciesClient.NewListByDatabasePager. +type ManagedInstanceLongTermRetentionPoliciesClientListByDatabaseResponse struct { + // A list of long term retention policies. + ManagedInstanceLongTermRetentionPolicyListResult +} + +// ManagedInstanceOperationsClientCancelResponse contains the response from method ManagedInstanceOperationsClient.Cancel. +type ManagedInstanceOperationsClientCancelResponse struct { + // placeholder for future response values +} + +// ManagedInstanceOperationsClientGetResponse contains the response from method ManagedInstanceOperationsClient.Get. +type ManagedInstanceOperationsClientGetResponse struct { + // A managed instance operation. + ManagedInstanceOperation +} + +// ManagedInstanceOperationsClientListByManagedInstanceResponse contains the response from method ManagedInstanceOperationsClient.NewListByManagedInstancePager. +type ManagedInstanceOperationsClientListByManagedInstanceResponse struct { + // The response to a list managed instance operations request + ManagedInstanceOperationListResult +} + +// ManagedInstancePrivateEndpointConnectionsClientCreateOrUpdateResponse contains the response from method ManagedInstancePrivateEndpointConnectionsClient.BeginCreateOrUpdate. +type ManagedInstancePrivateEndpointConnectionsClientCreateOrUpdateResponse struct { + // A private endpoint connection + ManagedInstancePrivateEndpointConnection +} + +// ManagedInstancePrivateEndpointConnectionsClientDeleteResponse contains the response from method ManagedInstancePrivateEndpointConnectionsClient.BeginDelete. +type ManagedInstancePrivateEndpointConnectionsClientDeleteResponse struct { + // placeholder for future response values +} + +// ManagedInstancePrivateEndpointConnectionsClientGetResponse contains the response from method ManagedInstancePrivateEndpointConnectionsClient.Get. +type ManagedInstancePrivateEndpointConnectionsClientGetResponse struct { + // A private endpoint connection + ManagedInstancePrivateEndpointConnection +} + +// ManagedInstancePrivateEndpointConnectionsClientListByManagedInstanceResponse contains the response from method ManagedInstancePrivateEndpointConnectionsClient.NewListByManagedInstancePager. +type ManagedInstancePrivateEndpointConnectionsClientListByManagedInstanceResponse struct { + // A list of private endpoint connections. + ManagedInstancePrivateEndpointConnectionListResult +} + +// ManagedInstancePrivateLinkResourcesClientGetResponse contains the response from method ManagedInstancePrivateLinkResourcesClient.Get. +type ManagedInstancePrivateLinkResourcesClientGetResponse struct { + // A private link resource + ManagedInstancePrivateLink +} + +// ManagedInstancePrivateLinkResourcesClientListByManagedInstanceResponse contains the response from method ManagedInstancePrivateLinkResourcesClient.NewListByManagedInstancePager. +type ManagedInstancePrivateLinkResourcesClientListByManagedInstanceResponse struct { + // A list of private link resources + ManagedInstancePrivateLinkListResult +} + +// ManagedInstanceTdeCertificatesClientCreateResponse contains the response from method ManagedInstanceTdeCertificatesClient.BeginCreate. +type ManagedInstanceTdeCertificatesClientCreateResponse struct { + // placeholder for future response values +} + +// ManagedInstanceVulnerabilityAssessmentsClientCreateOrUpdateResponse contains the response from method ManagedInstanceVulnerabilityAssessmentsClient.CreateOrUpdate. +type ManagedInstanceVulnerabilityAssessmentsClientCreateOrUpdateResponse struct { + // A managed instance vulnerability assessment. + ManagedInstanceVulnerabilityAssessment +} + +// ManagedInstanceVulnerabilityAssessmentsClientDeleteResponse contains the response from method ManagedInstanceVulnerabilityAssessmentsClient.Delete. +type ManagedInstanceVulnerabilityAssessmentsClientDeleteResponse struct { + // placeholder for future response values +} + +// ManagedInstanceVulnerabilityAssessmentsClientGetResponse contains the response from method ManagedInstanceVulnerabilityAssessmentsClient.Get. +type ManagedInstanceVulnerabilityAssessmentsClientGetResponse struct { + // A managed instance vulnerability assessment. + ManagedInstanceVulnerabilityAssessment +} + +// ManagedInstanceVulnerabilityAssessmentsClientListByInstanceResponse contains the response from method ManagedInstanceVulnerabilityAssessmentsClient.NewListByInstancePager. +type ManagedInstanceVulnerabilityAssessmentsClientListByInstanceResponse struct { + // A list of the ManagedInstance's vulnerability assessments. + ManagedInstanceVulnerabilityAssessmentListResult +} + +// ManagedInstancesClientCreateOrUpdateResponse contains the response from method ManagedInstancesClient.BeginCreateOrUpdate. +type ManagedInstancesClientCreateOrUpdateResponse struct { + // An Azure SQL managed instance. + ManagedInstance +} + +// ManagedInstancesClientDeleteResponse contains the response from method ManagedInstancesClient.BeginDelete. +type ManagedInstancesClientDeleteResponse struct { + // placeholder for future response values +} + +// ManagedInstancesClientFailoverResponse contains the response from method ManagedInstancesClient.BeginFailover. +type ManagedInstancesClientFailoverResponse struct { + // placeholder for future response values +} + +// ManagedInstancesClientGetResponse contains the response from method ManagedInstancesClient.Get. +type ManagedInstancesClientGetResponse struct { + // An Azure SQL managed instance. + ManagedInstance +} + +// ManagedInstancesClientListByInstancePoolResponse contains the response from method ManagedInstancesClient.NewListByInstancePoolPager. +type ManagedInstancesClientListByInstancePoolResponse struct { + // A list of managed instances. + ManagedInstanceListResult +} + +// ManagedInstancesClientListByManagedInstanceResponse contains the response from method ManagedInstancesClient.NewListByManagedInstancePager. +type ManagedInstancesClientListByManagedInstanceResponse struct { + // A list of top resource consuming queries on managed instance + TopQueriesListResult +} + +// ManagedInstancesClientListByResourceGroupResponse contains the response from method ManagedInstancesClient.NewListByResourceGroupPager. +type ManagedInstancesClientListByResourceGroupResponse struct { + // A list of managed instances. + ManagedInstanceListResult +} + +// ManagedInstancesClientListResponse contains the response from method ManagedInstancesClient.NewListPager. +type ManagedInstancesClientListResponse struct { + // A list of managed instances. + ManagedInstanceListResult +} + +// ManagedInstancesClientUpdateResponse contains the response from method ManagedInstancesClient.BeginUpdate. +type ManagedInstancesClientUpdateResponse struct { + // An Azure SQL managed instance. + ManagedInstance +} + +// ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientCreateOrUpdateResponse contains the response from +// method ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient.BeginCreateOrUpdate. +type ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientCreateOrUpdateResponse struct { + // A short term retention policy. + ManagedBackupShortTermRetentionPolicy +} + +// ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientGetResponse contains the response from method ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient.Get. +type ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientGetResponse struct { + // A short term retention policy. + ManagedBackupShortTermRetentionPolicy +} + +// ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientListByRestorableDroppedDatabaseResponse contains +// the response from method ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient.NewListByRestorableDroppedDatabasePager. +type ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientListByRestorableDroppedDatabaseResponse struct { + // A list of short term retention policies. + ManagedBackupShortTermRetentionPolicyListResult +} + +// ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientUpdateResponse contains the response from method +// ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient.BeginUpdate. +type ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientUpdateResponse struct { + // A short term retention policy. + ManagedBackupShortTermRetentionPolicy +} + +// ManagedServerSecurityAlertPoliciesClientCreateOrUpdateResponse contains the response from method ManagedServerSecurityAlertPoliciesClient.BeginCreateOrUpdate. +type ManagedServerSecurityAlertPoliciesClientCreateOrUpdateResponse struct { + // A managed server security alert policy. + ManagedServerSecurityAlertPolicy +} + +// ManagedServerSecurityAlertPoliciesClientGetResponse contains the response from method ManagedServerSecurityAlertPoliciesClient.Get. +type ManagedServerSecurityAlertPoliciesClientGetResponse struct { + // A managed server security alert policy. + ManagedServerSecurityAlertPolicy +} + +// ManagedServerSecurityAlertPoliciesClientListByInstanceResponse contains the response from method ManagedServerSecurityAlertPoliciesClient.NewListByInstancePager. +type ManagedServerSecurityAlertPoliciesClientListByInstanceResponse struct { + // A list of the managed Server's security alert policies. + ManagedServerSecurityAlertPolicyListResult +} + +// OperationsClientListResponse contains the response from method OperationsClient.NewListPager. +type OperationsClientListResponse struct { + // Result of the request to list SQL operations. + OperationListResult +} + +// OutboundFirewallRulesClientCreateOrUpdateResponse contains the response from method OutboundFirewallRulesClient.BeginCreateOrUpdate. +type OutboundFirewallRulesClientCreateOrUpdateResponse struct { + // An Azure SQL DB Server Outbound Firewall Rule. + OutboundFirewallRule +} + +// OutboundFirewallRulesClientDeleteResponse contains the response from method OutboundFirewallRulesClient.BeginDelete. +type OutboundFirewallRulesClientDeleteResponse struct { + // placeholder for future response values +} + +// OutboundFirewallRulesClientGetResponse contains the response from method OutboundFirewallRulesClient.Get. +type OutboundFirewallRulesClientGetResponse struct { + // An Azure SQL DB Server Outbound Firewall Rule. + OutboundFirewallRule +} + +// OutboundFirewallRulesClientListByServerResponse contains the response from method OutboundFirewallRulesClient.NewListByServerPager. +type OutboundFirewallRulesClientListByServerResponse struct { + // A list of outbound rules. + OutboundFirewallRuleListResult +} + +// PrivateEndpointConnectionsClientCreateOrUpdateResponse contains the response from method PrivateEndpointConnectionsClient.BeginCreateOrUpdate. +type PrivateEndpointConnectionsClientCreateOrUpdateResponse struct { + // A private endpoint connection + PrivateEndpointConnection +} + +// PrivateEndpointConnectionsClientDeleteResponse contains the response from method PrivateEndpointConnectionsClient.BeginDelete. +type PrivateEndpointConnectionsClientDeleteResponse struct { + // placeholder for future response values +} + +// PrivateEndpointConnectionsClientGetResponse contains the response from method PrivateEndpointConnectionsClient.Get. +type PrivateEndpointConnectionsClientGetResponse struct { + // A private endpoint connection + PrivateEndpointConnection +} + +// PrivateEndpointConnectionsClientListByServerResponse contains the response from method PrivateEndpointConnectionsClient.NewListByServerPager. +type PrivateEndpointConnectionsClientListByServerResponse struct { + // A list of private endpoint connections. + PrivateEndpointConnectionListResult +} + +// PrivateLinkResourcesClientGetResponse contains the response from method PrivateLinkResourcesClient.Get. +type PrivateLinkResourcesClientGetResponse struct { + // A private link resource + PrivateLinkResource +} + +// PrivateLinkResourcesClientListByServerResponse contains the response from method PrivateLinkResourcesClient.NewListByServerPager. +type PrivateLinkResourcesClientListByServerResponse struct { + // A list of private link resources + PrivateLinkResourceListResult +} + +// RecommendedSensitivityLabelsClientUpdateResponse contains the response from method RecommendedSensitivityLabelsClient.Update. +type RecommendedSensitivityLabelsClientUpdateResponse struct { + // placeholder for future response values +} + +// RecoverableDatabasesClientGetResponse contains the response from method RecoverableDatabasesClient.Get. +type RecoverableDatabasesClientGetResponse struct { + // A recoverable database + RecoverableDatabase +} + +// RecoverableDatabasesClientListByServerResponse contains the response from method RecoverableDatabasesClient.NewListByServerPager. +type RecoverableDatabasesClientListByServerResponse struct { + // The response to a list recoverable databases request + RecoverableDatabaseListResult +} + +// RecoverableManagedDatabasesClientGetResponse contains the response from method RecoverableManagedDatabasesClient.Get. +type RecoverableManagedDatabasesClientGetResponse struct { + // A recoverable managed database resource. + RecoverableManagedDatabase +} + +// RecoverableManagedDatabasesClientListByInstanceResponse contains the response from method RecoverableManagedDatabasesClient.NewListByInstancePager. +type RecoverableManagedDatabasesClientListByInstanceResponse struct { + // A list of recoverable managed databases. + RecoverableManagedDatabaseListResult +} + +// ReplicationLinksClientDeleteResponse contains the response from method ReplicationLinksClient.Delete. +type ReplicationLinksClientDeleteResponse struct { + // placeholder for future response values +} + +// ReplicationLinksClientFailoverAllowDataLossResponse contains the response from method ReplicationLinksClient.BeginFailoverAllowDataLoss. +type ReplicationLinksClientFailoverAllowDataLossResponse struct { + // A replication link. + ReplicationLink +} + +// ReplicationLinksClientFailoverResponse contains the response from method ReplicationLinksClient.BeginFailover. +type ReplicationLinksClientFailoverResponse struct { + // A replication link. + ReplicationLink +} + +// ReplicationLinksClientGetResponse contains the response from method ReplicationLinksClient.Get. +type ReplicationLinksClientGetResponse struct { + // A replication link. + ReplicationLink +} + +// ReplicationLinksClientListByDatabaseResponse contains the response from method ReplicationLinksClient.NewListByDatabasePager. +type ReplicationLinksClientListByDatabaseResponse struct { + // A list of replication links. + ReplicationLinkListResult +} + +// ReplicationLinksClientListByServerResponse contains the response from method ReplicationLinksClient.NewListByServerPager. +type ReplicationLinksClientListByServerResponse struct { + // A list of replication links. + ReplicationLinkListResult +} + +// RestorableDroppedDatabasesClientGetResponse contains the response from method RestorableDroppedDatabasesClient.Get. +type RestorableDroppedDatabasesClientGetResponse struct { + // A restorable dropped database resource. + RestorableDroppedDatabase +} + +// RestorableDroppedDatabasesClientListByServerResponse contains the response from method RestorableDroppedDatabasesClient.NewListByServerPager. +type RestorableDroppedDatabasesClientListByServerResponse struct { + // A list of restorable dropped databases. + RestorableDroppedDatabaseListResult +} + +// RestorableDroppedManagedDatabasesClientGetResponse contains the response from method RestorableDroppedManagedDatabasesClient.Get. +type RestorableDroppedManagedDatabasesClientGetResponse struct { + // A restorable dropped managed database resource. + RestorableDroppedManagedDatabase +} + +// RestorableDroppedManagedDatabasesClientListByInstanceResponse contains the response from method RestorableDroppedManagedDatabasesClient.NewListByInstancePager. +type RestorableDroppedManagedDatabasesClientListByInstanceResponse struct { + // A list of restorable dropped managed databases. + RestorableDroppedManagedDatabaseListResult +} + +// RestorePointsClientCreateResponse contains the response from method RestorePointsClient.BeginCreate. +type RestorePointsClientCreateResponse struct { + // Database restore points. + RestorePoint +} + +// RestorePointsClientDeleteResponse contains the response from method RestorePointsClient.Delete. +type RestorePointsClientDeleteResponse struct { + // placeholder for future response values +} + +// RestorePointsClientGetResponse contains the response from method RestorePointsClient.Get. +type RestorePointsClientGetResponse struct { + // Database restore points. + RestorePoint +} + +// RestorePointsClientListByDatabaseResponse contains the response from method RestorePointsClient.NewListByDatabasePager. +type RestorePointsClientListByDatabaseResponse struct { + // A list of long term retention backups. + RestorePointListResult +} + +// SensitivityLabelsClientCreateOrUpdateResponse contains the response from method SensitivityLabelsClient.CreateOrUpdate. +type SensitivityLabelsClientCreateOrUpdateResponse struct { + // A sensitivity label. + SensitivityLabel +} + +// SensitivityLabelsClientDeleteResponse contains the response from method SensitivityLabelsClient.Delete. +type SensitivityLabelsClientDeleteResponse struct { + // placeholder for future response values +} + +// SensitivityLabelsClientDisableRecommendationResponse contains the response from method SensitivityLabelsClient.DisableRecommendation. +type SensitivityLabelsClientDisableRecommendationResponse struct { + // placeholder for future response values +} + +// SensitivityLabelsClientEnableRecommendationResponse contains the response from method SensitivityLabelsClient.EnableRecommendation. +type SensitivityLabelsClientEnableRecommendationResponse struct { + // placeholder for future response values +} + +// SensitivityLabelsClientGetResponse contains the response from method SensitivityLabelsClient.Get. +type SensitivityLabelsClientGetResponse struct { + // A sensitivity label. + SensitivityLabel +} + +// SensitivityLabelsClientListCurrentByDatabaseResponse contains the response from method SensitivityLabelsClient.NewListCurrentByDatabasePager. +type SensitivityLabelsClientListCurrentByDatabaseResponse struct { + // A list of sensitivity labels. + SensitivityLabelListResult +} + +// SensitivityLabelsClientListRecommendedByDatabaseResponse contains the response from method SensitivityLabelsClient.NewListRecommendedByDatabasePager. +type SensitivityLabelsClientListRecommendedByDatabaseResponse struct { + // A list of sensitivity labels. + SensitivityLabelListResult +} + +// SensitivityLabelsClientUpdateResponse contains the response from method SensitivityLabelsClient.Update. +type SensitivityLabelsClientUpdateResponse struct { + // placeholder for future response values +} + +// ServerAdvancedThreatProtectionSettingsClientCreateOrUpdateResponse contains the response from method ServerAdvancedThreatProtectionSettingsClient.BeginCreateOrUpdate. +type ServerAdvancedThreatProtectionSettingsClientCreateOrUpdateResponse struct { + // A server Advanced Threat Protection. + ServerAdvancedThreatProtection +} + +// ServerAdvancedThreatProtectionSettingsClientGetResponse contains the response from method ServerAdvancedThreatProtectionSettingsClient.Get. +type ServerAdvancedThreatProtectionSettingsClientGetResponse struct { + // A server Advanced Threat Protection. + ServerAdvancedThreatProtection +} + +// ServerAdvancedThreatProtectionSettingsClientListByServerResponse contains the response from method ServerAdvancedThreatProtectionSettingsClient.NewListByServerPager. +type ServerAdvancedThreatProtectionSettingsClientListByServerResponse struct { + // A list of the server's Advanced Threat Protection configurations. + LogicalServerAdvancedThreatProtectionListResult +} + +// ServerAdvisorsClientGetResponse contains the response from method ServerAdvisorsClient.Get. +type ServerAdvisorsClientGetResponse struct { + // Database, Server or Elastic Pool Advisor. + Advisor +} + +// ServerAdvisorsClientListByServerResponse contains the response from method ServerAdvisorsClient.ListByServer. +type ServerAdvisorsClientListByServerResponse struct { + // Array of Advisor + AdvisorArray []*Advisor +} + +// ServerAdvisorsClientUpdateResponse contains the response from method ServerAdvisorsClient.Update. +type ServerAdvisorsClientUpdateResponse struct { + // Database, Server or Elastic Pool Advisor. + Advisor +} + +// ServerAutomaticTuningClientGetResponse contains the response from method ServerAutomaticTuningClient.Get. +type ServerAutomaticTuningClientGetResponse struct { + // Server-level Automatic Tuning. + ServerAutomaticTuning +} + +// ServerAutomaticTuningClientUpdateResponse contains the response from method ServerAutomaticTuningClient.Update. +type ServerAutomaticTuningClientUpdateResponse struct { + // Server-level Automatic Tuning. + ServerAutomaticTuning +} + +// ServerAzureADAdministratorsClientCreateOrUpdateResponse contains the response from method ServerAzureADAdministratorsClient.BeginCreateOrUpdate. +type ServerAzureADAdministratorsClientCreateOrUpdateResponse struct { + // Azure Active Directory administrator. + ServerAzureADAdministrator +} + +// ServerAzureADAdministratorsClientDeleteResponse contains the response from method ServerAzureADAdministratorsClient.BeginDelete. +type ServerAzureADAdministratorsClientDeleteResponse struct { + // placeholder for future response values +} + +// ServerAzureADAdministratorsClientGetResponse contains the response from method ServerAzureADAdministratorsClient.Get. +type ServerAzureADAdministratorsClientGetResponse struct { + // Azure Active Directory administrator. + ServerAzureADAdministrator +} + +// ServerAzureADAdministratorsClientListByServerResponse contains the response from method ServerAzureADAdministratorsClient.NewListByServerPager. +type ServerAzureADAdministratorsClientListByServerResponse struct { + // A list of active directory administrators. + AdministratorListResult +} + +// ServerAzureADOnlyAuthenticationsClientCreateOrUpdateResponse contains the response from method ServerAzureADOnlyAuthenticationsClient.BeginCreateOrUpdate. +type ServerAzureADOnlyAuthenticationsClientCreateOrUpdateResponse struct { + // Azure Active Directory only authentication. + ServerAzureADOnlyAuthentication +} + +// ServerAzureADOnlyAuthenticationsClientDeleteResponse contains the response from method ServerAzureADOnlyAuthenticationsClient.BeginDelete. +type ServerAzureADOnlyAuthenticationsClientDeleteResponse struct { + // placeholder for future response values +} + +// ServerAzureADOnlyAuthenticationsClientGetResponse contains the response from method ServerAzureADOnlyAuthenticationsClient.Get. +type ServerAzureADOnlyAuthenticationsClientGetResponse struct { + // Azure Active Directory only authentication. + ServerAzureADOnlyAuthentication +} + +// ServerAzureADOnlyAuthenticationsClientListByServerResponse contains the response from method ServerAzureADOnlyAuthenticationsClient.NewListByServerPager. +type ServerAzureADOnlyAuthenticationsClientListByServerResponse struct { + // A list of active directory only authentications. + AzureADOnlyAuthListResult +} + +// ServerBlobAuditingPoliciesClientCreateOrUpdateResponse contains the response from method ServerBlobAuditingPoliciesClient.BeginCreateOrUpdate. +type ServerBlobAuditingPoliciesClientCreateOrUpdateResponse struct { + // A server blob auditing policy. + ServerBlobAuditingPolicy +} + +// ServerBlobAuditingPoliciesClientGetResponse contains the response from method ServerBlobAuditingPoliciesClient.Get. +type ServerBlobAuditingPoliciesClientGetResponse struct { + // A server blob auditing policy. + ServerBlobAuditingPolicy +} + +// ServerBlobAuditingPoliciesClientListByServerResponse contains the response from method ServerBlobAuditingPoliciesClient.NewListByServerPager. +type ServerBlobAuditingPoliciesClientListByServerResponse struct { + // A list of server auditing settings. + ServerBlobAuditingPolicyListResult +} + +// ServerCommunicationLinksClientCreateOrUpdateResponse contains the response from method ServerCommunicationLinksClient.BeginCreateOrUpdate. +type ServerCommunicationLinksClientCreateOrUpdateResponse struct { + // Server communication link. + ServerCommunicationLink +} + +// ServerCommunicationLinksClientDeleteResponse contains the response from method ServerCommunicationLinksClient.Delete. +type ServerCommunicationLinksClientDeleteResponse struct { + // placeholder for future response values +} + +// ServerCommunicationLinksClientGetResponse contains the response from method ServerCommunicationLinksClient.Get. +type ServerCommunicationLinksClientGetResponse struct { + // Server communication link. + ServerCommunicationLink +} + +// ServerCommunicationLinksClientListByServerResponse contains the response from method ServerCommunicationLinksClient.NewListByServerPager. +type ServerCommunicationLinksClientListByServerResponse struct { + // A list of server communication links. + ServerCommunicationLinkListResult +} + +// ServerConnectionPoliciesClientCreateOrUpdateResponse contains the response from method ServerConnectionPoliciesClient.BeginCreateOrUpdate. +type ServerConnectionPoliciesClientCreateOrUpdateResponse struct { + // A server connection policy + ServerConnectionPolicy +} + +// ServerConnectionPoliciesClientGetResponse contains the response from method ServerConnectionPoliciesClient.Get. +type ServerConnectionPoliciesClientGetResponse struct { + // A server connection policy + ServerConnectionPolicy +} + +// ServerConnectionPoliciesClientListByServerResponse contains the response from method ServerConnectionPoliciesClient.NewListByServerPager. +type ServerConnectionPoliciesClientListByServerResponse struct { + // A list of server connection policy objects. + ServerConnectionPolicyListResult +} + +// ServerDNSAliasesClientAcquireResponse contains the response from method ServerDNSAliasesClient.BeginAcquire. +type ServerDNSAliasesClientAcquireResponse struct { + // A server DNS alias. + ServerDNSAlias +} + +// ServerDNSAliasesClientCreateOrUpdateResponse contains the response from method ServerDNSAliasesClient.BeginCreateOrUpdate. +type ServerDNSAliasesClientCreateOrUpdateResponse struct { + // A server DNS alias. + ServerDNSAlias +} + +// ServerDNSAliasesClientDeleteResponse contains the response from method ServerDNSAliasesClient.BeginDelete. +type ServerDNSAliasesClientDeleteResponse struct { + // placeholder for future response values +} + +// ServerDNSAliasesClientGetResponse contains the response from method ServerDNSAliasesClient.Get. +type ServerDNSAliasesClientGetResponse struct { + // A server DNS alias. + ServerDNSAlias +} + +// ServerDNSAliasesClientListByServerResponse contains the response from method ServerDNSAliasesClient.NewListByServerPager. +type ServerDNSAliasesClientListByServerResponse struct { + // A list of server DNS aliases. + ServerDNSAliasListResult +} + +// ServerDevOpsAuditSettingsClientCreateOrUpdateResponse contains the response from method ServerDevOpsAuditSettingsClient.BeginCreateOrUpdate. +type ServerDevOpsAuditSettingsClientCreateOrUpdateResponse struct { + // A server DevOps auditing settings. + ServerDevOpsAuditingSettings +} + +// ServerDevOpsAuditSettingsClientGetResponse contains the response from method ServerDevOpsAuditSettingsClient.Get. +type ServerDevOpsAuditSettingsClientGetResponse struct { + // A server DevOps auditing settings. + ServerDevOpsAuditingSettings +} + +// ServerDevOpsAuditSettingsClientListByServerResponse contains the response from method ServerDevOpsAuditSettingsClient.NewListByServerPager. +type ServerDevOpsAuditSettingsClientListByServerResponse struct { + // A list of server DevOps audit settings. + ServerDevOpsAuditSettingsListResult +} + +// ServerKeysClientCreateOrUpdateResponse contains the response from method ServerKeysClient.BeginCreateOrUpdate. +type ServerKeysClientCreateOrUpdateResponse struct { + // A server key. + ServerKey +} + +// ServerKeysClientDeleteResponse contains the response from method ServerKeysClient.BeginDelete. +type ServerKeysClientDeleteResponse struct { + // placeholder for future response values +} + +// ServerKeysClientGetResponse contains the response from method ServerKeysClient.Get. +type ServerKeysClientGetResponse struct { + // A server key. + ServerKey +} + +// ServerKeysClientListByServerResponse contains the response from method ServerKeysClient.NewListByServerPager. +type ServerKeysClientListByServerResponse struct { + // A list of server keys. + ServerKeyListResult +} + +// ServerOperationsClientListByServerResponse contains the response from method ServerOperationsClient.NewListByServerPager. +type ServerOperationsClientListByServerResponse struct { + // The response to a list server operations request + ServerOperationListResult +} + +// ServerSecurityAlertPoliciesClientCreateOrUpdateResponse contains the response from method ServerSecurityAlertPoliciesClient.BeginCreateOrUpdate. +type ServerSecurityAlertPoliciesClientCreateOrUpdateResponse struct { + // A server security alert policy. + ServerSecurityAlertPolicy +} + +// ServerSecurityAlertPoliciesClientGetResponse contains the response from method ServerSecurityAlertPoliciesClient.Get. +type ServerSecurityAlertPoliciesClientGetResponse struct { + // A server security alert policy. + ServerSecurityAlertPolicy +} + +// ServerSecurityAlertPoliciesClientListByServerResponse contains the response from method ServerSecurityAlertPoliciesClient.NewListByServerPager. +type ServerSecurityAlertPoliciesClientListByServerResponse struct { + // A list of the server's security alert policies. + LogicalServerSecurityAlertPolicyListResult +} + +// ServerTrustCertificatesClientCreateOrUpdateResponse contains the response from method ServerTrustCertificatesClient.BeginCreateOrUpdate. +type ServerTrustCertificatesClientCreateOrUpdateResponse struct { + // Server trust certificate imported from box to enable connection between box and Sql Managed Instance. + ServerTrustCertificate +} + +// ServerTrustCertificatesClientDeleteResponse contains the response from method ServerTrustCertificatesClient.BeginDelete. +type ServerTrustCertificatesClientDeleteResponse struct { + // placeholder for future response values +} + +// ServerTrustCertificatesClientGetResponse contains the response from method ServerTrustCertificatesClient.Get. +type ServerTrustCertificatesClientGetResponse struct { + // Server trust certificate imported from box to enable connection between box and Sql Managed Instance. + ServerTrustCertificate +} + +// ServerTrustCertificatesClientListByInstanceResponse contains the response from method ServerTrustCertificatesClient.NewListByInstancePager. +type ServerTrustCertificatesClientListByInstanceResponse struct { + // A list of server trust certificates in instance. + ServerTrustCertificatesListResult +} + +// ServerTrustGroupsClientCreateOrUpdateResponse contains the response from method ServerTrustGroupsClient.BeginCreateOrUpdate. +type ServerTrustGroupsClientCreateOrUpdateResponse struct { + // A server trust group. + ServerTrustGroup +} + +// ServerTrustGroupsClientDeleteResponse contains the response from method ServerTrustGroupsClient.BeginDelete. +type ServerTrustGroupsClientDeleteResponse struct { + // placeholder for future response values +} + +// ServerTrustGroupsClientGetResponse contains the response from method ServerTrustGroupsClient.Get. +type ServerTrustGroupsClientGetResponse struct { + // A server trust group. + ServerTrustGroup +} + +// ServerTrustGroupsClientListByInstanceResponse contains the response from method ServerTrustGroupsClient.NewListByInstancePager. +type ServerTrustGroupsClientListByInstanceResponse struct { + // A list of server trust groups. + ServerTrustGroupListResult +} + +// ServerTrustGroupsClientListByLocationResponse contains the response from method ServerTrustGroupsClient.NewListByLocationPager. +type ServerTrustGroupsClientListByLocationResponse struct { + // A list of server trust groups. + ServerTrustGroupListResult +} + +// ServerUsagesClientListByServerResponse contains the response from method ServerUsagesClient.NewListByServerPager. +type ServerUsagesClientListByServerResponse struct { + // Represents the response to a list server metrics request. + ServerUsageListResult +} + +// ServerVulnerabilityAssessmentsClientCreateOrUpdateResponse contains the response from method ServerVulnerabilityAssessmentsClient.CreateOrUpdate. +type ServerVulnerabilityAssessmentsClientCreateOrUpdateResponse struct { + // A server vulnerability assessment. + ServerVulnerabilityAssessment +} + +// ServerVulnerabilityAssessmentsClientDeleteResponse contains the response from method ServerVulnerabilityAssessmentsClient.Delete. +type ServerVulnerabilityAssessmentsClientDeleteResponse struct { + // placeholder for future response values +} + +// ServerVulnerabilityAssessmentsClientGetResponse contains the response from method ServerVulnerabilityAssessmentsClient.Get. +type ServerVulnerabilityAssessmentsClientGetResponse struct { + // A server vulnerability assessment. + ServerVulnerabilityAssessment +} + +// ServerVulnerabilityAssessmentsClientListByServerResponse contains the response from method ServerVulnerabilityAssessmentsClient.NewListByServerPager. +type ServerVulnerabilityAssessmentsClientListByServerResponse struct { + // A list of the server's vulnerability assessments. + ServerVulnerabilityAssessmentListResult +} + +// ServersClientCheckNameAvailabilityResponse contains the response from method ServersClient.CheckNameAvailability. +type ServersClientCheckNameAvailabilityResponse struct { + // The result of a name availability check. + CheckNameAvailabilityResponse +} + +// ServersClientCreateOrUpdateResponse contains the response from method ServersClient.BeginCreateOrUpdate. +type ServersClientCreateOrUpdateResponse struct { + // An Azure SQL Database server. + Server +} + +// ServersClientDeleteResponse contains the response from method ServersClient.BeginDelete. +type ServersClientDeleteResponse struct { + // placeholder for future response values +} + +// ServersClientGetResponse contains the response from method ServersClient.Get. +type ServersClientGetResponse struct { + // An Azure SQL Database server. + Server +} + +// ServersClientImportDatabaseResponse contains the response from method ServersClient.BeginImportDatabase. +type ServersClientImportDatabaseResponse struct { + // An ImportExport operation result resource. + ImportExportOperationResult +} + +// ServersClientListByResourceGroupResponse contains the response from method ServersClient.NewListByResourceGroupPager. +type ServersClientListByResourceGroupResponse struct { + // A list of servers. + ServerListResult +} + +// ServersClientListResponse contains the response from method ServersClient.NewListPager. +type ServersClientListResponse struct { + // A list of servers. + ServerListResult +} + +// ServersClientUpdateResponse contains the response from method ServersClient.BeginUpdate. +type ServersClientUpdateResponse struct { + // An Azure SQL Database server. + Server +} + +// ServiceObjectivesClientGetResponse contains the response from method ServiceObjectivesClient.Get. +type ServiceObjectivesClientGetResponse struct { + // Represents a database service objective. + ServiceObjective +} + +// ServiceObjectivesClientListByServerResponse contains the response from method ServiceObjectivesClient.NewListByServerPager. +type ServiceObjectivesClientListByServerResponse struct { + // Represents the response to a get database service objectives request. + ServiceObjectiveListResult +} + +// SubscriptionUsagesClientGetResponse contains the response from method SubscriptionUsagesClient.Get. +type SubscriptionUsagesClientGetResponse struct { + // Usage Metric of a Subscription in a Location. + SubscriptionUsage +} + +// SubscriptionUsagesClientListByLocationResponse contains the response from method SubscriptionUsagesClient.NewListByLocationPager. +type SubscriptionUsagesClientListByLocationResponse struct { + // A list of subscription usage metrics in a location. + SubscriptionUsageListResult +} + +// SyncAgentsClientCreateOrUpdateResponse contains the response from method SyncAgentsClient.BeginCreateOrUpdate. +type SyncAgentsClientCreateOrUpdateResponse struct { + // An Azure SQL Database sync agent. + SyncAgent +} + +// SyncAgentsClientDeleteResponse contains the response from method SyncAgentsClient.BeginDelete. +type SyncAgentsClientDeleteResponse struct { + // placeholder for future response values +} + +// SyncAgentsClientGenerateKeyResponse contains the response from method SyncAgentsClient.GenerateKey. +type SyncAgentsClientGenerateKeyResponse struct { + // Properties of an Azure SQL Database sync agent key. + SyncAgentKeyProperties +} + +// SyncAgentsClientGetResponse contains the response from method SyncAgentsClient.Get. +type SyncAgentsClientGetResponse struct { + // An Azure SQL Database sync agent. + SyncAgent +} + +// SyncAgentsClientListByServerResponse contains the response from method SyncAgentsClient.NewListByServerPager. +type SyncAgentsClientListByServerResponse struct { + // A list of sync agents. + SyncAgentListResult +} + +// SyncAgentsClientListLinkedDatabasesResponse contains the response from method SyncAgentsClient.NewListLinkedDatabasesPager. +type SyncAgentsClientListLinkedDatabasesResponse struct { + // A list of sync agent linked databases. + SyncAgentLinkedDatabaseListResult +} + +// SyncGroupsClientCancelSyncResponse contains the response from method SyncGroupsClient.CancelSync. +type SyncGroupsClientCancelSyncResponse struct { + // placeholder for future response values +} + +// SyncGroupsClientCreateOrUpdateResponse contains the response from method SyncGroupsClient.BeginCreateOrUpdate. +type SyncGroupsClientCreateOrUpdateResponse struct { + // An Azure SQL Database sync group. + SyncGroup +} + +// SyncGroupsClientDeleteResponse contains the response from method SyncGroupsClient.BeginDelete. +type SyncGroupsClientDeleteResponse struct { + // placeholder for future response values +} + +// SyncGroupsClientGetResponse contains the response from method SyncGroupsClient.Get. +type SyncGroupsClientGetResponse struct { + // An Azure SQL Database sync group. + SyncGroup +} + +// SyncGroupsClientListByDatabaseResponse contains the response from method SyncGroupsClient.NewListByDatabasePager. +type SyncGroupsClientListByDatabaseResponse struct { + // A list of sync groups. + SyncGroupListResult +} + +// SyncGroupsClientListHubSchemasResponse contains the response from method SyncGroupsClient.NewListHubSchemasPager. +type SyncGroupsClientListHubSchemasResponse struct { + // A list of sync schema properties. + SyncFullSchemaPropertiesListResult +} + +// SyncGroupsClientListLogsResponse contains the response from method SyncGroupsClient.NewListLogsPager. +type SyncGroupsClientListLogsResponse struct { + // A list of sync group log properties. + SyncGroupLogListResult +} + +// SyncGroupsClientListSyncDatabaseIDsResponse contains the response from method SyncGroupsClient.NewListSyncDatabaseIDsPager. +type SyncGroupsClientListSyncDatabaseIDsResponse struct { + // A list of sync database ID properties. + SyncDatabaseIDListResult +} + +// SyncGroupsClientRefreshHubSchemaResponse contains the response from method SyncGroupsClient.BeginRefreshHubSchema. +type SyncGroupsClientRefreshHubSchemaResponse struct { + // placeholder for future response values +} + +// SyncGroupsClientTriggerSyncResponse contains the response from method SyncGroupsClient.TriggerSync. +type SyncGroupsClientTriggerSyncResponse struct { + // placeholder for future response values +} + +// SyncGroupsClientUpdateResponse contains the response from method SyncGroupsClient.BeginUpdate. +type SyncGroupsClientUpdateResponse struct { + // An Azure SQL Database sync group. + SyncGroup +} + +// SyncMembersClientCreateOrUpdateResponse contains the response from method SyncMembersClient.BeginCreateOrUpdate. +type SyncMembersClientCreateOrUpdateResponse struct { + // An Azure SQL Database sync member. + SyncMember +} + +// SyncMembersClientDeleteResponse contains the response from method SyncMembersClient.BeginDelete. +type SyncMembersClientDeleteResponse struct { + // placeholder for future response values +} + +// SyncMembersClientGetResponse contains the response from method SyncMembersClient.Get. +type SyncMembersClientGetResponse struct { + // An Azure SQL Database sync member. + SyncMember +} + +// SyncMembersClientListBySyncGroupResponse contains the response from method SyncMembersClient.NewListBySyncGroupPager. +type SyncMembersClientListBySyncGroupResponse struct { + // A list of Azure SQL Database sync members. + SyncMemberListResult +} + +// SyncMembersClientListMemberSchemasResponse contains the response from method SyncMembersClient.NewListMemberSchemasPager. +type SyncMembersClientListMemberSchemasResponse struct { + // A list of sync schema properties. + SyncFullSchemaPropertiesListResult +} + +// SyncMembersClientRefreshMemberSchemaResponse contains the response from method SyncMembersClient.BeginRefreshMemberSchema. +type SyncMembersClientRefreshMemberSchemaResponse struct { + // placeholder for future response values +} + +// SyncMembersClientUpdateResponse contains the response from method SyncMembersClient.BeginUpdate. +type SyncMembersClientUpdateResponse struct { + // An Azure SQL Database sync member. + SyncMember +} + +// TdeCertificatesClientCreateResponse contains the response from method TdeCertificatesClient.BeginCreate. +type TdeCertificatesClientCreateResponse struct { + // placeholder for future response values +} + +// TimeZonesClientGetResponse contains the response from method TimeZonesClient.Get. +type TimeZonesClientGetResponse struct { + // Time Zone. + TimeZone +} + +// TimeZonesClientListByLocationResponse contains the response from method TimeZonesClient.NewListByLocationPager. +type TimeZonesClientListByLocationResponse struct { + // A list of time zones. + TimeZoneListResult +} + +// TransparentDataEncryptionsClientCreateOrUpdateResponse contains the response from method TransparentDataEncryptionsClient.CreateOrUpdate. +type TransparentDataEncryptionsClientCreateOrUpdateResponse struct { + // A logical database transparent data encryption state. + LogicalDatabaseTransparentDataEncryption +} + +// TransparentDataEncryptionsClientGetResponse contains the response from method TransparentDataEncryptionsClient.Get. +type TransparentDataEncryptionsClientGetResponse struct { + // A logical database transparent data encryption state. + LogicalDatabaseTransparentDataEncryption +} + +// TransparentDataEncryptionsClientListByDatabaseResponse contains the response from method TransparentDataEncryptionsClient.NewListByDatabasePager. +type TransparentDataEncryptionsClientListByDatabaseResponse struct { + // A list of transparent data encryptions + LogicalDatabaseTransparentDataEncryptionListResult +} + +// UsagesClientListByInstancePoolResponse contains the response from method UsagesClient.NewListByInstancePoolPager. +type UsagesClientListByInstancePoolResponse struct { + // A list of usages. + UsageListResult +} + +// VirtualClustersClientDeleteResponse contains the response from method VirtualClustersClient.BeginDelete. +type VirtualClustersClientDeleteResponse struct { + // placeholder for future response values +} + +// VirtualClustersClientGetResponse contains the response from method VirtualClustersClient.Get. +type VirtualClustersClientGetResponse struct { + // An Azure SQL virtual cluster. + VirtualCluster +} + +// VirtualClustersClientListByResourceGroupResponse contains the response from method VirtualClustersClient.NewListByResourceGroupPager. +type VirtualClustersClientListByResourceGroupResponse struct { + // A list of virtual clusters. + VirtualClusterListResult +} + +// VirtualClustersClientListResponse contains the response from method VirtualClustersClient.NewListPager. +type VirtualClustersClientListResponse struct { + // A list of virtual clusters. + VirtualClusterListResult +} + +// VirtualClustersClientUpdateDNSServersResponse contains the response from method VirtualClustersClient.UpdateDNSServers. +type VirtualClustersClientUpdateDNSServersResponse struct { + // A recoverable managed database resource. + UpdateManagedInstanceDNSServersOperation +} + +// VirtualClustersClientUpdateResponse contains the response from method VirtualClustersClient.BeginUpdate. +type VirtualClustersClientUpdateResponse struct { + // An Azure SQL virtual cluster. + VirtualCluster +} + +// VirtualNetworkRulesClientCreateOrUpdateResponse contains the response from method VirtualNetworkRulesClient.BeginCreateOrUpdate. +type VirtualNetworkRulesClientCreateOrUpdateResponse struct { + // A virtual network rule. + VirtualNetworkRule +} + +// VirtualNetworkRulesClientDeleteResponse contains the response from method VirtualNetworkRulesClient.BeginDelete. +type VirtualNetworkRulesClientDeleteResponse struct { + // placeholder for future response values +} + +// VirtualNetworkRulesClientGetResponse contains the response from method VirtualNetworkRulesClient.Get. +type VirtualNetworkRulesClientGetResponse struct { + // A virtual network rule. + VirtualNetworkRule +} + +// VirtualNetworkRulesClientListByServerResponse contains the response from method VirtualNetworkRulesClient.NewListByServerPager. +type VirtualNetworkRulesClientListByServerResponse struct { + // A list of virtual network rules. + VirtualNetworkRuleListResult +} + +// WorkloadClassifiersClientCreateOrUpdateResponse contains the response from method WorkloadClassifiersClient.BeginCreateOrUpdate. +type WorkloadClassifiersClientCreateOrUpdateResponse struct { + // Workload classifier operations for a data warehouse + WorkloadClassifier +} + +// WorkloadClassifiersClientDeleteResponse contains the response from method WorkloadClassifiersClient.BeginDelete. +type WorkloadClassifiersClientDeleteResponse struct { + // placeholder for future response values +} + +// WorkloadClassifiersClientGetResponse contains the response from method WorkloadClassifiersClient.Get. +type WorkloadClassifiersClientGetResponse struct { + // Workload classifier operations for a data warehouse + WorkloadClassifier +} + +// WorkloadClassifiersClientListByWorkloadGroupResponse contains the response from method WorkloadClassifiersClient.NewListByWorkloadGroupPager. +type WorkloadClassifiersClientListByWorkloadGroupResponse struct { + // A list of workload classifiers for a workload group. + WorkloadClassifierListResult +} + +// WorkloadGroupsClientCreateOrUpdateResponse contains the response from method WorkloadGroupsClient.BeginCreateOrUpdate. +type WorkloadGroupsClientCreateOrUpdateResponse struct { + // Workload group operations for a data warehouse + WorkloadGroup +} + +// WorkloadGroupsClientDeleteResponse contains the response from method WorkloadGroupsClient.BeginDelete. +type WorkloadGroupsClientDeleteResponse struct { + // placeholder for future response values +} + +// WorkloadGroupsClientGetResponse contains the response from method WorkloadGroupsClient.Get. +type WorkloadGroupsClientGetResponse struct { + // Workload group operations for a data warehouse + WorkloadGroup +} + +// WorkloadGroupsClientListByDatabaseResponse contains the response from method WorkloadGroupsClient.NewListByDatabasePager. +type WorkloadGroupsClientListByDatabaseResponse struct { + // A list of workload groups. + WorkloadGroupListResult +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/restorabledroppeddatabases_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/restorabledroppeddatabases_client.go new file mode 100644 index 000000000..f092f58b9 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/restorabledroppeddatabases_client.go @@ -0,0 +1,180 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// RestorableDroppedDatabasesClient contains the methods for the RestorableDroppedDatabases group. +// Don't use this type directly, use NewRestorableDroppedDatabasesClient() instead. +type RestorableDroppedDatabasesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewRestorableDroppedDatabasesClient creates a new instance of RestorableDroppedDatabasesClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewRestorableDroppedDatabasesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RestorableDroppedDatabasesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &RestorableDroppedDatabasesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Gets a restorable dropped database. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-05-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - options - RestorableDroppedDatabasesClientGetOptions contains the optional parameters for the RestorableDroppedDatabasesClient.Get +// method. +func (client *RestorableDroppedDatabasesClient) Get(ctx context.Context, resourceGroupName string, serverName string, restorableDroppedDatabaseID string, options *RestorableDroppedDatabasesClientGetOptions) (RestorableDroppedDatabasesClientGetResponse, error) { + var err error + const operationName = "RestorableDroppedDatabasesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serverName, restorableDroppedDatabaseID, options) + if err != nil { + return RestorableDroppedDatabasesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return RestorableDroppedDatabasesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return RestorableDroppedDatabasesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *RestorableDroppedDatabasesClient) getCreateRequest(ctx context.Context, resourceGroupName string, serverName string, restorableDroppedDatabaseID string, options *RestorableDroppedDatabasesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/restorableDroppedDatabases/{restorableDroppedDatabaseId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if restorableDroppedDatabaseID == "" { + return nil, errors.New("parameter restorableDroppedDatabaseID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{restorableDroppedDatabaseId}", url.PathEscape(restorableDroppedDatabaseID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-05-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *RestorableDroppedDatabasesClient) getHandleResponse(resp *http.Response) (RestorableDroppedDatabasesClientGetResponse, error) { + result := RestorableDroppedDatabasesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RestorableDroppedDatabase); err != nil { + return RestorableDroppedDatabasesClientGetResponse{}, err + } + return result, nil +} + +// NewListByServerPager - Gets a list of restorable dropped databases. +// +// Generated from API version 2021-05-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - options - RestorableDroppedDatabasesClientListByServerOptions contains the optional parameters for the RestorableDroppedDatabasesClient.NewListByServerPager +// method. +func (client *RestorableDroppedDatabasesClient) NewListByServerPager(resourceGroupName string, serverName string, options *RestorableDroppedDatabasesClientListByServerOptions) *runtime.Pager[RestorableDroppedDatabasesClientListByServerResponse] { + return runtime.NewPager(runtime.PagingHandler[RestorableDroppedDatabasesClientListByServerResponse]{ + More: func(page RestorableDroppedDatabasesClientListByServerResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *RestorableDroppedDatabasesClientListByServerResponse) (RestorableDroppedDatabasesClientListByServerResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "RestorableDroppedDatabasesClient.NewListByServerPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByServerCreateRequest(ctx, resourceGroupName, serverName, options) + }, nil) + if err != nil { + return RestorableDroppedDatabasesClientListByServerResponse{}, err + } + return client.listByServerHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByServerCreateRequest creates the ListByServer request. +func (client *RestorableDroppedDatabasesClient) listByServerCreateRequest(ctx context.Context, resourceGroupName string, serverName string, options *RestorableDroppedDatabasesClientListByServerOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/restorableDroppedDatabases" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-05-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByServerHandleResponse handles the ListByServer response. +func (client *RestorableDroppedDatabasesClient) listByServerHandleResponse(resp *http.Response) (RestorableDroppedDatabasesClientListByServerResponse, error) { + result := RestorableDroppedDatabasesClientListByServerResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RestorableDroppedDatabaseListResult); err != nil { + return RestorableDroppedDatabasesClientListByServerResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/restorabledroppedmanageddatabases_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/restorabledroppedmanageddatabases_client.go new file mode 100644 index 000000000..e8f200773 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/restorabledroppedmanageddatabases_client.go @@ -0,0 +1,180 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// RestorableDroppedManagedDatabasesClient contains the methods for the RestorableDroppedManagedDatabases group. +// Don't use this type directly, use NewRestorableDroppedManagedDatabasesClient() instead. +type RestorableDroppedManagedDatabasesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewRestorableDroppedManagedDatabasesClient creates a new instance of RestorableDroppedManagedDatabasesClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewRestorableDroppedManagedDatabasesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RestorableDroppedManagedDatabasesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &RestorableDroppedManagedDatabasesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Gets a restorable dropped managed database. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-05-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - options - RestorableDroppedManagedDatabasesClientGetOptions contains the optional parameters for the RestorableDroppedManagedDatabasesClient.Get +// method. +func (client *RestorableDroppedManagedDatabasesClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, restorableDroppedDatabaseID string, options *RestorableDroppedManagedDatabasesClientGetOptions) (RestorableDroppedManagedDatabasesClientGetResponse, error) { + var err error + const operationName = "RestorableDroppedManagedDatabasesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, managedInstanceName, restorableDroppedDatabaseID, options) + if err != nil { + return RestorableDroppedManagedDatabasesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return RestorableDroppedManagedDatabasesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return RestorableDroppedManagedDatabasesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *RestorableDroppedManagedDatabasesClient) getCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, restorableDroppedDatabaseID string, options *RestorableDroppedManagedDatabasesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/restorableDroppedDatabases/{restorableDroppedDatabaseId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if restorableDroppedDatabaseID == "" { + return nil, errors.New("parameter restorableDroppedDatabaseID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{restorableDroppedDatabaseId}", url.PathEscape(restorableDroppedDatabaseID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-05-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *RestorableDroppedManagedDatabasesClient) getHandleResponse(resp *http.Response) (RestorableDroppedManagedDatabasesClientGetResponse, error) { + result := RestorableDroppedManagedDatabasesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RestorableDroppedManagedDatabase); err != nil { + return RestorableDroppedManagedDatabasesClientGetResponse{}, err + } + return result, nil +} + +// NewListByInstancePager - Gets a list of restorable dropped managed databases. +// +// Generated from API version 2021-05-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - options - RestorableDroppedManagedDatabasesClientListByInstanceOptions contains the optional parameters for the RestorableDroppedManagedDatabasesClient.NewListByInstancePager +// method. +func (client *RestorableDroppedManagedDatabasesClient) NewListByInstancePager(resourceGroupName string, managedInstanceName string, options *RestorableDroppedManagedDatabasesClientListByInstanceOptions) *runtime.Pager[RestorableDroppedManagedDatabasesClientListByInstanceResponse] { + return runtime.NewPager(runtime.PagingHandler[RestorableDroppedManagedDatabasesClientListByInstanceResponse]{ + More: func(page RestorableDroppedManagedDatabasesClientListByInstanceResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *RestorableDroppedManagedDatabasesClientListByInstanceResponse) (RestorableDroppedManagedDatabasesClientListByInstanceResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "RestorableDroppedManagedDatabasesClient.NewListByInstancePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByInstanceCreateRequest(ctx, resourceGroupName, managedInstanceName, options) + }, nil) + if err != nil { + return RestorableDroppedManagedDatabasesClientListByInstanceResponse{}, err + } + return client.listByInstanceHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByInstanceCreateRequest creates the ListByInstance request. +func (client *RestorableDroppedManagedDatabasesClient) listByInstanceCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, options *RestorableDroppedManagedDatabasesClientListByInstanceOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/restorableDroppedDatabases" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-05-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByInstanceHandleResponse handles the ListByInstance response. +func (client *RestorableDroppedManagedDatabasesClient) listByInstanceHandleResponse(resp *http.Response) (RestorableDroppedManagedDatabasesClientListByInstanceResponse, error) { + result := RestorableDroppedManagedDatabasesClientListByInstanceResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RestorableDroppedManagedDatabaseListResult); err != nil { + return RestorableDroppedManagedDatabasesClientListByInstanceResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/restorepoints_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/restorepoints_client.go new file mode 100644 index 000000000..b2118e4f5 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/restorepoints_client.go @@ -0,0 +1,340 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// RestorePointsClient contains the methods for the RestorePoints group. +// Don't use this type directly, use NewRestorePointsClient() instead. +type RestorePointsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewRestorePointsClient creates a new instance of RestorePointsClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewRestorePointsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RestorePointsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &RestorePointsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreate - Creates a restore point for a data warehouse. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database. +// - parameters - The definition for creating the restore point of this database. +// - options - RestorePointsClientBeginCreateOptions contains the optional parameters for the RestorePointsClient.BeginCreate +// method. +func (client *RestorePointsClient) BeginCreate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters CreateDatabaseRestorePointDefinition, options *RestorePointsClientBeginCreateOptions) (*runtime.Poller[RestorePointsClientCreateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.create(ctx, resourceGroupName, serverName, databaseName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RestorePointsClientCreateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[RestorePointsClientCreateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Create - Creates a restore point for a data warehouse. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +func (client *RestorePointsClient) create(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters CreateDatabaseRestorePointDefinition, options *RestorePointsClientBeginCreateOptions) (*http.Response, error) { + var err error + const operationName = "RestorePointsClient.BeginCreate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createCreateRequest(ctx, resourceGroupName, serverName, databaseName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createCreateRequest creates the Create request. +func (client *RestorePointsClient) createCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters CreateDatabaseRestorePointDefinition, options *RestorePointsClientBeginCreateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/restorePoints" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// Delete - Deletes a restore point. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database. +// - restorePointName - The name of the restore point. +// - options - RestorePointsClientDeleteOptions contains the optional parameters for the RestorePointsClient.Delete method. +func (client *RestorePointsClient) Delete(ctx context.Context, resourceGroupName string, serverName string, databaseName string, restorePointName string, options *RestorePointsClientDeleteOptions) (RestorePointsClientDeleteResponse, error) { + var err error + const operationName = "RestorePointsClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serverName, databaseName, restorePointName, options) + if err != nil { + return RestorePointsClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return RestorePointsClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return RestorePointsClientDeleteResponse{}, err + } + return RestorePointsClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *RestorePointsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, restorePointName string, options *RestorePointsClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/restorePoints/{restorePointName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if restorePointName == "" { + return nil, errors.New("parameter restorePointName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{restorePointName}", url.PathEscape(restorePointName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + return req, nil +} + +// Get - Gets a restore point. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database. +// - restorePointName - The name of the restore point. +// - options - RestorePointsClientGetOptions contains the optional parameters for the RestorePointsClient.Get method. +func (client *RestorePointsClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, restorePointName string, options *RestorePointsClientGetOptions) (RestorePointsClientGetResponse, error) { + var err error + const operationName = "RestorePointsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serverName, databaseName, restorePointName, options) + if err != nil { + return RestorePointsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return RestorePointsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return RestorePointsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *RestorePointsClient) getCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, restorePointName string, options *RestorePointsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/restorePoints/{restorePointName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if restorePointName == "" { + return nil, errors.New("parameter restorePointName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{restorePointName}", url.PathEscape(restorePointName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *RestorePointsClient) getHandleResponse(resp *http.Response) (RestorePointsClientGetResponse, error) { + result := RestorePointsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RestorePoint); err != nil { + return RestorePointsClientGetResponse{}, err + } + return result, nil +} + +// NewListByDatabasePager - Gets a list of database restore points. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database. +// - options - RestorePointsClientListByDatabaseOptions contains the optional parameters for the RestorePointsClient.NewListByDatabasePager +// method. +func (client *RestorePointsClient) NewListByDatabasePager(resourceGroupName string, serverName string, databaseName string, options *RestorePointsClientListByDatabaseOptions) *runtime.Pager[RestorePointsClientListByDatabaseResponse] { + return runtime.NewPager(runtime.PagingHandler[RestorePointsClientListByDatabaseResponse]{ + More: func(page RestorePointsClientListByDatabaseResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *RestorePointsClientListByDatabaseResponse) (RestorePointsClientListByDatabaseResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "RestorePointsClient.NewListByDatabasePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByDatabaseCreateRequest(ctx, resourceGroupName, serverName, databaseName, options) + }, nil) + if err != nil { + return RestorePointsClientListByDatabaseResponse{}, err + } + return client.listByDatabaseHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByDatabaseCreateRequest creates the ListByDatabase request. +func (client *RestorePointsClient) listByDatabaseCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, options *RestorePointsClientListByDatabaseOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/restorePoints" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByDatabaseHandleResponse handles the ListByDatabase response. +func (client *RestorePointsClient) listByDatabaseHandleResponse(resp *http.Response) (RestorePointsClientListByDatabaseResponse, error) { + result := RestorePointsClientListByDatabaseResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RestorePointListResult); err != nil { + return RestorePointsClientListByDatabaseResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/sensitivitylabels_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/sensitivitylabels_client.go new file mode 100644 index 000000000..f71aad2bf --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/sensitivitylabels_client.go @@ -0,0 +1,678 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// SensitivityLabelsClient contains the methods for the SensitivityLabels group. +// Don't use this type directly, use NewSensitivityLabelsClient() instead. +type SensitivityLabelsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewSensitivityLabelsClient creates a new instance of SensitivityLabelsClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewSensitivityLabelsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SensitivityLabelsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &SensitivityLabelsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Creates or updates the sensitivity label of a given column +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database. +// - schemaName - The name of the schema. +// - tableName - The name of the table. +// - columnName - The name of the column. +// - parameters - The column sensitivity label resource. +// - options - SensitivityLabelsClientCreateOrUpdateOptions contains the optional parameters for the SensitivityLabelsClient.CreateOrUpdate +// method. +func (client *SensitivityLabelsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, schemaName string, tableName string, columnName string, parameters SensitivityLabel, options *SensitivityLabelsClientCreateOrUpdateOptions) (SensitivityLabelsClientCreateOrUpdateResponse, error) { + var err error + const operationName = "SensitivityLabelsClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serverName, databaseName, schemaName, tableName, columnName, parameters, options) + if err != nil { + return SensitivityLabelsClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return SensitivityLabelsClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return SensitivityLabelsClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *SensitivityLabelsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, schemaName string, tableName string, columnName string, parameters SensitivityLabel, options *SensitivityLabelsClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if schemaName == "" { + return nil, errors.New("parameter schemaName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{schemaName}", url.PathEscape(schemaName)) + if tableName == "" { + return nil, errors.New("parameter tableName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{tableName}", url.PathEscape(tableName)) + if columnName == "" { + return nil, errors.New("parameter columnName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{columnName}", url.PathEscape(columnName)) + urlPath = strings.ReplaceAll(urlPath, "{sensitivityLabelSource}", url.PathEscape("current")) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *SensitivityLabelsClient) createOrUpdateHandleResponse(resp *http.Response) (SensitivityLabelsClientCreateOrUpdateResponse, error) { + result := SensitivityLabelsClientCreateOrUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SensitivityLabel); err != nil { + return SensitivityLabelsClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// Delete - Deletes the sensitivity label of a given column +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database. +// - schemaName - The name of the schema. +// - tableName - The name of the table. +// - columnName - The name of the column. +// - options - SensitivityLabelsClientDeleteOptions contains the optional parameters for the SensitivityLabelsClient.Delete +// method. +func (client *SensitivityLabelsClient) Delete(ctx context.Context, resourceGroupName string, serverName string, databaseName string, schemaName string, tableName string, columnName string, options *SensitivityLabelsClientDeleteOptions) (SensitivityLabelsClientDeleteResponse, error) { + var err error + const operationName = "SensitivityLabelsClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serverName, databaseName, schemaName, tableName, columnName, options) + if err != nil { + return SensitivityLabelsClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return SensitivityLabelsClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SensitivityLabelsClientDeleteResponse{}, err + } + return SensitivityLabelsClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *SensitivityLabelsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, schemaName string, tableName string, columnName string, options *SensitivityLabelsClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if schemaName == "" { + return nil, errors.New("parameter schemaName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{schemaName}", url.PathEscape(schemaName)) + if tableName == "" { + return nil, errors.New("parameter tableName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{tableName}", url.PathEscape(tableName)) + if columnName == "" { + return nil, errors.New("parameter columnName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{columnName}", url.PathEscape(columnName)) + urlPath = strings.ReplaceAll(urlPath, "{sensitivityLabelSource}", url.PathEscape("current")) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + return req, nil +} + +// DisableRecommendation - Disables sensitivity recommendations on a given column +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database. +// - schemaName - The name of the schema. +// - tableName - The name of the table. +// - columnName - The name of the column. +// - options - SensitivityLabelsClientDisableRecommendationOptions contains the optional parameters for the SensitivityLabelsClient.DisableRecommendation +// method. +func (client *SensitivityLabelsClient) DisableRecommendation(ctx context.Context, resourceGroupName string, serverName string, databaseName string, schemaName string, tableName string, columnName string, options *SensitivityLabelsClientDisableRecommendationOptions) (SensitivityLabelsClientDisableRecommendationResponse, error) { + var err error + const operationName = "SensitivityLabelsClient.DisableRecommendation" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.disableRecommendationCreateRequest(ctx, resourceGroupName, serverName, databaseName, schemaName, tableName, columnName, options) + if err != nil { + return SensitivityLabelsClientDisableRecommendationResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return SensitivityLabelsClientDisableRecommendationResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SensitivityLabelsClientDisableRecommendationResponse{}, err + } + return SensitivityLabelsClientDisableRecommendationResponse{}, nil +} + +// disableRecommendationCreateRequest creates the DisableRecommendation request. +func (client *SensitivityLabelsClient) disableRecommendationCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, schemaName string, tableName string, columnName string, options *SensitivityLabelsClientDisableRecommendationOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}/disable" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if schemaName == "" { + return nil, errors.New("parameter schemaName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{schemaName}", url.PathEscape(schemaName)) + if tableName == "" { + return nil, errors.New("parameter tableName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{tableName}", url.PathEscape(tableName)) + if columnName == "" { + return nil, errors.New("parameter columnName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{columnName}", url.PathEscape(columnName)) + urlPath = strings.ReplaceAll(urlPath, "{sensitivityLabelSource}", url.PathEscape("recommended")) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + return req, nil +} + +// EnableRecommendation - Enables sensitivity recommendations on a given column (recommendations are enabled by default on +// all columns) +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database. +// - schemaName - The name of the schema. +// - tableName - The name of the table. +// - columnName - The name of the column. +// - options - SensitivityLabelsClientEnableRecommendationOptions contains the optional parameters for the SensitivityLabelsClient.EnableRecommendation +// method. +func (client *SensitivityLabelsClient) EnableRecommendation(ctx context.Context, resourceGroupName string, serverName string, databaseName string, schemaName string, tableName string, columnName string, options *SensitivityLabelsClientEnableRecommendationOptions) (SensitivityLabelsClientEnableRecommendationResponse, error) { + var err error + const operationName = "SensitivityLabelsClient.EnableRecommendation" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.enableRecommendationCreateRequest(ctx, resourceGroupName, serverName, databaseName, schemaName, tableName, columnName, options) + if err != nil { + return SensitivityLabelsClientEnableRecommendationResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return SensitivityLabelsClientEnableRecommendationResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SensitivityLabelsClientEnableRecommendationResponse{}, err + } + return SensitivityLabelsClientEnableRecommendationResponse{}, nil +} + +// enableRecommendationCreateRequest creates the EnableRecommendation request. +func (client *SensitivityLabelsClient) enableRecommendationCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, schemaName string, tableName string, columnName string, options *SensitivityLabelsClientEnableRecommendationOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}/enable" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if schemaName == "" { + return nil, errors.New("parameter schemaName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{schemaName}", url.PathEscape(schemaName)) + if tableName == "" { + return nil, errors.New("parameter tableName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{tableName}", url.PathEscape(tableName)) + if columnName == "" { + return nil, errors.New("parameter columnName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{columnName}", url.PathEscape(columnName)) + urlPath = strings.ReplaceAll(urlPath, "{sensitivityLabelSource}", url.PathEscape("recommended")) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + return req, nil +} + +// Get - Gets the sensitivity label of a given column +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database. +// - schemaName - The name of the schema. +// - tableName - The name of the table. +// - columnName - The name of the column. +// - sensitivityLabelSource - The source of the sensitivity label. +// - options - SensitivityLabelsClientGetOptions contains the optional parameters for the SensitivityLabelsClient.Get method. +func (client *SensitivityLabelsClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, schemaName string, tableName string, columnName string, sensitivityLabelSource SensitivityLabelSource, options *SensitivityLabelsClientGetOptions) (SensitivityLabelsClientGetResponse, error) { + var err error + const operationName = "SensitivityLabelsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serverName, databaseName, schemaName, tableName, columnName, sensitivityLabelSource, options) + if err != nil { + return SensitivityLabelsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return SensitivityLabelsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SensitivityLabelsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *SensitivityLabelsClient) getCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, schemaName string, tableName string, columnName string, sensitivityLabelSource SensitivityLabelSource, options *SensitivityLabelsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if schemaName == "" { + return nil, errors.New("parameter schemaName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{schemaName}", url.PathEscape(schemaName)) + if tableName == "" { + return nil, errors.New("parameter tableName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{tableName}", url.PathEscape(tableName)) + if columnName == "" { + return nil, errors.New("parameter columnName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{columnName}", url.PathEscape(columnName)) + if sensitivityLabelSource == "" { + return nil, errors.New("parameter sensitivityLabelSource cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{sensitivityLabelSource}", url.PathEscape(string(sensitivityLabelSource))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *SensitivityLabelsClient) getHandleResponse(resp *http.Response) (SensitivityLabelsClientGetResponse, error) { + result := SensitivityLabelsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SensitivityLabel); err != nil { + return SensitivityLabelsClientGetResponse{}, err + } + return result, nil +} + +// NewListCurrentByDatabasePager - Gets the sensitivity labels of a given database +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database. +// - options - SensitivityLabelsClientListCurrentByDatabaseOptions contains the optional parameters for the SensitivityLabelsClient.NewListCurrentByDatabasePager +// method. +func (client *SensitivityLabelsClient) NewListCurrentByDatabasePager(resourceGroupName string, serverName string, databaseName string, options *SensitivityLabelsClientListCurrentByDatabaseOptions) *runtime.Pager[SensitivityLabelsClientListCurrentByDatabaseResponse] { + return runtime.NewPager(runtime.PagingHandler[SensitivityLabelsClientListCurrentByDatabaseResponse]{ + More: func(page SensitivityLabelsClientListCurrentByDatabaseResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *SensitivityLabelsClientListCurrentByDatabaseResponse) (SensitivityLabelsClientListCurrentByDatabaseResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "SensitivityLabelsClient.NewListCurrentByDatabasePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCurrentByDatabaseCreateRequest(ctx, resourceGroupName, serverName, databaseName, options) + }, nil) + if err != nil { + return SensitivityLabelsClientListCurrentByDatabaseResponse{}, err + } + return client.listCurrentByDatabaseHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCurrentByDatabaseCreateRequest creates the ListCurrentByDatabase request. +func (client *SensitivityLabelsClient) listCurrentByDatabaseCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, options *SensitivityLabelsClientListCurrentByDatabaseOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/currentSensitivityLabels" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.SkipToken != nil { + reqQP.Set("$skipToken", *options.SkipToken) + } + if options != nil && options.Count != nil { + reqQP.Set("$count", strconv.FormatBool(*options.Count)) + } + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listCurrentByDatabaseHandleResponse handles the ListCurrentByDatabase response. +func (client *SensitivityLabelsClient) listCurrentByDatabaseHandleResponse(resp *http.Response) (SensitivityLabelsClientListCurrentByDatabaseResponse, error) { + result := SensitivityLabelsClientListCurrentByDatabaseResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SensitivityLabelListResult); err != nil { + return SensitivityLabelsClientListCurrentByDatabaseResponse{}, err + } + return result, nil +} + +// NewListRecommendedByDatabasePager - Gets the sensitivity labels of a given database +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database. +// - options - SensitivityLabelsClientListRecommendedByDatabaseOptions contains the optional parameters for the SensitivityLabelsClient.NewListRecommendedByDatabasePager +// method. +func (client *SensitivityLabelsClient) NewListRecommendedByDatabasePager(resourceGroupName string, serverName string, databaseName string, options *SensitivityLabelsClientListRecommendedByDatabaseOptions) *runtime.Pager[SensitivityLabelsClientListRecommendedByDatabaseResponse] { + return runtime.NewPager(runtime.PagingHandler[SensitivityLabelsClientListRecommendedByDatabaseResponse]{ + More: func(page SensitivityLabelsClientListRecommendedByDatabaseResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *SensitivityLabelsClientListRecommendedByDatabaseResponse) (SensitivityLabelsClientListRecommendedByDatabaseResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "SensitivityLabelsClient.NewListRecommendedByDatabasePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listRecommendedByDatabaseCreateRequest(ctx, resourceGroupName, serverName, databaseName, options) + }, nil) + if err != nil { + return SensitivityLabelsClientListRecommendedByDatabaseResponse{}, err + } + return client.listRecommendedByDatabaseHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listRecommendedByDatabaseCreateRequest creates the ListRecommendedByDatabase request. +func (client *SensitivityLabelsClient) listRecommendedByDatabaseCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, options *SensitivityLabelsClientListRecommendedByDatabaseOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/recommendedSensitivityLabels" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.SkipToken != nil { + reqQP.Set("$skipToken", *options.SkipToken) + } + if options != nil && options.IncludeDisabledRecommendations != nil { + reqQP.Set("includeDisabledRecommendations", strconv.FormatBool(*options.IncludeDisabledRecommendations)) + } + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listRecommendedByDatabaseHandleResponse handles the ListRecommendedByDatabase response. +func (client *SensitivityLabelsClient) listRecommendedByDatabaseHandleResponse(resp *http.Response) (SensitivityLabelsClientListRecommendedByDatabaseResponse, error) { + result := SensitivityLabelsClientListRecommendedByDatabaseResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SensitivityLabelListResult); err != nil { + return SensitivityLabelsClientListRecommendedByDatabaseResponse{}, err + } + return result, nil +} + +// Update - Update sensitivity labels of a given database using an operations batch. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database. +// - options - SensitivityLabelsClientUpdateOptions contains the optional parameters for the SensitivityLabelsClient.Update +// method. +func (client *SensitivityLabelsClient) Update(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters SensitivityLabelUpdateList, options *SensitivityLabelsClientUpdateOptions) (SensitivityLabelsClientUpdateResponse, error) { + var err error + const operationName = "SensitivityLabelsClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, serverName, databaseName, parameters, options) + if err != nil { + return SensitivityLabelsClientUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return SensitivityLabelsClientUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SensitivityLabelsClientUpdateResponse{}, err + } + return SensitivityLabelsClientUpdateResponse{}, nil +} + +// updateCreateRequest creates the Update request. +func (client *SensitivityLabelsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters SensitivityLabelUpdateList, options *SensitivityLabelsClientUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/currentSensitivityLabels" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/serveradvancedthreatprotectionsettings_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/serveradvancedthreatprotectionsettings_client.go new file mode 100644 index 000000000..3d9920f8e --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/serveradvancedthreatprotectionsettings_client.go @@ -0,0 +1,267 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ServerAdvancedThreatProtectionSettingsClient contains the methods for the ServerAdvancedThreatProtectionSettings group. +// Don't use this type directly, use NewServerAdvancedThreatProtectionSettingsClient() instead. +type ServerAdvancedThreatProtectionSettingsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewServerAdvancedThreatProtectionSettingsClient creates a new instance of ServerAdvancedThreatProtectionSettingsClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewServerAdvancedThreatProtectionSettingsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServerAdvancedThreatProtectionSettingsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ServerAdvancedThreatProtectionSettingsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates or updates an Advanced Threat Protection state. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - advancedThreatProtectionName - The name of the Advanced Threat Protection state. +// - parameters - The server Advanced Threat Protection state. +// - options - ServerAdvancedThreatProtectionSettingsClientBeginCreateOrUpdateOptions contains the optional parameters for the +// ServerAdvancedThreatProtectionSettingsClient.BeginCreateOrUpdate method. +func (client *ServerAdvancedThreatProtectionSettingsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, advancedThreatProtectionName AdvancedThreatProtectionName, parameters ServerAdvancedThreatProtection, options *ServerAdvancedThreatProtectionSettingsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ServerAdvancedThreatProtectionSettingsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, serverName, advancedThreatProtectionName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ServerAdvancedThreatProtectionSettingsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ServerAdvancedThreatProtectionSettingsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates or updates an Advanced Threat Protection state. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-11-01-preview +func (client *ServerAdvancedThreatProtectionSettingsClient) createOrUpdate(ctx context.Context, resourceGroupName string, serverName string, advancedThreatProtectionName AdvancedThreatProtectionName, parameters ServerAdvancedThreatProtection, options *ServerAdvancedThreatProtectionSettingsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ServerAdvancedThreatProtectionSettingsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serverName, advancedThreatProtectionName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *ServerAdvancedThreatProtectionSettingsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serverName string, advancedThreatProtectionName AdvancedThreatProtectionName, parameters ServerAdvancedThreatProtection, options *ServerAdvancedThreatProtectionSettingsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/advancedThreatProtectionSettings/{advancedThreatProtectionName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if advancedThreatProtectionName == "" { + return nil, errors.New("parameter advancedThreatProtectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{advancedThreatProtectionName}", url.PathEscape(string(advancedThreatProtectionName))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// Get - Get a server's Advanced Threat Protection state. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - advancedThreatProtectionName - The name of the Advanced Threat Protection state. +// - options - ServerAdvancedThreatProtectionSettingsClientGetOptions contains the optional parameters for the ServerAdvancedThreatProtectionSettingsClient.Get +// method. +func (client *ServerAdvancedThreatProtectionSettingsClient) Get(ctx context.Context, resourceGroupName string, serverName string, advancedThreatProtectionName AdvancedThreatProtectionName, options *ServerAdvancedThreatProtectionSettingsClientGetOptions) (ServerAdvancedThreatProtectionSettingsClientGetResponse, error) { + var err error + const operationName = "ServerAdvancedThreatProtectionSettingsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serverName, advancedThreatProtectionName, options) + if err != nil { + return ServerAdvancedThreatProtectionSettingsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ServerAdvancedThreatProtectionSettingsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ServerAdvancedThreatProtectionSettingsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ServerAdvancedThreatProtectionSettingsClient) getCreateRequest(ctx context.Context, resourceGroupName string, serverName string, advancedThreatProtectionName AdvancedThreatProtectionName, options *ServerAdvancedThreatProtectionSettingsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/advancedThreatProtectionSettings/{advancedThreatProtectionName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if advancedThreatProtectionName == "" { + return nil, errors.New("parameter advancedThreatProtectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{advancedThreatProtectionName}", url.PathEscape(string(advancedThreatProtectionName))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ServerAdvancedThreatProtectionSettingsClient) getHandleResponse(resp *http.Response) (ServerAdvancedThreatProtectionSettingsClientGetResponse, error) { + result := ServerAdvancedThreatProtectionSettingsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ServerAdvancedThreatProtection); err != nil { + return ServerAdvancedThreatProtectionSettingsClientGetResponse{}, err + } + return result, nil +} + +// NewListByServerPager - Get a list of the server's Advanced Threat Protection states. +// +// Generated from API version 2021-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - options - ServerAdvancedThreatProtectionSettingsClientListByServerOptions contains the optional parameters for the ServerAdvancedThreatProtectionSettingsClient.NewListByServerPager +// method. +func (client *ServerAdvancedThreatProtectionSettingsClient) NewListByServerPager(resourceGroupName string, serverName string, options *ServerAdvancedThreatProtectionSettingsClientListByServerOptions) *runtime.Pager[ServerAdvancedThreatProtectionSettingsClientListByServerResponse] { + return runtime.NewPager(runtime.PagingHandler[ServerAdvancedThreatProtectionSettingsClientListByServerResponse]{ + More: func(page ServerAdvancedThreatProtectionSettingsClientListByServerResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ServerAdvancedThreatProtectionSettingsClientListByServerResponse) (ServerAdvancedThreatProtectionSettingsClientListByServerResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ServerAdvancedThreatProtectionSettingsClient.NewListByServerPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByServerCreateRequest(ctx, resourceGroupName, serverName, options) + }, nil) + if err != nil { + return ServerAdvancedThreatProtectionSettingsClientListByServerResponse{}, err + } + return client.listByServerHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByServerCreateRequest creates the ListByServer request. +func (client *ServerAdvancedThreatProtectionSettingsClient) listByServerCreateRequest(ctx context.Context, resourceGroupName string, serverName string, options *ServerAdvancedThreatProtectionSettingsClientListByServerOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/advancedThreatProtectionSettings" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByServerHandleResponse handles the ListByServer response. +func (client *ServerAdvancedThreatProtectionSettingsClient) listByServerHandleResponse(resp *http.Response) (ServerAdvancedThreatProtectionSettingsClientListByServerResponse, error) { + result := ServerAdvancedThreatProtectionSettingsClientListByServerResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.LogicalServerAdvancedThreatProtectionListResult); err != nil { + return ServerAdvancedThreatProtectionSettingsClientListByServerResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/serveradvisors_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/serveradvisors_client.go new file mode 100644 index 000000000..534de3e10 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/serveradvisors_client.go @@ -0,0 +1,257 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ServerAdvisorsClient contains the methods for the ServerAdvisors group. +// Don't use this type directly, use NewServerAdvisorsClient() instead. +type ServerAdvisorsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewServerAdvisorsClient creates a new instance of ServerAdvisorsClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewServerAdvisorsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServerAdvisorsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ServerAdvisorsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Gets a server advisor. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - advisorName - The name of the Server Advisor. +// - options - ServerAdvisorsClientGetOptions contains the optional parameters for the ServerAdvisorsClient.Get method. +func (client *ServerAdvisorsClient) Get(ctx context.Context, resourceGroupName string, serverName string, advisorName string, options *ServerAdvisorsClientGetOptions) (ServerAdvisorsClientGetResponse, error) { + var err error + const operationName = "ServerAdvisorsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serverName, advisorName, options) + if err != nil { + return ServerAdvisorsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ServerAdvisorsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ServerAdvisorsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ServerAdvisorsClient) getCreateRequest(ctx context.Context, resourceGroupName string, serverName string, advisorName string, options *ServerAdvisorsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/advisors/{advisorName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if advisorName == "" { + return nil, errors.New("parameter advisorName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{advisorName}", url.PathEscape(advisorName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ServerAdvisorsClient) getHandleResponse(resp *http.Response) (ServerAdvisorsClientGetResponse, error) { + result := ServerAdvisorsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Advisor); err != nil { + return ServerAdvisorsClientGetResponse{}, err + } + return result, nil +} + +// ListByServer - Gets a list of server advisors. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - options - ServerAdvisorsClientListByServerOptions contains the optional parameters for the ServerAdvisorsClient.ListByServer +// method. +func (client *ServerAdvisorsClient) ListByServer(ctx context.Context, resourceGroupName string, serverName string, options *ServerAdvisorsClientListByServerOptions) (ServerAdvisorsClientListByServerResponse, error) { + var err error + const operationName = "ServerAdvisorsClient.ListByServer" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listByServerCreateRequest(ctx, resourceGroupName, serverName, options) + if err != nil { + return ServerAdvisorsClientListByServerResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ServerAdvisorsClientListByServerResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ServerAdvisorsClientListByServerResponse{}, err + } + resp, err := client.listByServerHandleResponse(httpResp) + return resp, err +} + +// listByServerCreateRequest creates the ListByServer request. +func (client *ServerAdvisorsClient) listByServerCreateRequest(ctx context.Context, resourceGroupName string, serverName string, options *ServerAdvisorsClientListByServerOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/advisors" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Expand != nil { + reqQP.Set("$expand", *options.Expand) + } + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByServerHandleResponse handles the ListByServer response. +func (client *ServerAdvisorsClient) listByServerHandleResponse(resp *http.Response) (ServerAdvisorsClientListByServerResponse, error) { + result := ServerAdvisorsClientListByServerResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.AdvisorArray); err != nil { + return ServerAdvisorsClientListByServerResponse{}, err + } + return result, nil +} + +// Update - Updates a server advisor. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - advisorName - The name of the Server Advisor. +// - parameters - The requested advisor resource state. +// - options - ServerAdvisorsClientUpdateOptions contains the optional parameters for the ServerAdvisorsClient.Update method. +func (client *ServerAdvisorsClient) Update(ctx context.Context, resourceGroupName string, serverName string, advisorName string, parameters Advisor, options *ServerAdvisorsClientUpdateOptions) (ServerAdvisorsClientUpdateResponse, error) { + var err error + const operationName = "ServerAdvisorsClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, serverName, advisorName, parameters, options) + if err != nil { + return ServerAdvisorsClientUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ServerAdvisorsClientUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ServerAdvisorsClientUpdateResponse{}, err + } + resp, err := client.updateHandleResponse(httpResp) + return resp, err +} + +// updateCreateRequest creates the Update request. +func (client *ServerAdvisorsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serverName string, advisorName string, parameters Advisor, options *ServerAdvisorsClientUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/advisors/{advisorName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if advisorName == "" { + return nil, errors.New("parameter advisorName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{advisorName}", url.PathEscape(advisorName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// updateHandleResponse handles the Update response. +func (client *ServerAdvisorsClient) updateHandleResponse(resp *http.Response) (ServerAdvisorsClientUpdateResponse, error) { + result := ServerAdvisorsClientUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Advisor); err != nil { + return ServerAdvisorsClientUpdateResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/serverautomatictuning_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/serverautomatictuning_client.go new file mode 100644 index 000000000..dfb7b350d --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/serverautomatictuning_client.go @@ -0,0 +1,180 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ServerAutomaticTuningClient contains the methods for the ServerAutomaticTuning group. +// Don't use this type directly, use NewServerAutomaticTuningClient() instead. +type ServerAutomaticTuningClient struct { + internal *arm.Client + subscriptionID string +} + +// NewServerAutomaticTuningClient creates a new instance of ServerAutomaticTuningClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewServerAutomaticTuningClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServerAutomaticTuningClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ServerAutomaticTuningClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Retrieves server automatic tuning options. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - options - ServerAutomaticTuningClientGetOptions contains the optional parameters for the ServerAutomaticTuningClient.Get +// method. +func (client *ServerAutomaticTuningClient) Get(ctx context.Context, resourceGroupName string, serverName string, options *ServerAutomaticTuningClientGetOptions) (ServerAutomaticTuningClientGetResponse, error) { + var err error + const operationName = "ServerAutomaticTuningClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serverName, options) + if err != nil { + return ServerAutomaticTuningClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ServerAutomaticTuningClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ServerAutomaticTuningClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ServerAutomaticTuningClient) getCreateRequest(ctx context.Context, resourceGroupName string, serverName string, options *ServerAutomaticTuningClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/automaticTuning/current" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ServerAutomaticTuningClient) getHandleResponse(resp *http.Response) (ServerAutomaticTuningClientGetResponse, error) { + result := ServerAutomaticTuningClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ServerAutomaticTuning); err != nil { + return ServerAutomaticTuningClientGetResponse{}, err + } + return result, nil +} + +// Update - Update automatic tuning options on server. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - parameters - The requested automatic tuning resource state. +// - options - ServerAutomaticTuningClientUpdateOptions contains the optional parameters for the ServerAutomaticTuningClient.Update +// method. +func (client *ServerAutomaticTuningClient) Update(ctx context.Context, resourceGroupName string, serverName string, parameters ServerAutomaticTuning, options *ServerAutomaticTuningClientUpdateOptions) (ServerAutomaticTuningClientUpdateResponse, error) { + var err error + const operationName = "ServerAutomaticTuningClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, serverName, parameters, options) + if err != nil { + return ServerAutomaticTuningClientUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ServerAutomaticTuningClientUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ServerAutomaticTuningClientUpdateResponse{}, err + } + resp, err := client.updateHandleResponse(httpResp) + return resp, err +} + +// updateCreateRequest creates the Update request. +func (client *ServerAutomaticTuningClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serverName string, parameters ServerAutomaticTuning, options *ServerAutomaticTuningClientUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/automaticTuning/current" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// updateHandleResponse handles the Update response. +func (client *ServerAutomaticTuningClient) updateHandleResponse(resp *http.Response) (ServerAutomaticTuningClientUpdateResponse, error) { + result := ServerAutomaticTuningClientUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ServerAutomaticTuning); err != nil { + return ServerAutomaticTuningClientUpdateResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/serverazureadadministrators_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/serverazureadadministrators_client.go new file mode 100644 index 000000000..8823448d7 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/serverazureadadministrators_client.go @@ -0,0 +1,348 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ServerAzureADAdministratorsClient contains the methods for the ServerAzureADAdministrators group. +// Don't use this type directly, use NewServerAzureADAdministratorsClient() instead. +type ServerAzureADAdministratorsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewServerAzureADAdministratorsClient creates a new instance of ServerAzureADAdministratorsClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewServerAzureADAdministratorsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServerAzureADAdministratorsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ServerAzureADAdministratorsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates or updates an existing Azure Active Directory administrator. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - administratorName - The name of server active directory administrator. +// - parameters - The requested Azure Active Directory administrator Resource state. +// - options - ServerAzureADAdministratorsClientBeginCreateOrUpdateOptions contains the optional parameters for the ServerAzureADAdministratorsClient.BeginCreateOrUpdate +// method. +func (client *ServerAzureADAdministratorsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, administratorName AdministratorName, parameters ServerAzureADAdministrator, options *ServerAzureADAdministratorsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ServerAzureADAdministratorsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, serverName, administratorName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ServerAzureADAdministratorsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ServerAzureADAdministratorsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates or updates an existing Azure Active Directory administrator. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +func (client *ServerAzureADAdministratorsClient) createOrUpdate(ctx context.Context, resourceGroupName string, serverName string, administratorName AdministratorName, parameters ServerAzureADAdministrator, options *ServerAzureADAdministratorsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ServerAzureADAdministratorsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serverName, administratorName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *ServerAzureADAdministratorsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serverName string, administratorName AdministratorName, parameters ServerAzureADAdministrator, options *ServerAzureADAdministratorsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/administrators/{administratorName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if administratorName == "" { + return nil, errors.New("parameter administratorName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{administratorName}", url.PathEscape(string(administratorName))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes the Azure Active Directory administrator with the given name. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - administratorName - The name of server active directory administrator. +// - options - ServerAzureADAdministratorsClientBeginDeleteOptions contains the optional parameters for the ServerAzureADAdministratorsClient.BeginDelete +// method. +func (client *ServerAzureADAdministratorsClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, administratorName AdministratorName, options *ServerAzureADAdministratorsClientBeginDeleteOptions) (*runtime.Poller[ServerAzureADAdministratorsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, serverName, administratorName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ServerAzureADAdministratorsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ServerAzureADAdministratorsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes the Azure Active Directory administrator with the given name. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +func (client *ServerAzureADAdministratorsClient) deleteOperation(ctx context.Context, resourceGroupName string, serverName string, administratorName AdministratorName, options *ServerAzureADAdministratorsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "ServerAzureADAdministratorsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serverName, administratorName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *ServerAzureADAdministratorsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serverName string, administratorName AdministratorName, options *ServerAzureADAdministratorsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/administrators/{administratorName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if administratorName == "" { + return nil, errors.New("parameter administratorName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{administratorName}", url.PathEscape(string(administratorName))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + return req, nil +} + +// Get - Gets a Azure Active Directory administrator. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - administratorName - The name of server active directory administrator. +// - options - ServerAzureADAdministratorsClientGetOptions contains the optional parameters for the ServerAzureADAdministratorsClient.Get +// method. +func (client *ServerAzureADAdministratorsClient) Get(ctx context.Context, resourceGroupName string, serverName string, administratorName AdministratorName, options *ServerAzureADAdministratorsClientGetOptions) (ServerAzureADAdministratorsClientGetResponse, error) { + var err error + const operationName = "ServerAzureADAdministratorsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serverName, administratorName, options) + if err != nil { + return ServerAzureADAdministratorsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ServerAzureADAdministratorsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ServerAzureADAdministratorsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ServerAzureADAdministratorsClient) getCreateRequest(ctx context.Context, resourceGroupName string, serverName string, administratorName AdministratorName, options *ServerAzureADAdministratorsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/administrators/{administratorName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if administratorName == "" { + return nil, errors.New("parameter administratorName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{administratorName}", url.PathEscape(string(administratorName))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ServerAzureADAdministratorsClient) getHandleResponse(resp *http.Response) (ServerAzureADAdministratorsClientGetResponse, error) { + result := ServerAzureADAdministratorsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ServerAzureADAdministrator); err != nil { + return ServerAzureADAdministratorsClientGetResponse{}, err + } + return result, nil +} + +// NewListByServerPager - Gets a list of Azure Active Directory administrators in a server. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - options - ServerAzureADAdministratorsClientListByServerOptions contains the optional parameters for the ServerAzureADAdministratorsClient.NewListByServerPager +// method. +func (client *ServerAzureADAdministratorsClient) NewListByServerPager(resourceGroupName string, serverName string, options *ServerAzureADAdministratorsClientListByServerOptions) *runtime.Pager[ServerAzureADAdministratorsClientListByServerResponse] { + return runtime.NewPager(runtime.PagingHandler[ServerAzureADAdministratorsClientListByServerResponse]{ + More: func(page ServerAzureADAdministratorsClientListByServerResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ServerAzureADAdministratorsClientListByServerResponse) (ServerAzureADAdministratorsClientListByServerResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ServerAzureADAdministratorsClient.NewListByServerPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByServerCreateRequest(ctx, resourceGroupName, serverName, options) + }, nil) + if err != nil { + return ServerAzureADAdministratorsClientListByServerResponse{}, err + } + return client.listByServerHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByServerCreateRequest creates the ListByServer request. +func (client *ServerAzureADAdministratorsClient) listByServerCreateRequest(ctx context.Context, resourceGroupName string, serverName string, options *ServerAzureADAdministratorsClientListByServerOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/administrators" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByServerHandleResponse handles the ListByServer response. +func (client *ServerAzureADAdministratorsClient) listByServerHandleResponse(resp *http.Response) (ServerAzureADAdministratorsClientListByServerResponse, error) { + result := ServerAzureADAdministratorsClientListByServerResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.AdministratorListResult); err != nil { + return ServerAzureADAdministratorsClientListByServerResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/serverazureadonlyauthentications_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/serverazureadonlyauthentications_client.go new file mode 100644 index 000000000..6b324cc6c --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/serverazureadonlyauthentications_client.go @@ -0,0 +1,350 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ServerAzureADOnlyAuthenticationsClient contains the methods for the ServerAzureADOnlyAuthentications group. +// Don't use this type directly, use NewServerAzureADOnlyAuthenticationsClient() instead. +type ServerAzureADOnlyAuthenticationsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewServerAzureADOnlyAuthenticationsClient creates a new instance of ServerAzureADOnlyAuthenticationsClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewServerAzureADOnlyAuthenticationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServerAzureADOnlyAuthenticationsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ServerAzureADOnlyAuthenticationsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Sets Server Active Directory only authentication property or updates an existing server Active Directory +// only authentication property. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - authenticationName - The name of server azure active directory only authentication. +// - parameters - The required parameters for creating or updating an Active Directory only authentication property. +// - options - ServerAzureADOnlyAuthenticationsClientBeginCreateOrUpdateOptions contains the optional parameters for the ServerAzureADOnlyAuthenticationsClient.BeginCreateOrUpdate +// method. +func (client *ServerAzureADOnlyAuthenticationsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, authenticationName AuthenticationName, parameters ServerAzureADOnlyAuthentication, options *ServerAzureADOnlyAuthenticationsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ServerAzureADOnlyAuthenticationsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, serverName, authenticationName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ServerAzureADOnlyAuthenticationsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ServerAzureADOnlyAuthenticationsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Sets Server Active Directory only authentication property or updates an existing server Active Directory +// only authentication property. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +func (client *ServerAzureADOnlyAuthenticationsClient) createOrUpdate(ctx context.Context, resourceGroupName string, serverName string, authenticationName AuthenticationName, parameters ServerAzureADOnlyAuthentication, options *ServerAzureADOnlyAuthenticationsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ServerAzureADOnlyAuthenticationsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serverName, authenticationName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *ServerAzureADOnlyAuthenticationsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serverName string, authenticationName AuthenticationName, parameters ServerAzureADOnlyAuthentication, options *ServerAzureADOnlyAuthenticationsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/azureADOnlyAuthentications/{authenticationName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if authenticationName == "" { + return nil, errors.New("parameter authenticationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{authenticationName}", url.PathEscape(string(authenticationName))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes an existing server Active Directory only authentication property. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - authenticationName - The name of server azure active directory only authentication. +// - options - ServerAzureADOnlyAuthenticationsClientBeginDeleteOptions contains the optional parameters for the ServerAzureADOnlyAuthenticationsClient.BeginDelete +// method. +func (client *ServerAzureADOnlyAuthenticationsClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, authenticationName AuthenticationName, options *ServerAzureADOnlyAuthenticationsClientBeginDeleteOptions) (*runtime.Poller[ServerAzureADOnlyAuthenticationsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, serverName, authenticationName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ServerAzureADOnlyAuthenticationsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ServerAzureADOnlyAuthenticationsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes an existing server Active Directory only authentication property. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +func (client *ServerAzureADOnlyAuthenticationsClient) deleteOperation(ctx context.Context, resourceGroupName string, serverName string, authenticationName AuthenticationName, options *ServerAzureADOnlyAuthenticationsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "ServerAzureADOnlyAuthenticationsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serverName, authenticationName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *ServerAzureADOnlyAuthenticationsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serverName string, authenticationName AuthenticationName, options *ServerAzureADOnlyAuthenticationsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/azureADOnlyAuthentications/{authenticationName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if authenticationName == "" { + return nil, errors.New("parameter authenticationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{authenticationName}", url.PathEscape(string(authenticationName))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + return req, nil +} + +// Get - Gets a specific Azure Active Directory only authentication property. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - authenticationName - The name of server azure active directory only authentication. +// - options - ServerAzureADOnlyAuthenticationsClientGetOptions contains the optional parameters for the ServerAzureADOnlyAuthenticationsClient.Get +// method. +func (client *ServerAzureADOnlyAuthenticationsClient) Get(ctx context.Context, resourceGroupName string, serverName string, authenticationName AuthenticationName, options *ServerAzureADOnlyAuthenticationsClientGetOptions) (ServerAzureADOnlyAuthenticationsClientGetResponse, error) { + var err error + const operationName = "ServerAzureADOnlyAuthenticationsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serverName, authenticationName, options) + if err != nil { + return ServerAzureADOnlyAuthenticationsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ServerAzureADOnlyAuthenticationsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ServerAzureADOnlyAuthenticationsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ServerAzureADOnlyAuthenticationsClient) getCreateRequest(ctx context.Context, resourceGroupName string, serverName string, authenticationName AuthenticationName, options *ServerAzureADOnlyAuthenticationsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/azureADOnlyAuthentications/{authenticationName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if authenticationName == "" { + return nil, errors.New("parameter authenticationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{authenticationName}", url.PathEscape(string(authenticationName))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ServerAzureADOnlyAuthenticationsClient) getHandleResponse(resp *http.Response) (ServerAzureADOnlyAuthenticationsClientGetResponse, error) { + result := ServerAzureADOnlyAuthenticationsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ServerAzureADOnlyAuthentication); err != nil { + return ServerAzureADOnlyAuthenticationsClientGetResponse{}, err + } + return result, nil +} + +// NewListByServerPager - Gets a list of server Azure Active Directory only authentications. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - options - ServerAzureADOnlyAuthenticationsClientListByServerOptions contains the optional parameters for the ServerAzureADOnlyAuthenticationsClient.NewListByServerPager +// method. +func (client *ServerAzureADOnlyAuthenticationsClient) NewListByServerPager(resourceGroupName string, serverName string, options *ServerAzureADOnlyAuthenticationsClientListByServerOptions) *runtime.Pager[ServerAzureADOnlyAuthenticationsClientListByServerResponse] { + return runtime.NewPager(runtime.PagingHandler[ServerAzureADOnlyAuthenticationsClientListByServerResponse]{ + More: func(page ServerAzureADOnlyAuthenticationsClientListByServerResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ServerAzureADOnlyAuthenticationsClientListByServerResponse) (ServerAzureADOnlyAuthenticationsClientListByServerResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ServerAzureADOnlyAuthenticationsClient.NewListByServerPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByServerCreateRequest(ctx, resourceGroupName, serverName, options) + }, nil) + if err != nil { + return ServerAzureADOnlyAuthenticationsClientListByServerResponse{}, err + } + return client.listByServerHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByServerCreateRequest creates the ListByServer request. +func (client *ServerAzureADOnlyAuthenticationsClient) listByServerCreateRequest(ctx context.Context, resourceGroupName string, serverName string, options *ServerAzureADOnlyAuthenticationsClientListByServerOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/azureADOnlyAuthentications" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByServerHandleResponse handles the ListByServer response. +func (client *ServerAzureADOnlyAuthenticationsClient) listByServerHandleResponse(resp *http.Response) (ServerAzureADOnlyAuthenticationsClientListByServerResponse, error) { + result := ServerAzureADOnlyAuthenticationsClientListByServerResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.AzureADOnlyAuthListResult); err != nil { + return ServerAzureADOnlyAuthenticationsClientListByServerResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/serverblobauditingpolicies_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/serverblobauditingpolicies_client.go new file mode 100644 index 000000000..6554ffdbf --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/serverblobauditingpolicies_client.go @@ -0,0 +1,259 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ServerBlobAuditingPoliciesClient contains the methods for the ServerBlobAuditingPolicies group. +// Don't use this type directly, use NewServerBlobAuditingPoliciesClient() instead. +type ServerBlobAuditingPoliciesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewServerBlobAuditingPoliciesClient creates a new instance of ServerBlobAuditingPoliciesClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewServerBlobAuditingPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServerBlobAuditingPoliciesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ServerBlobAuditingPoliciesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates or updates a server's blob auditing policy. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - parameters - Properties of blob auditing policy +// - options - ServerBlobAuditingPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the ServerBlobAuditingPoliciesClient.BeginCreateOrUpdate +// method. +func (client *ServerBlobAuditingPoliciesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, parameters ServerBlobAuditingPolicy, options *ServerBlobAuditingPoliciesClientBeginCreateOrUpdateOptions) (*runtime.Poller[ServerBlobAuditingPoliciesClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, serverName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ServerBlobAuditingPoliciesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ServerBlobAuditingPoliciesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates or updates a server's blob auditing policy. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-11-01-preview +func (client *ServerBlobAuditingPoliciesClient) createOrUpdate(ctx context.Context, resourceGroupName string, serverName string, parameters ServerBlobAuditingPolicy, options *ServerBlobAuditingPoliciesClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ServerBlobAuditingPoliciesClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serverName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *ServerBlobAuditingPoliciesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serverName string, parameters ServerBlobAuditingPolicy, options *ServerBlobAuditingPoliciesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/auditingSettings/{blobAuditingPolicyName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + urlPath = strings.ReplaceAll(urlPath, "{blobAuditingPolicyName}", url.PathEscape("default")) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// Get - Gets a server's blob auditing policy. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - options - ServerBlobAuditingPoliciesClientGetOptions contains the optional parameters for the ServerBlobAuditingPoliciesClient.Get +// method. +func (client *ServerBlobAuditingPoliciesClient) Get(ctx context.Context, resourceGroupName string, serverName string, options *ServerBlobAuditingPoliciesClientGetOptions) (ServerBlobAuditingPoliciesClientGetResponse, error) { + var err error + const operationName = "ServerBlobAuditingPoliciesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serverName, options) + if err != nil { + return ServerBlobAuditingPoliciesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ServerBlobAuditingPoliciesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ServerBlobAuditingPoliciesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ServerBlobAuditingPoliciesClient) getCreateRequest(ctx context.Context, resourceGroupName string, serverName string, options *ServerBlobAuditingPoliciesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/auditingSettings/{blobAuditingPolicyName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + urlPath = strings.ReplaceAll(urlPath, "{blobAuditingPolicyName}", url.PathEscape("default")) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ServerBlobAuditingPoliciesClient) getHandleResponse(resp *http.Response) (ServerBlobAuditingPoliciesClientGetResponse, error) { + result := ServerBlobAuditingPoliciesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ServerBlobAuditingPolicy); err != nil { + return ServerBlobAuditingPoliciesClientGetResponse{}, err + } + return result, nil +} + +// NewListByServerPager - Lists auditing settings of a server. +// +// Generated from API version 2021-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - options - ServerBlobAuditingPoliciesClientListByServerOptions contains the optional parameters for the ServerBlobAuditingPoliciesClient.NewListByServerPager +// method. +func (client *ServerBlobAuditingPoliciesClient) NewListByServerPager(resourceGroupName string, serverName string, options *ServerBlobAuditingPoliciesClientListByServerOptions) *runtime.Pager[ServerBlobAuditingPoliciesClientListByServerResponse] { + return runtime.NewPager(runtime.PagingHandler[ServerBlobAuditingPoliciesClientListByServerResponse]{ + More: func(page ServerBlobAuditingPoliciesClientListByServerResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ServerBlobAuditingPoliciesClientListByServerResponse) (ServerBlobAuditingPoliciesClientListByServerResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ServerBlobAuditingPoliciesClient.NewListByServerPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByServerCreateRequest(ctx, resourceGroupName, serverName, options) + }, nil) + if err != nil { + return ServerBlobAuditingPoliciesClientListByServerResponse{}, err + } + return client.listByServerHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByServerCreateRequest creates the ListByServer request. +func (client *ServerBlobAuditingPoliciesClient) listByServerCreateRequest(ctx context.Context, resourceGroupName string, serverName string, options *ServerBlobAuditingPoliciesClientListByServerOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/auditingSettings" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByServerHandleResponse handles the ListByServer response. +func (client *ServerBlobAuditingPoliciesClient) listByServerHandleResponse(resp *http.Response) (ServerBlobAuditingPoliciesClientListByServerResponse, error) { + result := ServerBlobAuditingPoliciesClientListByServerResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ServerBlobAuditingPolicyListResult); err != nil { + return ServerBlobAuditingPoliciesClientListByServerResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/servercommunicationlinks_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/servercommunicationlinks_client.go new file mode 100644 index 000000000..1d02327eb --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/servercommunicationlinks_client.go @@ -0,0 +1,328 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ServerCommunicationLinksClient contains the methods for the ServerCommunicationLinks group. +// Don't use this type directly, use NewServerCommunicationLinksClient() instead. +type ServerCommunicationLinksClient struct { + internal *arm.Client + subscriptionID string +} + +// NewServerCommunicationLinksClient creates a new instance of ServerCommunicationLinksClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewServerCommunicationLinksClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServerCommunicationLinksClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ServerCommunicationLinksClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates a server communication link. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2014-04-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - communicationLinkName - The name of the server communication link. +// - parameters - The required parameters for creating a server communication link. +// - options - ServerCommunicationLinksClientBeginCreateOrUpdateOptions contains the optional parameters for the ServerCommunicationLinksClient.BeginCreateOrUpdate +// method. +func (client *ServerCommunicationLinksClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, communicationLinkName string, parameters ServerCommunicationLink, options *ServerCommunicationLinksClientBeginCreateOrUpdateOptions) (*runtime.Poller[ServerCommunicationLinksClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, serverName, communicationLinkName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ServerCommunicationLinksClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ServerCommunicationLinksClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates a server communication link. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2014-04-01 +func (client *ServerCommunicationLinksClient) createOrUpdate(ctx context.Context, resourceGroupName string, serverName string, communicationLinkName string, parameters ServerCommunicationLink, options *ServerCommunicationLinksClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ServerCommunicationLinksClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serverName, communicationLinkName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *ServerCommunicationLinksClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serverName string, communicationLinkName string, parameters ServerCommunicationLink, options *ServerCommunicationLinksClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/communicationLinks/{communicationLinkName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if communicationLinkName == "" { + return nil, errors.New("parameter communicationLinkName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{communicationLinkName}", url.PathEscape(communicationLinkName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2014-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// Delete - Deletes a server communication link. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2014-04-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - communicationLinkName - The name of the server communication link. +// - options - ServerCommunicationLinksClientDeleteOptions contains the optional parameters for the ServerCommunicationLinksClient.Delete +// method. +func (client *ServerCommunicationLinksClient) Delete(ctx context.Context, resourceGroupName string, serverName string, communicationLinkName string, options *ServerCommunicationLinksClientDeleteOptions) (ServerCommunicationLinksClientDeleteResponse, error) { + var err error + const operationName = "ServerCommunicationLinksClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serverName, communicationLinkName, options) + if err != nil { + return ServerCommunicationLinksClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ServerCommunicationLinksClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ServerCommunicationLinksClientDeleteResponse{}, err + } + return ServerCommunicationLinksClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *ServerCommunicationLinksClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serverName string, communicationLinkName string, options *ServerCommunicationLinksClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/communicationLinks/{communicationLinkName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if communicationLinkName == "" { + return nil, errors.New("parameter communicationLinkName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{communicationLinkName}", url.PathEscape(communicationLinkName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2014-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + return req, nil +} + +// Get - Returns a server communication link. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2014-04-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - communicationLinkName - The name of the server communication link. +// - options - ServerCommunicationLinksClientGetOptions contains the optional parameters for the ServerCommunicationLinksClient.Get +// method. +func (client *ServerCommunicationLinksClient) Get(ctx context.Context, resourceGroupName string, serverName string, communicationLinkName string, options *ServerCommunicationLinksClientGetOptions) (ServerCommunicationLinksClientGetResponse, error) { + var err error + const operationName = "ServerCommunicationLinksClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serverName, communicationLinkName, options) + if err != nil { + return ServerCommunicationLinksClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ServerCommunicationLinksClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ServerCommunicationLinksClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ServerCommunicationLinksClient) getCreateRequest(ctx context.Context, resourceGroupName string, serverName string, communicationLinkName string, options *ServerCommunicationLinksClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/communicationLinks/{communicationLinkName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if communicationLinkName == "" { + return nil, errors.New("parameter communicationLinkName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{communicationLinkName}", url.PathEscape(communicationLinkName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2014-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ServerCommunicationLinksClient) getHandleResponse(resp *http.Response) (ServerCommunicationLinksClientGetResponse, error) { + result := ServerCommunicationLinksClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ServerCommunicationLink); err != nil { + return ServerCommunicationLinksClientGetResponse{}, err + } + return result, nil +} + +// NewListByServerPager - Gets a list of server communication links. +// +// Generated from API version 2014-04-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - options - ServerCommunicationLinksClientListByServerOptions contains the optional parameters for the ServerCommunicationLinksClient.NewListByServerPager +// method. +func (client *ServerCommunicationLinksClient) NewListByServerPager(resourceGroupName string, serverName string, options *ServerCommunicationLinksClientListByServerOptions) *runtime.Pager[ServerCommunicationLinksClientListByServerResponse] { + return runtime.NewPager(runtime.PagingHandler[ServerCommunicationLinksClientListByServerResponse]{ + More: func(page ServerCommunicationLinksClientListByServerResponse) bool { + return false + }, + Fetcher: func(ctx context.Context, page *ServerCommunicationLinksClientListByServerResponse) (ServerCommunicationLinksClientListByServerResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ServerCommunicationLinksClient.NewListByServerPager") + req, err := client.listByServerCreateRequest(ctx, resourceGroupName, serverName, options) + if err != nil { + return ServerCommunicationLinksClientListByServerResponse{}, err + } + resp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ServerCommunicationLinksClientListByServerResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return ServerCommunicationLinksClientListByServerResponse{}, runtime.NewResponseError(resp) + } + return client.listByServerHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByServerCreateRequest creates the ListByServer request. +func (client *ServerCommunicationLinksClient) listByServerCreateRequest(ctx context.Context, resourceGroupName string, serverName string, options *ServerCommunicationLinksClientListByServerOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/communicationLinks" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2014-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByServerHandleResponse handles the ListByServer response. +func (client *ServerCommunicationLinksClient) listByServerHandleResponse(resp *http.Response) (ServerCommunicationLinksClientListByServerResponse, error) { + result := ServerCommunicationLinksClientListByServerResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ServerCommunicationLinkListResult); err != nil { + return ServerCommunicationLinksClientListByServerResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/serverconnectionpolicies_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/serverconnectionpolicies_client.go new file mode 100644 index 000000000..163cbdb57 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/serverconnectionpolicies_client.go @@ -0,0 +1,267 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ServerConnectionPoliciesClient contains the methods for the ServerConnectionPolicies group. +// Don't use this type directly, use NewServerConnectionPoliciesClient() instead. +type ServerConnectionPoliciesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewServerConnectionPoliciesClient creates a new instance of ServerConnectionPoliciesClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewServerConnectionPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServerConnectionPoliciesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ServerConnectionPoliciesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Updates a server connection policy +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-05-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - connectionPolicyName - The name of the connection policy. +// - parameters - The required parameters for updating a server connection policy. +// - options - ServerConnectionPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the ServerConnectionPoliciesClient.BeginCreateOrUpdate +// method. +func (client *ServerConnectionPoliciesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, connectionPolicyName ConnectionPolicyName, parameters ServerConnectionPolicy, options *ServerConnectionPoliciesClientBeginCreateOrUpdateOptions) (*runtime.Poller[ServerConnectionPoliciesClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, serverName, connectionPolicyName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ServerConnectionPoliciesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ServerConnectionPoliciesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Updates a server connection policy +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-05-01-preview +func (client *ServerConnectionPoliciesClient) createOrUpdate(ctx context.Context, resourceGroupName string, serverName string, connectionPolicyName ConnectionPolicyName, parameters ServerConnectionPolicy, options *ServerConnectionPoliciesClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ServerConnectionPoliciesClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serverName, connectionPolicyName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *ServerConnectionPoliciesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serverName string, connectionPolicyName ConnectionPolicyName, parameters ServerConnectionPolicy, options *ServerConnectionPoliciesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/connectionPolicies/{connectionPolicyName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if connectionPolicyName == "" { + return nil, errors.New("parameter connectionPolicyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{connectionPolicyName}", url.PathEscape(string(connectionPolicyName))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-05-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// Get - Gets a server connection policy +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-05-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - connectionPolicyName - The name of the connection policy. +// - options - ServerConnectionPoliciesClientGetOptions contains the optional parameters for the ServerConnectionPoliciesClient.Get +// method. +func (client *ServerConnectionPoliciesClient) Get(ctx context.Context, resourceGroupName string, serverName string, connectionPolicyName ConnectionPolicyName, options *ServerConnectionPoliciesClientGetOptions) (ServerConnectionPoliciesClientGetResponse, error) { + var err error + const operationName = "ServerConnectionPoliciesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serverName, connectionPolicyName, options) + if err != nil { + return ServerConnectionPoliciesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ServerConnectionPoliciesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ServerConnectionPoliciesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ServerConnectionPoliciesClient) getCreateRequest(ctx context.Context, resourceGroupName string, serverName string, connectionPolicyName ConnectionPolicyName, options *ServerConnectionPoliciesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/connectionPolicies/{connectionPolicyName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if connectionPolicyName == "" { + return nil, errors.New("parameter connectionPolicyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{connectionPolicyName}", url.PathEscape(string(connectionPolicyName))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-05-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ServerConnectionPoliciesClient) getHandleResponse(resp *http.Response) (ServerConnectionPoliciesClientGetResponse, error) { + result := ServerConnectionPoliciesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ServerConnectionPolicy); err != nil { + return ServerConnectionPoliciesClientGetResponse{}, err + } + return result, nil +} + +// NewListByServerPager - Lists connection policy +// +// Generated from API version 2021-05-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - options - ServerConnectionPoliciesClientListByServerOptions contains the optional parameters for the ServerConnectionPoliciesClient.NewListByServerPager +// method. +func (client *ServerConnectionPoliciesClient) NewListByServerPager(resourceGroupName string, serverName string, options *ServerConnectionPoliciesClientListByServerOptions) *runtime.Pager[ServerConnectionPoliciesClientListByServerResponse] { + return runtime.NewPager(runtime.PagingHandler[ServerConnectionPoliciesClientListByServerResponse]{ + More: func(page ServerConnectionPoliciesClientListByServerResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ServerConnectionPoliciesClientListByServerResponse) (ServerConnectionPoliciesClientListByServerResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ServerConnectionPoliciesClient.NewListByServerPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByServerCreateRequest(ctx, resourceGroupName, serverName, options) + }, nil) + if err != nil { + return ServerConnectionPoliciesClientListByServerResponse{}, err + } + return client.listByServerHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByServerCreateRequest creates the ListByServer request. +func (client *ServerConnectionPoliciesClient) listByServerCreateRequest(ctx context.Context, resourceGroupName string, serverName string, options *ServerConnectionPoliciesClientListByServerOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/connectionPolicies" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-05-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByServerHandleResponse handles the ListByServer response. +func (client *ServerConnectionPoliciesClient) listByServerHandleResponse(resp *http.Response) (ServerConnectionPoliciesClientListByServerResponse, error) { + result := ServerConnectionPoliciesClientListByServerResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ServerConnectionPolicyListResult); err != nil { + return ServerConnectionPoliciesClientListByServerResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/serverdevopsauditsettings_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/serverdevopsauditsettings_client.go new file mode 100644 index 000000000..8dbc16a99 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/serverdevopsauditsettings_client.go @@ -0,0 +1,268 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ServerDevOpsAuditSettingsClient contains the methods for the ServerDevOpsAuditSettings group. +// Don't use this type directly, use NewServerDevOpsAuditSettingsClient() instead. +type ServerDevOpsAuditSettingsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewServerDevOpsAuditSettingsClient creates a new instance of ServerDevOpsAuditSettingsClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewServerDevOpsAuditSettingsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServerDevOpsAuditSettingsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ServerDevOpsAuditSettingsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates or updates a server's DevOps audit settings. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - devOpsAuditingSettingsName - The name of the devops audit settings. This should always be 'default'. +// - parameters - Properties of DevOps audit settings +// - options - ServerDevOpsAuditSettingsClientBeginCreateOrUpdateOptions contains the optional parameters for the ServerDevOpsAuditSettingsClient.BeginCreateOrUpdate +// method. +func (client *ServerDevOpsAuditSettingsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, devOpsAuditingSettingsName string, parameters ServerDevOpsAuditingSettings, options *ServerDevOpsAuditSettingsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ServerDevOpsAuditSettingsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, serverName, devOpsAuditingSettingsName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ServerDevOpsAuditSettingsClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ServerDevOpsAuditSettingsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates or updates a server's DevOps audit settings. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +func (client *ServerDevOpsAuditSettingsClient) createOrUpdate(ctx context.Context, resourceGroupName string, serverName string, devOpsAuditingSettingsName string, parameters ServerDevOpsAuditingSettings, options *ServerDevOpsAuditSettingsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ServerDevOpsAuditSettingsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serverName, devOpsAuditingSettingsName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *ServerDevOpsAuditSettingsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serverName string, devOpsAuditingSettingsName string, parameters ServerDevOpsAuditingSettings, options *ServerDevOpsAuditSettingsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/devOpsAuditingSettings/{devOpsAuditingSettingsName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if devOpsAuditingSettingsName == "" { + return nil, errors.New("parameter devOpsAuditingSettingsName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{devOpsAuditingSettingsName}", url.PathEscape(devOpsAuditingSettingsName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// Get - Gets a server's DevOps audit settings. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - devOpsAuditingSettingsName - The name of the devops audit settings. This should always be 'default'. +// - options - ServerDevOpsAuditSettingsClientGetOptions contains the optional parameters for the ServerDevOpsAuditSettingsClient.Get +// method. +func (client *ServerDevOpsAuditSettingsClient) Get(ctx context.Context, resourceGroupName string, serverName string, devOpsAuditingSettingsName string, options *ServerDevOpsAuditSettingsClientGetOptions) (ServerDevOpsAuditSettingsClientGetResponse, error) { + var err error + const operationName = "ServerDevOpsAuditSettingsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serverName, devOpsAuditingSettingsName, options) + if err != nil { + return ServerDevOpsAuditSettingsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ServerDevOpsAuditSettingsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ServerDevOpsAuditSettingsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ServerDevOpsAuditSettingsClient) getCreateRequest(ctx context.Context, resourceGroupName string, serverName string, devOpsAuditingSettingsName string, options *ServerDevOpsAuditSettingsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/devOpsAuditingSettings/{devOpsAuditingSettingsName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if devOpsAuditingSettingsName == "" { + return nil, errors.New("parameter devOpsAuditingSettingsName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{devOpsAuditingSettingsName}", url.PathEscape(devOpsAuditingSettingsName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ServerDevOpsAuditSettingsClient) getHandleResponse(resp *http.Response) (ServerDevOpsAuditSettingsClientGetResponse, error) { + result := ServerDevOpsAuditSettingsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ServerDevOpsAuditingSettings); err != nil { + return ServerDevOpsAuditSettingsClientGetResponse{}, err + } + return result, nil +} + +// NewListByServerPager - Lists DevOps audit settings of a server. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - options - ServerDevOpsAuditSettingsClientListByServerOptions contains the optional parameters for the ServerDevOpsAuditSettingsClient.NewListByServerPager +// method. +func (client *ServerDevOpsAuditSettingsClient) NewListByServerPager(resourceGroupName string, serverName string, options *ServerDevOpsAuditSettingsClientListByServerOptions) *runtime.Pager[ServerDevOpsAuditSettingsClientListByServerResponse] { + return runtime.NewPager(runtime.PagingHandler[ServerDevOpsAuditSettingsClientListByServerResponse]{ + More: func(page ServerDevOpsAuditSettingsClientListByServerResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ServerDevOpsAuditSettingsClientListByServerResponse) (ServerDevOpsAuditSettingsClientListByServerResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ServerDevOpsAuditSettingsClient.NewListByServerPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByServerCreateRequest(ctx, resourceGroupName, serverName, options) + }, nil) + if err != nil { + return ServerDevOpsAuditSettingsClientListByServerResponse{}, err + } + return client.listByServerHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByServerCreateRequest creates the ListByServer request. +func (client *ServerDevOpsAuditSettingsClient) listByServerCreateRequest(ctx context.Context, resourceGroupName string, serverName string, options *ServerDevOpsAuditSettingsClientListByServerOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/devOpsAuditingSettings" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByServerHandleResponse handles the ListByServer response. +func (client *ServerDevOpsAuditSettingsClient) listByServerHandleResponse(resp *http.Response) (ServerDevOpsAuditSettingsClientListByServerResponse, error) { + result := ServerDevOpsAuditSettingsClientListByServerResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ServerDevOpsAuditSettingsListResult); err != nil { + return ServerDevOpsAuditSettingsClientListByServerResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/serverdnsaliases_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/serverdnsaliases_client.go new file mode 100644 index 000000000..d87ca36bd --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/serverdnsaliases_client.go @@ -0,0 +1,428 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ServerDNSAliasesClient contains the methods for the ServerDNSAliases group. +// Don't use this type directly, use NewServerDNSAliasesClient() instead. +type ServerDNSAliasesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewServerDNSAliasesClient creates a new instance of ServerDNSAliasesClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewServerDNSAliasesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServerDNSAliasesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ServerDNSAliasesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginAcquire - Acquires server DNS alias from another server. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server that the alias is pointing to. +// - dnsAliasName - The name of the server dns alias. +// - options - ServerDNSAliasesClientBeginAcquireOptions contains the optional parameters for the ServerDNSAliasesClient.BeginAcquire +// method. +func (client *ServerDNSAliasesClient) BeginAcquire(ctx context.Context, resourceGroupName string, serverName string, dnsAliasName string, parameters ServerDNSAliasAcquisition, options *ServerDNSAliasesClientBeginAcquireOptions) (*runtime.Poller[ServerDNSAliasesClientAcquireResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.acquire(ctx, resourceGroupName, serverName, dnsAliasName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ServerDNSAliasesClientAcquireResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ServerDNSAliasesClientAcquireResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Acquire - Acquires server DNS alias from another server. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +func (client *ServerDNSAliasesClient) acquire(ctx context.Context, resourceGroupName string, serverName string, dnsAliasName string, parameters ServerDNSAliasAcquisition, options *ServerDNSAliasesClientBeginAcquireOptions) (*http.Response, error) { + var err error + const operationName = "ServerDNSAliasesClient.BeginAcquire" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.acquireCreateRequest(ctx, resourceGroupName, serverName, dnsAliasName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// acquireCreateRequest creates the Acquire request. +func (client *ServerDNSAliasesClient) acquireCreateRequest(ctx context.Context, resourceGroupName string, serverName string, dnsAliasName string, parameters ServerDNSAliasAcquisition, options *ServerDNSAliasesClientBeginAcquireOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/dnsAliases/{dnsAliasName}/acquire" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if dnsAliasName == "" { + return nil, errors.New("parameter dnsAliasName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{dnsAliasName}", url.PathEscape(dnsAliasName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginCreateOrUpdate - Creates a server DNS alias. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server that the alias is pointing to. +// - dnsAliasName - The name of the server dns alias. +// - options - ServerDNSAliasesClientBeginCreateOrUpdateOptions contains the optional parameters for the ServerDNSAliasesClient.BeginCreateOrUpdate +// method. +func (client *ServerDNSAliasesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, dnsAliasName string, options *ServerDNSAliasesClientBeginCreateOrUpdateOptions) (*runtime.Poller[ServerDNSAliasesClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, serverName, dnsAliasName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ServerDNSAliasesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ServerDNSAliasesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates a server DNS alias. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +func (client *ServerDNSAliasesClient) createOrUpdate(ctx context.Context, resourceGroupName string, serverName string, dnsAliasName string, options *ServerDNSAliasesClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ServerDNSAliasesClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serverName, dnsAliasName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *ServerDNSAliasesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serverName string, dnsAliasName string, options *ServerDNSAliasesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/dnsAliases/{dnsAliasName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if dnsAliasName == "" { + return nil, errors.New("parameter dnsAliasName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{dnsAliasName}", url.PathEscape(dnsAliasName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginDelete - Deletes the server DNS alias with the given name. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server that the alias is pointing to. +// - dnsAliasName - The name of the server dns alias. +// - options - ServerDNSAliasesClientBeginDeleteOptions contains the optional parameters for the ServerDNSAliasesClient.BeginDelete +// method. +func (client *ServerDNSAliasesClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, dnsAliasName string, options *ServerDNSAliasesClientBeginDeleteOptions) (*runtime.Poller[ServerDNSAliasesClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, serverName, dnsAliasName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ServerDNSAliasesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ServerDNSAliasesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes the server DNS alias with the given name. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +func (client *ServerDNSAliasesClient) deleteOperation(ctx context.Context, resourceGroupName string, serverName string, dnsAliasName string, options *ServerDNSAliasesClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "ServerDNSAliasesClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serverName, dnsAliasName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *ServerDNSAliasesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serverName string, dnsAliasName string, options *ServerDNSAliasesClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/dnsAliases/{dnsAliasName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if dnsAliasName == "" { + return nil, errors.New("parameter dnsAliasName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{dnsAliasName}", url.PathEscape(dnsAliasName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + return req, nil +} + +// Get - Gets a server DNS alias. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server that the alias is pointing to. +// - dnsAliasName - The name of the server dns alias. +// - options - ServerDNSAliasesClientGetOptions contains the optional parameters for the ServerDNSAliasesClient.Get method. +func (client *ServerDNSAliasesClient) Get(ctx context.Context, resourceGroupName string, serverName string, dnsAliasName string, options *ServerDNSAliasesClientGetOptions) (ServerDNSAliasesClientGetResponse, error) { + var err error + const operationName = "ServerDNSAliasesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serverName, dnsAliasName, options) + if err != nil { + return ServerDNSAliasesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ServerDNSAliasesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ServerDNSAliasesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ServerDNSAliasesClient) getCreateRequest(ctx context.Context, resourceGroupName string, serverName string, dnsAliasName string, options *ServerDNSAliasesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/dnsAliases/{dnsAliasName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if dnsAliasName == "" { + return nil, errors.New("parameter dnsAliasName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{dnsAliasName}", url.PathEscape(dnsAliasName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ServerDNSAliasesClient) getHandleResponse(resp *http.Response) (ServerDNSAliasesClientGetResponse, error) { + result := ServerDNSAliasesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ServerDNSAlias); err != nil { + return ServerDNSAliasesClientGetResponse{}, err + } + return result, nil +} + +// NewListByServerPager - Gets a list of server DNS aliases for a server. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server that the alias is pointing to. +// - options - ServerDNSAliasesClientListByServerOptions contains the optional parameters for the ServerDNSAliasesClient.NewListByServerPager +// method. +func (client *ServerDNSAliasesClient) NewListByServerPager(resourceGroupName string, serverName string, options *ServerDNSAliasesClientListByServerOptions) *runtime.Pager[ServerDNSAliasesClientListByServerResponse] { + return runtime.NewPager(runtime.PagingHandler[ServerDNSAliasesClientListByServerResponse]{ + More: func(page ServerDNSAliasesClientListByServerResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ServerDNSAliasesClientListByServerResponse) (ServerDNSAliasesClientListByServerResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ServerDNSAliasesClient.NewListByServerPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByServerCreateRequest(ctx, resourceGroupName, serverName, options) + }, nil) + if err != nil { + return ServerDNSAliasesClientListByServerResponse{}, err + } + return client.listByServerHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByServerCreateRequest creates the ListByServer request. +func (client *ServerDNSAliasesClient) listByServerCreateRequest(ctx context.Context, resourceGroupName string, serverName string, options *ServerDNSAliasesClientListByServerOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/dnsAliases" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByServerHandleResponse handles the ListByServer response. +func (client *ServerDNSAliasesClient) listByServerHandleResponse(resp *http.Response) (ServerDNSAliasesClientListByServerResponse, error) { + result := ServerDNSAliasesClientListByServerResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ServerDNSAliasListResult); err != nil { + return ServerDNSAliasesClientListByServerResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/serverkeys_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/serverkeys_client.go new file mode 100644 index 000000000..5075740a0 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/serverkeys_client.go @@ -0,0 +1,349 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ServerKeysClient contains the methods for the ServerKeys group. +// Don't use this type directly, use NewServerKeysClient() instead. +type ServerKeysClient struct { + internal *arm.Client + subscriptionID string +} + +// NewServerKeysClient creates a new instance of ServerKeysClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewServerKeysClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServerKeysClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ServerKeysClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates or updates a server key. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - keyName - The name of the server key to be operated on (updated or created). The key name is required to be in the format +// of 'vaultkeyversion'. For example, if the keyId is +// https://YourVaultName.vault.azure.net/keys/YourKeyName/YourKeyVersion, then the server key name should be formatted as: +// YourVaultNameYourKeyNameYourKeyVersion +// - parameters - The requested server key resource state. +// - options - ServerKeysClientBeginCreateOrUpdateOptions contains the optional parameters for the ServerKeysClient.BeginCreateOrUpdate +// method. +func (client *ServerKeysClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, keyName string, parameters ServerKey, options *ServerKeysClientBeginCreateOrUpdateOptions) (*runtime.Poller[ServerKeysClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, serverName, keyName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ServerKeysClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ServerKeysClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates or updates a server key. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +func (client *ServerKeysClient) createOrUpdate(ctx context.Context, resourceGroupName string, serverName string, keyName string, parameters ServerKey, options *ServerKeysClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ServerKeysClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serverName, keyName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *ServerKeysClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serverName string, keyName string, parameters ServerKey, options *ServerKeysClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/keys/{keyName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if keyName == "" { + return nil, errors.New("parameter keyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{keyName}", url.PathEscape(keyName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes the server key with the given name. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - keyName - The name of the server key to be deleted. +// - options - ServerKeysClientBeginDeleteOptions contains the optional parameters for the ServerKeysClient.BeginDelete method. +func (client *ServerKeysClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, keyName string, options *ServerKeysClientBeginDeleteOptions) (*runtime.Poller[ServerKeysClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, serverName, keyName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ServerKeysClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ServerKeysClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes the server key with the given name. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +func (client *ServerKeysClient) deleteOperation(ctx context.Context, resourceGroupName string, serverName string, keyName string, options *ServerKeysClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "ServerKeysClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serverName, keyName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *ServerKeysClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serverName string, keyName string, options *ServerKeysClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/keys/{keyName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if keyName == "" { + return nil, errors.New("parameter keyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{keyName}", url.PathEscape(keyName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + return req, nil +} + +// Get - Gets a server key. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - keyName - The name of the server key to be retrieved. +// - options - ServerKeysClientGetOptions contains the optional parameters for the ServerKeysClient.Get method. +func (client *ServerKeysClient) Get(ctx context.Context, resourceGroupName string, serverName string, keyName string, options *ServerKeysClientGetOptions) (ServerKeysClientGetResponse, error) { + var err error + const operationName = "ServerKeysClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serverName, keyName, options) + if err != nil { + return ServerKeysClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ServerKeysClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ServerKeysClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ServerKeysClient) getCreateRequest(ctx context.Context, resourceGroupName string, serverName string, keyName string, options *ServerKeysClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/keys/{keyName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if keyName == "" { + return nil, errors.New("parameter keyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{keyName}", url.PathEscape(keyName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ServerKeysClient) getHandleResponse(resp *http.Response) (ServerKeysClientGetResponse, error) { + result := ServerKeysClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ServerKey); err != nil { + return ServerKeysClientGetResponse{}, err + } + return result, nil +} + +// NewListByServerPager - Gets a list of server keys. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - options - ServerKeysClientListByServerOptions contains the optional parameters for the ServerKeysClient.NewListByServerPager +// method. +func (client *ServerKeysClient) NewListByServerPager(resourceGroupName string, serverName string, options *ServerKeysClientListByServerOptions) *runtime.Pager[ServerKeysClientListByServerResponse] { + return runtime.NewPager(runtime.PagingHandler[ServerKeysClientListByServerResponse]{ + More: func(page ServerKeysClientListByServerResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ServerKeysClientListByServerResponse) (ServerKeysClientListByServerResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ServerKeysClient.NewListByServerPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByServerCreateRequest(ctx, resourceGroupName, serverName, options) + }, nil) + if err != nil { + return ServerKeysClientListByServerResponse{}, err + } + return client.listByServerHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByServerCreateRequest creates the ListByServer request. +func (client *ServerKeysClient) listByServerCreateRequest(ctx context.Context, resourceGroupName string, serverName string, options *ServerKeysClientListByServerOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/keys" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByServerHandleResponse handles the ListByServer response. +func (client *ServerKeysClient) listByServerHandleResponse(resp *http.Response) (ServerKeysClientListByServerResponse, error) { + result := ServerKeysClientListByServerResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ServerKeyListResult); err != nil { + return ServerKeysClientListByServerResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/serveroperations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/serveroperations_client.go new file mode 100644 index 000000000..db0d10740 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/serveroperations_client.go @@ -0,0 +1,110 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ServerOperationsClient contains the methods for the ServerOperations group. +// Don't use this type directly, use NewServerOperationsClient() instead. +type ServerOperationsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewServerOperationsClient creates a new instance of ServerOperationsClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewServerOperationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServerOperationsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ServerOperationsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// NewListByServerPager - Gets a list of operations performed on the server. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - options - ServerOperationsClientListByServerOptions contains the optional parameters for the ServerOperationsClient.NewListByServerPager +// method. +func (client *ServerOperationsClient) NewListByServerPager(resourceGroupName string, serverName string, options *ServerOperationsClientListByServerOptions) *runtime.Pager[ServerOperationsClientListByServerResponse] { + return runtime.NewPager(runtime.PagingHandler[ServerOperationsClientListByServerResponse]{ + More: func(page ServerOperationsClientListByServerResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ServerOperationsClientListByServerResponse) (ServerOperationsClientListByServerResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ServerOperationsClient.NewListByServerPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByServerCreateRequest(ctx, resourceGroupName, serverName, options) + }, nil) + if err != nil { + return ServerOperationsClientListByServerResponse{}, err + } + return client.listByServerHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByServerCreateRequest creates the ListByServer request. +func (client *ServerOperationsClient) listByServerCreateRequest(ctx context.Context, resourceGroupName string, serverName string, options *ServerOperationsClientListByServerOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/operations" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByServerHandleResponse handles the ListByServer response. +func (client *ServerOperationsClient) listByServerHandleResponse(resp *http.Response) (ServerOperationsClientListByServerResponse, error) { + result := ServerOperationsClientListByServerResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ServerOperationListResult); err != nil { + return ServerOperationsClientListByServerResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/servers_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/servers_client.go new file mode 100644 index 000000000..34861ad2d --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/servers_client.go @@ -0,0 +1,609 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ServersClient contains the methods for the Servers group. +// Don't use this type directly, use NewServersClient() instead. +type ServersClient struct { + internal *arm.Client + subscriptionID string +} + +// NewServersClient creates a new instance of ServersClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewServersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServersClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ServersClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CheckNameAvailability - Determines whether a resource can be created with the specified name. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-02-01-preview +// - parameters - The name availability request parameters. +// - options - ServersClientCheckNameAvailabilityOptions contains the optional parameters for the ServersClient.CheckNameAvailability +// method. +func (client *ServersClient) CheckNameAvailability(ctx context.Context, parameters CheckNameAvailabilityRequest, options *ServersClientCheckNameAvailabilityOptions) (ServersClientCheckNameAvailabilityResponse, error) { + var err error + const operationName = "ServersClient.CheckNameAvailability" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.checkNameAvailabilityCreateRequest(ctx, parameters, options) + if err != nil { + return ServersClientCheckNameAvailabilityResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ServersClientCheckNameAvailabilityResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ServersClientCheckNameAvailabilityResponse{}, err + } + resp, err := client.checkNameAvailabilityHandleResponse(httpResp) + return resp, err +} + +// checkNameAvailabilityCreateRequest creates the CheckNameAvailability request. +func (client *ServersClient) checkNameAvailabilityCreateRequest(ctx context.Context, parameters CheckNameAvailabilityRequest, options *ServersClientCheckNameAvailabilityOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/checkNameAvailability" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-02-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// checkNameAvailabilityHandleResponse handles the CheckNameAvailability response. +func (client *ServersClient) checkNameAvailabilityHandleResponse(resp *http.Response) (ServersClientCheckNameAvailabilityResponse, error) { + result := ServersClientCheckNameAvailabilityResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.CheckNameAvailabilityResponse); err != nil { + return ServersClientCheckNameAvailabilityResponse{}, err + } + return result, nil +} + +// BeginCreateOrUpdate - Creates or updates a server. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-02-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - parameters - The requested server resource state. +// - options - ServersClientBeginCreateOrUpdateOptions contains the optional parameters for the ServersClient.BeginCreateOrUpdate +// method. +func (client *ServersClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, parameters Server, options *ServersClientBeginCreateOrUpdateOptions) (*runtime.Poller[ServersClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, serverName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ServersClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ServersClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates or updates a server. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-02-01-preview +func (client *ServersClient) createOrUpdate(ctx context.Context, resourceGroupName string, serverName string, parameters Server, options *ServersClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ServersClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serverName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *ServersClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serverName string, parameters Server, options *ServersClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-02-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes a server. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-02-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - options - ServersClientBeginDeleteOptions contains the optional parameters for the ServersClient.BeginDelete method. +func (client *ServersClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, options *ServersClientBeginDeleteOptions) (*runtime.Poller[ServersClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, serverName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ServersClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ServersClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes a server. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-02-01-preview +func (client *ServersClient) deleteOperation(ctx context.Context, resourceGroupName string, serverName string, options *ServersClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "ServersClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serverName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *ServersClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serverName string, options *ServersClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-02-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + return req, nil +} + +// Get - Gets a server. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-02-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - options - ServersClientGetOptions contains the optional parameters for the ServersClient.Get method. +func (client *ServersClient) Get(ctx context.Context, resourceGroupName string, serverName string, options *ServersClientGetOptions) (ServersClientGetResponse, error) { + var err error + const operationName = "ServersClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serverName, options) + if err != nil { + return ServersClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ServersClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ServersClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ServersClient) getCreateRequest(ctx context.Context, resourceGroupName string, serverName string, options *ServersClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Expand != nil { + reqQP.Set("$expand", *options.Expand) + } + reqQP.Set("api-version", "2021-02-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ServersClient) getHandleResponse(resp *http.Response) (ServersClientGetResponse, error) { + result := ServersClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Server); err != nil { + return ServersClientGetResponse{}, err + } + return result, nil +} + +// BeginImportDatabase - Imports a bacpac into a new database. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-02-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - parameters - The database import request parameters. +// - options - ServersClientBeginImportDatabaseOptions contains the optional parameters for the ServersClient.BeginImportDatabase +// method. +func (client *ServersClient) BeginImportDatabase(ctx context.Context, resourceGroupName string, serverName string, parameters ImportNewDatabaseDefinition, options *ServersClientBeginImportDatabaseOptions) (*runtime.Poller[ServersClientImportDatabaseResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.importDatabase(ctx, resourceGroupName, serverName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ServersClientImportDatabaseResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ServersClientImportDatabaseResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// ImportDatabase - Imports a bacpac into a new database. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-02-01-preview +func (client *ServersClient) importDatabase(ctx context.Context, resourceGroupName string, serverName string, parameters ImportNewDatabaseDefinition, options *ServersClientBeginImportDatabaseOptions) (*http.Response, error) { + var err error + const operationName = "ServersClient.BeginImportDatabase" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.importDatabaseCreateRequest(ctx, resourceGroupName, serverName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// importDatabaseCreateRequest creates the ImportDatabase request. +func (client *ServersClient) importDatabaseCreateRequest(ctx context.Context, resourceGroupName string, serverName string, parameters ImportNewDatabaseDefinition, options *ServersClientBeginImportDatabaseOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/import" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-02-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// NewListPager - Gets a list of all servers in the subscription. +// +// Generated from API version 2021-02-01-preview +// - options - ServersClientListOptions contains the optional parameters for the ServersClient.NewListPager method. +func (client *ServersClient) NewListPager(options *ServersClientListOptions) *runtime.Pager[ServersClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[ServersClientListResponse]{ + More: func(page ServersClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ServersClientListResponse) (ServersClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ServersClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) + if err != nil { + return ServersClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *ServersClient) listCreateRequest(ctx context.Context, options *ServersClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/servers" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Expand != nil { + reqQP.Set("$expand", *options.Expand) + } + reqQP.Set("api-version", "2021-02-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *ServersClient) listHandleResponse(resp *http.Response) (ServersClientListResponse, error) { + result := ServersClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ServerListResult); err != nil { + return ServersClientListResponse{}, err + } + return result, nil +} + +// NewListByResourceGroupPager - Gets a list of servers in a resource groups. +// +// Generated from API version 2021-02-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - options - ServersClientListByResourceGroupOptions contains the optional parameters for the ServersClient.NewListByResourceGroupPager +// method. +func (client *ServersClient) NewListByResourceGroupPager(resourceGroupName string, options *ServersClientListByResourceGroupOptions) *runtime.Pager[ServersClientListByResourceGroupResponse] { + return runtime.NewPager(runtime.PagingHandler[ServersClientListByResourceGroupResponse]{ + More: func(page ServersClientListByResourceGroupResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ServersClientListByResourceGroupResponse) (ServersClientListByResourceGroupResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ServersClient.NewListByResourceGroupPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + }, nil) + if err != nil { + return ServersClientListByResourceGroupResponse{}, err + } + return client.listByResourceGroupHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByResourceGroupCreateRequest creates the ListByResourceGroup request. +func (client *ServersClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *ServersClientListByResourceGroupOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Expand != nil { + reqQP.Set("$expand", *options.Expand) + } + reqQP.Set("api-version", "2021-02-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByResourceGroupHandleResponse handles the ListByResourceGroup response. +func (client *ServersClient) listByResourceGroupHandleResponse(resp *http.Response) (ServersClientListByResourceGroupResponse, error) { + result := ServersClientListByResourceGroupResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ServerListResult); err != nil { + return ServersClientListByResourceGroupResponse{}, err + } + return result, nil +} + +// BeginUpdate - Updates a server. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-02-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - parameters - The requested server resource state. +// - options - ServersClientBeginUpdateOptions contains the optional parameters for the ServersClient.BeginUpdate method. +func (client *ServersClient) BeginUpdate(ctx context.Context, resourceGroupName string, serverName string, parameters ServerUpdate, options *ServersClientBeginUpdateOptions) (*runtime.Poller[ServersClientUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.update(ctx, resourceGroupName, serverName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ServersClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ServersClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Update - Updates a server. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-02-01-preview +func (client *ServersClient) update(ctx context.Context, resourceGroupName string, serverName string, parameters ServerUpdate, options *ServersClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ServersClient.BeginUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, serverName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// updateCreateRequest creates the Update request. +func (client *ServersClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serverName string, parameters ServerUpdate, options *ServersClientBeginUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-02-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/serversecurityalertpolicies_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/serversecurityalertpolicies_client.go new file mode 100644 index 000000000..ed532578f --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/serversecurityalertpolicies_client.go @@ -0,0 +1,267 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ServerSecurityAlertPoliciesClient contains the methods for the ServerSecurityAlertPolicies group. +// Don't use this type directly, use NewServerSecurityAlertPoliciesClient() instead. +type ServerSecurityAlertPoliciesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewServerSecurityAlertPoliciesClient creates a new instance of ServerSecurityAlertPoliciesClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewServerSecurityAlertPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServerSecurityAlertPoliciesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ServerSecurityAlertPoliciesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates or updates a threat detection policy. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - securityAlertPolicyName - The name of the threat detection policy. +// - parameters - The server security alert policy. +// - options - ServerSecurityAlertPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the ServerSecurityAlertPoliciesClient.BeginCreateOrUpdate +// method. +func (client *ServerSecurityAlertPoliciesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, securityAlertPolicyName SecurityAlertPolicyName, parameters ServerSecurityAlertPolicy, options *ServerSecurityAlertPoliciesClientBeginCreateOrUpdateOptions) (*runtime.Poller[ServerSecurityAlertPoliciesClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, serverName, securityAlertPolicyName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ServerSecurityAlertPoliciesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ServerSecurityAlertPoliciesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates or updates a threat detection policy. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +func (client *ServerSecurityAlertPoliciesClient) createOrUpdate(ctx context.Context, resourceGroupName string, serverName string, securityAlertPolicyName SecurityAlertPolicyName, parameters ServerSecurityAlertPolicy, options *ServerSecurityAlertPoliciesClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ServerSecurityAlertPoliciesClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serverName, securityAlertPolicyName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *ServerSecurityAlertPoliciesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serverName string, securityAlertPolicyName SecurityAlertPolicyName, parameters ServerSecurityAlertPolicy, options *ServerSecurityAlertPoliciesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/securityAlertPolicies/{securityAlertPolicyName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if securityAlertPolicyName == "" { + return nil, errors.New("parameter securityAlertPolicyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{securityAlertPolicyName}", url.PathEscape(string(securityAlertPolicyName))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// Get - Get a server's security alert policy. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - securityAlertPolicyName - The name of the security alert policy. +// - options - ServerSecurityAlertPoliciesClientGetOptions contains the optional parameters for the ServerSecurityAlertPoliciesClient.Get +// method. +func (client *ServerSecurityAlertPoliciesClient) Get(ctx context.Context, resourceGroupName string, serverName string, securityAlertPolicyName SecurityAlertPolicyName, options *ServerSecurityAlertPoliciesClientGetOptions) (ServerSecurityAlertPoliciesClientGetResponse, error) { + var err error + const operationName = "ServerSecurityAlertPoliciesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serverName, securityAlertPolicyName, options) + if err != nil { + return ServerSecurityAlertPoliciesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ServerSecurityAlertPoliciesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ServerSecurityAlertPoliciesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ServerSecurityAlertPoliciesClient) getCreateRequest(ctx context.Context, resourceGroupName string, serverName string, securityAlertPolicyName SecurityAlertPolicyName, options *ServerSecurityAlertPoliciesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/securityAlertPolicies/{securityAlertPolicyName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if securityAlertPolicyName == "" { + return nil, errors.New("parameter securityAlertPolicyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{securityAlertPolicyName}", url.PathEscape(string(securityAlertPolicyName))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ServerSecurityAlertPoliciesClient) getHandleResponse(resp *http.Response) (ServerSecurityAlertPoliciesClientGetResponse, error) { + result := ServerSecurityAlertPoliciesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ServerSecurityAlertPolicy); err != nil { + return ServerSecurityAlertPoliciesClientGetResponse{}, err + } + return result, nil +} + +// NewListByServerPager - Get the server's threat detection policies. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - options - ServerSecurityAlertPoliciesClientListByServerOptions contains the optional parameters for the ServerSecurityAlertPoliciesClient.NewListByServerPager +// method. +func (client *ServerSecurityAlertPoliciesClient) NewListByServerPager(resourceGroupName string, serverName string, options *ServerSecurityAlertPoliciesClientListByServerOptions) *runtime.Pager[ServerSecurityAlertPoliciesClientListByServerResponse] { + return runtime.NewPager(runtime.PagingHandler[ServerSecurityAlertPoliciesClientListByServerResponse]{ + More: func(page ServerSecurityAlertPoliciesClientListByServerResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ServerSecurityAlertPoliciesClientListByServerResponse) (ServerSecurityAlertPoliciesClientListByServerResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ServerSecurityAlertPoliciesClient.NewListByServerPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByServerCreateRequest(ctx, resourceGroupName, serverName, options) + }, nil) + if err != nil { + return ServerSecurityAlertPoliciesClientListByServerResponse{}, err + } + return client.listByServerHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByServerCreateRequest creates the ListByServer request. +func (client *ServerSecurityAlertPoliciesClient) listByServerCreateRequest(ctx context.Context, resourceGroupName string, serverName string, options *ServerSecurityAlertPoliciesClientListByServerOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/securityAlertPolicies" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByServerHandleResponse handles the ListByServer response. +func (client *ServerSecurityAlertPoliciesClient) listByServerHandleResponse(resp *http.Response) (ServerSecurityAlertPoliciesClientListByServerResponse, error) { + result := ServerSecurityAlertPoliciesClientListByServerResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.LogicalServerSecurityAlertPolicyListResult); err != nil { + return ServerSecurityAlertPoliciesClientListByServerResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/servertrustcertificates_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/servertrustcertificates_client.go new file mode 100644 index 000000000..04a19a59a --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/servertrustcertificates_client.go @@ -0,0 +1,349 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ServerTrustCertificatesClient contains the methods for the ServerTrustCertificates group. +// Don't use this type directly, use NewServerTrustCertificatesClient() instead. +type ServerTrustCertificatesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewServerTrustCertificatesClient creates a new instance of ServerTrustCertificatesClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewServerTrustCertificatesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServerTrustCertificatesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ServerTrustCertificatesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Uploads a server trust certificate from box to Sql Managed Instance. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - certificateName - Name of of the certificate to upload. +// - parameters - The server trust certificate info. +// - options - ServerTrustCertificatesClientBeginCreateOrUpdateOptions contains the optional parameters for the ServerTrustCertificatesClient.BeginCreateOrUpdate +// method. +func (client *ServerTrustCertificatesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, certificateName string, parameters ServerTrustCertificate, options *ServerTrustCertificatesClientBeginCreateOrUpdateOptions) (*runtime.Poller[ServerTrustCertificatesClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, managedInstanceName, certificateName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ServerTrustCertificatesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ServerTrustCertificatesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Uploads a server trust certificate from box to Sql Managed Instance. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-11-01-preview +func (client *ServerTrustCertificatesClient) createOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, certificateName string, parameters ServerTrustCertificate, options *ServerTrustCertificatesClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ServerTrustCertificatesClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, managedInstanceName, certificateName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *ServerTrustCertificatesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, certificateName string, parameters ServerTrustCertificate, options *ServerTrustCertificatesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/serverTrustCertificates/{certificateName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if certificateName == "" { + return nil, errors.New("parameter certificateName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{certificateName}", url.PathEscape(certificateName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes a server trust certificate that was uploaded from box to Sql Managed Instance. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - certificateName - Name of of the certificate to delete. +// - options - ServerTrustCertificatesClientBeginDeleteOptions contains the optional parameters for the ServerTrustCertificatesClient.BeginDelete +// method. +func (client *ServerTrustCertificatesClient) BeginDelete(ctx context.Context, resourceGroupName string, managedInstanceName string, certificateName string, options *ServerTrustCertificatesClientBeginDeleteOptions) (*runtime.Poller[ServerTrustCertificatesClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, managedInstanceName, certificateName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ServerTrustCertificatesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ServerTrustCertificatesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes a server trust certificate that was uploaded from box to Sql Managed Instance. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-11-01-preview +func (client *ServerTrustCertificatesClient) deleteOperation(ctx context.Context, resourceGroupName string, managedInstanceName string, certificateName string, options *ServerTrustCertificatesClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "ServerTrustCertificatesClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, managedInstanceName, certificateName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *ServerTrustCertificatesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, certificateName string, options *ServerTrustCertificatesClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/serverTrustCertificates/{certificateName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if certificateName == "" { + return nil, errors.New("parameter certificateName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{certificateName}", url.PathEscape(certificateName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + return req, nil +} + +// Get - Gets a server trust certificate that was uploaded from box to Sql Managed Instance. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - certificateName - Name of of the certificate to get. +// - options - ServerTrustCertificatesClientGetOptions contains the optional parameters for the ServerTrustCertificatesClient.Get +// method. +func (client *ServerTrustCertificatesClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, certificateName string, options *ServerTrustCertificatesClientGetOptions) (ServerTrustCertificatesClientGetResponse, error) { + var err error + const operationName = "ServerTrustCertificatesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, managedInstanceName, certificateName, options) + if err != nil { + return ServerTrustCertificatesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ServerTrustCertificatesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ServerTrustCertificatesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ServerTrustCertificatesClient) getCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, certificateName string, options *ServerTrustCertificatesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/serverTrustCertificates/{certificateName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if certificateName == "" { + return nil, errors.New("parameter certificateName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{certificateName}", url.PathEscape(certificateName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ServerTrustCertificatesClient) getHandleResponse(resp *http.Response) (ServerTrustCertificatesClientGetResponse, error) { + result := ServerTrustCertificatesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ServerTrustCertificate); err != nil { + return ServerTrustCertificatesClientGetResponse{}, err + } + return result, nil +} + +// NewListByInstancePager - Gets a list of server trust certificates that were uploaded from box to the given Sql Managed +// Instance. +// +// Generated from API version 2021-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - options - ServerTrustCertificatesClientListByInstanceOptions contains the optional parameters for the ServerTrustCertificatesClient.NewListByInstancePager +// method. +func (client *ServerTrustCertificatesClient) NewListByInstancePager(resourceGroupName string, managedInstanceName string, options *ServerTrustCertificatesClientListByInstanceOptions) *runtime.Pager[ServerTrustCertificatesClientListByInstanceResponse] { + return runtime.NewPager(runtime.PagingHandler[ServerTrustCertificatesClientListByInstanceResponse]{ + More: func(page ServerTrustCertificatesClientListByInstanceResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ServerTrustCertificatesClientListByInstanceResponse) (ServerTrustCertificatesClientListByInstanceResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ServerTrustCertificatesClient.NewListByInstancePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByInstanceCreateRequest(ctx, resourceGroupName, managedInstanceName, options) + }, nil) + if err != nil { + return ServerTrustCertificatesClientListByInstanceResponse{}, err + } + return client.listByInstanceHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByInstanceCreateRequest creates the ListByInstance request. +func (client *ServerTrustCertificatesClient) listByInstanceCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, options *ServerTrustCertificatesClientListByInstanceOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/serverTrustCertificates" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByInstanceHandleResponse handles the ListByInstance response. +func (client *ServerTrustCertificatesClient) listByInstanceHandleResponse(resp *http.Response) (ServerTrustCertificatesClientListByInstanceResponse, error) { + result := ServerTrustCertificatesClientListByInstanceResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ServerTrustCertificatesListResult); err != nil { + return ServerTrustCertificatesClientListByInstanceResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/servertrustgroups_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/servertrustgroups_client.go new file mode 100644 index 000000000..d48bc16da --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/servertrustgroups_client.go @@ -0,0 +1,413 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ServerTrustGroupsClient contains the methods for the ServerTrustGroups group. +// Don't use this type directly, use NewServerTrustGroupsClient() instead. +type ServerTrustGroupsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewServerTrustGroupsClient creates a new instance of ServerTrustGroupsClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewServerTrustGroupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServerTrustGroupsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ServerTrustGroupsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates or updates a server trust group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - locationName - The name of the region where the resource is located. +// - serverTrustGroupName - The name of the server trust group. +// - parameters - The server trust group parameters. +// - options - ServerTrustGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the ServerTrustGroupsClient.BeginCreateOrUpdate +// method. +func (client *ServerTrustGroupsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, locationName string, serverTrustGroupName string, parameters ServerTrustGroup, options *ServerTrustGroupsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ServerTrustGroupsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, locationName, serverTrustGroupName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ServerTrustGroupsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ServerTrustGroupsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates or updates a server trust group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +func (client *ServerTrustGroupsClient) createOrUpdate(ctx context.Context, resourceGroupName string, locationName string, serverTrustGroupName string, parameters ServerTrustGroup, options *ServerTrustGroupsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ServerTrustGroupsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, locationName, serverTrustGroupName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *ServerTrustGroupsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, locationName string, serverTrustGroupName string, parameters ServerTrustGroup, options *ServerTrustGroupsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/serverTrustGroups/{serverTrustGroupName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if locationName == "" { + return nil, errors.New("parameter locationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{locationName}", url.PathEscape(locationName)) + if serverTrustGroupName == "" { + return nil, errors.New("parameter serverTrustGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverTrustGroupName}", url.PathEscape(serverTrustGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes a server trust group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - locationName - The name of the region where the resource is located. +// - serverTrustGroupName - The name of the server trust group. +// - options - ServerTrustGroupsClientBeginDeleteOptions contains the optional parameters for the ServerTrustGroupsClient.BeginDelete +// method. +func (client *ServerTrustGroupsClient) BeginDelete(ctx context.Context, resourceGroupName string, locationName string, serverTrustGroupName string, options *ServerTrustGroupsClientBeginDeleteOptions) (*runtime.Poller[ServerTrustGroupsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, locationName, serverTrustGroupName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ServerTrustGroupsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ServerTrustGroupsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes a server trust group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +func (client *ServerTrustGroupsClient) deleteOperation(ctx context.Context, resourceGroupName string, locationName string, serverTrustGroupName string, options *ServerTrustGroupsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "ServerTrustGroupsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, locationName, serverTrustGroupName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *ServerTrustGroupsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, locationName string, serverTrustGroupName string, options *ServerTrustGroupsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/serverTrustGroups/{serverTrustGroupName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if locationName == "" { + return nil, errors.New("parameter locationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{locationName}", url.PathEscape(locationName)) + if serverTrustGroupName == "" { + return nil, errors.New("parameter serverTrustGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverTrustGroupName}", url.PathEscape(serverTrustGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + return req, nil +} + +// Get - Gets a server trust group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - locationName - The name of the region where the resource is located. +// - serverTrustGroupName - The name of the server trust group. +// - options - ServerTrustGroupsClientGetOptions contains the optional parameters for the ServerTrustGroupsClient.Get method. +func (client *ServerTrustGroupsClient) Get(ctx context.Context, resourceGroupName string, locationName string, serverTrustGroupName string, options *ServerTrustGroupsClientGetOptions) (ServerTrustGroupsClientGetResponse, error) { + var err error + const operationName = "ServerTrustGroupsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, locationName, serverTrustGroupName, options) + if err != nil { + return ServerTrustGroupsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ServerTrustGroupsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ServerTrustGroupsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ServerTrustGroupsClient) getCreateRequest(ctx context.Context, resourceGroupName string, locationName string, serverTrustGroupName string, options *ServerTrustGroupsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/serverTrustGroups/{serverTrustGroupName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if locationName == "" { + return nil, errors.New("parameter locationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{locationName}", url.PathEscape(locationName)) + if serverTrustGroupName == "" { + return nil, errors.New("parameter serverTrustGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverTrustGroupName}", url.PathEscape(serverTrustGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ServerTrustGroupsClient) getHandleResponse(resp *http.Response) (ServerTrustGroupsClientGetResponse, error) { + result := ServerTrustGroupsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ServerTrustGroup); err != nil { + return ServerTrustGroupsClientGetResponse{}, err + } + return result, nil +} + +// NewListByInstancePager - Gets a server trust groups by instance name. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - managedInstanceName - The name of the managed instance. +// - options - ServerTrustGroupsClientListByInstanceOptions contains the optional parameters for the ServerTrustGroupsClient.NewListByInstancePager +// method. +func (client *ServerTrustGroupsClient) NewListByInstancePager(resourceGroupName string, managedInstanceName string, options *ServerTrustGroupsClientListByInstanceOptions) *runtime.Pager[ServerTrustGroupsClientListByInstanceResponse] { + return runtime.NewPager(runtime.PagingHandler[ServerTrustGroupsClientListByInstanceResponse]{ + More: func(page ServerTrustGroupsClientListByInstanceResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ServerTrustGroupsClientListByInstanceResponse) (ServerTrustGroupsClientListByInstanceResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ServerTrustGroupsClient.NewListByInstancePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByInstanceCreateRequest(ctx, resourceGroupName, managedInstanceName, options) + }, nil) + if err != nil { + return ServerTrustGroupsClientListByInstanceResponse{}, err + } + return client.listByInstanceHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByInstanceCreateRequest creates the ListByInstance request. +func (client *ServerTrustGroupsClient) listByInstanceCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, options *ServerTrustGroupsClientListByInstanceOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/serverTrustGroups" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if managedInstanceName == "" { + return nil, errors.New("parameter managedInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managedInstanceName}", url.PathEscape(managedInstanceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByInstanceHandleResponse handles the ListByInstance response. +func (client *ServerTrustGroupsClient) listByInstanceHandleResponse(resp *http.Response) (ServerTrustGroupsClientListByInstanceResponse, error) { + result := ServerTrustGroupsClientListByInstanceResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ServerTrustGroupListResult); err != nil { + return ServerTrustGroupsClientListByInstanceResponse{}, err + } + return result, nil +} + +// NewListByLocationPager - Lists a server trust group. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - locationName - The name of the region where the resource is located. +// - options - ServerTrustGroupsClientListByLocationOptions contains the optional parameters for the ServerTrustGroupsClient.NewListByLocationPager +// method. +func (client *ServerTrustGroupsClient) NewListByLocationPager(resourceGroupName string, locationName string, options *ServerTrustGroupsClientListByLocationOptions) *runtime.Pager[ServerTrustGroupsClientListByLocationResponse] { + return runtime.NewPager(runtime.PagingHandler[ServerTrustGroupsClientListByLocationResponse]{ + More: func(page ServerTrustGroupsClientListByLocationResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ServerTrustGroupsClientListByLocationResponse) (ServerTrustGroupsClientListByLocationResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ServerTrustGroupsClient.NewListByLocationPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByLocationCreateRequest(ctx, resourceGroupName, locationName, options) + }, nil) + if err != nil { + return ServerTrustGroupsClientListByLocationResponse{}, err + } + return client.listByLocationHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByLocationCreateRequest creates the ListByLocation request. +func (client *ServerTrustGroupsClient) listByLocationCreateRequest(ctx context.Context, resourceGroupName string, locationName string, options *ServerTrustGroupsClientListByLocationOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/serverTrustGroups" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if locationName == "" { + return nil, errors.New("parameter locationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{locationName}", url.PathEscape(locationName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByLocationHandleResponse handles the ListByLocation response. +func (client *ServerTrustGroupsClient) listByLocationHandleResponse(resp *http.Response) (ServerTrustGroupsClientListByLocationResponse, error) { + result := ServerTrustGroupsClientListByLocationResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ServerTrustGroupListResult); err != nil { + return ServerTrustGroupsClientListByLocationResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/serverusages_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/serverusages_client.go new file mode 100644 index 000000000..ddee83273 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/serverusages_client.go @@ -0,0 +1,111 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ServerUsagesClient contains the methods for the ServerUsages group. +// Don't use this type directly, use NewServerUsagesClient() instead. +type ServerUsagesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewServerUsagesClient creates a new instance of ServerUsagesClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewServerUsagesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServerUsagesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ServerUsagesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// NewListByServerPager - Returns server usages. +// +// Generated from API version 2014-04-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - options - ServerUsagesClientListByServerOptions contains the optional parameters for the ServerUsagesClient.NewListByServerPager +// method. +func (client *ServerUsagesClient) NewListByServerPager(resourceGroupName string, serverName string, options *ServerUsagesClientListByServerOptions) *runtime.Pager[ServerUsagesClientListByServerResponse] { + return runtime.NewPager(runtime.PagingHandler[ServerUsagesClientListByServerResponse]{ + More: func(page ServerUsagesClientListByServerResponse) bool { + return false + }, + Fetcher: func(ctx context.Context, page *ServerUsagesClientListByServerResponse) (ServerUsagesClientListByServerResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ServerUsagesClient.NewListByServerPager") + req, err := client.listByServerCreateRequest(ctx, resourceGroupName, serverName, options) + if err != nil { + return ServerUsagesClientListByServerResponse{}, err + } + resp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ServerUsagesClientListByServerResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return ServerUsagesClientListByServerResponse{}, runtime.NewResponseError(resp) + } + return client.listByServerHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByServerCreateRequest creates the ListByServer request. +func (client *ServerUsagesClient) listByServerCreateRequest(ctx context.Context, resourceGroupName string, serverName string, options *ServerUsagesClientListByServerOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/usages" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2014-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByServerHandleResponse handles the ListByServer response. +func (client *ServerUsagesClient) listByServerHandleResponse(resp *http.Response) (ServerUsagesClientListByServerResponse, error) { + result := ServerUsagesClientListByServerResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ServerUsageListResult); err != nil { + return ServerUsagesClientListByServerResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/servervulnerabilityassessments_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/servervulnerabilityassessments_client.go new file mode 100644 index 000000000..8d4577ac2 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/servervulnerabilityassessments_client.go @@ -0,0 +1,318 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ServerVulnerabilityAssessmentsClient contains the methods for the ServerVulnerabilityAssessments group. +// Don't use this type directly, use NewServerVulnerabilityAssessmentsClient() instead. +type ServerVulnerabilityAssessmentsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewServerVulnerabilityAssessmentsClient creates a new instance of ServerVulnerabilityAssessmentsClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewServerVulnerabilityAssessmentsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServerVulnerabilityAssessmentsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ServerVulnerabilityAssessmentsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Creates or updates the server's vulnerability assessment. Learn more about setting SQL vulnerability assessment +// with managed identity - +// https://docs.microsoft.com/azure/azure-sql/database/sql-database-vulnerability-assessment-storage +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server for which the vulnerability assessment is defined. +// - vulnerabilityAssessmentName - The name of the vulnerability assessment. +// - parameters - The requested resource. +// - options - ServerVulnerabilityAssessmentsClientCreateOrUpdateOptions contains the optional parameters for the ServerVulnerabilityAssessmentsClient.CreateOrUpdate +// method. +func (client *ServerVulnerabilityAssessmentsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, parameters ServerVulnerabilityAssessment, options *ServerVulnerabilityAssessmentsClientCreateOrUpdateOptions) (ServerVulnerabilityAssessmentsClientCreateOrUpdateResponse, error) { + var err error + const operationName = "ServerVulnerabilityAssessmentsClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serverName, vulnerabilityAssessmentName, parameters, options) + if err != nil { + return ServerVulnerabilityAssessmentsClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ServerVulnerabilityAssessmentsClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return ServerVulnerabilityAssessmentsClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *ServerVulnerabilityAssessmentsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serverName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, parameters ServerVulnerabilityAssessment, options *ServerVulnerabilityAssessmentsClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if vulnerabilityAssessmentName == "" { + return nil, errors.New("parameter vulnerabilityAssessmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vulnerabilityAssessmentName}", url.PathEscape(string(vulnerabilityAssessmentName))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *ServerVulnerabilityAssessmentsClient) createOrUpdateHandleResponse(resp *http.Response) (ServerVulnerabilityAssessmentsClientCreateOrUpdateResponse, error) { + result := ServerVulnerabilityAssessmentsClientCreateOrUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ServerVulnerabilityAssessment); err != nil { + return ServerVulnerabilityAssessmentsClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// Delete - Removes the server's vulnerability assessment. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server for which the vulnerability assessment is defined. +// - vulnerabilityAssessmentName - The name of the vulnerability assessment. +// - options - ServerVulnerabilityAssessmentsClientDeleteOptions contains the optional parameters for the ServerVulnerabilityAssessmentsClient.Delete +// method. +func (client *ServerVulnerabilityAssessmentsClient) Delete(ctx context.Context, resourceGroupName string, serverName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, options *ServerVulnerabilityAssessmentsClientDeleteOptions) (ServerVulnerabilityAssessmentsClientDeleteResponse, error) { + var err error + const operationName = "ServerVulnerabilityAssessmentsClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serverName, vulnerabilityAssessmentName, options) + if err != nil { + return ServerVulnerabilityAssessmentsClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ServerVulnerabilityAssessmentsClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ServerVulnerabilityAssessmentsClientDeleteResponse{}, err + } + return ServerVulnerabilityAssessmentsClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *ServerVulnerabilityAssessmentsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serverName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, options *ServerVulnerabilityAssessmentsClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if vulnerabilityAssessmentName == "" { + return nil, errors.New("parameter vulnerabilityAssessmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vulnerabilityAssessmentName}", url.PathEscape(string(vulnerabilityAssessmentName))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + return req, nil +} + +// Get - Gets the server's vulnerability assessment. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server for which the vulnerability assessment is defined. +// - vulnerabilityAssessmentName - The name of the vulnerability assessment. +// - options - ServerVulnerabilityAssessmentsClientGetOptions contains the optional parameters for the ServerVulnerabilityAssessmentsClient.Get +// method. +func (client *ServerVulnerabilityAssessmentsClient) Get(ctx context.Context, resourceGroupName string, serverName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, options *ServerVulnerabilityAssessmentsClientGetOptions) (ServerVulnerabilityAssessmentsClientGetResponse, error) { + var err error + const operationName = "ServerVulnerabilityAssessmentsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serverName, vulnerabilityAssessmentName, options) + if err != nil { + return ServerVulnerabilityAssessmentsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ServerVulnerabilityAssessmentsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ServerVulnerabilityAssessmentsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ServerVulnerabilityAssessmentsClient) getCreateRequest(ctx context.Context, resourceGroupName string, serverName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, options *ServerVulnerabilityAssessmentsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if vulnerabilityAssessmentName == "" { + return nil, errors.New("parameter vulnerabilityAssessmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vulnerabilityAssessmentName}", url.PathEscape(string(vulnerabilityAssessmentName))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ServerVulnerabilityAssessmentsClient) getHandleResponse(resp *http.Response) (ServerVulnerabilityAssessmentsClientGetResponse, error) { + result := ServerVulnerabilityAssessmentsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ServerVulnerabilityAssessment); err != nil { + return ServerVulnerabilityAssessmentsClientGetResponse{}, err + } + return result, nil +} + +// NewListByServerPager - Lists the vulnerability assessment policies associated with a server. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - options - ServerVulnerabilityAssessmentsClientListByServerOptions contains the optional parameters for the ServerVulnerabilityAssessmentsClient.NewListByServerPager +// method. +func (client *ServerVulnerabilityAssessmentsClient) NewListByServerPager(resourceGroupName string, serverName string, options *ServerVulnerabilityAssessmentsClientListByServerOptions) *runtime.Pager[ServerVulnerabilityAssessmentsClientListByServerResponse] { + return runtime.NewPager(runtime.PagingHandler[ServerVulnerabilityAssessmentsClientListByServerResponse]{ + More: func(page ServerVulnerabilityAssessmentsClientListByServerResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ServerVulnerabilityAssessmentsClientListByServerResponse) (ServerVulnerabilityAssessmentsClientListByServerResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ServerVulnerabilityAssessmentsClient.NewListByServerPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByServerCreateRequest(ctx, resourceGroupName, serverName, options) + }, nil) + if err != nil { + return ServerVulnerabilityAssessmentsClientListByServerResponse{}, err + } + return client.listByServerHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByServerCreateRequest creates the ListByServer request. +func (client *ServerVulnerabilityAssessmentsClient) listByServerCreateRequest(ctx context.Context, resourceGroupName string, serverName string, options *ServerVulnerabilityAssessmentsClientListByServerOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/vulnerabilityAssessments" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByServerHandleResponse handles the ListByServer response. +func (client *ServerVulnerabilityAssessmentsClient) listByServerHandleResponse(resp *http.Response) (ServerVulnerabilityAssessmentsClientListByServerResponse, error) { + result := ServerVulnerabilityAssessmentsClientListByServerResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ServerVulnerabilityAssessmentListResult); err != nil { + return ServerVulnerabilityAssessmentsClientListByServerResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/serviceobjectives_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/serviceobjectives_client.go new file mode 100644 index 000000000..a2ee9cadb --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/serviceobjectives_client.go @@ -0,0 +1,181 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ServiceObjectivesClient contains the methods for the ServiceObjectives group. +// Don't use this type directly, use NewServiceObjectivesClient() instead. +type ServiceObjectivesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewServiceObjectivesClient creates a new instance of ServiceObjectivesClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewServiceObjectivesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServiceObjectivesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ServiceObjectivesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Gets a database service objective. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2014-04-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - serviceObjectiveName - The name of the service objective to retrieve. +// - options - ServiceObjectivesClientGetOptions contains the optional parameters for the ServiceObjectivesClient.Get method. +func (client *ServiceObjectivesClient) Get(ctx context.Context, resourceGroupName string, serverName string, serviceObjectiveName string, options *ServiceObjectivesClientGetOptions) (ServiceObjectivesClientGetResponse, error) { + var err error + const operationName = "ServiceObjectivesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serverName, serviceObjectiveName, options) + if err != nil { + return ServiceObjectivesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ServiceObjectivesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ServiceObjectivesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ServiceObjectivesClient) getCreateRequest(ctx context.Context, resourceGroupName string, serverName string, serviceObjectiveName string, options *ServiceObjectivesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/serviceObjectives/{serviceObjectiveName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if serviceObjectiveName == "" { + return nil, errors.New("parameter serviceObjectiveName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceObjectiveName}", url.PathEscape(serviceObjectiveName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2014-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ServiceObjectivesClient) getHandleResponse(resp *http.Response) (ServiceObjectivesClientGetResponse, error) { + result := ServiceObjectivesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ServiceObjective); err != nil { + return ServiceObjectivesClientGetResponse{}, err + } + return result, nil +} + +// NewListByServerPager - Returns database service objectives. +// +// Generated from API version 2014-04-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - options - ServiceObjectivesClientListByServerOptions contains the optional parameters for the ServiceObjectivesClient.NewListByServerPager +// method. +func (client *ServiceObjectivesClient) NewListByServerPager(resourceGroupName string, serverName string, options *ServiceObjectivesClientListByServerOptions) *runtime.Pager[ServiceObjectivesClientListByServerResponse] { + return runtime.NewPager(runtime.PagingHandler[ServiceObjectivesClientListByServerResponse]{ + More: func(page ServiceObjectivesClientListByServerResponse) bool { + return false + }, + Fetcher: func(ctx context.Context, page *ServiceObjectivesClientListByServerResponse) (ServiceObjectivesClientListByServerResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ServiceObjectivesClient.NewListByServerPager") + req, err := client.listByServerCreateRequest(ctx, resourceGroupName, serverName, options) + if err != nil { + return ServiceObjectivesClientListByServerResponse{}, err + } + resp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ServiceObjectivesClientListByServerResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return ServiceObjectivesClientListByServerResponse{}, runtime.NewResponseError(resp) + } + return client.listByServerHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByServerCreateRequest creates the ListByServer request. +func (client *ServiceObjectivesClient) listByServerCreateRequest(ctx context.Context, resourceGroupName string, serverName string, options *ServiceObjectivesClientListByServerOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/serviceObjectives" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2014-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByServerHandleResponse handles the ListByServer response. +func (client *ServiceObjectivesClient) listByServerHandleResponse(resp *http.Response) (ServiceObjectivesClientListByServerResponse, error) { + result := ServiceObjectivesClientListByServerResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ServiceObjectiveListResult); err != nil { + return ServiceObjectivesClientListByServerResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/subscriptionusages_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/subscriptionusages_client.go new file mode 100644 index 000000000..4f2eafc83 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/subscriptionusages_client.go @@ -0,0 +1,168 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// SubscriptionUsagesClient contains the methods for the SubscriptionUsages group. +// Don't use this type directly, use NewSubscriptionUsagesClient() instead. +type SubscriptionUsagesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewSubscriptionUsagesClient creates a new instance of SubscriptionUsagesClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewSubscriptionUsagesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SubscriptionUsagesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &SubscriptionUsagesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Gets a subscription usage metric. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - locationName - The name of the region where the resource is located. +// - usageName - Name of usage metric to return. +// - options - SubscriptionUsagesClientGetOptions contains the optional parameters for the SubscriptionUsagesClient.Get method. +func (client *SubscriptionUsagesClient) Get(ctx context.Context, locationName string, usageName string, options *SubscriptionUsagesClientGetOptions) (SubscriptionUsagesClientGetResponse, error) { + var err error + const operationName = "SubscriptionUsagesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, locationName, usageName, options) + if err != nil { + return SubscriptionUsagesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return SubscriptionUsagesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SubscriptionUsagesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *SubscriptionUsagesClient) getCreateRequest(ctx context.Context, locationName string, usageName string, options *SubscriptionUsagesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/usages/{usageName}" + if locationName == "" { + return nil, errors.New("parameter locationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{locationName}", url.PathEscape(locationName)) + if usageName == "" { + return nil, errors.New("parameter usageName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{usageName}", url.PathEscape(usageName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *SubscriptionUsagesClient) getHandleResponse(resp *http.Response) (SubscriptionUsagesClientGetResponse, error) { + result := SubscriptionUsagesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SubscriptionUsage); err != nil { + return SubscriptionUsagesClientGetResponse{}, err + } + return result, nil +} + +// NewListByLocationPager - Gets all subscription usage metrics in a given location. +// +// Generated from API version 2020-11-01-preview +// - locationName - The name of the region where the resource is located. +// - options - SubscriptionUsagesClientListByLocationOptions contains the optional parameters for the SubscriptionUsagesClient.NewListByLocationPager +// method. +func (client *SubscriptionUsagesClient) NewListByLocationPager(locationName string, options *SubscriptionUsagesClientListByLocationOptions) *runtime.Pager[SubscriptionUsagesClientListByLocationResponse] { + return runtime.NewPager(runtime.PagingHandler[SubscriptionUsagesClientListByLocationResponse]{ + More: func(page SubscriptionUsagesClientListByLocationResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *SubscriptionUsagesClientListByLocationResponse) (SubscriptionUsagesClientListByLocationResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "SubscriptionUsagesClient.NewListByLocationPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByLocationCreateRequest(ctx, locationName, options) + }, nil) + if err != nil { + return SubscriptionUsagesClientListByLocationResponse{}, err + } + return client.listByLocationHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByLocationCreateRequest creates the ListByLocation request. +func (client *SubscriptionUsagesClient) listByLocationCreateRequest(ctx context.Context, locationName string, options *SubscriptionUsagesClientListByLocationOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/usages" + if locationName == "" { + return nil, errors.New("parameter locationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{locationName}", url.PathEscape(locationName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByLocationHandleResponse handles the ListByLocation response. +func (client *SubscriptionUsagesClient) listByLocationHandleResponse(resp *http.Response) (SubscriptionUsagesClientListByLocationResponse, error) { + result := SubscriptionUsagesClientListByLocationResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SubscriptionUsageListResult); err != nil { + return SubscriptionUsagesClientListByLocationResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/syncagents_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/syncagents_client.go new file mode 100644 index 000000000..ba179d48f --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/syncagents_client.go @@ -0,0 +1,487 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// SyncAgentsClient contains the methods for the SyncAgents group. +// Don't use this type directly, use NewSyncAgentsClient() instead. +type SyncAgentsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewSyncAgentsClient creates a new instance of SyncAgentsClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewSyncAgentsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SyncAgentsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &SyncAgentsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates or updates a sync agent. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server on which the sync agent is hosted. +// - syncAgentName - The name of the sync agent. +// - parameters - The requested sync agent resource state. +// - options - SyncAgentsClientBeginCreateOrUpdateOptions contains the optional parameters for the SyncAgentsClient.BeginCreateOrUpdate +// method. +func (client *SyncAgentsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, syncAgentName string, parameters SyncAgent, options *SyncAgentsClientBeginCreateOrUpdateOptions) (*runtime.Poller[SyncAgentsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, serverName, syncAgentName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SyncAgentsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SyncAgentsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates or updates a sync agent. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +func (client *SyncAgentsClient) createOrUpdate(ctx context.Context, resourceGroupName string, serverName string, syncAgentName string, parameters SyncAgent, options *SyncAgentsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "SyncAgentsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serverName, syncAgentName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *SyncAgentsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serverName string, syncAgentName string, parameters SyncAgent, options *SyncAgentsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/syncAgents/{syncAgentName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if syncAgentName == "" { + return nil, errors.New("parameter syncAgentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{syncAgentName}", url.PathEscape(syncAgentName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes a sync agent. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server on which the sync agent is hosted. +// - syncAgentName - The name of the sync agent. +// - options - SyncAgentsClientBeginDeleteOptions contains the optional parameters for the SyncAgentsClient.BeginDelete method. +func (client *SyncAgentsClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, syncAgentName string, options *SyncAgentsClientBeginDeleteOptions) (*runtime.Poller[SyncAgentsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, serverName, syncAgentName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SyncAgentsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SyncAgentsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes a sync agent. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +func (client *SyncAgentsClient) deleteOperation(ctx context.Context, resourceGroupName string, serverName string, syncAgentName string, options *SyncAgentsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "SyncAgentsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serverName, syncAgentName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *SyncAgentsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serverName string, syncAgentName string, options *SyncAgentsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/syncAgents/{syncAgentName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if syncAgentName == "" { + return nil, errors.New("parameter syncAgentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{syncAgentName}", url.PathEscape(syncAgentName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + return req, nil +} + +// GenerateKey - Generates a sync agent key. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server on which the sync agent is hosted. +// - syncAgentName - The name of the sync agent. +// - options - SyncAgentsClientGenerateKeyOptions contains the optional parameters for the SyncAgentsClient.GenerateKey method. +func (client *SyncAgentsClient) GenerateKey(ctx context.Context, resourceGroupName string, serverName string, syncAgentName string, options *SyncAgentsClientGenerateKeyOptions) (SyncAgentsClientGenerateKeyResponse, error) { + var err error + const operationName = "SyncAgentsClient.GenerateKey" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.generateKeyCreateRequest(ctx, resourceGroupName, serverName, syncAgentName, options) + if err != nil { + return SyncAgentsClientGenerateKeyResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return SyncAgentsClientGenerateKeyResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SyncAgentsClientGenerateKeyResponse{}, err + } + resp, err := client.generateKeyHandleResponse(httpResp) + return resp, err +} + +// generateKeyCreateRequest creates the GenerateKey request. +func (client *SyncAgentsClient) generateKeyCreateRequest(ctx context.Context, resourceGroupName string, serverName string, syncAgentName string, options *SyncAgentsClientGenerateKeyOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/syncAgents/{syncAgentName}/generateKey" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if syncAgentName == "" { + return nil, errors.New("parameter syncAgentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{syncAgentName}", url.PathEscape(syncAgentName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// generateKeyHandleResponse handles the GenerateKey response. +func (client *SyncAgentsClient) generateKeyHandleResponse(resp *http.Response) (SyncAgentsClientGenerateKeyResponse, error) { + result := SyncAgentsClientGenerateKeyResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SyncAgentKeyProperties); err != nil { + return SyncAgentsClientGenerateKeyResponse{}, err + } + return result, nil +} + +// Get - Gets a sync agent. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server on which the sync agent is hosted. +// - syncAgentName - The name of the sync agent. +// - options - SyncAgentsClientGetOptions contains the optional parameters for the SyncAgentsClient.Get method. +func (client *SyncAgentsClient) Get(ctx context.Context, resourceGroupName string, serverName string, syncAgentName string, options *SyncAgentsClientGetOptions) (SyncAgentsClientGetResponse, error) { + var err error + const operationName = "SyncAgentsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serverName, syncAgentName, options) + if err != nil { + return SyncAgentsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return SyncAgentsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SyncAgentsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *SyncAgentsClient) getCreateRequest(ctx context.Context, resourceGroupName string, serverName string, syncAgentName string, options *SyncAgentsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/syncAgents/{syncAgentName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if syncAgentName == "" { + return nil, errors.New("parameter syncAgentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{syncAgentName}", url.PathEscape(syncAgentName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *SyncAgentsClient) getHandleResponse(resp *http.Response) (SyncAgentsClientGetResponse, error) { + result := SyncAgentsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SyncAgent); err != nil { + return SyncAgentsClientGetResponse{}, err + } + return result, nil +} + +// NewListByServerPager - Lists sync agents in a server. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server on which the sync agent is hosted. +// - options - SyncAgentsClientListByServerOptions contains the optional parameters for the SyncAgentsClient.NewListByServerPager +// method. +func (client *SyncAgentsClient) NewListByServerPager(resourceGroupName string, serverName string, options *SyncAgentsClientListByServerOptions) *runtime.Pager[SyncAgentsClientListByServerResponse] { + return runtime.NewPager(runtime.PagingHandler[SyncAgentsClientListByServerResponse]{ + More: func(page SyncAgentsClientListByServerResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *SyncAgentsClientListByServerResponse) (SyncAgentsClientListByServerResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "SyncAgentsClient.NewListByServerPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByServerCreateRequest(ctx, resourceGroupName, serverName, options) + }, nil) + if err != nil { + return SyncAgentsClientListByServerResponse{}, err + } + return client.listByServerHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByServerCreateRequest creates the ListByServer request. +func (client *SyncAgentsClient) listByServerCreateRequest(ctx context.Context, resourceGroupName string, serverName string, options *SyncAgentsClientListByServerOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/syncAgents" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByServerHandleResponse handles the ListByServer response. +func (client *SyncAgentsClient) listByServerHandleResponse(resp *http.Response) (SyncAgentsClientListByServerResponse, error) { + result := SyncAgentsClientListByServerResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SyncAgentListResult); err != nil { + return SyncAgentsClientListByServerResponse{}, err + } + return result, nil +} + +// NewListLinkedDatabasesPager - Lists databases linked to a sync agent. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server on which the sync agent is hosted. +// - syncAgentName - The name of the sync agent. +// - options - SyncAgentsClientListLinkedDatabasesOptions contains the optional parameters for the SyncAgentsClient.NewListLinkedDatabasesPager +// method. +func (client *SyncAgentsClient) NewListLinkedDatabasesPager(resourceGroupName string, serverName string, syncAgentName string, options *SyncAgentsClientListLinkedDatabasesOptions) *runtime.Pager[SyncAgentsClientListLinkedDatabasesResponse] { + return runtime.NewPager(runtime.PagingHandler[SyncAgentsClientListLinkedDatabasesResponse]{ + More: func(page SyncAgentsClientListLinkedDatabasesResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *SyncAgentsClientListLinkedDatabasesResponse) (SyncAgentsClientListLinkedDatabasesResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "SyncAgentsClient.NewListLinkedDatabasesPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listLinkedDatabasesCreateRequest(ctx, resourceGroupName, serverName, syncAgentName, options) + }, nil) + if err != nil { + return SyncAgentsClientListLinkedDatabasesResponse{}, err + } + return client.listLinkedDatabasesHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listLinkedDatabasesCreateRequest creates the ListLinkedDatabases request. +func (client *SyncAgentsClient) listLinkedDatabasesCreateRequest(ctx context.Context, resourceGroupName string, serverName string, syncAgentName string, options *SyncAgentsClientListLinkedDatabasesOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/syncAgents/{syncAgentName}/linkedDatabases" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if syncAgentName == "" { + return nil, errors.New("parameter syncAgentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{syncAgentName}", url.PathEscape(syncAgentName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listLinkedDatabasesHandleResponse handles the ListLinkedDatabases response. +func (client *SyncAgentsClient) listLinkedDatabasesHandleResponse(resp *http.Response) (SyncAgentsClientListLinkedDatabasesResponse, error) { + result := SyncAgentsClientListLinkedDatabasesResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SyncAgentLinkedDatabaseListResult); err != nil { + return SyncAgentsClientListLinkedDatabasesResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/syncgroups_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/syncgroups_client.go new file mode 100644 index 000000000..ec1dcaded --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/syncgroups_client.go @@ -0,0 +1,890 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// SyncGroupsClient contains the methods for the SyncGroups group. +// Don't use this type directly, use NewSyncGroupsClient() instead. +type SyncGroupsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewSyncGroupsClient creates a new instance of SyncGroupsClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewSyncGroupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SyncGroupsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &SyncGroupsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CancelSync - Cancels a sync group synchronization. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database on which the sync group is hosted. +// - syncGroupName - The name of the sync group. +// - options - SyncGroupsClientCancelSyncOptions contains the optional parameters for the SyncGroupsClient.CancelSync method. +func (client *SyncGroupsClient) CancelSync(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, options *SyncGroupsClientCancelSyncOptions) (SyncGroupsClientCancelSyncResponse, error) { + var err error + const operationName = "SyncGroupsClient.CancelSync" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.cancelSyncCreateRequest(ctx, resourceGroupName, serverName, databaseName, syncGroupName, options) + if err != nil { + return SyncGroupsClientCancelSyncResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return SyncGroupsClientCancelSyncResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SyncGroupsClientCancelSyncResponse{}, err + } + return SyncGroupsClientCancelSyncResponse{}, nil +} + +// cancelSyncCreateRequest creates the CancelSync request. +func (client *SyncGroupsClient) cancelSyncCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, options *SyncGroupsClientCancelSyncOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/cancelSync" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if syncGroupName == "" { + return nil, errors.New("parameter syncGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{syncGroupName}", url.PathEscape(syncGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + return req, nil +} + +// BeginCreateOrUpdate - Creates or updates a sync group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database on which the sync group is hosted. +// - syncGroupName - The name of the sync group. +// - parameters - The requested sync group resource state. +// - options - SyncGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the SyncGroupsClient.BeginCreateOrUpdate +// method. +func (client *SyncGroupsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, parameters SyncGroup, options *SyncGroupsClientBeginCreateOrUpdateOptions) (*runtime.Poller[SyncGroupsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, serverName, databaseName, syncGroupName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SyncGroupsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SyncGroupsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates or updates a sync group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +func (client *SyncGroupsClient) createOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, parameters SyncGroup, options *SyncGroupsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "SyncGroupsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serverName, databaseName, syncGroupName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *SyncGroupsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, parameters SyncGroup, options *SyncGroupsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if syncGroupName == "" { + return nil, errors.New("parameter syncGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{syncGroupName}", url.PathEscape(syncGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes a sync group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database on which the sync group is hosted. +// - syncGroupName - The name of the sync group. +// - options - SyncGroupsClientBeginDeleteOptions contains the optional parameters for the SyncGroupsClient.BeginDelete method. +func (client *SyncGroupsClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, options *SyncGroupsClientBeginDeleteOptions) (*runtime.Poller[SyncGroupsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, serverName, databaseName, syncGroupName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SyncGroupsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SyncGroupsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes a sync group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +func (client *SyncGroupsClient) deleteOperation(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, options *SyncGroupsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "SyncGroupsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serverName, databaseName, syncGroupName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *SyncGroupsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, options *SyncGroupsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if syncGroupName == "" { + return nil, errors.New("parameter syncGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{syncGroupName}", url.PathEscape(syncGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + return req, nil +} + +// Get - Gets a sync group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database on which the sync group is hosted. +// - syncGroupName - The name of the sync group. +// - options - SyncGroupsClientGetOptions contains the optional parameters for the SyncGroupsClient.Get method. +func (client *SyncGroupsClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, options *SyncGroupsClientGetOptions) (SyncGroupsClientGetResponse, error) { + var err error + const operationName = "SyncGroupsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serverName, databaseName, syncGroupName, options) + if err != nil { + return SyncGroupsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return SyncGroupsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SyncGroupsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *SyncGroupsClient) getCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, options *SyncGroupsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if syncGroupName == "" { + return nil, errors.New("parameter syncGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{syncGroupName}", url.PathEscape(syncGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *SyncGroupsClient) getHandleResponse(resp *http.Response) (SyncGroupsClientGetResponse, error) { + result := SyncGroupsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SyncGroup); err != nil { + return SyncGroupsClientGetResponse{}, err + } + return result, nil +} + +// NewListByDatabasePager - Lists sync groups under a hub database. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database on which the sync group is hosted. +// - options - SyncGroupsClientListByDatabaseOptions contains the optional parameters for the SyncGroupsClient.NewListByDatabasePager +// method. +func (client *SyncGroupsClient) NewListByDatabasePager(resourceGroupName string, serverName string, databaseName string, options *SyncGroupsClientListByDatabaseOptions) *runtime.Pager[SyncGroupsClientListByDatabaseResponse] { + return runtime.NewPager(runtime.PagingHandler[SyncGroupsClientListByDatabaseResponse]{ + More: func(page SyncGroupsClientListByDatabaseResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *SyncGroupsClientListByDatabaseResponse) (SyncGroupsClientListByDatabaseResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "SyncGroupsClient.NewListByDatabasePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByDatabaseCreateRequest(ctx, resourceGroupName, serverName, databaseName, options) + }, nil) + if err != nil { + return SyncGroupsClientListByDatabaseResponse{}, err + } + return client.listByDatabaseHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByDatabaseCreateRequest creates the ListByDatabase request. +func (client *SyncGroupsClient) listByDatabaseCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, options *SyncGroupsClientListByDatabaseOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByDatabaseHandleResponse handles the ListByDatabase response. +func (client *SyncGroupsClient) listByDatabaseHandleResponse(resp *http.Response) (SyncGroupsClientListByDatabaseResponse, error) { + result := SyncGroupsClientListByDatabaseResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SyncGroupListResult); err != nil { + return SyncGroupsClientListByDatabaseResponse{}, err + } + return result, nil +} + +// NewListHubSchemasPager - Gets a collection of hub database schemas. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database on which the sync group is hosted. +// - syncGroupName - The name of the sync group. +// - options - SyncGroupsClientListHubSchemasOptions contains the optional parameters for the SyncGroupsClient.NewListHubSchemasPager +// method. +func (client *SyncGroupsClient) NewListHubSchemasPager(resourceGroupName string, serverName string, databaseName string, syncGroupName string, options *SyncGroupsClientListHubSchemasOptions) *runtime.Pager[SyncGroupsClientListHubSchemasResponse] { + return runtime.NewPager(runtime.PagingHandler[SyncGroupsClientListHubSchemasResponse]{ + More: func(page SyncGroupsClientListHubSchemasResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *SyncGroupsClientListHubSchemasResponse) (SyncGroupsClientListHubSchemasResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "SyncGroupsClient.NewListHubSchemasPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listHubSchemasCreateRequest(ctx, resourceGroupName, serverName, databaseName, syncGroupName, options) + }, nil) + if err != nil { + return SyncGroupsClientListHubSchemasResponse{}, err + } + return client.listHubSchemasHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listHubSchemasCreateRequest creates the ListHubSchemas request. +func (client *SyncGroupsClient) listHubSchemasCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, options *SyncGroupsClientListHubSchemasOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/hubSchemas" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if syncGroupName == "" { + return nil, errors.New("parameter syncGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{syncGroupName}", url.PathEscape(syncGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHubSchemasHandleResponse handles the ListHubSchemas response. +func (client *SyncGroupsClient) listHubSchemasHandleResponse(resp *http.Response) (SyncGroupsClientListHubSchemasResponse, error) { + result := SyncGroupsClientListHubSchemasResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SyncFullSchemaPropertiesListResult); err != nil { + return SyncGroupsClientListHubSchemasResponse{}, err + } + return result, nil +} + +// NewListLogsPager - Gets a collection of sync group logs. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database on which the sync group is hosted. +// - syncGroupName - The name of the sync group. +// - startTime - Get logs generated after this time. +// - endTime - Get logs generated before this time. +// - typeParam - The types of logs to retrieve. +// - options - SyncGroupsClientListLogsOptions contains the optional parameters for the SyncGroupsClient.NewListLogsPager method. +func (client *SyncGroupsClient) NewListLogsPager(resourceGroupName string, serverName string, databaseName string, syncGroupName string, startTime string, endTime string, typeParam SyncGroupsType, options *SyncGroupsClientListLogsOptions) *runtime.Pager[SyncGroupsClientListLogsResponse] { + return runtime.NewPager(runtime.PagingHandler[SyncGroupsClientListLogsResponse]{ + More: func(page SyncGroupsClientListLogsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *SyncGroupsClientListLogsResponse) (SyncGroupsClientListLogsResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "SyncGroupsClient.NewListLogsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listLogsCreateRequest(ctx, resourceGroupName, serverName, databaseName, syncGroupName, startTime, endTime, typeParam, options) + }, nil) + if err != nil { + return SyncGroupsClientListLogsResponse{}, err + } + return client.listLogsHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listLogsCreateRequest creates the ListLogs request. +func (client *SyncGroupsClient) listLogsCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, startTime string, endTime string, typeParam SyncGroupsType, options *SyncGroupsClientListLogsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/logs" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if syncGroupName == "" { + return nil, errors.New("parameter syncGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{syncGroupName}", url.PathEscape(syncGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("startTime", startTime) + reqQP.Set("endTime", endTime) + reqQP.Set("type", string(typeParam)) + if options != nil && options.ContinuationToken != nil { + reqQP.Set("continuationToken", *options.ContinuationToken) + } + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listLogsHandleResponse handles the ListLogs response. +func (client *SyncGroupsClient) listLogsHandleResponse(resp *http.Response) (SyncGroupsClientListLogsResponse, error) { + result := SyncGroupsClientListLogsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SyncGroupLogListResult); err != nil { + return SyncGroupsClientListLogsResponse{}, err + } + return result, nil +} + +// NewListSyncDatabaseIDsPager - Gets a collection of sync database ids. +// +// Generated from API version 2020-11-01-preview +// - locationName - The name of the region where the resource is located. +// - options - SyncGroupsClientListSyncDatabaseIDsOptions contains the optional parameters for the SyncGroupsClient.NewListSyncDatabaseIDsPager +// method. +func (client *SyncGroupsClient) NewListSyncDatabaseIDsPager(locationName string, options *SyncGroupsClientListSyncDatabaseIDsOptions) *runtime.Pager[SyncGroupsClientListSyncDatabaseIDsResponse] { + return runtime.NewPager(runtime.PagingHandler[SyncGroupsClientListSyncDatabaseIDsResponse]{ + More: func(page SyncGroupsClientListSyncDatabaseIDsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *SyncGroupsClientListSyncDatabaseIDsResponse) (SyncGroupsClientListSyncDatabaseIDsResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "SyncGroupsClient.NewListSyncDatabaseIDsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listSyncDatabaseIDsCreateRequest(ctx, locationName, options) + }, nil) + if err != nil { + return SyncGroupsClientListSyncDatabaseIDsResponse{}, err + } + return client.listSyncDatabaseIDsHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listSyncDatabaseIDsCreateRequest creates the ListSyncDatabaseIDs request. +func (client *SyncGroupsClient) listSyncDatabaseIDsCreateRequest(ctx context.Context, locationName string, options *SyncGroupsClientListSyncDatabaseIDsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/syncDatabaseIds" + if locationName == "" { + return nil, errors.New("parameter locationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{locationName}", url.PathEscape(locationName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listSyncDatabaseIDsHandleResponse handles the ListSyncDatabaseIDs response. +func (client *SyncGroupsClient) listSyncDatabaseIDsHandleResponse(resp *http.Response) (SyncGroupsClientListSyncDatabaseIDsResponse, error) { + result := SyncGroupsClientListSyncDatabaseIDsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SyncDatabaseIDListResult); err != nil { + return SyncGroupsClientListSyncDatabaseIDsResponse{}, err + } + return result, nil +} + +// BeginRefreshHubSchema - Refreshes a hub database schema. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database on which the sync group is hosted. +// - syncGroupName - The name of the sync group. +// - options - SyncGroupsClientBeginRefreshHubSchemaOptions contains the optional parameters for the SyncGroupsClient.BeginRefreshHubSchema +// method. +func (client *SyncGroupsClient) BeginRefreshHubSchema(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, options *SyncGroupsClientBeginRefreshHubSchemaOptions) (*runtime.Poller[SyncGroupsClientRefreshHubSchemaResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.refreshHubSchema(ctx, resourceGroupName, serverName, databaseName, syncGroupName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SyncGroupsClientRefreshHubSchemaResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SyncGroupsClientRefreshHubSchemaResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// RefreshHubSchema - Refreshes a hub database schema. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +func (client *SyncGroupsClient) refreshHubSchema(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, options *SyncGroupsClientBeginRefreshHubSchemaOptions) (*http.Response, error) { + var err error + const operationName = "SyncGroupsClient.BeginRefreshHubSchema" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.refreshHubSchemaCreateRequest(ctx, resourceGroupName, serverName, databaseName, syncGroupName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// refreshHubSchemaCreateRequest creates the RefreshHubSchema request. +func (client *SyncGroupsClient) refreshHubSchemaCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, options *SyncGroupsClientBeginRefreshHubSchemaOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/refreshHubSchema" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if syncGroupName == "" { + return nil, errors.New("parameter syncGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{syncGroupName}", url.PathEscape(syncGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + return req, nil +} + +// TriggerSync - Triggers a sync group synchronization. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database on which the sync group is hosted. +// - syncGroupName - The name of the sync group. +// - options - SyncGroupsClientTriggerSyncOptions contains the optional parameters for the SyncGroupsClient.TriggerSync method. +func (client *SyncGroupsClient) TriggerSync(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, options *SyncGroupsClientTriggerSyncOptions) (SyncGroupsClientTriggerSyncResponse, error) { + var err error + const operationName = "SyncGroupsClient.TriggerSync" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.triggerSyncCreateRequest(ctx, resourceGroupName, serverName, databaseName, syncGroupName, options) + if err != nil { + return SyncGroupsClientTriggerSyncResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return SyncGroupsClientTriggerSyncResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SyncGroupsClientTriggerSyncResponse{}, err + } + return SyncGroupsClientTriggerSyncResponse{}, nil +} + +// triggerSyncCreateRequest creates the TriggerSync request. +func (client *SyncGroupsClient) triggerSyncCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, options *SyncGroupsClientTriggerSyncOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/triggerSync" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if syncGroupName == "" { + return nil, errors.New("parameter syncGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{syncGroupName}", url.PathEscape(syncGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + return req, nil +} + +// BeginUpdate - Updates a sync group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database on which the sync group is hosted. +// - syncGroupName - The name of the sync group. +// - parameters - The requested sync group resource state. +// - options - SyncGroupsClientBeginUpdateOptions contains the optional parameters for the SyncGroupsClient.BeginUpdate method. +func (client *SyncGroupsClient) BeginUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, parameters SyncGroup, options *SyncGroupsClientBeginUpdateOptions) (*runtime.Poller[SyncGroupsClientUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.update(ctx, resourceGroupName, serverName, databaseName, syncGroupName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SyncGroupsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SyncGroupsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Update - Updates a sync group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +func (client *SyncGroupsClient) update(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, parameters SyncGroup, options *SyncGroupsClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "SyncGroupsClient.BeginUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, serverName, databaseName, syncGroupName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// updateCreateRequest creates the Update request. +func (client *SyncGroupsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, parameters SyncGroup, options *SyncGroupsClientBeginUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if syncGroupName == "" { + return nil, errors.New("parameter syncGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{syncGroupName}", url.PathEscape(syncGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/syncmembers_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/syncmembers_client.go new file mode 100644 index 000000000..d3f55da4c --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/syncmembers_client.go @@ -0,0 +1,653 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// SyncMembersClient contains the methods for the SyncMembers group. +// Don't use this type directly, use NewSyncMembersClient() instead. +type SyncMembersClient struct { + internal *arm.Client + subscriptionID string +} + +// NewSyncMembersClient creates a new instance of SyncMembersClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewSyncMembersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SyncMembersClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &SyncMembersClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates or updates a sync member. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database on which the sync group is hosted. +// - syncGroupName - The name of the sync group on which the sync member is hosted. +// - syncMemberName - The name of the sync member. +// - parameters - The requested sync member resource state. +// - options - SyncMembersClientBeginCreateOrUpdateOptions contains the optional parameters for the SyncMembersClient.BeginCreateOrUpdate +// method. +func (client *SyncMembersClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, syncMemberName string, parameters SyncMember, options *SyncMembersClientBeginCreateOrUpdateOptions) (*runtime.Poller[SyncMembersClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SyncMembersClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SyncMembersClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates or updates a sync member. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +func (client *SyncMembersClient) createOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, syncMemberName string, parameters SyncMember, options *SyncMembersClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "SyncMembersClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *SyncMembersClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, syncMemberName string, parameters SyncMember, options *SyncMembersClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers/{syncMemberName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if syncGroupName == "" { + return nil, errors.New("parameter syncGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{syncGroupName}", url.PathEscape(syncGroupName)) + if syncMemberName == "" { + return nil, errors.New("parameter syncMemberName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{syncMemberName}", url.PathEscape(syncMemberName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes a sync member. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database on which the sync group is hosted. +// - syncGroupName - The name of the sync group on which the sync member is hosted. +// - syncMemberName - The name of the sync member. +// - options - SyncMembersClientBeginDeleteOptions contains the optional parameters for the SyncMembersClient.BeginDelete method. +func (client *SyncMembersClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, syncMemberName string, options *SyncMembersClientBeginDeleteOptions) (*runtime.Poller[SyncMembersClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SyncMembersClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SyncMembersClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes a sync member. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +func (client *SyncMembersClient) deleteOperation(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, syncMemberName string, options *SyncMembersClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "SyncMembersClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *SyncMembersClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, syncMemberName string, options *SyncMembersClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers/{syncMemberName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if syncGroupName == "" { + return nil, errors.New("parameter syncGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{syncGroupName}", url.PathEscape(syncGroupName)) + if syncMemberName == "" { + return nil, errors.New("parameter syncMemberName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{syncMemberName}", url.PathEscape(syncMemberName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + return req, nil +} + +// Get - Gets a sync member. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database on which the sync group is hosted. +// - syncGroupName - The name of the sync group on which the sync member is hosted. +// - syncMemberName - The name of the sync member. +// - options - SyncMembersClientGetOptions contains the optional parameters for the SyncMembersClient.Get method. +func (client *SyncMembersClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, syncMemberName string, options *SyncMembersClientGetOptions) (SyncMembersClientGetResponse, error) { + var err error + const operationName = "SyncMembersClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, options) + if err != nil { + return SyncMembersClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return SyncMembersClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SyncMembersClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *SyncMembersClient) getCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, syncMemberName string, options *SyncMembersClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers/{syncMemberName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if syncGroupName == "" { + return nil, errors.New("parameter syncGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{syncGroupName}", url.PathEscape(syncGroupName)) + if syncMemberName == "" { + return nil, errors.New("parameter syncMemberName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{syncMemberName}", url.PathEscape(syncMemberName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *SyncMembersClient) getHandleResponse(resp *http.Response) (SyncMembersClientGetResponse, error) { + result := SyncMembersClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SyncMember); err != nil { + return SyncMembersClientGetResponse{}, err + } + return result, nil +} + +// NewListBySyncGroupPager - Lists sync members in the given sync group. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database on which the sync group is hosted. +// - syncGroupName - The name of the sync group. +// - options - SyncMembersClientListBySyncGroupOptions contains the optional parameters for the SyncMembersClient.NewListBySyncGroupPager +// method. +func (client *SyncMembersClient) NewListBySyncGroupPager(resourceGroupName string, serverName string, databaseName string, syncGroupName string, options *SyncMembersClientListBySyncGroupOptions) *runtime.Pager[SyncMembersClientListBySyncGroupResponse] { + return runtime.NewPager(runtime.PagingHandler[SyncMembersClientListBySyncGroupResponse]{ + More: func(page SyncMembersClientListBySyncGroupResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *SyncMembersClientListBySyncGroupResponse) (SyncMembersClientListBySyncGroupResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "SyncMembersClient.NewListBySyncGroupPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listBySyncGroupCreateRequest(ctx, resourceGroupName, serverName, databaseName, syncGroupName, options) + }, nil) + if err != nil { + return SyncMembersClientListBySyncGroupResponse{}, err + } + return client.listBySyncGroupHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listBySyncGroupCreateRequest creates the ListBySyncGroup request. +func (client *SyncMembersClient) listBySyncGroupCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, options *SyncMembersClientListBySyncGroupOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if syncGroupName == "" { + return nil, errors.New("parameter syncGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{syncGroupName}", url.PathEscape(syncGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listBySyncGroupHandleResponse handles the ListBySyncGroup response. +func (client *SyncMembersClient) listBySyncGroupHandleResponse(resp *http.Response) (SyncMembersClientListBySyncGroupResponse, error) { + result := SyncMembersClientListBySyncGroupResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SyncMemberListResult); err != nil { + return SyncMembersClientListBySyncGroupResponse{}, err + } + return result, nil +} + +// NewListMemberSchemasPager - Gets a sync member database schema. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database on which the sync group is hosted. +// - syncGroupName - The name of the sync group on which the sync member is hosted. +// - syncMemberName - The name of the sync member. +// - options - SyncMembersClientListMemberSchemasOptions contains the optional parameters for the SyncMembersClient.NewListMemberSchemasPager +// method. +func (client *SyncMembersClient) NewListMemberSchemasPager(resourceGroupName string, serverName string, databaseName string, syncGroupName string, syncMemberName string, options *SyncMembersClientListMemberSchemasOptions) *runtime.Pager[SyncMembersClientListMemberSchemasResponse] { + return runtime.NewPager(runtime.PagingHandler[SyncMembersClientListMemberSchemasResponse]{ + More: func(page SyncMembersClientListMemberSchemasResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *SyncMembersClientListMemberSchemasResponse) (SyncMembersClientListMemberSchemasResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "SyncMembersClient.NewListMemberSchemasPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listMemberSchemasCreateRequest(ctx, resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, options) + }, nil) + if err != nil { + return SyncMembersClientListMemberSchemasResponse{}, err + } + return client.listMemberSchemasHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listMemberSchemasCreateRequest creates the ListMemberSchemas request. +func (client *SyncMembersClient) listMemberSchemasCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, syncMemberName string, options *SyncMembersClientListMemberSchemasOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers/{syncMemberName}/schemas" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if syncGroupName == "" { + return nil, errors.New("parameter syncGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{syncGroupName}", url.PathEscape(syncGroupName)) + if syncMemberName == "" { + return nil, errors.New("parameter syncMemberName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{syncMemberName}", url.PathEscape(syncMemberName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listMemberSchemasHandleResponse handles the ListMemberSchemas response. +func (client *SyncMembersClient) listMemberSchemasHandleResponse(resp *http.Response) (SyncMembersClientListMemberSchemasResponse, error) { + result := SyncMembersClientListMemberSchemasResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SyncFullSchemaPropertiesListResult); err != nil { + return SyncMembersClientListMemberSchemasResponse{}, err + } + return result, nil +} + +// BeginRefreshMemberSchema - Refreshes a sync member database schema. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database on which the sync group is hosted. +// - syncGroupName - The name of the sync group on which the sync member is hosted. +// - syncMemberName - The name of the sync member. +// - options - SyncMembersClientBeginRefreshMemberSchemaOptions contains the optional parameters for the SyncMembersClient.BeginRefreshMemberSchema +// method. +func (client *SyncMembersClient) BeginRefreshMemberSchema(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, syncMemberName string, options *SyncMembersClientBeginRefreshMemberSchemaOptions) (*runtime.Poller[SyncMembersClientRefreshMemberSchemaResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.refreshMemberSchema(ctx, resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SyncMembersClientRefreshMemberSchemaResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SyncMembersClientRefreshMemberSchemaResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// RefreshMemberSchema - Refreshes a sync member database schema. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +func (client *SyncMembersClient) refreshMemberSchema(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, syncMemberName string, options *SyncMembersClientBeginRefreshMemberSchemaOptions) (*http.Response, error) { + var err error + const operationName = "SyncMembersClient.BeginRefreshMemberSchema" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.refreshMemberSchemaCreateRequest(ctx, resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// refreshMemberSchemaCreateRequest creates the RefreshMemberSchema request. +func (client *SyncMembersClient) refreshMemberSchemaCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, syncMemberName string, options *SyncMembersClientBeginRefreshMemberSchemaOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers/{syncMemberName}/refreshSchema" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if syncGroupName == "" { + return nil, errors.New("parameter syncGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{syncGroupName}", url.PathEscape(syncGroupName)) + if syncMemberName == "" { + return nil, errors.New("parameter syncMemberName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{syncMemberName}", url.PathEscape(syncMemberName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + return req, nil +} + +// BeginUpdate - Updates an existing sync member. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database on which the sync group is hosted. +// - syncGroupName - The name of the sync group on which the sync member is hosted. +// - syncMemberName - The name of the sync member. +// - parameters - The requested sync member resource state. +// - options - SyncMembersClientBeginUpdateOptions contains the optional parameters for the SyncMembersClient.BeginUpdate method. +func (client *SyncMembersClient) BeginUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, syncMemberName string, parameters SyncMember, options *SyncMembersClientBeginUpdateOptions) (*runtime.Poller[SyncMembersClientUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.update(ctx, resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SyncMembersClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SyncMembersClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Update - Updates an existing sync member. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +func (client *SyncMembersClient) update(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, syncMemberName string, parameters SyncMember, options *SyncMembersClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "SyncMembersClient.BeginUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// updateCreateRequest creates the Update request. +func (client *SyncMembersClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, syncMemberName string, parameters SyncMember, options *SyncMembersClientBeginUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers/{syncMemberName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if syncGroupName == "" { + return nil, errors.New("parameter syncGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{syncGroupName}", url.PathEscape(syncGroupName)) + if syncMemberName == "" { + return nil, errors.New("parameter syncMemberName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{syncMemberName}", url.PathEscape(syncMemberName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/tdecertificates_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/tdecertificates_client.go new file mode 100644 index 000000000..7b7137c6a --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/tdecertificates_client.go @@ -0,0 +1,124 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// TdeCertificatesClient contains the methods for the TdeCertificates group. +// Don't use this type directly, use NewTdeCertificatesClient() instead. +type TdeCertificatesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewTdeCertificatesClient creates a new instance of TdeCertificatesClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewTdeCertificatesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*TdeCertificatesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &TdeCertificatesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreate - Creates a TDE certificate for a given server. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - parameters - The requested TDE certificate to be created or updated. +// - options - TdeCertificatesClientBeginCreateOptions contains the optional parameters for the TdeCertificatesClient.BeginCreate +// method. +func (client *TdeCertificatesClient) BeginCreate(ctx context.Context, resourceGroupName string, serverName string, parameters TdeCertificate, options *TdeCertificatesClientBeginCreateOptions) (*runtime.Poller[TdeCertificatesClientCreateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.create(ctx, resourceGroupName, serverName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[TdeCertificatesClientCreateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[TdeCertificatesClientCreateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Create - Creates a TDE certificate for a given server. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +func (client *TdeCertificatesClient) create(ctx context.Context, resourceGroupName string, serverName string, parameters TdeCertificate, options *TdeCertificatesClientBeginCreateOptions) (*http.Response, error) { + var err error + const operationName = "TdeCertificatesClient.BeginCreate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createCreateRequest(ctx, resourceGroupName, serverName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createCreateRequest creates the Create request. +func (client *TdeCertificatesClient) createCreateRequest(ctx context.Context, resourceGroupName string, serverName string, parameters TdeCertificate, options *TdeCertificatesClientBeginCreateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/tdeCertificates" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/time_rfc3339.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/time_rfc3339.go similarity index 98% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/time_rfc3339.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/time_rfc3339.go index f74d9b2ed..2855a4750 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3/time_rfc3339.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/time_rfc3339.go @@ -6,7 +6,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -package armmachinelearning +package armsql import ( "encoding/json" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/timezones_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/timezones_client.go new file mode 100644 index 000000000..f63c69660 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/timezones_client.go @@ -0,0 +1,165 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// TimeZonesClient contains the methods for the TimeZones group. +// Don't use this type directly, use NewTimeZonesClient() instead. +type TimeZonesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewTimeZonesClient creates a new instance of TimeZonesClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewTimeZonesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*TimeZonesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &TimeZonesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Gets a managed instance time zone. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - options - TimeZonesClientGetOptions contains the optional parameters for the TimeZonesClient.Get method. +func (client *TimeZonesClient) Get(ctx context.Context, locationName string, timeZoneID string, options *TimeZonesClientGetOptions) (TimeZonesClientGetResponse, error) { + var err error + const operationName = "TimeZonesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, locationName, timeZoneID, options) + if err != nil { + return TimeZonesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return TimeZonesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return TimeZonesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *TimeZonesClient) getCreateRequest(ctx context.Context, locationName string, timeZoneID string, options *TimeZonesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/timeZones/{timeZoneId}" + if locationName == "" { + return nil, errors.New("parameter locationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{locationName}", url.PathEscape(locationName)) + if timeZoneID == "" { + return nil, errors.New("parameter timeZoneID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{timeZoneId}", url.PathEscape(timeZoneID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *TimeZonesClient) getHandleResponse(resp *http.Response) (TimeZonesClientGetResponse, error) { + result := TimeZonesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.TimeZone); err != nil { + return TimeZonesClientGetResponse{}, err + } + return result, nil +} + +// NewListByLocationPager - Gets a list of managed instance time zones by location. +// +// Generated from API version 2020-11-01-preview +// - options - TimeZonesClientListByLocationOptions contains the optional parameters for the TimeZonesClient.NewListByLocationPager +// method. +func (client *TimeZonesClient) NewListByLocationPager(locationName string, options *TimeZonesClientListByLocationOptions) *runtime.Pager[TimeZonesClientListByLocationResponse] { + return runtime.NewPager(runtime.PagingHandler[TimeZonesClientListByLocationResponse]{ + More: func(page TimeZonesClientListByLocationResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *TimeZonesClientListByLocationResponse) (TimeZonesClientListByLocationResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "TimeZonesClient.NewListByLocationPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByLocationCreateRequest(ctx, locationName, options) + }, nil) + if err != nil { + return TimeZonesClientListByLocationResponse{}, err + } + return client.listByLocationHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByLocationCreateRequest creates the ListByLocation request. +func (client *TimeZonesClient) listByLocationCreateRequest(ctx context.Context, locationName string, options *TimeZonesClientListByLocationOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/timeZones" + if locationName == "" { + return nil, errors.New("parameter locationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{locationName}", url.PathEscape(locationName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByLocationHandleResponse handles the ListByLocation response. +func (client *TimeZonesClient) listByLocationHandleResponse(resp *http.Response) (TimeZonesClientListByLocationResponse, error) { + result := TimeZonesClientListByLocationResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.TimeZoneListResult); err != nil { + return TimeZonesClientListByLocationResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/transparentdataencryptions_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/transparentdataencryptions_client.go new file mode 100644 index 000000000..53eac481b --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/transparentdataencryptions_client.go @@ -0,0 +1,271 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// TransparentDataEncryptionsClient contains the methods for the TransparentDataEncryptions group. +// Don't use this type directly, use NewTransparentDataEncryptionsClient() instead. +type TransparentDataEncryptionsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewTransparentDataEncryptionsClient creates a new instance of TransparentDataEncryptionsClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewTransparentDataEncryptionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*TransparentDataEncryptionsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &TransparentDataEncryptionsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Updates a logical database's transparent data encryption configuration. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-02-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the logical database for which the security alert policy is defined. +// - tdeName - The name of the transparent data encryption configuration. +// - parameters - The database transparent data encryption. +// - options - TransparentDataEncryptionsClientCreateOrUpdateOptions contains the optional parameters for the TransparentDataEncryptionsClient.CreateOrUpdate +// method. +func (client *TransparentDataEncryptionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, tdeName TransparentDataEncryptionName, parameters LogicalDatabaseTransparentDataEncryption, options *TransparentDataEncryptionsClientCreateOrUpdateOptions) (TransparentDataEncryptionsClientCreateOrUpdateResponse, error) { + var err error + const operationName = "TransparentDataEncryptionsClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serverName, databaseName, tdeName, parameters, options) + if err != nil { + return TransparentDataEncryptionsClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return TransparentDataEncryptionsClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return TransparentDataEncryptionsClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *TransparentDataEncryptionsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, tdeName TransparentDataEncryptionName, parameters LogicalDatabaseTransparentDataEncryption, options *TransparentDataEncryptionsClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/transparentDataEncryption/{tdeName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if tdeName == "" { + return nil, errors.New("parameter tdeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{tdeName}", url.PathEscape(string(tdeName))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-02-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *TransparentDataEncryptionsClient) createOrUpdateHandleResponse(resp *http.Response) (TransparentDataEncryptionsClientCreateOrUpdateResponse, error) { + result := TransparentDataEncryptionsClientCreateOrUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.LogicalDatabaseTransparentDataEncryption); err != nil { + return TransparentDataEncryptionsClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// Get - Gets a logical database's transparent data encryption. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-02-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the logical database for which the transparent data encryption is defined. +// - tdeName - The name of the transparent data encryption configuration. +// - options - TransparentDataEncryptionsClientGetOptions contains the optional parameters for the TransparentDataEncryptionsClient.Get +// method. +func (client *TransparentDataEncryptionsClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, tdeName TransparentDataEncryptionName, options *TransparentDataEncryptionsClientGetOptions) (TransparentDataEncryptionsClientGetResponse, error) { + var err error + const operationName = "TransparentDataEncryptionsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serverName, databaseName, tdeName, options) + if err != nil { + return TransparentDataEncryptionsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return TransparentDataEncryptionsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return TransparentDataEncryptionsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *TransparentDataEncryptionsClient) getCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, tdeName TransparentDataEncryptionName, options *TransparentDataEncryptionsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/transparentDataEncryption/{tdeName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if tdeName == "" { + return nil, errors.New("parameter tdeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{tdeName}", url.PathEscape(string(tdeName))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-02-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *TransparentDataEncryptionsClient) getHandleResponse(resp *http.Response) (TransparentDataEncryptionsClientGetResponse, error) { + result := TransparentDataEncryptionsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.LogicalDatabaseTransparentDataEncryption); err != nil { + return TransparentDataEncryptionsClientGetResponse{}, err + } + return result, nil +} + +// NewListByDatabasePager - Gets a list of the logical database's transparent data encryption. +// +// Generated from API version 2021-02-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the logical database for which the transparent data encryption is defined. +// - options - TransparentDataEncryptionsClientListByDatabaseOptions contains the optional parameters for the TransparentDataEncryptionsClient.NewListByDatabasePager +// method. +func (client *TransparentDataEncryptionsClient) NewListByDatabasePager(resourceGroupName string, serverName string, databaseName string, options *TransparentDataEncryptionsClientListByDatabaseOptions) *runtime.Pager[TransparentDataEncryptionsClientListByDatabaseResponse] { + return runtime.NewPager(runtime.PagingHandler[TransparentDataEncryptionsClientListByDatabaseResponse]{ + More: func(page TransparentDataEncryptionsClientListByDatabaseResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *TransparentDataEncryptionsClientListByDatabaseResponse) (TransparentDataEncryptionsClientListByDatabaseResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "TransparentDataEncryptionsClient.NewListByDatabasePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByDatabaseCreateRequest(ctx, resourceGroupName, serverName, databaseName, options) + }, nil) + if err != nil { + return TransparentDataEncryptionsClientListByDatabaseResponse{}, err + } + return client.listByDatabaseHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByDatabaseCreateRequest creates the ListByDatabase request. +func (client *TransparentDataEncryptionsClient) listByDatabaseCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, options *TransparentDataEncryptionsClientListByDatabaseOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/transparentDataEncryption" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-02-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByDatabaseHandleResponse handles the ListByDatabase response. +func (client *TransparentDataEncryptionsClient) listByDatabaseHandleResponse(resp *http.Response) (TransparentDataEncryptionsClientListByDatabaseResponse, error) { + result := TransparentDataEncryptionsClientListByDatabaseResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.LogicalDatabaseTransparentDataEncryptionListResult); err != nil { + return TransparentDataEncryptionsClientListByDatabaseResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/usages_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/usages_client.go new file mode 100644 index 000000000..655ed2579 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/usages_client.go @@ -0,0 +1,114 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// UsagesClient contains the methods for the Usages group. +// Don't use this type directly, use NewUsagesClient() instead. +type UsagesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewUsagesClient creates a new instance of UsagesClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewUsagesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*UsagesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &UsagesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// NewListByInstancePoolPager - Gets all instance pool usage metrics +// +// Generated from API version 2021-02-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - instancePoolName - The name of the instance pool to be retrieved. +// - options - UsagesClientListByInstancePoolOptions contains the optional parameters for the UsagesClient.NewListByInstancePoolPager +// method. +func (client *UsagesClient) NewListByInstancePoolPager(resourceGroupName string, instancePoolName string, options *UsagesClientListByInstancePoolOptions) *runtime.Pager[UsagesClientListByInstancePoolResponse] { + return runtime.NewPager(runtime.PagingHandler[UsagesClientListByInstancePoolResponse]{ + More: func(page UsagesClientListByInstancePoolResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *UsagesClientListByInstancePoolResponse) (UsagesClientListByInstancePoolResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "UsagesClient.NewListByInstancePoolPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByInstancePoolCreateRequest(ctx, resourceGroupName, instancePoolName, options) + }, nil) + if err != nil { + return UsagesClientListByInstancePoolResponse{}, err + } + return client.listByInstancePoolHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByInstancePoolCreateRequest creates the ListByInstancePool request. +func (client *UsagesClient) listByInstancePoolCreateRequest(ctx context.Context, resourceGroupName string, instancePoolName string, options *UsagesClientListByInstancePoolOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}/usages" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if instancePoolName == "" { + return nil, errors.New("parameter instancePoolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{instancePoolName}", url.PathEscape(instancePoolName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.ExpandChildren != nil { + reqQP.Set("expandChildren", strconv.FormatBool(*options.ExpandChildren)) + } + reqQP.Set("api-version", "2021-02-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByInstancePoolHandleResponse handles the ListByInstancePool response. +func (client *UsagesClient) listByInstancePoolHandleResponse(resp *http.Response) (UsagesClientListByInstancePoolResponse, error) { + result := UsagesClientListByInstancePoolResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.UsageListResult); err != nil { + return UsagesClientListByInstancePoolResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/virtualclusters_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/virtualclusters_client.go new file mode 100644 index 000000000..ac39f4570 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/virtualclusters_client.go @@ -0,0 +1,448 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// VirtualClustersClient contains the methods for the VirtualClusters group. +// Don't use this type directly, use NewVirtualClustersClient() instead. +type VirtualClustersClient struct { + internal *arm.Client + subscriptionID string +} + +// NewVirtualClustersClient creates a new instance of VirtualClustersClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewVirtualClustersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualClustersClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &VirtualClustersClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginDelete - Deletes a virtual cluster. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - virtualClusterName - The name of the virtual cluster. +// - options - VirtualClustersClientBeginDeleteOptions contains the optional parameters for the VirtualClustersClient.BeginDelete +// method. +func (client *VirtualClustersClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualClusterName string, options *VirtualClustersClientBeginDeleteOptions) (*runtime.Poller[VirtualClustersClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, virtualClusterName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualClustersClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualClustersClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes a virtual cluster. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +func (client *VirtualClustersClient) deleteOperation(ctx context.Context, resourceGroupName string, virtualClusterName string, options *VirtualClustersClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "VirtualClustersClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, virtualClusterName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *VirtualClustersClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, virtualClusterName string, options *VirtualClustersClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/virtualClusters/{virtualClusterName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualClusterName == "" { + return nil, errors.New("parameter virtualClusterName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualClusterName}", url.PathEscape(virtualClusterName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + return req, nil +} + +// Get - Gets a virtual cluster. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - virtualClusterName - The name of the virtual cluster. +// - options - VirtualClustersClientGetOptions contains the optional parameters for the VirtualClustersClient.Get method. +func (client *VirtualClustersClient) Get(ctx context.Context, resourceGroupName string, virtualClusterName string, options *VirtualClustersClientGetOptions) (VirtualClustersClientGetResponse, error) { + var err error + const operationName = "VirtualClustersClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, virtualClusterName, options) + if err != nil { + return VirtualClustersClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return VirtualClustersClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return VirtualClustersClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *VirtualClustersClient) getCreateRequest(ctx context.Context, resourceGroupName string, virtualClusterName string, options *VirtualClustersClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/virtualClusters/{virtualClusterName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualClusterName == "" { + return nil, errors.New("parameter virtualClusterName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualClusterName}", url.PathEscape(virtualClusterName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *VirtualClustersClient) getHandleResponse(resp *http.Response) (VirtualClustersClientGetResponse, error) { + result := VirtualClustersClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VirtualCluster); err != nil { + return VirtualClustersClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Gets a list of all virtualClusters in the subscription. +// +// Generated from API version 2020-11-01-preview +// - options - VirtualClustersClientListOptions contains the optional parameters for the VirtualClustersClient.NewListPager +// method. +func (client *VirtualClustersClient) NewListPager(options *VirtualClustersClientListOptions) *runtime.Pager[VirtualClustersClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[VirtualClustersClientListResponse]{ + More: func(page VirtualClustersClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *VirtualClustersClientListResponse) (VirtualClustersClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VirtualClustersClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) + if err != nil { + return VirtualClustersClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *VirtualClustersClient) listCreateRequest(ctx context.Context, options *VirtualClustersClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/virtualClusters" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *VirtualClustersClient) listHandleResponse(resp *http.Response) (VirtualClustersClientListResponse, error) { + result := VirtualClustersClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VirtualClusterListResult); err != nil { + return VirtualClustersClientListResponse{}, err + } + return result, nil +} + +// NewListByResourceGroupPager - Gets a list of virtual clusters in a resource group. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - options - VirtualClustersClientListByResourceGroupOptions contains the optional parameters for the VirtualClustersClient.NewListByResourceGroupPager +// method. +func (client *VirtualClustersClient) NewListByResourceGroupPager(resourceGroupName string, options *VirtualClustersClientListByResourceGroupOptions) *runtime.Pager[VirtualClustersClientListByResourceGroupResponse] { + return runtime.NewPager(runtime.PagingHandler[VirtualClustersClientListByResourceGroupResponse]{ + More: func(page VirtualClustersClientListByResourceGroupResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *VirtualClustersClientListByResourceGroupResponse) (VirtualClustersClientListByResourceGroupResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VirtualClustersClient.NewListByResourceGroupPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + }, nil) + if err != nil { + return VirtualClustersClientListByResourceGroupResponse{}, err + } + return client.listByResourceGroupHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByResourceGroupCreateRequest creates the ListByResourceGroup request. +func (client *VirtualClustersClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *VirtualClustersClientListByResourceGroupOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/virtualClusters" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByResourceGroupHandleResponse handles the ListByResourceGroup response. +func (client *VirtualClustersClient) listByResourceGroupHandleResponse(resp *http.Response) (VirtualClustersClientListByResourceGroupResponse, error) { + result := VirtualClustersClientListByResourceGroupResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VirtualClusterListResult); err != nil { + return VirtualClustersClientListByResourceGroupResponse{}, err + } + return result, nil +} + +// BeginUpdate - Updates a virtual cluster. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - virtualClusterName - The name of the virtual cluster. +// - parameters - The requested virtual cluster resource state. +// - options - VirtualClustersClientBeginUpdateOptions contains the optional parameters for the VirtualClustersClient.BeginUpdate +// method. +func (client *VirtualClustersClient) BeginUpdate(ctx context.Context, resourceGroupName string, virtualClusterName string, parameters VirtualClusterUpdate, options *VirtualClustersClientBeginUpdateOptions) (*runtime.Poller[VirtualClustersClientUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.update(ctx, resourceGroupName, virtualClusterName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualClustersClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualClustersClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Update - Updates a virtual cluster. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +func (client *VirtualClustersClient) update(ctx context.Context, resourceGroupName string, virtualClusterName string, parameters VirtualClusterUpdate, options *VirtualClustersClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "VirtualClustersClient.BeginUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, virtualClusterName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// updateCreateRequest creates the Update request. +func (client *VirtualClustersClient) updateCreateRequest(ctx context.Context, resourceGroupName string, virtualClusterName string, parameters VirtualClusterUpdate, options *VirtualClustersClientBeginUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/virtualClusters/{virtualClusterName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualClusterName == "" { + return nil, errors.New("parameter virtualClusterName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualClusterName}", url.PathEscape(virtualClusterName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// UpdateDNSServers - Synchronizes the DNS server settings used by the managed instances inside the given virtual cluster. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - virtualClusterName - The name of the virtual cluster. +// - options - VirtualClustersClientUpdateDNSServersOptions contains the optional parameters for the VirtualClustersClient.UpdateDNSServers +// method. +func (client *VirtualClustersClient) UpdateDNSServers(ctx context.Context, resourceGroupName string, virtualClusterName string, options *VirtualClustersClientUpdateDNSServersOptions) (VirtualClustersClientUpdateDNSServersResponse, error) { + var err error + const operationName = "VirtualClustersClient.UpdateDNSServers" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateDNSServersCreateRequest(ctx, resourceGroupName, virtualClusterName, options) + if err != nil { + return VirtualClustersClientUpdateDNSServersResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return VirtualClustersClientUpdateDNSServersResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return VirtualClustersClientUpdateDNSServersResponse{}, err + } + resp, err := client.updateDNSServersHandleResponse(httpResp) + return resp, err +} + +// updateDNSServersCreateRequest creates the UpdateDNSServers request. +func (client *VirtualClustersClient) updateDNSServersCreateRequest(ctx context.Context, resourceGroupName string, virtualClusterName string, options *VirtualClustersClientUpdateDNSServersOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/virtualClusters/{virtualClusterName}/updateManagedInstanceDnsServers" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualClusterName == "" { + return nil, errors.New("parameter virtualClusterName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualClusterName}", url.PathEscape(virtualClusterName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// updateDNSServersHandleResponse handles the UpdateDNSServers response. +func (client *VirtualClustersClient) updateDNSServersHandleResponse(resp *http.Response) (VirtualClustersClientUpdateDNSServersResponse, error) { + result := VirtualClustersClientUpdateDNSServersResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.UpdateManagedInstanceDNSServersOperation); err != nil { + return VirtualClustersClientUpdateDNSServersResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/virtualnetworkrules_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/virtualnetworkrules_client.go new file mode 100644 index 000000000..90e2f5f81 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/virtualnetworkrules_client.go @@ -0,0 +1,347 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// VirtualNetworkRulesClient contains the methods for the VirtualNetworkRules group. +// Don't use this type directly, use NewVirtualNetworkRulesClient() instead. +type VirtualNetworkRulesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewVirtualNetworkRulesClient creates a new instance of VirtualNetworkRulesClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewVirtualNetworkRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualNetworkRulesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &VirtualNetworkRulesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates or updates an existing virtual network rule. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - virtualNetworkRuleName - The name of the virtual network rule. +// - parameters - The requested virtual Network Rule Resource state. +// - options - VirtualNetworkRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualNetworkRulesClient.BeginCreateOrUpdate +// method. +func (client *VirtualNetworkRulesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, virtualNetworkRuleName string, parameters VirtualNetworkRule, options *VirtualNetworkRulesClientBeginCreateOrUpdateOptions) (*runtime.Poller[VirtualNetworkRulesClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, serverName, virtualNetworkRuleName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualNetworkRulesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualNetworkRulesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates or updates an existing virtual network rule. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +func (client *VirtualNetworkRulesClient) createOrUpdate(ctx context.Context, resourceGroupName string, serverName string, virtualNetworkRuleName string, parameters VirtualNetworkRule, options *VirtualNetworkRulesClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "VirtualNetworkRulesClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serverName, virtualNetworkRuleName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *VirtualNetworkRulesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serverName string, virtualNetworkRuleName string, parameters VirtualNetworkRule, options *VirtualNetworkRulesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/virtualNetworkRules/{virtualNetworkRuleName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if virtualNetworkRuleName == "" { + return nil, errors.New("parameter virtualNetworkRuleName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkRuleName}", url.PathEscape(virtualNetworkRuleName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes the virtual network rule with the given name. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - virtualNetworkRuleName - The name of the virtual network rule. +// - options - VirtualNetworkRulesClientBeginDeleteOptions contains the optional parameters for the VirtualNetworkRulesClient.BeginDelete +// method. +func (client *VirtualNetworkRulesClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, virtualNetworkRuleName string, options *VirtualNetworkRulesClientBeginDeleteOptions) (*runtime.Poller[VirtualNetworkRulesClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, serverName, virtualNetworkRuleName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualNetworkRulesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualNetworkRulesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes the virtual network rule with the given name. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +func (client *VirtualNetworkRulesClient) deleteOperation(ctx context.Context, resourceGroupName string, serverName string, virtualNetworkRuleName string, options *VirtualNetworkRulesClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "VirtualNetworkRulesClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serverName, virtualNetworkRuleName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *VirtualNetworkRulesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serverName string, virtualNetworkRuleName string, options *VirtualNetworkRulesClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/virtualNetworkRules/{virtualNetworkRuleName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if virtualNetworkRuleName == "" { + return nil, errors.New("parameter virtualNetworkRuleName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkRuleName}", url.PathEscape(virtualNetworkRuleName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + return req, nil +} + +// Get - Gets a virtual network rule. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - virtualNetworkRuleName - The name of the virtual network rule. +// - options - VirtualNetworkRulesClientGetOptions contains the optional parameters for the VirtualNetworkRulesClient.Get method. +func (client *VirtualNetworkRulesClient) Get(ctx context.Context, resourceGroupName string, serverName string, virtualNetworkRuleName string, options *VirtualNetworkRulesClientGetOptions) (VirtualNetworkRulesClientGetResponse, error) { + var err error + const operationName = "VirtualNetworkRulesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serverName, virtualNetworkRuleName, options) + if err != nil { + return VirtualNetworkRulesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return VirtualNetworkRulesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return VirtualNetworkRulesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *VirtualNetworkRulesClient) getCreateRequest(ctx context.Context, resourceGroupName string, serverName string, virtualNetworkRuleName string, options *VirtualNetworkRulesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/virtualNetworkRules/{virtualNetworkRuleName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if virtualNetworkRuleName == "" { + return nil, errors.New("parameter virtualNetworkRuleName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkRuleName}", url.PathEscape(virtualNetworkRuleName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *VirtualNetworkRulesClient) getHandleResponse(resp *http.Response) (VirtualNetworkRulesClientGetResponse, error) { + result := VirtualNetworkRulesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VirtualNetworkRule); err != nil { + return VirtualNetworkRulesClientGetResponse{}, err + } + return result, nil +} + +// NewListByServerPager - Gets a list of virtual network rules in a server. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - options - VirtualNetworkRulesClientListByServerOptions contains the optional parameters for the VirtualNetworkRulesClient.NewListByServerPager +// method. +func (client *VirtualNetworkRulesClient) NewListByServerPager(resourceGroupName string, serverName string, options *VirtualNetworkRulesClientListByServerOptions) *runtime.Pager[VirtualNetworkRulesClientListByServerResponse] { + return runtime.NewPager(runtime.PagingHandler[VirtualNetworkRulesClientListByServerResponse]{ + More: func(page VirtualNetworkRulesClientListByServerResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *VirtualNetworkRulesClientListByServerResponse) (VirtualNetworkRulesClientListByServerResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VirtualNetworkRulesClient.NewListByServerPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByServerCreateRequest(ctx, resourceGroupName, serverName, options) + }, nil) + if err != nil { + return VirtualNetworkRulesClientListByServerResponse{}, err + } + return client.listByServerHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByServerCreateRequest creates the ListByServer request. +func (client *VirtualNetworkRulesClient) listByServerCreateRequest(ctx context.Context, resourceGroupName string, serverName string, options *VirtualNetworkRulesClientListByServerOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/virtualNetworkRules" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByServerHandleResponse handles the ListByServer response. +func (client *VirtualNetworkRulesClient) listByServerHandleResponse(resp *http.Response) (VirtualNetworkRulesClientListByServerResponse, error) { + result := VirtualNetworkRulesClientListByServerResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VirtualNetworkRuleListResult); err != nil { + return VirtualNetworkRulesClientListByServerResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/workloadclassifiers_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/workloadclassifiers_client.go new file mode 100644 index 000000000..161722d9e --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/workloadclassifiers_client.go @@ -0,0 +1,387 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// WorkloadClassifiersClient contains the methods for the WorkloadClassifiers group. +// Don't use this type directly, use NewWorkloadClassifiersClient() instead. +type WorkloadClassifiersClient struct { + internal *arm.Client + subscriptionID string +} + +// NewWorkloadClassifiersClient creates a new instance of WorkloadClassifiersClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewWorkloadClassifiersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkloadClassifiersClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &WorkloadClassifiersClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates or updates a workload classifier. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database. +// - workloadGroupName - The name of the workload group from which to receive the classifier from. +// - workloadClassifierName - The name of the workload classifier to create/update. +// - parameters - The properties of the workload classifier. +// - options - WorkloadClassifiersClientBeginCreateOrUpdateOptions contains the optional parameters for the WorkloadClassifiersClient.BeginCreateOrUpdate +// method. +func (client *WorkloadClassifiersClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, workloadGroupName string, workloadClassifierName string, parameters WorkloadClassifier, options *WorkloadClassifiersClientBeginCreateOrUpdateOptions) (*runtime.Poller[WorkloadClassifiersClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, serverName, databaseName, workloadGroupName, workloadClassifierName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WorkloadClassifiersClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WorkloadClassifiersClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates or updates a workload classifier. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +func (client *WorkloadClassifiersClient) createOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, workloadGroupName string, workloadClassifierName string, parameters WorkloadClassifier, options *WorkloadClassifiersClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "WorkloadClassifiersClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serverName, databaseName, workloadGroupName, workloadClassifierName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *WorkloadClassifiersClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, workloadGroupName string, workloadClassifierName string, parameters WorkloadClassifier, options *WorkloadClassifiersClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/workloadGroups/{workloadGroupName}/workloadClassifiers/{workloadClassifierName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if workloadGroupName == "" { + return nil, errors.New("parameter workloadGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workloadGroupName}", url.PathEscape(workloadGroupName)) + if workloadClassifierName == "" { + return nil, errors.New("parameter workloadClassifierName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workloadClassifierName}", url.PathEscape(workloadClassifierName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes a workload classifier. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database. +// - workloadGroupName - The name of the workload group from which to receive the classifier from. +// - workloadClassifierName - The name of the workload classifier to delete. +// - options - WorkloadClassifiersClientBeginDeleteOptions contains the optional parameters for the WorkloadClassifiersClient.BeginDelete +// method. +func (client *WorkloadClassifiersClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, databaseName string, workloadGroupName string, workloadClassifierName string, options *WorkloadClassifiersClientBeginDeleteOptions) (*runtime.Poller[WorkloadClassifiersClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, serverName, databaseName, workloadGroupName, workloadClassifierName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WorkloadClassifiersClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WorkloadClassifiersClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes a workload classifier. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +func (client *WorkloadClassifiersClient) deleteOperation(ctx context.Context, resourceGroupName string, serverName string, databaseName string, workloadGroupName string, workloadClassifierName string, options *WorkloadClassifiersClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "WorkloadClassifiersClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serverName, databaseName, workloadGroupName, workloadClassifierName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *WorkloadClassifiersClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, workloadGroupName string, workloadClassifierName string, options *WorkloadClassifiersClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/workloadGroups/{workloadGroupName}/workloadClassifiers/{workloadClassifierName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if workloadGroupName == "" { + return nil, errors.New("parameter workloadGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workloadGroupName}", url.PathEscape(workloadGroupName)) + if workloadClassifierName == "" { + return nil, errors.New("parameter workloadClassifierName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workloadClassifierName}", url.PathEscape(workloadClassifierName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + return req, nil +} + +// Get - Gets a workload classifier +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database. +// - workloadGroupName - The name of the workload group from which to receive the classifier from. +// - workloadClassifierName - The name of the workload classifier. +// - options - WorkloadClassifiersClientGetOptions contains the optional parameters for the WorkloadClassifiersClient.Get method. +func (client *WorkloadClassifiersClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, workloadGroupName string, workloadClassifierName string, options *WorkloadClassifiersClientGetOptions) (WorkloadClassifiersClientGetResponse, error) { + var err error + const operationName = "WorkloadClassifiersClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serverName, databaseName, workloadGroupName, workloadClassifierName, options) + if err != nil { + return WorkloadClassifiersClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkloadClassifiersClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkloadClassifiersClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *WorkloadClassifiersClient) getCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, workloadGroupName string, workloadClassifierName string, options *WorkloadClassifiersClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/workloadGroups/{workloadGroupName}/workloadClassifiers/{workloadClassifierName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if workloadGroupName == "" { + return nil, errors.New("parameter workloadGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workloadGroupName}", url.PathEscape(workloadGroupName)) + if workloadClassifierName == "" { + return nil, errors.New("parameter workloadClassifierName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workloadClassifierName}", url.PathEscape(workloadClassifierName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *WorkloadClassifiersClient) getHandleResponse(resp *http.Response) (WorkloadClassifiersClientGetResponse, error) { + result := WorkloadClassifiersClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.WorkloadClassifier); err != nil { + return WorkloadClassifiersClientGetResponse{}, err + } + return result, nil +} + +// NewListByWorkloadGroupPager - Gets the list of workload classifiers for a workload group +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database. +// - workloadGroupName - The name of the workload group from which to receive the classifiers from. +// - options - WorkloadClassifiersClientListByWorkloadGroupOptions contains the optional parameters for the WorkloadClassifiersClient.NewListByWorkloadGroupPager +// method. +func (client *WorkloadClassifiersClient) NewListByWorkloadGroupPager(resourceGroupName string, serverName string, databaseName string, workloadGroupName string, options *WorkloadClassifiersClientListByWorkloadGroupOptions) *runtime.Pager[WorkloadClassifiersClientListByWorkloadGroupResponse] { + return runtime.NewPager(runtime.PagingHandler[WorkloadClassifiersClientListByWorkloadGroupResponse]{ + More: func(page WorkloadClassifiersClientListByWorkloadGroupResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WorkloadClassifiersClientListByWorkloadGroupResponse) (WorkloadClassifiersClientListByWorkloadGroupResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WorkloadClassifiersClient.NewListByWorkloadGroupPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByWorkloadGroupCreateRequest(ctx, resourceGroupName, serverName, databaseName, workloadGroupName, options) + }, nil) + if err != nil { + return WorkloadClassifiersClientListByWorkloadGroupResponse{}, err + } + return client.listByWorkloadGroupHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByWorkloadGroupCreateRequest creates the ListByWorkloadGroup request. +func (client *WorkloadClassifiersClient) listByWorkloadGroupCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, workloadGroupName string, options *WorkloadClassifiersClientListByWorkloadGroupOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/workloadGroups/{workloadGroupName}/workloadClassifiers" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if workloadGroupName == "" { + return nil, errors.New("parameter workloadGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workloadGroupName}", url.PathEscape(workloadGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByWorkloadGroupHandleResponse handles the ListByWorkloadGroup response. +func (client *WorkloadClassifiersClient) listByWorkloadGroupHandleResponse(resp *http.Response) (WorkloadClassifiersClientListByWorkloadGroupResponse, error) { + result := WorkloadClassifiersClientListByWorkloadGroupResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.WorkloadClassifierListResult); err != nil { + return WorkloadClassifiersClientListByWorkloadGroupResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/workloadgroups_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/workloadgroups_client.go new file mode 100644 index 000000000..e5311091b --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/workloadgroups_client.go @@ -0,0 +1,367 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsql + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// WorkloadGroupsClient contains the methods for the WorkloadGroups group. +// Don't use this type directly, use NewWorkloadGroupsClient() instead. +type WorkloadGroupsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewWorkloadGroupsClient creates a new instance of WorkloadGroupsClient with the specified values. +// - subscriptionID - The subscription ID that identifies an Azure subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewWorkloadGroupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkloadGroupsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &WorkloadGroupsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates or updates a workload group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database. +// - workloadGroupName - The name of the workload group. +// - parameters - The requested workload group state. +// - options - WorkloadGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the WorkloadGroupsClient.BeginCreateOrUpdate +// method. +func (client *WorkloadGroupsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, workloadGroupName string, parameters WorkloadGroup, options *WorkloadGroupsClientBeginCreateOrUpdateOptions) (*runtime.Poller[WorkloadGroupsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, serverName, databaseName, workloadGroupName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WorkloadGroupsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WorkloadGroupsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates or updates a workload group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +func (client *WorkloadGroupsClient) createOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, workloadGroupName string, parameters WorkloadGroup, options *WorkloadGroupsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "WorkloadGroupsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serverName, databaseName, workloadGroupName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *WorkloadGroupsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, workloadGroupName string, parameters WorkloadGroup, options *WorkloadGroupsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/workloadGroups/{workloadGroupName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if workloadGroupName == "" { + return nil, errors.New("parameter workloadGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workloadGroupName}", url.PathEscape(workloadGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes a workload group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database. +// - workloadGroupName - The name of the workload group to delete. +// - options - WorkloadGroupsClientBeginDeleteOptions contains the optional parameters for the WorkloadGroupsClient.BeginDelete +// method. +func (client *WorkloadGroupsClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, databaseName string, workloadGroupName string, options *WorkloadGroupsClientBeginDeleteOptions) (*runtime.Poller[WorkloadGroupsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, serverName, databaseName, workloadGroupName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WorkloadGroupsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WorkloadGroupsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes a workload group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +func (client *WorkloadGroupsClient) deleteOperation(ctx context.Context, resourceGroupName string, serverName string, databaseName string, workloadGroupName string, options *WorkloadGroupsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "WorkloadGroupsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serverName, databaseName, workloadGroupName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *WorkloadGroupsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, workloadGroupName string, options *WorkloadGroupsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/workloadGroups/{workloadGroupName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if workloadGroupName == "" { + return nil, errors.New("parameter workloadGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workloadGroupName}", url.PathEscape(workloadGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + return req, nil +} + +// Get - Gets a workload group +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database. +// - workloadGroupName - The name of the workload group. +// - options - WorkloadGroupsClientGetOptions contains the optional parameters for the WorkloadGroupsClient.Get method. +func (client *WorkloadGroupsClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, workloadGroupName string, options *WorkloadGroupsClientGetOptions) (WorkloadGroupsClientGetResponse, error) { + var err error + const operationName = "WorkloadGroupsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serverName, databaseName, workloadGroupName, options) + if err != nil { + return WorkloadGroupsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkloadGroupsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkloadGroupsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *WorkloadGroupsClient) getCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, workloadGroupName string, options *WorkloadGroupsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/workloadGroups/{workloadGroupName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if workloadGroupName == "" { + return nil, errors.New("parameter workloadGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workloadGroupName}", url.PathEscape(workloadGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *WorkloadGroupsClient) getHandleResponse(resp *http.Response) (WorkloadGroupsClientGetResponse, error) { + result := WorkloadGroupsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.WorkloadGroup); err != nil { + return WorkloadGroupsClientGetResponse{}, err + } + return result, nil +} + +// NewListByDatabasePager - Gets the list of workload groups +// +// Generated from API version 2020-11-01-preview +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serverName - The name of the server. +// - databaseName - The name of the database. +// - options - WorkloadGroupsClientListByDatabaseOptions contains the optional parameters for the WorkloadGroupsClient.NewListByDatabasePager +// method. +func (client *WorkloadGroupsClient) NewListByDatabasePager(resourceGroupName string, serverName string, databaseName string, options *WorkloadGroupsClientListByDatabaseOptions) *runtime.Pager[WorkloadGroupsClientListByDatabaseResponse] { + return runtime.NewPager(runtime.PagingHandler[WorkloadGroupsClientListByDatabaseResponse]{ + More: func(page WorkloadGroupsClientListByDatabaseResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WorkloadGroupsClientListByDatabaseResponse) (WorkloadGroupsClientListByDatabaseResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WorkloadGroupsClient.NewListByDatabasePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByDatabaseCreateRequest(ctx, resourceGroupName, serverName, databaseName, options) + }, nil) + if err != nil { + return WorkloadGroupsClientListByDatabaseResponse{}, err + } + return client.listByDatabaseHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByDatabaseCreateRequest creates the ListByDatabase request. +func (client *WorkloadGroupsClient) listByDatabaseCreateRequest(ctx context.Context, resourceGroupName string, serverName string, databaseName string, options *WorkloadGroupsClientListByDatabaseOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/workloadGroups" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-11-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByDatabaseHandleResponse handles the ListByDatabase response. +func (client *WorkloadGroupsClient) listByDatabaseHandleResponse(resp *http.Response) (WorkloadGroupsClientListByDatabaseResponse, error) { + result := WorkloadGroupsClientListByDatabaseResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.WorkloadGroupListResult); err != nil { + return WorkloadGroupsClientListByDatabaseResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Masterminds/semver/v3/version.go b/vendor/github.com/Masterminds/semver/v3/version.go index ff499fb66..304edc342 100644 --- a/vendor/github.com/Masterminds/semver/v3/version.go +++ b/vendor/github.com/Masterminds/semver/v3/version.go @@ -39,9 +39,11 @@ var ( ) // semVerRegex is the regular expression used to parse a semantic version. -const semVerRegex string = `v?([0-9]+)(\.[0-9]+)?(\.[0-9]+)?` + - `(-([0-9A-Za-z\-]+(\.[0-9A-Za-z\-]+)*))?` + - `(\+([0-9A-Za-z\-]+(\.[0-9A-Za-z\-]+)*))?` +// This is not the official regex from the semver spec. It has been modified to allow for loose handling +// where versions like 2.1 are detected. +const semVerRegex string = `v?(0|[1-9]\d*)(?:\.(0|[1-9]\d*))?(?:\.(0|[1-9]\d*))?` + + `(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?` + + `(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?` // Version represents a single semantic version. type Version struct { @@ -146,8 +148,8 @@ func NewVersion(v string) (*Version, error) { } sv := &Version{ - metadata: m[8], - pre: m[5], + metadata: m[5], + pre: m[4], original: v, } @@ -158,7 +160,7 @@ func NewVersion(v string) (*Version, error) { } if m[2] != "" { - sv.minor, err = strconv.ParseUint(strings.TrimPrefix(m[2], "."), 10, 64) + sv.minor, err = strconv.ParseUint(m[2], 10, 64) if err != nil { return nil, fmt.Errorf("Error parsing version segment: %s", err) } @@ -167,7 +169,7 @@ func NewVersion(v string) (*Version, error) { } if m[3] != "" { - sv.patch, err = strconv.ParseUint(strings.TrimPrefix(m[3], "."), 10, 64) + sv.patch, err = strconv.ParseUint(m[3], 10, 64) if err != nil { return nil, fmt.Errorf("Error parsing version segment: %s", err) } @@ -612,7 +614,9 @@ func containsOnly(s string, comp string) bool { func validatePrerelease(p string) error { eparts := strings.Split(p, ".") for _, p := range eparts { - if containsOnly(p, num) { + if p == "" { + return ErrInvalidMetadata + } else if containsOnly(p, num) { if len(p) > 1 && p[0] == '0' { return ErrSegmentStartsZero } @@ -631,7 +635,9 @@ func validatePrerelease(p string) error { func validateMetadata(m string) error { eparts := strings.Split(m, ".") for _, p := range eparts { - if !containsOnly(p, allowed) { + if p == "" { + return ErrInvalidMetadata + } else if !containsOnly(p, allowed) { return ErrInvalidMetadata } } diff --git a/vendor/github.com/fatih/color/README.md b/vendor/github.com/fatih/color/README.md index be82827ca..d135bfe02 100644 --- a/vendor/github.com/fatih/color/README.md +++ b/vendor/github.com/fatih/color/README.md @@ -9,7 +9,7 @@ suits you. ## Install -```bash +``` go get github.com/fatih/color ``` @@ -30,6 +30,18 @@ color.Magenta("And many others ..") ``` +### RGB colors + +If your terminal supports 24-bit colors, you can use RGB color codes. + +```go +color.RGB(255, 128, 0).Println("foreground orange") +color.RGB(230, 42, 42).Println("foreground red") + +color.BgRGB(255, 128, 0).Println("background orange") +color.BgRGB(230, 42, 42).Println("background red") +``` + ### Mix and reuse colors ```go @@ -49,6 +61,11 @@ boldRed.Println("This will print text in bold red.") whiteBackground := red.Add(color.BgWhite) whiteBackground.Println("Red text with white background.") + +// Mix with RGB color codes +color.RGB(255, 128, 0).AddBgRGB(0, 0, 0).Println("orange with black background") + +color.BgRGB(255, 128, 0).AddRGB(255, 255, 255).Println("orange background with white foreground") ``` ### Use your own output (io.Writer) @@ -161,10 +178,6 @@ c.Println("This prints again cyan...") To output color in GitHub Actions (or other CI systems that support ANSI colors), make sure to set `color.NoColor = false` so that it bypasses the check for non-tty output streams. -## Todo - -* Save/Return previous values -* Evaluate fmt.Formatter interface ## Credits diff --git a/vendor/github.com/fatih/color/color.go b/vendor/github.com/fatih/color/color.go index 81094e87c..ee39b408e 100644 --- a/vendor/github.com/fatih/color/color.go +++ b/vendor/github.com/fatih/color/color.go @@ -98,6 +98,9 @@ const ( FgMagenta FgCyan FgWhite + + // used internally for 256 and 24-bit coloring + foreground ) // Foreground Hi-Intensity text colors @@ -122,6 +125,9 @@ const ( BgMagenta BgCyan BgWhite + + // used internally for 256 and 24-bit coloring + background ) // Background Hi-Intensity text colors @@ -150,6 +156,30 @@ func New(value ...Attribute) *Color { return c } +// RGB returns a new foreground color in 24-bit RGB. +func RGB(r, g, b int) *Color { + return New(foreground, 2, Attribute(r), Attribute(g), Attribute(b)) +} + +// BgRGB returns a new background color in 24-bit RGB. +func BgRGB(r, g, b int) *Color { + return New(background, 2, Attribute(r), Attribute(g), Attribute(b)) +} + +// AddRGB is used to chain foreground RGB SGR parameters. Use as many as parameters to combine +// and create custom color objects. Example: .Add(34, 0, 12).Add(255, 128, 0). +func (c *Color) AddRGB(r, g, b int) *Color { + c.params = append(c.params, foreground, 2, Attribute(r), Attribute(g), Attribute(b)) + return c +} + +// AddRGB is used to chain background RGB SGR parameters. Use as many as parameters to combine +// and create custom color objects. Example: .Add(34, 0, 12).Add(255, 128, 0). +func (c *Color) AddBgRGB(r, g, b int) *Color { + c.params = append(c.params, background, 2, Attribute(r), Attribute(g), Attribute(b)) + return c +} + // Set sets the given parameters immediately. It will change the color of // output with the given SGR parameters until color.Unset() is called. func Set(p ...Attribute) *Color { @@ -401,7 +431,7 @@ func (c *Color) format() string { func (c *Color) unformat() string { //return fmt.Sprintf("%s[%dm", escape, Reset) - //for each element in sequence let's use the speficic reset escape, ou the generic one if not found + //for each element in sequence let's use the specific reset escape, or the generic one if not found format := make([]string, len(c.params)) for i, v := range c.params { format[i] = strconv.Itoa(int(Reset)) diff --git a/vendor/github.com/google/go-cmp/cmp/internal/function/func.go b/vendor/github.com/google/go-cmp/cmp/internal/function/func.go index d127d4362..def01a6be 100644 --- a/vendor/github.com/google/go-cmp/cmp/internal/function/func.go +++ b/vendor/github.com/google/go-cmp/cmp/internal/function/func.go @@ -19,6 +19,7 @@ const ( tbFunc // func(T) bool ttbFunc // func(T, T) bool + ttiFunc // func(T, T) int trbFunc // func(T, R) bool tibFunc // func(T, I) bool trFunc // func(T) R @@ -28,11 +29,13 @@ const ( Transformer = trFunc // func(T) R ValueFilter = ttbFunc // func(T, T) bool Less = ttbFunc // func(T, T) bool + Compare = ttiFunc // func(T, T) int ValuePredicate = tbFunc // func(T) bool KeyValuePredicate = trbFunc // func(T, R) bool ) var boolType = reflect.TypeOf(true) +var intType = reflect.TypeOf(0) // IsType reports whether the reflect.Type is of the specified function type. func IsType(t reflect.Type, ft funcType) bool { @@ -49,6 +52,10 @@ func IsType(t reflect.Type, ft funcType) bool { if ni == 2 && no == 1 && t.In(0) == t.In(1) && t.Out(0) == boolType { return true } + case ttiFunc: // func(T, T) int + if ni == 2 && no == 1 && t.In(0) == t.In(1) && t.Out(0) == intType { + return true + } case trbFunc: // func(T, R) bool if ni == 2 && no == 1 && t.Out(0) == boolType { return true diff --git a/vendor/github.com/google/go-cmp/cmp/options.go b/vendor/github.com/google/go-cmp/cmp/options.go index 754496f3b..ba3fce81f 100644 --- a/vendor/github.com/google/go-cmp/cmp/options.go +++ b/vendor/github.com/google/go-cmp/cmp/options.go @@ -232,7 +232,15 @@ func (validator) apply(s *state, vx, vy reflect.Value) { if t := s.curPath.Index(-2).Type(); t.Name() != "" { // Named type with unexported fields. name = fmt.Sprintf("%q.%v", t.PkgPath(), t.Name()) // e.g., "path/to/package".MyType - if _, ok := reflect.New(t).Interface().(error); ok { + isProtoMessage := func(t reflect.Type) bool { + m, ok := reflect.PointerTo(t).MethodByName("ProtoReflect") + return ok && m.Type.NumIn() == 1 && m.Type.NumOut() == 1 && + m.Type.Out(0).PkgPath() == "google.golang.org/protobuf/reflect/protoreflect" && + m.Type.Out(0).Name() == "Message" + } + if isProtoMessage(t) { + help = `consider using "google.golang.org/protobuf/testing/protocmp".Transform to compare proto.Message types` + } else if _, ok := reflect.New(t).Interface().(error); ok { help = "consider using cmpopts.EquateErrors to compare error values" } else if t.Comparable() { help = "consider using cmpopts.EquateComparable to compare comparable Go types" diff --git a/vendor/github.com/hashicorp/hc-install/catalog-info.yaml b/vendor/github.com/hashicorp/hc-install/catalog-info.yaml new file mode 100644 index 000000000..be5c06e9d --- /dev/null +++ b/vendor/github.com/hashicorp/hc-install/catalog-info.yaml @@ -0,0 +1,17 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 +# +# Intended for internal HashiCorp use only +apiVersion: backstage.io/v1alpha1 +kind: Component +metadata: + name: hc-install + description: Go module for downloading or locating HashiCorp binaries + annotations: + github.com/project-slug: hashicorp/hc-install + jira/project-key: TF + jira/label: hc-install +spec: + type: library + owner: terraform-core + lifecycle: production diff --git a/vendor/github.com/hashicorp/hcl/v2/hclsyntax/expression.go b/vendor/github.com/hashicorp/hcl/v2/hclsyntax/expression.go index 577a50fa3..f4c3a6d79 100644 --- a/vendor/github.com/hashicorp/hcl/v2/hclsyntax/expression.go +++ b/vendor/github.com/hashicorp/hcl/v2/hclsyntax/expression.go @@ -788,21 +788,24 @@ func (e *ConditionalExpr) Value(ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostic }) return cty.UnknownVal(resultType), diags } - if !condResult.IsKnown() { - // we use the unmarked values throughout the unknown branch - _, condResultMarks := condResult.Unmark() - trueResult, trueResultMarks := trueResult.Unmark() - falseResult, falseResultMarks := falseResult.Unmark() - // use a value to merge marks - _, resMarks := cty.DynamicVal.WithMarks(condResultMarks, trueResultMarks, falseResultMarks).Unmark() + // Now that we have all three values, collect all the marks for the result. + // Since it's possible that a condition value could be unknown, and the + // consumer needs to deal with any marks from either branch anyway, we must + // always combine them for consistent results. + condResult, condResultMarks := condResult.Unmark() + trueResult, trueResultMarks := trueResult.Unmark() + falseResult, falseResultMarks := falseResult.Unmark() + var resMarks []cty.ValueMarks + resMarks = append(resMarks, condResultMarks, trueResultMarks, falseResultMarks) + if !condResult.IsKnown() { trueRange := trueResult.Range() falseRange := falseResult.Range() // if both branches are known to be null, then the result must still be null if trueResult.IsNull() && falseResult.IsNull() { - return cty.NullVal(resultType).WithMarks(resMarks), diags + return cty.NullVal(resultType).WithMarks(resMarks...), diags } // We might be able to offer a refined range for the result based on @@ -841,7 +844,7 @@ func (e *ConditionalExpr) Value(ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostic ref = ref.NumberRangeUpperBound(hi, hiInc) } - return ref.NewValue().WithMarks(resMarks), diags + return ref.NewValue().WithMarks(resMarks...), diags } if trueResult.Type().IsCollectionType() && falseResult.Type().IsCollectionType() { @@ -867,7 +870,7 @@ func (e *ConditionalExpr) Value(ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostic } ref = ref.CollectionLengthLowerBound(lo).CollectionLengthUpperBound(hi) - return ref.NewValue().WithMarks(resMarks), diags + return ref.NewValue().WithMarks(resMarks...), diags } } @@ -875,7 +878,7 @@ func (e *ConditionalExpr) Value(ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostic if trueRange.DefinitelyNotNull() && falseRange.DefinitelyNotNull() { ret = ret.RefineNotNull() } - return ret.WithMarks(resMarks), diags + return ret.WithMarks(resMarks...), diags } condResult, err := convert.Convert(condResult, cty.Bool) @@ -892,8 +895,6 @@ func (e *ConditionalExpr) Value(ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostic return cty.UnknownVal(resultType), diags } - // Unmark result before testing for truthiness - condResult, _ = condResult.UnmarkDeep() if condResult.True() { diags = append(diags, trueDiags...) if convs[0] != nil { @@ -916,7 +917,7 @@ func (e *ConditionalExpr) Value(ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostic trueResult = cty.UnknownVal(resultType) } } - return trueResult, diags + return trueResult.WithMarks(resMarks...), diags } else { diags = append(diags, falseDiags...) if convs[1] != nil { @@ -939,7 +940,7 @@ func (e *ConditionalExpr) Value(ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostic falseResult = cty.UnknownVal(resultType) } } - return falseResult, diags + return falseResult.WithMarks(resMarks...), diags } } @@ -1429,9 +1430,9 @@ func (e *ForExpr) Value(ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostics) { }) return cty.DynamicVal, diags } - if !collVal.IsKnown() { - return cty.DynamicVal, diags - } + + // Grab the CondExpr marks when we're returning early with an unknown + var condMarks cty.ValueMarks // Before we start we'll do an early check to see if any CondExpr we've // been given is of the wrong type. This isn't 100% reliable (it may @@ -1459,6 +1460,9 @@ func (e *ForExpr) Value(ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostics) { }) return cty.DynamicVal, diags } + + _, condMarks = result.Unmark() + _, err := convert.Convert(result, cty.Bool) if err != nil { diags = append(diags, &hcl.Diagnostic{ @@ -1477,6 +1481,10 @@ func (e *ForExpr) Value(ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostics) { } } + if !collVal.IsKnown() { + return cty.DynamicVal.WithMarks(append(marks, condMarks)...), diags + } + if e.KeyExpr != nil { // Producing an object var vals map[string]cty.Value @@ -1517,6 +1525,12 @@ func (e *ForExpr) Value(ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostics) { known = false continue } + + // Extract and merge marks from the include expression into the + // main set of marks + _, includeMarks := includeRaw.Unmark() + marks = append(marks, includeMarks) + include, err := convert.Convert(includeRaw, cty.Bool) if err != nil { if known { @@ -1540,7 +1554,7 @@ func (e *ForExpr) Value(ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostics) { // Extract and merge marks from the include expression into the // main set of marks - includeUnmarked, includeMarks := include.Unmark() + includeUnmarked, _ := include.Unmark() marks = append(marks, includeMarks) if includeUnmarked.False() { // Skip this element @@ -1565,6 +1579,10 @@ func (e *ForExpr) Value(ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostics) { known = false continue } + + _, keyMarks := keyRaw.Unmark() + marks = append(marks, keyMarks) + if !keyRaw.IsKnown() { known = false continue @@ -1587,8 +1605,7 @@ func (e *ForExpr) Value(ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostics) { continue } - key, keyMarks := key.Unmark() - marks = append(marks, keyMarks) + key, _ = key.Unmark() val, valDiags := e.ValExpr.Value(childCtx) diags = append(diags, valDiags...) @@ -1618,7 +1635,7 @@ func (e *ForExpr) Value(ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostics) { } if !known { - return cty.DynamicVal, diags + return cty.DynamicVal.WithMarks(marks...), diags } if e.Group { @@ -1664,6 +1681,12 @@ func (e *ForExpr) Value(ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostics) { known = false continue } + + // Extract and merge marks from the include expression into the + // main set of marks + _, includeMarks := includeRaw.Unmark() + marks = append(marks, includeMarks) + if !includeRaw.IsKnown() { // We will eventually return DynamicVal, but we'll continue // iterating in case there are other diagnostics to gather @@ -1689,10 +1712,7 @@ func (e *ForExpr) Value(ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostics) { continue } - // Extract and merge marks from the include expression into the - // main set of marks - includeUnmarked, includeMarks := include.Unmark() - marks = append(marks, includeMarks) + includeUnmarked, _ := include.Unmark() if includeUnmarked.False() { // Skip this element continue @@ -1705,7 +1725,7 @@ func (e *ForExpr) Value(ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostics) { } if !known { - return cty.DynamicVal, diags + return cty.DynamicVal.WithMarks(marks...), diags } return cty.TupleVal(vals).WithMarks(marks...), diags diff --git a/vendor/github.com/hashicorp/hcl/v2/ops.go b/vendor/github.com/hashicorp/hcl/v2/ops.go index bdf23614d..3cd7b205e 100644 --- a/vendor/github.com/hashicorp/hcl/v2/ops.go +++ b/vendor/github.com/hashicorp/hcl/v2/ops.go @@ -49,7 +49,7 @@ func Index(collection, key cty.Value, srcRange *Range) (cty.Value, Diagnostics) ty := collection.Type() kty := key.Type() if kty == cty.DynamicPseudoType || ty == cty.DynamicPseudoType { - return cty.DynamicVal, nil + return cty.DynamicVal.WithSameMarks(collection), nil } switch { @@ -87,9 +87,9 @@ func Index(collection, key cty.Value, srcRange *Range) (cty.Value, Diagnostics) has, _ := collection.HasIndex(key).Unmark() if !has.IsKnown() { if ty.IsTupleType() { - return cty.DynamicVal, nil + return cty.DynamicVal.WithSameMarks(collection), nil } else { - return cty.UnknownVal(ty.ElementType()), nil + return cty.UnknownVal(ty.ElementType()).WithSameMarks(collection), nil } } if has.False() { @@ -196,10 +196,10 @@ func Index(collection, key cty.Value, srcRange *Range) (cty.Value, Diagnostics) } } if !collection.IsKnown() { - return cty.DynamicVal, nil + return cty.DynamicVal.WithSameMarks(collection), nil } if !key.IsKnown() { - return cty.DynamicVal, nil + return cty.DynamicVal.WithSameMarks(collection), nil } key, _ = key.Unmark() @@ -291,13 +291,13 @@ func GetAttr(obj cty.Value, attrName string, srcRange *Range) (cty.Value, Diagno } if !obj.IsKnown() { - return cty.UnknownVal(ty.AttributeType(attrName)), nil + return cty.UnknownVal(ty.AttributeType(attrName)).WithSameMarks(obj), nil } return obj.GetAttr(attrName), nil case ty.IsMapType(): if !obj.IsKnown() { - return cty.UnknownVal(ty.ElementType()), nil + return cty.UnknownVal(ty.ElementType()).WithSameMarks(obj), nil } idx := cty.StringVal(attrName) @@ -319,7 +319,7 @@ func GetAttr(obj cty.Value, attrName string, srcRange *Range) (cty.Value, Diagno return obj.Index(idx), nil case ty == cty.DynamicPseudoType: - return cty.DynamicVal, nil + return cty.DynamicVal.WithSameMarks(obj), nil case ty.IsListType() && ty.ElementType().IsObjectType(): // It seems a common mistake to try to access attributes on a whole // list of objects rather than on a specific individual element, so diff --git a/vendor/github.com/hashicorp/hcl/v2/spec.md b/vendor/github.com/hashicorp/hcl/v2/spec.md index 97ef61318..d52ed70bb 100644 --- a/vendor/github.com/hashicorp/hcl/v2/spec.md +++ b/vendor/github.com/hashicorp/hcl/v2/spec.md @@ -96,7 +96,7 @@ of the implementation language. ### _Dynamic Attributes_ Processing The _schema-driven_ processing model is useful when the expected structure -of a body is known a priori by the calling application. Some blocks are +of a body is known by the calling application. Some blocks are instead more free-form, such as a user-provided set of arbitrary key/value pairs. diff --git a/vendor/github.com/hashicorp/terraform-exec/internal/version/version.go b/vendor/github.com/hashicorp/terraform-exec/internal/version/version.go index 235d56126..bcb308e01 100644 --- a/vendor/github.com/hashicorp/terraform-exec/internal/version/version.go +++ b/vendor/github.com/hashicorp/terraform-exec/internal/version/version.go @@ -3,7 +3,7 @@ package version -const version = "0.21.0" +const version = "0.22.0" // ModuleVersion returns the current version of the github.com/hashicorp/terraform-exec Go module. // This is a function to allow for future possible enhancement using debug.BuildInfo. diff --git a/vendor/github.com/hashicorp/terraform-exec/tfexec/init.go b/vendor/github.com/hashicorp/terraform-exec/tfexec/init.go index c292fdc0f..ac5eea550 100644 --- a/vendor/github.com/hashicorp/terraform-exec/tfexec/init.go +++ b/vendor/github.com/hashicorp/terraform-exec/tfexec/init.go @@ -6,6 +6,7 @@ package tfexec import ( "context" "fmt" + "io" "os/exec" ) @@ -99,6 +100,21 @@ func (opt *VerifyPluginsOption) configureInit(conf *initConfig) { conf.verifyPlugins = opt.verifyPlugins } +func (tf *Terraform) configureInitOptions(ctx context.Context, c *initConfig, opts ...InitOption) error { + for _, o := range opts { + switch o.(type) { + case *LockOption, *LockTimeoutOption, *VerifyPluginsOption, *GetPluginsOption: + err := tf.compatible(ctx, nil, tf0_15_0) + if err != nil { + return fmt.Errorf("-lock, -lock-timeout, -verify-plugins, and -get-plugins options are no longer available as of Terraform 0.15: %w", err) + } + } + + o.configureInit(c) + } + return nil +} + // Init represents the terraform init subcommand. func (tf *Terraform) Init(ctx context.Context, opts ...InitOption) error { cmd, err := tf.initCmd(ctx, opts...) @@ -108,21 +124,71 @@ func (tf *Terraform) Init(ctx context.Context, opts ...InitOption) error { return tf.runTerraformCmd(ctx, cmd) } +// InitJSON represents the terraform init subcommand with the `-json` flag. +// Using the `-json` flag will result in +// [machine-readable](https://developer.hashicorp.com/terraform/internals/machine-readable-ui) +// JSON being written to the supplied `io.Writer`. +func (tf *Terraform) InitJSON(ctx context.Context, w io.Writer, opts ...InitOption) error { + err := tf.compatible(ctx, tf1_9_0, nil) + if err != nil { + return fmt.Errorf("terraform init -json was added in 1.9.0: %w", err) + } + + tf.SetStdout(w) + + cmd, err := tf.initJSONCmd(ctx, opts...) + if err != nil { + return err + } + + return tf.runTerraformCmd(ctx, cmd) +} + func (tf *Terraform) initCmd(ctx context.Context, opts ...InitOption) (*exec.Cmd, error) { c := defaultInitOptions - for _, o := range opts { - switch o.(type) { - case *LockOption, *LockTimeoutOption, *VerifyPluginsOption, *GetPluginsOption: - err := tf.compatible(ctx, nil, tf0_15_0) - if err != nil { - return nil, fmt.Errorf("-lock, -lock-timeout, -verify-plugins, and -get-plugins options are no longer available as of Terraform 0.15: %w", err) - } - } + err := tf.configureInitOptions(ctx, &c, opts...) + if err != nil { + return nil, err + } + + args, err := tf.buildInitArgs(ctx, c) + if err != nil { + return nil, err + } + + // Optional positional argument; must be last as flags precede positional arguments. + if c.dir != "" { + args = append(args, c.dir) + } + + return tf.buildInitCmd(ctx, c, args) +} + +func (tf *Terraform) initJSONCmd(ctx context.Context, opts ...InitOption) (*exec.Cmd, error) { + c := defaultInitOptions + + err := tf.configureInitOptions(ctx, &c, opts...) + if err != nil { + return nil, err + } - o.configureInit(&c) + args, err := tf.buildInitArgs(ctx, c) + if err != nil { + return nil, err + } + + args = append(args, "-json") + + // Optional positional argument; must be last as flags precede positional arguments. + if c.dir != "" { + args = append(args, c.dir) } + return tf.buildInitCmd(ctx, c, args) +} + +func (tf *Terraform) buildInitArgs(ctx context.Context, c initConfig) ([]string, error) { args := []string{"init", "-no-color", "-input=false"} // string opts: only pass if set @@ -172,11 +238,10 @@ func (tf *Terraform) initCmd(ctx context.Context, opts ...InitOption) (*exec.Cmd } } - // optional positional argument - if c.dir != "" { - args = append(args, c.dir) - } + return args, nil +} +func (tf *Terraform) buildInitCmd(ctx context.Context, c initConfig, args []string) (*exec.Cmd, error) { mergeEnv := map[string]string{} if c.reattachInfo != nil { reattachStr, err := c.reattachInfo.marshalString() diff --git a/vendor/github.com/hashicorp/terraform-json/CONTRIBUTING.md b/vendor/github.com/hashicorp/terraform-json/CONTRIBUTING.md new file mode 100644 index 000000000..07b5fd5c8 --- /dev/null +++ b/vendor/github.com/hashicorp/terraform-json/CONTRIBUTING.md @@ -0,0 +1,22 @@ +# Contributing to terraform-json + +## Versioning + +The `github.com/hashicorp/terraform-json` Go module in its entirety is versioned according to [Go module versioning](https://golang.org/ref/mod#versions) with Git tags. + +There is currently no firm plan for releasing v1. + +## Releases + +Releases are made on a reasonably regular basis by the Terraform team, using our custom CI workflows. There is currently no set release schedule and no requirement for _contributors_ to write changelog entries. + +The following notes are only relevant to maintainers. + +[Create new release](https://github.com/hashicorp/terraform-json/releases/new) via GitHub UI to point to the new tag and use GitHub to generate the changelog (`Generate release notes` button). + +You can format the generated changelog before publishing - e.g. ensure entries are grouped into categories such as `ENHANCEMENTS`, `BUG FIXES` and `INTERNAL`. + +## Security vulnerabilities + +Please disclose security vulnerabilities by following the procedure +described at https://www.hashicorp.com/security#vulnerability-reporting. diff --git a/vendor/github.com/hashicorp/terraform-json/action.go b/vendor/github.com/hashicorp/terraform-json/action.go index c74f7e68a..9dcab8569 100644 --- a/vendor/github.com/hashicorp/terraform-json/action.go +++ b/vendor/github.com/hashicorp/terraform-json/action.go @@ -26,6 +26,9 @@ const ( // ActionDelete denotes a delete operation. ActionDelete Action = "delete" + + // ActionForget denotes a forget operation. + ActionForget Action = "forget" ) // Actions denotes a valid change type. @@ -105,3 +108,12 @@ func (a Actions) CreateBeforeDestroy() bool { func (a Actions) Replace() bool { return a.DestroyBeforeCreate() || a.CreateBeforeDestroy() } + +// Forget is true if this set of Actions denotes a forget operation. +func (a Actions) Forget() bool { + if len(a) != 1 { + return false + } + + return a[0] == ActionForget +} diff --git a/vendor/github.com/hashicorp/terraform-json/catalog-info.yaml b/vendor/github.com/hashicorp/terraform-json/catalog-info.yaml new file mode 100644 index 000000000..984285471 --- /dev/null +++ b/vendor/github.com/hashicorp/terraform-json/catalog-info.yaml @@ -0,0 +1,17 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 +# +# Intended for internal HashiCorp use only +apiVersion: backstage.io/v1alpha1 +kind: Component +metadata: + name: terraform-json + description: Helper types for the Terraform external data representation + annotations: + github.com/project-slug: hashicorp/terraform-json + jira/project-key: TF + jira/label: terraform-json +spec: + type: library + owner: terraform-core + lifecycle: production diff --git a/vendor/github.com/hashicorp/terraform-json/schemas.go b/vendor/github.com/hashicorp/terraform-json/schemas.go index a2918ef48..13d0d3856 100644 --- a/vendor/github.com/hashicorp/terraform-json/schemas.go +++ b/vendor/github.com/hashicorp/terraform-json/schemas.go @@ -87,6 +87,9 @@ type ProviderSchema struct { // The schemas for any data sources in this provider. DataSourceSchemas map[string]*Schema `json:"data_source_schemas,omitempty"` + // The schemas for any ephemeral resources in this provider. + EphemeralResourceSchemas map[string]*Schema `json:"ephemeral_resource_schemas,omitempty"` + // The definitions for any functions in this provider. Functions map[string]*FunctionSignature `json:"functions,omitempty"` } @@ -227,6 +230,10 @@ type SchemaAttribute struct { // in logs. Future versions of Terraform may encrypt or otherwise // treat these values with greater care than non-sensitive fields. Sensitive bool `json:"sensitive,omitempty"` + + // If true, this attribute is write only and its value will not be + // persisted in artifacts such as plan files or state. + WriteOnly bool `json:"write_only,omitempty"` } // jsonSchemaAttribute describes an attribute within a schema block @@ -246,6 +253,7 @@ type jsonSchemaAttribute struct { Optional bool `json:"optional,omitempty"` Computed bool `json:"computed,omitempty"` Sensitive bool `json:"sensitive,omitempty"` + WriteOnly bool `json:"write_only,omitempty"` } func (as *SchemaAttribute) MarshalJSON() ([]byte, error) { @@ -258,6 +266,7 @@ func (as *SchemaAttribute) MarshalJSON() ([]byte, error) { Optional: as.Optional, Computed: as.Computed, Sensitive: as.Sensitive, + WriteOnly: as.WriteOnly, } if as.AttributeType != cty.NilType { attrTy, _ := as.AttributeType.MarshalJSON() diff --git a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/client_capabilities.go b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/client_capabilities.go index ba01cd8b8..8a177724b 100644 --- a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/client_capabilities.go +++ b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/client_capabilities.go @@ -3,6 +3,15 @@ package tfprotov5 +// ValidateResourceTypeConfigClientCapabilities allows Terraform to publish information +// regarding optionally supported protocol features for the ValidateResourceTypeConfig RPC, +// such as forward-compatible Terraform behavior changes. +type ValidateResourceTypeConfigClientCapabilities struct { + // WriteOnlyAttributesAllowed signals that the client is able to + // handle write_only attributes for managed resources. + WriteOnlyAttributesAllowed bool +} + // ConfigureProviderClientCapabilities allows Terraform to publish information // regarding optionally supported protocol features for the ConfigureProvider RPC, // such as forward-compatible Terraform behavior changes. @@ -47,3 +56,12 @@ type ImportResourceStateClientCapabilities struct { // handle deferred responses from the provider. DeferralAllowed bool } + +// OpenEphemeralResourceClientCapabilities allows Terraform to publish information +// regarding optionally supported protocol features for the OpenEphemeralResource RPC, +// such as forward-compatible Terraform behavior changes. +type OpenEphemeralResourceClientCapabilities struct { + // DeferralAllowed signals that the request from Terraform is able to + // handle deferred responses from the provider. + DeferralAllowed bool +} diff --git a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/ephemeral_resource.go b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/ephemeral_resource.go new file mode 100644 index 000000000..1794f91b4 --- /dev/null +++ b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/ephemeral_resource.go @@ -0,0 +1,185 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package tfprotov5 + +import ( + "context" + "time" +) + +// EphemeralResourceMetadata describes metadata for an ephemeral resource in the GetMetadata +// RPC. +type EphemeralResourceMetadata struct { + // TypeName is the name of the ephemeral resource. + TypeName string +} + +// EphemeralResourceServer is an interface containing the methods an ephemeral resource +// implementation needs to fill. +type EphemeralResourceServer interface { + // ValidateEphemeralResourceConfig is called when Terraform is checking that an + // ephemeral resource configuration is valid. It is guaranteed to have types + // conforming to your schema, but it is not guaranteed that all values + // will be known. This is your opportunity to do custom or advanced + // validation prior to an ephemeral resource being opened. + ValidateEphemeralResourceConfig(context.Context, *ValidateEphemeralResourceConfigRequest) (*ValidateEphemeralResourceConfigResponse, error) + + // OpenEphemeralResource is called when Terraform wants to open the ephemeral resource, + // usually during planning. If the config for the ephemeral resource contains unknown + // values, Terraform will defer the OpenEphemeralResource call until apply. + OpenEphemeralResource(context.Context, *OpenEphemeralResourceRequest) (*OpenEphemeralResourceResponse, error) + + // RenewEphemeralResource is called when Terraform detects that the previously specified + // RenewAt timestamp has passed. The RenewAt timestamp is supplied either from the + // OpenEphemeralResource call or a previous RenewEphemeralResource call. + RenewEphemeralResource(context.Context, *RenewEphemeralResourceRequest) (*RenewEphemeralResourceResponse, error) + + // CloseEphemeralResource is called when Terraform is closing the ephemeral resource. + CloseEphemeralResource(context.Context, *CloseEphemeralResourceRequest) (*CloseEphemeralResourceResponse, error) +} + +// ValidateEphemeralResourceConfigRequest is the request Terraform sends when it +// wants to validate an ephemeral resource's configuration. +type ValidateEphemeralResourceConfigRequest struct { + // TypeName is the type of resource Terraform is validating. + TypeName string + + // Config is the configuration the user supplied for that ephemeral resource. See + // the documentation on `DynamicValue` for more information about + // safely accessing the configuration. + // + // The configuration is represented as a tftypes.Object, with each + // attribute and nested block getting its own key and value. + // + // This configuration may contain unknown values if a user uses + // interpolation or other functionality that would prevent Terraform + // from knowing the value at request time. Any attributes not directly + // set in the configuration will be null. + Config *DynamicValue +} + +// ValidateEphemeralResourceConfigResponse is the response from the provider about +// the validity of an ephemeral resource's configuration. +type ValidateEphemeralResourceConfigResponse struct { + // Diagnostics report errors or warnings related to the given + // configuration. Returning an empty slice indicates a successful + // validation with no warnings or errors generated. + Diagnostics []*Diagnostic +} + +// OpenEphemeralResourceRequest is the request Terraform sends when it +// wants to open an ephemeral resource. +type OpenEphemeralResourceRequest struct { + // TypeName is the type of resource Terraform is opening. + TypeName string + + // Config is the configuration the user supplied for that ephemeral resource. See + // the documentation on `DynamicValue` for more information about + // safely accessing the configuration. + // + // The configuration is represented as a tftypes.Object, with each + // attribute and nested block getting its own key and value. + // + // This configuration will always be fully known. If Config contains unknown values, + // Terraform will defer the OpenEphemeralResource RPC until apply. + Config *DynamicValue + + // ClientCapabilities defines optionally supported protocol features for the + // OpenEphemeralResource RPC, such as forward-compatible Terraform behavior changes. + ClientCapabilities *OpenEphemeralResourceClientCapabilities +} + +// OpenEphemeralResourceResponse is the response from the provider about the current +// state of the opened ephemeral resource. +type OpenEphemeralResourceResponse struct { + // Result is the provider's understanding of what the ephemeral resource's + // data is after it has been opened, represented as a `DynamicValue`. + // See the documentation for `DynamicValue` for information about + // safely creating the `DynamicValue`. + // + // Any attribute, whether computed or not, that has a known value in + // the Config in the OpenEphemeralResourceRequest must be preserved + // exactly as it was in Result. + // + // Any attribute in the Config in the OpenEphemeralResourceRequest + // that is unknown must take on a known value at this time. No unknown + // values are allowed in the Result. + // + // The result should be represented as a tftypes.Object, with each + // attribute and nested block getting its own key and value. + Result *DynamicValue + + // Diagnostics report errors or warnings related to opening the + // requested ephemeral resource. Returning an empty slice + // indicates a successful creation with no warnings or errors + // generated. + Diagnostics []*Diagnostic + + // Private should be set to any private data that the provider would like to be + // sent to the next Renew or Close call. + Private []byte + + // RenewAt indicates to Terraform that the ephemeral resource + // needs to be renewed at the specified time. Terraform will + // call the RenewEphemeralResource RPC when the specified time has passed. + RenewAt time.Time + + // Deferred is used to indicate to Terraform that the OpenEphemeralResource operation + // needs to be deferred for a reason. + Deferred *Deferred +} + +// RenewEphemeralResourceRequest is the request Terraform sends when it +// wants to renew an ephemeral resource. +type RenewEphemeralResourceRequest struct { + // TypeName is the type of resource Terraform is renewing. + TypeName string + + // Private is any provider-defined private data stored with the + // ephemeral resource from the most recent Open or Renew call. + // + // To ensure private data is preserved, copy any necessary data to + // the RenewEphemeralResourceResponse type Private field. + Private []byte +} + +// RenewEphemeralResourceResponse is the response from the provider after an ephemeral resource +// has been renewed. +type RenewEphemeralResourceResponse struct { + // Diagnostics report errors or warnings related to renewing the + // requested ephemeral resource. Returning an empty slice + // indicates a successful creation with no warnings or errors + // generated. + Diagnostics []*Diagnostic + + // Private should be set to any private data that the provider would like to be + // sent to the next Renew or Close call. + Private []byte + + // RenewAt indicates to Terraform that the ephemeral resource + // needs to be renewed at the specified time. Terraform will + // call the RenewEphemeralResource RPC when the specified time has passed. + RenewAt time.Time +} + +// CloseEphemeralResourceRequest is the request Terraform sends when it +// wants to close an ephemeral resource. +type CloseEphemeralResourceRequest struct { + // TypeName is the type of resource Terraform is closing. + TypeName string + + // Private is any provider-defined private data stored with the + // ephemeral resource from the most recent Open or Renew call. + Private []byte +} + +// CloseEphemeralResourceResponse is the response from the provider about +// the closed ephemeral resource. +type CloseEphemeralResourceResponse struct { + // Diagnostics report errors or warnings related to closing the + // requested ephemeral resource. Returning an empty slice + // indicates a successful creation with no warnings or errors + // generated. + Diagnostics []*Diagnostic +} diff --git a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/provider.go b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/provider.go index 799f90238..19fea3b8f 100644 --- a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/provider.go +++ b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/provider.go @@ -54,6 +54,13 @@ type ProviderServer interface { // terraform-plugin-go, so they are their own interface that is composed // into ProviderServer. FunctionServer + + // EphemeralResourceServer is an interface encapsulating all the ephemeral + // resource-related RPC requests. ProviderServer implementations must + // implement them, but they are a handy interface for defining what an + // ephemeral resource is to terraform-plugin-go, so they're their own + // interface that is composed into ProviderServer. + EphemeralResourceServer } // GetMetadataRequest represents a GetMetadata RPC request. @@ -78,6 +85,9 @@ type GetMetadataResponse struct { // Resources returns metadata for all managed resources. Resources []ResourceMetadata + + // EphemeralResources returns metadata for all ephemeral resources. + EphemeralResources []EphemeralResourceMetadata } // GetProviderSchemaRequest represents a Terraform RPC request for the @@ -124,6 +134,13 @@ type GetProviderSchemaResponse struct { // includes the provider name. Functions map[string]*Function + // EphemeralResourceSchemas is a map of ephemeral resource names to the schema for + // the configuration specified in the ephemeral resource. The name should be an + // ephemeral resource name, and should be prefixed with your provider's + // shortname and an underscore. It should match the first label after + // `ephemeral` in a user's configuration. + EphemeralResourceSchemas map[string]*Schema + // Diagnostics report errors or warnings related to returning the // provider's schemas. Returning an empty slice indicates success, with // no errors or warnings generated. diff --git a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/resource.go b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/resource.go index 251bf135d..df28e0a5d 100644 --- a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/resource.go +++ b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/resource.go @@ -83,6 +83,10 @@ type ValidateResourceTypeConfigRequest struct { // from knowing the value at request time. Any attributes not directly // set in the configuration will be null. Config *DynamicValue + + // ClientCapabilities defines optionally supported protocol features for the + // ValidateResourceTypeConfig RPC, such as forward-compatible Terraform behavior changes. + ClientCapabilities *ValidateResourceTypeConfigClientCapabilities } // ValidateResourceTypeConfigResponse is the response from the provider about diff --git a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/schema.go b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/schema.go index 9b860275f..a91dbd7ca 100644 --- a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/schema.go +++ b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/schema.go @@ -221,6 +221,12 @@ type SchemaAttribute struct { // experiences. Providers should set it when deprecating attributes in // preparation for these tools. Deprecated bool + + // WriteOnly, when set to true, indicates that the attribute value will + // be provided via configuration and must be omitted from plan and state response objects. WriteOnly + // must be combined with Optional or Required, and is only valid for managed + // resource schemas. + WriteOnly bool } // ValueType returns the tftypes.Type for a SchemaAttribute. diff --git a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/logging/logging.go b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/logging/logging.go index ea0764d13..d012245f0 100644 --- a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/logging/logging.go +++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/logging/logging.go @@ -90,7 +90,7 @@ func LogOutput(t testing.T) (logOutput io.Writer, err error) { // SetOutput checks for a log destination with LogOutput, and calls // log.SetOutput with the result. If LogOutput returns nil, SetOutput uses -// io.Discard. Any error from LogOutout is fatal. +// io.Discard. Any error from LogOutput is fatal. func SetOutput(t testing.T) { out, err := LogOutput(t) if err != nil { diff --git a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/core_schema.go b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/core_schema.go index 736af218d..9247adde7 100644 --- a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/core_schema.go +++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/core_schema.go @@ -123,7 +123,7 @@ func (m schemaMap) CoreConfigSchema() *configschema.Block { // whose elem is a whole resource. func (s *Schema) coreConfigSchemaAttribute() *configschema.Attribute { // The Schema.DefaultFunc capability adds some extra weirdness here since - // it can be combined with "Required: true" to create a sitution where + // it can be combined with "Required: true" to create a situation where // required-ness is conditional. Terraform Core doesn't share this concept, // so we must sniff for this possibility here and conditionally turn // off the "Required" flag if it looks like the DefaultFunc is going @@ -167,6 +167,7 @@ func (s *Schema) coreConfigSchemaAttribute() *configschema.Attribute { Description: desc, DescriptionKind: descKind, Deprecated: s.Deprecated != "", + WriteOnly: s.WriteOnly, } } diff --git a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/field_reader_config.go b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/field_reader_config.go index df317c20b..91b7412fc 100644 --- a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/field_reader_config.go +++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/field_reader_config.go @@ -269,7 +269,7 @@ func (r *ConfigFieldReader) readSet( return FieldReadResult{Value: set}, nil } - // If the list is computed, the set is necessarilly computed + // If the list is computed, the set is necessarily computed if raw.Computed { return FieldReadResult{ Value: set, diff --git a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/grpc_provider.go b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/grpc_provider.go index ec5d74301..f94281480 100644 --- a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/grpc_provider.go +++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/grpc_provider.go @@ -84,6 +84,7 @@ func (s *GRPCProviderServer) GetMetadata(ctx context.Context, req *tfprotov5.Get resp := &tfprotov5.GetMetadataResponse{ DataSources: make([]tfprotov5.DataSourceMetadata, 0, len(s.provider.DataSourcesMap)), + EphemeralResources: make([]tfprotov5.EphemeralResourceMetadata, 0), Functions: make([]tfprotov5.FunctionMetadata, 0), Resources: make([]tfprotov5.ResourceMetadata, 0, len(s.provider.ResourcesMap)), ServerCapabilities: s.serverCapabilities(), @@ -110,10 +111,11 @@ func (s *GRPCProviderServer) GetProviderSchema(ctx context.Context, req *tfproto logging.HelperSchemaTrace(ctx, "Getting provider schema") resp := &tfprotov5.GetProviderSchemaResponse{ - DataSourceSchemas: make(map[string]*tfprotov5.Schema, len(s.provider.DataSourcesMap)), - Functions: make(map[string]*tfprotov5.Function, 0), - ResourceSchemas: make(map[string]*tfprotov5.Schema, len(s.provider.ResourcesMap)), - ServerCapabilities: s.serverCapabilities(), + DataSourceSchemas: make(map[string]*tfprotov5.Schema, len(s.provider.DataSourcesMap)), + EphemeralResourceSchemas: make(map[string]*tfprotov5.Schema, 0), + Functions: make(map[string]*tfprotov5.Function, 0), + ResourceSchemas: make(map[string]*tfprotov5.Schema, len(s.provider.ResourcesMap)), + ServerCapabilities: s.serverCapabilities(), } resp.Provider = &tfprotov5.Schema{ @@ -281,6 +283,32 @@ func (s *GRPCProviderServer) ValidateResourceTypeConfig(ctx context.Context, req resp.Diagnostics = convert.AppendProtoDiag(ctx, resp.Diagnostics, err) return resp, nil } + if req.ClientCapabilities == nil || !req.ClientCapabilities.WriteOnlyAttributesAllowed { + resp.Diagnostics = convert.AppendProtoDiag(ctx, resp.Diagnostics, validateWriteOnlyNullValues(configVal, schemaBlock, cty.Path{})) + } + + r := s.provider.ResourcesMap[req.TypeName] + + // Calling all ValidateRawResourceConfigFunc here since they validate on the raw go-cty config value + // and were introduced after the public provider.ValidateResource method. + if r.ValidateRawResourceConfigFuncs != nil { + writeOnlyAllowed := false + + if req.ClientCapabilities != nil { + writeOnlyAllowed = req.ClientCapabilities.WriteOnlyAttributesAllowed + } + + validateReq := ValidateResourceConfigFuncRequest{ + WriteOnlyAttributesAllowed: writeOnlyAllowed, + RawConfig: configVal, + } + + for _, validateFunc := range r.ValidateRawResourceConfigFuncs { + validateResp := &ValidateResourceConfigFuncResponse{} + validateFunc(ctx, validateReq, validateResp) + resp.Diagnostics = convert.AppendProtoDiag(ctx, resp.Diagnostics, validateResp.Diagnostics) + } + } config := terraform.NewResourceConfigShimmed(configVal, schemaBlock) @@ -392,6 +420,9 @@ func (s *GRPCProviderServer) UpgradeResourceState(ctx context.Context, req *tfpr // Normalize the value and fill in any missing blocks. val = objchange.NormalizeObjectFromLegacySDK(val, schemaBlock) + // Set any write-only attribute values to null + val = setWriteOnlyNullValues(val, schemaBlock) + // encode the final state to the expected msgpack format newStateMP, err := msgpack.Marshal(val, schemaBlock.ImpliedType()) if err != nil { @@ -501,7 +532,7 @@ func (s *GRPCProviderServer) upgradeJSONState(ctx context.Context, version int, // Remove any attributes no longer present in the schema, so that the json can // be correctly decoded. func (s *GRPCProviderServer) removeAttributes(ctx context.Context, v interface{}, ty cty.Type) { - // we're only concerned with finding maps that corespond to object + // we're only concerned with finding maps that correspond to object // attributes switch v := v.(type) { case []interface{}: @@ -736,6 +767,7 @@ func (s *GRPCProviderServer) ReadResource(ctx context.Context, req *tfprotov5.Re newStateVal = normalizeNullValues(newStateVal, stateVal, false) newStateVal = copyTimeoutValues(newStateVal, stateVal) + newStateVal = setWriteOnlyNullValues(newStateVal, schemaBlock) newStateMP, err := msgpack.Marshal(newStateVal, schemaBlock.ImpliedType()) if err != nil { @@ -935,6 +967,9 @@ func (s *GRPCProviderServer) PlanResourceChange(ctx context.Context, req *tfprot plannedStateVal = SetUnknowns(plannedStateVal, schemaBlock) } + // Set any write-only attribute values to null + plannedStateVal = setWriteOnlyNullValues(plannedStateVal, schemaBlock) + plannedMP, err := msgpack.Marshal(plannedStateVal, schemaBlock.ImpliedType()) if err != nil { resp.Diagnostics = convert.AppendProtoDiag(ctx, resp.Diagnostics, err) @@ -1182,6 +1217,8 @@ func (s *GRPCProviderServer) ApplyResourceChange(ctx context.Context, req *tfpro newStateVal = copyTimeoutValues(newStateVal, plannedStateVal) + newStateVal = setWriteOnlyNullValues(newStateVal, schemaBlock) + newStateMP, err := msgpack.Marshal(newStateVal, schemaBlock.ImpliedType()) if err != nil { resp.Diagnostics = convert.AppendProtoDiag(ctx, resp.Diagnostics, err) @@ -1303,6 +1340,9 @@ func (s *GRPCProviderServer) ImportResourceState(ctx context.Context, req *tfpro newStateVal = cty.ObjectVal(newStateValueMap) } + // Set any write-only attribute values to null + newStateVal = setWriteOnlyNullValues(newStateVal, schemaBlock) + newStateMP, err := msgpack.Marshal(newStateVal, schemaBlock.ImpliedType()) if err != nil { resp.Diagnostics = convert.AppendProtoDiag(ctx, resp.Diagnostics, err) @@ -1482,6 +1522,78 @@ func (s *GRPCProviderServer) GetFunctions(ctx context.Context, req *tfprotov5.Ge return resp, nil } +func (s *GRPCProviderServer) ValidateEphemeralResourceConfig(ctx context.Context, req *tfprotov5.ValidateEphemeralResourceConfigRequest) (*tfprotov5.ValidateEphemeralResourceConfigResponse, error) { + ctx = logging.InitContext(ctx) + + logging.HelperSchemaTrace(ctx, "Returning error for ephemeral resource validate") + + resp := &tfprotov5.ValidateEphemeralResourceConfigResponse{ + Diagnostics: []*tfprotov5.Diagnostic{ + { + Severity: tfprotov5.DiagnosticSeverityError, + Summary: "Unknown Ephemeral Resource Type", + Detail: fmt.Sprintf("The %q ephemeral resource type is not supported by this provider.", req.TypeName), + }, + }, + } + + return resp, nil +} + +func (s *GRPCProviderServer) OpenEphemeralResource(ctx context.Context, req *tfprotov5.OpenEphemeralResourceRequest) (*tfprotov5.OpenEphemeralResourceResponse, error) { + ctx = logging.InitContext(ctx) + + logging.HelperSchemaTrace(ctx, "Returning error for ephemeral resource open") + + resp := &tfprotov5.OpenEphemeralResourceResponse{ + Diagnostics: []*tfprotov5.Diagnostic{ + { + Severity: tfprotov5.DiagnosticSeverityError, + Summary: "Unknown Ephemeral Resource Type", + Detail: fmt.Sprintf("The %q ephemeral resource type is not supported by this provider.", req.TypeName), + }, + }, + } + + return resp, nil +} + +func (s *GRPCProviderServer) RenewEphemeralResource(ctx context.Context, req *tfprotov5.RenewEphemeralResourceRequest) (*tfprotov5.RenewEphemeralResourceResponse, error) { + ctx = logging.InitContext(ctx) + + logging.HelperSchemaTrace(ctx, "Returning error for ephemeral resource renew") + + resp := &tfprotov5.RenewEphemeralResourceResponse{ + Diagnostics: []*tfprotov5.Diagnostic{ + { + Severity: tfprotov5.DiagnosticSeverityError, + Summary: "Unknown Ephemeral Resource Type", + Detail: fmt.Sprintf("The %q ephemeral resource type is not supported by this provider.", req.TypeName), + }, + }, + } + + return resp, nil +} + +func (s *GRPCProviderServer) CloseEphemeralResource(ctx context.Context, req *tfprotov5.CloseEphemeralResourceRequest) (*tfprotov5.CloseEphemeralResourceResponse, error) { + ctx = logging.InitContext(ctx) + + logging.HelperSchemaTrace(ctx, "Returning error for ephemeral resource close") + + resp := &tfprotov5.CloseEphemeralResourceResponse{ + Diagnostics: []*tfprotov5.Diagnostic{ + { + Severity: tfprotov5.DiagnosticSeverityError, + Summary: "Unknown Ephemeral Resource Type", + Detail: fmt.Sprintf("The %q ephemeral resource type is not supported by this provider.", req.TypeName), + }, + }, + } + + return resp, nil +} + func pathToAttributePath(path cty.Path) *tftypes.AttributePath { var steps []tftypes.AttributePathStep @@ -1593,7 +1705,7 @@ func stripSchema(s *Schema) *Schema { } // Zero values and empty containers may be interchanged by the apply process. -// When there is a discrepency between src and dst value being null or empty, +// When there is a discrepancy between src and dst value being null or empty, // prefer the src value. This takes a little more liberty with set types, since // we can't correlate modified set values. In the case of sets, if the src set // was wholly known we assume the value was correctly applied and copy that diff --git a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/provider.go b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/provider.go index a75ae2fc2..45f1e0d46 100644 --- a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/provider.go +++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/provider.go @@ -13,6 +13,7 @@ import ( "strings" "github.com/hashicorp/terraform-plugin-go/tfprotov5" + "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/internal/configs/configschema" "github.com/hashicorp/terraform-plugin-sdk/v2/internal/logging" @@ -192,11 +193,23 @@ func (p *Provider) InternalValidate() error { } var validationErrors []error + + // Provider schema validation sm := schemaMap(p.Schema) if err := sm.InternalValidate(sm); err != nil { validationErrors = append(validationErrors, err) } + if sm.hasWriteOnly() { + validationErrors = append(validationErrors, fmt.Errorf("provider schema cannot contain write-only attributes")) + } + + // Provider meta schema validation + providerMeta := schemaMap(p.ProviderMetaSchema) + if providerMeta.hasWriteOnly() { + validationErrors = append(validationErrors, fmt.Errorf("provider meta schema cannot contain write-only attributes")) + } + // Provider-specific checks for k := range sm { if isReservedProviderFieldName(k) { @@ -214,6 +227,15 @@ func (p *Provider) InternalValidate() error { if err := r.InternalValidate(nil, false); err != nil { validationErrors = append(validationErrors, fmt.Errorf("data source %s: %s", k, err)) } + + if len(r.ValidateRawResourceConfigFuncs) > 0 { + validationErrors = append(validationErrors, fmt.Errorf("data source %s cannot contain ValidateRawResourceConfigFuncs", k)) + } + + dataSourceSchema := schemaMap(r.SchemaMap()) + if dataSourceSchema.hasWriteOnly() { + validationErrors = append(validationErrors, fmt.Errorf("data source %s cannot contain write-only attributes", k)) + } } return errors.Join(validationErrors...) diff --git a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/resource.go b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/resource.go index 1c944c9b4..32a21d2ed 100644 --- a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/resource.go +++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/resource.go @@ -189,7 +189,7 @@ type Resource struct { // This implementation is optional. If omitted, all Schema must enable // the ForceNew field and any practitioner changes that would have // caused and update will instead destroy and recreate the infrastructure - // compontent. + // component. // // The *ResourceData parameter contains the plan and state data for this // managed resource instance. The available data in the Get* methods is the @@ -321,7 +321,7 @@ type Resource struct { // This implementation is optional. If omitted, all Schema must enable // the ForceNew field and any practitioner changes that would have // caused and update will instead destroy and recreate the infrastructure - // compontent. + // component. // // The Context parameter stores SDK information, such as loggers and // timeout deadlines. It also is wired to receive any cancellation from @@ -460,7 +460,7 @@ type Resource struct { // This implementation is optional. If omitted, all Schema must enable // the ForceNew field and any practitioner changes that would have // caused and update will instead destroy and recreate the infrastructure - // compontent. + // component. // // The Context parameter stores SDK information, such as loggers. It also // is wired to receive any cancellation from Terraform such as a system or @@ -644,6 +644,19 @@ type Resource struct { // ResourceBehavior is used to control SDK-specific logic when // interacting with this resource. ResourceBehavior ResourceBehavior + + // ValidateRawResourceConfigFuncs allows functions to define arbitrary validation + // logic during the ValidateResourceTypeConfig RPC. ValidateRawResourceConfigFunc receives + // the client capabilities from the ValidateResourceTypeConfig RPC and the raw cty + // config value for the entire resource before it is shimmed, and it can return error + // diagnostics based on the inspection of those values. + // + // ValidateRawResourceConfigFuncs is only valid for Managed Resource types and will not be + // called for Data Resource or Provider types. + // + // Developers should prefer other validation methods first as this validation function + // deals with raw cty values. + ValidateRawResourceConfigFuncs []ValidateRawResourceConfigFunc } // ResourceBehavior controls SDK-specific logic when interacting @@ -664,12 +677,31 @@ type ResourceBehavior struct { // to change or break without warning. It is not protected by version compatibility guarantees. type ProviderDeferredBehavior struct { // When EnablePlanModification is true, the SDK will execute provider-defined logic - // during plan (CustomizeDiff, Default, DiffSupressFunc, etc.) if ConfigureProvider + // during plan (CustomizeDiff, Default, DiffSuppressFunc, etc.) if ConfigureProvider // returns a deferred response. The SDK will then automatically return a deferred response // along with the modified plan. EnablePlanModification bool } +// ValidateRawResourceConfigFunc is a function used to validate the raw resource config +// and has Diagnostic support. it is only valid for Managed Resource types and will not be +// called for Data Resource or Block types. +type ValidateRawResourceConfigFunc func(context.Context, ValidateResourceConfigFuncRequest, *ValidateResourceConfigFuncResponse) + +type ValidateResourceConfigFuncRequest struct { + // WriteOnlyAttributesAllowed indicates that the Terraform client + // initiating the request supports write-only attributes for managed + // resources. + WriteOnlyAttributesAllowed bool + + // The raw config value provided by Terraform core + RawConfig cty.Value +} + +type ValidateResourceConfigFuncResponse struct { + Diagnostics diag.Diagnostics +} + // SchemaMap returns the schema information for this Resource whether it is // defined via the SchemaFunc field or Schema field. The SchemaFunc field, if // defined, takes precedence over the Schema field. @@ -748,7 +780,7 @@ type StateUpgrader struct { // Upgrade takes the JSON encoded state and the provider meta value, and // upgrades the state one single schema version. The provided state is - // deocded into the default json types using a map[string]interface{}. It + // decoded into the default json types using a map[string]interface{}. It // is up to the StateUpgradeFunc to ensure that the returned value can be // encoded using the new schema. Upgrade StateUpgradeFunc @@ -873,7 +905,7 @@ func (r *Resource) Apply( data.providerMeta = s.ProviderMeta } - // Instance Diff shoould have the timeout info, need to copy it over to the + // Instance Diff should have the timeout info, need to copy it over to the // ResourceData meta rt := ResourceTimeout{} if _, ok := d.Meta[TimeoutKey]; ok { diff --git a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/resource_data.go b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/resource_data.go index 4380db7e1..5129c925c 100644 --- a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/resource_data.go +++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/resource_data.go @@ -4,6 +4,7 @@ package schema import ( + "fmt" "log" "reflect" "strings" @@ -13,6 +14,8 @@ import ( "github.com/google/go-cmp/cmp" "github.com/hashicorp/go-cty/cty" "github.com/hashicorp/go-cty/cty/gocty" + + "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" ) @@ -82,7 +85,7 @@ func (d *ResourceData) GetChange(key string) (interface{}, interface{}) { // GetOk returns the data for the given key and whether or not the key // has been set to a non-zero value at some point. // -// The first result will not necessarilly be nil if the value doesn't exist. +// The first result will not necessarily be nil if the value doesn't exist. // The second result should be checked to determine this information. func (d *ResourceData) GetOk(key string) (interface{}, bool) { r := d.getRaw(key, getSourceSet) @@ -604,6 +607,67 @@ func (d *ResourceData) GetRawConfig() cty.Value { return cty.NullVal(schemaMap(d.schema).CoreConfigSchema().ImpliedType()) } +// GetRawConfigAt is a helper method for retrieving specific values +// from the RawConfig returned from GetRawConfig. It returns the cty.Value +// for a given cty.Path or an error diagnostic if the value at the given path does not exist. +// +// GetRawConfigAt is considered advanced functionality, and +// familiarity with the Terraform protocol is suggested when using it. +func (d *ResourceData) GetRawConfigAt(valPath cty.Path) (cty.Value, diag.Diagnostics) { + rawConfig := d.GetRawConfig() + configVal := cty.DynamicVal + + if rawConfig.IsNull() { + return configVal, diag.Diagnostics{ + { + Severity: diag.Error, + Summary: "Empty Raw Config", + Detail: "The Terraform Provider unexpectedly received an empty configuration. " + + "This is almost always an issue with the Terraform Plugin SDK used to create providers. " + + "Please report this to the provider developers. \n\n" + + "The RawConfig is empty.", + AttributePath: valPath, + }, + } + } + err := cty.Walk(rawConfig, func(path cty.Path, value cty.Value) (bool, error) { + if path.Equals(valPath) { + configVal = value + return false, nil + } + return true, nil + }) + if err != nil { + return configVal, diag.Diagnostics{ + { + Severity: diag.Error, + Summary: "Invalid config path", + Detail: "The Terraform Provider unexpectedly provided a path that does not match the current schema. " + + "This can happen if the path does not correctly follow the schema in structure or types. " + + "Please report this to the provider developers. \n\n" + + fmt.Sprintf("Encountered error while retrieving config value %s", err.Error()), + AttributePath: valPath, + }, + } + } + + if configVal.RawEquals(cty.DynamicVal) { + return configVal, diag.Diagnostics{ + { + Severity: diag.Error, + Summary: "Invalid config path", + Detail: "The Terraform Provider unexpectedly provided a path that does not match the current schema. " + + "This can happen if the path does not correctly follow the schema in structure or types. " + + "Please report this to the provider developers. \n\n" + + "Cannot find config value for given path.", + AttributePath: valPath, + }, + } + } + + return configVal, nil +} + // GetRawState returns the cty.Value that Terraform sent the SDK for the state. // If no value was sent, or if a null value was sent, the value will be a null // value of the resource's type. diff --git a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/resource_diff.go b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/resource_diff.go index 6af9490b9..9f7dab683 100644 --- a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/resource_diff.go +++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/resource_diff.go @@ -11,6 +11,8 @@ import ( "sync" "github.com/hashicorp/go-cty/cty" + + "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" ) @@ -480,6 +482,67 @@ func (d *ResourceDiff) GetRawConfig() cty.Value { return cty.NullVal(schemaMap(d.schema).CoreConfigSchema().ImpliedType()) } +// GetRawConfigAt is a helper method for retrieving specific values +// from the RawConfig returned from GetRawConfig. It returns the cty.Value +// for a given cty.Path or an error diagnostic if the value at the given path does not exist. +// +// GetRawConfigAt is considered advanced functionality, and +// familiarity with the Terraform protocol is suggested when using it. +func (d *ResourceDiff) GetRawConfigAt(valPath cty.Path) (cty.Value, diag.Diagnostics) { + rawConfig := d.GetRawConfig() + configVal := cty.DynamicVal + + if rawConfig.IsNull() { + return configVal, diag.Diagnostics{ + { + Severity: diag.Error, + Summary: "Empty Raw Config", + Detail: "The Terraform Provider unexpectedly received an empty configuration. " + + "This is almost always an issue with the Terraform Plugin SDK used to create providers. " + + "Please report this to the provider developers. \n\n" + + "The RawConfig is empty.", + AttributePath: valPath, + }, + } + } + err := cty.Walk(rawConfig, func(path cty.Path, value cty.Value) (bool, error) { + if path.Equals(valPath) { + configVal = value + return false, nil + } + return true, nil + }) + if err != nil { + return configVal, diag.Diagnostics{ + { + Severity: diag.Error, + Summary: "Invalid config path", + Detail: "The Terraform Provider unexpectedly provided a path that does not match the current schema. " + + "This can happen if the path does not correctly follow the schema in structure or types. " + + "Please report this to the provider developers. \n\n" + + fmt.Sprintf("Encountered error while retrieving config value %s", err.Error()), + AttributePath: valPath, + }, + } + } + + if configVal.RawEquals(cty.DynamicVal) { + return configVal, diag.Diagnostics{ + { + Severity: diag.Error, + Summary: "Invalid config path", + Detail: "The Terraform Provider unexpectedly provided a path that does not match the current schema. " + + "This can happen if the path does not correctly follow the schema in structure or types. " + + "Please report this to the provider developers. \n\n" + + "Cannot find config value for given path.", + AttributePath: valPath, + }, + } + } + + return configVal, nil +} + // GetRawState returns the cty.Value that Terraform sent the SDK for the state. // If no value was sent, or if a null value was sent, the value will be a null // value of the resource's type. diff --git a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/resource_timeout.go b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/resource_timeout.go index 90d29e625..72fd6602e 100644 --- a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/resource_timeout.go +++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/resource_timeout.go @@ -132,7 +132,7 @@ func (t *ResourceTimeout) ConfigDecode(s *Resource, c *terraform.ResourceConfig) timeout = t.Default } - // If the resource has not delcared this in the definition, then error + // If the resource has not declared this in the definition, then error // with an unsupported message if timeout == nil { return unsupportedTimeoutKeyError(timeKey) diff --git a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/schema.go b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/schema.go index 176288b0c..ea6cd768d 100644 --- a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/schema.go +++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/schema.go @@ -145,7 +145,7 @@ type Schema struct { // // The key benefit of activating this flag is that the result of Read or // ReadContext will be cleaned of normalization-only changes in the same - // way as the planning result would normaly be, which therefore prevents + // way as the planning result would normally be, which therefore prevents // churn for downstream expressions deriving from this attribute and // prevents incorrect "Values changed outside of Terraform" messages // when the remote API returns values which have the same meaning as the @@ -395,6 +395,18 @@ type Schema struct { // as sensitive. Any outputs containing a sensitive value must enable the // output sensitive argument. Sensitive bool + + // WriteOnly indicates that the practitioner can choose a value for this + // attribute, but Terraform will not store this attribute in plan or state. + // WriteOnly can only be set for managed resource schemas. If WriteOnly is true, + // either Optional or Required must also be true. WriteOnly cannot be set with ForceNew. + // + // WriteOnly cannot be set to true for TypeList, TypeMap, or TypeSet. + // + // This functionality is only supported in Terraform 1.11 and later. + // Practitioners that choose a value for this attribute with older + // versions of Terraform will receive an error. + WriteOnly bool } // SchemaConfigMode is used to influence how a schema item is mapped into a @@ -838,6 +850,18 @@ func (m schemaMap) internalValidate(topSchemaMap schemaMap, attrsOnly bool) erro return fmt.Errorf("%s: One of optional, required, or computed must be set", k) } + if v.WriteOnly && v.Required && v.Optional { + return fmt.Errorf("%s: WriteOnly must be set with either Required or Optional", k) + } + + if v.WriteOnly && v.Computed { + return fmt.Errorf("%s: WriteOnly cannot be set with Computed", k) + } + + if v.WriteOnly && v.ForceNew { + return fmt.Errorf("%s: WriteOnly cannot be set with ForceNew", k) + } + computedOnly := v.Computed && !v.Optional switch v.ConfigMode { @@ -874,6 +898,14 @@ func (m schemaMap) internalValidate(topSchemaMap schemaMap, attrsOnly bool) erro return fmt.Errorf("%s: Default cannot be set with Required", k) } + if v.WriteOnly && v.Default != nil { + return fmt.Errorf("%s: Default cannot be set with WriteOnly", k) + } + + if v.WriteOnly && v.DefaultFunc != nil { + return fmt.Errorf("%s: DefaultFunc cannot be set with WriteOnly", k) + } + if len(v.ComputedWhen) > 0 && !v.Computed { return fmt.Errorf("%s: ComputedWhen can only be set with Computed", k) } @@ -923,6 +955,10 @@ func (m schemaMap) internalValidate(topSchemaMap schemaMap, attrsOnly bool) erro } if v.Type == TypeList || v.Type == TypeSet { + if v.WriteOnly { + return fmt.Errorf("%s: WriteOnly is not valid for lists or sets", k) + } + if v.Elem == nil { return fmt.Errorf("%s: Elem must be set for lists", k) } @@ -939,6 +975,16 @@ func (m schemaMap) internalValidate(topSchemaMap schemaMap, attrsOnly bool) erro case *Resource: attrsOnly := attrsOnly || v.ConfigMode == SchemaConfigModeAttr + blockHasWriteOnly := schemaMap(t.SchemaMap()).hasWriteOnly() + + if v.Type == TypeSet && blockHasWriteOnly { + return fmt.Errorf("%s: Set Block type cannot contain WriteOnly attributes", k) + } + + if v.Computed && blockHasWriteOnly { + return fmt.Errorf("%s: Block types with Computed set to true cannot contain WriteOnly attributes", k) + } + if err := schemaMap(t.SchemaMap()).internalValidate(topSchemaMap, attrsOnly); err != nil { return err } @@ -956,6 +1002,10 @@ func (m schemaMap) internalValidate(topSchemaMap schemaMap, attrsOnly bool) erro } if v.Type == TypeMap && v.Elem != nil { + if v.WriteOnly { + return fmt.Errorf("%s: WriteOnly is not valid for maps", k) + } + switch v.Elem.(type) { case *Resource: return fmt.Errorf("%s: TypeMap with Elem *Resource not supported,"+ @@ -1099,7 +1149,7 @@ func isValidFieldName(name string) bool { } // resourceDiffer is an interface that is used by the private diff functions. -// This helps facilitate diff logic for both ResourceData and ResoureDiff with +// This helps facilitate diff logic for both ResourceData and ResourceDiff with // minimal divergence in code. type resourceDiffer interface { diffChange(string) (interface{}, interface{}, bool, bool, bool) @@ -1119,24 +1169,24 @@ func (m schemaMap) diff( d resourceDiffer, all bool) error { - unsupressedDiff := new(terraform.InstanceDiff) - unsupressedDiff.Attributes = make(map[string]*terraform.ResourceAttrDiff) + unsuppressedDiff := new(terraform.InstanceDiff) + unsuppressedDiff.Attributes = make(map[string]*terraform.ResourceAttrDiff) var err error switch schema.Type { case TypeBool, TypeInt, TypeFloat, TypeString: - err = m.diffString(k, schema, unsupressedDiff, d, all) + err = m.diffString(k, schema, unsuppressedDiff, d, all) case TypeList: - err = m.diffList(ctx, k, schema, unsupressedDiff, d, all) + err = m.diffList(ctx, k, schema, unsuppressedDiff, d, all) case TypeMap: - err = m.diffMap(k, schema, unsupressedDiff, d, all) + err = m.diffMap(k, schema, unsuppressedDiff, d, all) case TypeSet: - err = m.diffSet(ctx, k, schema, unsupressedDiff, d, all) + err = m.diffSet(ctx, k, schema, unsuppressedDiff, d, all) default: err = fmt.Errorf("%s: unknown type %#v", k, schema.Type) } - for attrK, attrV := range unsupressedDiff.Attributes { + for attrK, attrV := range unsuppressedDiff.Attributes { switch rd := d.(type) { case *ResourceData: if schema.DiffSuppressFunc != nil && attrV != nil && @@ -2353,6 +2403,36 @@ func (m schemaMap) validateType( return diags } +// hasWriteOnly returns true if the schemaMap contains any WriteOnly attributes. +func (m schemaMap) hasWriteOnly() bool { + for _, v := range m { + if v.WriteOnly { + return true + } + + if v.Elem != nil { + switch t := v.Elem.(type) { + case *Resource: + return schemaMap(t.SchemaMap()).hasWriteOnly() + case *Schema: + if t.WriteOnly { + return true + } + + // Test the edge case where elements in a collection are set to writeOnly. + // Technically, this is an invalid schema as collections cannot have write-only + // attributes. However, this method is not concerned with the validity of the schema. + isNestedWriteOnly := schemaMap(map[string]*Schema{"nested": t}).hasWriteOnly() + if isNestedWriteOnly { + return true + } + } + } + } + + return false +} + // Zero returns the zero value for a type. func (t ValueType) Zero() interface{} { switch t { diff --git a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/set.go b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/set.go index e897817fd..6ef786bd0 100644 --- a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/set.go +++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/set.go @@ -219,7 +219,7 @@ func (s *Set) add(item interface{}, computed bool) string { func (s *Set) hash(item interface{}) string { code := s.F(item) - // Always return a nonnegative hashcode. + // Always return a non-negative hashcode. if code < 0 { code = -code } diff --git a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/write_only.go b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/write_only.go new file mode 100644 index 000000000..287c8bd8f --- /dev/null +++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/write_only.go @@ -0,0 +1,214 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package schema + +import ( + "fmt" + "sort" + + "github.com/hashicorp/go-cty/cty" + + "github.com/hashicorp/terraform-plugin-sdk/v2/diag" + "github.com/hashicorp/terraform-plugin-sdk/v2/internal/configs/configschema" +) + +// setWriteOnlyNullValues takes a cty.Value, and compares it to the schema setting any non-null +// values that are writeOnly to null. +func setWriteOnlyNullValues(val cty.Value, schema *configschema.Block) cty.Value { + if !val.IsKnown() || val.IsNull() { + return val + } + + valMap := val.AsValueMap() + newVals := make(map[string]cty.Value) + + for name, attr := range schema.Attributes { + v := valMap[name] + + if attr.WriteOnly && !v.IsNull() { + newVals[name] = cty.NullVal(attr.Type) + continue + } + + newVals[name] = v + } + + for name, blockS := range schema.BlockTypes { + blockVal := valMap[name] + if blockVal.IsNull() || !blockVal.IsKnown() { + newVals[name] = blockVal + continue + } + + blockValType := blockVal.Type() + blockElementType := blockS.Block.ImpliedType() + + // This switches on the value type here, so we can correctly switch + // between Tuples/Lists and Maps/Objects. + switch { + case blockS.Nesting == configschema.NestingSingle || blockS.Nesting == configschema.NestingGroup: + // NestingSingle is the only exception here, where we treat the + // block directly as an object + newVals[name] = setWriteOnlyNullValues(blockVal, &blockS.Block) + + case blockValType.IsSetType(), blockValType.IsListType(), blockValType.IsTupleType(): + listVals := blockVal.AsValueSlice() + newListVals := make([]cty.Value, 0, len(listVals)) + + for _, v := range listVals { + newListVals = append(newListVals, setWriteOnlyNullValues(v, &blockS.Block)) + } + + switch { + case blockValType.IsSetType(): + switch len(newListVals) { + case 0: + newVals[name] = cty.SetValEmpty(blockElementType) + default: + newVals[name] = cty.SetVal(newListVals) + } + case blockValType.IsListType(): + switch len(newListVals) { + case 0: + newVals[name] = cty.ListValEmpty(blockElementType) + default: + newVals[name] = cty.ListVal(newListVals) + } + case blockValType.IsTupleType(): + newVals[name] = cty.TupleVal(newListVals) + } + + case blockValType.IsMapType(), blockValType.IsObjectType(): + mapVals := blockVal.AsValueMap() + newMapVals := make(map[string]cty.Value) + + for k, v := range mapVals { + newMapVals[k] = setWriteOnlyNullValues(v, &blockS.Block) + } + + switch { + case blockValType.IsMapType(): + switch len(newMapVals) { + case 0: + newVals[name] = cty.MapValEmpty(blockElementType) + default: + newVals[name] = cty.MapVal(newMapVals) + } + case blockValType.IsObjectType(): + if len(newMapVals) == 0 { + // We need to populate empty values to make a valid object. + for attr, ty := range blockElementType.AttributeTypes() { + newMapVals[attr] = cty.NullVal(ty) + } + } + newVals[name] = cty.ObjectVal(newMapVals) + } + + default: + panic(fmt.Sprintf("failed to set null values for nested block %q:%#v", name, blockValType)) + } + } + + return cty.ObjectVal(newVals) +} + +// validateWriteOnlyNullValues validates that write-only attribute values +// are null to ensure that write-only values are not sent to unsupported +// Terraform client versions. +// +// it takes a cty.Value, and compares it to the schema and throws an +// error diagnostic for each non-null writeOnly attribute value. +func validateWriteOnlyNullValues(val cty.Value, schema *configschema.Block, path cty.Path) diag.Diagnostics { + if !val.IsKnown() || val.IsNull() { + return diag.Diagnostics{} + } + + valMap := val.AsValueMap() + diags := make([]diag.Diagnostic, 0) + + var attrNames []string + for k := range schema.Attributes { + attrNames = append(attrNames, k) + } + + // Sort the attribute names to produce diags in a consistent order. + sort.Strings(attrNames) + + for _, name := range attrNames { + attr := schema.Attributes[name] + v := valMap[name] + + if attr.WriteOnly && !v.IsNull() { + diags = append(diags, diag.Diagnostic{ + Severity: diag.Error, + Summary: "Write-only Attribute Not Allowed", + Detail: fmt.Sprintf("The resource contains a non-null value for write-only attribute %q ", name) + + "Write-only attributes are only supported in Terraform 1.11 and later.", + AttributePath: append(path, cty.GetAttrStep{Name: name}), + }) + } + } + + var blockNames []string + for k := range schema.BlockTypes { + blockNames = append(blockNames, k) + } + + // Sort the block names to produce diags in a consistent order. + sort.Strings(blockNames) + + for _, name := range blockNames { + blockS := schema.BlockTypes[name] + blockVal := valMap[name] + if blockVal.IsNull() || !blockVal.IsKnown() { + continue + } + + blockValType := blockVal.Type() + blockPath := append(path, cty.GetAttrStep{Name: name}) + + // This switches on the value type here, so we can correctly switch + // between Tuples/Lists and Maps/Objects. + switch { + case blockS.Nesting == configschema.NestingSingle || blockS.Nesting == configschema.NestingGroup: + // NestingSingle is the only exception here, where we treat the + // block directly as an object + diags = append(diags, validateWriteOnlyNullValues(blockVal, &blockS.Block, blockPath)...) + case blockValType.IsSetType(): + setVals := blockVal.AsValueSlice() + + for _, v := range setVals { + setBlockPath := append(blockPath, cty.IndexStep{ + Key: v, + }) + diags = append(diags, validateWriteOnlyNullValues(v, &blockS.Block, setBlockPath)...) + } + + case blockValType.IsListType(), blockValType.IsTupleType(): + listVals := blockVal.AsValueSlice() + + for i, v := range listVals { + listBlockPath := append(blockPath, cty.IndexStep{ + Key: cty.NumberIntVal(int64(i)), + }) + diags = append(diags, validateWriteOnlyNullValues(v, &blockS.Block, listBlockPath)...) + } + + case blockValType.IsMapType(), blockValType.IsObjectType(): + mapVals := blockVal.AsValueMap() + + for k, v := range mapVals { + mapBlockPath := append(blockPath, cty.IndexStep{ + Key: cty.StringVal(k), + }) + diags = append(diags, validateWriteOnlyNullValues(v, &blockS.Block, mapBlockPath)...) + } + + default: + panic(fmt.Sprintf("failed to validate WriteOnly values for nested block %q:%#v", name, blockValType)) + } + } + + return diags +} diff --git a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/internal/addrs/instance_key.go b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/internal/addrs/instance_key.go index 8373297f8..56700fc05 100644 --- a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/internal/addrs/instance_key.go +++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/internal/addrs/instance_key.go @@ -20,7 +20,7 @@ type instanceKey interface { String() string } -// NoKey represents the absense of an instanceKey, for the single instance +// NoKey represents the absence of an instanceKey, for the single instance // of a configuration object that does not use "count" or "for_each" at all. var NoKey instanceKey diff --git a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/internal/configs/configschema/coerce_value.go b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/internal/configs/configschema/coerce_value.go index d12ff8cce..dab927c8d 100644 --- a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/internal/configs/configschema/coerce_value.go +++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/internal/configs/configschema/coerce_value.go @@ -11,7 +11,7 @@ import ( ) // CoerceValue attempts to force the given value to conform to the type -// implied by the receiever. +// implied by the receiver. // // This is useful in situations where a configuration must be derived from // an already-decoded value. It is always better to decode directly from diff --git a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/internal/configs/configschema/empty_value.go b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/internal/configs/configschema/empty_value.go index 3c9573bc5..cc1107fa0 100644 --- a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/internal/configs/configschema/empty_value.go +++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/internal/configs/configschema/empty_value.go @@ -7,12 +7,12 @@ import ( "github.com/hashicorp/go-cty/cty" ) -// EmptyValue returns the "empty value" for the recieving block, which for +// EmptyValue returns the "empty value" for the receiving block, which for // a block type is a non-null object where all of the attribute values are // the empty values of the block's attributes and nested block types. // // In other words, it returns the value that would be returned if an empty -// block were decoded against the recieving schema, assuming that no required +// block were decoded against the receiving schema, assuming that no required // attribute or block constraints were honored. func (b *Block) EmptyValue() cty.Value { vals := make(map[string]cty.Value) diff --git a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/internal/configs/configschema/schema.go b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/internal/configs/configschema/schema.go index c445b4ba5..983d20bdf 100644 --- a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/internal/configs/configschema/schema.go +++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/internal/configs/configschema/schema.go @@ -83,6 +83,18 @@ type Attribute struct { // Deprecated indicates whether the attribute has been marked as deprecated in the // provider and usage should be discouraged. Deprecated bool + + // WriteOnly indicates that the practitioner can choose a value for this + // attribute, but Terraform will not store this attribute in plan or state. + // WriteOnly can only be set for managed resource schemas. If WriteOnly is true, + // either Optional or Required must also be true. WriteOnly cannot be set with ForceNew. + // + // WriteOnly cannot be set to true for TypeList, TypeMap, or TypeSet. + // + // This functionality is only supported in Terraform 1.11 and later. + // Practitioners that choose a value for this attribute with older + // versions of Terraform will receive an error. + WriteOnly bool } // NestedBlock represents the embedding of one block within another. @@ -125,7 +137,7 @@ const ( NestingSingle // NestingGroup is similar to NestingSingle in that it calls for only a - // single instance of a given block type with no labels, but it additonally + // single instance of a given block type with no labels, but it additionally // guarantees that its result will never be null, even if the block is // absent, and instead the nested attributes and blocks will be treated // as absent in that case. (Any required attributes or blocks within the diff --git a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/internal/configs/hcl2shim/values_equiv.go b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/internal/configs/hcl2shim/values_equiv.go index 6b2be2239..37d310497 100644 --- a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/internal/configs/hcl2shim/values_equiv.go +++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/internal/configs/hcl2shim/values_equiv.go @@ -187,8 +187,8 @@ func valuesSDKEquivalentMappings(a, b cty.Value) bool { // precision in the round-trip. // // This does _not_ attempt to allow for an epsilon difference that may be -// caused by accumulated innacuracy in a float calculation, under the -// expectation that providers generally do not actually do compuations on +// caused by accumulated inaccuracy in a float calculation, under the +// expectation that providers generally do not actually do computations on // floats and instead just pass string representations of them on verbatim // to remote APIs. A remote API _itself_ may introduce inaccuracy, but that's // a problem for the provider itself to deal with, based on its knowledge of diff --git a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/internal/logging/environment_variables.go b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/internal/logging/environment_variables.go index 2ffc73eee..5919d373a 100644 --- a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/internal/logging/environment_variables.go +++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/internal/logging/environment_variables.go @@ -10,7 +10,7 @@ const ( // usage, this environment variable is handled by terraform-plugin-go. // // Terraform CLI's logging must be explicitly turned on before this - // environment varable can be used to reduce the SDK logging levels. It + // environment variable can be used to reduce the SDK logging levels. It // cannot be used to show only SDK logging unless all other logging levels // are turned off. EnvTfLogSdk = "TF_LOG_SDK" diff --git a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/internal/plugin/convert/diagnostics.go b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/internal/plugin/convert/diagnostics.go index 672f75e6d..6c1ce3f45 100644 --- a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/internal/plugin/convert/diagnostics.go +++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/internal/plugin/convert/diagnostics.go @@ -10,6 +10,7 @@ import ( "github.com/hashicorp/terraform-plugin-go/tfprotov5" "github.com/hashicorp/terraform-plugin-go/tftypes" + "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/internal/logging" ) @@ -136,7 +137,7 @@ func AttributePathToPath(ap *tftypes.AttributePath) cty.Path { // PathToAttributePath takes a cty.Path and converts it to a proto-encoded path. func PathToAttributePath(p cty.Path) *tftypes.AttributePath { - if p == nil || len(p) < 1 { + if len(p) < 1 { return nil } ap := tftypes.NewAttributePath() diff --git a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/internal/plugin/convert/schema.go b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/internal/plugin/convert/schema.go index e2b4e431c..a02aaec00 100644 --- a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/internal/plugin/convert/schema.go +++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/internal/plugin/convert/schema.go @@ -12,6 +12,7 @@ import ( "github.com/hashicorp/go-cty/cty" "github.com/hashicorp/terraform-plugin-go/tfprotov5" "github.com/hashicorp/terraform-plugin-go/tftypes" + "github.com/hashicorp/terraform-plugin-sdk/v2/internal/configs/configschema" "github.com/hashicorp/terraform-plugin-sdk/v2/internal/logging" ) @@ -151,6 +152,7 @@ func ConfigSchemaToProto(ctx context.Context, b *configschema.Block) *tfprotov5. Required: a.Required, Sensitive: a.Sensitive, Deprecated: a.Deprecated, + WriteOnly: a.WriteOnly, } var err error diff --git a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/meta/meta.go b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/meta/meta.go index 8a3247afb..0a928c8b0 100644 --- a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/meta/meta.go +++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/meta/meta.go @@ -17,7 +17,7 @@ import ( // // Deprecated: Use Go standard library [runtime/debug] package build information // instead. -var SDKVersion = "2.34.0" +var SDKVersion = "2.36.1" // A pre-release marker for the version. If this is "" (empty string) // then it means that it is a final release. Otherwise, this is a pre-release diff --git a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/terraform/diff.go b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/terraform/diff.go index 7b988d9f3..3b4179b4b 100644 --- a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/terraform/diff.go +++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/terraform/diff.go @@ -183,7 +183,7 @@ func (d *InstanceDiff) applyBlockDiff(path []string, attrs map[string]string, sc // check each set candidate to see if it was removed. // we need to do this, because when entire sets are removed, they may - // have the wrong key, and ony show diffs going to "" + // have the wrong key, and only show diffs going to "" if block.Nesting == configschema.NestingSet { for k := range candidateKeys { indexPrefix := strings.Join(append(path, n, k), ".") + "." @@ -359,7 +359,7 @@ func (d *InstanceDiff) applySingleAttrDiff(path []string, attrs map[string]strin return result, nil } - // check for missmatched diff values + // check for mismatched diff values if exists && old != diff.Old && old != hcl2shim.UnknownVariableValue && @@ -892,7 +892,7 @@ func (d *InstanceDiff) Same(d2 *InstanceDiff) (bool, string) { continue } - // If the last diff was a computed value then the absense of + // If the last diff was a computed value then the absence of // that value is allowed since it may mean the value ended up // being the same. if diffOld.NewComputed { diff --git a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/terraform/state.go b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/terraform/state.go index 7d2179358..60723de77 100644 --- a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/terraform/state.go +++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/terraform/state.go @@ -46,7 +46,7 @@ var rootModulePath = []string{"root"} // normalizeModulePath takes a raw module path and returns a path that // has the rootModulePath prepended to it. If I could go back in time I // would've never had a rootModulePath (empty path would be root). We can -// still fix this but thats a big refactor that my branch doesn't make sense +// still fix this but that's a big refactor that my branch doesn't make sense // for. Instead, this function normalizes paths. func normalizeModulePath(p []string) addrs.ModuleInstance { // FIXME: Remove this once everyone is using addrs.ModuleInstance. @@ -799,7 +799,7 @@ func (s *OutputState) Equal(other *OutputState) bool { // module. type ModuleState struct { // Path is the import path from the root module. Modules imports are - // always disjoint, so the path represents amodule tree + // always disjoint, so the path represents a module tree Path []string `json:"path"` // Locals are kept only transiently in-memory, because we can always diff --git a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/terraform/state_filter.go b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/terraform/state_filter.go index caf2c7967..3cb5c57e5 100644 --- a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/terraform/state_filter.go +++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/terraform/state_filter.go @@ -263,7 +263,7 @@ func (s stateFilterResultSlice) Less(i, j int) bool { return addrA.Index < addrB.Index } - // If the addresses are different it is just lexographic sorting + // If the addresses are different it is just lexicographic sorting if a.Address != b.Address { return a.Address < b.Address } diff --git a/vendor/github.com/magodo/aztft/internal/client/client.go b/vendor/github.com/magodo/aztft/internal/client/client.go index 55e6aee9f..103003054 100644 --- a/vendor/github.com/magodo/aztft/internal/client/client.go +++ b/vendor/github.com/magodo/aztft/internal/client/client.go @@ -24,11 +24,12 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/domainservices/armdomainservices" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridkubernetes/armhybridkubernetes" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" @@ -38,6 +39,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover" @@ -181,6 +183,14 @@ func (b *ClientBuilder) NewKustoDataConnectionsClient(subscriptionId string) (*a ) } +func (b *ClientBuilder) NewMachineLearningWorkspaceClient(subscriptionId string) (*armmachinelearning.WorkspacesClient, error) { + return armmachinelearning.NewWorkspacesClient( + subscriptionId, + b.Cred, + &b.ClientOpt, + ) +} + func (b *ClientBuilder) NewMachineLearningComputeClient(subscriptionId string) (*armmachinelearning.ComputeClient, error) { return armmachinelearning.NewComputeClient( subscriptionId, @@ -196,6 +206,14 @@ func (b *ClientBuilder) NewMachineLearningDataStoreClient(subscriptionId string) &b.ClientOpt, ) } + +func (b *ClientBuilder) NewMachineLearningOutboundRulesClient(subscriptionId string) (*armmachinelearning.ManagedNetworkSettingsRuleClient, error) { + return armmachinelearning.NewManagedNetworkSettingsRuleClient( + subscriptionId, + b.Cred, + &b.ClientOpt, + ) +} func (b *ClientBuilder) NewTimeSeriesInsightEnvironmentsClient(subscriptionId string) (*armtimeseriesinsights.EnvironmentsClient, error) { return armtimeseriesinsights.NewEnvironmentsClient( subscriptionId, @@ -669,6 +687,14 @@ func (b *ClientBuilder) NewNetAppAccountClient(subscriptionId string) (*armnetap ) } +func (b *ClientBuilder) NewNetAppVolumeGroupClient(subscriptionId string) (*armnetapp.VolumeGroupsClient, error) { + return armnetapp.NewVolumeGroupsClient( + subscriptionId, + b.Cred, + &b.ClientOpt, + ) +} + func (b *ClientBuilder) NewWorkloadSAPVirtualInstanceClient(subscriptionId string) (*armworkloads.SAPVirtualInstancesClient, error) { return armworkloads.NewSAPVirtualInstancesClient( subscriptionId, @@ -688,3 +714,11 @@ func (b *ClientBuilder) NewContainerAppEnvironmentsClient(subscriptionId string) func (b *ClientBuilder) NewCognitiveServiceAccountsClient(subscriptionId string) (*armcognitiveservices.AccountsClient, error) { return armcognitiveservices.NewAccountsClient(subscriptionId, b.Cred, &b.ClientOpt) } + +func (b *ClientBuilder) NewHybridKubernetesConnectedClient(subscriptionId string) (*armhybridkubernetes.ConnectedClusterClient, error) { + return armhybridkubernetes.NewConnectedClusterClient(subscriptionId, b.Cred, &b.ClientOpt) +} + +func (b *ClientBuilder) NewSqlJobsClient(subscriptionId string) (*armsql.JobsClient, error) { + return armsql.NewJobsClient(subscriptionId, b.Cred, &b.ClientOpt) +} diff --git a/vendor/github.com/magodo/aztft/internal/populate/populate.go b/vendor/github.com/magodo/aztft/internal/populate/populate.go index 127437e63..2e1135c71 100644 --- a/vendor/github.com/magodo/aztft/internal/populate/populate.go +++ b/vendor/github.com/magodo/aztft/internal/populate/populate.go @@ -22,6 +22,7 @@ var populaters = map[string]populateFunc{ "azurerm_netapp_account": populateNetAppAccount, "azurerm_lb": populateLoadBalancer, "azurerm_container_app_environment": populateContainerAppEnv, + "azurerm_mssql_job": populateMssqlJob, } func NeedsAPI(rt string) bool { diff --git a/vendor/github.com/magodo/aztft/internal/populate/populate_mssql_job.go b/vendor/github.com/magodo/aztft/internal/populate/populate_mssql_job.go new file mode 100644 index 000000000..e37de4aa2 --- /dev/null +++ b/vendor/github.com/magodo/aztft/internal/populate/populate_mssql_job.go @@ -0,0 +1,34 @@ +package populate + +import ( + "context" + "fmt" + + "github.com/magodo/armid" + "github.com/magodo/aztft/internal/client" +) + +func populateMssqlJob(b *client.ClientBuilder, id armid.ResourceId) ([]armid.ResourceId, error) { + resourceGroupId := id.RootScope().(*armid.ResourceGroup) + client, err := b.NewSqlJobsClient(resourceGroupId.SubscriptionId) + if err != nil { + return nil, err + } + resp, err := client.Get(context.Background(), resourceGroupId.Name, id.Names()[0], id.Names()[1], id.Names()[2], nil) + if err != nil { + return nil, fmt.Errorf("retrieving %q: %v", id, err) + } + props := resp.Job.Properties + if props == nil { + return nil, nil + } + + if props.Schedule == nil { + return nil, nil + } + + sid := id.Clone().(*armid.ScopedResourceId) + sid.AttrTypes = append(sid.AttrTypes, "schedules") + sid.AttrNames = append(sid.AttrTypes, "default") + return []armid.ResourceId{sid}, nil +} diff --git a/vendor/github.com/magodo/aztft/internal/resmap/map.json b/vendor/github.com/magodo/aztft/internal/resmap/map.json index f3724530e..3509327cd 100644 --- a/vendor/github.com/magodo/aztft/internal/resmap/map.json +++ b/vendor/github.com/magodo/aztft/internal/resmap/map.json @@ -88,6 +88,34 @@ ] } }, + "azurerm_ai_foundry": { + "management_plane": { + "scopes": [ + "/subscriptions/resourceGroups" + ], + "provider": "Microsoft.MachineLearningServices", + "types": [ + "workspaces" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Microsoft.MachineLearningServices/workspaces" + ] + } + }, + "azurerm_ai_foundry_project": { + "management_plane": { + "scopes": [ + "/subscriptions/resourceGroups" + ], + "provider": "Microsoft.MachineLearningServices", + "types": [ + "workspaces" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Microsoft.MachineLearningServices/workspaces" + ] + } + }, "azurerm_ai_services": { "management_plane": { "scopes": [ @@ -1377,6 +1405,20 @@ ] } }, + "azurerm_arc_kubernetes_provisioned_cluster": { + "management_plane": { + "scopes": [ + "/subscriptions/resourceGroups" + ], + "provider": "Microsoft.Kubernetes", + "types": [ + "connectedClusters" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Microsoft.Kubernetes/connectedClusters" + ] + } + }, "azurerm_arc_machine": { "management_plane": { "scopes": [ @@ -2638,6 +2680,36 @@ ] } }, + "azurerm_cognitive_account_rai_blocklist": { + "management_plane": { + "scopes": [ + "/subscriptions/resourceGroups" + ], + "provider": "Microsoft.CognitiveServices", + "types": [ + "accounts", + "raiBlocklists" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Microsoft.CognitiveServices/accounts/raiBlocklists" + ] + } + }, + "azurerm_cognitive_account_rai_policy": { + "management_plane": { + "scopes": [ + "/subscriptions/resourceGroups" + ], + "provider": "Microsoft.CognitiveServices", + "types": [ + "accounts", + "raiPolicies" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Microsoft.CognitiveServices/accounts/raiPolicies" + ] + } + }, "azurerm_cognitive_deployment": { "management_plane": { "scopes": [ @@ -2913,6 +2985,21 @@ ] } }, + "azurerm_container_registry_credential_set": { + "management_plane": { + "scopes": [ + "/subscriptions/resourceGroups" + ], + "provider": "Microsoft.ContainerRegistry", + "types": [ + "registries", + "credentialSets" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Microsoft.ContainerRegistry/registries/credentialSets" + ] + } + }, "azurerm_container_registry_scope_map": { "management_plane": { "scopes": [ @@ -3441,6 +3528,21 @@ ] } }, + "azurerm_dashboard_grafana_managed_private_endpoint": { + "management_plane": { + "scopes": [ + "/subscriptions/resourceGroups" + ], + "provider": "Microsoft.Dashboard", + "types": [ + "grafana", + "managedPrivateEndpoints" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Microsoft.Dashboard/grafana/managedPrivateEndpoints" + ] + } + }, "azurerm_data_factory": { "management_plane": { "scopes": [ @@ -4221,6 +4323,21 @@ ] } }, + "azurerm_data_protection_backup_instance_mysql_flexible_server": { + "management_plane": { + "scopes": [ + "/subscriptions/resourceGroups" + ], + "provider": "Microsoft.DataProtection", + "types": [ + "backupVaults", + "backupInstances" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Microsoft.DataProtection/backupVaults/backupInstances" + ] + } + }, "azurerm_data_protection_backup_instance_postgresql": { "management_plane": { "scopes": [ @@ -4355,6 +4472,22 @@ ] } }, + "azurerm_data_protection_backup_vault_customer_managed_key": { + "is_removed": true, + "remove_reason": "This is a property rather than a resource", + "management_plane": { + "scopes": [ + "/subscriptions/resourceGroups" + ], + "provider": "Microsoft.DataProtection", + "types": [ + "backupVaults" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Microsoft.DataProtection/backupVaults" + ] + } + }, "azurerm_data_protection_resource_guard": { "management_plane": { "scopes": [ @@ -4665,6 +4798,21 @@ ] } }, + "azurerm_dev_center_attached_network": { + "management_plane": { + "scopes": [ + "/subscriptions/resourceGroups" + ], + "provider": "Microsoft.DevCenter", + "types": [ + "devCenters", + "attachedNetworks" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Microsoft.DevCenter/devCenters/attachedNetworks" + ] + } + }, "azurerm_dev_center_catalog": { "management_plane": { "scopes": [ @@ -4768,6 +4916,21 @@ ] } }, + "azurerm_dev_center_project_pool": { + "management_plane": { + "scopes": [ + "/subscriptions/resourceGroups" + ], + "provider": "Microsoft.DevCenter", + "types": [ + "projects", + "pools" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Microsoft.DevCenter/projects/pools" + ] + } + }, "azurerm_dev_test_global_vm_shutdown_schedule": { "management_plane": { "scopes": [ @@ -5123,6 +5286,21 @@ ] } }, + "azurerm_dynatrace_tag_rules": { + "management_plane": { + "scopes": [ + "/subscriptions/resourceGroups" + ], + "provider": "Dynatrace.Observability", + "types": [ + "monitors", + "tagRules" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Dynatrace.Observability/monitors/tagRules" + ] + } + }, "azurerm_elastic_cloud_elasticsearch": { "management_plane": { "scopes": [ @@ -5251,6 +5429,20 @@ ] } }, + "azurerm_eventgrid_namespace": { + "management_plane": { + "scopes": [ + "/subscriptions/resourceGroups" + ], + "provider": "Microsoft.EventGrid", + "types": [ + "namespaces" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Microsoft.EventGrid/namespaces" + ] + } + }, "azurerm_eventgrid_system_topic": { "management_plane": { "scopes": [ @@ -5562,6 +5754,20 @@ ] } }, + "azurerm_fabric_capacity": { + "management_plane": { + "scopes": [ + "/subscriptions/resourceGroups" + ], + "provider": "Microsoft.Fabric", + "types": [ + "capacities" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Microsoft.Fabric/capacities" + ] + } + }, "azurerm_federated_identity_credential": { "management_plane": { "scopes": [ @@ -7763,6 +7969,51 @@ ] } }, + "azurerm_machine_learning_workspace_network_outbound_rule_fqdn": { + "management_plane": { + "scopes": [ + "/subscriptions/resourceGroups" + ], + "provider": "Microsoft.MachineLearningServices", + "types": [ + "workspaces", + "outboundRules" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Microsoft.MachineLearningServices/workspaces/outboundRules" + ] + } + }, + "azurerm_machine_learning_workspace_network_outbound_rule_private_endpoint": { + "management_plane": { + "scopes": [ + "/subscriptions/resourceGroups" + ], + "provider": "Microsoft.MachineLearningServices", + "types": [ + "workspaces", + "outboundRules" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Microsoft.MachineLearningServices/workspaces/outboundRules" + ] + } + }, + "azurerm_machine_learning_workspace_network_outbound_rule_service_tag": { + "management_plane": { + "scopes": [ + "/subscriptions/resourceGroups" + ], + "provider": "Microsoft.MachineLearningServices", + "types": [ + "workspaces", + "outboundRules" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Microsoft.MachineLearningServices/workspaces/outboundRules" + ] + } + }, "azurerm_maintenance_assignment_dedicated_host": { "management_plane": { "scopes": [ @@ -8205,6 +8456,20 @@ ] } }, + "azurerm_mongo_cluster": { + "management_plane": { + "scopes": [ + "/subscriptions/resourceGroups" + ], + "provider": "Microsoft.DocumentDB", + "types": [ + "mongoClusters" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Microsoft.DocumentDB/mongoClusters" + ] + } + }, "azurerm_monitor_aad_diagnostic_setting": { "management_plane": { "scopes": [ @@ -8565,6 +8830,22 @@ ] } }, + "azurerm_mssql_job": { + "management_plane": { + "scopes": [ + "/subscriptions/resourceGroups" + ], + "provider": "Microsoft.Sql", + "types": [ + "servers", + "jobAgents", + "jobs" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Microsoft.Sql/servers/jobAgents/jobs" + ] + } + }, "azurerm_mssql_job_agent": { "management_plane": { "scopes": [ @@ -8596,6 +8877,56 @@ ] } }, + "azurerm_mssql_job_schedule": { + "management_plane": { + "scopes": [ + "/subscriptions/resourceGroups" + ], + "provider": "Microsoft.Sql", + "types": [ + "servers", + "jobAgents", + "jobs", + "schedules" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Microsoft.Sql/servers/jobAgents/jobs" + ] + } + }, + "azurerm_mssql_job_step": { + "management_plane": { + "scopes": [ + "/subscriptions/resourceGroups" + ], + "provider": "Microsoft.Sql", + "types": [ + "servers", + "jobAgents", + "jobs", + "steps" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Microsoft.Sql/servers/jobAgents/jobs/steps" + ] + } + }, + "azurerm_mssql_job_target_group": { + "management_plane": { + "scopes": [ + "/subscriptions/resourceGroups" + ], + "provider": "Microsoft.Sql", + "types": [ + "servers", + "jobAgents", + "targetGroups" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Microsoft.Sql/servers/jobAgents/targetGroups" + ] + } + }, "azurerm_mssql_managed_database": { "management_plane": { "scopes": [ @@ -9018,6 +9349,36 @@ ] } }, + "azurerm_netapp_backup_policy": { + "management_plane": { + "scopes": [ + "/subscriptions/resourceGroups" + ], + "provider": "Microsoft.NetApp", + "types": [ + "netAppAccounts", + "backupPolicies" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Microsoft.NetApp/netAppAccounts/backupPolicies" + ] + } + }, + "azurerm_netapp_backup_vault": { + "management_plane": { + "scopes": [ + "/subscriptions/resourceGroups" + ], + "provider": "Microsoft.NetApp", + "types": [ + "netAppAccounts", + "backupVaults" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Microsoft.NetApp/netAppAccounts/backupVaults" + ] + } + }, "azurerm_netapp_pool": { "management_plane": { "scopes": [ @@ -9081,6 +9442,21 @@ ] } }, + "azurerm_netapp_volume_group_oracle": { + "management_plane": { + "scopes": [ + "/subscriptions/resourceGroups" + ], + "provider": "Microsoft.NetApp", + "types": [ + "netAppAccounts", + "volumeGroups" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Microsoft.NetApp/netAppAccounts/volumeGroups" + ] + } + }, "azurerm_netapp_volume_group_sap_hana": { "management_plane": { "scopes": [ @@ -9620,6 +9996,48 @@ ] } }, + "azurerm_oracle_autonomous_database": { + "management_plane": { + "scopes": [ + "/subscriptions/resourceGroups" + ], + "provider": "Oracle.Database", + "types": [ + "autonomousDatabases" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Oracle.Database/autonomousDatabases" + ] + } + }, + "azurerm_oracle_cloud_vm_cluster": { + "management_plane": { + "scopes": [ + "/subscriptions/resourceGroups" + ], + "provider": "Oracle.Database", + "types": [ + "cloudVmClusters" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Oracle.Database/cloudVmClusters" + ] + } + }, + "azurerm_oracle_exadata_infrastructure": { + "management_plane": { + "scopes": [ + "/subscriptions/resourceGroups" + ], + "provider": "Oracle.Database", + "types": [ + "cloudExadataInfrastructures" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Oracle.Database/cloudExadataInfrastructures" + ] + } + }, "azurerm_orbital_contact": { "management_plane": { "scopes": [ @@ -12661,6 +13079,22 @@ ] } }, + "azurerm_stack_hci_extension": { + "management_plane": { + "scopes": [ + "/subscriptions/resourceGroups" + ], + "provider": "Microsoft.AzureStackHCI", + "types": [ + "clusters", + "arcSettings", + "extensions" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Microsoft.AzureStackHCI/clusters/arcSettings/extensions" + ] + } + }, "azurerm_stack_hci_logical_network": { "management_plane": { "scopes": [ @@ -12675,6 +13109,34 @@ ] } }, + "azurerm_stack_hci_marketplace_gallery_image": { + "management_plane": { + "scopes": [ + "/subscriptions/resourceGroups" + ], + "provider": "Microsoft.AzureStackHCI", + "types": [ + "marketplaceGalleryImages" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Microsoft.AzureStackHCI/marketplaceGalleryImages" + ] + } + }, + "azurerm_stack_hci_network_interface": { + "management_plane": { + "scopes": [ + "/subscriptions/resourceGroups" + ], + "provider": "Microsoft.AzureStackHCI", + "types": [ + "networkInterfaces" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Microsoft.AzureStackHCI/networkInterfaces" + ] + } + }, "azurerm_stack_hci_storage_path": { "management_plane": { "scopes": [ @@ -12841,6 +13303,36 @@ ] } }, + "azurerm_storage_account_queue_properties": { + "management_plane": { + "scopes": [ + "/subscriptions/resourceGroups" + ], + "provider": "Microsoft.Storage", + "types": [ + "storageAccounts", + "queueServices" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Microsoft.Storage/storageAccounts" + ] + } + }, + "azurerm_storage_account_static_website": { + "management_plane": { + "scopes": [ + "/subscriptions/resourceGroups" + ], + "provider": "Microsoft.Storage", + "types": [ + "storageAccounts", + "staticWebsites" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Microsoft.Storage/storageAccounts" + ] + } + }, "azurerm_storage_blob": { "management_plane": { "scopes": [ @@ -12880,6 +13372,9 @@ "storageAccounts", "blobServices", "containers" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Microsoft.Storage/storageAccounts/blobServices/containers" ] } }, @@ -13080,6 +13575,9 @@ "storageAccounts", "fileServices", "shares" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Microsoft.Storage/storageAccounts/fileServices/shares" ] } }, @@ -14177,6 +14675,20 @@ ] } }, + "azurerm_trusted_signing_account": { + "management_plane": { + "scopes": [ + "/subscriptions/resourceGroups" + ], + "provider": "Microsoft.CodeSigning", + "types": [ + "codeSigningAccounts" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Microsoft.CodeSigning/codeSigningAccounts" + ] + } + }, "azurerm_user_assigned_identity": { "management_plane": { "scopes": [ @@ -14191,6 +14703,20 @@ ] } }, + "azurerm_video_indexer_account": { + "management_plane": { + "scopes": [ + "/subscriptions/resourceGroups" + ], + "provider": "Microsoft.VideoIndexer", + "types": [ + "accounts" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Microsoft.VideoIndexer/accounts" + ] + } + }, "azurerm_virtual_desktop_application": { "management_plane": { "scopes": [ @@ -14586,6 +15112,20 @@ ] } }, + "azurerm_virtual_machine_scale_set_standby_pool": { + "management_plane": { + "scopes": [ + "/subscriptions/resourceGroups" + ], + "provider": "Microsoft.StandbyPool", + "types": [ + "standbyVirtualMachinePools" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Microsoft.StandbyPool/standbyVirtualMachinePools" + ] + } + }, "azurerm_virtual_network": { "management_plane": { "scopes": [ diff --git a/vendor/github.com/magodo/aztft/internal/resmap/map_gen.json b/vendor/github.com/magodo/aztft/internal/resmap/map_gen.json index c2e41711d..b142436aa 100644 --- a/vendor/github.com/magodo/aztft/internal/resmap/map_gen.json +++ b/vendor/github.com/magodo/aztft/internal/resmap/map_gen.json @@ -87,6 +87,34 @@ ] } }, + "azurerm_ai_foundry": { + "management_plane": { + "scopes": [ + "/subscriptions/resourceGroups" + ], + "provider": "Microsoft.MachineLearningServices", + "types": [ + "workspaces" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Microsoft.MachineLearningServices/workspaces" + ] + } + }, + "azurerm_ai_foundry_project": { + "management_plane": { + "scopes": [ + "/subscriptions/resourceGroups" + ], + "provider": "Microsoft.MachineLearningServices", + "types": [ + "workspaces" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Microsoft.MachineLearningServices/workspaces" + ] + } + }, "azurerm_ai_services": { "management_plane": { "scopes": [ @@ -1360,6 +1388,20 @@ ] } }, + "azurerm_arc_kubernetes_provisioned_cluster": { + "management_plane": { + "scopes": [ + "/subscriptions/resourceGroups" + ], + "provider": "Microsoft.Kubernetes", + "types": [ + "connectedClusters" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Microsoft.Kubernetes/connectedClusters" + ] + } + }, "azurerm_arc_machine": { "management_plane": { "scopes": [ @@ -2614,6 +2656,36 @@ ] } }, + "azurerm_cognitive_account_rai_blocklist": { + "management_plane": { + "scopes": [ + "/subscriptions/resourceGroups" + ], + "provider": "Microsoft.CognitiveServices", + "types": [ + "accounts", + "raiBlocklists" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Microsoft.CognitiveServices/accounts/raiBlocklists" + ] + } + }, + "azurerm_cognitive_account_rai_policy": { + "management_plane": { + "scopes": [ + "/subscriptions/resourceGroups" + ], + "provider": "Microsoft.CognitiveServices", + "types": [ + "accounts", + "raiPolicies" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Microsoft.CognitiveServices/accounts/raiPolicies" + ] + } + }, "azurerm_cognitive_deployment": { "management_plane": { "scopes": [ @@ -2888,6 +2960,21 @@ ] } }, + "azurerm_container_registry_credential_set": { + "management_plane": { + "scopes": [ + "/subscriptions/resourceGroups" + ], + "provider": "Microsoft.ContainerRegistry", + "types": [ + "registries", + "credentialSets" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Microsoft.ContainerRegistry/registries/credentialSets" + ] + } + }, "azurerm_container_registry_scope_map": { "management_plane": { "scopes": [ @@ -3416,6 +3503,21 @@ ] } }, + "azurerm_dashboard_grafana_managed_private_endpoint": { + "management_plane": { + "scopes": [ + "/subscriptions/resourceGroups" + ], + "provider": "Microsoft.Dashboard", + "types": [ + "grafana", + "managedPrivateEndpoints" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Microsoft.Dashboard/grafana/managedPrivateEndpoints" + ] + } + }, "azurerm_data_factory": { "management_plane": { "scopes": [ @@ -4196,6 +4298,21 @@ ] } }, + "azurerm_data_protection_backup_instance_mysql_flexible_server": { + "management_plane": { + "scopes": [ + "/subscriptions/resourceGroups" + ], + "provider": "Microsoft.DataProtection", + "types": [ + "backupVaults", + "backupInstances" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Microsoft.DataProtection/backupVaults/backupInstances" + ] + } + }, "azurerm_data_protection_backup_instance_postgresql": { "management_plane": { "scopes": [ @@ -4330,6 +4447,20 @@ ] } }, + "azurerm_data_protection_backup_vault_customer_managed_key": { + "management_plane": { + "scopes": [ + "/subscriptions/resourceGroups" + ], + "provider": "Microsoft.DataProtection", + "types": [ + "backupVaults" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Microsoft.DataProtection/backupVaults" + ] + } + }, "azurerm_data_protection_resource_guard": { "management_plane": { "scopes": [ @@ -4638,6 +4769,21 @@ ] } }, + "azurerm_dev_center_attached_network": { + "management_plane": { + "scopes": [ + "/subscriptions/resourceGroups" + ], + "provider": "Microsoft.DevCenter", + "types": [ + "devCenters", + "attachedNetworks" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Microsoft.DevCenter/devCenters/attachedNetworks" + ] + } + }, "azurerm_dev_center_catalog": { "management_plane": { "scopes": [ @@ -4741,6 +4887,21 @@ ] } }, + "azurerm_dev_center_project_pool": { + "management_plane": { + "scopes": [ + "/subscriptions/resourceGroups" + ], + "provider": "Microsoft.DevCenter", + "types": [ + "projects", + "pools" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Microsoft.DevCenter/projects/pools" + ] + } + }, "azurerm_dev_test_global_vm_shutdown_schedule": { "management_plane": { "scopes": [ @@ -5096,6 +5257,35 @@ ] } }, + "azurerm_dynatrace_monitor": { + "management_plane": { + "scopes": [ + "/subscriptions/resourceGroups" + ], + "provider": "Dynatrace.Observability", + "types": [ + "monitors" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Dynatrace.Observability/monitors" + ] + } + }, + "azurerm_dynatrace_tag_rules": { + "management_plane": { + "scopes": [ + "/subscriptions/resourceGroups" + ], + "provider": "Dynatrace.Observability", + "types": [ + "monitors", + "tagRules" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Dynatrace.Observability/monitors/tagRules" + ] + } + }, "azurerm_elastic_cloud_elasticsearch": { "management_plane": { "scopes": [ @@ -5227,6 +5417,20 @@ ] } }, + "azurerm_eventgrid_namespace": { + "management_plane": { + "scopes": [ + "/subscriptions/resourceGroups" + ], + "provider": "Microsoft.EventGrid", + "types": [ + "namespaces" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Microsoft.EventGrid/namespaces" + ] + } + }, "azurerm_eventgrid_system_topic": { "management_plane": { "scopes": [ @@ -5536,6 +5740,20 @@ ] } }, + "azurerm_fabric_capacity": { + "management_plane": { + "scopes": [ + "/subscriptions/resourceGroups" + ], + "provider": "Microsoft.Fabric", + "types": [ + "capacities" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Microsoft.Fabric/capacities" + ] + } + }, "azurerm_federated_identity_credential": { "management_plane": { "scopes": [ @@ -7725,6 +7943,51 @@ ] } }, + "azurerm_machine_learning_workspace_network_outbound_rule_fqdn": { + "management_plane": { + "scopes": [ + "/subscriptions/resourceGroups" + ], + "provider": "Microsoft.MachineLearningServices", + "types": [ + "workspaces", + "outboundRules" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Microsoft.MachineLearningServices/workspaces/outboundRules" + ] + } + }, + "azurerm_machine_learning_workspace_network_outbound_rule_private_endpoint": { + "management_plane": { + "scopes": [ + "/subscriptions/resourceGroups" + ], + "provider": "Microsoft.MachineLearningServices", + "types": [ + "workspaces", + "outboundRules" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Microsoft.MachineLearningServices/workspaces/outboundRules" + ] + } + }, + "azurerm_machine_learning_workspace_network_outbound_rule_service_tag": { + "management_plane": { + "scopes": [ + "/subscriptions/resourceGroups" + ], + "provider": "Microsoft.MachineLearningServices", + "types": [ + "workspaces", + "outboundRules" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Microsoft.MachineLearningServices/workspaces/outboundRules" + ] + } + }, "azurerm_maintenance_assignment_dedicated_host": { "management_plane": { "scopes": [ @@ -8180,6 +8443,20 @@ ] } }, + "azurerm_mongo_cluster": { + "management_plane": { + "scopes": [ + "/subscriptions/resourceGroups" + ], + "provider": "Microsoft.DocumentDB", + "types": [ + "mongoClusters" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Microsoft.DocumentDB/mongoClusters" + ] + } + }, "azurerm_monitor_aad_diagnostic_setting": { "management_plane": { "scopes": [ @@ -8538,6 +8815,22 @@ ] } }, + "azurerm_mssql_job": { + "management_plane": { + "scopes": [ + "/subscriptions/resourceGroups" + ], + "provider": "Microsoft.Sql", + "types": [ + "servers", + "jobAgents", + "jobs" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Microsoft.Sql/servers/jobAgents/jobs" + ] + } + }, "azurerm_mssql_job_agent": { "management_plane": { "scopes": [ @@ -8569,6 +8862,55 @@ ] } }, + "azurerm_mssql_job_schedule": { + "management_plane": { + "scopes": [ + "/subscriptions/resourceGroups" + ], + "provider": "Microsoft.Sql", + "types": [ + "servers", + "jobAgents", + "jobs" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Microsoft.Sql/servers/jobAgents/jobs" + ] + } + }, + "azurerm_mssql_job_step": { + "management_plane": { + "scopes": [ + "/subscriptions/resourceGroups" + ], + "provider": "Microsoft.Sql", + "types": [ + "servers", + "jobAgents", + "jobs", + "steps" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Microsoft.Sql/servers/jobAgents/jobs/steps" + ] + } + }, + "azurerm_mssql_job_target_group": { + "management_plane": { + "scopes": [ + "/subscriptions/resourceGroups" + ], + "provider": "Microsoft.Sql", + "types": [ + "servers", + "jobAgents", + "targetGroups" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Microsoft.Sql/servers/jobAgents/targetGroups" + ] + } + }, "azurerm_mssql_managed_database": { "management_plane": { "scopes": [ @@ -8966,6 +9308,36 @@ ] } }, + "azurerm_netapp_backup_policy": { + "management_plane": { + "scopes": [ + "/subscriptions/resourceGroups" + ], + "provider": "Microsoft.NetApp", + "types": [ + "netAppAccounts", + "backupPolicies" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Microsoft.NetApp/netAppAccounts/backupPolicies" + ] + } + }, + "azurerm_netapp_backup_vault": { + "management_plane": { + "scopes": [ + "/subscriptions/resourceGroups" + ], + "provider": "Microsoft.NetApp", + "types": [ + "netAppAccounts", + "backupVaults" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Microsoft.NetApp/netAppAccounts/backupVaults" + ] + } + }, "azurerm_netapp_pool": { "management_plane": { "scopes": [ @@ -9029,6 +9401,21 @@ ] } }, + "azurerm_netapp_volume_group_oracle": { + "management_plane": { + "scopes": [ + "/subscriptions/resourceGroups" + ], + "provider": "Microsoft.NetApp", + "types": [ + "netAppAccounts", + "volumeGroups" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Microsoft.NetApp/netAppAccounts/volumeGroups" + ] + } + }, "azurerm_netapp_volume_group_sap_hana": { "management_plane": { "scopes": [ @@ -9490,6 +9877,48 @@ ] } }, + "azurerm_oracle_autonomous_database": { + "management_plane": { + "scopes": [ + "/subscriptions/resourceGroups" + ], + "provider": "Oracle.Database", + "types": [ + "autonomousDatabases" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Oracle.Database/autonomousDatabases" + ] + } + }, + "azurerm_oracle_cloud_vm_cluster": { + "management_plane": { + "scopes": [ + "/subscriptions/resourceGroups" + ], + "provider": "Oracle.Database", + "types": [ + "cloudVmClusters" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Oracle.Database/cloudVmClusters" + ] + } + }, + "azurerm_oracle_exadata_infrastructure": { + "management_plane": { + "scopes": [ + "/subscriptions/resourceGroups" + ], + "provider": "Oracle.Database", + "types": [ + "cloudExadataInfrastructures" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Oracle.Database/cloudExadataInfrastructures" + ] + } + }, "azurerm_orbital_contact": { "management_plane": { "scopes": [ @@ -12527,6 +12956,22 @@ ] } }, + "azurerm_stack_hci_extension": { + "management_plane": { + "scopes": [ + "/subscriptions/resourceGroups" + ], + "provider": "Microsoft.AzureStackHCI", + "types": [ + "clusters", + "arcSettings", + "extensions" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Microsoft.AzureStackHCI/clusters/arcSettings/extensions" + ] + } + }, "azurerm_stack_hci_logical_network": { "management_plane": { "scopes": [ @@ -12541,6 +12986,34 @@ ] } }, + "azurerm_stack_hci_marketplace_gallery_image": { + "management_plane": { + "scopes": [ + "/subscriptions/resourceGroups" + ], + "provider": "Microsoft.AzureStackHCI", + "types": [ + "marketplaceGalleryImages" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Microsoft.AzureStackHCI/marketplaceGalleryImages" + ] + } + }, + "azurerm_stack_hci_network_interface": { + "management_plane": { + "scopes": [ + "/subscriptions/resourceGroups" + ], + "provider": "Microsoft.AzureStackHCI", + "types": [ + "networkInterfaces" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Microsoft.AzureStackHCI/networkInterfaces" + ] + } + }, "azurerm_stack_hci_storage_path": { "management_plane": { "scopes": [ @@ -12699,6 +13172,34 @@ ] } }, + "azurerm_storage_account_queue_properties": { + "management_plane": { + "scopes": [ + "/subscriptions/resourceGroups" + ], + "provider": "Microsoft.Storage", + "types": [ + "storageAccounts" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Microsoft.Storage/storageAccounts" + ] + } + }, + "azurerm_storage_account_static_website": { + "management_plane": { + "scopes": [ + "/subscriptions/resourceGroups" + ], + "provider": "Microsoft.Storage", + "types": [ + "storageAccounts" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Microsoft.Storage/storageAccounts" + ] + } + }, "azurerm_storage_blob": { "management_plane": { "scopes": [ @@ -12737,6 +13238,9 @@ "storageAccounts", "blobServices", "containers" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Microsoft.Storage/storageAccounts/blobServices/containers" ] } }, @@ -12937,6 +13441,9 @@ "storageAccounts", "fileServices", "shares" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Microsoft.Storage/storageAccounts/fileServices/shares" ] } }, @@ -14038,6 +14545,20 @@ ] } }, + "azurerm_trusted_signing_account": { + "management_plane": { + "scopes": [ + "/subscriptions/resourceGroups" + ], + "provider": "Microsoft.CodeSigning", + "types": [ + "codeSigningAccounts" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Microsoft.CodeSigning/codeSigningAccounts" + ] + } + }, "azurerm_user_assigned_identity": { "management_plane": { "scopes": [ @@ -14052,6 +14573,20 @@ ] } }, + "azurerm_video_indexer_account": { + "management_plane": { + "scopes": [ + "/subscriptions/resourceGroups" + ], + "provider": "Microsoft.VideoIndexer", + "types": [ + "accounts" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Microsoft.VideoIndexer/accounts" + ] + } + }, "azurerm_virtual_desktop_application": { "management_plane": { "scopes": [ @@ -14433,6 +14968,20 @@ ] } }, + "azurerm_virtual_machine_scale_set_standby_pool": { + "management_plane": { + "scopes": [ + "/subscriptions/resourceGroups" + ], + "provider": "Microsoft.StandbyPool", + "types": [ + "standbyVirtualMachinePools" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Microsoft.StandbyPool/standbyVirtualMachinePools" + ] + } + }, "azurerm_virtual_network": { "management_plane": { "scopes": [ diff --git a/vendor/github.com/magodo/aztft/internal/resolve/resolve.go b/vendor/github.com/magodo/aztft/internal/resolve/resolve.go index b5657663d..fd2a3d963 100644 --- a/vendor/github.com/magodo/aztft/internal/resolve/resolve.go +++ b/vendor/github.com/magodo/aztft/internal/resolve/resolve.go @@ -76,6 +76,9 @@ var Resolvers = map[string]map[string]resolver{ "/MICROSOFT.MACHINELEARNINGSERVICES/WORKSPACES/DATASTORES": { "/SUBSCRIPTIONS/RESOURCEGROUPS": machineLearningDataStoresResolver{}, }, + "/MICROSOFT.MACHINELEARNINGSERVICES/WORKSPACES/OUTBOUNDRULES": { + "/SUBSCRIPTIONS/RESOURCEGROUPS": machineLearningOutboundRulesResolver{}, + }, "/MICROSOFT.STORAGECACHE/CACHES/STORAGETARGETS": { "/SUBSCRIPTIONS/RESOURCEGROUPS": storageCacheTargetsResolver{}, }, @@ -205,6 +208,15 @@ var Resolvers = map[string]map[string]resolver{ "/MICROSOFT.COGNITIVESERVICES/ACCOUNTS": { "/SUBSCRIPTIONS/RESOURCEGROUPS": cognitiveAccountsResolver{}, }, + "/MICROSOFT.KUBERNETES/CONNECTEDCLUSTERS": { + "/SUBSCRIPTIONS/RESOURCEGROUPS": hybridkubernetesConnectedClusterResolver{}, + }, + "/MICROSOFT.NETAPP/NETAPPACCOUNTS/VOLUMEGROUPS": { + "/SUBSCRIPTIONS/RESOURCEGROUPS": netappVolumeGroupResolver{}, + }, + "/MICROSOFT.MACHINELEARNINGSERVICES/WORKSPACES": { + "/SUBSCRIPTIONS/RESOURCEGROUPS": machineLearningWorkspaceResolver{}, + }, } type ResolveError struct { diff --git a/vendor/github.com/magodo/aztft/internal/resolve/resolve_data_protection_backup_instance.go b/vendor/github.com/magodo/aztft/internal/resolve/resolve_data_protection_backup_instance.go index 0bd09ad97..d20e4b135 100644 --- a/vendor/github.com/magodo/aztft/internal/resolve/resolve_data_protection_backup_instance.go +++ b/vendor/github.com/magodo/aztft/internal/resolve/resolve_data_protection_backup_instance.go @@ -18,6 +18,7 @@ func (dataProtectionBackupInstancesResolver) ResourceTypes() []string { "azurerm_data_protection_backup_instance_disk", "azurerm_data_protection_backup_instance_blob_storage", "azurerm_data_protection_backup_instance_kubernetes_cluster", + "azurerm_data_protection_backup_instance_mysql_flexible_server", } } @@ -54,6 +55,8 @@ func (dataProtectionBackupInstancesResolver) Resolve(b *client.ClientBuilder, id return "azurerm_data_protection_backup_instance_blob_storage", nil case "MICROSOFT.CONTAINERSERVICE/MANAGEDCLUSTERS": return "azurerm_data_protection_backup_instance_kubernetes_cluster", nil + case "MICROSOFT.DBFORMYSQL/FLEXIBLESERVERS": + return "azurerm_data_protection_backup_instance_mysql_flexible_server", nil default: return "", fmt.Errorf("unknown data source type: %s", *pdt) } diff --git a/vendor/github.com/magodo/aztft/internal/resolve/resolve_hybridkubernetes_connected_cluster.go b/vendor/github.com/magodo/aztft/internal/resolve/resolve_hybridkubernetes_connected_cluster.go new file mode 100644 index 000000000..6fbdd251f --- /dev/null +++ b/vendor/github.com/magodo/aztft/internal/resolve/resolve_hybridkubernetes_connected_cluster.go @@ -0,0 +1,36 @@ +package resolve + +import ( + "context" + "fmt" + + "github.com/magodo/armid" + "github.com/magodo/aztft/internal/client" +) + +type hybridkubernetesConnectedClusterResolver struct{} + +func (hybridkubernetesConnectedClusterResolver) ResourceTypes() []string { + return []string{"azurerm_arc_kubernetes_cluster", "azurerm_arc_kubernetes_provisioned_cluster"} +} + +func (hybridkubernetesConnectedClusterResolver) Resolve(b *client.ClientBuilder, id armid.ResourceId) (string, error) { + resourceGroupId := id.RootScope().(*armid.ResourceGroup) + client, err := b.NewHybridKubernetesConnectedClient(resourceGroupId.SubscriptionId) + if err != nil { + return "", err + } + resp, err := client.Get(context.Background(), resourceGroupId.Name, id.Names()[0], nil) + if err != nil { + return "", fmt.Errorf("retrieving %q: %v", id, err) + } + + // TODO: The Azure/azure-sdk-for-go uses the API version: 2021-10-01, which has no "Kind" defined. + _ = resp + + // kind := resp.Kind + // if kind == nil { + // return "", fmt.Errorf("unexpected nil kind in response") + // } + return "azurerm_arc_kubernetes_cluster", nil +} diff --git a/vendor/github.com/magodo/aztft/internal/resolve/resolve_machine_learning_compute.go b/vendor/github.com/magodo/aztft/internal/resolve/resolve_machine_learning_compute.go index bbb3974a8..394ae15a9 100644 --- a/vendor/github.com/magodo/aztft/internal/resolve/resolve_machine_learning_compute.go +++ b/vendor/github.com/magodo/aztft/internal/resolve/resolve_machine_learning_compute.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4" "github.com/magodo/armid" "github.com/magodo/aztft/internal/client" ) diff --git a/vendor/github.com/magodo/aztft/internal/resolve/resolve_machine_learning_datastore.go b/vendor/github.com/magodo/aztft/internal/resolve/resolve_machine_learning_datastore.go index 6e49d4822..bca943859 100644 --- a/vendor/github.com/magodo/aztft/internal/resolve/resolve_machine_learning_datastore.go +++ b/vendor/github.com/magodo/aztft/internal/resolve/resolve_machine_learning_datastore.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4" "github.com/magodo/armid" "github.com/magodo/aztft/internal/client" ) diff --git a/vendor/github.com/magodo/aztft/internal/resolve/resolve_machine_learning_outbound_rule.go b/vendor/github.com/magodo/aztft/internal/resolve/resolve_machine_learning_outbound_rule.go new file mode 100644 index 000000000..31dfce75f --- /dev/null +++ b/vendor/github.com/magodo/aztft/internal/resolve/resolve_machine_learning_outbound_rule.go @@ -0,0 +1,46 @@ +package resolve + +import ( + "context" + "fmt" + + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4" + "github.com/magodo/armid" + "github.com/magodo/aztft/internal/client" +) + +type machineLearningOutboundRulesResolver struct{} + +func (machineLearningOutboundRulesResolver) ResourceTypes() []string { + return []string{ + "azurerm_machine_learning_workspace_network_outbound_rule_service_tag", + "azurerm_machine_learning_workspace_network_outbound_rule_fqdn", + "azurerm_machine_learning_workspace_network_outbound_rule_private_endpoint", + } +} + +func (machineLearningOutboundRulesResolver) Resolve(b *client.ClientBuilder, id armid.ResourceId) (string, error) { + resourceGroupId := id.RootScope().(*armid.ResourceGroup) + client, err := b.NewMachineLearningOutboundRulesClient(resourceGroupId.SubscriptionId) + if err != nil { + return "", err + } + resp, err := client.Get(context.Background(), resourceGroupId.Name, id.Names()[0], id.Names()[1], nil) + if err != nil { + return "", fmt.Errorf("retrieving %q: %v", id, err) + } + props := resp.OutboundRuleBasicResource.Properties + if props == nil { + return "", fmt.Errorf("unexpected nil property in response") + } + switch props.(type) { + case *armmachinelearning.FqdnOutboundRule: + return "azurerm_machine_learning_workspace_network_outbound_rule_fqdn", nil + case *armmachinelearning.PrivateEndpointOutboundRule: + return "azurerm_machine_learning_workspace_network_outbound_rule_private_endpoint", nil + case *armmachinelearning.ServiceTagOutboundRule: + return "azurerm_machine_learning_workspace_network_outbound_rule_service_tag", nil + default: + return "", fmt.Errorf("unknown outbound rule resource type %T", props) + } +} diff --git a/vendor/github.com/magodo/aztft/internal/resolve/resolve_machine_leraning_workspace.go b/vendor/github.com/magodo/aztft/internal/resolve/resolve_machine_leraning_workspace.go new file mode 100644 index 000000000..8e8ebbbba --- /dev/null +++ b/vendor/github.com/magodo/aztft/internal/resolve/resolve_machine_leraning_workspace.go @@ -0,0 +1,45 @@ +package resolve + +import ( + "context" + "fmt" + "strings" + + "github.com/magodo/armid" + "github.com/magodo/aztft/internal/client" +) + +type machineLearningWorkspaceResolver struct{} + +func (machineLearningWorkspaceResolver) ResourceTypes() []string { + return []string{ + "azurerm_machine_learning_workspace", + "azurerm_ai_foundry_project", + "azurerm_ai_foundry", + } +} + +func (machineLearningWorkspaceResolver) Resolve(b *client.ClientBuilder, id armid.ResourceId) (string, error) { + resourceGroupId := id.RootScope().(*armid.ResourceGroup) + client, err := b.NewMachineLearningWorkspaceClient(resourceGroupId.SubscriptionId) + if err != nil { + return "", err + } + resp, err := client.Get(context.Background(), resourceGroupId.Name, id.Names()[0], nil) + if err != nil { + return "", fmt.Errorf("retrieving %q: %v", id, err) + } + kind := resp.Kind + if kind == nil { + return "", fmt.Errorf("unexpected nil kind in response") + } + switch strings.ToUpper(string(*kind)) { + case "DEFAULT", "FEATURESTORE": + return "azurerm_machine_learning_workspace", nil + case "PROJECT": + return "azurerm_ai_foundry_project", nil + case "HUB": + return "azurerm_ai_foundry", nil + } + return "", fmt.Errorf("unknown kind: %s", *kind) +} diff --git a/vendor/github.com/magodo/aztft/internal/resolve/resolve_netapp_volume_group.go b/vendor/github.com/magodo/aztft/internal/resolve/resolve_netapp_volume_group.go new file mode 100644 index 000000000..91c712a5a --- /dev/null +++ b/vendor/github.com/magodo/aztft/internal/resolve/resolve_netapp_volume_group.go @@ -0,0 +1,51 @@ +package resolve + +import ( + "context" + "fmt" + "strings" + + "github.com/magodo/armid" + "github.com/magodo/aztft/internal/client" +) + +type netappVolumeGroupResolver struct{} + +func (netappVolumeGroupResolver) ResourceTypes() []string { + return []string{ + "azurerm_netapp_volume_group_oracle", + "azurerm_netapp_volume_group_sap_hana", + } +} + +func (netappVolumeGroupResolver) Resolve(b *client.ClientBuilder, id armid.ResourceId) (string, error) { + resourceGroupId := id.RootScope().(*armid.ResourceGroup) + client, err := b.NewNetAppVolumeGroupClient(resourceGroupId.SubscriptionId) + if err != nil { + return "", err + } + resp, err := client.Get(context.Background(), resourceGroupId.Name, id.Names()[0], id.Names()[1], nil) + if err != nil { + return "", fmt.Errorf("retrieving %q: %v", id, err) + } + props := resp.VolumeGroupDetails.Properties + if props == nil { + return "", fmt.Errorf("unexpected nil properties in response") + } + gmetadata := props.GroupMetaData + if gmetadata == nil { + return "", fmt.Errorf("unexpected nil groupMetaData in response") + } + appType := gmetadata.ApplicationType + if appType == nil { + return "", fmt.Errorf("unexpected nil applicationType in response") + } + + switch strings.ToUpper(string(*appType)) { + case "ORACLE": + return "azurerm_netapp_volume_group_oracle", nil + case "SAP-HANA": + return "azurerm_netapp_volume_group_sap_hana", nil + } + return "", fmt.Errorf("unknown application type: %s", *appType) +} diff --git a/vendor/github.com/magodo/aztft/internal/tfid/build_storage_build.go b/vendor/github.com/magodo/aztft/internal/tfid/build_storage_build.go index 7d8de85a3..ccdf1ffaf 100644 --- a/vendor/github.com/magodo/aztft/internal/tfid/build_storage_build.go +++ b/vendor/github.com/magodo/aztft/internal/tfid/build_storage_build.go @@ -1,6 +1,7 @@ package tfid import ( + "context" "fmt" "net/url" @@ -8,14 +9,44 @@ import ( "github.com/magodo/aztft/internal/client" ) +func buildStorageContainerEndpoint(b *client.ClientBuilder, id armid.ResourceId, _ string) (string, error) { + resourceGroupId := id.RootScope().(*armid.ResourceGroup) + client, err := b.NewStorageAccountsClient(resourceGroupId.SubscriptionId) + if err != nil { + return "", err + } + resp, err := client.GetProperties(context.Background(), resourceGroupId.Name, id.Names()[0], nil) + if err != nil { + return "", fmt.Errorf("retrieving %q: %v", id, err) + } + props := resp.Account.Properties + if props == nil { + return "", fmt.Errorf("unexpected nil property in response") + } + endpoints := props.PrimaryEndpoints + if endpoints == nil { + return "", fmt.Errorf("unexpected nil properties.primaryEndpoints in response") + } + blobEndpoint := endpoints.Blob + if blobEndpoint == nil { + return "", fmt.Errorf("unexpected nil properties.primaryEndpoints.blob in response") + } + uri, err := url.Parse(*blobEndpoint) + if err != nil { + return "", fmt.Errorf("failed to parse url %s: %v", *blobEndpoint, err) + } + uri = uri.JoinPath(id.Names()[2]) + return uri.String(), nil +} + func buildStorageBlob(b *client.ClientBuilder, id armid.ResourceId, spec string) (string, error) { - containerId, err := buildStorageContainer(b, id.Parent(), spec) + containerUrl, err := buildStorageContainerEndpoint(b, id.Parent(), spec) if err != nil { return "", err } - uri, err := url.Parse(containerId) + uri, err := url.Parse(containerUrl) if err != nil { - return "", fmt.Errorf("parsing uri %s: %v", containerId, err) + return "", fmt.Errorf("parsing uri %s: %v", containerUrl, err) } uri = uri.JoinPath(id.Names()[3]) return uri.String(), nil diff --git a/vendor/github.com/magodo/aztft/internal/tfid/build_storage_container.go b/vendor/github.com/magodo/aztft/internal/tfid/build_storage_container.go deleted file mode 100644 index 2837ef74e..000000000 --- a/vendor/github.com/magodo/aztft/internal/tfid/build_storage_container.go +++ /dev/null @@ -1,40 +0,0 @@ -package tfid - -import ( - "context" - "fmt" - "net/url" - - "github.com/magodo/armid" - "github.com/magodo/aztft/internal/client" -) - -func buildStorageContainer(b *client.ClientBuilder, id armid.ResourceId, _ string) (string, error) { - resourceGroupId := id.RootScope().(*armid.ResourceGroup) - client, err := b.NewStorageAccountsClient(resourceGroupId.SubscriptionId) - if err != nil { - return "", err - } - resp, err := client.GetProperties(context.Background(), resourceGroupId.Name, id.Names()[0], nil) - if err != nil { - return "", fmt.Errorf("retrieving %q: %v", id, err) - } - props := resp.Account.Properties - if props == nil { - return "", fmt.Errorf("unexpected nil property in response") - } - endpoints := props.PrimaryEndpoints - if endpoints == nil { - return "", fmt.Errorf("unexpected nil properties.primaryEndpoints in response") - } - blobEndpoint := endpoints.Blob - if blobEndpoint == nil { - return "", fmt.Errorf("unexpected nil properties.primaryEndpoints.blob in response") - } - uri, err := url.Parse(*blobEndpoint) - if err != nil { - return "", fmt.Errorf("failed to parse url %s: %v", *blobEndpoint, err) - } - uri = uri.JoinPath(id.Names()[2]) - return uri.String(), nil -} diff --git a/vendor/github.com/magodo/aztft/internal/tfid/tfid.go b/vendor/github.com/magodo/aztft/internal/tfid/tfid.go index 1acc1319c..4a8d9db58 100644 --- a/vendor/github.com/magodo/aztft/internal/tfid/tfid.go +++ b/vendor/github.com/magodo/aztft/internal/tfid/tfid.go @@ -17,8 +17,6 @@ type builderFunc func(*client.ClientBuilder, armid.ResourceId, string) (string, var dynamicBuilders = map[string]builderFunc{ "azurerm_active_directory_domain_service": buildActiveDirectoryDomainService, "azurerm_storage_object_replication": buildStorageObjectReplication, - "azurerm_storage_share": buildStorageShare, - "azurerm_storage_container": buildStorageContainer, "azurerm_storage_queue": buildStorageQueue, "azurerm_storage_table": buildStorageTable, "azurerm_key_vault_key": buildKeyVaultKey, @@ -85,12 +83,6 @@ func StaticBuild(id armid.ResourceId, rt string) (string, error) { } switch rt { - case "azurerm_app_service_slot_virtual_network_swift_connection": - rid.AttrTypes[2] = "config" - case "azurerm_app_service_virtual_network_swift_connection": - rid.AttrTypes[1] = "config" - case "azurerm_synapse_workspace_sql_aad_admin": - rid.AttrTypes[1] = "sqlAdministrators" case "azurerm_monitor_diagnostic_setting": // input: /providers/Microsoft.Insights/diagnosticSettings/setting1 // tfid : |setting1 @@ -103,32 +95,14 @@ func StaticBuild(id armid.ResourceId, rt string) (string, error) { return "", fmt.Errorf("normalizing id %q for %q with import spec %q: %v", pid.String(), rt, importSpec, err) } return pid.String() + "|" + id.Names()[1], nil - case "azurerm_postgresql_active_directory_administrator": - pid := id.Parent() - if err := pid.Normalize(importSpec); err != nil { - return "", fmt.Errorf("normalizing id %q for %q with import spec %q: %v", pid.String(), rt, importSpec, err) - } - return pid.String(), nil - case "azurerm_iotcentral_application_network_rule_set": - pid := id.Parent() - if err := pid.Normalize(importSpec); err != nil { - return "", fmt.Errorf("normalizing id %q for %q with import spec %q: %v", pid.String(), rt, importSpec, err) - } - return pid.String(), nil - case "azurerm_role_definition": - scopeId := id.Parent() - if scopeId == nil { - scopeId = id.ParentScope() - } - scopePart := scopeId.String() - routePart := strings.TrimPrefix(id.String(), scopePart) - return routePart + "|" + scopePart, nil + case "azurerm_network_manager_deployment": managerId := id.Parent().Parent() if err := managerId.Normalize(importSpec); err != nil { return "", fmt.Errorf("normalizing id %q for %q with import spec %q: %v", managerId.String(), rt, importSpec, err) } return managerId.String() + "/commit|" + id.Names()[1] + "|" + id.Names()[2], nil + // Porperty-like resources case "azurerm_nat_gateway_public_ip_association": return buildIdForPropertyLikeResource(id.Parent(), lastItem(id.Names()), "azurerm_nat_gateway", "azurerm_public_ip", "|") @@ -137,7 +111,7 @@ func StaticBuild(id armid.ResourceId, rt string) (string, error) { case "azurerm_network_interface_application_gateway_backend_address_pool_association": return buildIdForPropertyLikeResource(id.Parent(), lastItem(id.Names()), "fake_azurerm_network_interface_ipconfig", "fake_azurerm_application_gateway_backend_address_pool", "|") case "azurerm_network_interface_application_security_group_association": - return buildIdForPropertyLikeResource(id.Parent(), lastItem(id.Names()), "fake_azurerm_network_interface_ipconfig", "azurerm_application_security_group", "|") + return buildIdForPropertyLikeResource(id.Parent().Parent(), lastItem(id.Names()), "azurerm_network_interface", "azurerm_application_security_group", "|") case "azurerm_network_interface_backend_address_pool_association": return buildIdForPropertyLikeResource(id.Parent(), lastItem(id.Names()), "fake_azurerm_network_interface_ipconfig", "azurerm_lb_backend_address_pool", "|") case "azurerm_network_interface_nat_rule_association": @@ -146,52 +120,52 @@ func StaticBuild(id armid.ResourceId, rt string) (string, error) { return buildIdForPropertyLikeResource(id.Parent(), lastItem(id.Names()), "azurerm_network_interface", "azurerm_network_security_group", "|") case "azurerm_virtual_desktop_workspace_application_group_association": return buildIdForPropertyLikeResource(id.Parent(), lastItem(id.Names()), "azurerm_virtual_desktop_workspace", "azurerm_virtual_desktop_application_group", "|") - case "azurerm_subnet_nat_gateway_association", - "azurerm_subnet_network_security_group_association", - "azurerm_subnet_route_table_association": - return id.Parent().String(), nil + case "azurerm_role_management_policy": + parentScopeId := id.ParentScope() + return id.String() + "|" + parentScopeId.String(), nil + case "azurerm_role_definition": + return id.String() + "|" + id.ParentScope().String(), nil + + /// + // Non-early return branches below case "azurerm_iothub_endpoint_cosmosdb_account", "azurerm_iothub_endpoint_eventhub", "azurerm_iothub_endpoint_servicebus_queue", "azurerm_iothub_endpoint_servicebus_topic", "azurerm_iothub_endpoint_storage_container": + rid.AttrTypes[len(rid.AttrTypes)-1] = "endpoints" + case "azurerm_app_service_slot_virtual_network_swift_connection": + rid.AttrTypes[2] = "config" + case "azurerm_app_service_virtual_network_swift_connection": + rid.AttrTypes[1] = "config" + case "azurerm_synapse_workspace_sql_aad_admin": + rid.AttrTypes[1] = "sqlAdministrators" + case "azurerm_role_assignment": + // This resource has scope any, causing it has no format string. Manually format the last segment. id := id.(*armid.ScopedResourceId) - id.AttrTypes[len(id.AttrTypes)-1] = "endpoints" - return id.String(), nil - case "azurerm_api_management_api_operation_policy", + id.AttrTypes[len(id.AttrTypes)-1] = "roleAssignments" + + // Parent ID + case "azurerm_postgresql_active_directory_administrator", + "azurerm_iotcentral_application_network_rule_set", + "azurerm_api_management_api_operation_policy", "azurerm_api_management_api_policy", "azurerm_api_management_policy", - "azurerm_api_management_product_policy": - pid := id.Parent() - if err := pid.Normalize(importSpec); err != nil { - return "", fmt.Errorf("normalizing id %q for %q with import spec %q: %v", pid.String(), rt, importSpec, err) - } - return pid.String(), nil - case "azurerm_netapp_account_encryption": - pid := id.Parent() - if err := pid.Normalize(importSpec); err != nil { - return "", fmt.Errorf("normalizing id %q for %q with import spec %q: %v", pid.String(), rt, importSpec, err) - } - return pid.String(), nil - case "azurerm_storage_blob_inventory_policy": - pid := id.Parent() - if err := pid.Normalize(importSpec); err != nil { - return "", fmt.Errorf("normalizing id %q for %q with import spec %q: %v", pid.String(), rt, importSpec, err) - } - return pid.String(), nil - case "azurerm_container_app_environment_custom_domain": - pid := id.Parent() - if err := pid.Normalize(importSpec); err != nil { - return "", fmt.Errorf("normalizing id %q for %q with import spec %q: %v", pid.String(), rt, importSpec, err) - } - return pid.String(), nil - case "azurerm_role_management_policy": - parentScopeId := id.ParentScope() - return id.String() + "|" + parentScopeId.String(), nil + "azurerm_api_management_product_policy", + "azurerm_netapp_account_encryption", + "azurerm_storage_blob_inventory_policy", + "azurerm_storage_account_queue_properties", + "azurerm_storage_account_static_website", + "azurerm_container_app_environment_custom_domain", + "azurerm_subnet_nat_gateway_association", + "azurerm_subnet_network_security_group_association", + "azurerm_subnet_route_table_association", + "azurerm_mssql_job_schedule": + id = id.Parent() } if importSpec != "" { - if err := rid.Normalize(importSpec); err != nil { + if err := id.Normalize(importSpec); err != nil { return "", fmt.Errorf("normalizing id %q for %q with import spec %q: %v", id.String(), rt, importSpec, err) } } diff --git a/vendor/github.com/mattn/go-colorable/colorable_appengine.go b/vendor/github.com/mattn/go-colorable/colorable_appengine.go deleted file mode 100644 index 416d1bbbf..000000000 --- a/vendor/github.com/mattn/go-colorable/colorable_appengine.go +++ /dev/null @@ -1,38 +0,0 @@ -//go:build appengine -// +build appengine - -package colorable - -import ( - "io" - "os" - - _ "github.com/mattn/go-isatty" -) - -// NewColorable returns new instance of Writer which handles escape sequence. -func NewColorable(file *os.File) io.Writer { - if file == nil { - panic("nil passed instead of *os.File to NewColorable()") - } - - return file -} - -// NewColorableStdout returns new instance of Writer which handles escape sequence for stdout. -func NewColorableStdout() io.Writer { - return os.Stdout -} - -// NewColorableStderr returns new instance of Writer which handles escape sequence for stderr. -func NewColorableStderr() io.Writer { - return os.Stderr -} - -// EnableColorsStdout enable colors if possible. -func EnableColorsStdout(enabled *bool) func() { - if enabled != nil { - *enabled = true - } - return func() {} -} diff --git a/vendor/github.com/mattn/go-colorable/colorable_others.go b/vendor/github.com/mattn/go-colorable/colorable_others.go index 766d94603..c1a78aa94 100644 --- a/vendor/github.com/mattn/go-colorable/colorable_others.go +++ b/vendor/github.com/mattn/go-colorable/colorable_others.go @@ -1,5 +1,5 @@ -//go:build !windows && !appengine -// +build !windows,!appengine +//go:build !windows || appengine +// +build !windows appengine package colorable diff --git a/vendor/github.com/mattn/go-colorable/colorable_windows.go b/vendor/github.com/mattn/go-colorable/colorable_windows.go index 1846ad5ab..2df7b8598 100644 --- a/vendor/github.com/mattn/go-colorable/colorable_windows.go +++ b/vendor/github.com/mattn/go-colorable/colorable_windows.go @@ -11,7 +11,7 @@ import ( "strconv" "strings" "sync" - "syscall" + syscall "golang.org/x/sys/windows" "unsafe" "github.com/mattn/go-isatty" @@ -73,7 +73,7 @@ type consoleCursorInfo struct { } var ( - kernel32 = syscall.NewLazyDLL("kernel32.dll") + kernel32 = syscall.NewLazySystemDLL("kernel32.dll") procGetConsoleScreenBufferInfo = kernel32.NewProc("GetConsoleScreenBufferInfo") procSetConsoleTextAttribute = kernel32.NewProc("SetConsoleTextAttribute") procSetConsoleCursorPosition = kernel32.NewProc("SetConsoleCursorPosition") @@ -87,8 +87,8 @@ var ( procCreateConsoleScreenBuffer = kernel32.NewProc("CreateConsoleScreenBuffer") ) -// Writer provides colorable Writer to the console -type Writer struct { +// writer provides colorable Writer to the console +type writer struct { out io.Writer handle syscall.Handle althandle syscall.Handle @@ -98,7 +98,7 @@ type Writer struct { mutex sync.Mutex } -// NewColorable returns new instance of Writer which handles escape sequence from File. +// NewColorable returns new instance of writer which handles escape sequence from File. func NewColorable(file *os.File) io.Writer { if file == nil { panic("nil passed instead of *os.File to NewColorable()") @@ -112,17 +112,17 @@ func NewColorable(file *os.File) io.Writer { var csbi consoleScreenBufferInfo handle := syscall.Handle(file.Fd()) procGetConsoleScreenBufferInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&csbi))) - return &Writer{out: file, handle: handle, oldattr: csbi.attributes, oldpos: coord{0, 0}} + return &writer{out: file, handle: handle, oldattr: csbi.attributes, oldpos: coord{0, 0}} } return file } -// NewColorableStdout returns new instance of Writer which handles escape sequence for stdout. +// NewColorableStdout returns new instance of writer which handles escape sequence for stdout. func NewColorableStdout() io.Writer { return NewColorable(os.Stdout) } -// NewColorableStderr returns new instance of Writer which handles escape sequence for stderr. +// NewColorableStderr returns new instance of writer which handles escape sequence for stderr. func NewColorableStderr() io.Writer { return NewColorable(os.Stderr) } @@ -434,7 +434,7 @@ func atoiWithDefault(s string, def int) (int, error) { } // Write writes data on console -func (w *Writer) Write(data []byte) (n int, err error) { +func (w *writer) Write(data []byte) (n int, err error) { w.mutex.Lock() defer w.mutex.Unlock() var csbi consoleScreenBufferInfo @@ -560,7 +560,7 @@ loop: } procSetConsoleCursorPosition.Call(uintptr(handle), *(*uintptr)(unsafe.Pointer(&csbi.cursorPosition))) case 'E': - n, err = strconv.Atoi(buf.String()) + n, err = atoiWithDefault(buf.String(), 1) if err != nil { continue } @@ -569,7 +569,7 @@ loop: csbi.cursorPosition.y += short(n) procSetConsoleCursorPosition.Call(uintptr(handle), *(*uintptr)(unsafe.Pointer(&csbi.cursorPosition))) case 'F': - n, err = strconv.Atoi(buf.String()) + n, err = atoiWithDefault(buf.String(), 1) if err != nil { continue } diff --git a/vendor/github.com/spf13/cast/README.md b/vendor/github.com/spf13/cast/README.md index 0e9e14593..1be666a45 100644 --- a/vendor/github.com/spf13/cast/README.md +++ b/vendor/github.com/spf13/cast/README.md @@ -1,6 +1,6 @@ # cast -[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/spf13/cast/ci.yaml?branch=master&style=flat-square)](https://github.com/spf13/cast/actions/workflows/ci.yaml) +[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/spf13/cast/test.yaml?branch=master&style=flat-square)](https://github.com/spf13/cast/actions/workflows/test.yaml) [![PkgGoDev](https://pkg.go.dev/badge/mod/github.com/spf13/cast)](https://pkg.go.dev/mod/github.com/spf13/cast) ![Go Version](https://img.shields.io/badge/go%20version-%3E=1.16-61CFDD.svg?style=flat-square) [![Go Report Card](https://goreportcard.com/badge/github.com/spf13/cast?style=flat-square)](https://goreportcard.com/report/github.com/spf13/cast) diff --git a/vendor/github.com/spf13/cast/caste.go b/vendor/github.com/spf13/cast/caste.go index cd9c04885..4181a2e75 100644 --- a/vendor/github.com/spf13/cast/caste.go +++ b/vendor/github.com/spf13/cast/caste.go @@ -613,12 +613,12 @@ func ToUint64E(i interface{}) (uint64, error) { switch s := i.(type) { case string: - v, err := strconv.ParseInt(trimZeroDecimal(s), 0, 0) + v, err := strconv.ParseUint(trimZeroDecimal(s), 0, 0) if err == nil { if v < 0 { return 0, errNegativeNotAllowed } - return uint64(v), nil + return v, nil } return 0, fmt.Errorf("unable to cast %#v of type %T to uint64", i, i) case json.Number: diff --git a/vendor/github.com/zclconf/go-cty/cty/convert/conversion.go b/vendor/github.com/zclconf/go-cty/cty/convert/conversion.go index bc79df8cf..423b62fc2 100644 --- a/vendor/github.com/zclconf/go-cty/cty/convert/conversion.go +++ b/vendor/github.com/zclconf/go-cty/cty/convert/conversion.go @@ -171,12 +171,16 @@ func getConversionKnown(in cty.Type, out cty.Type, unsafe bool) conversion { } if out.IsCapsuleType() { if fn := out.CapsuleOps().ConversionTo; fn != nil { - return conversionToCapsule(in, out, fn) + if conv := conversionToCapsule(in, out, fn); conv != nil { + return conv + } } } if in.IsCapsuleType() { if fn := in.CapsuleOps().ConversionFrom; fn != nil { - return conversionFromCapsule(in, out, fn) + if conv := conversionFromCapsule(in, out, fn); conv != nil { + return conv + } } } // No conversion operation is available, then. diff --git a/vendor/github.com/zclconf/go-cty/cty/convert/conversion_collection.go b/vendor/github.com/zclconf/go-cty/cty/convert/conversion_collection.go index 05399c9a6..451367c7d 100644 --- a/vendor/github.com/zclconf/go-cty/cty/convert/conversion_collection.go +++ b/vendor/github.com/zclconf/go-cty/cty/convert/conversion_collection.go @@ -162,7 +162,7 @@ func conversionCollectionToMap(ety cty.Type, conv conversion) conversion { if ety == cty.DynamicPseudoType { return cty.MapValEmpty(val.Type().ElementType()), nil } - return cty.MapValEmpty(ety), nil + return cty.MapValEmpty(ety.WithoutOptionalAttributesDeep()), nil } if ety.IsCollectionType() || ety.IsObjectType() { diff --git a/vendor/github.com/zclconf/go-cty/cty/function/function.go b/vendor/github.com/zclconf/go-cty/cty/function/function.go index 6fc968282..4d7c61d01 100644 --- a/vendor/github.com/zclconf/go-cty/cty/function/function.go +++ b/vendor/github.com/zclconf/go-cty/cty/function/function.go @@ -251,15 +251,25 @@ func (f Function) Call(args []cty.Value) (val cty.Value, err error) { if err != nil { return cty.NilVal, err } + + var resultMarks []cty.ValueMarks + // If we are returning an unknown early due to some unknown in the + // arguments, we first need to complete the iteration over all the args + // to ensure we collect as many marks as possible for resultMarks. + returnUnknown := false + if dynTypeArgs { // returnTypeForValues sets this if any argument was inexactly typed // and the corresponding parameter did not indicate it could deal with // that. In that case we also avoid calling the implementation function // because it will also typically not be ready to deal with that case. - return cty.UnknownVal(expectedType), nil + returnUnknown = true } - if refineResult := f.spec.RefineResult; refineResult != nil { + // If returnUnknown is set already, it means we don't have a refinement + // because of dynTypeArgs, but we may still need to collect marks from the + // rest of the arguments. + if refineResult := f.spec.RefineResult; refineResult != nil && !returnUnknown { // If this function has a refinement callback then we'll refine // our result value in the same way regardless of how we return. // It's the function author's responsibility to ensure that the @@ -280,15 +290,10 @@ func (f Function) Call(args []cty.Value) (val cty.Value, err error) { // values and marked values. posArgs := args[:len(f.spec.Params)] varArgs := args[len(f.spec.Params):] - var resultMarks []cty.ValueMarks for i, spec := range f.spec.Params { val := posArgs[i] - if !val.IsKnown() && !spec.AllowUnknown { - return cty.UnknownVal(expectedType), nil - } - if !spec.AllowMarked { unwrappedVal, marks := val.UnmarkDeep() if len(marks) > 0 { @@ -305,14 +310,15 @@ func (f Function) Call(args []cty.Value) (val cty.Value, err error) { args = newArgs } } + + if !val.IsKnown() && !spec.AllowUnknown { + returnUnknown = true + } } if f.spec.VarParam != nil { spec := f.spec.VarParam for i, val := range varArgs { - if !val.IsKnown() && !spec.AllowUnknown { - return cty.UnknownVal(expectedType), nil - } if !spec.AllowMarked { unwrappedVal, marks := val.UnmarkDeep() if len(marks) > 0 { @@ -323,9 +329,16 @@ func (f Function) Call(args []cty.Value) (val cty.Value, err error) { args = newArgs } } + if !val.IsKnown() && !spec.AllowUnknown { + returnUnknown = true + } } } + if returnUnknown { + return cty.UnknownVal(expectedType).WithMarks(resultMarks...), nil + } + var retVal cty.Value { // Intercept any panics from the function and return them as normal errors, diff --git a/vendor/github.com/zclconf/go-cty/cty/function/stdlib/collection.go b/vendor/github.com/zclconf/go-cty/cty/function/stdlib/collection.go index d1df73de2..d3df0ea96 100644 --- a/vendor/github.com/zclconf/go-cty/cty/function/stdlib/collection.go +++ b/vendor/github.com/zclconf/go-cty/cty/function/stdlib/collection.go @@ -170,6 +170,9 @@ var ElementFunc = function.New(&function.Spec{ return cty.DynamicPseudoType, errors.New("cannot use element function with an empty list") } index = index % len(etys) + if index < 0 { + index += len(etys) + } return etys[index], nil default: return cty.DynamicPseudoType, fmt.Errorf("cannot read elements from %s", listTy.FriendlyName()) diff --git a/vendor/github.com/zclconf/go-cty/cty/function/stdlib/format.go b/vendor/github.com/zclconf/go-cty/cty/function/stdlib/format.go index 2339cc33a..9da529b18 100644 --- a/vendor/github.com/zclconf/go-cty/cty/function/stdlib/format.go +++ b/vendor/github.com/zclconf/go-cty/cty/function/stdlib/format.go @@ -26,10 +26,11 @@ var FormatFunc = function.New(&function.Spec{ }, }, VarParam: &function.Parameter{ - Name: "args", - Type: cty.DynamicPseudoType, - AllowNull: true, - AllowUnknown: true, + Name: "args", + Type: cty.DynamicPseudoType, + AllowNull: true, + AllowUnknown: true, + AllowDynamicType: true, }, Type: function.StaticReturnType(cty.String), RefineResult: refineNonNull, @@ -64,10 +65,11 @@ var FormatListFunc = function.New(&function.Spec{ }, }, VarParam: &function.Parameter{ - Name: "args", - Type: cty.DynamicPseudoType, - AllowNull: true, - AllowUnknown: true, + Name: "args", + Type: cty.DynamicPseudoType, + AllowNull: true, + AllowUnknown: true, + AllowDynamicType: true, }, Type: function.StaticReturnType(cty.List(cty.String)), RefineResult: refineNonNull, @@ -199,32 +201,32 @@ var FormatListFunc = function.New(&function.Spec{ // // It supports the following "verbs": // -// %% Literal percent sign, consuming no value -// %v A default formatting of the value based on type, as described below. -// %#v JSON serialization of the value -// %t Converts to boolean and then produces "true" or "false" -// %b Converts to number, requires integer, produces binary representation -// %d Converts to number, requires integer, produces decimal representation -// %o Converts to number, requires integer, produces octal representation -// %x Converts to number, requires integer, produces hexadecimal representation -// with lowercase letters -// %X Like %x but with uppercase letters -// %e Converts to number, produces scientific notation like -1.234456e+78 -// %E Like %e but with an uppercase "E" representing the exponent -// %f Converts to number, produces decimal representation with fractional -// part but no exponent, like 123.456 -// %g %e for large exponents or %f otherwise -// %G %E for large exponents or %f otherwise -// %s Converts to string and produces the string's characters -// %q Converts to string and produces JSON-quoted string representation, -// like %v. +// %% Literal percent sign, consuming no value +// %v A default formatting of the value based on type, as described below. +// %#v JSON serialization of the value +// %t Converts to boolean and then produces "true" or "false" +// %b Converts to number, requires integer, produces binary representation +// %d Converts to number, requires integer, produces decimal representation +// %o Converts to number, requires integer, produces octal representation +// %x Converts to number, requires integer, produces hexadecimal representation +// with lowercase letters +// %X Like %x but with uppercase letters +// %e Converts to number, produces scientific notation like -1.234456e+78 +// %E Like %e but with an uppercase "E" representing the exponent +// %f Converts to number, produces decimal representation with fractional +// part but no exponent, like 123.456 +// %g %e for large exponents or %f otherwise +// %G %E for large exponents or %f otherwise +// %s Converts to string and produces the string's characters +// %q Converts to string and produces JSON-quoted string representation, +// like %v. // // The default format selections made by %v are: // -// string %s -// number %g -// bool %t -// other %#v +// string %s +// number %g +// bool %t +// other %#v // // Null values produce the literal keyword "null" for %v and %#v, and produce // an error otherwise. @@ -236,10 +238,10 @@ var FormatListFunc = function.New(&function.Spec{ // is used. A period with no following number is invalid. // For examples: // -// %f default width, default precision -// %9f width 9, default precision -// %.2f default width, precision 2 -// %9.2f width 9, precision 2 +// %f default width, default precision +// %9f width 9, default precision +// %.2f default width, precision 2 +// %9.2f width 9, precision 2 // // Width and precision are measured in unicode characters (grapheme clusters). // @@ -256,10 +258,10 @@ var FormatListFunc = function.New(&function.Spec{ // The following additional symbols can be used immediately after the percent // introducer as flags: // -// (a space) leave a space where the sign would be if number is positive -// + Include a sign for a number even if it is positive (numeric only) -// - Pad with spaces on the left rather than the right -// 0 Pad with zeros rather than spaces. +// (a space) leave a space where the sign would be if number is positive +// + Include a sign for a number even if it is positive (numeric only) +// - Pad with spaces on the left rather than the right +// 0 Pad with zeros rather than spaces. // // Flag characters are ignored for verbs that do not support them. // diff --git a/vendor/github.com/zclconf/go-cty/cty/json/type_implied.go b/vendor/github.com/zclconf/go-cty/cty/json/type_implied.go index 0fa13f6c5..1c90f342c 100644 --- a/vendor/github.com/zclconf/go-cty/cty/json/type_implied.go +++ b/vendor/github.com/zclconf/go-cty/cty/json/type_implied.go @@ -127,6 +127,29 @@ func impliedObjectType(dec *json.Decoder) (cty.Type, error) { if atys == nil { atys = make(map[string]cty.Type) } + if existing, exists := atys[key]; exists { + // We didn't originally have any special treatment for multiple properties + // of the same name, having the type of the last one "win". But that caused + // some confusing error messages when the same input was subsequently used + // with [Unmarshal] using the returned object type, since [Unmarshal] would + // try to fit all of the property values of that name to whatever type + // the last one had, and would likely fail in doing so if the earlier + // properties of the same name had different types. + // + // As a compromise to avoid breaking existing successful use of _consistently-typed_ + // redundant properties, we return an error here only if the new type + // differs from the old type. The error message doesn't mention that subtlety + // because the equal type carveout is a compatibility concession rather than + // a feature folks should rely on in new code. + if !existing.Equals(aty) { + // This error message is low-quality because ImpliedType doesn't do + // path tracking while it traverses, unlike Unmarshal. However, this + // is a rare enough case that we don't want to pay the cost of allocating + // another path-tracking buffer that would in most cases be ignored, + // so we just accept a low-context error message. :( + return cty.NilType, fmt.Errorf("duplicate %q property in JSON object", key) + } + } atys[key] = aty } diff --git a/vendor/github.com/zclconf/go-cty/cty/value_ops.go b/vendor/github.com/zclconf/go-cty/cty/value_ops.go index c4584bd93..246cc3d74 100644 --- a/vendor/github.com/zclconf/go-cty/cty/value_ops.go +++ b/vendor/github.com/zclconf/go-cty/cty/value_ops.go @@ -1028,22 +1028,45 @@ func (val Value) HasElement(elem Value) Value { } ty := val.Type() + unknownResult := UnknownVal(Bool).RefineNotNull() + if val.IsNull() { + panic("cannot HasElement on null value") + } + if !val.IsKnown() { + return unknownResult + } + if elem.Type() != DynamicPseudoType && val.Type().IsSetType() && val.Type().ElementType() != DynamicPseudoType { + // If we know the type of the given element and the element type of + // the set then they must match for the element to be present, because + // a set can't contain elements of any other type than its element type. + if !elem.Type().Equals(val.ty.ElementType()) { + return False + } + } if !ty.IsSetType() { panic("not a set type") } - if !val.IsKnown() || !elem.IsKnown() { - return UnknownVal(Bool).RefineNotNull() + if !elem.IsKnown() { + return unknownResult } - if val.IsNull() { - panic("can't call HasElement on a null value") + noMatchResult := False + if !val.IsWhollyKnown() { + // If the set has any unknown elements then a failure to find a + // known-value elem in it means that we don't know whether the + // element is present, rather than that it definitely isn't. + noMatchResult = unknownResult } if !ty.ElementType().Equals(elem.Type()) { + // A set can only contain an element of its own element type return False } s := val.v.(set.Set[interface{}]) - return BoolVal(s.Has(elem.v)) + if !s.Has(elem.v) { + return noMatchResult + } + return True } // Length returns the length of the receiver, which must be a collection type diff --git a/vendor/google.golang.org/protobuf/encoding/prototext/decode.go b/vendor/google.golang.org/protobuf/encoding/prototext/decode.go index 24bc98ac4..b53805056 100644 --- a/vendor/google.golang.org/protobuf/encoding/prototext/decode.go +++ b/vendor/google.golang.org/protobuf/encoding/prototext/decode.go @@ -185,11 +185,6 @@ func (d decoder) unmarshalMessage(m protoreflect.Message, checkDelims bool) erro } else if xtErr != nil && xtErr != protoregistry.NotFound { return d.newError(tok.Pos(), "unable to resolve [%s]: %v", tok.RawString(), xtErr) } - if flags.ProtoLegacy { - if fd != nil && fd.IsWeak() && fd.Message().IsPlaceholder() { - fd = nil // reset since the weak reference is not linked in - } - } // Handle unknown fields. if fd == nil { diff --git a/vendor/google.golang.org/protobuf/internal/editiondefaults/editions_defaults.binpb b/vendor/google.golang.org/protobuf/internal/editiondefaults/editions_defaults.binpb index ff6a38360..5a57ef6f3 100644 Binary files a/vendor/google.golang.org/protobuf/internal/editiondefaults/editions_defaults.binpb and b/vendor/google.golang.org/protobuf/internal/editiondefaults/editions_defaults.binpb differ diff --git a/vendor/google.golang.org/protobuf/internal/editionssupport/editions.go b/vendor/google.golang.org/protobuf/internal/editionssupport/editions.go index 08dad7692..bf1aba0e8 100644 --- a/vendor/google.golang.org/protobuf/internal/editionssupport/editions.go +++ b/vendor/google.golang.org/protobuf/internal/editionssupport/editions.go @@ -10,4 +10,9 @@ import "google.golang.org/protobuf/types/descriptorpb" const ( Minimum = descriptorpb.Edition_EDITION_PROTO2 Maximum = descriptorpb.Edition_EDITION_2023 + + // MaximumKnown is the maximum edition that is known to Go Protobuf, but not + // declared as supported. In other words: end users cannot use it, but + // testprotos inside Go Protobuf can. + MaximumKnown = descriptorpb.Edition_EDITION_2024 ) diff --git a/vendor/google.golang.org/protobuf/internal/encoding/tag/tag.go b/vendor/google.golang.org/protobuf/internal/encoding/tag/tag.go index 7e87c7604..669133d04 100644 --- a/vendor/google.golang.org/protobuf/internal/encoding/tag/tag.go +++ b/vendor/google.golang.org/protobuf/internal/encoding/tag/tag.go @@ -26,7 +26,7 @@ var byteType = reflect.TypeOf(byte(0)) // The type is the underlying field type (e.g., a repeated field may be // represented by []T, but the Go type passed in is just T). // A list of enum value descriptors must be provided for enum fields. -// This does not populate the Enum or Message (except for weak message). +// This does not populate the Enum or Message. // // This function is a best effort attempt; parsing errors are ignored. func Unmarshal(tag string, goType reflect.Type, evs protoreflect.EnumValueDescriptors) protoreflect.FieldDescriptor { @@ -109,9 +109,6 @@ func Unmarshal(tag string, goType reflect.Type, evs protoreflect.EnumValueDescri } case s == "packed": f.L1.EditionFeatures.IsPacked = true - case strings.HasPrefix(s, "weak="): - f.L1.IsWeak = true - f.L1.Message = filedesc.PlaceholderMessage(protoreflect.FullName(s[len("weak="):])) case strings.HasPrefix(s, "def="): // The default tag is special in that everything afterwards is the // default regardless of the presence of commas. @@ -183,9 +180,6 @@ func Marshal(fd protoreflect.FieldDescriptor, enumName string) string { // the exact same semantics from the previous generator. tag = append(tag, "json="+jsonName) } - if fd.IsWeak() { - tag = append(tag, "weak="+string(fd.Message().FullName())) - } // The previous implementation does not tag extension fields as proto3, // even when the field is defined in a proto3 file. Match that behavior // for consistency. diff --git a/vendor/google.golang.org/protobuf/internal/errors/is_go112.go b/vendor/google.golang.org/protobuf/internal/errors/is_go112.go deleted file mode 100644 index fbcd34920..000000000 --- a/vendor/google.golang.org/protobuf/internal/errors/is_go112.go +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright 2020 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build !go1.13 -// +build !go1.13 - -package errors - -import "reflect" - -// Is is a copy of Go 1.13's errors.Is for use with older Go versions. -func Is(err, target error) bool { - if target == nil { - return err == target - } - - isComparable := reflect.TypeOf(target).Comparable() - for { - if isComparable && err == target { - return true - } - if x, ok := err.(interface{ Is(error) bool }); ok && x.Is(target) { - return true - } - if err = unwrap(err); err == nil { - return false - } - } -} - -func unwrap(err error) error { - u, ok := err.(interface { - Unwrap() error - }) - if !ok { - return nil - } - return u.Unwrap() -} diff --git a/vendor/google.golang.org/protobuf/internal/errors/is_go113.go b/vendor/google.golang.org/protobuf/internal/errors/is_go113.go deleted file mode 100644 index 5e72f1cde..000000000 --- a/vendor/google.golang.org/protobuf/internal/errors/is_go113.go +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright 2020 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build go1.13 -// +build go1.13 - -package errors - -import "errors" - -// Is is errors.Is. -func Is(err, target error) bool { return errors.Is(err, target) } diff --git a/vendor/google.golang.org/protobuf/internal/filedesc/desc.go b/vendor/google.golang.org/protobuf/internal/filedesc/desc.go index fa790e0ff..688aabe43 100644 --- a/vendor/google.golang.org/protobuf/internal/filedesc/desc.go +++ b/vendor/google.golang.org/protobuf/internal/filedesc/desc.go @@ -19,7 +19,6 @@ import ( "google.golang.org/protobuf/internal/pragma" "google.golang.org/protobuf/internal/strs" "google.golang.org/protobuf/reflect/protoreflect" - "google.golang.org/protobuf/reflect/protoregistry" ) // Edition is an Enum for proto2.Edition @@ -32,6 +31,7 @@ const ( EditionProto2 Edition = 998 EditionProto3 Edition = 999 Edition2023 Edition = 1000 + Edition2024 Edition = 1001 EditionUnsupported Edition = 100000 ) @@ -77,31 +77,48 @@ type ( Locations SourceLocations } + // EditionFeatures is a frequently-instantiated struct, so please take care + // to minimize padding when adding new fields to this struct (add them in + // the right place/order). EditionFeatures struct { + // StripEnumPrefix determines if the plugin generates enum value + // constants as-is, with their prefix stripped, or both variants. + StripEnumPrefix int + // IsFieldPresence is true if field_presence is EXPLICIT // https://protobuf.dev/editions/features/#field_presence IsFieldPresence bool + // IsFieldPresence is true if field_presence is LEGACY_REQUIRED // https://protobuf.dev/editions/features/#field_presence IsLegacyRequired bool + // IsOpenEnum is true if enum_type is OPEN // https://protobuf.dev/editions/features/#enum_type IsOpenEnum bool + // IsPacked is true if repeated_field_encoding is PACKED // https://protobuf.dev/editions/features/#repeated_field_encoding IsPacked bool + // IsUTF8Validated is true if utf_validation is VERIFY // https://protobuf.dev/editions/features/#utf8_validation IsUTF8Validated bool + // IsDelimitedEncoded is true if message_encoding is DELIMITED // https://protobuf.dev/editions/features/#message_encoding IsDelimitedEncoded bool + // IsJSONCompliant is true if json_format is ALLOW // https://protobuf.dev/editions/features/#json_format IsJSONCompliant bool + // GenerateLegacyUnmarshalJSON determines if the plugin generates the // UnmarshalJSON([]byte) error method for enums. GenerateLegacyUnmarshalJSON bool + // APILevel controls which API (Open, Hybrid or Opaque) should be used + // for generated code (.pb.go files). + APILevel int } ) @@ -257,7 +274,6 @@ type ( Kind protoreflect.Kind StringName stringName IsProto3Optional bool // promoted from google.protobuf.FieldDescriptorProto - IsWeak bool // promoted from google.protobuf.FieldOptions IsLazy bool // promoted from google.protobuf.FieldOptions Default defaultValue ContainingOneof protoreflect.OneofDescriptor // must be consistent with Message.Oneofs.Fields @@ -351,7 +367,7 @@ func (fd *Field) IsPacked() bool { return fd.L1.EditionFeatures.IsPacked } func (fd *Field) IsExtension() bool { return false } -func (fd *Field) IsWeak() bool { return fd.L1.IsWeak } +func (fd *Field) IsWeak() bool { return false } func (fd *Field) IsLazy() bool { return fd.L1.IsLazy } func (fd *Field) IsList() bool { return fd.Cardinality() == protoreflect.Repeated && !fd.IsMap() } func (fd *Field) IsMap() bool { return fd.Message() != nil && fd.Message().IsMapEntry() } @@ -378,11 +394,6 @@ func (fd *Field) Enum() protoreflect.EnumDescriptor { return fd.L1.Enum } func (fd *Field) Message() protoreflect.MessageDescriptor { - if fd.L1.IsWeak { - if d, _ := protoregistry.GlobalFiles.FindDescriptorByName(fd.L1.Message.FullName()); d != nil { - return d.(protoreflect.MessageDescriptor) - } - } return fd.L1.Message } func (fd *Field) IsMapEntry() bool { diff --git a/vendor/google.golang.org/protobuf/internal/filedesc/desc_lazy.go b/vendor/google.golang.org/protobuf/internal/filedesc/desc_lazy.go index 67a51b327..d4c94458b 100644 --- a/vendor/google.golang.org/protobuf/internal/filedesc/desc_lazy.go +++ b/vendor/google.golang.org/protobuf/internal/filedesc/desc_lazy.go @@ -32,11 +32,6 @@ func (file *File) resolveMessages() { for j := range md.L2.Fields.List { fd := &md.L2.Fields.List[j] - // Weak fields are resolved upon actual use. - if fd.L1.IsWeak { - continue - } - // Resolve message field dependency. switch fd.L1.Kind { case protoreflect.EnumKind: @@ -150,8 +145,6 @@ func (fd *File) unmarshalFull(b []byte) { switch num { case genid.FileDescriptorProto_PublicDependency_field_number: fd.L2.Imports[v].IsPublic = true - case genid.FileDescriptorProto_WeakDependency_field_number: - fd.L2.Imports[v].IsWeak = true } case protowire.BytesType: v, m := protowire.ConsumeBytes(b) @@ -502,8 +495,6 @@ func (fd *Field) unmarshalOptions(b []byte) { switch num { case genid.FieldOptions_Packed_field_number: fd.L1.EditionFeatures.IsPacked = protowire.DecodeBool(v) - case genid.FieldOptions_Weak_field_number: - fd.L1.IsWeak = protowire.DecodeBool(v) case genid.FieldOptions_Lazy_field_number: fd.L1.IsLazy = protowire.DecodeBool(v) case FieldOptions_EnforceUTF8: diff --git a/vendor/google.golang.org/protobuf/internal/filedesc/editions.go b/vendor/google.golang.org/protobuf/internal/filedesc/editions.go index fd4d0c83d..10132c9b3 100644 --- a/vendor/google.golang.org/protobuf/internal/filedesc/editions.go +++ b/vendor/google.golang.org/protobuf/internal/filedesc/editions.go @@ -32,6 +32,14 @@ func unmarshalGoFeature(b []byte, parent EditionFeatures) EditionFeatures { v, m := protowire.ConsumeVarint(b) b = b[m:] parent.GenerateLegacyUnmarshalJSON = protowire.DecodeBool(v) + case genid.GoFeatures_ApiLevel_field_number: + v, m := protowire.ConsumeVarint(b) + b = b[m:] + parent.APILevel = int(v) + case genid.GoFeatures_StripEnumPrefix_field_number: + v, m := protowire.ConsumeVarint(b) + b = b[m:] + parent.StripEnumPrefix = int(v) default: panic(fmt.Sprintf("unkown field number %d while unmarshalling GoFeatures", num)) } diff --git a/vendor/google.golang.org/protobuf/internal/filetype/build.go b/vendor/google.golang.org/protobuf/internal/filetype/build.go index ba83fea44..e1b4130bd 100644 --- a/vendor/google.golang.org/protobuf/internal/filetype/build.go +++ b/vendor/google.golang.org/protobuf/internal/filetype/build.go @@ -63,7 +63,7 @@ type Builder struct { // message declarations in "flattened ordering". // // Dependencies are Go types for enums or messages referenced by - // message fields (excluding weak fields), for parent extended messages of + // message fields, for parent extended messages of // extension fields, for enums or messages referenced by extension fields, // and for input and output messages referenced by service methods. // Dependencies must come after declarations, but the ordering of diff --git a/vendor/google.golang.org/protobuf/internal/flags/flags.go b/vendor/google.golang.org/protobuf/internal/flags/flags.go index 58372dd34..a06ccabc2 100644 --- a/vendor/google.golang.org/protobuf/internal/flags/flags.go +++ b/vendor/google.golang.org/protobuf/internal/flags/flags.go @@ -6,7 +6,7 @@ package flags // ProtoLegacy specifies whether to enable support for legacy functionality -// such as MessageSets, weak fields, and various other obscure behavior +// such as MessageSets, and various other obscure behavior // that is necessary to maintain backwards compatibility with proto1 or // the pre-release variants of proto2 and proto3. // diff --git a/vendor/google.golang.org/protobuf/internal/genid/go_features_gen.go b/vendor/google.golang.org/protobuf/internal/genid/go_features_gen.go index 7f67cbb6e..f5ee7f5c2 100644 --- a/vendor/google.golang.org/protobuf/internal/genid/go_features_gen.go +++ b/vendor/google.golang.org/protobuf/internal/genid/go_features_gen.go @@ -21,13 +21,47 @@ const ( // Field names for pb.GoFeatures. const ( GoFeatures_LegacyUnmarshalJsonEnum_field_name protoreflect.Name = "legacy_unmarshal_json_enum" + GoFeatures_ApiLevel_field_name protoreflect.Name = "api_level" + GoFeatures_StripEnumPrefix_field_name protoreflect.Name = "strip_enum_prefix" GoFeatures_LegacyUnmarshalJsonEnum_field_fullname protoreflect.FullName = "pb.GoFeatures.legacy_unmarshal_json_enum" + GoFeatures_ApiLevel_field_fullname protoreflect.FullName = "pb.GoFeatures.api_level" + GoFeatures_StripEnumPrefix_field_fullname protoreflect.FullName = "pb.GoFeatures.strip_enum_prefix" ) // Field numbers for pb.GoFeatures. const ( GoFeatures_LegacyUnmarshalJsonEnum_field_number protoreflect.FieldNumber = 1 + GoFeatures_ApiLevel_field_number protoreflect.FieldNumber = 2 + GoFeatures_StripEnumPrefix_field_number protoreflect.FieldNumber = 3 +) + +// Full and short names for pb.GoFeatures.APILevel. +const ( + GoFeatures_APILevel_enum_fullname = "pb.GoFeatures.APILevel" + GoFeatures_APILevel_enum_name = "APILevel" +) + +// Enum values for pb.GoFeatures.APILevel. +const ( + GoFeatures_API_LEVEL_UNSPECIFIED_enum_value = 0 + GoFeatures_API_OPEN_enum_value = 1 + GoFeatures_API_HYBRID_enum_value = 2 + GoFeatures_API_OPAQUE_enum_value = 3 +) + +// Full and short names for pb.GoFeatures.StripEnumPrefix. +const ( + GoFeatures_StripEnumPrefix_enum_fullname = "pb.GoFeatures.StripEnumPrefix" + GoFeatures_StripEnumPrefix_enum_name = "StripEnumPrefix" +) + +// Enum values for pb.GoFeatures.StripEnumPrefix. +const ( + GoFeatures_STRIP_ENUM_PREFIX_UNSPECIFIED_enum_value = 0 + GoFeatures_STRIP_ENUM_PREFIX_KEEP_enum_value = 1 + GoFeatures_STRIP_ENUM_PREFIX_GENERATE_BOTH_enum_value = 2 + GoFeatures_STRIP_ENUM_PREFIX_STRIP_enum_value = 3 ) // Extension numbers diff --git a/vendor/google.golang.org/protobuf/internal/genid/goname.go b/vendor/google.golang.org/protobuf/internal/genid/goname.go index 693d2e9e1..99bb95baf 100644 --- a/vendor/google.golang.org/protobuf/internal/genid/goname.go +++ b/vendor/google.golang.org/protobuf/internal/genid/goname.go @@ -11,15 +11,10 @@ const ( SizeCache_goname = "sizeCache" SizeCacheA_goname = "XXX_sizecache" - WeakFields_goname = "weakFields" - WeakFieldsA_goname = "XXX_weak" - UnknownFields_goname = "unknownFields" UnknownFieldsA_goname = "XXX_unrecognized" ExtensionFields_goname = "extensionFields" ExtensionFieldsA_goname = "XXX_InternalExtensions" ExtensionFieldsB_goname = "XXX_extensions" - - WeakFieldPrefix_goname = "XXX_weak_" ) diff --git a/vendor/google.golang.org/protobuf/internal/genid/name.go b/vendor/google.golang.org/protobuf/internal/genid/name.go new file mode 100644 index 000000000..224f33930 --- /dev/null +++ b/vendor/google.golang.org/protobuf/internal/genid/name.go @@ -0,0 +1,12 @@ +// Copyright 2024 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package genid + +const ( + NoUnkeyedLiteral_goname = "noUnkeyedLiteral" + NoUnkeyedLiteralA_goname = "XXX_NoUnkeyedLiteral" + + BuilderSuffix_goname = "_builder" +) diff --git a/vendor/google.golang.org/protobuf/internal/impl/api_export_opaque.go b/vendor/google.golang.org/protobuf/internal/impl/api_export_opaque.go new file mode 100644 index 000000000..6075d6f69 --- /dev/null +++ b/vendor/google.golang.org/protobuf/internal/impl/api_export_opaque.go @@ -0,0 +1,128 @@ +// Copyright 2024 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package impl + +import ( + "strconv" + "sync/atomic" + "unsafe" + + "google.golang.org/protobuf/reflect/protoreflect" +) + +func (Export) UnmarshalField(msg any, fieldNum int32) { + UnmarshalField(msg.(protoreflect.ProtoMessage).ProtoReflect(), protoreflect.FieldNumber(fieldNum)) +} + +// Present checks the presence set for a certain field number (zero +// based, ordered by appearance in original proto file). part is +// a pointer to the correct element in the bitmask array, num is the +// field number unaltered. Example (field number 70 -> part = +// &m.XXX_presence[1], num = 70) +func (Export) Present(part *uint32, num uint32) bool { + // This hook will read an unprotected shadow presence set if + // we're unning under the race detector + raceDetectHookPresent(part, num) + return atomic.LoadUint32(part)&(1<<(num%32)) > 0 +} + +// SetPresent adds a field to the presence set. part is a pointer to +// the relevant element in the array and num is the field number +// unaltered. size is the number of fields in the protocol +// buffer. +func (Export) SetPresent(part *uint32, num uint32, size uint32) { + // This hook will mutate an unprotected shadow presence set if + // we're running under the race detector + raceDetectHookSetPresent(part, num, presenceSize(size)) + for { + old := atomic.LoadUint32(part) + if atomic.CompareAndSwapUint32(part, old, old|(1<<(num%32))) { + return + } + } +} + +// SetPresentNonAtomic is like SetPresent, but operates non-atomically. +// It is meant for use by builder methods, where the message is known not +// to be accessible yet by other goroutines. +func (Export) SetPresentNonAtomic(part *uint32, num uint32, size uint32) { + // This hook will mutate an unprotected shadow presence set if + // we're running under the race detector + raceDetectHookSetPresent(part, num, presenceSize(size)) + *part |= 1 << (num % 32) +} + +// ClearPresence removes a field from the presence set. part is a +// pointer to the relevant element in the presence array and num is +// the field number unaltered. +func (Export) ClearPresent(part *uint32, num uint32) { + // This hook will mutate an unprotected shadow presence set if + // we're running under the race detector + raceDetectHookClearPresent(part, num) + for { + old := atomic.LoadUint32(part) + if atomic.CompareAndSwapUint32(part, old, old&^(1<<(num%32))) { + return + } + } +} + +// interfaceToPointer takes a pointer to an empty interface whose value is a +// pointer type, and converts it into a "pointer" that points to the same +// target +func interfaceToPointer(i *any) pointer { + return pointer{p: (*[2]unsafe.Pointer)(unsafe.Pointer(i))[1]} +} + +func (p pointer) atomicGetPointer() pointer { + return pointer{p: atomic.LoadPointer((*unsafe.Pointer)(p.p))} +} + +func (p pointer) atomicSetPointer(q pointer) { + atomic.StorePointer((*unsafe.Pointer)(p.p), q.p) +} + +// AtomicCheckPointerIsNil takes an interface (which is a pointer to a +// pointer) and returns true if the pointed-to pointer is nil (using an +// atomic load). This function is inlineable and, on x86, just becomes a +// simple load and compare. +func (Export) AtomicCheckPointerIsNil(ptr any) bool { + return interfaceToPointer(&ptr).atomicGetPointer().IsNil() +} + +// AtomicSetPointer takes two interfaces (first is a pointer to a pointer, +// second is a pointer) and atomically sets the second pointer into location +// referenced by first pointer. Unfortunately, atomicSetPointer() does not inline +// (even on x86), so this does not become a simple store on x86. +func (Export) AtomicSetPointer(dstPtr, valPtr any) { + interfaceToPointer(&dstPtr).atomicSetPointer(interfaceToPointer(&valPtr)) +} + +// AtomicLoadPointer loads the pointer at the location pointed at by src, +// and stores that pointer value into the location pointed at by dst. +func (Export) AtomicLoadPointer(ptr Pointer, dst Pointer) { + *(*unsafe.Pointer)(unsafe.Pointer(dst)) = atomic.LoadPointer((*unsafe.Pointer)(unsafe.Pointer(ptr))) +} + +// AtomicInitializePointer makes ptr and dst point to the same value. +// +// If *ptr is a nil pointer, it sets *ptr = *dst. +// +// If *ptr is a non-nil pointer, it sets *dst = *ptr. +func (Export) AtomicInitializePointer(ptr Pointer, dst Pointer) { + if !atomic.CompareAndSwapPointer((*unsafe.Pointer)(ptr), unsafe.Pointer(nil), *(*unsafe.Pointer)(dst)) { + *(*unsafe.Pointer)(unsafe.Pointer(dst)) = atomic.LoadPointer((*unsafe.Pointer)(unsafe.Pointer(ptr))) + } +} + +// MessageFieldStringOf returns the field formatted as a string, +// either as the field name if resolvable otherwise as a decimal string. +func (Export) MessageFieldStringOf(md protoreflect.MessageDescriptor, n protoreflect.FieldNumber) string { + fd := md.Fields().ByNumber(n) + if fd != nil { + return string(fd.Name()) + } + return strconv.Itoa(int(n)) +} diff --git a/vendor/google.golang.org/protobuf/internal/impl/bitmap.go b/vendor/google.golang.org/protobuf/internal/impl/bitmap.go new file mode 100644 index 000000000..ea276547c --- /dev/null +++ b/vendor/google.golang.org/protobuf/internal/impl/bitmap.go @@ -0,0 +1,34 @@ +// Copyright 2024 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build !race + +package impl + +// There is no additional data as we're not running under race detector. +type RaceDetectHookData struct{} + +// Empty stubs for when not using the race detector. Calls to these from index.go should be optimized away. +func (presence) raceDetectHookPresent(num uint32) {} +func (presence) raceDetectHookSetPresent(num uint32, size presenceSize) {} +func (presence) raceDetectHookClearPresent(num uint32) {} +func (presence) raceDetectHookAllocAndCopy(src presence) {} + +// raceDetectHookPresent is called by the generated file interface +// (*proto.internalFuncs) Present to optionally read an unprotected +// shadow bitmap when race detection is enabled. In regular code it is +// a noop. +func raceDetectHookPresent(field *uint32, num uint32) {} + +// raceDetectHookSetPresent is called by the generated file interface +// (*proto.internalFuncs) SetPresent to optionally write an unprotected +// shadow bitmap when race detection is enabled. In regular code it is +// a noop. +func raceDetectHookSetPresent(field *uint32, num uint32, size presenceSize) {} + +// raceDetectHookClearPresent is called by the generated file interface +// (*proto.internalFuncs) ClearPresent to optionally write an unprotected +// shadow bitmap when race detection is enabled. In regular code it is +// a noop. +func raceDetectHookClearPresent(field *uint32, num uint32) {} diff --git a/vendor/google.golang.org/protobuf/internal/impl/bitmap_race.go b/vendor/google.golang.org/protobuf/internal/impl/bitmap_race.go new file mode 100644 index 000000000..e9a27583a --- /dev/null +++ b/vendor/google.golang.org/protobuf/internal/impl/bitmap_race.go @@ -0,0 +1,126 @@ +// Copyright 2024 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build race + +package impl + +// When running under race detector, we add a presence map of bytes, that we can access +// in the hook functions so that we trigger the race detection whenever we have concurrent +// Read-Writes or Write-Writes. The race detector does not otherwise detect invalid concurrent +// access to lazy fields as all updates of bitmaps and pointers are done using atomic operations. +type RaceDetectHookData struct { + shadowPresence *[]byte +} + +// Hooks for presence bitmap operations that allocate, read and write the shadowPresence +// using non-atomic operations. +func (data *RaceDetectHookData) raceDetectHookAlloc(size presenceSize) { + sp := make([]byte, size) + atomicStoreShadowPresence(&data.shadowPresence, &sp) +} + +func (p presence) raceDetectHookPresent(num uint32) { + data := p.toRaceDetectData() + if data == nil { + return + } + sp := atomicLoadShadowPresence(&data.shadowPresence) + if sp != nil { + _ = (*sp)[num] + } +} + +func (p presence) raceDetectHookSetPresent(num uint32, size presenceSize) { + data := p.toRaceDetectData() + if data == nil { + return + } + sp := atomicLoadShadowPresence(&data.shadowPresence) + if sp == nil { + data.raceDetectHookAlloc(size) + sp = atomicLoadShadowPresence(&data.shadowPresence) + } + (*sp)[num] = 1 +} + +func (p presence) raceDetectHookClearPresent(num uint32) { + data := p.toRaceDetectData() + if data == nil { + return + } + sp := atomicLoadShadowPresence(&data.shadowPresence) + if sp != nil { + (*sp)[num] = 0 + + } +} + +// raceDetectHookAllocAndCopy allocates a new shadowPresence slice at lazy and copies +// shadowPresence bytes from src to lazy. +func (p presence) raceDetectHookAllocAndCopy(q presence) { + sData := q.toRaceDetectData() + dData := p.toRaceDetectData() + if sData == nil { + return + } + srcSp := atomicLoadShadowPresence(&sData.shadowPresence) + if srcSp == nil { + atomicStoreShadowPresence(&dData.shadowPresence, nil) + return + } + n := len(*srcSp) + dSlice := make([]byte, n) + atomicStoreShadowPresence(&dData.shadowPresence, &dSlice) + for i := 0; i < n; i++ { + dSlice[i] = (*srcSp)[i] + } +} + +// raceDetectHookPresent is called by the generated file interface +// (*proto.internalFuncs) Present to optionally read an unprotected +// shadow bitmap when race detection is enabled. In regular code it is +// a noop. +func raceDetectHookPresent(field *uint32, num uint32) { + data := findPointerToRaceDetectData(field, num) + if data == nil { + return + } + sp := atomicLoadShadowPresence(&data.shadowPresence) + if sp != nil { + _ = (*sp)[num] + } +} + +// raceDetectHookSetPresent is called by the generated file interface +// (*proto.internalFuncs) SetPresent to optionally write an unprotected +// shadow bitmap when race detection is enabled. In regular code it is +// a noop. +func raceDetectHookSetPresent(field *uint32, num uint32, size presenceSize) { + data := findPointerToRaceDetectData(field, num) + if data == nil { + return + } + sp := atomicLoadShadowPresence(&data.shadowPresence) + if sp == nil { + data.raceDetectHookAlloc(size) + sp = atomicLoadShadowPresence(&data.shadowPresence) + } + (*sp)[num] = 1 +} + +// raceDetectHookClearPresent is called by the generated file interface +// (*proto.internalFuncs) ClearPresent to optionally write an unprotected +// shadow bitmap when race detection is enabled. In regular code it is +// a noop. +func raceDetectHookClearPresent(field *uint32, num uint32) { + data := findPointerToRaceDetectData(field, num) + if data == nil { + return + } + sp := atomicLoadShadowPresence(&data.shadowPresence) + if sp != nil { + (*sp)[num] = 0 + } +} diff --git a/vendor/google.golang.org/protobuf/internal/impl/checkinit.go b/vendor/google.golang.org/protobuf/internal/impl/checkinit.go index f29e6a8fa..fe2c719ce 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/checkinit.go +++ b/vendor/google.golang.org/protobuf/internal/impl/checkinit.go @@ -35,6 +35,12 @@ func (mi *MessageInfo) checkInitializedPointer(p pointer) error { } return nil } + + var presence presence + if mi.presenceOffset.IsValid() { + presence = p.Apply(mi.presenceOffset).PresenceInfo() + } + if mi.extensionOffset.IsValid() { e := p.Apply(mi.extensionOffset).Extensions() if err := mi.isInitExtensions(e); err != nil { @@ -45,6 +51,33 @@ func (mi *MessageInfo) checkInitializedPointer(p pointer) error { if !f.isRequired && f.funcs.isInit == nil { continue } + + if f.presenceIndex != noPresence { + if !presence.Present(f.presenceIndex) { + if f.isRequired { + return errors.RequiredNotSet(string(mi.Desc.Fields().ByNumber(f.num).FullName())) + } + continue + } + if f.funcs.isInit != nil { + f.mi.init() + if f.mi.needsInitCheck { + if f.isLazy && p.Apply(f.offset).AtomicGetPointer().IsNil() { + lazy := *p.Apply(mi.lazyOffset).LazyInfoPtr() + if !lazy.AllowedPartial() { + // Nothing to see here, it was checked on unmarshal + continue + } + mi.lazyUnmarshal(p, f.num) + } + if err := f.funcs.isInit(p.Apply(f.offset), f); err != nil { + return err + } + } + } + continue + } + fptr := p.Apply(f.offset) if f.isPointer && fptr.Elem().IsNil() { if f.isRequired { diff --git a/vendor/google.golang.org/protobuf/internal/impl/codec_field.go b/vendor/google.golang.org/protobuf/internal/impl/codec_field.go index 7c1f66c8c..d14d7d93c 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/codec_field.go +++ b/vendor/google.golang.org/protobuf/internal/impl/codec_field.go @@ -5,15 +5,12 @@ package impl import ( - "fmt" "reflect" - "sync" "google.golang.org/protobuf/encoding/protowire" "google.golang.org/protobuf/internal/errors" "google.golang.org/protobuf/proto" "google.golang.org/protobuf/reflect/protoreflect" - "google.golang.org/protobuf/reflect/protoregistry" "google.golang.org/protobuf/runtime/protoiface" ) @@ -121,78 +118,6 @@ func (mi *MessageInfo) initOneofFieldCoders(od protoreflect.OneofDescriptor, si } } -func makeWeakMessageFieldCoder(fd protoreflect.FieldDescriptor) pointerCoderFuncs { - var once sync.Once - var messageType protoreflect.MessageType - lazyInit := func() { - once.Do(func() { - messageName := fd.Message().FullName() - messageType, _ = protoregistry.GlobalTypes.FindMessageByName(messageName) - }) - } - - return pointerCoderFuncs{ - size: func(p pointer, f *coderFieldInfo, opts marshalOptions) int { - m, ok := p.WeakFields().get(f.num) - if !ok { - return 0 - } - lazyInit() - if messageType == nil { - panic(fmt.Sprintf("weak message %v is not linked in", fd.Message().FullName())) - } - return sizeMessage(m, f.tagsize, opts) - }, - marshal: func(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - m, ok := p.WeakFields().get(f.num) - if !ok { - return b, nil - } - lazyInit() - if messageType == nil { - panic(fmt.Sprintf("weak message %v is not linked in", fd.Message().FullName())) - } - return appendMessage(b, m, f.wiretag, opts) - }, - unmarshal: func(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (unmarshalOutput, error) { - fs := p.WeakFields() - m, ok := fs.get(f.num) - if !ok { - lazyInit() - if messageType == nil { - return unmarshalOutput{}, errUnknown - } - m = messageType.New().Interface() - fs.set(f.num, m) - } - return consumeMessage(b, m, wtyp, opts) - }, - isInit: func(p pointer, f *coderFieldInfo) error { - m, ok := p.WeakFields().get(f.num) - if !ok { - return nil - } - return proto.CheckInitialized(m) - }, - merge: func(dst, src pointer, f *coderFieldInfo, opts mergeOptions) { - sm, ok := src.WeakFields().get(f.num) - if !ok { - return - } - dm, ok := dst.WeakFields().get(f.num) - if !ok { - lazyInit() - if messageType == nil { - panic(fmt.Sprintf("weak message %v is not linked in", fd.Message().FullName())) - } - dm = messageType.New().Interface() - dst.WeakFields().set(f.num, dm) - } - opts.Merge(dm, sm) - }, - } -} - func makeMessageFieldCoder(fd protoreflect.FieldDescriptor, ft reflect.Type) pointerCoderFuncs { if mi := getMessageInfo(ft); mi != nil { funcs := pointerCoderFuncs{ diff --git a/vendor/google.golang.org/protobuf/internal/impl/codec_field_opaque.go b/vendor/google.golang.org/protobuf/internal/impl/codec_field_opaque.go new file mode 100644 index 000000000..76818ea25 --- /dev/null +++ b/vendor/google.golang.org/protobuf/internal/impl/codec_field_opaque.go @@ -0,0 +1,264 @@ +// Copyright 2024 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package impl + +import ( + "fmt" + "reflect" + + "google.golang.org/protobuf/encoding/protowire" + "google.golang.org/protobuf/internal/errors" + "google.golang.org/protobuf/reflect/protoreflect" +) + +func makeOpaqueMessageFieldCoder(fd protoreflect.FieldDescriptor, ft reflect.Type) (*MessageInfo, pointerCoderFuncs) { + mi := getMessageInfo(ft) + if mi == nil { + panic(fmt.Sprintf("invalid field: %v: unsupported message type %v", fd.FullName(), ft)) + } + switch fd.Kind() { + case protoreflect.MessageKind: + return mi, pointerCoderFuncs{ + size: sizeOpaqueMessage, + marshal: appendOpaqueMessage, + unmarshal: consumeOpaqueMessage, + isInit: isInitOpaqueMessage, + merge: mergeOpaqueMessage, + } + case protoreflect.GroupKind: + return mi, pointerCoderFuncs{ + size: sizeOpaqueGroup, + marshal: appendOpaqueGroup, + unmarshal: consumeOpaqueGroup, + isInit: isInitOpaqueMessage, + merge: mergeOpaqueMessage, + } + } + panic("unexpected field kind") +} + +func sizeOpaqueMessage(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { + return protowire.SizeBytes(f.mi.sizePointer(p.AtomicGetPointer(), opts)) + f.tagsize +} + +func appendOpaqueMessage(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { + mp := p.AtomicGetPointer() + calculatedSize := f.mi.sizePointer(mp, opts) + b = protowire.AppendVarint(b, f.wiretag) + b = protowire.AppendVarint(b, uint64(calculatedSize)) + before := len(b) + b, err := f.mi.marshalAppendPointer(b, mp, opts) + if measuredSize := len(b) - before; calculatedSize != measuredSize && err == nil { + return nil, errors.MismatchedSizeCalculation(calculatedSize, measuredSize) + } + return b, err +} + +func consumeOpaqueMessage(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) { + if wtyp != protowire.BytesType { + return out, errUnknown + } + v, n := protowire.ConsumeBytes(b) + if n < 0 { + return out, errDecode + } + mp := p.AtomicGetPointer() + if mp.IsNil() { + mp = p.AtomicSetPointerIfNil(pointerOfValue(reflect.New(f.mi.GoReflectType.Elem()))) + } + o, err := f.mi.unmarshalPointer(v, mp, 0, opts) + if err != nil { + return out, err + } + out.n = n + out.initialized = o.initialized + return out, nil +} + +func isInitOpaqueMessage(p pointer, f *coderFieldInfo) error { + mp := p.AtomicGetPointer() + if mp.IsNil() { + return nil + } + return f.mi.checkInitializedPointer(mp) +} + +func mergeOpaqueMessage(dst, src pointer, f *coderFieldInfo, opts mergeOptions) { + dstmp := dst.AtomicGetPointer() + if dstmp.IsNil() { + dstmp = dst.AtomicSetPointerIfNil(pointerOfValue(reflect.New(f.mi.GoReflectType.Elem()))) + } + f.mi.mergePointer(dstmp, src.AtomicGetPointer(), opts) +} + +func sizeOpaqueGroup(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { + return 2*f.tagsize + f.mi.sizePointer(p.AtomicGetPointer(), opts) +} + +func appendOpaqueGroup(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { + b = protowire.AppendVarint(b, f.wiretag) // start group + b, err := f.mi.marshalAppendPointer(b, p.AtomicGetPointer(), opts) + b = protowire.AppendVarint(b, f.wiretag+1) // end group + return b, err +} + +func consumeOpaqueGroup(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) { + if wtyp != protowire.StartGroupType { + return out, errUnknown + } + mp := p.AtomicGetPointer() + if mp.IsNil() { + mp = p.AtomicSetPointerIfNil(pointerOfValue(reflect.New(f.mi.GoReflectType.Elem()))) + } + o, e := f.mi.unmarshalPointer(b, mp, f.num, opts) + return o, e +} + +func makeOpaqueRepeatedMessageFieldCoder(fd protoreflect.FieldDescriptor, ft reflect.Type) (*MessageInfo, pointerCoderFuncs) { + if ft.Kind() != reflect.Ptr || ft.Elem().Kind() != reflect.Slice { + panic(fmt.Sprintf("invalid field: %v: unsupported type for opaque repeated message: %v", fd.FullName(), ft)) + } + mt := ft.Elem().Elem() // *[]*T -> *T + mi := getMessageInfo(mt) + if mi == nil { + panic(fmt.Sprintf("invalid field: %v: unsupported message type %v", fd.FullName(), mt)) + } + switch fd.Kind() { + case protoreflect.MessageKind: + return mi, pointerCoderFuncs{ + size: sizeOpaqueMessageSlice, + marshal: appendOpaqueMessageSlice, + unmarshal: consumeOpaqueMessageSlice, + isInit: isInitOpaqueMessageSlice, + merge: mergeOpaqueMessageSlice, + } + case protoreflect.GroupKind: + return mi, pointerCoderFuncs{ + size: sizeOpaqueGroupSlice, + marshal: appendOpaqueGroupSlice, + unmarshal: consumeOpaqueGroupSlice, + isInit: isInitOpaqueMessageSlice, + merge: mergeOpaqueMessageSlice, + } + } + panic("unexpected field kind") +} + +func sizeOpaqueMessageSlice(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { + s := p.AtomicGetPointer().PointerSlice() + n := 0 + for _, v := range s { + n += protowire.SizeBytes(f.mi.sizePointer(v, opts)) + f.tagsize + } + return n +} + +func appendOpaqueMessageSlice(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { + s := p.AtomicGetPointer().PointerSlice() + var err error + for _, v := range s { + b = protowire.AppendVarint(b, f.wiretag) + siz := f.mi.sizePointer(v, opts) + b = protowire.AppendVarint(b, uint64(siz)) + before := len(b) + b, err = f.mi.marshalAppendPointer(b, v, opts) + if err != nil { + return b, err + } + if measuredSize := len(b) - before; siz != measuredSize { + return nil, errors.MismatchedSizeCalculation(siz, measuredSize) + } + } + return b, nil +} + +func consumeOpaqueMessageSlice(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) { + if wtyp != protowire.BytesType { + return out, errUnknown + } + v, n := protowire.ConsumeBytes(b) + if n < 0 { + return out, errDecode + } + mp := pointerOfValue(reflect.New(f.mi.GoReflectType.Elem())) + o, err := f.mi.unmarshalPointer(v, mp, 0, opts) + if err != nil { + return out, err + } + sp := p.AtomicGetPointer() + if sp.IsNil() { + sp = p.AtomicSetPointerIfNil(pointerOfValue(reflect.New(f.ft.Elem()))) + } + sp.AppendPointerSlice(mp) + out.n = n + out.initialized = o.initialized + return out, nil +} + +func isInitOpaqueMessageSlice(p pointer, f *coderFieldInfo) error { + sp := p.AtomicGetPointer() + if sp.IsNil() { + return nil + } + s := sp.PointerSlice() + for _, v := range s { + if err := f.mi.checkInitializedPointer(v); err != nil { + return err + } + } + return nil +} + +func mergeOpaqueMessageSlice(dst, src pointer, f *coderFieldInfo, opts mergeOptions) { + ds := dst.AtomicGetPointer() + if ds.IsNil() { + ds = dst.AtomicSetPointerIfNil(pointerOfValue(reflect.New(f.ft.Elem()))) + } + for _, sp := range src.AtomicGetPointer().PointerSlice() { + dm := pointerOfValue(reflect.New(f.mi.GoReflectType.Elem())) + f.mi.mergePointer(dm, sp, opts) + ds.AppendPointerSlice(dm) + } +} + +func sizeOpaqueGroupSlice(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { + s := p.AtomicGetPointer().PointerSlice() + n := 0 + for _, v := range s { + n += 2*f.tagsize + f.mi.sizePointer(v, opts) + } + return n +} + +func appendOpaqueGroupSlice(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { + s := p.AtomicGetPointer().PointerSlice() + var err error + for _, v := range s { + b = protowire.AppendVarint(b, f.wiretag) // start group + b, err = f.mi.marshalAppendPointer(b, v, opts) + if err != nil { + return b, err + } + b = protowire.AppendVarint(b, f.wiretag+1) // end group + } + return b, nil +} + +func consumeOpaqueGroupSlice(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) { + if wtyp != protowire.StartGroupType { + return out, errUnknown + } + mp := pointerOfValue(reflect.New(f.mi.GoReflectType.Elem())) + out, err = f.mi.unmarshalPointer(b, mp, f.num, opts) + if err != nil { + return out, err + } + sp := p.AtomicGetPointer() + if sp.IsNil() { + sp = p.AtomicSetPointerIfNil(pointerOfValue(reflect.New(f.ft.Elem()))) + } + sp.AppendPointerSlice(mp) + return out, err +} diff --git a/vendor/google.golang.org/protobuf/internal/impl/codec_map.go b/vendor/google.golang.org/protobuf/internal/impl/codec_map.go index fb35f0bae..229c69801 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/codec_map.go +++ b/vendor/google.golang.org/protobuf/internal/impl/codec_map.go @@ -94,7 +94,7 @@ func sizeMap(mapv reflect.Value, mapi *mapInfo, f *coderFieldInfo, opts marshalO return 0 } n := 0 - iter := mapRange(mapv) + iter := mapv.MapRange() for iter.Next() { key := mapi.conv.keyConv.PBValueOf(iter.Key()).MapKey() keySize := mapi.keyFuncs.size(key.Value(), mapKeyTagSize, opts) @@ -281,7 +281,7 @@ func appendMap(b []byte, mapv reflect.Value, mapi *mapInfo, f *coderFieldInfo, o if opts.Deterministic() { return appendMapDeterministic(b, mapv, mapi, f, opts) } - iter := mapRange(mapv) + iter := mapv.MapRange() for iter.Next() { var err error b = protowire.AppendVarint(b, f.wiretag) @@ -328,7 +328,7 @@ func isInitMap(mapv reflect.Value, mapi *mapInfo, f *coderFieldInfo) error { if !mi.needsInitCheck { return nil } - iter := mapRange(mapv) + iter := mapv.MapRange() for iter.Next() { val := pointerOfValue(iter.Value()) if err := mi.checkInitializedPointer(val); err != nil { @@ -336,7 +336,7 @@ func isInitMap(mapv reflect.Value, mapi *mapInfo, f *coderFieldInfo) error { } } } else { - iter := mapRange(mapv) + iter := mapv.MapRange() for iter.Next() { val := mapi.conv.valConv.PBValueOf(iter.Value()) if err := mapi.valFuncs.isInit(val); err != nil { @@ -356,7 +356,7 @@ func mergeMap(dst, src pointer, f *coderFieldInfo, opts mergeOptions) { if dstm.IsNil() { dstm.Set(reflect.MakeMap(f.ft)) } - iter := mapRange(srcm) + iter := srcm.MapRange() for iter.Next() { dstm.SetMapIndex(iter.Key(), iter.Value()) } @@ -371,7 +371,7 @@ func mergeMapOfBytes(dst, src pointer, f *coderFieldInfo, opts mergeOptions) { if dstm.IsNil() { dstm.Set(reflect.MakeMap(f.ft)) } - iter := mapRange(srcm) + iter := srcm.MapRange() for iter.Next() { dstm.SetMapIndex(iter.Key(), reflect.ValueOf(append(emptyBuf[:], iter.Value().Bytes()...))) } @@ -386,7 +386,7 @@ func mergeMapOfMessage(dst, src pointer, f *coderFieldInfo, opts mergeOptions) { if dstm.IsNil() { dstm.Set(reflect.MakeMap(f.ft)) } - iter := mapRange(srcm) + iter := srcm.MapRange() for iter.Next() { val := reflect.New(f.ft.Elem().Elem()) if f.mi != nil { diff --git a/vendor/google.golang.org/protobuf/internal/impl/codec_map_go111.go b/vendor/google.golang.org/protobuf/internal/impl/codec_map_go111.go deleted file mode 100644 index 4b15493f2..000000000 --- a/vendor/google.golang.org/protobuf/internal/impl/codec_map_go111.go +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2019 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build !go1.12 -// +build !go1.12 - -package impl - -import "reflect" - -type mapIter struct { - v reflect.Value - keys []reflect.Value -} - -// mapRange provides a less-efficient equivalent to -// the Go 1.12 reflect.Value.MapRange method. -func mapRange(v reflect.Value) *mapIter { - return &mapIter{v: v} -} - -func (i *mapIter) Next() bool { - if i.keys == nil { - i.keys = i.v.MapKeys() - } else { - i.keys = i.keys[1:] - } - return len(i.keys) > 0 -} - -func (i *mapIter) Key() reflect.Value { - return i.keys[0] -} - -func (i *mapIter) Value() reflect.Value { - return i.v.MapIndex(i.keys[0]) -} diff --git a/vendor/google.golang.org/protobuf/internal/impl/codec_map_go112.go b/vendor/google.golang.org/protobuf/internal/impl/codec_map_go112.go deleted file mode 100644 index 0b31b66ea..000000000 --- a/vendor/google.golang.org/protobuf/internal/impl/codec_map_go112.go +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright 2019 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build go1.12 -// +build go1.12 - -package impl - -import "reflect" - -func mapRange(v reflect.Value) *reflect.MapIter { return v.MapRange() } diff --git a/vendor/google.golang.org/protobuf/internal/impl/codec_message.go b/vendor/google.golang.org/protobuf/internal/impl/codec_message.go index 78be9df34..f78b57b04 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/codec_message.go +++ b/vendor/google.golang.org/protobuf/internal/impl/codec_message.go @@ -32,6 +32,10 @@ type coderMessageInfo struct { needsInitCheck bool isMessageSet bool numRequiredFields uint8 + + lazyOffset offset + presenceOffset offset + presenceSize presenceSize } type coderFieldInfo struct { @@ -45,12 +49,19 @@ type coderFieldInfo struct { tagsize int // size of the varint-encoded tag isPointer bool // true if IsNil may be called on the struct field isRequired bool // true if field is required + + isLazy bool + presenceIndex uint32 } +const noPresence = 0xffffffff + func (mi *MessageInfo) makeCoderMethods(t reflect.Type, si structInfo) { mi.sizecacheOffset = invalidOffset mi.unknownOffset = invalidOffset mi.extensionOffset = invalidOffset + mi.lazyOffset = invalidOffset + mi.presenceOffset = si.presenceOffset if si.sizecacheOffset.IsValid() && si.sizecacheType == sizecacheType { mi.sizecacheOffset = si.sizecacheOffset @@ -107,12 +118,9 @@ func (mi *MessageInfo) makeCoderMethods(t reflect.Type, si structInfo) { }, } case isOneof: - fieldOffset = offsetOf(fs, mi.Exporter) - case fd.IsWeak(): - fieldOffset = si.weakOffset - funcs = makeWeakMessageFieldCoder(fd) + fieldOffset = offsetOf(fs) default: - fieldOffset = offsetOf(fs, mi.Exporter) + fieldOffset = offsetOf(fs) childMessage, funcs = fieldCoder(fd, ft) } cf := &preallocFields[i] @@ -127,6 +135,8 @@ func (mi *MessageInfo) makeCoderMethods(t reflect.Type, si structInfo) { validation: newFieldValidationInfo(mi, si, fd, ft), isPointer: fd.Cardinality() == protoreflect.Repeated || fd.HasPresence(), isRequired: fd.Cardinality() == protoreflect.Required, + + presenceIndex: noPresence, } mi.orderedCoderFields = append(mi.orderedCoderFields, cf) mi.coderFields[cf.num] = cf diff --git a/vendor/google.golang.org/protobuf/internal/impl/codec_message_opaque.go b/vendor/google.golang.org/protobuf/internal/impl/codec_message_opaque.go new file mode 100644 index 000000000..41c1f74ef --- /dev/null +++ b/vendor/google.golang.org/protobuf/internal/impl/codec_message_opaque.go @@ -0,0 +1,153 @@ +// Copyright 2024 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package impl + +import ( + "fmt" + "reflect" + "sort" + + "google.golang.org/protobuf/encoding/protowire" + "google.golang.org/protobuf/internal/encoding/messageset" + "google.golang.org/protobuf/internal/order" + "google.golang.org/protobuf/reflect/protoreflect" + piface "google.golang.org/protobuf/runtime/protoiface" +) + +func (mi *MessageInfo) makeOpaqueCoderMethods(t reflect.Type, si opaqueStructInfo) { + mi.sizecacheOffset = si.sizecacheOffset + mi.unknownOffset = si.unknownOffset + mi.unknownPtrKind = si.unknownType.Kind() == reflect.Ptr + mi.extensionOffset = si.extensionOffset + mi.lazyOffset = si.lazyOffset + mi.presenceOffset = si.presenceOffset + + mi.coderFields = make(map[protowire.Number]*coderFieldInfo) + fields := mi.Desc.Fields() + for i := 0; i < fields.Len(); i++ { + fd := fields.Get(i) + + fs := si.fieldsByNumber[fd.Number()] + if fd.ContainingOneof() != nil && !fd.ContainingOneof().IsSynthetic() { + fs = si.oneofsByName[fd.ContainingOneof().Name()] + } + ft := fs.Type + var wiretag uint64 + if !fd.IsPacked() { + wiretag = protowire.EncodeTag(fd.Number(), wireTypes[fd.Kind()]) + } else { + wiretag = protowire.EncodeTag(fd.Number(), protowire.BytesType) + } + var fieldOffset offset + var funcs pointerCoderFuncs + var childMessage *MessageInfo + switch { + case fd.ContainingOneof() != nil && !fd.ContainingOneof().IsSynthetic(): + fieldOffset = offsetOf(fs) + case fd.Message() != nil && !fd.IsMap(): + fieldOffset = offsetOf(fs) + if fd.IsList() { + childMessage, funcs = makeOpaqueRepeatedMessageFieldCoder(fd, ft) + } else { + childMessage, funcs = makeOpaqueMessageFieldCoder(fd, ft) + } + default: + fieldOffset = offsetOf(fs) + childMessage, funcs = fieldCoder(fd, ft) + } + cf := &coderFieldInfo{ + num: fd.Number(), + offset: fieldOffset, + wiretag: wiretag, + ft: ft, + tagsize: protowire.SizeVarint(wiretag), + funcs: funcs, + mi: childMessage, + validation: newFieldValidationInfo(mi, si.structInfo, fd, ft), + isPointer: (fd.Cardinality() == protoreflect.Repeated || + fd.Kind() == protoreflect.MessageKind || + fd.Kind() == protoreflect.GroupKind), + isRequired: fd.Cardinality() == protoreflect.Required, + presenceIndex: noPresence, + } + + // TODO: Use presence for all fields. + // + // In some cases, such as maps, presence means only "might be set" rather + // than "is definitely set", but every field should have a presence bit to + // permit us to skip over definitely-unset fields at marshal time. + + var hasPresence bool + hasPresence, cf.isLazy = usePresenceForField(si, fd) + + if hasPresence { + cf.presenceIndex, mi.presenceSize = presenceIndex(mi.Desc, fd) + } + + mi.orderedCoderFields = append(mi.orderedCoderFields, cf) + mi.coderFields[cf.num] = cf + } + for i, oneofs := 0, mi.Desc.Oneofs(); i < oneofs.Len(); i++ { + if od := oneofs.Get(i); !od.IsSynthetic() { + mi.initOneofFieldCoders(od, si.structInfo) + } + } + if messageset.IsMessageSet(mi.Desc) { + if !mi.extensionOffset.IsValid() { + panic(fmt.Sprintf("%v: MessageSet with no extensions field", mi.Desc.FullName())) + } + if !mi.unknownOffset.IsValid() { + panic(fmt.Sprintf("%v: MessageSet with no unknown field", mi.Desc.FullName())) + } + mi.isMessageSet = true + } + sort.Slice(mi.orderedCoderFields, func(i, j int) bool { + return mi.orderedCoderFields[i].num < mi.orderedCoderFields[j].num + }) + + var maxDense protoreflect.FieldNumber + for _, cf := range mi.orderedCoderFields { + if cf.num >= 16 && cf.num >= 2*maxDense { + break + } + maxDense = cf.num + } + mi.denseCoderFields = make([]*coderFieldInfo, maxDense+1) + for _, cf := range mi.orderedCoderFields { + if int(cf.num) > len(mi.denseCoderFields) { + break + } + mi.denseCoderFields[cf.num] = cf + } + + // To preserve compatibility with historic wire output, marshal oneofs last. + if mi.Desc.Oneofs().Len() > 0 { + sort.Slice(mi.orderedCoderFields, func(i, j int) bool { + fi := fields.ByNumber(mi.orderedCoderFields[i].num) + fj := fields.ByNumber(mi.orderedCoderFields[j].num) + return order.LegacyFieldOrder(fi, fj) + }) + } + + mi.needsInitCheck = needsInitCheck(mi.Desc) + if mi.methods.Marshal == nil && mi.methods.Size == nil { + mi.methods.Flags |= piface.SupportMarshalDeterministic + mi.methods.Marshal = mi.marshal + mi.methods.Size = mi.size + } + if mi.methods.Unmarshal == nil { + mi.methods.Flags |= piface.SupportUnmarshalDiscardUnknown + mi.methods.Unmarshal = mi.unmarshal + } + if mi.methods.CheckInitialized == nil { + mi.methods.CheckInitialized = mi.checkInitialized + } + if mi.methods.Merge == nil { + mi.methods.Merge = mi.merge + } + if mi.methods.Equal == nil { + mi.methods.Equal = equal + } +} diff --git a/vendor/google.golang.org/protobuf/internal/impl/convert_map.go b/vendor/google.golang.org/protobuf/internal/impl/convert_map.go index 304244a65..e4580b3ac 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/convert_map.go +++ b/vendor/google.golang.org/protobuf/internal/impl/convert_map.go @@ -101,7 +101,7 @@ func (ms *mapReflect) Mutable(k protoreflect.MapKey) protoreflect.Value { return v } func (ms *mapReflect) Range(f func(protoreflect.MapKey, protoreflect.Value) bool) { - iter := mapRange(ms.v) + iter := ms.v.MapRange() for iter.Next() { k := ms.keyConv.PBValueOf(iter.Key()).MapKey() v := ms.valConv.PBValueOf(iter.Value()) diff --git a/vendor/google.golang.org/protobuf/internal/impl/decode.go b/vendor/google.golang.org/protobuf/internal/impl/decode.go index cda0520c2..e0dd21fa5 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/decode.go +++ b/vendor/google.golang.org/protobuf/internal/impl/decode.go @@ -34,6 +34,8 @@ func (o unmarshalOptions) Options() proto.UnmarshalOptions { AllowPartial: true, DiscardUnknown: o.DiscardUnknown(), Resolver: o.resolver, + + NoLazyDecoding: o.NoLazyDecoding(), } } @@ -41,13 +43,26 @@ func (o unmarshalOptions) DiscardUnknown() bool { return o.flags&protoiface.UnmarshalDiscardUnknown != 0 } -func (o unmarshalOptions) IsDefault() bool { - return o.flags == 0 && o.resolver == protoregistry.GlobalTypes +func (o unmarshalOptions) AliasBuffer() bool { return o.flags&protoiface.UnmarshalAliasBuffer != 0 } +func (o unmarshalOptions) Validated() bool { return o.flags&protoiface.UnmarshalValidated != 0 } +func (o unmarshalOptions) NoLazyDecoding() bool { + return o.flags&protoiface.UnmarshalNoLazyDecoding != 0 +} + +func (o unmarshalOptions) CanBeLazy() bool { + if o.resolver != protoregistry.GlobalTypes { + return false + } + // We ignore the UnmarshalInvalidateSizeCache even though it's not in the default set + return (o.flags & ^(protoiface.UnmarshalAliasBuffer | protoiface.UnmarshalValidated | protoiface.UnmarshalCheckRequired)) == 0 } var lazyUnmarshalOptions = unmarshalOptions{ resolver: protoregistry.GlobalTypes, - depth: protowire.DefaultRecursionLimit, + + flags: protoiface.UnmarshalAliasBuffer | protoiface.UnmarshalValidated, + + depth: protowire.DefaultRecursionLimit, } type unmarshalOutput struct { @@ -94,9 +109,30 @@ func (mi *MessageInfo) unmarshalPointer(b []byte, p pointer, groupTag protowire. if flags.ProtoLegacy && mi.isMessageSet { return unmarshalMessageSet(mi, b, p, opts) } + + lazyDecoding := LazyEnabled() // default + if opts.NoLazyDecoding() { + lazyDecoding = false // explicitly disabled + } + if mi.lazyOffset.IsValid() && lazyDecoding { + return mi.unmarshalPointerLazy(b, p, groupTag, opts) + } + return mi.unmarshalPointerEager(b, p, groupTag, opts) +} + +// unmarshalPointerEager is the message unmarshalling function for all messages that are not lazy. +// The corresponding function for Lazy is in google_lazy.go. +func (mi *MessageInfo) unmarshalPointerEager(b []byte, p pointer, groupTag protowire.Number, opts unmarshalOptions) (out unmarshalOutput, err error) { + initialized := true var requiredMask uint64 var exts *map[int32]ExtensionField + + var presence presence + if mi.presenceOffset.IsValid() { + presence = p.Apply(mi.presenceOffset).PresenceInfo() + } + start := len(b) for len(b) > 0 { // Parse the tag (field number and wire type). @@ -154,6 +190,11 @@ func (mi *MessageInfo) unmarshalPointer(b []byte, p pointer, groupTag protowire. if f.funcs.isInit != nil && !o.initialized { initialized = false } + + if f.presenceIndex != noPresence { + presence.SetPresentUnatomic(f.presenceIndex, mi.presenceSize) + } + default: // Possible extension. if exts == nil && mi.extensionOffset.IsValid() { @@ -222,7 +263,7 @@ func (mi *MessageInfo) unmarshalExtension(b []byte, num protowire.Number, wtyp p return out, errUnknown } if flags.LazyUnmarshalExtensions { - if opts.IsDefault() && x.canLazy(xt) { + if opts.CanBeLazy() && x.canLazy(xt) { out, valid := skipExtension(b, xi, num, wtyp, opts) switch valid { case ValidationValid: @@ -270,6 +311,13 @@ func skipExtension(b []byte, xi *extensionFieldInfo, num protowire.Number, wtyp if n < 0 { return out, ValidationUnknown } + + if opts.Validated() { + out.initialized = true + out.n = n + return out, ValidationValid + } + out, st := xi.validation.mi.validate(v, 0, opts) out.n = n return out, st diff --git a/vendor/google.golang.org/protobuf/internal/impl/encode.go b/vendor/google.golang.org/protobuf/internal/impl/encode.go index 6254f5de4..b2e212291 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/encode.go +++ b/vendor/google.golang.org/protobuf/internal/impl/encode.go @@ -10,6 +10,7 @@ import ( "sync/atomic" "google.golang.org/protobuf/internal/flags" + "google.golang.org/protobuf/internal/protolazy" "google.golang.org/protobuf/proto" piface "google.golang.org/protobuf/runtime/protoiface" ) @@ -71,11 +72,39 @@ func (mi *MessageInfo) sizePointerSlow(p pointer, opts marshalOptions) (size int e := p.Apply(mi.extensionOffset).Extensions() size += mi.sizeExtensions(e, opts) } + + var lazy **protolazy.XXX_lazyUnmarshalInfo + var presence presence + if mi.presenceOffset.IsValid() { + presence = p.Apply(mi.presenceOffset).PresenceInfo() + if mi.lazyOffset.IsValid() { + lazy = p.Apply(mi.lazyOffset).LazyInfoPtr() + } + } + for _, f := range mi.orderedCoderFields { if f.funcs.size == nil { continue } fptr := p.Apply(f.offset) + + if f.presenceIndex != noPresence { + if !presence.Present(f.presenceIndex) { + continue + } + + if f.isLazy && fptr.AtomicGetPointer().IsNil() { + if lazyFields(opts) { + size += (*lazy).SizeField(uint32(f.num)) + continue + } else { + mi.lazyUnmarshal(p, f.num) + } + } + size += f.funcs.size(fptr, f, opts) + continue + } + if f.isPointer && fptr.Elem().IsNil() { continue } @@ -134,11 +163,52 @@ func (mi *MessageInfo) marshalAppendPointer(b []byte, p pointer, opts marshalOpt return b, err } } + + var lazy **protolazy.XXX_lazyUnmarshalInfo + var presence presence + if mi.presenceOffset.IsValid() { + presence = p.Apply(mi.presenceOffset).PresenceInfo() + if mi.lazyOffset.IsValid() { + lazy = p.Apply(mi.lazyOffset).LazyInfoPtr() + } + } + for _, f := range mi.orderedCoderFields { if f.funcs.marshal == nil { continue } fptr := p.Apply(f.offset) + + if f.presenceIndex != noPresence { + if !presence.Present(f.presenceIndex) { + continue + } + if f.isLazy { + // Be careful, this field needs to be read atomically, like for a get + if f.isPointer && fptr.AtomicGetPointer().IsNil() { + if lazyFields(opts) { + b, _ = (*lazy).AppendField(b, uint32(f.num)) + continue + } else { + mi.lazyUnmarshal(p, f.num) + } + } + + b, err = f.funcs.marshal(b, fptr, f, opts) + if err != nil { + return b, err + } + continue + } else if f.isPointer && fptr.Elem().IsNil() { + continue + } + b, err = f.funcs.marshal(b, fptr, f, opts) + if err != nil { + return b, err + } + continue + } + if f.isPointer && fptr.Elem().IsNil() { continue } @@ -163,6 +233,14 @@ func fullyLazyExtensions(opts marshalOptions) bool { return opts.flags&piface.MarshalDeterministic == 0 } +// lazyFields returns true if we should attempt to keep fields lazy over size and marshal. +func lazyFields(opts marshalOptions) bool { + // When deterministic marshaling is requested, force an unmarshal for lazy + // fields to produce a deterministic result, instead of passing through + // bytes lazily that may or may not match what Go Protobuf would produce. + return opts.flags&piface.MarshalDeterministic == 0 +} + func (mi *MessageInfo) sizeExtensions(ext *map[int32]ExtensionField, opts marshalOptions) (n int) { if ext == nil { return 0 diff --git a/vendor/google.golang.org/protobuf/internal/impl/lazy.go b/vendor/google.golang.org/protobuf/internal/impl/lazy.go new file mode 100644 index 000000000..c7de31e24 --- /dev/null +++ b/vendor/google.golang.org/protobuf/internal/impl/lazy.go @@ -0,0 +1,433 @@ +// Copyright 2024 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package impl + +import ( + "fmt" + "math/bits" + "os" + "reflect" + "sort" + "sync/atomic" + + "google.golang.org/protobuf/encoding/protowire" + "google.golang.org/protobuf/internal/errors" + "google.golang.org/protobuf/internal/protolazy" + "google.golang.org/protobuf/reflect/protoreflect" + preg "google.golang.org/protobuf/reflect/protoregistry" + piface "google.golang.org/protobuf/runtime/protoiface" +) + +var enableLazy int32 = func() int32 { + if os.Getenv("GOPROTODEBUG") == "nolazy" { + return 0 + } + return 1 +}() + +// EnableLazyUnmarshal enables lazy unmarshaling. +func EnableLazyUnmarshal(enable bool) { + if enable { + atomic.StoreInt32(&enableLazy, 1) + return + } + atomic.StoreInt32(&enableLazy, 0) +} + +// LazyEnabled reports whether lazy unmarshalling is currently enabled. +func LazyEnabled() bool { + return atomic.LoadInt32(&enableLazy) != 0 +} + +// UnmarshalField unmarshals a field in a message. +func UnmarshalField(m interface{}, num protowire.Number) { + switch m := m.(type) { + case *messageState: + m.messageInfo().lazyUnmarshal(m.pointer(), num) + case *messageReflectWrapper: + m.messageInfo().lazyUnmarshal(m.pointer(), num) + default: + panic(fmt.Sprintf("unsupported wrapper type %T", m)) + } +} + +func (mi *MessageInfo) lazyUnmarshal(p pointer, num protoreflect.FieldNumber) { + var f *coderFieldInfo + if int(num) < len(mi.denseCoderFields) { + f = mi.denseCoderFields[num] + } else { + f = mi.coderFields[num] + } + if f == nil { + panic(fmt.Sprintf("lazyUnmarshal: field info for %v.%v", mi.Desc.FullName(), num)) + } + lazy := *p.Apply(mi.lazyOffset).LazyInfoPtr() + start, end, found, _, multipleEntries := lazy.FindFieldInProto(uint32(num)) + if !found && multipleEntries == nil { + panic(fmt.Sprintf("lazyUnmarshal: can't find field data for %v.%v", mi.Desc.FullName(), num)) + } + // The actual pointer in the message can not be set until the whole struct is filled in, otherwise we will have races. + // Create another pointer and set it atomically, if we won the race and the pointer in the original message is still nil. + fp := pointerOfValue(reflect.New(f.ft)) + if multipleEntries != nil { + for _, entry := range multipleEntries { + mi.unmarshalField(lazy.Buffer()[entry.Start:entry.End], fp, f, lazy, lazy.UnmarshalFlags()) + } + } else { + mi.unmarshalField(lazy.Buffer()[start:end], fp, f, lazy, lazy.UnmarshalFlags()) + } + p.Apply(f.offset).AtomicSetPointerIfNil(fp.Elem()) +} + +func (mi *MessageInfo) unmarshalField(b []byte, p pointer, f *coderFieldInfo, lazyInfo *protolazy.XXX_lazyUnmarshalInfo, flags piface.UnmarshalInputFlags) error { + opts := lazyUnmarshalOptions + opts.flags |= flags + for len(b) > 0 { + // Parse the tag (field number and wire type). + var tag uint64 + if b[0] < 0x80 { + tag = uint64(b[0]) + b = b[1:] + } else if len(b) >= 2 && b[1] < 128 { + tag = uint64(b[0]&0x7f) + uint64(b[1])<<7 + b = b[2:] + } else { + var n int + tag, n = protowire.ConsumeVarint(b) + if n < 0 { + return errors.New("invalid wire data") + } + b = b[n:] + } + var num protowire.Number + if n := tag >> 3; n < uint64(protowire.MinValidNumber) || n > uint64(protowire.MaxValidNumber) { + return errors.New("invalid wire data") + } else { + num = protowire.Number(n) + } + wtyp := protowire.Type(tag & 7) + if num == f.num { + o, err := f.funcs.unmarshal(b, p, wtyp, f, opts) + if err == nil { + b = b[o.n:] + continue + } + if err != errUnknown { + return err + } + } + n := protowire.ConsumeFieldValue(num, wtyp, b) + if n < 0 { + return errors.New("invalid wire data") + } + b = b[n:] + } + return nil +} + +func (mi *MessageInfo) skipField(b []byte, f *coderFieldInfo, wtyp protowire.Type, opts unmarshalOptions) (out unmarshalOutput, _ ValidationStatus) { + fmi := f.validation.mi + if fmi == nil { + fd := mi.Desc.Fields().ByNumber(f.num) + if fd == nil { + return out, ValidationUnknown + } + messageName := fd.Message().FullName() + messageType, err := preg.GlobalTypes.FindMessageByName(messageName) + if err != nil { + return out, ValidationUnknown + } + var ok bool + fmi, ok = messageType.(*MessageInfo) + if !ok { + return out, ValidationUnknown + } + } + fmi.init() + switch f.validation.typ { + case validationTypeMessage: + if wtyp != protowire.BytesType { + return out, ValidationWrongWireType + } + v, n := protowire.ConsumeBytes(b) + if n < 0 { + return out, ValidationInvalid + } + out, st := fmi.validate(v, 0, opts) + out.n = n + return out, st + case validationTypeGroup: + if wtyp != protowire.StartGroupType { + return out, ValidationWrongWireType + } + out, st := fmi.validate(b, f.num, opts) + return out, st + default: + return out, ValidationUnknown + } +} + +// unmarshalPointerLazy is similar to unmarshalPointerEager, but it +// specifically handles lazy unmarshalling. it expects lazyOffset and +// presenceOffset to both be valid. +func (mi *MessageInfo) unmarshalPointerLazy(b []byte, p pointer, groupTag protowire.Number, opts unmarshalOptions) (out unmarshalOutput, err error) { + initialized := true + var requiredMask uint64 + var lazy **protolazy.XXX_lazyUnmarshalInfo + var presence presence + var lazyIndex []protolazy.IndexEntry + var lastNum protowire.Number + outOfOrder := false + lazyDecode := false + presence = p.Apply(mi.presenceOffset).PresenceInfo() + lazy = p.Apply(mi.lazyOffset).LazyInfoPtr() + if !presence.AnyPresent(mi.presenceSize) { + if opts.CanBeLazy() { + // If the message contains existing data, we need to merge into it. + // Lazy unmarshaling doesn't merge, so only enable it when the + // message is empty (has no presence bitmap). + lazyDecode = true + if *lazy == nil { + *lazy = &protolazy.XXX_lazyUnmarshalInfo{} + } + (*lazy).SetUnmarshalFlags(opts.flags) + if !opts.AliasBuffer() { + // Make a copy of the buffer for lazy unmarshaling. + // Set the AliasBuffer flag so recursive unmarshal + // operations reuse the copy. + b = append([]byte{}, b...) + opts.flags |= piface.UnmarshalAliasBuffer + } + (*lazy).SetBuffer(b) + } + } + // Track special handling of lazy fields. + // + // In the common case, all fields are lazyValidateOnly (and lazyFields remains nil). + // In the event that validation for a field fails, this map tracks handling of the field. + type lazyAction uint8 + const ( + lazyValidateOnly lazyAction = iota // validate the field only + lazyUnmarshalNow // eagerly unmarshal the field + lazyUnmarshalLater // unmarshal the field after the message is fully processed + ) + var lazyFields map[*coderFieldInfo]lazyAction + var exts *map[int32]ExtensionField + start := len(b) + pos := 0 + for len(b) > 0 { + // Parse the tag (field number and wire type). + var tag uint64 + if b[0] < 0x80 { + tag = uint64(b[0]) + b = b[1:] + } else if len(b) >= 2 && b[1] < 128 { + tag = uint64(b[0]&0x7f) + uint64(b[1])<<7 + b = b[2:] + } else { + var n int + tag, n = protowire.ConsumeVarint(b) + if n < 0 { + return out, errDecode + } + b = b[n:] + } + var num protowire.Number + if n := tag >> 3; n < uint64(protowire.MinValidNumber) || n > uint64(protowire.MaxValidNumber) { + return out, errors.New("invalid field number") + } else { + num = protowire.Number(n) + } + wtyp := protowire.Type(tag & 7) + + if wtyp == protowire.EndGroupType { + if num != groupTag { + return out, errors.New("mismatching end group marker") + } + groupTag = 0 + break + } + + var f *coderFieldInfo + if int(num) < len(mi.denseCoderFields) { + f = mi.denseCoderFields[num] + } else { + f = mi.coderFields[num] + } + var n int + err := errUnknown + discardUnknown := false + Field: + switch { + case f != nil: + if f.funcs.unmarshal == nil { + break + } + if f.isLazy && lazyDecode { + switch { + case lazyFields == nil || lazyFields[f] == lazyValidateOnly: + // Attempt to validate this field and leave it for later lazy unmarshaling. + o, valid := mi.skipField(b, f, wtyp, opts) + switch valid { + case ValidationValid: + // Skip over the valid field and continue. + err = nil + presence.SetPresentUnatomic(f.presenceIndex, mi.presenceSize) + requiredMask |= f.validation.requiredBit + if !o.initialized { + initialized = false + } + n = o.n + break Field + case ValidationInvalid: + return out, errors.New("invalid proto wire format") + case ValidationWrongWireType: + break Field + case ValidationUnknown: + if lazyFields == nil { + lazyFields = make(map[*coderFieldInfo]lazyAction) + } + if presence.Present(f.presenceIndex) { + // We were unable to determine if the field is valid or not, + // and we've already skipped over at least one instance of this + // field. Clear the presence bit (so if we stop decoding early, + // we don't leave a partially-initialized field around) and flag + // the field for unmarshaling before we return. + presence.ClearPresent(f.presenceIndex) + lazyFields[f] = lazyUnmarshalLater + discardUnknown = true + break Field + } else { + // We were unable to determine if the field is valid or not, + // but this is the first time we've seen it. Flag it as needing + // eager unmarshaling and fall through to the eager unmarshal case below. + lazyFields[f] = lazyUnmarshalNow + } + } + case lazyFields[f] == lazyUnmarshalLater: + // This field will be unmarshaled in a separate pass below. + // Skip over it here. + discardUnknown = true + break Field + default: + // Eagerly unmarshal the field. + } + } + if f.isLazy && !lazyDecode && presence.Present(f.presenceIndex) { + if p.Apply(f.offset).AtomicGetPointer().IsNil() { + mi.lazyUnmarshal(p, f.num) + } + } + var o unmarshalOutput + o, err = f.funcs.unmarshal(b, p.Apply(f.offset), wtyp, f, opts) + n = o.n + if err != nil { + break + } + requiredMask |= f.validation.requiredBit + if f.funcs.isInit != nil && !o.initialized { + initialized = false + } + if f.presenceIndex != noPresence { + presence.SetPresentUnatomic(f.presenceIndex, mi.presenceSize) + } + default: + // Possible extension. + if exts == nil && mi.extensionOffset.IsValid() { + exts = p.Apply(mi.extensionOffset).Extensions() + if *exts == nil { + *exts = make(map[int32]ExtensionField) + } + } + if exts == nil { + break + } + var o unmarshalOutput + o, err = mi.unmarshalExtension(b, num, wtyp, *exts, opts) + if err != nil { + break + } + n = o.n + if !o.initialized { + initialized = false + } + } + if err != nil { + if err != errUnknown { + return out, err + } + n = protowire.ConsumeFieldValue(num, wtyp, b) + if n < 0 { + return out, errDecode + } + if !discardUnknown && !opts.DiscardUnknown() && mi.unknownOffset.IsValid() { + u := mi.mutableUnknownBytes(p) + *u = protowire.AppendTag(*u, num, wtyp) + *u = append(*u, b[:n]...) + } + } + b = b[n:] + end := start - len(b) + if lazyDecode && f != nil && f.isLazy { + if num != lastNum { + lazyIndex = append(lazyIndex, protolazy.IndexEntry{ + FieldNum: uint32(num), + Start: uint32(pos), + End: uint32(end), + }) + } else { + i := len(lazyIndex) - 1 + lazyIndex[i].End = uint32(end) + lazyIndex[i].MultipleContiguous = true + } + } + if num < lastNum { + outOfOrder = true + } + pos = end + lastNum = num + } + if groupTag != 0 { + return out, errors.New("missing end group marker") + } + if lazyFields != nil { + // Some fields failed validation, and now need to be unmarshaled. + for f, action := range lazyFields { + if action != lazyUnmarshalLater { + continue + } + initialized = false + if *lazy == nil { + *lazy = &protolazy.XXX_lazyUnmarshalInfo{} + } + if err := mi.unmarshalField((*lazy).Buffer(), p.Apply(f.offset), f, *lazy, opts.flags); err != nil { + return out, err + } + presence.SetPresentUnatomic(f.presenceIndex, mi.presenceSize) + } + } + if lazyDecode { + if outOfOrder { + sort.Slice(lazyIndex, func(i, j int) bool { + return lazyIndex[i].FieldNum < lazyIndex[j].FieldNum || + (lazyIndex[i].FieldNum == lazyIndex[j].FieldNum && + lazyIndex[i].Start < lazyIndex[j].Start) + }) + } + if *lazy == nil { + *lazy = &protolazy.XXX_lazyUnmarshalInfo{} + } + + (*lazy).SetIndex(lazyIndex) + } + if mi.numRequiredFields > 0 && bits.OnesCount64(requiredMask) != int(mi.numRequiredFields) { + initialized = false + } + if initialized { + out.initialized = true + } + out.n = start - len(b) + return out, nil +} diff --git a/vendor/google.golang.org/protobuf/internal/impl/legacy_message.go b/vendor/google.golang.org/protobuf/internal/impl/legacy_message.go index bf0b6049b..a51dffbe2 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/legacy_message.go +++ b/vendor/google.golang.org/protobuf/internal/impl/legacy_message.go @@ -310,12 +310,9 @@ func aberrantAppendField(md *filedesc.Message, goType reflect.Type, tag, tagKey, fd.L0.Parent = md fd.L0.Index = n - if fd.L1.IsWeak || fd.L1.EditionFeatures.IsPacked { + if fd.L1.EditionFeatures.IsPacked { fd.L1.Options = func() protoreflect.ProtoMessage { opts := descopts.Field.ProtoReflect().New() - if fd.L1.IsWeak { - opts.Set(opts.Descriptor().Fields().ByName("weak"), protoreflect.ValueOfBool(true)) - } if fd.L1.EditionFeatures.IsPacked { opts.Set(opts.Descriptor().Fields().ByName("packed"), protoreflect.ValueOfBool(fd.L1.EditionFeatures.IsPacked)) } diff --git a/vendor/google.golang.org/protobuf/internal/impl/merge.go b/vendor/google.golang.org/protobuf/internal/impl/merge.go index 7e65f64f2..8ffdce67d 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/merge.go +++ b/vendor/google.golang.org/protobuf/internal/impl/merge.go @@ -41,11 +41,38 @@ func (mi *MessageInfo) mergePointer(dst, src pointer, opts mergeOptions) { if src.IsNil() { return } + + var presenceSrc presence + var presenceDst presence + if mi.presenceOffset.IsValid() { + presenceSrc = src.Apply(mi.presenceOffset).PresenceInfo() + presenceDst = dst.Apply(mi.presenceOffset).PresenceInfo() + } + for _, f := range mi.orderedCoderFields { if f.funcs.merge == nil { continue } sfptr := src.Apply(f.offset) + + if f.presenceIndex != noPresence { + if !presenceSrc.Present(f.presenceIndex) { + continue + } + dfptr := dst.Apply(f.offset) + if f.isLazy { + if sfptr.AtomicGetPointer().IsNil() { + mi.lazyUnmarshal(src, f.num) + } + if presenceDst.Present(f.presenceIndex) && dfptr.AtomicGetPointer().IsNil() { + mi.lazyUnmarshal(dst, f.num) + } + } + f.funcs.merge(dst.Apply(f.offset), sfptr, f, opts) + presenceDst.SetPresentUnatomic(f.presenceIndex, mi.presenceSize) + continue + } + if f.isPointer && sfptr.Elem().IsNil() { continue } diff --git a/vendor/google.golang.org/protobuf/internal/impl/message.go b/vendor/google.golang.org/protobuf/internal/impl/message.go index 741b5ed29..d50423dcb 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/message.go +++ b/vendor/google.golang.org/protobuf/internal/impl/message.go @@ -14,7 +14,6 @@ import ( "google.golang.org/protobuf/internal/genid" "google.golang.org/protobuf/reflect/protoreflect" - "google.golang.org/protobuf/reflect/protoregistry" ) // MessageInfo provides protobuf related functionality for a given Go type @@ -79,6 +78,9 @@ func (mi *MessageInfo) initOnce() { if mi.initDone == 1 { return } + if opaqueInitHook(mi) { + return + } t := mi.GoReflectType if t.Kind() != reflect.Ptr && t.Elem().Kind() != reflect.Struct { @@ -117,7 +119,6 @@ type ( var ( sizecacheType = reflect.TypeOf(SizeCache(0)) - weakFieldsType = reflect.TypeOf(WeakFields(nil)) unknownFieldsAType = reflect.TypeOf(unknownFieldsA(nil)) unknownFieldsBType = reflect.TypeOf(unknownFieldsB(nil)) extensionFieldsType = reflect.TypeOf(ExtensionFields(nil)) @@ -126,13 +127,14 @@ var ( type structInfo struct { sizecacheOffset offset sizecacheType reflect.Type - weakOffset offset - weakType reflect.Type unknownOffset offset unknownType reflect.Type extensionOffset offset extensionType reflect.Type + lazyOffset offset + presenceOffset offset + fieldsByNumber map[protoreflect.FieldNumber]reflect.StructField oneofsByName map[protoreflect.Name]reflect.StructField oneofWrappersByType map[reflect.Type]protoreflect.FieldNumber @@ -142,9 +144,10 @@ type structInfo struct { func (mi *MessageInfo) makeStructInfo(t reflect.Type) structInfo { si := structInfo{ sizecacheOffset: invalidOffset, - weakOffset: invalidOffset, unknownOffset: invalidOffset, extensionOffset: invalidOffset, + lazyOffset: invalidOffset, + presenceOffset: invalidOffset, fieldsByNumber: map[protoreflect.FieldNumber]reflect.StructField{}, oneofsByName: map[protoreflect.Name]reflect.StructField{}, @@ -157,24 +160,23 @@ fieldLoop: switch f := t.Field(i); f.Name { case genid.SizeCache_goname, genid.SizeCacheA_goname: if f.Type == sizecacheType { - si.sizecacheOffset = offsetOf(f, mi.Exporter) + si.sizecacheOffset = offsetOf(f) si.sizecacheType = f.Type } - case genid.WeakFields_goname, genid.WeakFieldsA_goname: - if f.Type == weakFieldsType { - si.weakOffset = offsetOf(f, mi.Exporter) - si.weakType = f.Type - } case genid.UnknownFields_goname, genid.UnknownFieldsA_goname: if f.Type == unknownFieldsAType || f.Type == unknownFieldsBType { - si.unknownOffset = offsetOf(f, mi.Exporter) + si.unknownOffset = offsetOf(f) si.unknownType = f.Type } case genid.ExtensionFields_goname, genid.ExtensionFieldsA_goname, genid.ExtensionFieldsB_goname: if f.Type == extensionFieldsType { - si.extensionOffset = offsetOf(f, mi.Exporter) + si.extensionOffset = offsetOf(f) si.extensionType = f.Type } + case "lazyFields", "XXX_lazyUnmarshalInfo": + si.lazyOffset = offsetOf(f) + case "XXX_presence": + si.presenceOffset = offsetOf(f) default: for _, s := range strings.Split(f.Tag.Get("protobuf"), ",") { if len(s) > 0 && strings.Trim(s, "0123456789") == "" { @@ -244,9 +246,6 @@ func (mi *MessageInfo) Message(i int) protoreflect.MessageType { mi.init() fd := mi.Desc.Fields().Get(i) switch { - case fd.IsWeak(): - mt, _ := protoregistry.GlobalTypes.FindMessageByName(fd.Message().FullName()) - return mt case fd.IsMap(): return mapEntryType{fd.Message(), mi.fieldTypes[fd.Number()]} default: diff --git a/vendor/google.golang.org/protobuf/internal/impl/message_opaque.go b/vendor/google.golang.org/protobuf/internal/impl/message_opaque.go new file mode 100644 index 000000000..dd55e8e00 --- /dev/null +++ b/vendor/google.golang.org/protobuf/internal/impl/message_opaque.go @@ -0,0 +1,627 @@ +// Copyright 2024 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package impl + +import ( + "fmt" + "math" + "reflect" + "strings" + "sync/atomic" + + "google.golang.org/protobuf/reflect/protoreflect" +) + +type opaqueStructInfo struct { + structInfo +} + +// isOpaque determines whether a protobuf message type is on the Opaque API. It +// checks whether the type is a Go struct that protoc-gen-go would generate. +// +// This function only detects newly generated messages from the v2 +// implementation of protoc-gen-go. It is unable to classify generated messages +// that are too old or those that are generated by a different generator +// such as protoc-gen-gogo. +func isOpaque(t reflect.Type) bool { + // The current detection mechanism is to simply check the first field + // for a struct tag with the "protogen" key. + if t.Kind() == reflect.Struct && t.NumField() > 0 { + pgt := t.Field(0).Tag.Get("protogen") + return strings.HasPrefix(pgt, "opaque.") + } + return false +} + +func opaqueInitHook(mi *MessageInfo) bool { + mt := mi.GoReflectType.Elem() + si := opaqueStructInfo{ + structInfo: mi.makeStructInfo(mt), + } + + if !isOpaque(mt) { + return false + } + + defer atomic.StoreUint32(&mi.initDone, 1) + + mi.fields = map[protoreflect.FieldNumber]*fieldInfo{} + fds := mi.Desc.Fields() + for i := 0; i < fds.Len(); i++ { + fd := fds.Get(i) + fs := si.fieldsByNumber[fd.Number()] + var fi fieldInfo + usePresence, _ := usePresenceForField(si, fd) + + switch { + case fd.ContainingOneof() != nil && !fd.ContainingOneof().IsSynthetic(): + // Oneofs are no different for opaque. + fi = fieldInfoForOneof(fd, si.oneofsByName[fd.ContainingOneof().Name()], mi.Exporter, si.oneofWrappersByNumber[fd.Number()]) + case fd.IsMap(): + fi = mi.fieldInfoForMapOpaque(si, fd, fs) + case fd.IsList() && fd.Message() == nil && usePresence: + fi = mi.fieldInfoForScalarListOpaque(si, fd, fs) + case fd.IsList() && fd.Message() == nil: + // Proto3 lists without presence can use same access methods as open + fi = fieldInfoForList(fd, fs, mi.Exporter) + case fd.IsList() && usePresence: + fi = mi.fieldInfoForMessageListOpaque(si, fd, fs) + case fd.IsList(): + // Proto3 opaque messages that does not need presence bitmap. + // Different representation than open struct, but same logic + fi = mi.fieldInfoForMessageListOpaqueNoPresence(si, fd, fs) + case fd.Message() != nil && usePresence: + fi = mi.fieldInfoForMessageOpaque(si, fd, fs) + case fd.Message() != nil: + // Proto3 messages without presence can use same access methods as open + fi = fieldInfoForMessage(fd, fs, mi.Exporter) + default: + fi = mi.fieldInfoForScalarOpaque(si, fd, fs) + } + mi.fields[fd.Number()] = &fi + } + mi.oneofs = map[protoreflect.Name]*oneofInfo{} + for i := 0; i < mi.Desc.Oneofs().Len(); i++ { + od := mi.Desc.Oneofs().Get(i) + mi.oneofs[od.Name()] = makeOneofInfoOpaque(mi, od, si.structInfo, mi.Exporter) + } + + mi.denseFields = make([]*fieldInfo, fds.Len()*2) + for i := 0; i < fds.Len(); i++ { + if fd := fds.Get(i); int(fd.Number()) < len(mi.denseFields) { + mi.denseFields[fd.Number()] = mi.fields[fd.Number()] + } + } + + for i := 0; i < fds.Len(); { + fd := fds.Get(i) + if od := fd.ContainingOneof(); od != nil && !fd.ContainingOneof().IsSynthetic() { + mi.rangeInfos = append(mi.rangeInfos, mi.oneofs[od.Name()]) + i += od.Fields().Len() + } else { + mi.rangeInfos = append(mi.rangeInfos, mi.fields[fd.Number()]) + i++ + } + } + + mi.makeExtensionFieldsFunc(mt, si.structInfo) + mi.makeUnknownFieldsFunc(mt, si.structInfo) + mi.makeOpaqueCoderMethods(mt, si) + mi.makeFieldTypes(si.structInfo) + + return true +} + +func makeOneofInfoOpaque(mi *MessageInfo, od protoreflect.OneofDescriptor, si structInfo, x exporter) *oneofInfo { + oi := &oneofInfo{oneofDesc: od} + if od.IsSynthetic() { + fd := od.Fields().Get(0) + index, _ := presenceIndex(mi.Desc, fd) + oi.which = func(p pointer) protoreflect.FieldNumber { + if p.IsNil() { + return 0 + } + if !mi.present(p, index) { + return 0 + } + return od.Fields().Get(0).Number() + } + return oi + } + // Dispatch to non-opaque oneof implementation for non-synthetic oneofs. + return makeOneofInfo(od, si, x) +} + +func (mi *MessageInfo) fieldInfoForMapOpaque(si opaqueStructInfo, fd protoreflect.FieldDescriptor, fs reflect.StructField) fieldInfo { + ft := fs.Type + if ft.Kind() != reflect.Map { + panic(fmt.Sprintf("invalid type: got %v, want map kind", ft)) + } + fieldOffset := offsetOf(fs) + conv := NewConverter(ft, fd) + return fieldInfo{ + fieldDesc: fd, + has: func(p pointer) bool { + if p.IsNil() { + return false + } + // Don't bother checking presence bits, since we need to + // look at the map length even if the presence bit is set. + rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() + return rv.Len() > 0 + }, + clear: func(p pointer) { + rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() + rv.Set(reflect.Zero(rv.Type())) + }, + get: func(p pointer) protoreflect.Value { + if p.IsNil() { + return conv.Zero() + } + rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() + if rv.Len() == 0 { + return conv.Zero() + } + return conv.PBValueOf(rv) + }, + set: func(p pointer, v protoreflect.Value) { + pv := conv.GoValueOf(v) + if pv.IsNil() { + panic(fmt.Sprintf("invalid value: setting map field to read-only value")) + } + rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() + rv.Set(pv) + }, + mutable: func(p pointer) protoreflect.Value { + v := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() + if v.IsNil() { + v.Set(reflect.MakeMap(fs.Type)) + } + return conv.PBValueOf(v) + }, + newField: func() protoreflect.Value { + return conv.New() + }, + } +} + +func (mi *MessageInfo) fieldInfoForScalarListOpaque(si opaqueStructInfo, fd protoreflect.FieldDescriptor, fs reflect.StructField) fieldInfo { + ft := fs.Type + if ft.Kind() != reflect.Slice { + panic(fmt.Sprintf("invalid type: got %v, want slice kind", ft)) + } + conv := NewConverter(reflect.PtrTo(ft), fd) + fieldOffset := offsetOf(fs) + index, _ := presenceIndex(mi.Desc, fd) + return fieldInfo{ + fieldDesc: fd, + has: func(p pointer) bool { + if p.IsNil() { + return false + } + rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() + return rv.Len() > 0 + }, + clear: func(p pointer) { + rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() + rv.Set(reflect.Zero(rv.Type())) + }, + get: func(p pointer) protoreflect.Value { + if p.IsNil() { + return conv.Zero() + } + rv := p.Apply(fieldOffset).AsValueOf(fs.Type) + if rv.Elem().Len() == 0 { + return conv.Zero() + } + return conv.PBValueOf(rv) + }, + set: func(p pointer, v protoreflect.Value) { + pv := conv.GoValueOf(v) + if pv.IsNil() { + panic(fmt.Sprintf("invalid value: setting repeated field to read-only value")) + } + mi.setPresent(p, index) + rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() + rv.Set(pv.Elem()) + }, + mutable: func(p pointer) protoreflect.Value { + mi.setPresent(p, index) + return conv.PBValueOf(p.Apply(fieldOffset).AsValueOf(fs.Type)) + }, + newField: func() protoreflect.Value { + return conv.New() + }, + } +} + +func (mi *MessageInfo) fieldInfoForMessageListOpaque(si opaqueStructInfo, fd protoreflect.FieldDescriptor, fs reflect.StructField) fieldInfo { + ft := fs.Type + if ft.Kind() != reflect.Ptr || ft.Elem().Kind() != reflect.Slice { + panic(fmt.Sprintf("invalid type: got %v, want slice kind", ft)) + } + conv := NewConverter(ft, fd) + fieldOffset := offsetOf(fs) + index, _ := presenceIndex(mi.Desc, fd) + fieldNumber := fd.Number() + return fieldInfo{ + fieldDesc: fd, + has: func(p pointer) bool { + if p.IsNil() { + return false + } + if !mi.present(p, index) { + return false + } + sp := p.Apply(fieldOffset).AtomicGetPointer() + if sp.IsNil() { + // Lazily unmarshal this field. + mi.lazyUnmarshal(p, fieldNumber) + sp = p.Apply(fieldOffset).AtomicGetPointer() + } + rv := sp.AsValueOf(fs.Type.Elem()) + return rv.Elem().Len() > 0 + }, + clear: func(p pointer) { + fp := p.Apply(fieldOffset) + sp := fp.AtomicGetPointer() + if sp.IsNil() { + sp = fp.AtomicSetPointerIfNil(pointerOfValue(reflect.New(fs.Type.Elem()))) + mi.setPresent(p, index) + } + rv := sp.AsValueOf(fs.Type.Elem()) + rv.Elem().Set(reflect.Zero(rv.Type().Elem())) + }, + get: func(p pointer) protoreflect.Value { + if p.IsNil() { + return conv.Zero() + } + if !mi.present(p, index) { + return conv.Zero() + } + sp := p.Apply(fieldOffset).AtomicGetPointer() + if sp.IsNil() { + // Lazily unmarshal this field. + mi.lazyUnmarshal(p, fieldNumber) + sp = p.Apply(fieldOffset).AtomicGetPointer() + } + rv := sp.AsValueOf(fs.Type.Elem()) + if rv.Elem().Len() == 0 { + return conv.Zero() + } + return conv.PBValueOf(rv) + }, + set: func(p pointer, v protoreflect.Value) { + fp := p.Apply(fieldOffset) + sp := fp.AtomicGetPointer() + if sp.IsNil() { + sp = fp.AtomicSetPointerIfNil(pointerOfValue(reflect.New(fs.Type.Elem()))) + mi.setPresent(p, index) + } + rv := sp.AsValueOf(fs.Type.Elem()) + val := conv.GoValueOf(v) + if val.IsNil() { + panic(fmt.Sprintf("invalid value: setting repeated field to read-only value")) + } else { + rv.Elem().Set(val.Elem()) + } + }, + mutable: func(p pointer) protoreflect.Value { + fp := p.Apply(fieldOffset) + sp := fp.AtomicGetPointer() + if sp.IsNil() { + if mi.present(p, index) { + // Lazily unmarshal this field. + mi.lazyUnmarshal(p, fieldNumber) + sp = p.Apply(fieldOffset).AtomicGetPointer() + } else { + sp = fp.AtomicSetPointerIfNil(pointerOfValue(reflect.New(fs.Type.Elem()))) + mi.setPresent(p, index) + } + } + rv := sp.AsValueOf(fs.Type.Elem()) + return conv.PBValueOf(rv) + }, + newField: func() protoreflect.Value { + return conv.New() + }, + } +} + +func (mi *MessageInfo) fieldInfoForMessageListOpaqueNoPresence(si opaqueStructInfo, fd protoreflect.FieldDescriptor, fs reflect.StructField) fieldInfo { + ft := fs.Type + if ft.Kind() != reflect.Ptr || ft.Elem().Kind() != reflect.Slice { + panic(fmt.Sprintf("invalid type: got %v, want slice kind", ft)) + } + conv := NewConverter(ft, fd) + fieldOffset := offsetOf(fs) + return fieldInfo{ + fieldDesc: fd, + has: func(p pointer) bool { + if p.IsNil() { + return false + } + sp := p.Apply(fieldOffset).AtomicGetPointer() + if sp.IsNil() { + return false + } + rv := sp.AsValueOf(fs.Type.Elem()) + return rv.Elem().Len() > 0 + }, + clear: func(p pointer) { + sp := p.Apply(fieldOffset).AtomicGetPointer() + if !sp.IsNil() { + rv := sp.AsValueOf(fs.Type.Elem()) + rv.Elem().Set(reflect.Zero(rv.Type().Elem())) + } + }, + get: func(p pointer) protoreflect.Value { + if p.IsNil() { + return conv.Zero() + } + sp := p.Apply(fieldOffset).AtomicGetPointer() + if sp.IsNil() { + return conv.Zero() + } + rv := sp.AsValueOf(fs.Type.Elem()) + if rv.Elem().Len() == 0 { + return conv.Zero() + } + return conv.PBValueOf(rv) + }, + set: func(p pointer, v protoreflect.Value) { + rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() + if rv.IsNil() { + rv.Set(reflect.New(fs.Type.Elem())) + } + val := conv.GoValueOf(v) + if val.IsNil() { + panic(fmt.Sprintf("invalid value: setting repeated field to read-only value")) + } else { + rv.Elem().Set(val.Elem()) + } + }, + mutable: func(p pointer) protoreflect.Value { + rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() + if rv.IsNil() { + rv.Set(reflect.New(fs.Type.Elem())) + } + return conv.PBValueOf(rv) + }, + newField: func() protoreflect.Value { + return conv.New() + }, + } +} + +func (mi *MessageInfo) fieldInfoForScalarOpaque(si opaqueStructInfo, fd protoreflect.FieldDescriptor, fs reflect.StructField) fieldInfo { + ft := fs.Type + nullable := fd.HasPresence() + if oneof := fd.ContainingOneof(); oneof != nil && oneof.IsSynthetic() { + nullable = true + } + deref := false + if nullable && ft.Kind() == reflect.Ptr { + ft = ft.Elem() + deref = true + } + conv := NewConverter(ft, fd) + fieldOffset := offsetOf(fs) + index, _ := presenceIndex(mi.Desc, fd) + var getter func(p pointer) protoreflect.Value + if !nullable { + getter = getterForDirectScalar(fd, fs, conv, fieldOffset) + } else { + getter = getterForOpaqueNullableScalar(mi, index, fd, fs, conv, fieldOffset) + } + return fieldInfo{ + fieldDesc: fd, + has: func(p pointer) bool { + if p.IsNil() { + return false + } + if nullable { + return mi.present(p, index) + } + rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() + switch rv.Kind() { + case reflect.Bool: + return rv.Bool() + case reflect.Int32, reflect.Int64: + return rv.Int() != 0 + case reflect.Uint32, reflect.Uint64: + return rv.Uint() != 0 + case reflect.Float32, reflect.Float64: + return rv.Float() != 0 || math.Signbit(rv.Float()) + case reflect.String, reflect.Slice: + return rv.Len() > 0 + default: + panic(fmt.Sprintf("invalid type: %v", rv.Type())) // should never happen + } + }, + clear: func(p pointer) { + if nullable { + mi.clearPresent(p, index) + } + // This is only valuable for bytes and strings, but we do it unconditionally. + rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() + rv.Set(reflect.Zero(rv.Type())) + }, + get: getter, + // TODO: Implement unsafe fast path for set? + set: func(p pointer, v protoreflect.Value) { + rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() + if deref { + if rv.IsNil() { + rv.Set(reflect.New(ft)) + } + rv = rv.Elem() + } + + rv.Set(conv.GoValueOf(v)) + if nullable && rv.Kind() == reflect.Slice && rv.IsNil() { + rv.Set(emptyBytes) + } + if nullable { + mi.setPresent(p, index) + } + }, + newField: func() protoreflect.Value { + return conv.New() + }, + } +} + +func (mi *MessageInfo) fieldInfoForMessageOpaque(si opaqueStructInfo, fd protoreflect.FieldDescriptor, fs reflect.StructField) fieldInfo { + ft := fs.Type + conv := NewConverter(ft, fd) + fieldOffset := offsetOf(fs) + index, _ := presenceIndex(mi.Desc, fd) + fieldNumber := fd.Number() + elemType := fs.Type.Elem() + return fieldInfo{ + fieldDesc: fd, + has: func(p pointer) bool { + if p.IsNil() { + return false + } + return mi.present(p, index) + }, + clear: func(p pointer) { + mi.clearPresent(p, index) + p.Apply(fieldOffset).AtomicSetNilPointer() + }, + get: func(p pointer) protoreflect.Value { + if p.IsNil() || !mi.present(p, index) { + return conv.Zero() + } + fp := p.Apply(fieldOffset) + mp := fp.AtomicGetPointer() + if mp.IsNil() { + // Lazily unmarshal this field. + mi.lazyUnmarshal(p, fieldNumber) + mp = fp.AtomicGetPointer() + } + rv := mp.AsValueOf(elemType) + return conv.PBValueOf(rv) + }, + set: func(p pointer, v protoreflect.Value) { + val := pointerOfValue(conv.GoValueOf(v)) + if val.IsNil() { + panic("invalid nil pointer") + } + p.Apply(fieldOffset).AtomicSetPointer(val) + mi.setPresent(p, index) + }, + mutable: func(p pointer) protoreflect.Value { + fp := p.Apply(fieldOffset) + mp := fp.AtomicGetPointer() + if mp.IsNil() { + if mi.present(p, index) { + // Lazily unmarshal this field. + mi.lazyUnmarshal(p, fieldNumber) + mp = fp.AtomicGetPointer() + } else { + mp = pointerOfValue(conv.GoValueOf(conv.New())) + fp.AtomicSetPointer(mp) + mi.setPresent(p, index) + } + } + return conv.PBValueOf(mp.AsValueOf(fs.Type.Elem())) + }, + newMessage: func() protoreflect.Message { + return conv.New().Message() + }, + newField: func() protoreflect.Value { + return conv.New() + }, + } +} + +// A presenceList wraps a List, updating presence bits as necessary when the +// list contents change. +type presenceList struct { + pvalueList + setPresence func(bool) +} +type pvalueList interface { + protoreflect.List + //Unwrapper +} + +func (list presenceList) Append(v protoreflect.Value) { + list.pvalueList.Append(v) + list.setPresence(true) +} +func (list presenceList) Truncate(i int) { + list.pvalueList.Truncate(i) + list.setPresence(i > 0) +} + +// presenceIndex returns the index to pass to presence functions. +// +// TODO: field.Desc.Index() would be simpler, and would give space to record the presence of oneof fields. +func presenceIndex(md protoreflect.MessageDescriptor, fd protoreflect.FieldDescriptor) (uint32, presenceSize) { + found := false + var index, numIndices uint32 + for i := 0; i < md.Fields().Len(); i++ { + f := md.Fields().Get(i) + if f == fd { + found = true + index = numIndices + } + if f.ContainingOneof() == nil || isLastOneofField(f) { + numIndices++ + } + } + if !found { + panic(fmt.Sprintf("BUG: %v not in %v", fd.Name(), md.FullName())) + } + return index, presenceSize(numIndices) +} + +func isLastOneofField(fd protoreflect.FieldDescriptor) bool { + fields := fd.ContainingOneof().Fields() + return fields.Get(fields.Len()-1) == fd +} + +func (mi *MessageInfo) setPresent(p pointer, index uint32) { + p.Apply(mi.presenceOffset).PresenceInfo().SetPresent(index, mi.presenceSize) +} + +func (mi *MessageInfo) clearPresent(p pointer, index uint32) { + p.Apply(mi.presenceOffset).PresenceInfo().ClearPresent(index) +} + +func (mi *MessageInfo) present(p pointer, index uint32) bool { + return p.Apply(mi.presenceOffset).PresenceInfo().Present(index) +} + +// usePresenceForField implements the somewhat intricate logic of when +// the presence bitmap is used for a field. The main logic is that a +// field that is optional or that can be lazy will use the presence +// bit, but for proto2, also maps have a presence bit. It also records +// if the field can ever be lazy, which is true if we have a +// lazyOffset and the field is a message or a slice of messages. A +// field that is lazy will always need a presence bit. Oneofs are not +// lazy and do not use presence, unless they are a synthetic oneof, +// which is a proto3 optional field. For proto3 optionals, we use the +// presence and they can also be lazy when applicable (a message). +func usePresenceForField(si opaqueStructInfo, fd protoreflect.FieldDescriptor) (usePresence, canBeLazy bool) { + hasLazyField := fd.(interface{ IsLazy() bool }).IsLazy() + + // Non-oneof scalar fields with explicit field presence use the presence array. + usesPresenceArray := fd.HasPresence() && fd.Message() == nil && (fd.ContainingOneof() == nil || fd.ContainingOneof().IsSynthetic()) + switch { + case fd.ContainingOneof() != nil && !fd.ContainingOneof().IsSynthetic(): + return false, false + case fd.IsMap(): + return false, false + case fd.Kind() == protoreflect.MessageKind || fd.Kind() == protoreflect.GroupKind: + return hasLazyField, hasLazyField + default: + return usesPresenceArray || (hasLazyField && fd.HasPresence()), false + } +} diff --git a/vendor/google.golang.org/protobuf/internal/impl/message_opaque_gen.go b/vendor/google.golang.org/protobuf/internal/impl/message_opaque_gen.go new file mode 100644 index 000000000..a69825699 --- /dev/null +++ b/vendor/google.golang.org/protobuf/internal/impl/message_opaque_gen.go @@ -0,0 +1,132 @@ +// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Code generated by generate-types. DO NOT EDIT. + +package impl + +import ( + "reflect" + + "google.golang.org/protobuf/reflect/protoreflect" +) + +func getterForOpaqueNullableScalar(mi *MessageInfo, index uint32, fd protoreflect.FieldDescriptor, fs reflect.StructField, conv Converter, fieldOffset offset) func(p pointer) protoreflect.Value { + ft := fs.Type + if ft.Kind() == reflect.Ptr { + ft = ft.Elem() + } + if fd.Kind() == protoreflect.EnumKind { + // Enums for nullable opaque types. + return func(p pointer) protoreflect.Value { + if p.IsNil() || !mi.present(p, index) { + return conv.Zero() + } + rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() + return conv.PBValueOf(rv) + } + } + switch ft.Kind() { + case reflect.Bool: + return func(p pointer) protoreflect.Value { + if p.IsNil() || !mi.present(p, index) { + return conv.Zero() + } + x := p.Apply(fieldOffset).Bool() + return protoreflect.ValueOfBool(*x) + } + case reflect.Int32: + return func(p pointer) protoreflect.Value { + if p.IsNil() || !mi.present(p, index) { + return conv.Zero() + } + x := p.Apply(fieldOffset).Int32() + return protoreflect.ValueOfInt32(*x) + } + case reflect.Uint32: + return func(p pointer) protoreflect.Value { + if p.IsNil() || !mi.present(p, index) { + return conv.Zero() + } + x := p.Apply(fieldOffset).Uint32() + return protoreflect.ValueOfUint32(*x) + } + case reflect.Int64: + return func(p pointer) protoreflect.Value { + if p.IsNil() || !mi.present(p, index) { + return conv.Zero() + } + x := p.Apply(fieldOffset).Int64() + return protoreflect.ValueOfInt64(*x) + } + case reflect.Uint64: + return func(p pointer) protoreflect.Value { + if p.IsNil() || !mi.present(p, index) { + return conv.Zero() + } + x := p.Apply(fieldOffset).Uint64() + return protoreflect.ValueOfUint64(*x) + } + case reflect.Float32: + return func(p pointer) protoreflect.Value { + if p.IsNil() || !mi.present(p, index) { + return conv.Zero() + } + x := p.Apply(fieldOffset).Float32() + return protoreflect.ValueOfFloat32(*x) + } + case reflect.Float64: + return func(p pointer) protoreflect.Value { + if p.IsNil() || !mi.present(p, index) { + return conv.Zero() + } + x := p.Apply(fieldOffset).Float64() + return protoreflect.ValueOfFloat64(*x) + } + case reflect.String: + if fd.Kind() == protoreflect.BytesKind { + return func(p pointer) protoreflect.Value { + if p.IsNil() || !mi.present(p, index) { + return conv.Zero() + } + x := p.Apply(fieldOffset).StringPtr() + if *x == nil { + return conv.Zero() + } + if len(**x) == 0 { + return protoreflect.ValueOfBytes(nil) + } + return protoreflect.ValueOfBytes([]byte(**x)) + } + } + return func(p pointer) protoreflect.Value { + if p.IsNil() || !mi.present(p, index) { + return conv.Zero() + } + x := p.Apply(fieldOffset).StringPtr() + if *x == nil { + return conv.Zero() + } + return protoreflect.ValueOfString(**x) + } + case reflect.Slice: + if fd.Kind() == protoreflect.StringKind { + return func(p pointer) protoreflect.Value { + if p.IsNil() || !mi.present(p, index) { + return conv.Zero() + } + x := p.Apply(fieldOffset).Bytes() + return protoreflect.ValueOfString(string(*x)) + } + } + return func(p pointer) protoreflect.Value { + if p.IsNil() || !mi.present(p, index) { + return conv.Zero() + } + x := p.Apply(fieldOffset).Bytes() + return protoreflect.ValueOfBytes(*x) + } + } + panic("unexpected protobuf kind: " + ft.Kind().String()) +} diff --git a/vendor/google.golang.org/protobuf/internal/impl/message_reflect.go b/vendor/google.golang.org/protobuf/internal/impl/message_reflect.go index ecb4623d7..0d20132fa 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/message_reflect.go +++ b/vendor/google.golang.org/protobuf/internal/impl/message_reflect.go @@ -72,8 +72,6 @@ func (mi *MessageInfo) makeKnownFieldsFunc(si structInfo) { fi = fieldInfoForMap(fd, fs, mi.Exporter) case fd.IsList(): fi = fieldInfoForList(fd, fs, mi.Exporter) - case fd.IsWeak(): - fi = fieldInfoForWeakMessage(fd, si.weakOffset) case fd.Message() != nil: fi = fieldInfoForMessage(fd, fs, mi.Exporter) default: @@ -205,6 +203,11 @@ func (mi *MessageInfo) makeFieldTypes(si structInfo) { case fd.IsList(): if fd.Enum() != nil || fd.Message() != nil { ft = fs.Type.Elem() + + if ft.Kind() == reflect.Slice { + ft = ft.Elem() + } + } isMessage = fd.Message() != nil case fd.Enum() != nil: @@ -214,9 +217,6 @@ func (mi *MessageInfo) makeFieldTypes(si structInfo) { } case fd.Message() != nil: ft = fs.Type - if fd.IsWeak() { - ft = nil - } isMessage = true } if isMessage && ft != nil && ft.Kind() != reflect.Ptr { diff --git a/vendor/google.golang.org/protobuf/internal/impl/message_reflect_field.go b/vendor/google.golang.org/protobuf/internal/impl/message_reflect_field.go index 986322b19..68d4ae32e 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/message_reflect_field.go +++ b/vendor/google.golang.org/protobuf/internal/impl/message_reflect_field.go @@ -8,11 +8,8 @@ import ( "fmt" "math" "reflect" - "sync" - "google.golang.org/protobuf/internal/flags" "google.golang.org/protobuf/reflect/protoreflect" - "google.golang.org/protobuf/reflect/protoregistry" ) type fieldInfo struct { @@ -76,7 +73,7 @@ func fieldInfoForOneof(fd protoreflect.FieldDescriptor, fs reflect.StructField, isMessage := fd.Message() != nil // TODO: Implement unsafe fast path? - fieldOffset := offsetOf(fs, x) + fieldOffset := offsetOf(fs) return fieldInfo{ // NOTE: The logic below intentionally assumes that oneof fields are // well-formatted. That is, the oneof interface never contains a @@ -152,7 +149,7 @@ func fieldInfoForMap(fd protoreflect.FieldDescriptor, fs reflect.StructField, x conv := NewConverter(ft, fd) // TODO: Implement unsafe fast path? - fieldOffset := offsetOf(fs, x) + fieldOffset := offsetOf(fs) return fieldInfo{ fieldDesc: fd, has: func(p pointer) bool { @@ -205,7 +202,7 @@ func fieldInfoForList(fd protoreflect.FieldDescriptor, fs reflect.StructField, x conv := NewConverter(reflect.PtrTo(ft), fd) // TODO: Implement unsafe fast path? - fieldOffset := offsetOf(fs, x) + fieldOffset := offsetOf(fs) return fieldInfo{ fieldDesc: fd, has: func(p pointer) bool { @@ -256,6 +253,7 @@ func fieldInfoForScalar(fd protoreflect.FieldDescriptor, fs reflect.StructField, ft := fs.Type nullable := fd.HasPresence() isBytes := ft.Kind() == reflect.Slice && ft.Elem().Kind() == reflect.Uint8 + var getter func(p pointer) protoreflect.Value if nullable { if ft.Kind() != reflect.Ptr && ft.Kind() != reflect.Slice { // This never occurs for generated message types. @@ -268,19 +266,25 @@ func fieldInfoForScalar(fd protoreflect.FieldDescriptor, fs reflect.StructField, } } conv := NewConverter(ft, fd) + fieldOffset := offsetOf(fs) + + // Generate specialized getter functions to avoid going through reflect.Value + if nullable { + getter = getterForNullableScalar(fd, fs, conv, fieldOffset) + } else { + getter = getterForDirectScalar(fd, fs, conv, fieldOffset) + } - // TODO: Implement unsafe fast path? - fieldOffset := offsetOf(fs, x) return fieldInfo{ fieldDesc: fd, has: func(p pointer) bool { if p.IsNil() { return false } - rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() if nullable { - return !rv.IsNil() + return !p.Apply(fieldOffset).Elem().IsNil() } + rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() switch rv.Kind() { case reflect.Bool: return rv.Bool() @@ -300,21 +304,8 @@ func fieldInfoForScalar(fd protoreflect.FieldDescriptor, fs reflect.StructField, rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() rv.Set(reflect.Zero(rv.Type())) }, - get: func(p pointer) protoreflect.Value { - if p.IsNil() { - return conv.Zero() - } - rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() - if nullable { - if rv.IsNil() { - return conv.Zero() - } - if rv.Kind() == reflect.Ptr { - rv = rv.Elem() - } - } - return conv.PBValueOf(rv) - }, + get: getter, + // TODO: Implement unsafe fast path for set? set: func(p pointer, v protoreflect.Value) { rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() if nullable && rv.Kind() == reflect.Ptr { @@ -338,85 +329,12 @@ func fieldInfoForScalar(fd protoreflect.FieldDescriptor, fs reflect.StructField, } } -func fieldInfoForWeakMessage(fd protoreflect.FieldDescriptor, weakOffset offset) fieldInfo { - if !flags.ProtoLegacy { - panic("no support for proto1 weak fields") - } - - var once sync.Once - var messageType protoreflect.MessageType - lazyInit := func() { - once.Do(func() { - messageName := fd.Message().FullName() - messageType, _ = protoregistry.GlobalTypes.FindMessageByName(messageName) - if messageType == nil { - panic(fmt.Sprintf("weak message %v for field %v is not linked in", messageName, fd.FullName())) - } - }) - } - - num := fd.Number() - return fieldInfo{ - fieldDesc: fd, - has: func(p pointer) bool { - if p.IsNil() { - return false - } - _, ok := p.Apply(weakOffset).WeakFields().get(num) - return ok - }, - clear: func(p pointer) { - p.Apply(weakOffset).WeakFields().clear(num) - }, - get: func(p pointer) protoreflect.Value { - lazyInit() - if p.IsNil() { - return protoreflect.ValueOfMessage(messageType.Zero()) - } - m, ok := p.Apply(weakOffset).WeakFields().get(num) - if !ok { - return protoreflect.ValueOfMessage(messageType.Zero()) - } - return protoreflect.ValueOfMessage(m.ProtoReflect()) - }, - set: func(p pointer, v protoreflect.Value) { - lazyInit() - m := v.Message() - if m.Descriptor() != messageType.Descriptor() { - if got, want := m.Descriptor().FullName(), messageType.Descriptor().FullName(); got != want { - panic(fmt.Sprintf("field %v has mismatching message descriptor: got %v, want %v", fd.FullName(), got, want)) - } - panic(fmt.Sprintf("field %v has mismatching message descriptor: %v", fd.FullName(), m.Descriptor().FullName())) - } - p.Apply(weakOffset).WeakFields().set(num, m.Interface()) - }, - mutable: func(p pointer) protoreflect.Value { - lazyInit() - fs := p.Apply(weakOffset).WeakFields() - m, ok := fs.get(num) - if !ok { - m = messageType.New().Interface() - fs.set(num, m) - } - return protoreflect.ValueOfMessage(m.ProtoReflect()) - }, - newMessage: func() protoreflect.Message { - lazyInit() - return messageType.New() - }, - newField: func() protoreflect.Value { - lazyInit() - return protoreflect.ValueOfMessage(messageType.New()) - }, - } -} - func fieldInfoForMessage(fd protoreflect.FieldDescriptor, fs reflect.StructField, x exporter) fieldInfo { ft := fs.Type conv := NewConverter(ft, fd) // TODO: Implement unsafe fast path? - fieldOffset := offsetOf(fs, x) + fieldOffset := offsetOf(fs) return fieldInfo{ fieldDesc: fd, has: func(p pointer) bool { @@ -425,7 +343,7 @@ func fieldInfoForMessage(fd protoreflect.FieldDescriptor, fs reflect.StructField } rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() if fs.Type.Kind() != reflect.Ptr { - return !isZero(rv) + return !rv.IsZero() } return !rv.IsNil() }, @@ -472,7 +390,7 @@ func makeOneofInfo(od protoreflect.OneofDescriptor, si structInfo, x exporter) * oi := &oneofInfo{oneofDesc: od} if od.IsSynthetic() { fs := si.fieldsByNumber[od.Fields().Get(0).Number()] - fieldOffset := offsetOf(fs, x) + fieldOffset := offsetOf(fs) oi.which = func(p pointer) protoreflect.FieldNumber { if p.IsNil() { return 0 @@ -485,7 +403,7 @@ func makeOneofInfo(od protoreflect.OneofDescriptor, si structInfo, x exporter) * } } else { fs := si.oneofsByName[od.Name()] - fieldOffset := offsetOf(fs, x) + fieldOffset := offsetOf(fs) oi.which = func(p pointer) protoreflect.FieldNumber { if p.IsNil() { return 0 @@ -503,41 +421,3 @@ func makeOneofInfo(od protoreflect.OneofDescriptor, si structInfo, x exporter) * } return oi } - -// isZero is identical to reflect.Value.IsZero. -// TODO: Remove this when Go1.13 is the minimally supported Go version. -func isZero(v reflect.Value) bool { - switch v.Kind() { - case reflect.Bool: - return !v.Bool() - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - return v.Int() == 0 - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - return v.Uint() == 0 - case reflect.Float32, reflect.Float64: - return math.Float64bits(v.Float()) == 0 - case reflect.Complex64, reflect.Complex128: - c := v.Complex() - return math.Float64bits(real(c)) == 0 && math.Float64bits(imag(c)) == 0 - case reflect.Array: - for i := 0; i < v.Len(); i++ { - if !isZero(v.Index(i)) { - return false - } - } - return true - case reflect.Chan, reflect.Func, reflect.Interface, reflect.Map, reflect.Ptr, reflect.Slice, reflect.UnsafePointer: - return v.IsNil() - case reflect.String: - return v.Len() == 0 - case reflect.Struct: - for i := 0; i < v.NumField(); i++ { - if !isZero(v.Field(i)) { - return false - } - } - return true - default: - panic(&reflect.ValueError{Method: "reflect.Value.IsZero", Kind: v.Kind()}) - } -} diff --git a/vendor/google.golang.org/protobuf/internal/impl/message_reflect_field_gen.go b/vendor/google.golang.org/protobuf/internal/impl/message_reflect_field_gen.go new file mode 100644 index 000000000..af5e063a1 --- /dev/null +++ b/vendor/google.golang.org/protobuf/internal/impl/message_reflect_field_gen.go @@ -0,0 +1,273 @@ +// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Code generated by generate-types. DO NOT EDIT. + +package impl + +import ( + "reflect" + + "google.golang.org/protobuf/reflect/protoreflect" +) + +func getterForNullableScalar(fd protoreflect.FieldDescriptor, fs reflect.StructField, conv Converter, fieldOffset offset) func(p pointer) protoreflect.Value { + ft := fs.Type + if ft.Kind() == reflect.Ptr { + ft = ft.Elem() + } + if fd.Kind() == protoreflect.EnumKind { + elemType := fs.Type.Elem() + // Enums for nullable types. + return func(p pointer) protoreflect.Value { + if p.IsNil() { + return conv.Zero() + } + rv := p.Apply(fieldOffset).Elem().AsValueOf(elemType) + if rv.IsNil() { + return conv.Zero() + } + return conv.PBValueOf(rv.Elem()) + } + } + switch ft.Kind() { + case reflect.Bool: + return func(p pointer) protoreflect.Value { + if p.IsNil() { + return conv.Zero() + } + x := p.Apply(fieldOffset).BoolPtr() + if *x == nil { + return conv.Zero() + } + return protoreflect.ValueOfBool(**x) + } + case reflect.Int32: + return func(p pointer) protoreflect.Value { + if p.IsNil() { + return conv.Zero() + } + x := p.Apply(fieldOffset).Int32Ptr() + if *x == nil { + return conv.Zero() + } + return protoreflect.ValueOfInt32(**x) + } + case reflect.Uint32: + return func(p pointer) protoreflect.Value { + if p.IsNil() { + return conv.Zero() + } + x := p.Apply(fieldOffset).Uint32Ptr() + if *x == nil { + return conv.Zero() + } + return protoreflect.ValueOfUint32(**x) + } + case reflect.Int64: + return func(p pointer) protoreflect.Value { + if p.IsNil() { + return conv.Zero() + } + x := p.Apply(fieldOffset).Int64Ptr() + if *x == nil { + return conv.Zero() + } + return protoreflect.ValueOfInt64(**x) + } + case reflect.Uint64: + return func(p pointer) protoreflect.Value { + if p.IsNil() { + return conv.Zero() + } + x := p.Apply(fieldOffset).Uint64Ptr() + if *x == nil { + return conv.Zero() + } + return protoreflect.ValueOfUint64(**x) + } + case reflect.Float32: + return func(p pointer) protoreflect.Value { + if p.IsNil() { + return conv.Zero() + } + x := p.Apply(fieldOffset).Float32Ptr() + if *x == nil { + return conv.Zero() + } + return protoreflect.ValueOfFloat32(**x) + } + case reflect.Float64: + return func(p pointer) protoreflect.Value { + if p.IsNil() { + return conv.Zero() + } + x := p.Apply(fieldOffset).Float64Ptr() + if *x == nil { + return conv.Zero() + } + return protoreflect.ValueOfFloat64(**x) + } + case reflect.String: + if fd.Kind() == protoreflect.BytesKind { + return func(p pointer) protoreflect.Value { + if p.IsNil() { + return conv.Zero() + } + x := p.Apply(fieldOffset).StringPtr() + if *x == nil { + return conv.Zero() + } + if len(**x) == 0 { + return protoreflect.ValueOfBytes(nil) + } + return protoreflect.ValueOfBytes([]byte(**x)) + } + } + return func(p pointer) protoreflect.Value { + if p.IsNil() { + return conv.Zero() + } + x := p.Apply(fieldOffset).StringPtr() + if *x == nil { + return conv.Zero() + } + return protoreflect.ValueOfString(**x) + } + case reflect.Slice: + if fd.Kind() == protoreflect.StringKind { + return func(p pointer) protoreflect.Value { + if p.IsNil() { + return conv.Zero() + } + x := p.Apply(fieldOffset).Bytes() + if len(*x) == 0 { + return conv.Zero() + } + return protoreflect.ValueOfString(string(*x)) + } + } + return func(p pointer) protoreflect.Value { + if p.IsNil() { + return conv.Zero() + } + x := p.Apply(fieldOffset).Bytes() + if *x == nil { + return conv.Zero() + } + return protoreflect.ValueOfBytes(*x) + } + } + panic("unexpected protobuf kind: " + ft.Kind().String()) +} + +func getterForDirectScalar(fd protoreflect.FieldDescriptor, fs reflect.StructField, conv Converter, fieldOffset offset) func(p pointer) protoreflect.Value { + ft := fs.Type + if fd.Kind() == protoreflect.EnumKind { + // Enums for non nullable types. + return func(p pointer) protoreflect.Value { + if p.IsNil() { + return conv.Zero() + } + rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() + return conv.PBValueOf(rv) + } + } + switch ft.Kind() { + case reflect.Bool: + return func(p pointer) protoreflect.Value { + if p.IsNil() { + return conv.Zero() + } + x := p.Apply(fieldOffset).Bool() + return protoreflect.ValueOfBool(*x) + } + case reflect.Int32: + return func(p pointer) protoreflect.Value { + if p.IsNil() { + return conv.Zero() + } + x := p.Apply(fieldOffset).Int32() + return protoreflect.ValueOfInt32(*x) + } + case reflect.Uint32: + return func(p pointer) protoreflect.Value { + if p.IsNil() { + return conv.Zero() + } + x := p.Apply(fieldOffset).Uint32() + return protoreflect.ValueOfUint32(*x) + } + case reflect.Int64: + return func(p pointer) protoreflect.Value { + if p.IsNil() { + return conv.Zero() + } + x := p.Apply(fieldOffset).Int64() + return protoreflect.ValueOfInt64(*x) + } + case reflect.Uint64: + return func(p pointer) protoreflect.Value { + if p.IsNil() { + return conv.Zero() + } + x := p.Apply(fieldOffset).Uint64() + return protoreflect.ValueOfUint64(*x) + } + case reflect.Float32: + return func(p pointer) protoreflect.Value { + if p.IsNil() { + return conv.Zero() + } + x := p.Apply(fieldOffset).Float32() + return protoreflect.ValueOfFloat32(*x) + } + case reflect.Float64: + return func(p pointer) protoreflect.Value { + if p.IsNil() { + return conv.Zero() + } + x := p.Apply(fieldOffset).Float64() + return protoreflect.ValueOfFloat64(*x) + } + case reflect.String: + if fd.Kind() == protoreflect.BytesKind { + return func(p pointer) protoreflect.Value { + if p.IsNil() { + return conv.Zero() + } + x := p.Apply(fieldOffset).String() + if len(*x) == 0 { + return protoreflect.ValueOfBytes(nil) + } + return protoreflect.ValueOfBytes([]byte(*x)) + } + } + return func(p pointer) protoreflect.Value { + if p.IsNil() { + return conv.Zero() + } + x := p.Apply(fieldOffset).String() + return protoreflect.ValueOfString(*x) + } + case reflect.Slice: + if fd.Kind() == protoreflect.StringKind { + return func(p pointer) protoreflect.Value { + if p.IsNil() { + return conv.Zero() + } + x := p.Apply(fieldOffset).Bytes() + return protoreflect.ValueOfString(string(*x)) + } + } + return func(p pointer) protoreflect.Value { + if p.IsNil() { + return conv.Zero() + } + x := p.Apply(fieldOffset).Bytes() + return protoreflect.ValueOfBytes(*x) + } + } + panic("unexpected protobuf kind: " + ft.Kind().String()) +} diff --git a/vendor/google.golang.org/protobuf/internal/impl/pointer_unsafe.go b/vendor/google.golang.org/protobuf/internal/impl/pointer_unsafe.go index 79e186667..62f8bf663 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/pointer_unsafe.go +++ b/vendor/google.golang.org/protobuf/internal/impl/pointer_unsafe.go @@ -8,6 +8,8 @@ import ( "reflect" "sync/atomic" "unsafe" + + "google.golang.org/protobuf/internal/protolazy" ) const UnsafeEnabled = true @@ -20,7 +22,7 @@ type Pointer unsafe.Pointer type offset uintptr // offsetOf returns a field offset for the struct field. -func offsetOf(f reflect.StructField, x exporter) offset { +func offsetOf(f reflect.StructField) offset { return offset(f.Offset) } @@ -109,8 +111,14 @@ func (p pointer) StringSlice() *[]string { return (*[]string)(p.p func (p pointer) Bytes() *[]byte { return (*[]byte)(p.p) } func (p pointer) BytesPtr() **[]byte { return (**[]byte)(p.p) } func (p pointer) BytesSlice() *[][]byte { return (*[][]byte)(p.p) } -func (p pointer) WeakFields() *weakFields { return (*weakFields)(p.p) } func (p pointer) Extensions() *map[int32]ExtensionField { return (*map[int32]ExtensionField)(p.p) } +func (p pointer) LazyInfoPtr() **protolazy.XXX_lazyUnmarshalInfo { + return (**protolazy.XXX_lazyUnmarshalInfo)(p.p) +} + +func (p pointer) PresenceInfo() presence { + return presence{P: p.p} +} func (p pointer) Elem() pointer { return pointer{p: *(*unsafe.Pointer)(p.p)} diff --git a/vendor/google.golang.org/protobuf/internal/impl/pointer_unsafe_opaque.go b/vendor/google.golang.org/protobuf/internal/impl/pointer_unsafe_opaque.go new file mode 100644 index 000000000..38aa7b7dc --- /dev/null +++ b/vendor/google.golang.org/protobuf/internal/impl/pointer_unsafe_opaque.go @@ -0,0 +1,42 @@ +// Copyright 2024 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package impl + +import ( + "sync/atomic" + "unsafe" +) + +func (p pointer) AtomicGetPointer() pointer { + return pointer{p: atomic.LoadPointer((*unsafe.Pointer)(p.p))} +} + +func (p pointer) AtomicSetPointer(v pointer) { + atomic.StorePointer((*unsafe.Pointer)(p.p), v.p) +} + +func (p pointer) AtomicSetNilPointer() { + atomic.StorePointer((*unsafe.Pointer)(p.p), unsafe.Pointer(nil)) +} + +func (p pointer) AtomicSetPointerIfNil(v pointer) pointer { + if atomic.CompareAndSwapPointer((*unsafe.Pointer)(p.p), unsafe.Pointer(nil), v.p) { + return v + } + return pointer{p: atomic.LoadPointer((*unsafe.Pointer)(p.p))} +} + +type atomicV1MessageInfo struct{ p Pointer } + +func (mi *atomicV1MessageInfo) Get() Pointer { + return Pointer(atomic.LoadPointer((*unsafe.Pointer)(&mi.p))) +} + +func (mi *atomicV1MessageInfo) SetIfNil(p Pointer) Pointer { + if atomic.CompareAndSwapPointer((*unsafe.Pointer)(&mi.p), nil, unsafe.Pointer(p)) { + return p + } + return mi.Get() +} diff --git a/vendor/google.golang.org/protobuf/internal/impl/presence.go b/vendor/google.golang.org/protobuf/internal/impl/presence.go new file mode 100644 index 000000000..914cb1ded --- /dev/null +++ b/vendor/google.golang.org/protobuf/internal/impl/presence.go @@ -0,0 +1,142 @@ +// Copyright 2024 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package impl + +import ( + "sync/atomic" + "unsafe" +) + +// presenceSize represents the size of a presence set, which should be the largest index of the set+1 +type presenceSize uint32 + +// presence is the internal representation of the bitmap array in a generated protobuf +type presence struct { + // This is a pointer to the beginning of an array of uint32 + P unsafe.Pointer +} + +func (p presence) toElem(num uint32) (ret *uint32) { + const ( + bitsPerByte = 8 + siz = unsafe.Sizeof(*ret) + ) + // p.P points to an array of uint32, num is the bit in this array that the + // caller wants to check/manipulate. Calculate the index in the array that + // contains this specific bit. E.g.: 76 / 32 = 2 (integer division). + offset := uintptr(num) / (siz * bitsPerByte) * siz + return (*uint32)(unsafe.Pointer(uintptr(p.P) + offset)) +} + +// Present checks for the presence of a specific field number in a presence set. +func (p presence) Present(num uint32) bool { + if p.P == nil { + return false + } + return Export{}.Present(p.toElem(num), num) +} + +// SetPresent adds presence for a specific field number in a presence set. +func (p presence) SetPresent(num uint32, size presenceSize) { + Export{}.SetPresent(p.toElem(num), num, uint32(size)) +} + +// SetPresentUnatomic adds presence for a specific field number in a presence set without using +// atomic operations. Only to be called during unmarshaling. +func (p presence) SetPresentUnatomic(num uint32, size presenceSize) { + Export{}.SetPresentNonAtomic(p.toElem(num), num, uint32(size)) +} + +// ClearPresent removes presence for a specific field number in a presence set. +func (p presence) ClearPresent(num uint32) { + Export{}.ClearPresent(p.toElem(num), num) +} + +// LoadPresenceCache (together with PresentInCache) allows for a +// cached version of checking for presence without re-reading the word +// for every field. It is optimized for efficiency and assumes no +// simltaneous mutation of the presence set (or at least does not have +// a problem with simultaneous mutation giving inconsistent results). +func (p presence) LoadPresenceCache() (current uint32) { + if p.P == nil { + return 0 + } + return atomic.LoadUint32((*uint32)(p.P)) +} + +// PresentInCache reads presence from a cached word in the presence +// bitmap. It caches up a new word if the bit is outside the +// word. This is for really fast iteration through bitmaps in cases +// where we either know that the bitmap will not be altered, or we +// don't care about inconsistencies caused by simultaneous writes. +func (p presence) PresentInCache(num uint32, cachedElement *uint32, current *uint32) bool { + if num/32 != *cachedElement { + o := uintptr(num/32) * unsafe.Sizeof(uint32(0)) + q := (*uint32)(unsafe.Pointer(uintptr(p.P) + o)) + *current = atomic.LoadUint32(q) + *cachedElement = num / 32 + } + return (*current & (1 << (num % 32))) > 0 +} + +// AnyPresent checks if any field is marked as present in the bitmap. +func (p presence) AnyPresent(size presenceSize) bool { + n := uintptr((size + 31) / 32) + for j := uintptr(0); j < n; j++ { + o := j * unsafe.Sizeof(uint32(0)) + q := (*uint32)(unsafe.Pointer(uintptr(p.P) + o)) + b := atomic.LoadUint32(q) + if b > 0 { + return true + } + } + return false +} + +// toRaceDetectData finds the preceding RaceDetectHookData in a +// message by using pointer arithmetic. As the type of the presence +// set (bitmap) varies with the number of fields in the protobuf, we +// can not have a struct type containing the array and the +// RaceDetectHookData. instead the RaceDetectHookData is placed +// immediately before the bitmap array, and we find it by walking +// backwards in the struct. +// +// This method is only called from the race-detect version of the code, +// so RaceDetectHookData is never an empty struct. +func (p presence) toRaceDetectData() *RaceDetectHookData { + var template struct { + d RaceDetectHookData + a [1]uint32 + } + o := (uintptr(unsafe.Pointer(&template.a)) - uintptr(unsafe.Pointer(&template.d))) + return (*RaceDetectHookData)(unsafe.Pointer(uintptr(p.P) - o)) +} + +func atomicLoadShadowPresence(p **[]byte) *[]byte { + return (*[]byte)(atomic.LoadPointer((*unsafe.Pointer)(unsafe.Pointer(p)))) +} +func atomicStoreShadowPresence(p **[]byte, v *[]byte) { + atomic.CompareAndSwapPointer((*unsafe.Pointer)(unsafe.Pointer(p)), nil, unsafe.Pointer(v)) +} + +// findPointerToRaceDetectData finds the preceding RaceDetectHookData +// in a message by using pointer arithmetic. For the methods called +// directy from generated code, we don't have a pointer to the +// beginning of the presence set, but a pointer inside the array. As +// we know the index of the bit we're manipulating (num), we can +// calculate which element of the array ptr is pointing to. With that +// information we find the preceding RaceDetectHookData and can +// manipulate the shadow bitmap. +// +// This method is only called from the race-detect version of the +// code, so RaceDetectHookData is never an empty struct. +func findPointerToRaceDetectData(ptr *uint32, num uint32) *RaceDetectHookData { + var template struct { + d RaceDetectHookData + a [1]uint32 + } + o := (uintptr(unsafe.Pointer(&template.a)) - uintptr(unsafe.Pointer(&template.d))) + uintptr(num/32)*unsafe.Sizeof(uint32(0)) + return (*RaceDetectHookData)(unsafe.Pointer(uintptr(unsafe.Pointer(ptr)) - o)) +} diff --git a/vendor/google.golang.org/protobuf/internal/impl/validate.go b/vendor/google.golang.org/protobuf/internal/impl/validate.go index a24e6bbd7..7b2995dde 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/validate.go +++ b/vendor/google.golang.org/protobuf/internal/impl/validate.go @@ -37,6 +37,10 @@ const ( // ValidationValid indicates that unmarshaling the message will succeed. ValidationValid + + // ValidationWrongWireType indicates that a validated field does not have + // the expected wire type. + ValidationWrongWireType ) func (v ValidationStatus) String() string { @@ -149,11 +153,23 @@ func newValidationInfo(fd protoreflect.FieldDescriptor, ft reflect.Type) validat switch fd.Kind() { case protoreflect.MessageKind: vi.typ = validationTypeMessage + + if ft.Kind() == reflect.Ptr { + // Repeated opaque message fields are *[]*T. + ft = ft.Elem() + } + if ft.Kind() == reflect.Slice { vi.mi = getMessageInfo(ft.Elem()) } case protoreflect.GroupKind: vi.typ = validationTypeGroup + + if ft.Kind() == reflect.Ptr { + // Repeated opaque message fields are *[]*T. + ft = ft.Elem() + } + if ft.Kind() == reflect.Slice { vi.mi = getMessageInfo(ft.Elem()) } @@ -195,9 +211,7 @@ func newValidationInfo(fd protoreflect.FieldDescriptor, ft reflect.Type) validat switch fd.Kind() { case protoreflect.MessageKind: vi.typ = validationTypeMessage - if !fd.IsWeak() { - vi.mi = getMessageInfo(ft) - } + vi.mi = getMessageInfo(ft) case protoreflect.GroupKind: vi.typ = validationTypeGroup vi.mi = getMessageInfo(ft) @@ -304,26 +318,6 @@ State: } if f != nil { vi = f.validation - if vi.typ == validationTypeMessage && vi.mi == nil { - // Probable weak field. - // - // TODO: Consider storing the results of this lookup somewhere - // rather than recomputing it on every validation. - fd := st.mi.Desc.Fields().ByNumber(num) - if fd == nil || !fd.IsWeak() { - break - } - messageName := fd.Message().FullName() - messageType, err := protoregistry.GlobalTypes.FindMessageByName(messageName) - switch err { - case nil: - vi.mi, _ = messageType.(*MessageInfo) - case protoregistry.NotFound: - vi.typ = validationTypeBytes - default: - return out, ValidationUnknown - } - } break } // Possible extension field. diff --git a/vendor/google.golang.org/protobuf/internal/impl/weak.go b/vendor/google.golang.org/protobuf/internal/impl/weak.go deleted file mode 100644 index eb79a7ba9..000000000 --- a/vendor/google.golang.org/protobuf/internal/impl/weak.go +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright 2019 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package impl - -import ( - "fmt" - - "google.golang.org/protobuf/reflect/protoreflect" - "google.golang.org/protobuf/reflect/protoregistry" -) - -// weakFields adds methods to the exported WeakFields type for internal use. -// -// The exported type is an alias to an unnamed type, so methods can't be -// defined directly on it. -type weakFields WeakFields - -func (w weakFields) get(num protoreflect.FieldNumber) (protoreflect.ProtoMessage, bool) { - m, ok := w[int32(num)] - return m, ok -} - -func (w *weakFields) set(num protoreflect.FieldNumber, m protoreflect.ProtoMessage) { - if *w == nil { - *w = make(weakFields) - } - (*w)[int32(num)] = m -} - -func (w *weakFields) clear(num protoreflect.FieldNumber) { - delete(*w, int32(num)) -} - -func (Export) HasWeak(w WeakFields, num protoreflect.FieldNumber) bool { - _, ok := w[int32(num)] - return ok -} - -func (Export) ClearWeak(w *WeakFields, num protoreflect.FieldNumber) { - delete(*w, int32(num)) -} - -func (Export) GetWeak(w WeakFields, num protoreflect.FieldNumber, name protoreflect.FullName) protoreflect.ProtoMessage { - if m, ok := w[int32(num)]; ok { - return m - } - mt, _ := protoregistry.GlobalTypes.FindMessageByName(name) - if mt == nil { - panic(fmt.Sprintf("message %v for weak field is not linked in", name)) - } - return mt.Zero().Interface() -} - -func (Export) SetWeak(w *WeakFields, num protoreflect.FieldNumber, name protoreflect.FullName, m protoreflect.ProtoMessage) { - if m != nil { - mt, _ := protoregistry.GlobalTypes.FindMessageByName(name) - if mt == nil { - panic(fmt.Sprintf("message %v for weak field is not linked in", name)) - } - if mt != m.ProtoReflect().Type() { - panic(fmt.Sprintf("invalid message type for weak field: got %T, want %T", m, mt.Zero().Interface())) - } - } - if m == nil || !m.ProtoReflect().IsValid() { - delete(*w, int32(num)) - return - } - if *w == nil { - *w = make(weakFields) - } - (*w)[int32(num)] = m -} diff --git a/vendor/google.golang.org/protobuf/internal/protolazy/bufferreader.go b/vendor/google.golang.org/protobuf/internal/protolazy/bufferreader.go new file mode 100644 index 000000000..82e5cab4a --- /dev/null +++ b/vendor/google.golang.org/protobuf/internal/protolazy/bufferreader.go @@ -0,0 +1,364 @@ +// Copyright 2024 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Helper code for parsing a protocol buffer + +package protolazy + +import ( + "errors" + "fmt" + "io" + + "google.golang.org/protobuf/encoding/protowire" +) + +// BufferReader is a structure encapsulating a protobuf and a current position +type BufferReader struct { + Buf []byte + Pos int +} + +// NewBufferReader creates a new BufferRead from a protobuf +func NewBufferReader(buf []byte) BufferReader { + return BufferReader{Buf: buf, Pos: 0} +} + +var errOutOfBounds = errors.New("protobuf decoding: out of bounds") +var errOverflow = errors.New("proto: integer overflow") + +func (b *BufferReader) DecodeVarintSlow() (x uint64, err error) { + i := b.Pos + l := len(b.Buf) + + for shift := uint(0); shift < 64; shift += 7 { + if i >= l { + err = io.ErrUnexpectedEOF + return + } + v := b.Buf[i] + i++ + x |= (uint64(v) & 0x7F) << shift + if v < 0x80 { + b.Pos = i + return + } + } + + // The number is too large to represent in a 64-bit value. + err = errOverflow + return +} + +// decodeVarint decodes a varint at the current position +func (b *BufferReader) DecodeVarint() (x uint64, err error) { + i := b.Pos + buf := b.Buf + + if i >= len(buf) { + return 0, io.ErrUnexpectedEOF + } else if buf[i] < 0x80 { + b.Pos++ + return uint64(buf[i]), nil + } else if len(buf)-i < 10 { + return b.DecodeVarintSlow() + } + + var v uint64 + // we already checked the first byte + x = uint64(buf[i]) & 127 + i++ + + v = uint64(buf[i]) + i++ + x |= (v & 127) << 7 + if v < 128 { + goto done + } + + v = uint64(buf[i]) + i++ + x |= (v & 127) << 14 + if v < 128 { + goto done + } + + v = uint64(buf[i]) + i++ + x |= (v & 127) << 21 + if v < 128 { + goto done + } + + v = uint64(buf[i]) + i++ + x |= (v & 127) << 28 + if v < 128 { + goto done + } + + v = uint64(buf[i]) + i++ + x |= (v & 127) << 35 + if v < 128 { + goto done + } + + v = uint64(buf[i]) + i++ + x |= (v & 127) << 42 + if v < 128 { + goto done + } + + v = uint64(buf[i]) + i++ + x |= (v & 127) << 49 + if v < 128 { + goto done + } + + v = uint64(buf[i]) + i++ + x |= (v & 127) << 56 + if v < 128 { + goto done + } + + v = uint64(buf[i]) + i++ + x |= (v & 127) << 63 + if v < 128 { + goto done + } + + return 0, errOverflow + +done: + b.Pos = i + return +} + +// decodeVarint32 decodes a varint32 at the current position +func (b *BufferReader) DecodeVarint32() (x uint32, err error) { + i := b.Pos + buf := b.Buf + + if i >= len(buf) { + return 0, io.ErrUnexpectedEOF + } else if buf[i] < 0x80 { + b.Pos++ + return uint32(buf[i]), nil + } else if len(buf)-i < 5 { + v, err := b.DecodeVarintSlow() + return uint32(v), err + } + + var v uint32 + // we already checked the first byte + x = uint32(buf[i]) & 127 + i++ + + v = uint32(buf[i]) + i++ + x |= (v & 127) << 7 + if v < 128 { + goto done + } + + v = uint32(buf[i]) + i++ + x |= (v & 127) << 14 + if v < 128 { + goto done + } + + v = uint32(buf[i]) + i++ + x |= (v & 127) << 21 + if v < 128 { + goto done + } + + v = uint32(buf[i]) + i++ + x |= (v & 127) << 28 + if v < 128 { + goto done + } + + return 0, errOverflow + +done: + b.Pos = i + return +} + +// skipValue skips a value in the protobuf, based on the specified tag +func (b *BufferReader) SkipValue(tag uint32) (err error) { + wireType := tag & 0x7 + switch protowire.Type(wireType) { + case protowire.VarintType: + err = b.SkipVarint() + case protowire.Fixed64Type: + err = b.SkipFixed64() + case protowire.BytesType: + var n uint32 + n, err = b.DecodeVarint32() + if err == nil { + err = b.Skip(int(n)) + } + case protowire.StartGroupType: + err = b.SkipGroup(tag) + case protowire.Fixed32Type: + err = b.SkipFixed32() + default: + err = fmt.Errorf("Unexpected wire type (%d)", wireType) + } + return +} + +// skipGroup skips a group with the specified tag. It executes efficiently using a tag stack +func (b *BufferReader) SkipGroup(tag uint32) (err error) { + tagStack := make([]uint32, 0, 16) + tagStack = append(tagStack, tag) + var n uint32 + for len(tagStack) > 0 { + tag, err = b.DecodeVarint32() + if err != nil { + return err + } + switch protowire.Type(tag & 0x7) { + case protowire.VarintType: + err = b.SkipVarint() + case protowire.Fixed64Type: + err = b.Skip(8) + case protowire.BytesType: + n, err = b.DecodeVarint32() + if err == nil { + err = b.Skip(int(n)) + } + case protowire.StartGroupType: + tagStack = append(tagStack, tag) + case protowire.Fixed32Type: + err = b.SkipFixed32() + case protowire.EndGroupType: + if protoFieldNumber(tagStack[len(tagStack)-1]) == protoFieldNumber(tag) { + tagStack = tagStack[:len(tagStack)-1] + } else { + err = fmt.Errorf("end group tag %d does not match begin group tag %d at pos %d", + protoFieldNumber(tag), protoFieldNumber(tagStack[len(tagStack)-1]), b.Pos) + } + } + if err != nil { + return err + } + } + return nil +} + +// skipVarint effiently skips a varint +func (b *BufferReader) SkipVarint() (err error) { + i := b.Pos + + if len(b.Buf)-i < 10 { + // Use DecodeVarintSlow() to check for buffer overflow, but ignore result + if _, err := b.DecodeVarintSlow(); err != nil { + return err + } + return nil + } + + if b.Buf[i] < 0x80 { + goto out + } + i++ + + if b.Buf[i] < 0x80 { + goto out + } + i++ + + if b.Buf[i] < 0x80 { + goto out + } + i++ + + if b.Buf[i] < 0x80 { + goto out + } + i++ + + if b.Buf[i] < 0x80 { + goto out + } + i++ + + if b.Buf[i] < 0x80 { + goto out + } + i++ + + if b.Buf[i] < 0x80 { + goto out + } + i++ + + if b.Buf[i] < 0x80 { + goto out + } + i++ + + if b.Buf[i] < 0x80 { + goto out + } + i++ + + if b.Buf[i] < 0x80 { + goto out + } + return errOverflow + +out: + b.Pos = i + 1 + return nil +} + +// skip skips the specified number of bytes +func (b *BufferReader) Skip(n int) (err error) { + if len(b.Buf) < b.Pos+n { + return io.ErrUnexpectedEOF + } + b.Pos += n + return +} + +// skipFixed64 skips a fixed64 +func (b *BufferReader) SkipFixed64() (err error) { + return b.Skip(8) +} + +// skipFixed32 skips a fixed32 +func (b *BufferReader) SkipFixed32() (err error) { + return b.Skip(4) +} + +// skipBytes skips a set of bytes +func (b *BufferReader) SkipBytes() (err error) { + n, err := b.DecodeVarint32() + if err != nil { + return err + } + return b.Skip(int(n)) +} + +// Done returns whether we are at the end of the protobuf +func (b *BufferReader) Done() bool { + return b.Pos == len(b.Buf) +} + +// Remaining returns how many bytes remain +func (b *BufferReader) Remaining() int { + return len(b.Buf) - b.Pos +} diff --git a/vendor/google.golang.org/protobuf/internal/protolazy/lazy.go b/vendor/google.golang.org/protobuf/internal/protolazy/lazy.go new file mode 100644 index 000000000..ff4d4834b --- /dev/null +++ b/vendor/google.golang.org/protobuf/internal/protolazy/lazy.go @@ -0,0 +1,359 @@ +// Copyright 2024 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package protolazy contains internal data structures for lazy message decoding. +package protolazy + +import ( + "fmt" + "sort" + + "google.golang.org/protobuf/encoding/protowire" + piface "google.golang.org/protobuf/runtime/protoiface" +) + +// IndexEntry is the structure for an index of the fields in a message of a +// proto (not descending to sub-messages) +type IndexEntry struct { + FieldNum uint32 + // first byte of this tag/field + Start uint32 + // first byte after a contiguous sequence of bytes for this tag/field, which could + // include a single encoding of the field, or multiple encodings for the field + End uint32 + // True if this protobuf segment includes multiple encodings of the field + MultipleContiguous bool +} + +// XXX_lazyUnmarshalInfo has information about a particular lazily decoded message +// +// Deprecated: Do not use. This will be deleted in the near future. +type XXX_lazyUnmarshalInfo struct { + // Index of fields and their positions in the protobuf for this + // message. Make index be a pointer to a slice so it can be updated + // atomically. The index pointer is only set once (lazily when/if + // the index is first needed), and must always be SET and LOADED + // ATOMICALLY. + index *[]IndexEntry + // The protobuf associated with this lazily decoded message. It is + // only set during proto.Unmarshal(). It doesn't need to be set and + // loaded atomically, since any simultaneous set (Unmarshal) and read + // (during a get) would already be a race in the app code. + Protobuf []byte + // The flags present when Unmarshal was originally called for this particular message + unmarshalFlags piface.UnmarshalInputFlags +} + +// The Buffer and SetBuffer methods let v2/internal/impl interact with +// XXX_lazyUnmarshalInfo via an interface, to avoid an import cycle. + +// Buffer returns the lazy unmarshal buffer. +// +// Deprecated: Do not use. This will be deleted in the near future. +func (lazy *XXX_lazyUnmarshalInfo) Buffer() []byte { + return lazy.Protobuf +} + +// SetBuffer sets the lazy unmarshal buffer. +// +// Deprecated: Do not use. This will be deleted in the near future. +func (lazy *XXX_lazyUnmarshalInfo) SetBuffer(b []byte) { + lazy.Protobuf = b +} + +// SetUnmarshalFlags is called to set a copy of the original unmarshalInputFlags. +// The flags should reflect how Unmarshal was called. +func (lazy *XXX_lazyUnmarshalInfo) SetUnmarshalFlags(f piface.UnmarshalInputFlags) { + lazy.unmarshalFlags = f +} + +// UnmarshalFlags returns the original unmarshalInputFlags. +func (lazy *XXX_lazyUnmarshalInfo) UnmarshalFlags() piface.UnmarshalInputFlags { + return lazy.unmarshalFlags +} + +// AllowedPartial returns true if the user originally unmarshalled this message with +// AllowPartial set to true +func (lazy *XXX_lazyUnmarshalInfo) AllowedPartial() bool { + return (lazy.unmarshalFlags & piface.UnmarshalCheckRequired) == 0 +} + +func protoFieldNumber(tag uint32) uint32 { + return tag >> 3 +} + +// buildIndex builds an index of the specified protobuf, return the index +// array and an error. +func buildIndex(buf []byte) ([]IndexEntry, error) { + index := make([]IndexEntry, 0, 16) + var lastProtoFieldNum uint32 + var outOfOrder bool + + var r BufferReader = NewBufferReader(buf) + + for !r.Done() { + var tag uint32 + var err error + var curPos = r.Pos + // INLINED: tag, err = r.DecodeVarint32() + { + i := r.Pos + buf := r.Buf + + if i >= len(buf) { + return nil, errOutOfBounds + } else if buf[i] < 0x80 { + r.Pos++ + tag = uint32(buf[i]) + } else if r.Remaining() < 5 { + var v uint64 + v, err = r.DecodeVarintSlow() + tag = uint32(v) + } else { + var v uint32 + // we already checked the first byte + tag = uint32(buf[i]) & 127 + i++ + + v = uint32(buf[i]) + i++ + tag |= (v & 127) << 7 + if v < 128 { + goto done + } + + v = uint32(buf[i]) + i++ + tag |= (v & 127) << 14 + if v < 128 { + goto done + } + + v = uint32(buf[i]) + i++ + tag |= (v & 127) << 21 + if v < 128 { + goto done + } + + v = uint32(buf[i]) + i++ + tag |= (v & 127) << 28 + if v < 128 { + goto done + } + + return nil, errOutOfBounds + + done: + r.Pos = i + } + } + // DONE: tag, err = r.DecodeVarint32() + + fieldNum := protoFieldNumber(tag) + if fieldNum < lastProtoFieldNum { + outOfOrder = true + } + + // Skip the current value -- will skip over an entire group as well. + // INLINED: err = r.SkipValue(tag) + wireType := tag & 0x7 + switch protowire.Type(wireType) { + case protowire.VarintType: + // INLINED: err = r.SkipVarint() + i := r.Pos + + if len(r.Buf)-i < 10 { + // Use DecodeVarintSlow() to skip while + // checking for buffer overflow, but ignore result + _, err = r.DecodeVarintSlow() + goto out2 + } + if r.Buf[i] < 0x80 { + goto out + } + i++ + + if r.Buf[i] < 0x80 { + goto out + } + i++ + + if r.Buf[i] < 0x80 { + goto out + } + i++ + + if r.Buf[i] < 0x80 { + goto out + } + i++ + + if r.Buf[i] < 0x80 { + goto out + } + i++ + + if r.Buf[i] < 0x80 { + goto out + } + i++ + + if r.Buf[i] < 0x80 { + goto out + } + i++ + + if r.Buf[i] < 0x80 { + goto out + } + i++ + + if r.Buf[i] < 0x80 { + goto out + } + i++ + + if r.Buf[i] < 0x80 { + goto out + } + return nil, errOverflow + out: + r.Pos = i + 1 + // DONE: err = r.SkipVarint() + case protowire.Fixed64Type: + err = r.SkipFixed64() + case protowire.BytesType: + var n uint32 + n, err = r.DecodeVarint32() + if err == nil { + err = r.Skip(int(n)) + } + case protowire.StartGroupType: + err = r.SkipGroup(tag) + case protowire.Fixed32Type: + err = r.SkipFixed32() + default: + err = fmt.Errorf("Unexpected wire type (%d)", wireType) + } + // DONE: err = r.SkipValue(tag) + + out2: + if err != nil { + return nil, err + } + if fieldNum != lastProtoFieldNum { + index = append(index, IndexEntry{FieldNum: fieldNum, + Start: uint32(curPos), + End: uint32(r.Pos)}, + ) + } else { + index[len(index)-1].End = uint32(r.Pos) + index[len(index)-1].MultipleContiguous = true + } + lastProtoFieldNum = fieldNum + } + if outOfOrder { + sort.Slice(index, func(i, j int) bool { + return index[i].FieldNum < index[j].FieldNum || + (index[i].FieldNum == index[j].FieldNum && + index[i].Start < index[j].Start) + }) + } + return index, nil +} + +func (lazy *XXX_lazyUnmarshalInfo) SizeField(num uint32) (size int) { + start, end, found, _, multipleEntries := lazy.FindFieldInProto(num) + if multipleEntries != nil { + for _, entry := range multipleEntries { + size += int(entry.End - entry.Start) + } + return size + } + if !found { + return 0 + } + return int(end - start) +} + +func (lazy *XXX_lazyUnmarshalInfo) AppendField(b []byte, num uint32) ([]byte, bool) { + start, end, found, _, multipleEntries := lazy.FindFieldInProto(num) + if multipleEntries != nil { + for _, entry := range multipleEntries { + b = append(b, lazy.Protobuf[entry.Start:entry.End]...) + } + return b, true + } + if !found { + return nil, false + } + b = append(b, lazy.Protobuf[start:end]...) + return b, true +} + +func (lazy *XXX_lazyUnmarshalInfo) SetIndex(index []IndexEntry) { + atomicStoreIndex(&lazy.index, &index) +} + +// FindFieldInProto looks for field fieldNum in lazyUnmarshalInfo information +// (including protobuf), returns startOffset/endOffset/found. +func (lazy *XXX_lazyUnmarshalInfo) FindFieldInProto(fieldNum uint32) (start, end uint32, found, multipleContiguous bool, multipleEntries []IndexEntry) { + if lazy.Protobuf == nil { + // There is no backing protobuf for this message -- it was made from a builder + return 0, 0, false, false, nil + } + index := atomicLoadIndex(&lazy.index) + if index == nil { + r, err := buildIndex(lazy.Protobuf) + if err != nil { + panic(fmt.Sprintf("findFieldInfo: error building index when looking for field %d: %v", fieldNum, err)) + } + // lazy.index is a pointer to the slice returned by BuildIndex + index = &r + atomicStoreIndex(&lazy.index, index) + } + return lookupField(index, fieldNum) +} + +// lookupField returns the offset at which the indicated field starts using +// the index, offset immediately after field ends (including all instances of +// a repeated field), and bools indicating if field was found and if there +// are multiple encodings of the field in the byte range. +// +// To hande the uncommon case where there are repeated encodings for the same +// field which are not consecutive in the protobuf (so we need to returns +// multiple start/end offsets), we also return a slice multipleEntries. If +// multipleEntries is non-nil, then multiple entries were found, and the +// values in the slice should be used, rather than start/end/found. +func lookupField(indexp *[]IndexEntry, fieldNum uint32) (start, end uint32, found bool, multipleContiguous bool, multipleEntries []IndexEntry) { + // The pointer indexp to the index was already loaded atomically. + // The slice is uniquely associated with the pointer, so it doesn't + // need to be loaded atomically. + index := *indexp + for i, entry := range index { + if fieldNum == entry.FieldNum { + if i < len(index)-1 && entry.FieldNum == index[i+1].FieldNum { + // Handle the uncommon case where there are + // repeated entries for the same field which + // are not contiguous in the protobuf. + multiple := make([]IndexEntry, 1, 2) + multiple[0] = IndexEntry{fieldNum, entry.Start, entry.End, entry.MultipleContiguous} + i++ + for i < len(index) && index[i].FieldNum == fieldNum { + multiple = append(multiple, IndexEntry{fieldNum, index[i].Start, index[i].End, index[i].MultipleContiguous}) + i++ + } + return 0, 0, false, false, multiple + + } + return entry.Start, entry.End, true, entry.MultipleContiguous, nil + } + if fieldNum < entry.FieldNum { + return 0, 0, false, false, nil + } + } + return 0, 0, false, false, nil +} diff --git a/vendor/google.golang.org/protobuf/internal/protolazy/pointer_unsafe.go b/vendor/google.golang.org/protobuf/internal/protolazy/pointer_unsafe.go new file mode 100644 index 000000000..dc2a64ca6 --- /dev/null +++ b/vendor/google.golang.org/protobuf/internal/protolazy/pointer_unsafe.go @@ -0,0 +1,17 @@ +// Copyright 2024 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package protolazy + +import ( + "sync/atomic" + "unsafe" +) + +func atomicLoadIndex(p **[]IndexEntry) *[]IndexEntry { + return (*[]IndexEntry)(atomic.LoadPointer((*unsafe.Pointer)(unsafe.Pointer(p)))) +} +func atomicStoreIndex(p **[]IndexEntry, v *[]IndexEntry) { + atomic.StorePointer((*unsafe.Pointer)(unsafe.Pointer(p)), unsafe.Pointer(v)) +} diff --git a/vendor/google.golang.org/protobuf/internal/version/version.go b/vendor/google.golang.org/protobuf/internal/version/version.go index fb8e15e8d..01efc3303 100644 --- a/vendor/google.golang.org/protobuf/internal/version/version.go +++ b/vendor/google.golang.org/protobuf/internal/version/version.go @@ -51,8 +51,8 @@ import ( // 10. Send out the CL for review and submit it. const ( Major = 1 - Minor = 35 - Patch = 1 + Minor = 36 + Patch = 5 PreRelease = "" ) diff --git a/vendor/google.golang.org/protobuf/proto/decode.go b/vendor/google.golang.org/protobuf/proto/decode.go index d75a6534c..4cbf1aeaf 100644 --- a/vendor/google.golang.org/protobuf/proto/decode.go +++ b/vendor/google.golang.org/protobuf/proto/decode.go @@ -8,7 +8,6 @@ import ( "google.golang.org/protobuf/encoding/protowire" "google.golang.org/protobuf/internal/encoding/messageset" "google.golang.org/protobuf/internal/errors" - "google.golang.org/protobuf/internal/flags" "google.golang.org/protobuf/internal/genid" "google.golang.org/protobuf/internal/pragma" "google.golang.org/protobuf/reflect/protoreflect" @@ -47,6 +46,12 @@ type UnmarshalOptions struct { // RecursionLimit limits how deeply messages may be nested. // If zero, a default limit is applied. RecursionLimit int + + // + // NoLazyDecoding turns off lazy decoding, which otherwise is enabled by + // default. Lazy decoding only affects submessages (annotated with [lazy = + // true] in the .proto file) within messages that use the Opaque API. + NoLazyDecoding bool } // Unmarshal parses the wire-format message in b and places the result in m. @@ -104,6 +109,16 @@ func (o UnmarshalOptions) unmarshal(b []byte, m protoreflect.Message) (out proto if o.DiscardUnknown { in.Flags |= protoiface.UnmarshalDiscardUnknown } + + if !allowPartial { + // This does not affect how current unmarshal functions work, it just allows them + // to record this for lazy the decoding case. + in.Flags |= protoiface.UnmarshalCheckRequired + } + if o.NoLazyDecoding { + in.Flags |= protoiface.UnmarshalNoLazyDecoding + } + out, err = methods.Unmarshal(in) } else { o.RecursionLimit-- @@ -156,10 +171,6 @@ func (o UnmarshalOptions) unmarshalMessageSlow(b []byte, m protoreflect.Message) var err error if fd == nil { err = errUnknown - } else if flags.ProtoLegacy { - if fd.IsWeak() && fd.Message().IsPlaceholder() { - err = errUnknown // weak referent is not linked in - } } // Parse the field value. diff --git a/vendor/google.golang.org/protobuf/proto/encode.go b/vendor/google.golang.org/protobuf/proto/encode.go index 1f847bcc3..f0473c586 100644 --- a/vendor/google.golang.org/protobuf/proto/encode.go +++ b/vendor/google.golang.org/protobuf/proto/encode.go @@ -63,7 +63,8 @@ type MarshalOptions struct { // options (except for UseCachedSize itself). // // 2. The message and all its submessages have not changed in any - // way since the Size call. + // way since the Size call. For lazily decoded messages, accessing + // a message results in decoding the message, which is a change. // // If either of these invariants is violated, // the results are undefined and may include panics or corrupted output. diff --git a/vendor/google.golang.org/protobuf/proto/size.go b/vendor/google.golang.org/protobuf/proto/size.go index 052fb5ae3..c8675806c 100644 --- a/vendor/google.golang.org/protobuf/proto/size.go +++ b/vendor/google.golang.org/protobuf/proto/size.go @@ -12,11 +12,19 @@ import ( ) // Size returns the size in bytes of the wire-format encoding of m. +// +// Note that Size might return more bytes than Marshal will write in the case of +// lazily decoded messages that arrive in non-minimal wire format: see +// https://protobuf.dev/reference/go/size/ for more details. func Size(m Message) int { return MarshalOptions{}.Size(m) } // Size returns the size in bytes of the wire-format encoding of m. +// +// Note that Size might return more bytes than Marshal will write in the case of +// lazily decoded messages that arrive in non-minimal wire format: see +// https://protobuf.dev/reference/go/size/ for more details. func (o MarshalOptions) Size(m Message) int { // Treat a nil message interface as an empty message; nothing to output. if m == nil { diff --git a/vendor/google.golang.org/protobuf/proto/wrapperopaque.go b/vendor/google.golang.org/protobuf/proto/wrapperopaque.go new file mode 100644 index 000000000..267fd0f1f --- /dev/null +++ b/vendor/google.golang.org/protobuf/proto/wrapperopaque.go @@ -0,0 +1,80 @@ +// Copyright 2024 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package proto + +// ValueOrNil returns nil if has is false, or a pointer to a new variable +// containing the value returned by the specified getter. +// +// This function is similar to the wrappers (proto.Int32(), proto.String(), +// etc.), but is generic (works for any field type) and works with the hasser +// and getter of a field, as opposed to a value. +// +// This is convenient when populating builder fields. +// +// Example: +// +// hop := attr.GetDirectHop() +// injectedRoute := ripb.InjectedRoute_builder{ +// Prefixes: route.GetPrefixes(), +// NextHop: proto.ValueOrNil(hop.HasAddress(), hop.GetAddress), +// } +func ValueOrNil[T any](has bool, getter func() T) *T { + if !has { + return nil + } + v := getter() + return &v +} + +// ValueOrDefault returns the protobuf message val if val is not nil, otherwise +// it returns a pointer to an empty val message. +// +// This function allows for translating code from the old Open Struct API to the +// new Opaque API. +// +// The old Open Struct API represented oneof fields with a wrapper struct: +// +// var signedImg *accountpb.SignedImage +// profile := &accountpb.Profile{ +// // The Avatar oneof will be set, with an empty SignedImage. +// Avatar: &accountpb.Profile_SignedImage{signedImg}, +// } +// +// The new Opaque API treats oneof fields like regular fields, there are no more +// wrapper structs: +// +// var signedImg *accountpb.SignedImage +// profile := &accountpb.Profile{} +// profile.SetSignedImage(signedImg) +// +// For convenience, the Opaque API also offers Builders, which allow for a +// direct translation of struct initialization. However, because Builders use +// nilness to represent field presence (but there is no non-nil wrapper struct +// anymore), Builders cannot distinguish between an unset oneof and a set oneof +// with nil message. The above code would need to be translated with help of the +// ValueOrDefault function to retain the same behavior: +// +// var signedImg *accountpb.SignedImage +// return &accountpb.Profile_builder{ +// SignedImage: proto.ValueOrDefault(signedImg), +// }.Build() +func ValueOrDefault[T interface { + *P + Message +}, P any](val T) T { + if val == nil { + return T(new(P)) + } + return val +} + +// ValueOrDefaultBytes is like ValueOrDefault but for working with fields of +// type []byte. +func ValueOrDefaultBytes(val []byte) []byte { + if val == nil { + return []byte{} + } + return val +} diff --git a/vendor/google.golang.org/protobuf/reflect/protodesc/desc.go b/vendor/google.golang.org/protobuf/reflect/protodesc/desc.go index 8fbecb4f5..823dbf3ba 100644 --- a/vendor/google.golang.org/protobuf/reflect/protodesc/desc.go +++ b/vendor/google.golang.org/protobuf/reflect/protodesc/desc.go @@ -13,6 +13,8 @@ package protodesc import ( + "strings" + "google.golang.org/protobuf/internal/editionssupport" "google.golang.org/protobuf/internal/errors" "google.golang.org/protobuf/internal/filedesc" @@ -102,13 +104,17 @@ func (o FileOptions) New(fd *descriptorpb.FileDescriptorProto, r Resolver) (prot default: return nil, errors.New("invalid syntax: %q", fd.GetSyntax()) } - if f.L1.Syntax == protoreflect.Editions && (fd.GetEdition() < editionssupport.Minimum || fd.GetEdition() > editionssupport.Maximum) { - return nil, errors.New("use of edition %v not yet supported by the Go Protobuf runtime", fd.GetEdition()) - } f.L1.Path = fd.GetName() if f.L1.Path == "" { return nil, errors.New("file path must be populated") } + if f.L1.Syntax == protoreflect.Editions && (fd.GetEdition() < editionssupport.Minimum || fd.GetEdition() > editionssupport.Maximum) { + // Allow cmd/protoc-gen-go/testdata to use any edition for easier + // testing of upcoming edition features. + if !strings.HasPrefix(fd.GetName(), "cmd/protoc-gen-go/testdata/") { + return nil, errors.New("use of edition %v not yet supported by the Go Protobuf runtime", fd.GetEdition()) + } + } f.L1.Package = protoreflect.FullName(fd.GetPackage()) if !f.L1.Package.IsValid() && f.L1.Package != "" { return nil, errors.New("invalid package: %q", f.L1.Package) @@ -126,17 +132,11 @@ func (o FileOptions) New(fd *descriptorpb.FileDescriptorProto, r Resolver) (prot } f.L2.Imports[i].IsPublic = true } - for _, i := range fd.GetWeakDependency() { - if !(0 <= i && int(i) < len(f.L2.Imports)) || f.L2.Imports[i].IsWeak { - return nil, errors.New("invalid or duplicate weak import index: %d", i) - } - f.L2.Imports[i].IsWeak = true - } imps := importSet{f.Path(): true} for i, path := range fd.GetDependency() { imp := &f.L2.Imports[i] f, err := r.FindFileByPath(path) - if err == protoregistry.NotFound && (o.AllowUnresolvable || imp.IsWeak) { + if err == protoregistry.NotFound && o.AllowUnresolvable { f = filedesc.PlaceholderFile(path) } else if err != nil { return nil, errors.New("could not resolve import %q: %v", path, err) diff --git a/vendor/google.golang.org/protobuf/reflect/protodesc/desc_init.go b/vendor/google.golang.org/protobuf/reflect/protodesc/desc_init.go index ebcb4a8ab..9da34998b 100644 --- a/vendor/google.golang.org/protobuf/reflect/protodesc/desc_init.go +++ b/vendor/google.golang.org/protobuf/reflect/protodesc/desc_init.go @@ -149,7 +149,6 @@ func (r descsByName) initFieldsFromDescriptorProto(fds []*descriptorpb.FieldDesc if opts := fd.GetOptions(); opts != nil { opts = proto.Clone(opts).(*descriptorpb.FieldOptions) f.L1.Options = func() protoreflect.ProtoMessage { return opts } - f.L1.IsWeak = opts.GetWeak() f.L1.IsLazy = opts.GetLazy() if opts.Packed != nil { f.L1.EditionFeatures.IsPacked = opts.GetPacked() diff --git a/vendor/google.golang.org/protobuf/reflect/protodesc/desc_resolve.go b/vendor/google.golang.org/protobuf/reflect/protodesc/desc_resolve.go index f3cebab29..ff692436e 100644 --- a/vendor/google.golang.org/protobuf/reflect/protodesc/desc_resolve.go +++ b/vendor/google.golang.org/protobuf/reflect/protodesc/desc_resolve.go @@ -43,7 +43,7 @@ func (r *resolver) resolveMessageDependencies(ms []filedesc.Message, mds []*desc o.L1.Fields.List = append(o.L1.Fields.List, f) } - if f.L1.Kind, f.L1.Enum, f.L1.Message, err = r.findTarget(f.Kind(), f.Parent().FullName(), partialName(fd.GetTypeName()), f.IsWeak()); err != nil { + if f.L1.Kind, f.L1.Enum, f.L1.Message, err = r.findTarget(f.Kind(), f.Parent().FullName(), partialName(fd.GetTypeName())); err != nil { return errors.New("message field %q cannot resolve type: %v", f.FullName(), err) } if f.L1.Kind == protoreflect.GroupKind && (f.IsMap() || f.IsMapEntry()) { @@ -73,10 +73,10 @@ func (r *resolver) resolveMessageDependencies(ms []filedesc.Message, mds []*desc func (r *resolver) resolveExtensionDependencies(xs []filedesc.Extension, xds []*descriptorpb.FieldDescriptorProto) (err error) { for i, xd := range xds { x := &xs[i] - if x.L1.Extendee, err = r.findMessageDescriptor(x.Parent().FullName(), partialName(xd.GetExtendee()), false); err != nil { + if x.L1.Extendee, err = r.findMessageDescriptor(x.Parent().FullName(), partialName(xd.GetExtendee())); err != nil { return errors.New("extension field %q cannot resolve extendee: %v", x.FullName(), err) } - if x.L1.Kind, x.L2.Enum, x.L2.Message, err = r.findTarget(x.Kind(), x.Parent().FullName(), partialName(xd.GetTypeName()), false); err != nil { + if x.L1.Kind, x.L2.Enum, x.L2.Message, err = r.findTarget(x.Kind(), x.Parent().FullName(), partialName(xd.GetTypeName())); err != nil { return errors.New("extension field %q cannot resolve type: %v", x.FullName(), err) } if xd.DefaultValue != nil { @@ -95,11 +95,11 @@ func (r *resolver) resolveServiceDependencies(ss []filedesc.Service, sds []*desc s := &ss[i] for j, md := range sd.GetMethod() { m := &s.L2.Methods.List[j] - m.L1.Input, err = r.findMessageDescriptor(m.Parent().FullName(), partialName(md.GetInputType()), false) + m.L1.Input, err = r.findMessageDescriptor(m.Parent().FullName(), partialName(md.GetInputType())) if err != nil { return errors.New("service method %q cannot resolve input: %v", m.FullName(), err) } - m.L1.Output, err = r.findMessageDescriptor(s.FullName(), partialName(md.GetOutputType()), false) + m.L1.Output, err = r.findMessageDescriptor(s.FullName(), partialName(md.GetOutputType())) if err != nil { return errors.New("service method %q cannot resolve output: %v", m.FullName(), err) } @@ -111,16 +111,16 @@ func (r *resolver) resolveServiceDependencies(ss []filedesc.Service, sds []*desc // findTarget finds an enum or message descriptor if k is an enum, message, // group, or unknown. If unknown, and the name could be resolved, the kind // returned kind is set based on the type of the resolved descriptor. -func (r *resolver) findTarget(k protoreflect.Kind, scope protoreflect.FullName, ref partialName, isWeak bool) (protoreflect.Kind, protoreflect.EnumDescriptor, protoreflect.MessageDescriptor, error) { +func (r *resolver) findTarget(k protoreflect.Kind, scope protoreflect.FullName, ref partialName) (protoreflect.Kind, protoreflect.EnumDescriptor, protoreflect.MessageDescriptor, error) { switch k { case protoreflect.EnumKind: - ed, err := r.findEnumDescriptor(scope, ref, isWeak) + ed, err := r.findEnumDescriptor(scope, ref) if err != nil { return 0, nil, nil, err } return k, ed, nil, nil case protoreflect.MessageKind, protoreflect.GroupKind: - md, err := r.findMessageDescriptor(scope, ref, isWeak) + md, err := r.findMessageDescriptor(scope, ref) if err != nil { return 0, nil, nil, err } @@ -129,7 +129,7 @@ func (r *resolver) findTarget(k protoreflect.Kind, scope protoreflect.FullName, // Handle unspecified kinds (possible with parsers that operate // on a per-file basis without knowledge of dependencies). d, err := r.findDescriptor(scope, ref) - if err == protoregistry.NotFound && (r.allowUnresolvable || isWeak) { + if err == protoregistry.NotFound && r.allowUnresolvable { return k, filedesc.PlaceholderEnum(ref.FullName()), filedesc.PlaceholderMessage(ref.FullName()), nil } else if err == protoregistry.NotFound { return 0, nil, nil, errors.New("%q not found", ref.FullName()) @@ -206,9 +206,9 @@ func (r *resolver) findDescriptor(scope protoreflect.FullName, ref partialName) } } -func (r *resolver) findEnumDescriptor(scope protoreflect.FullName, ref partialName, isWeak bool) (protoreflect.EnumDescriptor, error) { +func (r *resolver) findEnumDescriptor(scope protoreflect.FullName, ref partialName) (protoreflect.EnumDescriptor, error) { d, err := r.findDescriptor(scope, ref) - if err == protoregistry.NotFound && (r.allowUnresolvable || isWeak) { + if err == protoregistry.NotFound && r.allowUnresolvable { return filedesc.PlaceholderEnum(ref.FullName()), nil } else if err == protoregistry.NotFound { return nil, errors.New("%q not found", ref.FullName()) @@ -222,9 +222,9 @@ func (r *resolver) findEnumDescriptor(scope protoreflect.FullName, ref partialNa return ed, nil } -func (r *resolver) findMessageDescriptor(scope protoreflect.FullName, ref partialName, isWeak bool) (protoreflect.MessageDescriptor, error) { +func (r *resolver) findMessageDescriptor(scope protoreflect.FullName, ref partialName) (protoreflect.MessageDescriptor, error) { d, err := r.findDescriptor(scope, ref) - if err == protoregistry.NotFound && (r.allowUnresolvable || isWeak) { + if err == protoregistry.NotFound && r.allowUnresolvable { return filedesc.PlaceholderMessage(ref.FullName()), nil } else if err == protoregistry.NotFound { return nil, errors.New("%q not found", ref.FullName()) diff --git a/vendor/google.golang.org/protobuf/reflect/protodesc/desc_validate.go b/vendor/google.golang.org/protobuf/reflect/protodesc/desc_validate.go index 6de31c2eb..c343d9227 100644 --- a/vendor/google.golang.org/protobuf/reflect/protodesc/desc_validate.go +++ b/vendor/google.golang.org/protobuf/reflect/protodesc/desc_validate.go @@ -149,12 +149,6 @@ func validateMessageDeclarations(file *filedesc.File, ms []filedesc.Message, mds return errors.New("message field %q under proto3 optional semantics must be within a single element oneof", f.FullName()) } } - if f.IsWeak() && !flags.ProtoLegacy { - return errors.New("message field %q is a weak field, which is a legacy proto1 feature that is no longer supported", f.FullName()) - } - if f.IsWeak() && (!f.HasPresence() || !isOptionalMessage(f) || f.ContainingOneof() != nil) { - return errors.New("message field %q may only be weak for an optional message", f.FullName()) - } if f.IsPacked() && !isPackable(f) { return errors.New("message field %q is not packable", f.FullName()) } @@ -199,9 +193,6 @@ func validateMessageDeclarations(file *filedesc.File, ms []filedesc.Message, mds if f.Cardinality() != protoreflect.Optional { return errors.New("message field %q belongs in a oneof and must be optional", f.FullName()) } - if f.IsWeak() { - return errors.New("message field %q belongs in a oneof and must not be a weak reference", f.FullName()) - } } } @@ -254,9 +245,6 @@ func validateExtensionDeclarations(f *filedesc.File, xs []filedesc.Extension, xd return errors.New("extension field %q has an invalid number: %d", x.FullName(), x.Number()) } } - if xd.GetOptions().GetWeak() { - return errors.New("extension field %q cannot be a weak reference", x.FullName()) - } if x.IsPacked() && !isPackable(x) { return errors.New("extension field %q is not packable", x.FullName()) } diff --git a/vendor/google.golang.org/protobuf/reflect/protodesc/editions.go b/vendor/google.golang.org/protobuf/reflect/protodesc/editions.go index 002e0047a..697a61b29 100644 --- a/vendor/google.golang.org/protobuf/reflect/protodesc/editions.go +++ b/vendor/google.golang.org/protobuf/reflect/protodesc/editions.go @@ -11,6 +11,7 @@ import ( "google.golang.org/protobuf/internal/editiondefaults" "google.golang.org/protobuf/internal/filedesc" + "google.golang.org/protobuf/internal/genid" "google.golang.org/protobuf/proto" "google.golang.org/protobuf/reflect/protoreflect" "google.golang.org/protobuf/types/descriptorpb" @@ -43,6 +44,8 @@ func toEditionProto(ed filedesc.Edition) descriptorpb.Edition { return descriptorpb.Edition_EDITION_PROTO3 case filedesc.Edition2023: return descriptorpb.Edition_EDITION_2023 + case filedesc.Edition2024: + return descriptorpb.Edition_EDITION_2024 default: panic(fmt.Sprintf("unknown value for edition: %v", ed)) } @@ -123,10 +126,43 @@ func mergeEditionFeatures(parentDesc protoreflect.Descriptor, child *descriptorp parentFS.IsJSONCompliant = *jf == descriptorpb.FeatureSet_ALLOW } - if goFeatures, ok := proto.GetExtension(child, gofeaturespb.E_Go).(*gofeaturespb.GoFeatures); ok && goFeatures != nil { - if luje := goFeatures.LegacyUnmarshalJsonEnum; luje != nil { - parentFS.GenerateLegacyUnmarshalJSON = *luje - } + // We must not use proto.GetExtension(child, gofeaturespb.E_Go) + // because that only works for messages we generated, but not for + // dynamicpb messages. See golang/protobuf#1669. + // + // Further, we harden this code against adversarial inputs: a + // service which accepts descriptors from a possibly malicious + // source shouldn't crash. + goFeatures := child.ProtoReflect().Get(gofeaturespb.E_Go.TypeDescriptor()) + if !goFeatures.IsValid() { + return parentFS + } + gf, ok := goFeatures.Interface().(protoreflect.Message) + if !ok { + return parentFS + } + // gf.Interface() could be *dynamicpb.Message or *gofeaturespb.GoFeatures. + fields := gf.Descriptor().Fields() + + if fd := fields.ByNumber(genid.GoFeatures_LegacyUnmarshalJsonEnum_field_number); fd != nil && + !fd.IsList() && + fd.Kind() == protoreflect.BoolKind && + gf.Has(fd) { + parentFS.GenerateLegacyUnmarshalJSON = gf.Get(fd).Bool() + } + + if fd := fields.ByNumber(genid.GoFeatures_StripEnumPrefix_field_number); fd != nil && + !fd.IsList() && + fd.Kind() == protoreflect.EnumKind && + gf.Has(fd) { + parentFS.StripEnumPrefix = int(gf.Get(fd).Enum()) + } + + if fd := fields.ByNumber(genid.GoFeatures_ApiLevel_field_number); fd != nil && + !fd.IsList() && + fd.Kind() == protoreflect.EnumKind && + gf.Has(fd) { + parentFS.APILevel = int(gf.Get(fd).Enum()) } return parentFS diff --git a/vendor/google.golang.org/protobuf/reflect/protodesc/proto.go b/vendor/google.golang.org/protobuf/reflect/protodesc/proto.go index a5de8d400..9b880aa8c 100644 --- a/vendor/google.golang.org/protobuf/reflect/protodesc/proto.go +++ b/vendor/google.golang.org/protobuf/reflect/protodesc/proto.go @@ -32,9 +32,6 @@ func ToFileDescriptorProto(file protoreflect.FileDescriptor) *descriptorpb.FileD if imp.IsPublic { p.PublicDependency = append(p.PublicDependency, int32(i)) } - if imp.IsWeak { - p.WeakDependency = append(p.WeakDependency, int32(i)) - } } for i, locs := 0, file.SourceLocations(); i < locs.Len(); i++ { loc := locs.Get(i) diff --git a/vendor/google.golang.org/protobuf/reflect/protoreflect/type.go b/vendor/google.golang.org/protobuf/reflect/protoreflect/type.go index cd8fadbaf..cd7fbc87a 100644 --- a/vendor/google.golang.org/protobuf/reflect/protoreflect/type.go +++ b/vendor/google.golang.org/protobuf/reflect/protoreflect/type.go @@ -68,7 +68,7 @@ type Descriptor interface { // dependency is not resolved, in which case only name information is known. // // Placeholder types may only be returned by the following accessors - // as a result of unresolved dependencies or weak imports: + // as a result of unresolved dependencies: // // ╔═══════════════════════════════════╤═════════════════════╗ // ║ Accessor │ Descriptor ║ @@ -168,11 +168,7 @@ type FileImport struct { // The current file and the imported file must be within proto package. IsPublic bool - // IsWeak reports whether this is a weak import, which does not impose - // a direct dependency on the target file. - // - // Weak imports are a legacy proto1 feature. Equivalent behavior is - // achieved using proto2 extension fields or proto3 Any messages. + // Deprecated: support for weak fields has been removed. IsWeak bool } @@ -325,9 +321,7 @@ type FieldDescriptor interface { // specified in the source .proto file. HasOptionalKeyword() bool - // IsWeak reports whether this is a weak field, which does not impose a - // direct dependency on the target type. - // If true, then Message returns a placeholder type. + // Deprecated: support for weak fields has been removed. IsWeak() bool // IsPacked reports whether repeated primitive numeric kinds should be diff --git a/vendor/google.golang.org/protobuf/reflect/protoreflect/value.go b/vendor/google.golang.org/protobuf/reflect/protoreflect/value.go index a7b0d06ff..a4b78acef 100644 --- a/vendor/google.golang.org/protobuf/reflect/protoreflect/value.go +++ b/vendor/google.golang.org/protobuf/reflect/protoreflect/value.go @@ -152,7 +152,7 @@ type Message interface { // This method may return nil. // // The returned methods type is identical to - // google.golang.org/protobuf/runtime/protoiface.Methods. + // [google.golang.org/protobuf/runtime/protoiface.Methods]. // Consult the protoiface package documentation for details. ProtoMethods() *methods } diff --git a/vendor/google.golang.org/protobuf/runtime/protoiface/methods.go b/vendor/google.golang.org/protobuf/runtime/protoiface/methods.go index 246156561..28e9e9f03 100644 --- a/vendor/google.golang.org/protobuf/runtime/protoiface/methods.go +++ b/vendor/google.golang.org/protobuf/runtime/protoiface/methods.go @@ -122,6 +122,22 @@ type UnmarshalInputFlags = uint8 const ( UnmarshalDiscardUnknown UnmarshalInputFlags = 1 << iota + + // UnmarshalAliasBuffer permits unmarshal operations to alias the input buffer. + // The unmarshaller must not modify the contents of the buffer. + UnmarshalAliasBuffer + + // UnmarshalValidated indicates that validation has already been + // performed on the input buffer. + UnmarshalValidated + + // UnmarshalCheckRequired is set if this unmarshal operation ultimately will care if required fields are + // initialized. + UnmarshalCheckRequired + + // UnmarshalNoLazyDecoding is set if this unmarshal operation should not use + // lazy decoding, even when otherwise available. + UnmarshalNoLazyDecoding ) // UnmarshalOutputFlags are output from the Unmarshal method. diff --git a/vendor/google.golang.org/protobuf/runtime/protoimpl/impl.go b/vendor/google.golang.org/protobuf/runtime/protoimpl/impl.go index 4a1ab7fb3..93df1b569 100644 --- a/vendor/google.golang.org/protobuf/runtime/protoimpl/impl.go +++ b/vendor/google.golang.org/protobuf/runtime/protoimpl/impl.go @@ -15,6 +15,7 @@ import ( "google.golang.org/protobuf/internal/filedesc" "google.golang.org/protobuf/internal/filetype" "google.golang.org/protobuf/internal/impl" + "google.golang.org/protobuf/internal/protolazy" ) // UnsafeEnabled specifies whether package unsafe can be used. @@ -39,6 +40,9 @@ type ( ExtensionFieldV1 = impl.ExtensionField Pointer = impl.Pointer + + LazyUnmarshalInfo = *protolazy.XXX_lazyUnmarshalInfo + RaceDetectHookData = impl.RaceDetectHookData ) var X impl.Export diff --git a/vendor/google.golang.org/protobuf/types/descriptorpb/descriptor.pb.go b/vendor/google.golang.org/protobuf/types/descriptorpb/descriptor.pb.go index 6dea75cd5..a51633767 100644 --- a/vendor/google.golang.org/protobuf/types/descriptorpb/descriptor.pb.go +++ b/vendor/google.golang.org/protobuf/types/descriptorpb/descriptor.pb.go @@ -46,6 +46,7 @@ import ( protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + unsafe "unsafe" ) // The full set of known editions. @@ -69,7 +70,7 @@ const ( Edition_EDITION_2023 Edition = 1000 Edition_EDITION_2024 Edition = 1001 // Placeholder editions for testing feature resolution. These should not be - // used or relyed on outside of tests. + // used or relied on outside of tests. Edition_EDITION_1_TEST_ONLY Edition = 1 Edition_EDITION_2_TEST_ONLY Edition = 2 Edition_EDITION_99997_TEST_ONLY Edition = 99997 @@ -577,8 +578,6 @@ func (FieldOptions_JSType) EnumDescriptor() ([]byte, []int) { } // If set to RETENTION_SOURCE, the option will be omitted from the binary. -// Note: as of January 2023, support for this is in progress and does not yet -// have an effect (b/264593489). type FieldOptions_OptionRetention int32 const ( @@ -640,8 +639,7 @@ func (FieldOptions_OptionRetention) EnumDescriptor() ([]byte, []int) { // This indicates the types of entities that the field may apply to when used // as an option. If it is unset, then the field may be freely used as an -// option on any kind of entity. Note: as of January 2023, support for this is -// in progress and does not yet have an effect (b/264593489). +// option on any kind of entity. type FieldOptions_OptionTargetType int32 const ( @@ -1208,11 +1206,11 @@ func (GeneratedCodeInfo_Annotation_Semantic) EnumDescriptor() ([]byte, []int) { // The protocol compiler can output a FileDescriptorSet containing the .proto // files it parses. type FileDescriptorSet struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - File []*FileDescriptorProto `protobuf:"bytes,1,rep,name=file" json:"file,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + File []*FileDescriptorProto `protobuf:"bytes,1,rep,name=file" json:"file,omitempty"` + extensionFields protoimpl.ExtensionFields + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *FileDescriptorSet) Reset() { @@ -1254,12 +1252,9 @@ func (x *FileDescriptorSet) GetFile() []*FileDescriptorProto { // Describes a complete .proto file. type FileDescriptorProto struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` // file name, relative to root of source tree - Package *string `protobuf:"bytes,2,opt,name=package" json:"package,omitempty"` // e.g. "foo", "foo.bar", etc. + state protoimpl.MessageState `protogen:"open.v1"` + Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` // file name, relative to root of source tree + Package *string `protobuf:"bytes,2,opt,name=package" json:"package,omitempty"` // e.g. "foo", "foo.bar", etc. // Names of files imported by this file. Dependency []string `protobuf:"bytes,3,rep,name=dependency" json:"dependency,omitempty"` // Indexes of the public imported files in the dependency list above. @@ -1284,7 +1279,9 @@ type FileDescriptorProto struct { // If `edition` is present, this value must be "editions". Syntax *string `protobuf:"bytes,12,opt,name=syntax" json:"syntax,omitempty"` // The edition of the proto file. - Edition *Edition `protobuf:"varint,14,opt,name=edition,enum=google.protobuf.Edition" json:"edition,omitempty"` + Edition *Edition `protobuf:"varint,14,opt,name=edition,enum=google.protobuf.Edition" json:"edition,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *FileDescriptorProto) Reset() { @@ -1410,10 +1407,7 @@ func (x *FileDescriptorProto) GetEdition() Edition { // Describes a message type. type DescriptorProto struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` Field []*FieldDescriptorProto `protobuf:"bytes,2,rep,name=field" json:"field,omitempty"` Extension []*FieldDescriptorProto `protobuf:"bytes,6,rep,name=extension" json:"extension,omitempty"` @@ -1425,7 +1419,9 @@ type DescriptorProto struct { ReservedRange []*DescriptorProto_ReservedRange `protobuf:"bytes,9,rep,name=reserved_range,json=reservedRange" json:"reserved_range,omitempty"` // Reserved field names, which may not be used by fields in the same message. // A given name may only be reserved once. - ReservedName []string `protobuf:"bytes,10,rep,name=reserved_name,json=reservedName" json:"reserved_name,omitempty"` + ReservedName []string `protobuf:"bytes,10,rep,name=reserved_name,json=reservedName" json:"reserved_name,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *DescriptorProto) Reset() { @@ -1529,11 +1525,7 @@ func (x *DescriptorProto) GetReservedName() []string { } type ExtensionRangeOptions struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - extensionFields protoimpl.ExtensionFields - + state protoimpl.MessageState `protogen:"open.v1"` // The parser stores options it doesn't recognize here. See above. UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` // For external users: DO NOT USE. We are in the process of open sourcing @@ -1545,7 +1537,10 @@ type ExtensionRangeOptions struct { // The verification state of the range. // TODO: flip the default to DECLARATION once all empty ranges // are marked as UNVERIFIED. - Verification *ExtensionRangeOptions_VerificationState `protobuf:"varint,3,opt,name=verification,enum=google.protobuf.ExtensionRangeOptions_VerificationState,def=1" json:"verification,omitempty"` + Verification *ExtensionRangeOptions_VerificationState `protobuf:"varint,3,opt,name=verification,enum=google.protobuf.ExtensionRangeOptions_VerificationState,def=1" json:"verification,omitempty"` + extensionFields protoimpl.ExtensionFields + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } // Default values for ExtensionRangeOptions fields. @@ -1613,10 +1608,7 @@ func (x *ExtensionRangeOptions) GetVerification() ExtensionRangeOptions_Verifica // Describes a field within a message. type FieldDescriptorProto struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` Number *int32 `protobuf:"varint,3,opt,name=number" json:"number,omitempty"` Label *FieldDescriptorProto_Label `protobuf:"varint,4,opt,name=label,enum=google.protobuf.FieldDescriptorProto_Label" json:"label,omitempty"` @@ -1668,6 +1660,8 @@ type FieldDescriptorProto struct { // Proto2 optional fields do not set this flag, because they already indicate // optional with `LABEL_OPTIONAL`. Proto3Optional *bool `protobuf:"varint,17,opt,name=proto3_optional,json=proto3Optional" json:"proto3_optional,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *FieldDescriptorProto) Reset() { @@ -1779,12 +1773,11 @@ func (x *FieldDescriptorProto) GetProto3Optional() bool { // Describes a oneof. type OneofDescriptorProto struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Options *OneofOptions `protobuf:"bytes,2,opt,name=options" json:"options,omitempty"` unknownFields protoimpl.UnknownFields - - Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - Options *OneofOptions `protobuf:"bytes,2,opt,name=options" json:"options,omitempty"` + sizeCache protoimpl.SizeCache } func (x *OneofDescriptorProto) Reset() { @@ -1833,10 +1826,7 @@ func (x *OneofDescriptorProto) GetOptions() *OneofOptions { // Describes an enum type. type EnumDescriptorProto struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` Value []*EnumValueDescriptorProto `protobuf:"bytes,2,rep,name=value" json:"value,omitempty"` Options *EnumOptions `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"` @@ -1846,7 +1836,9 @@ type EnumDescriptorProto struct { ReservedRange []*EnumDescriptorProto_EnumReservedRange `protobuf:"bytes,4,rep,name=reserved_range,json=reservedRange" json:"reserved_range,omitempty"` // Reserved enum value names, which may not be reused. A given name may only // be reserved once. - ReservedName []string `protobuf:"bytes,5,rep,name=reserved_name,json=reservedName" json:"reserved_name,omitempty"` + ReservedName []string `protobuf:"bytes,5,rep,name=reserved_name,json=reservedName" json:"reserved_name,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *EnumDescriptorProto) Reset() { @@ -1916,13 +1908,12 @@ func (x *EnumDescriptorProto) GetReservedName() []string { // Describes a value within an enum. type EnumValueDescriptorProto struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Number *int32 `protobuf:"varint,2,opt,name=number" json:"number,omitempty"` + Options *EnumValueOptions `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"` unknownFields protoimpl.UnknownFields - - Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - Number *int32 `protobuf:"varint,2,opt,name=number" json:"number,omitempty"` - Options *EnumValueOptions `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"` + sizeCache protoimpl.SizeCache } func (x *EnumValueDescriptorProto) Reset() { @@ -1978,13 +1969,12 @@ func (x *EnumValueDescriptorProto) GetOptions() *EnumValueOptions { // Describes a service. type ServiceDescriptorProto struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Method []*MethodDescriptorProto `protobuf:"bytes,2,rep,name=method" json:"method,omitempty"` + Options *ServiceOptions `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"` unknownFields protoimpl.UnknownFields - - Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - Method []*MethodDescriptorProto `protobuf:"bytes,2,rep,name=method" json:"method,omitempty"` - Options *ServiceOptions `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"` + sizeCache protoimpl.SizeCache } func (x *ServiceDescriptorProto) Reset() { @@ -2040,11 +2030,8 @@ func (x *ServiceDescriptorProto) GetOptions() *ServiceOptions { // Describes a method of a service. type MethodDescriptorProto struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` // Input and output type names. These are resolved in the same way as // FieldDescriptorProto.type_name, but must refer to a message type. InputType *string `protobuf:"bytes,2,opt,name=input_type,json=inputType" json:"input_type,omitempty"` @@ -2054,6 +2041,8 @@ type MethodDescriptorProto struct { ClientStreaming *bool `protobuf:"varint,5,opt,name=client_streaming,json=clientStreaming,def=0" json:"client_streaming,omitempty"` // Identifies if server streams multiple server messages ServerStreaming *bool `protobuf:"varint,6,opt,name=server_streaming,json=serverStreaming,def=0" json:"server_streaming,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } // Default values for MethodDescriptorProto fields. @@ -2135,11 +2124,7 @@ func (x *MethodDescriptorProto) GetServerStreaming() bool { } type FileOptions struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - extensionFields protoimpl.ExtensionFields - + state protoimpl.MessageState `protogen:"open.v1"` // Sets the Java package where classes generated from this .proto will be // placed. By default, the proto package is used, but this is often // inappropriate because proto packages do not normally start with backwards @@ -2231,6 +2216,9 @@ type FileOptions struct { // The parser stores options it doesn't recognize here. // See the documentation for the "Options" section above. UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` + extensionFields protoimpl.ExtensionFields + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } // Default values for FileOptions fields. @@ -2424,11 +2412,7 @@ func (x *FileOptions) GetUninterpretedOption() []*UninterpretedOption { } type MessageOptions struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - extensionFields protoimpl.ExtensionFields - + state protoimpl.MessageState `protogen:"open.v1"` // Set true to use the old proto1 MessageSet wire format for extensions. // This is provided for backwards-compatibility with the MessageSet wire // format. You should not use this for any other reason: It's less @@ -2501,6 +2485,9 @@ type MessageOptions struct { Features *FeatureSet `protobuf:"bytes,12,opt,name=features" json:"features,omitempty"` // The parser stores options it doesn't recognize here. See above. UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` + extensionFields protoimpl.ExtensionFields + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } // Default values for MessageOptions fields. @@ -2591,17 +2578,14 @@ func (x *MessageOptions) GetUninterpretedOption() []*UninterpretedOption { } type FieldOptions struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - extensionFields protoimpl.ExtensionFields - + state protoimpl.MessageState `protogen:"open.v1"` + // NOTE: ctype is deprecated. Use `features.(pb.cpp).string_type` instead. // The ctype option instructs the C++ code generator to use a different // representation of the field than it normally would. See the specific // options below. This option is only implemented to support use of // [ctype=CORD] and [ctype=STRING] (the default) on non-repeated fields of - // type "bytes" in the open source release -- sorry, we'll try to include - // other types in a future version! + // type "bytes" in the open source release. + // TODO: make ctype actually deprecated. Ctype *FieldOptions_CType `protobuf:"varint,1,opt,name=ctype,enum=google.protobuf.FieldOptions_CType,def=0" json:"ctype,omitempty"` // The packed option can be enabled for repeated primitive fields to enable // a more efficient representation on the wire. Rather than repeatedly @@ -2668,6 +2652,9 @@ type FieldOptions struct { FeatureSupport *FieldOptions_FeatureSupport `protobuf:"bytes,22,opt,name=feature_support,json=featureSupport" json:"feature_support,omitempty"` // The parser stores options it doesn't recognize here. See above. UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` + extensionFields protoimpl.ExtensionFields + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } // Default values for FieldOptions fields. @@ -2810,15 +2797,14 @@ func (x *FieldOptions) GetUninterpretedOption() []*UninterpretedOption { } type OneofOptions struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - extensionFields protoimpl.ExtensionFields - + state protoimpl.MessageState `protogen:"open.v1"` // Any features defined in the specific edition. Features *FeatureSet `protobuf:"bytes,1,opt,name=features" json:"features,omitempty"` // The parser stores options it doesn't recognize here. See above. UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` + extensionFields protoimpl.ExtensionFields + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *OneofOptions) Reset() { @@ -2866,11 +2852,7 @@ func (x *OneofOptions) GetUninterpretedOption() []*UninterpretedOption { } type EnumOptions struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - extensionFields protoimpl.ExtensionFields - + state protoimpl.MessageState `protogen:"open.v1"` // Set this option to true to allow mapping different tag names to the same // value. AllowAlias *bool `protobuf:"varint,2,opt,name=allow_alias,json=allowAlias" json:"allow_alias,omitempty"` @@ -2892,6 +2874,9 @@ type EnumOptions struct { Features *FeatureSet `protobuf:"bytes,7,opt,name=features" json:"features,omitempty"` // The parser stores options it doesn't recognize here. See above. UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` + extensionFields protoimpl.ExtensionFields + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } // Default values for EnumOptions fields. @@ -2966,11 +2951,7 @@ func (x *EnumOptions) GetUninterpretedOption() []*UninterpretedOption { } type EnumValueOptions struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - extensionFields protoimpl.ExtensionFields - + state protoimpl.MessageState `protogen:"open.v1"` // Is this enum value deprecated? // Depending on the target platform, this can emit Deprecated annotations // for the enum value, or it will be completely ignored; in the very least, @@ -2986,6 +2967,9 @@ type EnumValueOptions struct { FeatureSupport *FieldOptions_FeatureSupport `protobuf:"bytes,4,opt,name=feature_support,json=featureSupport" json:"feature_support,omitempty"` // The parser stores options it doesn't recognize here. See above. UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` + extensionFields protoimpl.ExtensionFields + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } // Default values for EnumValueOptions fields. @@ -3060,11 +3044,7 @@ func (x *EnumValueOptions) GetUninterpretedOption() []*UninterpretedOption { } type ServiceOptions struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - extensionFields protoimpl.ExtensionFields - + state protoimpl.MessageState `protogen:"open.v1"` // Any features defined in the specific edition. Features *FeatureSet `protobuf:"bytes,34,opt,name=features" json:"features,omitempty"` // Is this service deprecated? @@ -3074,6 +3054,9 @@ type ServiceOptions struct { Deprecated *bool `protobuf:"varint,33,opt,name=deprecated,def=0" json:"deprecated,omitempty"` // The parser stores options it doesn't recognize here. See above. UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` + extensionFields protoimpl.ExtensionFields + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } // Default values for ServiceOptions fields. @@ -3133,11 +3116,7 @@ func (x *ServiceOptions) GetUninterpretedOption() []*UninterpretedOption { } type MethodOptions struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - extensionFields protoimpl.ExtensionFields - + state protoimpl.MessageState `protogen:"open.v1"` // Is this method deprecated? // Depending on the target platform, this can emit Deprecated annotations // for the method, or it will be completely ignored; in the very least, @@ -3148,6 +3127,9 @@ type MethodOptions struct { Features *FeatureSet `protobuf:"bytes,35,opt,name=features" json:"features,omitempty"` // The parser stores options it doesn't recognize here. See above. UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` + extensionFields protoimpl.ExtensionFields + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } // Default values for MethodOptions fields. @@ -3221,11 +3203,8 @@ func (x *MethodOptions) GetUninterpretedOption() []*UninterpretedOption { // or produced by Descriptor::CopyTo()) will never have UninterpretedOptions // in them. type UninterpretedOption struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name []*UninterpretedOption_NamePart `protobuf:"bytes,2,rep,name=name" json:"name,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Name []*UninterpretedOption_NamePart `protobuf:"bytes,2,rep,name=name" json:"name,omitempty"` // The value of the uninterpreted option, in whatever type the tokenizer // identified it as during parsing. Exactly one of these should be set. IdentifierValue *string `protobuf:"bytes,3,opt,name=identifier_value,json=identifierValue" json:"identifier_value,omitempty"` @@ -3234,6 +3213,8 @@ type UninterpretedOption struct { DoubleValue *float64 `protobuf:"fixed64,6,opt,name=double_value,json=doubleValue" json:"double_value,omitempty"` StringValue []byte `protobuf:"bytes,7,opt,name=string_value,json=stringValue" json:"string_value,omitempty"` AggregateValue *string `protobuf:"bytes,8,opt,name=aggregate_value,json=aggregateValue" json:"aggregate_value,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *UninterpretedOption) Reset() { @@ -3322,17 +3303,16 @@ func (x *UninterpretedOption) GetAggregateValue() string { // be designed and implemented to handle this, hopefully before we ever hit a // conflict here. type FeatureSet struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - extensionFields protoimpl.ExtensionFields - + state protoimpl.MessageState `protogen:"open.v1"` FieldPresence *FeatureSet_FieldPresence `protobuf:"varint,1,opt,name=field_presence,json=fieldPresence,enum=google.protobuf.FeatureSet_FieldPresence" json:"field_presence,omitempty"` EnumType *FeatureSet_EnumType `protobuf:"varint,2,opt,name=enum_type,json=enumType,enum=google.protobuf.FeatureSet_EnumType" json:"enum_type,omitempty"` RepeatedFieldEncoding *FeatureSet_RepeatedFieldEncoding `protobuf:"varint,3,opt,name=repeated_field_encoding,json=repeatedFieldEncoding,enum=google.protobuf.FeatureSet_RepeatedFieldEncoding" json:"repeated_field_encoding,omitempty"` Utf8Validation *FeatureSet_Utf8Validation `protobuf:"varint,4,opt,name=utf8_validation,json=utf8Validation,enum=google.protobuf.FeatureSet_Utf8Validation" json:"utf8_validation,omitempty"` MessageEncoding *FeatureSet_MessageEncoding `protobuf:"varint,5,opt,name=message_encoding,json=messageEncoding,enum=google.protobuf.FeatureSet_MessageEncoding" json:"message_encoding,omitempty"` JsonFormat *FeatureSet_JsonFormat `protobuf:"varint,6,opt,name=json_format,json=jsonFormat,enum=google.protobuf.FeatureSet_JsonFormat" json:"json_format,omitempty"` + extensionFields protoimpl.ExtensionFields + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *FeatureSet) Reset() { @@ -3412,10 +3392,7 @@ func (x *FeatureSet) GetJsonFormat() FeatureSet_JsonFormat { // feature resolution. The resolution with this object becomes a simple search // for the closest matching edition, followed by proto merges. type FeatureSetDefaults struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` Defaults []*FeatureSetDefaults_FeatureSetEditionDefault `protobuf:"bytes,1,rep,name=defaults" json:"defaults,omitempty"` // The minimum supported edition (inclusive) when this was constructed. // Editions before this will not have defaults. @@ -3423,6 +3400,8 @@ type FeatureSetDefaults struct { // The maximum known edition (inclusive) when this was constructed. Editions // after this will not have reliable defaults. MaximumEdition *Edition `protobuf:"varint,5,opt,name=maximum_edition,json=maximumEdition,enum=google.protobuf.Edition" json:"maximum_edition,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *FeatureSetDefaults) Reset() { @@ -3479,10 +3458,7 @@ func (x *FeatureSetDefaults) GetMaximumEdition() Edition { // Encapsulates information about the original source file from which a // FileDescriptorProto was generated. type SourceCodeInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // A Location identifies a piece of source code in a .proto file which // corresponds to a particular definition. This information is intended // to be useful to IDEs, code indexers, documentation generators, and similar @@ -3531,7 +3507,10 @@ type SourceCodeInfo struct { // - Code which tries to interpret locations should probably be designed to // ignore those that it doesn't understand, as more types of locations could // be recorded in the future. - Location []*SourceCodeInfo_Location `protobuf:"bytes,1,rep,name=location" json:"location,omitempty"` + Location []*SourceCodeInfo_Location `protobuf:"bytes,1,rep,name=location" json:"location,omitempty"` + extensionFields protoimpl.ExtensionFields + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *SourceCodeInfo) Reset() { @@ -3575,13 +3554,12 @@ func (x *SourceCodeInfo) GetLocation() []*SourceCodeInfo_Location { // file. A GeneratedCodeInfo message is associated with only one generated // source file, but may contain references to different source .proto files. type GeneratedCodeInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // An Annotation connects some span of text in generated code to an element // of its generating .proto file. - Annotation []*GeneratedCodeInfo_Annotation `protobuf:"bytes,1,rep,name=annotation" json:"annotation,omitempty"` + Annotation []*GeneratedCodeInfo_Annotation `protobuf:"bytes,1,rep,name=annotation" json:"annotation,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GeneratedCodeInfo) Reset() { @@ -3622,13 +3600,12 @@ func (x *GeneratedCodeInfo) GetAnnotation() []*GeneratedCodeInfo_Annotation { } type DescriptorProto_ExtensionRange struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Start *int32 `protobuf:"varint,1,opt,name=start" json:"start,omitempty"` // Inclusive. + End *int32 `protobuf:"varint,2,opt,name=end" json:"end,omitempty"` // Exclusive. + Options *ExtensionRangeOptions `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"` unknownFields protoimpl.UnknownFields - - Start *int32 `protobuf:"varint,1,opt,name=start" json:"start,omitempty"` // Inclusive. - End *int32 `protobuf:"varint,2,opt,name=end" json:"end,omitempty"` // Exclusive. - Options *ExtensionRangeOptions `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"` + sizeCache protoimpl.SizeCache } func (x *DescriptorProto_ExtensionRange) Reset() { @@ -3686,12 +3663,11 @@ func (x *DescriptorProto_ExtensionRange) GetOptions() *ExtensionRangeOptions { // fields or extension ranges in the same message. Reserved ranges may // not overlap. type DescriptorProto_ReservedRange struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Start *int32 `protobuf:"varint,1,opt,name=start" json:"start,omitempty"` // Inclusive. + End *int32 `protobuf:"varint,2,opt,name=end" json:"end,omitempty"` // Exclusive. unknownFields protoimpl.UnknownFields - - Start *int32 `protobuf:"varint,1,opt,name=start" json:"start,omitempty"` // Inclusive. - End *int32 `protobuf:"varint,2,opt,name=end" json:"end,omitempty"` // Exclusive. + sizeCache protoimpl.SizeCache } func (x *DescriptorProto_ReservedRange) Reset() { @@ -3739,10 +3715,7 @@ func (x *DescriptorProto_ReservedRange) GetEnd() int32 { } type ExtensionRangeOptions_Declaration struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The extension number declared within the extension range. Number *int32 `protobuf:"varint,1,opt,name=number" json:"number,omitempty"` // The fully-qualified name of the extension field. There must be a leading @@ -3758,7 +3731,9 @@ type ExtensionRangeOptions_Declaration struct { Reserved *bool `protobuf:"varint,5,opt,name=reserved" json:"reserved,omitempty"` // If true, indicates that the extension must be defined as repeated. // Otherwise the extension must be defined as optional. - Repeated *bool `protobuf:"varint,6,opt,name=repeated" json:"repeated,omitempty"` + Repeated *bool `protobuf:"varint,6,opt,name=repeated" json:"repeated,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ExtensionRangeOptions_Declaration) Reset() { @@ -3833,12 +3808,11 @@ func (x *ExtensionRangeOptions_Declaration) GetRepeated() bool { // is inclusive such that it can appropriately represent the entire int32 // domain. type EnumDescriptorProto_EnumReservedRange struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Start *int32 `protobuf:"varint,1,opt,name=start" json:"start,omitempty"` // Inclusive. + End *int32 `protobuf:"varint,2,opt,name=end" json:"end,omitempty"` // Inclusive. unknownFields protoimpl.UnknownFields - - Start *int32 `protobuf:"varint,1,opt,name=start" json:"start,omitempty"` // Inclusive. - End *int32 `protobuf:"varint,2,opt,name=end" json:"end,omitempty"` // Inclusive. + sizeCache protoimpl.SizeCache } func (x *EnumDescriptorProto_EnumReservedRange) Reset() { @@ -3886,12 +3860,11 @@ func (x *EnumDescriptorProto_EnumReservedRange) GetEnd() int32 { } type FieldOptions_EditionDefault struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Edition *Edition `protobuf:"varint,3,opt,name=edition,enum=google.protobuf.Edition" json:"edition,omitempty"` + Value *string `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` // Textproto value. unknownFields protoimpl.UnknownFields - - Edition *Edition `protobuf:"varint,3,opt,name=edition,enum=google.protobuf.Edition" json:"edition,omitempty"` - Value *string `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` // Textproto value. + sizeCache protoimpl.SizeCache } func (x *FieldOptions_EditionDefault) Reset() { @@ -3940,10 +3913,7 @@ func (x *FieldOptions_EditionDefault) GetValue() string { // Information about the support window of a feature. type FieldOptions_FeatureSupport struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The edition that this feature was first available in. In editions // earlier than this one, the default assigned to EDITION_LEGACY will be // used, and proto files will not be able to override it. @@ -3958,6 +3928,8 @@ type FieldOptions_FeatureSupport struct { // this one, the last default assigned will be used, and proto files will // not be able to override it. EditionRemoved *Edition `protobuf:"varint,4,opt,name=edition_removed,json=editionRemoved,enum=google.protobuf.Edition" json:"edition_removed,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *FieldOptions_FeatureSupport) Reset() { @@ -4024,12 +3996,11 @@ func (x *FieldOptions_FeatureSupport) GetEditionRemoved() Edition { // E.g.,{ ["foo", false], ["bar.baz", true], ["moo", false] } represents // "foo.(bar.baz).moo". type UninterpretedOption_NamePart struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + NamePart *string `protobuf:"bytes,1,req,name=name_part,json=namePart" json:"name_part,omitempty"` + IsExtension *bool `protobuf:"varint,2,req,name=is_extension,json=isExtension" json:"is_extension,omitempty"` unknownFields protoimpl.UnknownFields - - NamePart *string `protobuf:"bytes,1,req,name=name_part,json=namePart" json:"name_part,omitempty"` - IsExtension *bool `protobuf:"varint,2,req,name=is_extension,json=isExtension" json:"is_extension,omitempty"` + sizeCache protoimpl.SizeCache } func (x *UninterpretedOption_NamePart) Reset() { @@ -4081,15 +4052,14 @@ func (x *UninterpretedOption_NamePart) GetIsExtension() bool { // the defaults at the closest matching edition ordered at or before it should // be used. This field must be in strict ascending order by edition. type FeatureSetDefaults_FeatureSetEditionDefault struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Edition *Edition `protobuf:"varint,3,opt,name=edition,enum=google.protobuf.Edition" json:"edition,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Edition *Edition `protobuf:"varint,3,opt,name=edition,enum=google.protobuf.Edition" json:"edition,omitempty"` // Defaults of features that can be overridden in this edition. OverridableFeatures *FeatureSet `protobuf:"bytes,4,opt,name=overridable_features,json=overridableFeatures" json:"overridable_features,omitempty"` // Defaults of features that can't be overridden in this edition. FixedFeatures *FeatureSet `protobuf:"bytes,5,opt,name=fixed_features,json=fixedFeatures" json:"fixed_features,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *FeatureSetDefaults_FeatureSetEditionDefault) Reset() { @@ -4144,10 +4114,7 @@ func (x *FeatureSetDefaults_FeatureSetEditionDefault) GetFixedFeatures() *Featur } type SourceCodeInfo_Location struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Identifies which part of the FileDescriptorProto was defined at this // location. // @@ -4239,6 +4206,8 @@ type SourceCodeInfo_Location struct { LeadingComments *string `protobuf:"bytes,3,opt,name=leading_comments,json=leadingComments" json:"leading_comments,omitempty"` TrailingComments *string `protobuf:"bytes,4,opt,name=trailing_comments,json=trailingComments" json:"trailing_comments,omitempty"` LeadingDetachedComments []string `protobuf:"bytes,6,rep,name=leading_detached_comments,json=leadingDetachedComments" json:"leading_detached_comments,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *SourceCodeInfo_Location) Reset() { @@ -4307,10 +4276,7 @@ func (x *SourceCodeInfo_Location) GetLeadingDetachedComments() []string { } type GeneratedCodeInfo_Annotation struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Identifies the element in the original source .proto file. This field // is formatted the same as SourceCodeInfo.Location.path. Path []int32 `protobuf:"varint,1,rep,packed,name=path" json:"path,omitempty"` @@ -4322,8 +4288,10 @@ type GeneratedCodeInfo_Annotation struct { // Identifies the ending offset in bytes in the generated code that // relates to the identified object. The end offset should be one past // the last relevant byte (so the length of the text = end - begin). - End *int32 `protobuf:"varint,4,opt,name=end" json:"end,omitempty"` - Semantic *GeneratedCodeInfo_Annotation_Semantic `protobuf:"varint,5,opt,name=semantic,enum=google.protobuf.GeneratedCodeInfo_Annotation_Semantic" json:"semantic,omitempty"` + End *int32 `protobuf:"varint,4,opt,name=end" json:"end,omitempty"` + Semantic *GeneratedCodeInfo_Annotation_Semantic `protobuf:"varint,5,opt,name=semantic,enum=google.protobuf.GeneratedCodeInfo_Annotation_Semantic" json:"semantic,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GeneratedCodeInfo_Annotation) Reset() { @@ -4393,498 +4361,478 @@ func (x *GeneratedCodeInfo_Annotation) GetSemantic() GeneratedCodeInfo_Annotatio var File_google_protobuf_descriptor_proto protoreflect.FileDescriptor -var file_google_protobuf_descriptor_proto_rawDesc = []byte{ +var file_google_protobuf_descriptor_proto_rawDesc = string([]byte{ 0x0a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x22, 0x4d, 0x0a, 0x11, 0x46, 0x69, 0x6c, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, + 0x62, 0x75, 0x66, 0x22, 0x5b, 0x0a, 0x11, 0x46, 0x69, 0x6c, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x74, 0x12, 0x38, 0x0a, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x04, 0x66, 0x69, - 0x6c, 0x65, 0x22, 0x98, 0x05, 0x0a, 0x13, 0x46, 0x69, 0x6c, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, - 0x0a, 0x07, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x65, - 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x65, - 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x2b, 0x0a, 0x11, 0x70, 0x75, 0x62, 0x6c, - 0x69, 0x63, 0x5f, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x0a, 0x20, - 0x03, 0x28, 0x05, 0x52, 0x10, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x44, 0x65, 0x70, 0x65, 0x6e, - 0x64, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x27, 0x0a, 0x0f, 0x77, 0x65, 0x61, 0x6b, 0x5f, 0x64, 0x65, - 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x05, 0x52, 0x0e, - 0x77, 0x65, 0x61, 0x6b, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x43, - 0x0a, 0x0c, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, - 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x0b, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, - 0x79, 0x70, 0x65, 0x12, 0x41, 0x0a, 0x09, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x74, 0x79, 0x70, 0x65, - 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x44, 0x65, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x08, 0x65, 0x6e, - 0x75, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x41, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x43, 0x0a, 0x09, 0x65, 0x78, 0x74, - 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, - 0x69, 0x65, 0x6c, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x52, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x36, - 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x49, 0x0a, 0x10, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, - 0x6f, 0x52, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, - 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x18, 0x0c, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x73, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x12, 0x32, 0x0a, 0x07, 0x65, 0x64, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xb9, 0x06, - 0x0a, 0x0f, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3b, 0x0a, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44, 0x65, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x05, 0x66, 0x69, 0x65, - 0x6c, 0x64, 0x12, 0x43, 0x0a, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, - 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44, 0x65, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x09, 0x65, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x41, 0x0a, 0x0b, 0x6e, 0x65, 0x73, 0x74, 0x65, - 0x64, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, - 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x0a, - 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x41, 0x0a, 0x09, 0x65, 0x6e, - 0x75, 0x6d, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, + 0x6c, 0x65, 0x2a, 0x0c, 0x08, 0x80, 0xec, 0xca, 0xff, 0x01, 0x10, 0x81, 0xec, 0xca, 0xff, 0x01, + 0x22, 0x98, 0x05, 0x0a, 0x13, 0x46, 0x69, 0x6c, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, + 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, + 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, + 0x65, 0x6e, 0x63, 0x79, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x65, + 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x2b, 0x0a, 0x11, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, + 0x5f, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x0a, 0x20, 0x03, 0x28, + 0x05, 0x52, 0x10, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, + 0x6e, 0x63, 0x79, 0x12, 0x27, 0x0a, 0x0f, 0x77, 0x65, 0x61, 0x6b, 0x5f, 0x64, 0x65, 0x70, 0x65, + 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x05, 0x52, 0x0e, 0x77, 0x65, + 0x61, 0x6b, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x43, 0x0a, 0x0c, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x0b, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x41, 0x0a, 0x09, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x44, 0x65, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x08, 0x65, 0x6e, 0x75, 0x6d, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x41, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, + 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x44, + 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x07, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x43, 0x0a, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, + 0x6c, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x52, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x36, 0x0a, 0x07, + 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x45, 0x6e, 0x75, 0x6d, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x52, 0x08, 0x65, 0x6e, 0x75, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x58, 0x0a, - 0x0f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, - 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, - 0x6f, 0x6e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x0e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, - 0x6f, 0x6e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x44, 0x0a, 0x0a, 0x6f, 0x6e, 0x65, 0x6f, 0x66, - 0x5f, 0x64, 0x65, 0x63, 0x6c, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4f, 0x6e, - 0x65, 0x6f, 0x66, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x52, 0x09, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x44, 0x65, 0x63, 0x6c, 0x12, 0x39, 0x0a, - 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, + 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x49, 0x0a, 0x10, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x63, + 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, - 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x55, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x65, - 0x72, 0x76, 0x65, 0x64, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, - 0x52, 0x0d, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, - 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x0a, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, - 0x4e, 0x61, 0x6d, 0x65, 0x1a, 0x7a, 0x0a, 0x0e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, - 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x12, 0x40, - 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x6e, 0x67, 0x65, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x1a, 0x37, 0x0a, 0x0d, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x52, 0x61, 0x6e, 0x67, - 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x22, 0xcc, 0x04, 0x0a, 0x15, 0x45, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, - 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, - 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, - 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x59, 0x0a, - 0x0b, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x61, - 0x6e, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x6c, 0x61, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x03, 0x88, 0x01, 0x02, 0x52, 0x0b, 0x64, 0x65, 0x63, - 0x6c, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, - 0x75, 0x72, 0x65, 0x73, 0x18, 0x32, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, - 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, - 0x73, 0x12, 0x6d, 0x0a, 0x0c, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x38, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, - 0x65, 0x3a, 0x0a, 0x55, 0x4e, 0x56, 0x45, 0x52, 0x49, 0x46, 0x49, 0x45, 0x44, 0x42, 0x03, 0x88, - 0x01, 0x02, 0x52, 0x0c, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x1a, 0x94, 0x01, 0x0a, 0x0b, 0x44, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x75, 0x6c, 0x6c, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x75, 0x6c, - 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, - 0x65, 0x72, 0x76, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x73, - 0x65, 0x72, 0x76, 0x65, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, - 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, - 0x64, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x22, 0x34, 0x0a, 0x11, 0x56, 0x65, 0x72, 0x69, 0x66, - 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0f, 0x0a, 0x0b, - 0x44, 0x45, 0x43, 0x4c, 0x41, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x00, 0x12, 0x0e, 0x0a, - 0x0a, 0x55, 0x4e, 0x56, 0x45, 0x52, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x01, 0x2a, 0x09, 0x08, - 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x22, 0xc1, 0x06, 0x0a, 0x14, 0x46, 0x69, 0x65, + 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, + 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, + 0x16, 0x0a, 0x06, 0x73, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x73, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x12, 0x32, 0x0a, 0x07, 0x65, 0x64, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x07, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xb9, 0x06, 0x0a, 0x0f, + 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0x3b, 0x0a, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, + 0x12, 0x43, 0x0a, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x09, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x41, 0x0a, 0x0b, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x0a, 0x6e, 0x65, + 0x73, 0x74, 0x65, 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x41, 0x0a, 0x09, 0x65, 0x6e, 0x75, 0x6d, + 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, + 0x75, 0x6d, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x52, 0x08, 0x65, 0x6e, 0x75, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x58, 0x0a, 0x0f, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x05, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, + 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x0e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x44, 0x0a, 0x0a, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x5f, 0x64, + 0x65, 0x63, 0x6c, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4f, 0x6e, 0x65, 0x6f, + 0x66, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x52, 0x09, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x44, 0x65, 0x63, 0x6c, 0x12, 0x39, 0x0a, 0x07, 0x6f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x55, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x64, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x2e, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x0d, + 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x23, 0x0a, + 0x0d, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0a, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x4e, 0x61, + 0x6d, 0x65, 0x1a, 0x7a, 0x0a, 0x0e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, + 0x61, 0x6e, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x12, 0x40, 0x0a, 0x07, + 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x37, + 0x0a, 0x0d, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, + 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x22, 0xcc, 0x04, 0x0a, 0x15, 0x45, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, + 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, + 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, + 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x59, 0x0a, 0x0b, 0x64, + 0x65, 0x63, 0x6c, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x32, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x6e, 0x67, + 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x03, 0x88, 0x01, 0x02, 0x52, 0x0b, 0x64, 0x65, 0x63, 0x6c, 0x61, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x73, 0x18, 0x32, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, + 0x6d, 0x0a, 0x0c, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x38, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x56, 0x65, + 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x3a, + 0x0a, 0x55, 0x4e, 0x56, 0x45, 0x52, 0x49, 0x46, 0x49, 0x45, 0x44, 0x42, 0x03, 0x88, 0x01, 0x02, + 0x52, 0x0c, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x94, + 0x01, 0x0a, 0x0b, 0x44, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, + 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, + 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x75, 0x6c, 0x6c, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x75, 0x6c, 0x6c, 0x4e, + 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x4a, + 0x04, 0x08, 0x04, 0x10, 0x05, 0x22, 0x34, 0x0a, 0x11, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x44, 0x45, + 0x43, 0x4c, 0x41, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x55, + 0x4e, 0x56, 0x45, 0x52, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x01, 0x2a, 0x09, 0x08, 0xe8, 0x07, + 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x22, 0xc1, 0x06, 0x0a, 0x14, 0x46, 0x69, 0x65, 0x6c, 0x64, + 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x41, 0x0a, 0x05, 0x6c, + 0x61, 0x62, 0x65, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x41, 0x0a, - 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x67, + 0x6f, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x3e, + 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, - 0x12, 0x3e, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, - 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x79, 0x70, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, - 0x08, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x08, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, 0x66, - 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1f, - 0x0a, 0x0b, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x09, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x0a, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, - 0x1b, 0x0a, 0x09, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x08, 0x6a, 0x73, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x37, 0x0a, 0x07, - 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, + 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1b, + 0x0a, 0x09, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x74, 0x79, 0x70, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, + 0x6c, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, + 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1f, 0x0a, 0x0b, + 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x09, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x0a, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x1b, 0x0a, + 0x09, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x6a, 0x73, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x37, 0x0a, 0x07, 0x6f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, + 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x5f, 0x6f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x18, 0x11, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x22, 0xb6, 0x02, 0x0a, + 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x44, 0x4f, + 0x55, 0x42, 0x4c, 0x45, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, + 0x4c, 0x4f, 0x41, 0x54, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x49, + 0x4e, 0x54, 0x36, 0x34, 0x10, 0x03, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, + 0x49, 0x4e, 0x54, 0x36, 0x34, 0x10, 0x04, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x49, 0x4e, 0x54, 0x33, 0x32, 0x10, 0x05, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x46, 0x49, 0x58, 0x45, 0x44, 0x36, 0x34, 0x10, 0x06, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x59, 0x50, + 0x45, 0x5f, 0x46, 0x49, 0x58, 0x45, 0x44, 0x33, 0x32, 0x10, 0x07, 0x12, 0x0d, 0x0a, 0x09, 0x54, + 0x59, 0x50, 0x45, 0x5f, 0x42, 0x4f, 0x4f, 0x4c, 0x10, 0x08, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, + 0x50, 0x45, 0x5f, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x09, 0x12, 0x0e, 0x0a, 0x0a, 0x54, + 0x59, 0x50, 0x45, 0x5f, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x10, 0x0a, 0x12, 0x10, 0x0a, 0x0c, 0x54, + 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x10, 0x0b, 0x12, 0x0e, 0x0a, + 0x0a, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x42, 0x59, 0x54, 0x45, 0x53, 0x10, 0x0c, 0x12, 0x0f, 0x0a, + 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x49, 0x4e, 0x54, 0x33, 0x32, 0x10, 0x0d, 0x12, 0x0d, + 0x0a, 0x09, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x10, 0x0e, 0x12, 0x11, 0x0a, + 0x0d, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x46, 0x49, 0x58, 0x45, 0x44, 0x33, 0x32, 0x10, 0x0f, + 0x12, 0x11, 0x0a, 0x0d, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x46, 0x49, 0x58, 0x45, 0x44, 0x36, + 0x34, 0x10, 0x10, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x49, 0x4e, 0x54, + 0x33, 0x32, 0x10, 0x11, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x49, 0x4e, + 0x54, 0x36, 0x34, 0x10, 0x12, 0x22, 0x43, 0x0a, 0x05, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x12, + 0x0a, 0x0e, 0x4c, 0x41, 0x42, 0x45, 0x4c, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x41, 0x4c, + 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x4c, 0x41, 0x42, 0x45, 0x4c, 0x5f, 0x52, 0x45, 0x50, 0x45, + 0x41, 0x54, 0x45, 0x44, 0x10, 0x03, 0x12, 0x12, 0x0a, 0x0e, 0x4c, 0x41, 0x42, 0x45, 0x4c, 0x5f, + 0x52, 0x45, 0x51, 0x55, 0x49, 0x52, 0x45, 0x44, 0x10, 0x02, 0x22, 0x63, 0x0a, 0x14, 0x4f, 0x6e, + 0x65, 0x6f, 0x66, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x37, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, + 0xe3, 0x02, 0x0a, 0x13, 0x45, 0x6e, 0x75, 0x6d, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3f, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, + 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x36, 0x0a, 0x07, + 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x5f, - 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x18, 0x11, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x22, 0xb6, - 0x02, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f, - 0x44, 0x4f, 0x55, 0x42, 0x4c, 0x45, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x59, 0x50, 0x45, - 0x5f, 0x46, 0x4c, 0x4f, 0x41, 0x54, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x59, 0x50, 0x45, - 0x5f, 0x49, 0x4e, 0x54, 0x36, 0x34, 0x10, 0x03, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, - 0x5f, 0x55, 0x49, 0x4e, 0x54, 0x36, 0x34, 0x10, 0x04, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x59, 0x50, - 0x45, 0x5f, 0x49, 0x4e, 0x54, 0x33, 0x32, 0x10, 0x05, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x59, 0x50, - 0x45, 0x5f, 0x46, 0x49, 0x58, 0x45, 0x44, 0x36, 0x34, 0x10, 0x06, 0x12, 0x10, 0x0a, 0x0c, 0x54, - 0x59, 0x50, 0x45, 0x5f, 0x46, 0x49, 0x58, 0x45, 0x44, 0x33, 0x32, 0x10, 0x07, 0x12, 0x0d, 0x0a, - 0x09, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x42, 0x4f, 0x4f, 0x4c, 0x10, 0x08, 0x12, 0x0f, 0x0a, 0x0b, - 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x09, 0x12, 0x0e, 0x0a, - 0x0a, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x10, 0x0a, 0x12, 0x10, 0x0a, - 0x0c, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x10, 0x0b, 0x12, - 0x0e, 0x0a, 0x0a, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x42, 0x59, 0x54, 0x45, 0x53, 0x10, 0x0c, 0x12, - 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x49, 0x4e, 0x54, 0x33, 0x32, 0x10, 0x0d, - 0x12, 0x0d, 0x0a, 0x09, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x10, 0x0e, 0x12, - 0x11, 0x0a, 0x0d, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x46, 0x49, 0x58, 0x45, 0x44, 0x33, 0x32, - 0x10, 0x0f, 0x12, 0x11, 0x0a, 0x0d, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x46, 0x49, 0x58, 0x45, - 0x44, 0x36, 0x34, 0x10, 0x10, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x49, - 0x4e, 0x54, 0x33, 0x32, 0x10, 0x11, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, - 0x49, 0x4e, 0x54, 0x36, 0x34, 0x10, 0x12, 0x22, 0x43, 0x0a, 0x05, 0x4c, 0x61, 0x62, 0x65, 0x6c, - 0x12, 0x12, 0x0a, 0x0e, 0x4c, 0x41, 0x42, 0x45, 0x4c, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, - 0x41, 0x4c, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x4c, 0x41, 0x42, 0x45, 0x4c, 0x5f, 0x52, 0x45, - 0x50, 0x45, 0x41, 0x54, 0x45, 0x44, 0x10, 0x03, 0x12, 0x12, 0x0a, 0x0e, 0x4c, 0x41, 0x42, 0x45, - 0x4c, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x49, 0x52, 0x45, 0x44, 0x10, 0x02, 0x22, 0x63, 0x0a, 0x14, - 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x37, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4f, 0x6e, 0x65, 0x6f, - 0x66, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x22, 0xe3, 0x02, 0x0a, 0x13, 0x45, 0x6e, 0x75, 0x6d, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3f, 0x0a, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x67, + 0x45, 0x6e, 0x75, 0x6d, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x5d, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, + 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, - 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x36, + 0x6e, 0x75, 0x6d, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x52, + 0x61, 0x6e, 0x67, 0x65, 0x52, 0x0d, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x52, 0x61, + 0x6e, 0x67, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x65, + 0x72, 0x76, 0x65, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x1a, 0x3b, 0x0a, 0x11, 0x45, 0x6e, 0x75, 0x6d, + 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x14, 0x0a, + 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x74, + 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x03, 0x65, 0x6e, 0x64, 0x22, 0x83, 0x01, 0x0a, 0x18, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x3b, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x5d, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, - 0x65, 0x64, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, - 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x0d, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, - 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, - 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, - 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x1a, 0x3b, 0x0a, 0x11, 0x45, 0x6e, - 0x75, 0x6d, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, - 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, - 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x22, 0x83, 0x01, 0x0a, 0x18, 0x45, 0x6e, 0x75, 0x6d, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, - 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, - 0x12, 0x3b, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xa7, 0x01, - 0x0a, 0x16, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3e, 0x0a, 0x06, - 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, - 0x65, 0x74, 0x68, 0x6f, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x39, 0x0a, 0x07, - 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, + 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xa7, 0x01, 0x0a, 0x16, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, + 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3e, 0x0a, 0x06, 0x6d, 0x65, + 0x74, 0x68, 0x6f, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, + 0x68, 0x6f, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x39, 0x0a, 0x07, 0x6f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x89, 0x02, 0x0a, 0x15, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, + 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x74, 0x79, 0x70, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x54, 0x79, + 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x74, 0x79, 0x70, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x38, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x30, 0x0a, + 0x10, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, + 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0f, + 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x12, + 0x30, 0x0a, 0x10, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x69, 0x6e, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, + 0x52, 0x0f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, + 0x67, 0x22, 0xad, 0x09, 0x0a, 0x0b, 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6a, 0x61, 0x76, 0x61, 0x50, 0x61, 0x63, + 0x6b, 0x61, 0x67, 0x65, 0x12, 0x30, 0x0a, 0x14, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x6f, 0x75, 0x74, + 0x65, 0x72, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x12, 0x6a, 0x61, 0x76, 0x61, 0x4f, 0x75, 0x74, 0x65, 0x72, 0x43, 0x6c, 0x61, + 0x73, 0x73, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x13, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x6d, + 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x0a, 0x20, + 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x11, 0x6a, 0x61, 0x76, 0x61, + 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x44, 0x0a, + 0x1d, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x65, + 0x71, 0x75, 0x61, 0x6c, 0x73, 0x5f, 0x61, 0x6e, 0x64, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x14, + 0x20, 0x01, 0x28, 0x08, 0x42, 0x02, 0x18, 0x01, 0x52, 0x19, 0x6a, 0x61, 0x76, 0x61, 0x47, 0x65, + 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x45, 0x71, 0x75, 0x61, 0x6c, 0x73, 0x41, 0x6e, 0x64, 0x48, + 0x61, 0x73, 0x68, 0x12, 0x3a, 0x0a, 0x16, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x73, 0x74, 0x72, 0x69, + 0x6e, 0x67, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x75, 0x74, 0x66, 0x38, 0x18, 0x1b, 0x20, + 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x13, 0x6a, 0x61, 0x76, 0x61, + 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x55, 0x74, 0x66, 0x38, 0x12, + 0x53, 0x0a, 0x0c, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x65, 0x5f, 0x66, 0x6f, 0x72, 0x18, + 0x09, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x4f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x65, 0x4d, 0x6f, 0x64, 0x65, + 0x3a, 0x05, 0x53, 0x50, 0x45, 0x45, 0x44, 0x52, 0x0b, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, + 0x65, 0x46, 0x6f, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x67, 0x6f, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, + 0x67, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x67, 0x6f, 0x50, 0x61, 0x63, 0x6b, + 0x61, 0x67, 0x65, 0x12, 0x35, 0x0a, 0x13, 0x63, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, + 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x10, 0x20, 0x01, 0x28, 0x08, + 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x11, 0x63, 0x63, 0x47, 0x65, 0x6e, 0x65, 0x72, + 0x69, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x39, 0x0a, 0x15, 0x6a, 0x61, + 0x76, 0x61, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x73, 0x18, 0x11, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, + 0x52, 0x13, 0x6a, 0x61, 0x76, 0x61, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x35, 0x0a, 0x13, 0x70, 0x79, 0x5f, 0x67, 0x65, 0x6e, 0x65, + 0x72, 0x69, 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x12, 0x20, 0x01, + 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x11, 0x70, 0x79, 0x47, 0x65, 0x6e, + 0x65, 0x72, 0x69, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0a, + 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x17, 0x20, 0x01, 0x28, 0x08, + 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, + 0x74, 0x65, 0x64, 0x12, 0x2e, 0x0a, 0x10, 0x63, 0x63, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, + 0x5f, 0x61, 0x72, 0x65, 0x6e, 0x61, 0x73, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x04, 0x74, + 0x72, 0x75, 0x65, 0x52, 0x0e, 0x63, 0x63, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x41, 0x72, 0x65, + 0x6e, 0x61, 0x73, 0x12, 0x2a, 0x0a, 0x11, 0x6f, 0x62, 0x6a, 0x63, 0x5f, 0x63, 0x6c, 0x61, 0x73, + 0x73, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x24, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, + 0x6f, 0x62, 0x6a, 0x63, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, + 0x29, 0x0a, 0x10, 0x63, 0x73, 0x68, 0x61, 0x72, 0x70, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x18, 0x25, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x63, 0x73, 0x68, 0x61, 0x72, + 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x77, + 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x27, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0b, 0x73, 0x77, 0x69, 0x66, 0x74, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x28, 0x0a, + 0x10, 0x70, 0x68, 0x70, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, + 0x78, 0x18, 0x28, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x70, 0x68, 0x70, 0x43, 0x6c, 0x61, 0x73, + 0x73, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x68, 0x70, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x29, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, + 0x70, 0x68, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x34, 0x0a, 0x16, + 0x70, 0x68, 0x70, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x2c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x70, 0x68, + 0x70, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x75, 0x62, 0x79, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, + 0x67, 0x65, 0x18, 0x2d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x75, 0x62, 0x79, 0x50, 0x61, + 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, + 0x73, 0x18, 0x32, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x58, + 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, + 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, - 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x89, 0x02, 0x0a, 0x15, 0x4d, 0x65, 0x74, 0x68, - 0x6f, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x74, - 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x69, 0x6e, 0x70, 0x75, 0x74, - 0x54, 0x79, 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x74, - 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6f, 0x75, 0x74, 0x70, 0x75, - 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x38, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, - 0x30, 0x0a, 0x10, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, - 0x69, 0x6e, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, - 0x52, 0x0f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, - 0x67, 0x12, 0x30, 0x0a, 0x10, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x72, 0x65, - 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, - 0x73, 0x65, 0x52, 0x0f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, - 0x69, 0x6e, 0x67, 0x22, 0xad, 0x09, 0x0a, 0x0b, 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x70, 0x61, 0x63, 0x6b, - 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6a, 0x61, 0x76, 0x61, 0x50, - 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x30, 0x0a, 0x14, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x6f, - 0x75, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x08, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x6a, 0x61, 0x76, 0x61, 0x4f, 0x75, 0x74, 0x65, 0x72, 0x43, - 0x6c, 0x61, 0x73, 0x73, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x13, 0x6a, 0x61, 0x76, 0x61, - 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, - 0x0a, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x11, 0x6a, 0x61, - 0x76, 0x61, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x12, - 0x44, 0x0a, 0x1d, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, - 0x5f, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x73, 0x5f, 0x61, 0x6e, 0x64, 0x5f, 0x68, 0x61, 0x73, 0x68, - 0x18, 0x14, 0x20, 0x01, 0x28, 0x08, 0x42, 0x02, 0x18, 0x01, 0x52, 0x19, 0x6a, 0x61, 0x76, 0x61, - 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x45, 0x71, 0x75, 0x61, 0x6c, 0x73, 0x41, 0x6e, - 0x64, 0x48, 0x61, 0x73, 0x68, 0x12, 0x3a, 0x0a, 0x16, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x73, 0x74, - 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x75, 0x74, 0x66, 0x38, 0x18, - 0x1b, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x13, 0x6a, 0x61, - 0x76, 0x61, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x55, 0x74, 0x66, - 0x38, 0x12, 0x53, 0x0a, 0x0c, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x65, 0x5f, 0x66, 0x6f, - 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x65, 0x4d, 0x6f, - 0x64, 0x65, 0x3a, 0x05, 0x53, 0x50, 0x45, 0x45, 0x44, 0x52, 0x0b, 0x6f, 0x70, 0x74, 0x69, 0x6d, - 0x69, 0x7a, 0x65, 0x46, 0x6f, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x67, 0x6f, 0x5f, 0x70, 0x61, 0x63, - 0x6b, 0x61, 0x67, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x67, 0x6f, 0x50, 0x61, - 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x35, 0x0a, 0x13, 0x63, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x65, - 0x72, 0x69, 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x10, 0x20, 0x01, - 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x11, 0x63, 0x63, 0x47, 0x65, 0x6e, - 0x65, 0x72, 0x69, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x39, 0x0a, 0x15, - 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x5f, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x11, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, - 0x73, 0x65, 0x52, 0x13, 0x6a, 0x61, 0x76, 0x61, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x35, 0x0a, 0x13, 0x70, 0x79, 0x5f, 0x67, 0x65, - 0x6e, 0x65, 0x72, 0x69, 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x12, - 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x11, 0x70, 0x79, 0x47, - 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x25, - 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x17, 0x20, 0x01, - 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, - 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x2e, 0x0a, 0x10, 0x63, 0x63, 0x5f, 0x65, 0x6e, 0x61, 0x62, - 0x6c, 0x65, 0x5f, 0x61, 0x72, 0x65, 0x6e, 0x61, 0x73, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x08, 0x3a, - 0x04, 0x74, 0x72, 0x75, 0x65, 0x52, 0x0e, 0x63, 0x63, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x41, - 0x72, 0x65, 0x6e, 0x61, 0x73, 0x12, 0x2a, 0x0a, 0x11, 0x6f, 0x62, 0x6a, 0x63, 0x5f, 0x63, 0x6c, - 0x61, 0x73, 0x73, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x24, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0f, 0x6f, 0x62, 0x6a, 0x63, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x50, 0x72, 0x65, 0x66, 0x69, - 0x78, 0x12, 0x29, 0x0a, 0x10, 0x63, 0x73, 0x68, 0x61, 0x72, 0x70, 0x5f, 0x6e, 0x61, 0x6d, 0x65, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x25, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x63, 0x73, 0x68, - 0x61, 0x72, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x21, 0x0a, 0x0c, - 0x73, 0x77, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x27, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0b, 0x73, 0x77, 0x69, 0x66, 0x74, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, - 0x28, 0x0a, 0x10, 0x70, 0x68, 0x70, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x70, 0x72, 0x65, - 0x66, 0x69, 0x78, 0x18, 0x28, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x70, 0x68, 0x70, 0x43, 0x6c, - 0x61, 0x73, 0x73, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x68, 0x70, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x29, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0c, 0x70, 0x68, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x34, - 0x0a, 0x16, 0x70, 0x68, 0x70, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x2c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, - 0x70, 0x68, 0x70, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4e, 0x61, 0x6d, 0x65, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x75, 0x62, 0x79, 0x5f, 0x70, 0x61, 0x63, - 0x6b, 0x61, 0x67, 0x65, 0x18, 0x2d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x75, 0x62, 0x79, - 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x73, 0x18, 0x32, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, - 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, - 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, - 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, - 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x0a, 0x0c, 0x4f, 0x70, - 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x09, 0x0a, 0x05, 0x53, 0x50, - 0x45, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x53, 0x49, - 0x5a, 0x45, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x4c, 0x49, 0x54, 0x45, 0x5f, 0x52, 0x55, 0x4e, - 0x54, 0x49, 0x4d, 0x45, 0x10, 0x03, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, - 0x02, 0x4a, 0x04, 0x08, 0x2a, 0x10, 0x2b, 0x4a, 0x04, 0x08, 0x26, 0x10, 0x27, 0x52, 0x14, 0x70, - 0x68, 0x70, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x73, 0x22, 0xf4, 0x03, 0x0a, 0x0e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3c, 0x0a, 0x17, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x5f, 0x73, 0x65, 0x74, 0x5f, 0x77, 0x69, 0x72, 0x65, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, - 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x14, - 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x74, 0x57, 0x69, 0x72, 0x65, 0x46, 0x6f, - 0x72, 0x6d, 0x61, 0x74, 0x12, 0x4c, 0x0a, 0x1f, 0x6e, 0x6f, 0x5f, 0x73, 0x74, 0x61, 0x6e, 0x64, - 0x61, 0x72, 0x64, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x61, - 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, - 0x61, 0x6c, 0x73, 0x65, 0x52, 0x1c, 0x6e, 0x6f, 0x53, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, - 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, - 0x6f, 0x72, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, - 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x70, - 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x6d, 0x61, - 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x56, 0x0a, 0x26, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, - 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, - 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x73, - 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x42, 0x02, 0x18, 0x01, 0x52, 0x22, 0x64, 0x65, 0x70, 0x72, - 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x4a, 0x73, 0x6f, 0x6e, - 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x73, 0x12, 0x37, - 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, - 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, - 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, - 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, - 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x4a, 0x04, 0x08, 0x04, - 0x10, 0x05, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x4a, 0x04, 0x08, 0x06, 0x10, 0x07, 0x4a, 0x04, - 0x08, 0x08, 0x10, 0x09, 0x4a, 0x04, 0x08, 0x09, 0x10, 0x0a, 0x22, 0x9d, 0x0d, 0x0a, 0x0c, 0x46, - 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x41, 0x0a, 0x05, 0x63, - 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, - 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x43, 0x54, 0x79, 0x70, 0x65, 0x3a, - 0x06, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x52, 0x05, 0x63, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, - 0x0a, 0x06, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, - 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x12, 0x47, 0x0a, 0x06, 0x6a, 0x73, 0x74, 0x79, 0x70, 0x65, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4a, 0x53, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x09, 0x4a, 0x53, - 0x5f, 0x4e, 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x52, 0x06, 0x6a, 0x73, 0x74, 0x79, 0x70, 0x65, 0x12, - 0x19, 0x0a, 0x04, 0x6c, 0x61, 0x7a, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, - 0x61, 0x6c, 0x73, 0x65, 0x52, 0x04, 0x6c, 0x61, 0x7a, 0x79, 0x12, 0x2e, 0x0a, 0x0f, 0x75, 0x6e, - 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x5f, 0x6c, 0x61, 0x7a, 0x79, 0x18, 0x0f, 0x20, - 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0e, 0x75, 0x6e, 0x76, 0x65, - 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x4c, 0x61, 0x7a, 0x79, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, - 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, - 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, - 0x64, 0x12, 0x19, 0x0a, 0x04, 0x77, 0x65, 0x61, 0x6b, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x3a, - 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x04, 0x77, 0x65, 0x61, 0x6b, 0x12, 0x28, 0x0a, 0x0c, - 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, 0x72, 0x65, 0x64, 0x61, 0x63, 0x74, 0x18, 0x10, 0x20, 0x01, - 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0b, 0x64, 0x65, 0x62, 0x75, 0x67, - 0x52, 0x65, 0x64, 0x61, 0x63, 0x74, 0x12, 0x4b, 0x0a, 0x09, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, - 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x48, 0x0a, 0x07, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x18, 0x13, - 0x20, 0x03, 0x28, 0x0e, 0x32, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, + 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x0a, 0x0c, 0x4f, 0x70, 0x74, 0x69, + 0x6d, 0x69, 0x7a, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x09, 0x0a, 0x05, 0x53, 0x50, 0x45, 0x45, + 0x44, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x53, 0x49, 0x5a, 0x45, + 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x4c, 0x49, 0x54, 0x45, 0x5f, 0x52, 0x55, 0x4e, 0x54, 0x49, + 0x4d, 0x45, 0x10, 0x03, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x4a, + 0x04, 0x08, 0x2a, 0x10, 0x2b, 0x4a, 0x04, 0x08, 0x26, 0x10, 0x27, 0x52, 0x14, 0x70, 0x68, 0x70, + 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x73, 0x22, 0xf4, 0x03, 0x0a, 0x0e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3c, 0x0a, 0x17, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, + 0x73, 0x65, 0x74, 0x5f, 0x77, 0x69, 0x72, 0x65, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x14, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x74, 0x57, 0x69, 0x72, 0x65, 0x46, 0x6f, 0x72, 0x6d, + 0x61, 0x74, 0x12, 0x4c, 0x0a, 0x1f, 0x6e, 0x6f, 0x5f, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, + 0x64, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, + 0x73, 0x65, 0x52, 0x1c, 0x6e, 0x6f, 0x53, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x44, 0x65, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, + 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, + 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x70, 0x5f, 0x65, + 0x6e, 0x74, 0x72, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x6d, 0x61, 0x70, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x12, 0x56, 0x0a, 0x26, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, + 0x65, 0x64, 0x5f, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x66, + 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x73, 0x18, 0x0b, + 0x20, 0x01, 0x28, 0x08, 0x42, 0x02, 0x18, 0x01, 0x52, 0x22, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, + 0x61, 0x74, 0x65, 0x64, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x4a, 0x73, 0x6f, 0x6e, 0x46, 0x69, + 0x65, 0x6c, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x73, 0x12, 0x37, 0x0a, 0x08, + 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, + 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, + 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, + 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, + 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x4a, 0x04, 0x08, 0x06, 0x10, 0x07, 0x4a, 0x04, 0x08, 0x08, + 0x10, 0x09, 0x4a, 0x04, 0x08, 0x09, 0x10, 0x0a, 0x22, 0x9d, 0x0d, 0x0a, 0x0c, 0x46, 0x69, 0x65, + 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x41, 0x0a, 0x05, 0x63, 0x74, 0x79, + 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, + 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x43, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x06, 0x53, + 0x54, 0x52, 0x49, 0x4e, 0x47, 0x52, 0x05, 0x63, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, + 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x70, 0x61, + 0x63, 0x6b, 0x65, 0x64, 0x12, 0x47, 0x0a, 0x06, 0x6a, 0x73, 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, - 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x12, 0x57, 0x0a, - 0x10, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, - 0x73, 0x18, 0x14, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x6f, 0x6e, 0x73, 0x2e, 0x4a, 0x53, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x09, 0x4a, 0x53, 0x5f, 0x4e, + 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x52, 0x06, 0x6a, 0x73, 0x74, 0x79, 0x70, 0x65, 0x12, 0x19, 0x0a, + 0x04, 0x6c, 0x61, 0x7a, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, + 0x73, 0x65, 0x52, 0x04, 0x6c, 0x61, 0x7a, 0x79, 0x12, 0x2e, 0x0a, 0x0f, 0x75, 0x6e, 0x76, 0x65, + 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x5f, 0x6c, 0x61, 0x7a, 0x79, 0x18, 0x0f, 0x20, 0x01, 0x28, + 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0e, 0x75, 0x6e, 0x76, 0x65, 0x72, 0x69, + 0x66, 0x69, 0x65, 0x64, 0x4c, 0x61, 0x7a, 0x79, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, + 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, + 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, + 0x19, 0x0a, 0x04, 0x77, 0x65, 0x61, 0x6b, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, + 0x61, 0x6c, 0x73, 0x65, 0x52, 0x04, 0x77, 0x65, 0x61, 0x6b, 0x12, 0x28, 0x0a, 0x0c, 0x64, 0x65, + 0x62, 0x75, 0x67, 0x5f, 0x72, 0x65, 0x64, 0x61, 0x63, 0x74, 0x18, 0x10, 0x20, 0x01, 0x28, 0x08, + 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0b, 0x64, 0x65, 0x62, 0x75, 0x67, 0x52, 0x65, + 0x64, 0x61, 0x63, 0x74, 0x12, 0x4b, 0x0a, 0x09, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, - 0x66, 0x61, 0x75, 0x6c, 0x74, 0x52, 0x0f, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, - 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, - 0x65, 0x73, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, - 0x55, 0x0a, 0x0f, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x73, 0x75, 0x70, 0x70, 0x6f, - 0x72, 0x74, 0x18, 0x16, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, - 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x0e, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, - 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, - 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, - 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, - 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, - 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x1a, 0x5a, 0x0a, 0x0e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x66, 0x61, 0x75, - 0x6c, 0x74, 0x12, 0x32, 0x0a, 0x07, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x65, - 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x96, 0x02, 0x0a, - 0x0e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x12, - 0x47, 0x0a, 0x12, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x74, 0x72, 0x6f, - 0x64, 0x75, 0x63, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x11, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, - 0x74, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x64, 0x12, 0x47, 0x0a, 0x12, 0x65, 0x64, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x11, - 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, - 0x64, 0x12, 0x2f, 0x0a, 0x13, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x77, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, - 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x57, 0x61, 0x72, 0x6e, 0x69, - 0x6e, 0x67, 0x12, 0x41, 0x0a, 0x0f, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, - 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, - 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x22, 0x2f, 0x0a, 0x05, 0x43, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0a, - 0x0a, 0x06, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x43, 0x4f, - 0x52, 0x44, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x5f, 0x50, - 0x49, 0x45, 0x43, 0x45, 0x10, 0x02, 0x22, 0x35, 0x0a, 0x06, 0x4a, 0x53, 0x54, 0x79, 0x70, 0x65, - 0x12, 0x0d, 0x0a, 0x09, 0x4a, 0x53, 0x5f, 0x4e, 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x10, 0x00, 0x12, - 0x0d, 0x0a, 0x09, 0x4a, 0x53, 0x5f, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0d, - 0x0a, 0x09, 0x4a, 0x53, 0x5f, 0x4e, 0x55, 0x4d, 0x42, 0x45, 0x52, 0x10, 0x02, 0x22, 0x55, 0x0a, - 0x0f, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x15, 0x0a, 0x11, 0x52, 0x45, 0x54, 0x45, 0x4e, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, - 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x52, 0x45, 0x54, 0x45, 0x4e, - 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x52, 0x55, 0x4e, 0x54, 0x49, 0x4d, 0x45, 0x10, 0x01, 0x12, 0x14, - 0x0a, 0x10, 0x52, 0x45, 0x54, 0x45, 0x4e, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x4f, 0x55, 0x52, - 0x43, 0x45, 0x10, 0x02, 0x22, 0x8c, 0x02, 0x0a, 0x10, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x54, - 0x61, 0x72, 0x67, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x17, 0x0a, 0x13, 0x54, 0x41, 0x52, - 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, - 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, - 0x45, 0x5f, 0x46, 0x49, 0x4c, 0x45, 0x10, 0x01, 0x12, 0x1f, 0x0a, 0x1b, 0x54, 0x41, 0x52, 0x47, - 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x58, 0x54, 0x45, 0x4e, 0x53, 0x49, 0x4f, - 0x4e, 0x5f, 0x52, 0x41, 0x4e, 0x47, 0x45, 0x10, 0x02, 0x12, 0x17, 0x0a, 0x13, 0x54, 0x41, 0x52, - 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, - 0x10, 0x03, 0x12, 0x15, 0x0a, 0x11, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, - 0x45, 0x5f, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x10, 0x04, 0x12, 0x15, 0x0a, 0x11, 0x54, 0x41, 0x52, - 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x4e, 0x45, 0x4f, 0x46, 0x10, 0x05, - 0x12, 0x14, 0x0a, 0x10, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, - 0x45, 0x4e, 0x55, 0x4d, 0x10, 0x06, 0x12, 0x1a, 0x0a, 0x16, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, - 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x45, 0x4e, 0x54, 0x52, 0x59, - 0x10, 0x07, 0x12, 0x17, 0x0a, 0x13, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, - 0x45, 0x5f, 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, 0x45, 0x10, 0x08, 0x12, 0x16, 0x0a, 0x12, 0x54, - 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x45, 0x54, 0x48, 0x4f, - 0x44, 0x10, 0x09, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x4a, 0x04, - 0x08, 0x04, 0x10, 0x05, 0x4a, 0x04, 0x08, 0x12, 0x10, 0x13, 0x22, 0xac, 0x01, 0x0a, 0x0c, 0x4f, - 0x6e, 0x65, 0x6f, 0x66, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x37, 0x0a, 0x08, 0x66, - 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, - 0x75, 0x72, 0x65, 0x73, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x74, + 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x48, 0x0a, 0x07, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x18, 0x13, 0x20, 0x03, + 0x28, 0x0e, 0x32, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x54, 0x79, + 0x70, 0x65, 0x52, 0x07, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x12, 0x57, 0x0a, 0x10, 0x65, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x18, + 0x14, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x66, 0x61, + 0x75, 0x6c, 0x74, 0x52, 0x0f, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x66, 0x61, + 0x75, 0x6c, 0x74, 0x73, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, + 0x18, 0x15, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, + 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x55, 0x0a, + 0x0f, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, + 0x18, 0x16, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x75, 0x70, + 0x70, 0x6f, 0x72, 0x74, 0x52, 0x0e, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x75, 0x70, + 0x70, 0x6f, 0x72, 0x74, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, - 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, - 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x22, 0xd1, 0x02, 0x0a, 0x0b, 0x45, 0x6e, - 0x75, 0x6d, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x6c, 0x6c, - 0x6f, 0x77, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, - 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, - 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, - 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, - 0x64, 0x12, 0x56, 0x0a, 0x26, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, - 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x66, 0x69, 0x65, 0x6c, - 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x08, 0x42, 0x02, 0x18, 0x01, 0x52, 0x22, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, - 0x64, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x4a, 0x73, 0x6f, 0x6e, 0x46, 0x69, 0x65, 0x6c, 0x64, - 0x43, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x73, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, - 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, + 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x5a, + 0x0a, 0x0e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, + 0x12, 0x32, 0x0a, 0x07, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x65, 0x64, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x96, 0x02, 0x0a, 0x0e, 0x46, + 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x47, 0x0a, + 0x12, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x74, 0x72, 0x6f, 0x64, 0x75, + 0x63, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x11, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x74, 0x72, + 0x6f, 0x64, 0x75, 0x63, 0x65, 0x64, 0x12, 0x47, 0x0a, 0x12, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x11, 0x65, 0x64, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, + 0x2f, 0x0a, 0x13, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x77, + 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x64, 0x65, + 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x57, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, + 0x12, 0x41, 0x0a, 0x0f, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x6d, 0x6f, + 0x76, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x6d, 0x6f, + 0x76, 0x65, 0x64, 0x22, 0x2f, 0x0a, 0x05, 0x43, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0a, 0x0a, 0x06, + 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x43, 0x4f, 0x52, 0x44, + 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x5f, 0x50, 0x49, 0x45, + 0x43, 0x45, 0x10, 0x02, 0x22, 0x35, 0x0a, 0x06, 0x4a, 0x53, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0d, + 0x0a, 0x09, 0x4a, 0x53, 0x5f, 0x4e, 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x10, 0x00, 0x12, 0x0d, 0x0a, + 0x09, 0x4a, 0x53, 0x5f, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, + 0x4a, 0x53, 0x5f, 0x4e, 0x55, 0x4d, 0x42, 0x45, 0x52, 0x10, 0x02, 0x22, 0x55, 0x0a, 0x0f, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x15, + 0x0a, 0x11, 0x52, 0x45, 0x54, 0x45, 0x4e, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, + 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x52, 0x45, 0x54, 0x45, 0x4e, 0x54, 0x49, + 0x4f, 0x4e, 0x5f, 0x52, 0x55, 0x4e, 0x54, 0x49, 0x4d, 0x45, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, + 0x52, 0x45, 0x54, 0x45, 0x4e, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, + 0x10, 0x02, 0x22, 0x8c, 0x02, 0x0a, 0x10, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x61, 0x72, + 0x67, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x17, 0x0a, 0x13, 0x54, 0x41, 0x52, 0x47, 0x45, + 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, + 0x12, 0x14, 0x0a, 0x10, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x46, 0x49, 0x4c, 0x45, 0x10, 0x01, 0x12, 0x1f, 0x0a, 0x1b, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, + 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x58, 0x54, 0x45, 0x4e, 0x53, 0x49, 0x4f, 0x4e, 0x5f, + 0x52, 0x41, 0x4e, 0x47, 0x45, 0x10, 0x02, 0x12, 0x17, 0x0a, 0x13, 0x54, 0x41, 0x52, 0x47, 0x45, + 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x10, 0x03, + 0x12, 0x15, 0x0a, 0x11, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x46, 0x49, 0x45, 0x4c, 0x44, 0x10, 0x04, 0x12, 0x15, 0x0a, 0x11, 0x54, 0x41, 0x52, 0x47, 0x45, + 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x4e, 0x45, 0x4f, 0x46, 0x10, 0x05, 0x12, 0x14, + 0x0a, 0x10, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x4e, + 0x55, 0x4d, 0x10, 0x06, 0x12, 0x1a, 0x0a, 0x16, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, + 0x59, 0x50, 0x45, 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x45, 0x4e, 0x54, 0x52, 0x59, 0x10, 0x07, + 0x12, 0x17, 0x0a, 0x13, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, 0x45, 0x10, 0x08, 0x12, 0x16, 0x0a, 0x12, 0x54, 0x41, 0x52, + 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x45, 0x54, 0x48, 0x4f, 0x44, 0x10, + 0x09, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x4a, 0x04, 0x08, 0x04, + 0x10, 0x05, 0x4a, 0x04, 0x08, 0x12, 0x10, 0x13, 0x22, 0xac, 0x01, 0x0a, 0x0c, 0x4f, 0x6e, 0x65, + 0x6f, 0x66, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, @@ -4893,284 +4841,306 @@ var file_google_protobuf_descriptor_proto_rawDesc = []byte{ 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, 0x08, 0xe8, - 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x22, 0xd8, 0x02, - 0x0a, 0x10, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, - 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, - 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, + 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x22, 0xd1, 0x02, 0x0a, 0x0b, 0x45, 0x6e, 0x75, 0x6d, + 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x6c, 0x6c, 0x6f, 0x77, + 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x61, 0x6c, + 0x6c, 0x6f, 0x77, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, + 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, + 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, + 0x56, 0x0a, 0x26, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6c, 0x65, + 0x67, 0x61, 0x63, 0x79, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, + 0x63, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x42, + 0x02, 0x18, 0x01, 0x52, 0x22, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x4c, + 0x65, 0x67, 0x61, 0x63, 0x79, 0x4a, 0x73, 0x6f, 0x6e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43, 0x6f, + 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x73, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, + 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, + 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, + 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, + 0x80, 0x80, 0x80, 0x80, 0x02, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x22, 0xd8, 0x02, 0x0a, 0x10, + 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, + 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, + 0x12, 0x28, 0x0a, 0x0c, 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, 0x72, 0x65, 0x64, 0x61, 0x63, 0x74, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0b, 0x64, + 0x65, 0x62, 0x75, 0x67, 0x52, 0x65, 0x64, 0x61, 0x63, 0x74, 0x12, 0x55, 0x0a, 0x0f, 0x66, 0x65, + 0x61, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x75, 0x70, 0x70, 0x6f, 0x72, + 0x74, 0x52, 0x0e, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x75, 0x70, 0x70, 0x6f, 0x72, + 0x74, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, + 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, + 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, + 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, 0x08, 0xe8, 0x07, + 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x22, 0xd5, 0x01, 0x0a, 0x0e, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x22, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, - 0x65, 0x73, 0x12, 0x28, 0x0a, 0x0c, 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, 0x72, 0x65, 0x64, 0x61, - 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, - 0x0b, 0x64, 0x65, 0x62, 0x75, 0x67, 0x52, 0x65, 0x64, 0x61, 0x63, 0x74, 0x12, 0x55, 0x0a, 0x0f, - 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x75, 0x70, 0x70, - 0x6f, 0x72, 0x74, 0x52, 0x0e, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x75, 0x70, 0x70, - 0x6f, 0x72, 0x74, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, + 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, + 0x18, 0x21, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, + 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, + 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, + 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, + 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x22, 0x99, + 0x03, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x21, + 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, + 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x71, 0x0a, 0x11, 0x69, 0x64, 0x65, 0x6d, 0x70, + 0x6f, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x22, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x49, 0x64, 0x65, 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x4c, 0x65, + 0x76, 0x65, 0x6c, 0x3a, 0x13, 0x49, 0x44, 0x45, 0x4d, 0x50, 0x4f, 0x54, 0x45, 0x4e, 0x43, 0x59, + 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x52, 0x10, 0x69, 0x64, 0x65, 0x6d, 0x70, 0x6f, + 0x74, 0x65, 0x6e, 0x63, 0x79, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, + 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x23, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, + 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x73, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, - 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, 0x08, - 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x22, 0xd5, 0x01, 0x0a, 0x0e, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x37, 0x0a, 0x08, 0x66, - 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x22, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, + 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x50, 0x0a, + 0x10, 0x49, 0x64, 0x65, 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x4c, 0x65, 0x76, 0x65, + 0x6c, 0x12, 0x17, 0x0a, 0x13, 0x49, 0x44, 0x45, 0x4d, 0x50, 0x4f, 0x54, 0x45, 0x4e, 0x43, 0x59, + 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x4e, 0x4f, + 0x5f, 0x53, 0x49, 0x44, 0x45, 0x5f, 0x45, 0x46, 0x46, 0x45, 0x43, 0x54, 0x53, 0x10, 0x01, 0x12, + 0x0e, 0x0a, 0x0a, 0x49, 0x44, 0x45, 0x4d, 0x50, 0x4f, 0x54, 0x45, 0x4e, 0x54, 0x10, 0x02, 0x2a, + 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x22, 0x9a, 0x03, 0x0a, 0x13, 0x55, + 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x41, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, + 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x50, 0x61, 0x72, 0x74, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, + 0x69, 0x65, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x12, 0x2c, 0x0a, 0x12, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x69, 0x6e, 0x74, + 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x49, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2c, + 0x0a, 0x12, 0x6e, 0x65, 0x67, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x5f, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x6e, 0x65, 0x67, 0x61, + 0x74, 0x69, 0x76, 0x65, 0x49, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21, 0x0a, 0x0c, + 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x01, 0x52, 0x0b, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, + 0x21, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x5f, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x61, 0x67, 0x67, + 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x4a, 0x0a, 0x08, 0x4e, + 0x61, 0x6d, 0x65, 0x50, 0x61, 0x72, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x5f, + 0x70, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x61, 0x6d, 0x65, + 0x50, 0x61, 0x72, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x73, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x02, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x73, 0x45, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xa7, 0x0a, 0x0a, 0x0a, 0x46, 0x65, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x12, 0x91, 0x01, 0x0a, 0x0e, 0x66, 0x69, 0x65, 0x6c, 0x64, + 0x5f, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x46, 0x69, 0x65, + 0x6c, 0x64, 0x50, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x42, 0x3f, 0x88, 0x01, 0x01, 0x98, + 0x01, 0x04, 0x98, 0x01, 0x01, 0xa2, 0x01, 0x0d, 0x12, 0x08, 0x45, 0x58, 0x50, 0x4c, 0x49, 0x43, + 0x49, 0x54, 0x18, 0x84, 0x07, 0xa2, 0x01, 0x0d, 0x12, 0x08, 0x49, 0x4d, 0x50, 0x4c, 0x49, 0x43, + 0x49, 0x54, 0x18, 0xe7, 0x07, 0xa2, 0x01, 0x0d, 0x12, 0x08, 0x45, 0x58, 0x50, 0x4c, 0x49, 0x43, + 0x49, 0x54, 0x18, 0xe8, 0x07, 0xb2, 0x01, 0x03, 0x08, 0xe8, 0x07, 0x52, 0x0d, 0x66, 0x69, 0x65, + 0x6c, 0x64, 0x50, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x6c, 0x0a, 0x09, 0x65, 0x6e, + 0x75, 0x6d, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, - 0x75, 0x72, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, - 0x65, 0x64, 0x18, 0x21, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, - 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x58, 0x0a, 0x14, 0x75, - 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, - 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, - 0x22, 0x99, 0x03, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, - 0x18, 0x21, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, - 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x71, 0x0a, 0x11, 0x69, 0x64, 0x65, - 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x22, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x49, 0x64, 0x65, 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, 0x79, - 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x3a, 0x13, 0x49, 0x44, 0x45, 0x4d, 0x50, 0x4f, 0x54, 0x45, 0x4e, - 0x43, 0x59, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x52, 0x10, 0x69, 0x64, 0x65, 0x6d, - 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x37, 0x0a, 0x08, - 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x23, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, - 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, - 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, - 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, - 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, - 0x50, 0x0a, 0x10, 0x49, 0x64, 0x65, 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x4c, 0x65, - 0x76, 0x65, 0x6c, 0x12, 0x17, 0x0a, 0x13, 0x49, 0x44, 0x45, 0x4d, 0x50, 0x4f, 0x54, 0x45, 0x4e, - 0x43, 0x59, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, - 0x4e, 0x4f, 0x5f, 0x53, 0x49, 0x44, 0x45, 0x5f, 0x45, 0x46, 0x46, 0x45, 0x43, 0x54, 0x53, 0x10, - 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x49, 0x44, 0x45, 0x4d, 0x50, 0x4f, 0x54, 0x45, 0x4e, 0x54, 0x10, - 0x02, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x22, 0x9a, 0x03, 0x0a, - 0x13, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x41, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, - 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x50, 0x61, 0x72, - 0x74, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x69, 0x64, 0x65, 0x6e, 0x74, - 0x69, 0x66, 0x69, 0x65, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x69, - 0x6e, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, - 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x49, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x12, 0x2c, 0x0a, 0x12, 0x6e, 0x65, 0x67, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x69, 0x6e, 0x74, - 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x6e, 0x65, - 0x67, 0x61, 0x74, 0x69, 0x76, 0x65, 0x49, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21, - 0x0a, 0x0c, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x01, 0x52, 0x0b, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, - 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x61, - 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x4a, 0x0a, - 0x08, 0x4e, 0x61, 0x6d, 0x65, 0x50, 0x61, 0x72, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x61, 0x6d, - 0x65, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x61, - 0x6d, 0x65, 0x50, 0x61, 0x72, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x73, 0x5f, 0x65, 0x78, 0x74, - 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x02, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x73, - 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xa7, 0x0a, 0x0a, 0x0a, 0x46, 0x65, - 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x12, 0x91, 0x01, 0x0a, 0x0e, 0x66, 0x69, 0x65, - 0x6c, 0x64, 0x5f, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x46, - 0x69, 0x65, 0x6c, 0x64, 0x50, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x42, 0x3f, 0x88, 0x01, - 0x01, 0x98, 0x01, 0x04, 0x98, 0x01, 0x01, 0xa2, 0x01, 0x0d, 0x12, 0x08, 0x45, 0x58, 0x50, 0x4c, - 0x49, 0x43, 0x49, 0x54, 0x18, 0xe6, 0x07, 0xa2, 0x01, 0x0d, 0x12, 0x08, 0x49, 0x4d, 0x50, 0x4c, - 0x49, 0x43, 0x49, 0x54, 0x18, 0xe7, 0x07, 0xa2, 0x01, 0x0d, 0x12, 0x08, 0x45, 0x58, 0x50, 0x4c, - 0x49, 0x43, 0x49, 0x54, 0x18, 0xe8, 0x07, 0xb2, 0x01, 0x03, 0x08, 0xe8, 0x07, 0x52, 0x0d, 0x66, - 0x69, 0x65, 0x6c, 0x64, 0x50, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x6c, 0x0a, 0x09, - 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x45, 0x6e, 0x75, - 0x6d, 0x54, 0x79, 0x70, 0x65, 0x42, 0x29, 0x88, 0x01, 0x01, 0x98, 0x01, 0x06, 0x98, 0x01, 0x01, - 0xa2, 0x01, 0x0b, 0x12, 0x06, 0x43, 0x4c, 0x4f, 0x53, 0x45, 0x44, 0x18, 0xe6, 0x07, 0xa2, 0x01, - 0x09, 0x12, 0x04, 0x4f, 0x50, 0x45, 0x4e, 0x18, 0xe7, 0x07, 0xb2, 0x01, 0x03, 0x08, 0xe8, 0x07, - 0x52, 0x08, 0x65, 0x6e, 0x75, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x98, 0x01, 0x0a, 0x17, 0x72, - 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x65, 0x6e, - 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, - 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, - 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x42, - 0x2d, 0x88, 0x01, 0x01, 0x98, 0x01, 0x04, 0x98, 0x01, 0x01, 0xa2, 0x01, 0x0d, 0x12, 0x08, 0x45, - 0x58, 0x50, 0x41, 0x4e, 0x44, 0x45, 0x44, 0x18, 0xe6, 0x07, 0xa2, 0x01, 0x0b, 0x12, 0x06, 0x50, - 0x41, 0x43, 0x4b, 0x45, 0x44, 0x18, 0xe7, 0x07, 0xb2, 0x01, 0x03, 0x08, 0xe8, 0x07, 0x52, 0x15, - 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45, 0x6e, 0x63, - 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x7e, 0x0a, 0x0f, 0x75, 0x74, 0x66, 0x38, 0x5f, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x55, 0x74, 0x66, 0x38, - 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x29, 0x88, 0x01, 0x01, 0x98, - 0x01, 0x04, 0x98, 0x01, 0x01, 0xa2, 0x01, 0x09, 0x12, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x18, 0xe6, - 0x07, 0xa2, 0x01, 0x0b, 0x12, 0x06, 0x56, 0x45, 0x52, 0x49, 0x46, 0x59, 0x18, 0xe7, 0x07, 0xb2, - 0x01, 0x03, 0x08, 0xe8, 0x07, 0x52, 0x0e, 0x75, 0x74, 0x66, 0x38, 0x56, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x7e, 0x0a, 0x10, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x5f, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x2b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x4d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x42, 0x26, 0x88, 0x01, - 0x01, 0x98, 0x01, 0x04, 0x98, 0x01, 0x01, 0xa2, 0x01, 0x14, 0x12, 0x0f, 0x4c, 0x45, 0x4e, 0x47, - 0x54, 0x48, 0x5f, 0x50, 0x52, 0x45, 0x46, 0x49, 0x58, 0x45, 0x44, 0x18, 0xe6, 0x07, 0xb2, 0x01, - 0x03, 0x08, 0xe8, 0x07, 0x52, 0x0f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x63, - 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x82, 0x01, 0x0a, 0x0b, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x66, - 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, - 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x4a, 0x73, 0x6f, 0x6e, 0x46, 0x6f, 0x72, - 0x6d, 0x61, 0x74, 0x42, 0x39, 0x88, 0x01, 0x01, 0x98, 0x01, 0x03, 0x98, 0x01, 0x06, 0x98, 0x01, - 0x01, 0xa2, 0x01, 0x17, 0x12, 0x12, 0x4c, 0x45, 0x47, 0x41, 0x43, 0x59, 0x5f, 0x42, 0x45, 0x53, - 0x54, 0x5f, 0x45, 0x46, 0x46, 0x4f, 0x52, 0x54, 0x18, 0xe6, 0x07, 0xa2, 0x01, 0x0a, 0x12, 0x05, - 0x41, 0x4c, 0x4c, 0x4f, 0x57, 0x18, 0xe7, 0x07, 0xb2, 0x01, 0x03, 0x08, 0xe8, 0x07, 0x52, 0x0a, - 0x6a, 0x73, 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x22, 0x5c, 0x0a, 0x0d, 0x46, 0x69, - 0x65, 0x6c, 0x64, 0x50, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x46, - 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x50, 0x52, 0x45, 0x53, 0x45, 0x4e, 0x43, 0x45, 0x5f, 0x55, 0x4e, - 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x45, 0x58, 0x50, 0x4c, 0x49, - 0x43, 0x49, 0x54, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x49, 0x4d, 0x50, 0x4c, 0x49, 0x43, 0x49, - 0x54, 0x10, 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x4c, 0x45, 0x47, 0x41, 0x43, 0x59, 0x5f, 0x52, 0x45, - 0x51, 0x55, 0x49, 0x52, 0x45, 0x44, 0x10, 0x03, 0x22, 0x37, 0x0a, 0x08, 0x45, 0x6e, 0x75, 0x6d, - 0x54, 0x79, 0x70, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x54, 0x59, 0x50, - 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x4f, - 0x50, 0x45, 0x4e, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x4c, 0x4f, 0x53, 0x45, 0x44, 0x10, - 0x02, 0x22, 0x56, 0x0a, 0x15, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x46, 0x69, 0x65, - 0x6c, 0x64, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x23, 0x0a, 0x1f, 0x52, 0x45, - 0x50, 0x45, 0x41, 0x54, 0x45, 0x44, 0x5f, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x45, 0x4e, 0x43, - 0x4f, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, - 0x0a, 0x0a, 0x06, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x45, - 0x58, 0x50, 0x41, 0x4e, 0x44, 0x45, 0x44, 0x10, 0x02, 0x22, 0x49, 0x0a, 0x0e, 0x55, 0x74, 0x66, - 0x38, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x17, 0x55, - 0x54, 0x46, 0x38, 0x5f, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, - 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x56, 0x45, 0x52, 0x49, - 0x46, 0x59, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x03, 0x22, 0x04, - 0x08, 0x01, 0x10, 0x01, 0x22, 0x53, 0x0a, 0x0f, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, - 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x1c, 0x0a, 0x18, 0x4d, 0x45, 0x53, 0x53, 0x41, - 0x47, 0x45, 0x5f, 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, - 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x4c, 0x45, 0x4e, 0x47, 0x54, 0x48, 0x5f, - 0x50, 0x52, 0x45, 0x46, 0x49, 0x58, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x44, 0x45, - 0x4c, 0x49, 0x4d, 0x49, 0x54, 0x45, 0x44, 0x10, 0x02, 0x22, 0x48, 0x0a, 0x0a, 0x4a, 0x73, 0x6f, - 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x17, 0x0a, 0x13, 0x4a, 0x53, 0x4f, 0x4e, 0x5f, - 0x46, 0x4f, 0x52, 0x4d, 0x41, 0x54, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, - 0x12, 0x09, 0x0a, 0x05, 0x41, 0x4c, 0x4c, 0x4f, 0x57, 0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, 0x4c, - 0x45, 0x47, 0x41, 0x43, 0x59, 0x5f, 0x42, 0x45, 0x53, 0x54, 0x5f, 0x45, 0x46, 0x46, 0x4f, 0x52, - 0x54, 0x10, 0x02, 0x2a, 0x06, 0x08, 0xe8, 0x07, 0x10, 0x8b, 0x4e, 0x2a, 0x06, 0x08, 0x8b, 0x4e, - 0x10, 0x90, 0x4e, 0x2a, 0x06, 0x08, 0x90, 0x4e, 0x10, 0x91, 0x4e, 0x4a, 0x06, 0x08, 0xe7, 0x07, - 0x10, 0xe8, 0x07, 0x22, 0xef, 0x03, 0x0a, 0x12, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, - 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x58, 0x0a, 0x08, 0x64, 0x65, - 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x67, + 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x54, + 0x79, 0x70, 0x65, 0x42, 0x29, 0x88, 0x01, 0x01, 0x98, 0x01, 0x06, 0x98, 0x01, 0x01, 0xa2, 0x01, + 0x0b, 0x12, 0x06, 0x43, 0x4c, 0x4f, 0x53, 0x45, 0x44, 0x18, 0x84, 0x07, 0xa2, 0x01, 0x09, 0x12, + 0x04, 0x4f, 0x50, 0x45, 0x4e, 0x18, 0xe7, 0x07, 0xb2, 0x01, 0x03, 0x08, 0xe8, 0x07, 0x52, 0x08, + 0x65, 0x6e, 0x75, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x98, 0x01, 0x0a, 0x17, 0x72, 0x65, 0x70, + 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x65, 0x6e, 0x63, 0x6f, + 0x64, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, + 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x42, 0x2d, 0x88, + 0x01, 0x01, 0x98, 0x01, 0x04, 0x98, 0x01, 0x01, 0xa2, 0x01, 0x0d, 0x12, 0x08, 0x45, 0x58, 0x50, + 0x41, 0x4e, 0x44, 0x45, 0x44, 0x18, 0x84, 0x07, 0xa2, 0x01, 0x0b, 0x12, 0x06, 0x50, 0x41, 0x43, + 0x4b, 0x45, 0x44, 0x18, 0xe7, 0x07, 0xb2, 0x01, 0x03, 0x08, 0xe8, 0x07, 0x52, 0x15, 0x72, 0x65, + 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45, 0x6e, 0x63, 0x6f, 0x64, + 0x69, 0x6e, 0x67, 0x12, 0x7e, 0x0a, 0x0f, 0x75, 0x74, 0x66, 0x38, 0x5f, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, - 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, - 0x73, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x45, 0x64, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x52, 0x08, 0x64, 0x65, 0x66, 0x61, - 0x75, 0x6c, 0x74, 0x73, 0x12, 0x41, 0x0a, 0x0f, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x5f, - 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, + 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x55, 0x74, 0x66, 0x38, 0x56, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x29, 0x88, 0x01, 0x01, 0x98, 0x01, 0x04, + 0x98, 0x01, 0x01, 0xa2, 0x01, 0x09, 0x12, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x18, 0x84, 0x07, 0xa2, + 0x01, 0x0b, 0x12, 0x06, 0x56, 0x45, 0x52, 0x49, 0x46, 0x59, 0x18, 0xe7, 0x07, 0xb2, 0x01, 0x03, + 0x08, 0xe8, 0x07, 0x52, 0x0e, 0x75, 0x74, 0x66, 0x38, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x7e, 0x0a, 0x10, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x65, + 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, - 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x41, 0x0a, 0x0f, 0x6d, 0x61, 0x78, 0x69, 0x6d, - 0x75, 0x6d, 0x5f, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x6d, 0x61, 0x78, 0x69, - 0x6d, 0x75, 0x6d, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0xf8, 0x01, 0x0a, 0x18, 0x46, - 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x32, 0x0a, 0x07, 0x65, 0x64, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x07, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4e, 0x0a, 0x14, 0x6f, - 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x66, 0x65, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x42, 0x26, 0x88, 0x01, 0x01, 0x98, + 0x01, 0x04, 0x98, 0x01, 0x01, 0xa2, 0x01, 0x14, 0x12, 0x0f, 0x4c, 0x45, 0x4e, 0x47, 0x54, 0x48, + 0x5f, 0x50, 0x52, 0x45, 0x46, 0x49, 0x58, 0x45, 0x44, 0x18, 0x84, 0x07, 0xb2, 0x01, 0x03, 0x08, + 0xe8, 0x07, 0x52, 0x0f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x63, 0x6f, 0x64, + 0x69, 0x6e, 0x67, 0x12, 0x82, 0x01, 0x0a, 0x0b, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x66, 0x6f, 0x72, + 0x6d, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, - 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x13, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x61, - 0x62, 0x6c, 0x65, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x42, 0x0a, 0x0e, 0x66, - 0x69, 0x78, 0x65, 0x64, 0x5f, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, - 0x52, 0x0d, 0x66, 0x69, 0x78, 0x65, 0x64, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x4a, - 0x04, 0x08, 0x01, 0x10, 0x02, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x52, 0x08, 0x66, 0x65, 0x61, - 0x74, 0x75, 0x72, 0x65, 0x73, 0x22, 0xa7, 0x02, 0x0a, 0x0e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x44, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x4c, 0x6f, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0xce, - 0x01, 0x0a, 0x08, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x04, 0x70, - 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x42, 0x02, 0x10, 0x01, 0x52, 0x04, 0x70, - 0x61, 0x74, 0x68, 0x12, 0x16, 0x0a, 0x04, 0x73, 0x70, 0x61, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, - 0x05, 0x42, 0x02, 0x10, 0x01, 0x52, 0x04, 0x73, 0x70, 0x61, 0x6e, 0x12, 0x29, 0x0a, 0x10, 0x6c, - 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6c, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x6f, - 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x69, - 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x10, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6d, 0x6d, 0x65, - 0x6e, 0x74, 0x73, 0x12, 0x3a, 0x0a, 0x19, 0x6c, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x64, - 0x65, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, - 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x17, 0x6c, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x44, - 0x65, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x22, - 0xd0, 0x02, 0x0a, 0x11, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x64, - 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x4d, 0x0a, 0x0a, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x47, 0x65, 0x6e, 0x65, - 0x72, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x41, 0x6e, - 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0xeb, 0x01, 0x0a, 0x0a, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x05, 0x42, 0x02, 0x10, 0x01, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x1f, 0x0a, 0x0b, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x14, 0x0a, 0x05, - 0x62, 0x65, 0x67, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x62, 0x65, 0x67, - 0x69, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x03, 0x65, 0x6e, 0x64, 0x12, 0x52, 0x0a, 0x08, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x36, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, - 0x65, 0x64, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x52, 0x08, - 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x22, 0x28, 0x0a, 0x08, 0x53, 0x65, 0x6d, 0x61, - 0x6e, 0x74, 0x69, 0x63, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x07, - 0x0a, 0x03, 0x53, 0x45, 0x54, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x41, 0x4c, 0x49, 0x41, 0x53, - 0x10, 0x02, 0x2a, 0xa7, 0x02, 0x0a, 0x07, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x13, - 0x0a, 0x0f, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, - 0x4e, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0e, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4c, - 0x45, 0x47, 0x41, 0x43, 0x59, 0x10, 0x84, 0x07, 0x12, 0x13, 0x0a, 0x0e, 0x45, 0x44, 0x49, 0x54, - 0x49, 0x4f, 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x32, 0x10, 0xe6, 0x07, 0x12, 0x13, 0x0a, - 0x0e, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x33, 0x10, - 0xe7, 0x07, 0x12, 0x11, 0x0a, 0x0c, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x32, 0x30, - 0x32, 0x33, 0x10, 0xe8, 0x07, 0x12, 0x11, 0x0a, 0x0c, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, - 0x5f, 0x32, 0x30, 0x32, 0x34, 0x10, 0xe9, 0x07, 0x12, 0x17, 0x0a, 0x13, 0x45, 0x44, 0x49, 0x54, - 0x49, 0x4f, 0x4e, 0x5f, 0x31, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, - 0x01, 0x12, 0x17, 0x0a, 0x13, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x32, 0x5f, 0x54, - 0x45, 0x53, 0x54, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x02, 0x12, 0x1d, 0x0a, 0x17, 0x45, 0x44, - 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x39, 0x39, 0x39, 0x39, 0x37, 0x5f, 0x54, 0x45, 0x53, 0x54, - 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x9d, 0x8d, 0x06, 0x12, 0x1d, 0x0a, 0x17, 0x45, 0x44, 0x49, - 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x39, 0x39, 0x39, 0x39, 0x38, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x5f, - 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x9e, 0x8d, 0x06, 0x12, 0x1d, 0x0a, 0x17, 0x45, 0x44, 0x49, 0x54, - 0x49, 0x4f, 0x4e, 0x5f, 0x39, 0x39, 0x39, 0x39, 0x39, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x5f, 0x4f, - 0x4e, 0x4c, 0x59, 0x10, 0x9f, 0x8d, 0x06, 0x12, 0x13, 0x0a, 0x0b, 0x45, 0x44, 0x49, 0x54, 0x49, - 0x4f, 0x4e, 0x5f, 0x4d, 0x41, 0x58, 0x10, 0xff, 0xff, 0xff, 0xff, 0x07, 0x42, 0x7e, 0x0a, 0x13, - 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x42, 0x10, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x48, 0x01, 0x5a, 0x2d, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x6f, 0x72, 0x70, 0x62, 0xf8, 0x01, 0x01, 0xa2, 0x02, 0x03, 0x47, 0x50, 0x42, 0xaa, - 0x02, 0x1a, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x52, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, -} + 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x4a, 0x73, 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, + 0x74, 0x42, 0x39, 0x88, 0x01, 0x01, 0x98, 0x01, 0x03, 0x98, 0x01, 0x06, 0x98, 0x01, 0x01, 0xa2, + 0x01, 0x17, 0x12, 0x12, 0x4c, 0x45, 0x47, 0x41, 0x43, 0x59, 0x5f, 0x42, 0x45, 0x53, 0x54, 0x5f, + 0x45, 0x46, 0x46, 0x4f, 0x52, 0x54, 0x18, 0x84, 0x07, 0xa2, 0x01, 0x0a, 0x12, 0x05, 0x41, 0x4c, + 0x4c, 0x4f, 0x57, 0x18, 0xe7, 0x07, 0xb2, 0x01, 0x03, 0x08, 0xe8, 0x07, 0x52, 0x0a, 0x6a, 0x73, + 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x22, 0x5c, 0x0a, 0x0d, 0x46, 0x69, 0x65, 0x6c, + 0x64, 0x50, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x46, 0x49, 0x45, + 0x4c, 0x44, 0x5f, 0x50, 0x52, 0x45, 0x53, 0x45, 0x4e, 0x43, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, + 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x45, 0x58, 0x50, 0x4c, 0x49, 0x43, 0x49, + 0x54, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x49, 0x4d, 0x50, 0x4c, 0x49, 0x43, 0x49, 0x54, 0x10, + 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x4c, 0x45, 0x47, 0x41, 0x43, 0x59, 0x5f, 0x52, 0x45, 0x51, 0x55, + 0x49, 0x52, 0x45, 0x44, 0x10, 0x03, 0x22, 0x37, 0x0a, 0x08, 0x45, 0x6e, 0x75, 0x6d, 0x54, 0x79, + 0x70, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x4f, 0x50, 0x45, + 0x4e, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x4c, 0x4f, 0x53, 0x45, 0x44, 0x10, 0x02, 0x22, + 0x56, 0x0a, 0x15, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, + 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x23, 0x0a, 0x1f, 0x52, 0x45, 0x50, 0x45, + 0x41, 0x54, 0x45, 0x44, 0x5f, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x45, 0x4e, 0x43, 0x4f, 0x44, + 0x49, 0x4e, 0x47, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0a, 0x0a, + 0x06, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x45, 0x58, 0x50, + 0x41, 0x4e, 0x44, 0x45, 0x44, 0x10, 0x02, 0x22, 0x49, 0x0a, 0x0e, 0x55, 0x74, 0x66, 0x38, 0x56, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x17, 0x55, 0x54, 0x46, + 0x38, 0x5f, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x4b, + 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x56, 0x45, 0x52, 0x49, 0x46, 0x59, + 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x03, 0x22, 0x04, 0x08, 0x01, + 0x10, 0x01, 0x22, 0x53, 0x0a, 0x0f, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x63, + 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x1c, 0x0a, 0x18, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, + 0x5f, 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, + 0x4e, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x4c, 0x45, 0x4e, 0x47, 0x54, 0x48, 0x5f, 0x50, 0x52, + 0x45, 0x46, 0x49, 0x58, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x44, 0x45, 0x4c, 0x49, + 0x4d, 0x49, 0x54, 0x45, 0x44, 0x10, 0x02, 0x22, 0x48, 0x0a, 0x0a, 0x4a, 0x73, 0x6f, 0x6e, 0x46, + 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x17, 0x0a, 0x13, 0x4a, 0x53, 0x4f, 0x4e, 0x5f, 0x46, 0x4f, + 0x52, 0x4d, 0x41, 0x54, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x09, + 0x0a, 0x05, 0x41, 0x4c, 0x4c, 0x4f, 0x57, 0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, 0x4c, 0x45, 0x47, + 0x41, 0x43, 0x59, 0x5f, 0x42, 0x45, 0x53, 0x54, 0x5f, 0x45, 0x46, 0x46, 0x4f, 0x52, 0x54, 0x10, + 0x02, 0x2a, 0x06, 0x08, 0xe8, 0x07, 0x10, 0x8b, 0x4e, 0x2a, 0x06, 0x08, 0x8b, 0x4e, 0x10, 0x90, + 0x4e, 0x2a, 0x06, 0x08, 0x90, 0x4e, 0x10, 0x91, 0x4e, 0x4a, 0x06, 0x08, 0xe7, 0x07, 0x10, 0xe8, + 0x07, 0x22, 0xef, 0x03, 0x0a, 0x12, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, + 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x58, 0x0a, 0x08, 0x64, 0x65, 0x66, 0x61, + 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x2e, + 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x52, 0x08, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, + 0x74, 0x73, 0x12, 0x41, 0x0a, 0x0f, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x65, 0x64, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x45, 0x64, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x41, 0x0a, 0x0f, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, + 0x5f, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, + 0x6d, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0xf8, 0x01, 0x0a, 0x18, 0x46, 0x65, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, + 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x32, 0x0a, 0x07, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x07, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4e, 0x0a, 0x14, 0x6f, 0x76, 0x65, + 0x72, 0x72, 0x69, 0x64, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, + 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x53, 0x65, 0x74, 0x52, 0x13, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x61, 0x62, 0x6c, + 0x65, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x42, 0x0a, 0x0e, 0x66, 0x69, 0x78, + 0x65, 0x64, 0x5f, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x0d, + 0x66, 0x69, 0x78, 0x65, 0x64, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x4a, 0x04, 0x08, + 0x01, 0x10, 0x02, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x73, 0x22, 0xb5, 0x02, 0x0a, 0x0e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, + 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x44, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0xce, 0x01, 0x0a, + 0x08, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x04, 0x70, 0x61, 0x74, + 0x68, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x42, 0x02, 0x10, 0x01, 0x52, 0x04, 0x70, 0x61, 0x74, + 0x68, 0x12, 0x16, 0x0a, 0x04, 0x73, 0x70, 0x61, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, 0x05, 0x42, + 0x02, 0x10, 0x01, 0x52, 0x04, 0x73, 0x70, 0x61, 0x6e, 0x12, 0x29, 0x0a, 0x10, 0x6c, 0x65, 0x61, + 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6c, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6d, 0x6d, + 0x65, 0x6e, 0x74, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x69, 0x6e, 0x67, + 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x10, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, + 0x73, 0x12, 0x3a, 0x0a, 0x19, 0x6c, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x65, 0x74, + 0x61, 0x63, 0x68, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x06, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x17, 0x6c, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x74, + 0x61, 0x63, 0x68, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2a, 0x0c, 0x08, + 0x80, 0xec, 0xca, 0xff, 0x01, 0x10, 0x81, 0xec, 0xca, 0xff, 0x01, 0x22, 0xd0, 0x02, 0x0a, 0x11, + 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, + 0x6f, 0x12, 0x4d, 0x0a, 0x0a, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, + 0x64, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x1a, 0xeb, 0x01, 0x0a, 0x0a, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x16, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x42, 0x02, 0x10, + 0x01, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x65, 0x67, 0x69, + 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x62, 0x65, 0x67, 0x69, 0x6e, 0x12, 0x10, + 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x65, 0x6e, 0x64, + 0x12, 0x52, 0x0a, 0x08, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x36, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, + 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x2e, 0x53, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x52, 0x08, 0x73, 0x65, 0x6d, 0x61, + 0x6e, 0x74, 0x69, 0x63, 0x22, 0x28, 0x0a, 0x08, 0x53, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, + 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x53, 0x45, + 0x54, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x41, 0x4c, 0x49, 0x41, 0x53, 0x10, 0x02, 0x2a, 0xa7, + 0x02, 0x0a, 0x07, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x13, 0x0a, 0x0f, 0x45, 0x44, + 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, + 0x13, 0x0a, 0x0e, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4c, 0x45, 0x47, 0x41, 0x43, + 0x59, 0x10, 0x84, 0x07, 0x12, 0x13, 0x0a, 0x0e, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, + 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x32, 0x10, 0xe6, 0x07, 0x12, 0x13, 0x0a, 0x0e, 0x45, 0x44, 0x49, + 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x33, 0x10, 0xe7, 0x07, 0x12, 0x11, + 0x0a, 0x0c, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x32, 0x30, 0x32, 0x33, 0x10, 0xe8, + 0x07, 0x12, 0x11, 0x0a, 0x0c, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x32, 0x30, 0x32, + 0x34, 0x10, 0xe9, 0x07, 0x12, 0x17, 0x0a, 0x13, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, + 0x31, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x01, 0x12, 0x17, 0x0a, + 0x13, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x32, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x5f, + 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x02, 0x12, 0x1d, 0x0a, 0x17, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, + 0x4e, 0x5f, 0x39, 0x39, 0x39, 0x39, 0x37, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x5f, 0x4f, 0x4e, 0x4c, + 0x59, 0x10, 0x9d, 0x8d, 0x06, 0x12, 0x1d, 0x0a, 0x17, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, + 0x5f, 0x39, 0x39, 0x39, 0x39, 0x38, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, + 0x10, 0x9e, 0x8d, 0x06, 0x12, 0x1d, 0x0a, 0x17, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, + 0x39, 0x39, 0x39, 0x39, 0x39, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, + 0x9f, 0x8d, 0x06, 0x12, 0x13, 0x0a, 0x0b, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4d, + 0x41, 0x58, 0x10, 0xff, 0xff, 0xff, 0xff, 0x07, 0x42, 0x7e, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x42, + 0x10, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x73, 0x48, 0x01, 0x5a, 0x2d, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, + 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, + 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, + 0x70, 0x62, 0xf8, 0x01, 0x01, 0xa2, 0x02, 0x03, 0x47, 0x50, 0x42, 0xaa, 0x02, 0x1a, 0x47, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x52, 0x65, + 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, +}) var ( file_google_protobuf_descriptor_proto_rawDescOnce sync.Once - file_google_protobuf_descriptor_proto_rawDescData = file_google_protobuf_descriptor_proto_rawDesc + file_google_protobuf_descriptor_proto_rawDescData []byte ) func file_google_protobuf_descriptor_proto_rawDescGZIP() []byte { file_google_protobuf_descriptor_proto_rawDescOnce.Do(func() { - file_google_protobuf_descriptor_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_protobuf_descriptor_proto_rawDescData) + file_google_protobuf_descriptor_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_google_protobuf_descriptor_proto_rawDesc), len(file_google_protobuf_descriptor_proto_rawDesc))) }) return file_google_protobuf_descriptor_proto_rawDescData } @@ -5323,7 +5293,7 @@ func file_google_protobuf_descriptor_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_google_protobuf_descriptor_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_google_protobuf_descriptor_proto_rawDesc), len(file_google_protobuf_descriptor_proto_rawDesc)), NumEnums: 17, NumMessages: 33, NumExtensions: 0, @@ -5335,7 +5305,6 @@ func file_google_protobuf_descriptor_proto_init() { MessageInfos: file_google_protobuf_descriptor_proto_msgTypes, }.Build() File_google_protobuf_descriptor_proto = out.File - file_google_protobuf_descriptor_proto_rawDesc = nil file_google_protobuf_descriptor_proto_goTypes = nil file_google_protobuf_descriptor_proto_depIdxs = nil } diff --git a/vendor/google.golang.org/protobuf/types/gofeaturespb/go_features.pb.go b/vendor/google.golang.org/protobuf/types/gofeaturespb/go_features.pb.go index c7e860fcd..28d24bad7 100644 --- a/vendor/google.golang.org/protobuf/types/gofeaturespb/go_features.pb.go +++ b/vendor/google.golang.org/protobuf/types/gofeaturespb/go_features.pb.go @@ -16,15 +16,146 @@ import ( descriptorpb "google.golang.org/protobuf/types/descriptorpb" reflect "reflect" sync "sync" + unsafe "unsafe" ) -type GoFeatures struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +type GoFeatures_APILevel int32 + +const ( + // API_LEVEL_UNSPECIFIED results in selecting the OPEN API, + // but needs to be a separate value to distinguish between + // an explicitly set api level or a missing api level. + GoFeatures_API_LEVEL_UNSPECIFIED GoFeatures_APILevel = 0 + GoFeatures_API_OPEN GoFeatures_APILevel = 1 + GoFeatures_API_HYBRID GoFeatures_APILevel = 2 + GoFeatures_API_OPAQUE GoFeatures_APILevel = 3 +) + +// Enum value maps for GoFeatures_APILevel. +var ( + GoFeatures_APILevel_name = map[int32]string{ + 0: "API_LEVEL_UNSPECIFIED", + 1: "API_OPEN", + 2: "API_HYBRID", + 3: "API_OPAQUE", + } + GoFeatures_APILevel_value = map[string]int32{ + "API_LEVEL_UNSPECIFIED": 0, + "API_OPEN": 1, + "API_HYBRID": 2, + "API_OPAQUE": 3, + } +) + +func (x GoFeatures_APILevel) Enum() *GoFeatures_APILevel { + p := new(GoFeatures_APILevel) + *p = x + return p +} + +func (x GoFeatures_APILevel) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (GoFeatures_APILevel) Descriptor() protoreflect.EnumDescriptor { + return file_google_protobuf_go_features_proto_enumTypes[0].Descriptor() +} + +func (GoFeatures_APILevel) Type() protoreflect.EnumType { + return &file_google_protobuf_go_features_proto_enumTypes[0] +} + +func (x GoFeatures_APILevel) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Do not use. +func (x *GoFeatures_APILevel) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) + if err != nil { + return err + } + *x = GoFeatures_APILevel(num) + return nil +} + +// Deprecated: Use GoFeatures_APILevel.Descriptor instead. +func (GoFeatures_APILevel) EnumDescriptor() ([]byte, []int) { + return file_google_protobuf_go_features_proto_rawDescGZIP(), []int{0, 0} +} + +type GoFeatures_StripEnumPrefix int32 + +const ( + GoFeatures_STRIP_ENUM_PREFIX_UNSPECIFIED GoFeatures_StripEnumPrefix = 0 + GoFeatures_STRIP_ENUM_PREFIX_KEEP GoFeatures_StripEnumPrefix = 1 + GoFeatures_STRIP_ENUM_PREFIX_GENERATE_BOTH GoFeatures_StripEnumPrefix = 2 + GoFeatures_STRIP_ENUM_PREFIX_STRIP GoFeatures_StripEnumPrefix = 3 +) + +// Enum value maps for GoFeatures_StripEnumPrefix. +var ( + GoFeatures_StripEnumPrefix_name = map[int32]string{ + 0: "STRIP_ENUM_PREFIX_UNSPECIFIED", + 1: "STRIP_ENUM_PREFIX_KEEP", + 2: "STRIP_ENUM_PREFIX_GENERATE_BOTH", + 3: "STRIP_ENUM_PREFIX_STRIP", + } + GoFeatures_StripEnumPrefix_value = map[string]int32{ + "STRIP_ENUM_PREFIX_UNSPECIFIED": 0, + "STRIP_ENUM_PREFIX_KEEP": 1, + "STRIP_ENUM_PREFIX_GENERATE_BOTH": 2, + "STRIP_ENUM_PREFIX_STRIP": 3, + } +) + +func (x GoFeatures_StripEnumPrefix) Enum() *GoFeatures_StripEnumPrefix { + p := new(GoFeatures_StripEnumPrefix) + *p = x + return p +} + +func (x GoFeatures_StripEnumPrefix) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (GoFeatures_StripEnumPrefix) Descriptor() protoreflect.EnumDescriptor { + return file_google_protobuf_go_features_proto_enumTypes[1].Descriptor() +} + +func (GoFeatures_StripEnumPrefix) Type() protoreflect.EnumType { + return &file_google_protobuf_go_features_proto_enumTypes[1] +} + +func (x GoFeatures_StripEnumPrefix) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} +// Deprecated: Do not use. +func (x *GoFeatures_StripEnumPrefix) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) + if err != nil { + return err + } + *x = GoFeatures_StripEnumPrefix(num) + return nil +} + +// Deprecated: Use GoFeatures_StripEnumPrefix.Descriptor instead. +func (GoFeatures_StripEnumPrefix) EnumDescriptor() ([]byte, []int) { + return file_google_protobuf_go_features_proto_rawDescGZIP(), []int{0, 1} +} + +type GoFeatures struct { + state protoimpl.MessageState `protogen:"open.v1"` // Whether or not to generate the deprecated UnmarshalJSON method for enums. + // Can only be true for proto using the Open Struct api. LegacyUnmarshalJsonEnum *bool `protobuf:"varint,1,opt,name=legacy_unmarshal_json_enum,json=legacyUnmarshalJsonEnum" json:"legacy_unmarshal_json_enum,omitempty"` + // One of OPEN, HYBRID or OPAQUE. + ApiLevel *GoFeatures_APILevel `protobuf:"varint,2,opt,name=api_level,json=apiLevel,enum=pb.GoFeatures_APILevel" json:"api_level,omitempty"` + StripEnumPrefix *GoFeatures_StripEnumPrefix `protobuf:"varint,3,opt,name=strip_enum_prefix,json=stripEnumPrefix,enum=pb.GoFeatures_StripEnumPrefix" json:"strip_enum_prefix,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GoFeatures) Reset() { @@ -64,6 +195,20 @@ func (x *GoFeatures) GetLegacyUnmarshalJsonEnum() bool { return false } +func (x *GoFeatures) GetApiLevel() GoFeatures_APILevel { + if x != nil && x.ApiLevel != nil { + return *x.ApiLevel + } + return GoFeatures_API_LEVEL_UNSPECIFIED +} + +func (x *GoFeatures) GetStripEnumPrefix() GoFeatures_StripEnumPrefix { + if x != nil && x.StripEnumPrefix != nil { + return *x.StripEnumPrefix + } + return GoFeatures_STRIP_ENUM_PREFIX_UNSPECIFIED +} + var file_google_protobuf_go_features_proto_extTypes = []protoimpl.ExtensionInfo{ { ExtendedType: (*descriptorpb.FeatureSet)(nil), @@ -83,12 +228,12 @@ var ( var File_google_protobuf_go_features_proto protoreflect.FileDescriptor -var file_google_protobuf_go_features_proto_rawDesc = []byte{ +var file_google_protobuf_go_features_proto_rawDesc = string([]byte{ 0x0a, 0x21, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x67, 0x6f, 0x5f, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xcd, 0x01, 0x0a, 0x0a, 0x47, 0x6f, + 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xab, 0x05, 0x0a, 0x0a, 0x47, 0x6f, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0xbe, 0x01, 0x0a, 0x1a, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x5f, 0x75, 0x6e, 0x6d, 0x61, 0x72, 0x73, 0x68, 0x61, 0x6c, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x42, 0x80, 0x01, @@ -101,41 +246,76 @@ var file_google_protobuf_go_features_proto_rawDesc = []byte{ 0x20, 0x62, 0x65, 0x20, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x61, 0x20, 0x66, 0x75, 0x74, 0x75, 0x72, 0x65, 0x20, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x17, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x55, 0x6e, 0x6d, 0x61, 0x72, 0x73, 0x68, 0x61, - 0x6c, 0x4a, 0x73, 0x6f, 0x6e, 0x45, 0x6e, 0x75, 0x6d, 0x3a, 0x3c, 0x0a, 0x02, 0x67, 0x6f, 0x12, - 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x18, 0xea, 0x07, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x6f, 0x46, 0x65, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x73, 0x52, 0x02, 0x67, 0x6f, 0x42, 0x2f, 0x5a, 0x2d, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x67, 0x6f, 0x66, 0x65, - 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x70, 0x62, -} + 0x6c, 0x4a, 0x73, 0x6f, 0x6e, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x74, 0x0a, 0x09, 0x61, 0x70, 0x69, + 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x70, + 0x62, 0x2e, 0x47, 0x6f, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x2e, 0x41, 0x50, 0x49, + 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x42, 0x3e, 0x88, 0x01, 0x01, 0x98, 0x01, 0x03, 0x98, 0x01, 0x01, + 0xa2, 0x01, 0x1a, 0x12, 0x15, 0x41, 0x50, 0x49, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x55, + 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x18, 0x84, 0x07, 0xa2, 0x01, 0x0f, + 0x12, 0x0a, 0x41, 0x50, 0x49, 0x5f, 0x4f, 0x50, 0x41, 0x51, 0x55, 0x45, 0x18, 0xe9, 0x07, 0xb2, + 0x01, 0x03, 0x08, 0xe8, 0x07, 0x52, 0x08, 0x61, 0x70, 0x69, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, + 0x7c, 0x0a, 0x11, 0x73, 0x74, 0x72, 0x69, 0x70, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x70, 0x72, + 0x65, 0x66, 0x69, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x70, 0x62, 0x2e, + 0x47, 0x6f, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x70, + 0x45, 0x6e, 0x75, 0x6d, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x42, 0x30, 0x88, 0x01, 0x01, 0x98, + 0x01, 0x06, 0x98, 0x01, 0x07, 0x98, 0x01, 0x01, 0xa2, 0x01, 0x1b, 0x12, 0x16, 0x53, 0x54, 0x52, + 0x49, 0x50, 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x50, 0x52, 0x45, 0x46, 0x49, 0x58, 0x5f, 0x4b, + 0x45, 0x45, 0x50, 0x18, 0x84, 0x07, 0xb2, 0x01, 0x03, 0x08, 0xe9, 0x07, 0x52, 0x0f, 0x73, 0x74, + 0x72, 0x69, 0x70, 0x45, 0x6e, 0x75, 0x6d, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x22, 0x53, 0x0a, + 0x08, 0x41, 0x50, 0x49, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x19, 0x0a, 0x15, 0x41, 0x50, 0x49, + 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, + 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x41, 0x50, 0x49, 0x5f, 0x4f, 0x50, 0x45, 0x4e, + 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x41, 0x50, 0x49, 0x5f, 0x48, 0x59, 0x42, 0x52, 0x49, 0x44, + 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x41, 0x50, 0x49, 0x5f, 0x4f, 0x50, 0x41, 0x51, 0x55, 0x45, + 0x10, 0x03, 0x22, 0x92, 0x01, 0x0a, 0x0f, 0x53, 0x74, 0x72, 0x69, 0x70, 0x45, 0x6e, 0x75, 0x6d, + 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x21, 0x0a, 0x1d, 0x53, 0x54, 0x52, 0x49, 0x50, 0x5f, + 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x50, 0x52, 0x45, 0x46, 0x49, 0x58, 0x5f, 0x55, 0x4e, 0x53, 0x50, + 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1a, 0x0a, 0x16, 0x53, 0x54, 0x52, + 0x49, 0x50, 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x50, 0x52, 0x45, 0x46, 0x49, 0x58, 0x5f, 0x4b, + 0x45, 0x45, 0x50, 0x10, 0x01, 0x12, 0x23, 0x0a, 0x1f, 0x53, 0x54, 0x52, 0x49, 0x50, 0x5f, 0x45, + 0x4e, 0x55, 0x4d, 0x5f, 0x50, 0x52, 0x45, 0x46, 0x49, 0x58, 0x5f, 0x47, 0x45, 0x4e, 0x45, 0x52, + 0x41, 0x54, 0x45, 0x5f, 0x42, 0x4f, 0x54, 0x48, 0x10, 0x02, 0x12, 0x1b, 0x0a, 0x17, 0x53, 0x54, + 0x52, 0x49, 0x50, 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x50, 0x52, 0x45, 0x46, 0x49, 0x58, 0x5f, + 0x53, 0x54, 0x52, 0x49, 0x50, 0x10, 0x03, 0x3a, 0x3c, 0x0a, 0x02, 0x67, 0x6f, 0x12, 0x1b, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x18, 0xea, 0x07, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x6f, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, + 0x73, 0x52, 0x02, 0x67, 0x6f, 0x42, 0x2f, 0x5a, 0x2d, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x67, 0x6f, 0x66, 0x65, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x73, 0x70, 0x62, +}) var ( file_google_protobuf_go_features_proto_rawDescOnce sync.Once - file_google_protobuf_go_features_proto_rawDescData = file_google_protobuf_go_features_proto_rawDesc + file_google_protobuf_go_features_proto_rawDescData []byte ) func file_google_protobuf_go_features_proto_rawDescGZIP() []byte { file_google_protobuf_go_features_proto_rawDescOnce.Do(func() { - file_google_protobuf_go_features_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_protobuf_go_features_proto_rawDescData) + file_google_protobuf_go_features_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_google_protobuf_go_features_proto_rawDesc), len(file_google_protobuf_go_features_proto_rawDesc))) }) return file_google_protobuf_go_features_proto_rawDescData } +var file_google_protobuf_go_features_proto_enumTypes = make([]protoimpl.EnumInfo, 2) var file_google_protobuf_go_features_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_google_protobuf_go_features_proto_goTypes = []any{ - (*GoFeatures)(nil), // 0: pb.GoFeatures - (*descriptorpb.FeatureSet)(nil), // 1: google.protobuf.FeatureSet + (GoFeatures_APILevel)(0), // 0: pb.GoFeatures.APILevel + (GoFeatures_StripEnumPrefix)(0), // 1: pb.GoFeatures.StripEnumPrefix + (*GoFeatures)(nil), // 2: pb.GoFeatures + (*descriptorpb.FeatureSet)(nil), // 3: google.protobuf.FeatureSet } var file_google_protobuf_go_features_proto_depIdxs = []int32{ - 1, // 0: pb.go:extendee -> google.protobuf.FeatureSet - 0, // 1: pb.go:type_name -> pb.GoFeatures - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 1, // [1:2] is the sub-list for extension type_name - 0, // [0:1] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name + 0, // 0: pb.GoFeatures.api_level:type_name -> pb.GoFeatures.APILevel + 1, // 1: pb.GoFeatures.strip_enum_prefix:type_name -> pb.GoFeatures.StripEnumPrefix + 3, // 2: pb.go:extendee -> google.protobuf.FeatureSet + 2, // 3: pb.go:type_name -> pb.GoFeatures + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 3, // [3:4] is the sub-list for extension type_name + 2, // [2:3] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name } func init() { file_google_protobuf_go_features_proto_init() } @@ -147,19 +327,19 @@ func file_google_protobuf_go_features_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_google_protobuf_go_features_proto_rawDesc, - NumEnums: 0, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_google_protobuf_go_features_proto_rawDesc), len(file_google_protobuf_go_features_proto_rawDesc)), + NumEnums: 2, NumMessages: 1, NumExtensions: 1, NumServices: 0, }, GoTypes: file_google_protobuf_go_features_proto_goTypes, DependencyIndexes: file_google_protobuf_go_features_proto_depIdxs, + EnumInfos: file_google_protobuf_go_features_proto_enumTypes, MessageInfos: file_google_protobuf_go_features_proto_msgTypes, ExtensionInfos: file_google_protobuf_go_features_proto_extTypes, }.Build() File_google_protobuf_go_features_proto = out.File - file_google_protobuf_go_features_proto_rawDesc = nil file_google_protobuf_go_features_proto_goTypes = nil file_google_protobuf_go_features_proto_depIdxs = nil } diff --git a/vendor/modules.txt b/vendor/modules.txt index 58b79390e..517ea9479 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1,15 +1,15 @@ # dario.cat/mergo v1.0.1 ## explicit; go 1.13 dario.cat/mergo -# github.com/Azure/aztfmigrate v1.15.1-0.20241113022352-4681ae5d18c0 -## explicit; go 1.22.0 +# github.com/Azure/aztfmigrate v1.15.1-0.20250227042733-c21045529abd +## explicit; go 1.23.0 github.com/Azure/aztfmigrate/azurerm github.com/Azure/aztfmigrate/azurerm/coverage github.com/Azure/aztfmigrate/azurerm/schema github.com/Azure/aztfmigrate/helper github.com/Azure/aztfmigrate/tf github.com/Azure/aztfmigrate/types -# github.com/Azure/azure-sdk-for-go/sdk/azcore v1.14.0 +# github.com/Azure/azure-sdk-for-go/sdk/azcore v1.17.0 ## explicit; go 1.18 github.com/Azure/azure-sdk-for-go/sdk/azcore github.com/Azure/azure-sdk-for-go/sdk/azcore/arm @@ -68,7 +68,7 @@ github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice # github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn v1.1.1 ## explicit; go 1.18 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn -# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices v1.6.0 +# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices v1.7.0 ## explicit; go 1.18 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices # github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5 v5.7.0 @@ -104,6 +104,9 @@ github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor # github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight v1.2.0 ## explicit; go 1.18 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight +# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridkubernetes/armhybridkubernetes v1.2.0 +## explicit; go 1.18 +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridkubernetes/armhybridkubernetes # github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub v1.3.0 ## explicit; go 1.18 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub @@ -116,9 +119,9 @@ github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto # github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic v1.2.0 ## explicit; go 1.18 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic -# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3 v3.2.0 +# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4 v4.0.0 ## explicit; go 1.18 -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3 +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4 # github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor v0.7.0 ## explicit; go 1.18 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor @@ -146,6 +149,9 @@ github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscr # github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2 v2.0.0-beta.4 ## explicit; go 1.18 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2 +# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql v1.2.0 +## explicit; go 1.18 +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql # github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.6.0 ## explicit; go 1.18 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage @@ -173,14 +179,12 @@ github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/workloads/armworkloads # github.com/Masterminds/goutils v1.1.1 ## explicit github.com/Masterminds/goutils -# github.com/Masterminds/semver/v3 v3.3.0 +# github.com/Masterminds/semver/v3 v3.3.1 ## explicit; go 1.21 github.com/Masterminds/semver/v3 # github.com/Masterminds/sprig/v3 v3.3.0 ## explicit; go 1.21 github.com/Masterminds/sprig/v3 -# github.com/Microsoft/go-winio v0.6.2 -## explicit; go 1.21 # github.com/agext/levenshtein v1.2.3 ## explicit github.com/agext/levenshtein @@ -222,7 +226,7 @@ github.com/expr-lang/expr/parser/utils github.com/expr-lang/expr/patcher github.com/expr-lang/expr/vm github.com/expr-lang/expr/vm/runtime -# github.com/fatih/color v1.17.0 +# github.com/fatih/color v1.18.0 ## explicit; go 1.17 github.com/fatih/color # github.com/gertd/go-pluralize v0.2.1 @@ -231,8 +235,8 @@ github.com/gertd/go-pluralize # github.com/golang/protobuf v1.5.4 ## explicit; go 1.17 github.com/golang/protobuf/proto -# github.com/google/go-cmp v0.6.0 -## explicit; go 1.13 +# github.com/google/go-cmp v0.7.0 +## explicit; go 1.21 github.com/google/go-cmp/cmp github.com/google/go-cmp/cmp/internal/diff github.com/google/go-cmp/cmp/internal/flags @@ -264,7 +268,7 @@ github.com/hashicorp/go-uuid # github.com/hashicorp/go-version v1.7.0 ## explicit github.com/hashicorp/go-version -# github.com/hashicorp/hc-install v0.9.0 +# github.com/hashicorp/hc-install v0.9.1 ## explicit; go 1.22.0 github.com/hashicorp/hc-install github.com/hashicorp/hc-install/errors @@ -280,7 +284,7 @@ github.com/hashicorp/hcl-lang/decoder github.com/hashicorp/hcl-lang/lang github.com/hashicorp/hcl-lang/reference github.com/hashicorp/hcl-lang/schema -# github.com/hashicorp/hcl/v2 v2.22.0 +# github.com/hashicorp/hcl/v2 v2.23.0 ## explicit; go 1.18 github.com/hashicorp/hcl/v2 github.com/hashicorp/hcl/v2/ext/customdecode @@ -291,14 +295,14 @@ github.com/hashicorp/hcl/v2/hclwrite # github.com/hashicorp/logutils v1.0.0 ## explicit github.com/hashicorp/logutils -# github.com/hashicorp/terraform-exec v0.21.0 -## explicit; go 1.18 +# github.com/hashicorp/terraform-exec v0.22.0 +## explicit; go 1.22.0 github.com/hashicorp/terraform-exec/internal/version github.com/hashicorp/terraform-exec/tfexec -# github.com/hashicorp/terraform-json v0.22.1 +# github.com/hashicorp/terraform-json v0.24.0 ## explicit; go 1.18 github.com/hashicorp/terraform-json -# github.com/hashicorp/terraform-plugin-go v0.24.0 +# github.com/hashicorp/terraform-plugin-go v0.26.0 ## explicit; go 1.22.0 github.com/hashicorp/terraform-plugin-go/tfprotov5 github.com/hashicorp/terraform-plugin-go/tftypes @@ -309,8 +313,8 @@ github.com/hashicorp/terraform-plugin-log/internal/hclogutils github.com/hashicorp/terraform-plugin-log/internal/logging github.com/hashicorp/terraform-plugin-log/tflog github.com/hashicorp/terraform-plugin-log/tfsdklog -# github.com/hashicorp/terraform-plugin-sdk/v2 v2.34.0 -## explicit; go 1.21 +# github.com/hashicorp/terraform-plugin-sdk/v2 v2.36.1 +## explicit; go 1.22.0 github.com/hashicorp/terraform-plugin-sdk/v2/diag github.com/hashicorp/terraform-plugin-sdk/v2/helper/logging github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema @@ -330,7 +334,7 @@ github.com/huandu/xstrings # github.com/magodo/armid v0.0.0-20240524082432-7ce06ae46c33 ## explicit; go 1.18 github.com/magodo/armid -# github.com/magodo/aztft v0.3.1-0.20241011060757-310738ca90dd +# github.com/magodo/aztft v0.3.1-0.20250220225137-662088a9e6d6 ## explicit; go 1.19 github.com/magodo/aztft/aztft github.com/magodo/aztft/internal/client @@ -355,8 +359,8 @@ github.com/magodo/tfpluginschema/schema ## explicit; go 1.18 github.com/magodo/tfstate github.com/magodo/tfstate/terraform/jsonschema -# github.com/mattn/go-colorable v0.1.13 -## explicit; go 1.15 +# github.com/mattn/go-colorable v0.1.14 +## explicit; go 1.18 github.com/mattn/go-colorable # github.com/mattn/go-isatty v0.0.20 ## explicit; go 1.15 @@ -391,7 +395,7 @@ github.com/shopspring/decimal ## explicit; go 1.13 github.com/spf13/afero github.com/spf13/afero/mem -# github.com/spf13/cast v1.7.0 +# github.com/spf13/cast v1.7.1 ## explicit; go 1.19 github.com/spf13/cast # github.com/vmihailenco/msgpack v4.0.4+incompatible @@ -407,7 +411,7 @@ github.com/vmihailenco/msgpack/v5/msgpcode github.com/vmihailenco/tagparser/v2 github.com/vmihailenco/tagparser/v2/internal github.com/vmihailenco/tagparser/v2/internal/parser -# github.com/zclconf/go-cty v1.15.0 +# github.com/zclconf/go-cty v1.16.2 ## explicit; go 1.18 github.com/zclconf/go-cty/cty github.com/zclconf/go-cty/cty/convert @@ -487,7 +491,7 @@ google.golang.org/appengine/internal/datastore google.golang.org/appengine/internal/log google.golang.org/appengine/internal/modules google.golang.org/appengine/internal/remote_api -# google.golang.org/protobuf v1.35.1 +# google.golang.org/protobuf v1.36.5 ## explicit; go 1.21 google.golang.org/protobuf/encoding/prototext google.golang.org/protobuf/encoding/protowire @@ -508,6 +512,7 @@ google.golang.org/protobuf/internal/genid google.golang.org/protobuf/internal/impl google.golang.org/protobuf/internal/order google.golang.org/protobuf/internal/pragma +google.golang.org/protobuf/internal/protolazy google.golang.org/protobuf/internal/set google.golang.org/protobuf/internal/strs google.golang.org/protobuf/internal/version